From ed7213d7c76b0b24a6f90cd52ee2bd45f1cc20ea Mon Sep 17 00:00:00 2001 From: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com> Date: Fri, 13 Sep 2019 10:39:38 +0100 Subject: [PATCH] Remove IntelliJ files @EOT3000 added... and more chunk changes. --- .gitignore | 3 +- .idea/encodings.xml | 15 ---- .idea/modules.xml | 12 ---- connector/connector.iml | 69 ------------------- .../java/world/JavaChunkDataTranslator.java | 2 +- .../geysermc/connector/utils/ChunkUtils.java | 56 ++------------- plugin/plugin.iml | 15 ---- 7 files changed, 10 insertions(+), 162 deletions(-) delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/modules.xml delete mode 100644 connector/connector.iml delete mode 100644 plugin/plugin.iml diff --git a/.gitignore b/.gitignore index c628e9af7..42797ab5f 100644 --- a/.gitignore +++ b/.gitignore @@ -222,4 +222,5 @@ nbdist/ # End of https://www.gitignore.io/api/git,java,maven,eclipse,netbeans,jetbrains+all ### Geyser ### -config.yml \ No newline at end of file +config.yml +logs/ \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 7d62d0bcf..000000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 60a7754d3..000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/connector/connector.iml b/connector/connector.iml deleted file mode 100644 index 3525f9e25..000000000 --- a/connector/connector.iml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaChunkDataTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaChunkDataTranslator.java index 1f552d124..15cfb26d4 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaChunkDataTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaChunkDataTranslator.java @@ -23,7 +23,7 @@ public class JavaChunkDataTranslator extends PacketTranslator> 4; - - Chunk chunk = null; - try { - chunk = column.getChunks()[chunkY]; - } catch (Exception ex) { - ex.printStackTrace(); - } - - if (chunk == null || chunk.isEmpty()) - continue; - - BlockStorage storage = chunk.getBlocks(); - for (int x = 0; x < 16; x++) { - for (int z = 0; z < 16; z++) { - BlockState block = storage.get(x, chunkY, z); - if (block == null) - block = new BlockState(0); - - BedrockItem bedrockBlock = TranslatorsInit.getItemTranslator().getBedrockBlock(block); - - ChunkSection section = chunkData.sections[chunkY]; - - //org.geysermc.connector.world.chunk.BlockStorage blockStorage = new org.geysermc.connector.world.chunk.BlockStorage(); - int runtimeId = GlobalBlockPalette.getOrCreateRuntimeId(bedrockBlock.getId(), bedrockBlock.getData()); - section.setFullBlock(x, y >> 4, z, 0, runtimeId << 2 | bedrockBlock.getData()); - - //section.getBlockStorageArray()[0] = blockStorage; - //section.getBlockStorageArray()[1] = blockStorage; - } - } - } - - */ - - for (int chunkY = 0; chunkY < 16; chunkY++) { - Chunk chunk = null; - try { - chunk = column.getChunks()[chunkY]; - } catch (Exception ex) { - ex.printStackTrace(); - } + for (int chunkY = 0; chunkY < chunkSectionCount; chunkY++) { + Chunk chunk = chunks[chunkY]; if (chunk == null || chunk.isEmpty()) continue; @@ -69,9 +30,6 @@ public class ChunkUtils { BlockStorage storage = chunk.getBlocks(); ChunkSection section = chunkData.sections[chunkY]; - section.getBlockStorageArray()[0] = new org.geysermc.connector.world.chunk.BlockStorage(); - section.getBlockStorageArray()[1] = new org.geysermc.connector.world.chunk.BlockStorage(BitArrayVersion.V1); - for (int x = 0; x < 16; x++) { for (int y = 0; y < 16; y++) { for (int z = 0; z < 16; z++) { diff --git a/plugin/plugin.iml b/plugin/plugin.iml deleted file mode 100644 index 4358747eb..000000000 --- a/plugin/plugin.iml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file