From da99bb16d55ceaf2f923df069e953e285d4d80f7 Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Thu, 9 Apr 2020 13:37:27 -0400 Subject: [PATCH] Cat work --- .../connector/entity/living/animal/tameable/CatEntity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/connector/src/main/java/org/geysermc/connector/entity/living/animal/tameable/CatEntity.java b/connector/src/main/java/org/geysermc/connector/entity/living/animal/tameable/CatEntity.java index 5a8a1dcf2..964b82cf4 100644 --- a/connector/src/main/java/org/geysermc/connector/entity/living/animal/tameable/CatEntity.java +++ b/connector/src/main/java/org/geysermc/connector/entity/living/animal/tameable/CatEntity.java @@ -28,6 +28,7 @@ package org.geysermc.connector.entity.living.animal.tameable; import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata; import com.nukkitx.math.vector.Vector3f; import com.nukkitx.protocol.bedrock.data.EntityData; +import com.nukkitx.protocol.bedrock.data.EntityFlag; import org.geysermc.connector.entity.type.EntityType; import org.geysermc.connector.network.session.GeyserSession; @@ -44,8 +45,11 @@ public class CatEntity extends TameableEntity { } if (entityMetadata.getId() == 21) { // FIXME: Colors the whole animal instead of just collar + System.out.println("Color: " + (int) entityMetadata.getValue()); + metadata.getFlags().setFlag(EntityFlag.TAMED, true); metadata.put(EntityData.COLOR, (byte) (int) entityMetadata.getValue()); } + System.out.println("ID: " + entityMetadata.getId() + " Value: " + entityMetadata.getValue()); super.updateBedrockMetadata(entityMetadata, session); } }