Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 08:30:12 +01:00
Cat work
Dieser Commit ist enthalten in:
Ursprung
e1d1f9ee8a
Commit
da99bb16d5
@ -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);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren