Skip to content

Commit caa8835

Browse files
committed
Update BeehiveOccupant item component
1 parent 0d573bb commit caa8835

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BeehiveOccupant.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import lombok.AllArgsConstructor;
44
import lombok.Builder;
55
import lombok.Data;
6-
import org.cloudburstmc.nbt.NbtMap;
6+
import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType;
77

88
@Data
99
@AllArgsConstructor
1010
@Builder(toBuilder = true)
1111
public class BeehiveOccupant {
12-
private final NbtMap entityData;
12+
private final TypedEntityData<EntityType> entityData;
1313
private final int ticksInHive;
1414
private final int minTicksInHive;
1515
}

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemTypes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,11 @@ public static void writeBlockStateProperties(ByteBuf buf, BlockStateProperties p
732732
}
733733

734734
public static BeehiveOccupant readBeehiveOccupant(ByteBuf buf) {
735-
return new BeehiveOccupant(MinecraftTypes.readCompoundTag(buf), MinecraftTypes.readVarInt(buf), MinecraftTypes.readVarInt(buf));
735+
return new BeehiveOccupant(ItemTypes.readTypedEntityData(buf, ItemTypes::readEntityType), MinecraftTypes.readVarInt(buf), MinecraftTypes.readVarInt(buf));
736736
}
737737

738738
public static void writeBeehiveOccupant(ByteBuf buf, BeehiveOccupant occupant) {
739-
MinecraftTypes.writeAnyTag(buf, occupant.getEntityData());
739+
ItemTypes.writeTypedEntityData(buf, occupant.getEntityData(), ItemTypes::writeEntityType);
740740
MinecraftTypes.writeVarInt(buf, occupant.getTicksInHive());
741741
MinecraftTypes.writeVarInt(buf, occupant.getMinTicksInHive());
742742
}

0 commit comments

Comments
 (0)