diff --git a/src/main/java/com/minecolonies/core/colony/buildings/workerbuildings/BuildingBeekeeper.java b/src/main/java/com/minecolonies/core/colony/buildings/workerbuildings/BuildingBeekeeper.java index f563eeb8c4e..ec5b8bbae41 100644 --- a/src/main/java/com/minecolonies/core/colony/buildings/workerbuildings/BuildingBeekeeper.java +++ b/src/main/java/com/minecolonies/core/colony/buildings/workerbuildings/BuildingBeekeeper.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; import net.minecraft.nbt.NbtUtils; import net.minecraft.nbt.Tag; import net.minecraft.network.RegistryFriendlyByteBuf; @@ -106,16 +107,23 @@ public int getMaxBuildingLevel() public void deserializeNBT(@NotNull final HolderLookup.Provider provider, final CompoundTag compound) { super.deserializeNBT(provider, compound); - NBTUtils.streamCompound(compound.getList(NbtTagConstants.TAG_HIVES, Tag.TAG_COMPOUND)) - .map(NBTUtils::readBlockPos) - .forEach(this.hives::add); + final ListTag hiveTag = compound.getList(NbtTagConstants.TAG_HIVES, Tag.TAG_INT_ARRAY); + for (Tag tag : hiveTag) + { + hives.add(NBTUtils.readBlockPos(tag)); + } } @Override public CompoundTag serializeNBT(@NotNull final HolderLookup.Provider provider) { final CompoundTag nbt = super.serializeNBT(provider); - nbt.put(NbtTagConstants.TAG_HIVES, this.hives.stream().map(NBTUtils::writeBlockPos).collect(NBTUtils.toListNBT())); + @NotNull final ListTag hivesTag = new ListTag(); + for (@NotNull final BlockPos entry : hives) + { + hivesTag.add(NBTUtils.writeBlockPos(entry)); + } + nbt.put(NbtTagConstants.TAG_HIVES, hivesTag); return nbt; } diff --git a/src/main/java/com/minecolonies/core/network/messages/PermissionsMessage.java b/src/main/java/com/minecolonies/core/network/messages/PermissionsMessage.java index 1c725ea1636..329c85d85cd 100755 --- a/src/main/java/com/minecolonies/core/network/messages/PermissionsMessage.java +++ b/src/main/java/com/minecolonies/core/network/messages/PermissionsMessage.java @@ -337,10 +337,6 @@ protected ChangePlayerRank(final RegistryFriendlyByteBuf buf, final PlayMessageT protected void onExecute(final IPayloadContext ctxIn, final ServerPlayer player, final IColony colony) { final Rank rank = colony.getPermissions().getRanks().get(rankId); - if (rank != colony.getPermissions().getRankOwner()) - { - return; - } if (colony.getPermissions().hasPermission(player, Action.EDIT_PERMISSIONS) && rank != colony.getPermissions().getRankOwner()) { colony.getPermissions().setPlayerRank(playerID, rank, colony.getWorld());