This commit is contained in:
DoctorMacc 2020-04-09 13:37:27 -04:00
parent e1d1f9ee8a
commit da99bb16d5

View file

@ -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);
}
}