From 5cf96ec5be12f4ba4a0a7d806f674a483471c8c9 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Sun, 13 Oct 2019 15:28:03 -0500 Subject: [PATCH] Update to latest MCProtocolLib version --- connector/pom.xml | 2 +- .../connector/network/session/cache/ChunkCache.java | 4 ++-- .../connector/network/translators/item/ItemTranslator.java | 4 ++-- .../network/translators/java/JavaBossBarTranslator.java | 6 +++--- .../network/translators/java/JavaTitleTranslator.java | 4 ++-- .../java/entity/JavaEntityPositionRotationTranslator.java | 2 +- .../java/entity/JavaEntityPositionTranslator.java | 2 +- .../java/entity/JavaEntityRotationTranslator.java | 4 +++- .../entity/player/JavaPlayerSetExperienceTranslator.java | 2 +- .../java/entity/spawn/JavaSpawnPlayerTranslator.java | 4 ++-- .../java/scoreboard/JavaDisplayScoreboardTranslator.java | 2 +- .../main/java/org/geysermc/connector/utils/ChunkUtils.java | 4 +--- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/connector/pom.xml b/connector/pom.xml index 25d52a00..7f46a9b2 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -105,7 +105,7 @@ com.github.steveice10 mcprotocollib - 1.14.4-SNAPSHOT + 1.14.4-2-SNAPSHOT compile diff --git a/connector/src/main/java/org/geysermc/connector/network/session/cache/ChunkCache.java b/connector/src/main/java/org/geysermc/connector/network/session/cache/ChunkCache.java index cc5590c7..44de2b00 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/cache/ChunkCache.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/cache/ChunkCache.java @@ -65,7 +65,7 @@ public class ChunkCache { Chunk chunk = column.getChunks()[position.getY() >> 4]; Position blockPosition = chunkPosition.getChunkBlock(position.getX(), position.getY(), position.getZ()); if (chunk != null) { - chunk.getBlocks().set(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), block); + chunk.set(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), block); } } @@ -78,7 +78,7 @@ public class ChunkCache { Chunk chunk = column.getChunks()[position.getY() >> 4]; Position blockPosition = chunkPosition.getChunkBlock(position.getX(), position.getY(), position.getZ()); if (chunk != null) { - BlockState blockState = chunk.getBlocks().get(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ()); + BlockState blockState = chunk.get(blockPosition.getX(), blockPosition.getY(), blockPosition.getZ()); return TranslatorsInit.getBlockTranslator().getBedrockBlock(blockState); } diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java index 437a8dc4..d66490f6 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/item/ItemTranslator.java @@ -68,10 +68,10 @@ public class ItemTranslator { } ItemEntry bedrockItem = getItem(stack); - if (stack.getNBT() == null) { + if (stack.getNbt() == null) { return ItemData.of(bedrockItem.getBedrockId(), (short) bedrockItem.getBedrockData(), stack.getAmount()); } - return ItemData.of(bedrockItem.getBedrockId(), (short) bedrockItem.getBedrockData(), stack.getAmount(), translateToBedrockNBT(stack.getNBT())); + return ItemData.of(bedrockItem.getBedrockId(), (short) bedrockItem.getBedrockData(), stack.getAmount(), translateToBedrockNBT(stack.getNbt())); } public ItemEntry getItem(ItemStack stack) { diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaBossBarTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaBossBarTranslator.java index 3073e469..0d0e0050 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaBossBarTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaBossBarTranslator.java @@ -14,11 +14,11 @@ public class JavaBossBarTranslator extends PacketTranslator @Override public void translate(ServerBossBarPacket packet, GeyserSession session) { BossEventPacket bossEventPacket = new BossEventPacket(); - bossEventPacket.setBossUniqueEntityId(session.getEntityCache().getBossBar(packet.getUUID())); + bossEventPacket.setBossUniqueEntityId(session.getEntityCache().getBossBar(packet.getUuid())); switch (packet.getAction()) { case ADD: - long entityId = session.getEntityCache().addBossBar(packet.getUUID()); + long entityId = session.getEntityCache().addBossBar(packet.getUuid()); addBossEntity(session, entityId); bossEventPacket.setType(BossEventPacket.Type.SHOW); @@ -39,7 +39,7 @@ public class JavaBossBarTranslator extends PacketTranslator break; case REMOVE: bossEventPacket.setType(BossEventPacket.Type.HIDE); - removeBossEntity(session, session.getEntityCache().removeBossBar(packet.getUUID())); + removeBossEntity(session, session.getEntityCache().removeBossBar(packet.getUuid())); break; case UPDATE_STYLE: case UPDATE_FLAGS: diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaTitleTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaTitleTranslator.java index e3d9bbea..a7852ee9 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaTitleTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/JavaTitleTranslator.java @@ -43,7 +43,7 @@ public class JavaTitleTranslator extends PacketTranslator { break; case SUBTITLE: titlePacket.setType(SetTitlePacket.Type.SET_SUBTITLE); - titlePacket.setText(packet.getSubtitle().getFullText()); + titlePacket.setText(packet.getTitle().getFullText()); break; case CLEAR: case RESET: @@ -52,7 +52,7 @@ public class JavaTitleTranslator extends PacketTranslator { break; case ACTION_BAR: titlePacket.setType(SetTitlePacket.Type.SET_ACTIONBAR_MESSAGE); - titlePacket.setText(packet.getActionBar().getFullText()); + titlePacket.setText(packet.getTitle().getFullText()); break; case TIMES: titlePacket.setFadeInTime(packet.getFadeIn()); diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityPositionRotationTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityPositionRotationTranslator.java index 1c93c903..8ad46493 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityPositionRotationTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityPositionRotationTranslator.java @@ -41,7 +41,7 @@ public class JavaEntityPositionRotationTranslator extends PacketTranslator