forked from GeyserMC/Geyser
Fix requested change; modify comments
This commit is contained in:
parent
20700998b1
commit
d4f23379ef
2 changed files with 5 additions and 5 deletions
|
@ -54,13 +54,13 @@ public class LlamaEntity extends ChestedHorseEntity {
|
||||||
// -1 means no armor
|
// -1 means no armor
|
||||||
if ((int) entityMetadata.getValue() != -1) {
|
if ((int) entityMetadata.getValue() != -1) {
|
||||||
// The damage value is the dye color that Java sends us
|
// The damage value is the dye color that Java sends us
|
||||||
// Always going to be a carpet so we can hardcode 171
|
// Always going to be a carpet so we can hardcode 171 in BlockTranslator
|
||||||
// The int then short conversion is required or we get a ClassCastException
|
// The int then short conversion is required or we get a ClassCastException
|
||||||
equipmentPacket.setChestplate(ItemData.of(BlockTranslator.LLAMA_ARMOR_ID, (short)((int) entityMetadata.getValue()), 1));
|
equipmentPacket.setChestplate(ItemData.of(BlockTranslator.CARPET, (short)((int) entityMetadata.getValue()), 1));
|
||||||
} else {
|
} else {
|
||||||
equipmentPacket.setChestplate(ItemData.AIR);
|
equipmentPacket.setChestplate(ItemData.AIR);
|
||||||
}
|
}
|
||||||
// Required to fill out the rest of the equipment or Bedrock ignores it
|
// Required to fill out the rest of the equipment or Bedrock ignores it, including above else statement if removing armor
|
||||||
equipmentPacket.setBoots(ItemData.AIR);
|
equipmentPacket.setBoots(ItemData.AIR);
|
||||||
equipmentPacket.setHelmet(ItemData.AIR);
|
equipmentPacket.setHelmet(ItemData.AIR);
|
||||||
equipmentPacket.setLeggings(ItemData.AIR);
|
equipmentPacket.setLeggings(ItemData.AIR);
|
||||||
|
|
|
@ -55,8 +55,8 @@ public class BlockTranslator {
|
||||||
private static final Int2ObjectMap<BlockState> BEDROCK_TO_JAVA_BLOCK_MAP = new Int2ObjectOpenHashMap<>();
|
private static final Int2ObjectMap<BlockState> BEDROCK_TO_JAVA_BLOCK_MAP = new Int2ObjectOpenHashMap<>();
|
||||||
private static final IntSet WATERLOGGED = new IntOpenHashSet();
|
private static final IntSet WATERLOGGED = new IntOpenHashSet();
|
||||||
|
|
||||||
// Carpet ID, used in LlamaEntity.java
|
// Bedrock carpet ID, used in LlamaEntity.java for decoration
|
||||||
public static final int LLAMA_ARMOR_ID = 171;
|
public static final int CARPET = 171;
|
||||||
|
|
||||||
private static final int BLOCK_STATE_VERSION = 17760256;
|
private static final int BLOCK_STATE_VERSION = 17760256;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue