3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00
Dieser Commit ist enthalten in:
DoctorMacc 2020-04-09 13:37:27 -04:00
Ursprung e1d1f9ee8a
Commit da99bb16d5

Datei anzeigen

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