From 000fff210a90b87bfb854ba5d14df96137ebe92e Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Mon, 3 Dec 2018 09:21:07 +0100 Subject: [PATCH] fix BlockConnectionStorage not being initialized --- .../protocol1_13to1_12_2/Protocol1_13To1_12_2.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java index 0625448c2..2f8702825 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java @@ -18,12 +18,15 @@ import us.myles.ViaVersion.api.remapper.ValueTransformer; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.blockconnections.ConnectionData; +import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.blockconnections.providers.BlockConnectionProvider; +import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.blockconnections.providers.PacketBlockConnectionProvider; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.data.MappingData; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.packets.EntityPackets; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.packets.InventoryPackets; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.packets.WorldPackets; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.BlockEntityProvider; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.PaintingProvider; +import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.BlockConnectionStorage; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.BlockStorage; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.EntityTracker; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.TabCompleteTracker; @@ -1043,6 +1046,11 @@ public class Protocol1_13To1_12_2 extends Protocol { if (!userConnection.has(ClientWorld.class)) userConnection.put(new ClientWorld(userConnection)); userConnection.put(new BlockStorage(userConnection)); + if (Via.getConfig().isServersideBlockConnections()) { + if (Via.getManager().getProviders().get(BlockConnectionProvider.class) instanceof PacketBlockConnectionProvider) { + userConnection.put(new BlockConnectionStorage(userConnection)); + } + } } @Override