mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Small fixes for (#1149)
This commit is contained in:
parent
d7259a49db
commit
61ac5bb3d1
5 changed files with 28 additions and 28 deletions
|
|
@ -1,16 +1,16 @@
|
|||
namespace MinecraftClient.Mapping
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents Minecraft Entity Types
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Generated from registries.json using EntityPaletteGenerator.cs.
|
||||
/// Typical steps to handle new entity IDs for newer Minecraft versions:
|
||||
/// 1. Generate registries.json using data reporting on Vanilla Minecraft (https://wiki.vg/Data_Generators)
|
||||
/// 2. Generate temporary EntityTypeXXX.cs and EntityPaletteXXX.cs using EntityPaletteGenerator.cs
|
||||
/// 3. Perform a diff with existing versions, add missing entries in EntityType.cs and EntityTypeExtensions.cs
|
||||
/// 4. If existing entity IDs were not randomized by Mojang, simply add missing entries to the latest existing EntityPaletteXXX.cs
|
||||
/// 5. If existing entity IDs were randomized, add a new palette as EntityPaletteXXX.cs into the codebase (worst case)
|
||||
/// <summary>
|
||||
/// Represents Minecraft Entity Types
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Generated from registries.json using EntityPaletteGenerator.cs.
|
||||
/// Typical steps to handle new entity IDs for newer Minecraft versions:
|
||||
/// 1. Generate registries.json using data reporting on Vanilla Minecraft (https://wiki.vg/Data_Generators)
|
||||
/// 2. Generate temporary EntityTypeXXX.cs and EntityPaletteXXX.cs using EntityPaletteGenerator.cs
|
||||
/// 3. Perform a diff with existing versions, add missing entries in EntityType.cs and EntityTypeExtensions.cs
|
||||
/// 4. If existing entity IDs were not randomized by Mojang, simply add missing entries to the latest existing EntityPaletteXXX.cs
|
||||
/// 5. If existing entity IDs were randomized, add a new palette as EntityPaletteXXX.cs into the codebase (worst case)
|
||||
/// </remarks>
|
||||
public enum EntityType
|
||||
{
|
||||
|
|
@ -42,6 +42,7 @@ namespace MinecraftClient.Mapping
|
|||
EyeOfEnder,
|
||||
FallingBlock,
|
||||
FireworkRocket,
|
||||
FishingBobber,
|
||||
Fox,
|
||||
Ghast,
|
||||
Giant,
|
||||
|
|
@ -100,6 +101,7 @@ namespace MinecraftClient.Mapping
|
|||
Egg,
|
||||
EnderPearl,
|
||||
ExperienceBottle,
|
||||
Player,
|
||||
Potion,
|
||||
Trident,
|
||||
TraderLlama,
|
||||
|
|
@ -119,7 +121,5 @@ namespace MinecraftClient.Mapping
|
|||
ZombieHorse,
|
||||
ZombieVillager,
|
||||
ZombiePigman,
|
||||
Player,
|
||||
FishingBobber,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ namespace MinecraftClient.Mapping
|
|||
case EntityType.Evoker:
|
||||
case EntityType.Ghast:
|
||||
case EntityType.Guardian:
|
||||
case EntityType.Hoglin:
|
||||
case EntityType.Hoglin:
|
||||
case EntityType.Husk:
|
||||
case EntityType.MagmaCube:
|
||||
case EntityType.Phantom:
|
||||
case EntityType.Piglin:
|
||||
case EntityType.Pillager:
|
||||
case EntityType.Pillager:
|
||||
case EntityType.Ravager:
|
||||
case EntityType.Shulker:
|
||||
case EntityType.Silverfish:
|
||||
|
|
@ -39,7 +39,7 @@ namespace MinecraftClient.Mapping
|
|||
case EntityType.Vindicator:
|
||||
case EntityType.Witch:
|
||||
case EntityType.WitherSkeleton:
|
||||
case EntityType.Zoglin:
|
||||
case EntityType.Zoglin:
|
||||
case EntityType.Zombie:
|
||||
case EntityType.ZombieVillager:
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -671,12 +671,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
return bytes.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Build an boolean for sending over the network
|
||||
/// </summary>
|
||||
/// <param name="paramBool">Boolean to encode</param>
|
||||
/// <returns>Byte array for this boolean</returns>
|
||||
public byte[] GetVarBool(bool paramBool)
|
||||
public byte[] GetBool(bool paramBool)
|
||||
{
|
||||
List<byte> bytes = new List<byte>();
|
||||
bytes.Add((byte)Convert.ToByte(paramBool));
|
||||
|
|
|
|||
|
|
@ -106,11 +106,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
if (protocolversion > MC1161Version && handler.GetEntityHandlingEnabled())
|
||||
throw new NotImplementedException("Please update entity types handling for this Minecraft version. See EntityType.cs");
|
||||
if (protocolversion < MC115Version)
|
||||
entityPalette = new EntityPalette114();
|
||||
if (protocolversion > MC115Version)
|
||||
if (protocolversion >= MC116Version)
|
||||
entityPalette = new EntityPalette116();
|
||||
else entityPalette = new EntityPalette115();
|
||||
else if (protocolversion >= MC115Version)
|
||||
entityPalette = new EntityPalette115();
|
||||
else entityPalette = new EntityPalette114();
|
||||
}
|
||||
else entityPalette = new EntityPalette113();
|
||||
}
|
||||
|
|
@ -1439,11 +1439,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
fields.AddRange(dataTypes.GetVarInt(EntityID));
|
||||
fields.AddRange(dataTypes.GetVarInt(type));
|
||||
|
||||
// Is player Sneaking (Only 1.16 and above)
|
||||
// Currently hardcoded to false
|
||||
// TODO: Update to reflect the real player state
|
||||
if (protocolversion >= MC116Version)
|
||||
fields.AddRange(dataTypes.GetVarBool(false));
|
||||
// Is player Sneaking (Only 1.16 and above)
|
||||
// Currently hardcoded to false
|
||||
// TODO: Update to reflect the real player state
|
||||
if (protocolversion >= MC116Version)
|
||||
fields.AddRange(dataTypes.GetBool(false));
|
||||
|
||||
SendPacket(PacketOutgoingType.InteractEntity, fields);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
case 0x29: return PacketIncomingType.EntityPositionAndRotation;
|
||||
case 0x58: return PacketIncomingType.EntityProperties;
|
||||
case 0x56: return PacketIncomingType.EntityTeleport;
|
||||
case 0x46: return PacketIncomingType.EntityVelocity; // This is maybe entity moving, not sure
|
||||
case 0x46: return PacketIncomingType.EntityVelocity;
|
||||
case 0x47: return PacketIncomingType.EntityEquipment;
|
||||
case 0x59: return PacketIncomingType.EntityEffect;
|
||||
case 0x4E: return PacketIncomingType.TimeUpdate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue