mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
Compare commits
No commits in common. "81500918886a4c6a88cff3d5d09390a7b81926f0" and "d5f5ae0dc4c612388273abf84079f43ead6cbac4" have entirely different histories.
8150091888
...
d5f5ae0dc4
2 changed files with 9 additions and 2 deletions
|
@ -86,7 +86,7 @@ public class DataComponentType<T> {
|
|||
public static final DataComponentType<List<ItemStack>> CONTAINER = new DataComponentType<>(listReader(ItemCodecHelper::readOptionalItemStack), listWriter(MinecraftCodecHelper::writeOptionalItemStack), ObjectDataComponent::new);
|
||||
public static final DataComponentType<BlockStateProperties> BLOCK_STATE = new DataComponentType<>(ItemCodecHelper::readBlockStateProperties, ItemCodecHelper::writeBlockStateProperties, ObjectDataComponent::new);
|
||||
public static final DataComponentType<List<BeehiveOccupant>> BEES = new DataComponentType<>(listReader(ItemCodecHelper::readBeehiveOccupant), listWriter(ItemCodecHelper::writeBeehiveOccupant), ObjectDataComponent::new);
|
||||
public static final DataComponentType<NbtMap> LOCK = new DataComponentType<>(ItemCodecHelper::readCompoundTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
|
||||
public static final DataComponentType<String> LOCK = new DataComponentType<>(ItemCodecHelper::readLock, ItemCodecHelper::writeLock, ObjectDataComponent::new);
|
||||
public static final DataComponentType<NbtMap> CONTAINER_LOOT = new DataComponentType<>(ItemCodecHelper::readCompoundTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new);
|
||||
|
||||
protected final int id;
|
||||
|
|
|
@ -158,7 +158,6 @@ public class ItemCodecHelper extends MinecraftCodecHelper {
|
|||
}
|
||||
|
||||
this.writeNullable(buf, equippable.model(), this::writeResourceLocation);
|
||||
this.writeNullable(buf, equippable.cameraOverlay(), this::writeResourceLocation);
|
||||
this.writeNullable(buf, equippable.allowedEntities(), this::writeHolderSet);
|
||||
buf.writeBoolean(equippable.dispensable());
|
||||
buf.writeBoolean(equippable.swappable());
|
||||
|
@ -638,4 +637,12 @@ public class ItemCodecHelper extends MinecraftCodecHelper {
|
|||
this.writeVarInt(buf, occupant.getTicksInHive());
|
||||
this.writeVarInt(buf, occupant.getMinTicksInHive());
|
||||
}
|
||||
|
||||
public String readLock(ByteBuf buf) {
|
||||
return this.readAnyTag(buf, NbtType.STRING);
|
||||
}
|
||||
|
||||
public void writeLock(ByteBuf buf, String key) {
|
||||
this.writeAnyTag(buf, key);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue