forked from GeyserMC/Geyser
Cat work
This commit is contained in:
parent
e1d1f9ee8a
commit
da99bb16d5
1 changed files with 4 additions and 0 deletions
|
@ -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.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
|
||||||
import com.nukkitx.math.vector.Vector3f;
|
import com.nukkitx.math.vector.Vector3f;
|
||||||
import com.nukkitx.protocol.bedrock.data.EntityData;
|
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.entity.type.EntityType;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
|
|
||||||
|
@ -44,8 +45,11 @@ public class CatEntity extends TameableEntity {
|
||||||
}
|
}
|
||||||
if (entityMetadata.getId() == 21) {
|
if (entityMetadata.getId() == 21) {
|
||||||
// FIXME: Colors the whole animal instead of just collar
|
// 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());
|
metadata.put(EntityData.COLOR, (byte) (int) entityMetadata.getValue());
|
||||||
}
|
}
|
||||||
|
System.out.println("ID: " + entityMetadata.getId() + " Value: " + entityMetadata.getValue());
|
||||||
super.updateBedrockMetadata(entityMetadata, session);
|
super.updateBedrockMetadata(entityMetadata, session);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue