From 3a3143065d6247b142d0f0ba7262ee0a9320976c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 29 Dec 2021 16:29:55 +0000 Subject: [PATCH] Remove/add some more comments --- .../adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java | 1 + .../adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks.java | 4 +--- .../adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks_Copy.java | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java index fd8808909..34c636fc7 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightGetBlocks.java @@ -761,6 +761,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc throw e; } }; + //noinspection unchecked - required at compile time return (T) (Future) queueHandler.sync(chain); } else { if (callback == null) { diff --git a/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks.java b/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks.java index 00cda1dc7..85ffe7710 100644 --- a/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks.java +++ b/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks.java @@ -673,7 +673,6 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc } syncTasks[1] = () -> { - //TODO 1.18 be a CBT & ListBinaryTag ? for (final CompoundTag nativeTag : entities) { final Map entityTagMap = nativeTag.getValue(); final StringTag idTag = (StringTag) entityTagMap.get("Id"); @@ -769,7 +768,6 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc Runnable[] finalSyncTasks = syncTasks; // Chain the sync tasks and the callback - //TODO 1.18 address raw access Callable chain = () -> { try { // Run the sync tasks @@ -791,6 +789,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc throw e; } }; + //noinspection unchecked - required at compile time return (T) (Future) queueHandler.sync(chain); } else { if (callback == null) { @@ -1089,7 +1088,6 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc final PalettedContainer blocksExisting = existing.getStates(); final Object dataObject = PaperweightPlatformAdapter.fieldData.get(blocksExisting); - //TODO this field doesn't exist in 1.18 final Palette palette = (Palette) PaperweightPlatformAdapter.fieldPalette.get( dataObject); int paletteSize; diff --git a/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks_Copy.java b/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks_Copy.java index d07b8b9b1..fd0dadb03 100644 --- a/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks_Copy.java +++ b/worldedit-bukkit/adapters/adapter-1_18/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R1/PaperweightGetBlocks_Copy.java @@ -68,7 +68,6 @@ public class PaperweightGetBlocks_Copy implements IChunkGet { } protected void storeEntity(Entity entity) { - //TODO 1.18 address raw access & possibly be a CBT ? BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter(); net.minecraft.nbt.CompoundTag compoundTag = new net.minecraft.nbt.CompoundTag(); entities.add((CompoundTag) adapter.toNative(entity.save(compoundTag)));