mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Implement entity types (#1001)
Implement palette generation and investigate palette changes between versions. Turns out 1.13- has legacy IDs, 1.14 switches to entity palette and 1.15 refreshes the whole palette just to insert Bee. Also refactor entity handling code here and there.
This commit is contained in:
parent
5b0b0c9cc3
commit
bd85c46663
27 changed files with 1113 additions and 259 deletions
|
|
@ -112,7 +112,7 @@ namespace MinecraftClient.ChatBots
|
|||
/// <returns>If the entity should be attacked</returns>
|
||||
public bool handleEntity(Entity entity)
|
||||
{
|
||||
if (!entity.IsHostile())
|
||||
if (!entity.Type.IsHostile())
|
||||
return false;
|
||||
|
||||
bool isBeingAttacked = entitiesToAttack.ContainsKey(entity.ID);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
public override void OnEntitySpawn(Entity entity)
|
||||
{
|
||||
if (entity.TypeID == 102)
|
||||
if (entity.Type == EntityType.FishingBobber)
|
||||
{
|
||||
if (GetCurrentLocation().Distance(entity.Location) < 2 && !isFishing)
|
||||
{
|
||||
|
|
@ -60,7 +60,7 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
public override void OnEntityDespawn(Entity entity)
|
||||
{
|
||||
if(entity.TypeID == 102 && isFishing)
|
||||
if (entity.Type == EntityType.FishingBobber)
|
||||
{
|
||||
if(entity.ID == fishingRod.ID)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue