Remove/add some more comments

Dieser Commit ist enthalten in:
dordsor21 2021-12-29 16:29:55 +00:00
Ursprung ca5640e89e
Commit 3a3143065d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
3 geänderte Dateien mit 2 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -761,6 +761,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
throw e; throw e;
} }
}; };
//noinspection unchecked - required at compile time
return (T) (Future) queueHandler.sync(chain); return (T) (Future) queueHandler.sync(chain);
} else { } else {
if (callback == null) { if (callback == null) {

Datei anzeigen

@ -673,7 +673,6 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
} }
syncTasks[1] = () -> { syncTasks[1] = () -> {
//TODO 1.18 be a CBT & ListBinaryTag ?
for (final CompoundTag nativeTag : entities) { for (final CompoundTag nativeTag : entities) {
final Map<String, Tag> entityTagMap = nativeTag.getValue(); final Map<String, Tag> entityTagMap = nativeTag.getValue();
final StringTag idTag = (StringTag) entityTagMap.get("Id"); final StringTag idTag = (StringTag) entityTagMap.get("Id");
@ -769,7 +768,6 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
Runnable[] finalSyncTasks = syncTasks; Runnable[] finalSyncTasks = syncTasks;
// Chain the sync tasks and the callback // Chain the sync tasks and the callback
//TODO 1.18 address raw access
Callable<Future> chain = () -> { Callable<Future> chain = () -> {
try { try {
// Run the sync tasks // Run the sync tasks
@ -791,6 +789,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
throw e; throw e;
} }
}; };
//noinspection unchecked - required at compile time
return (T) (Future) queueHandler.sync(chain); return (T) (Future) queueHandler.sync(chain);
} else { } else {
if (callback == null) { if (callback == null) {
@ -1089,7 +1088,6 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
final PalettedContainer<net.minecraft.world.level.block.state.BlockState> blocksExisting = existing.getStates(); final PalettedContainer<net.minecraft.world.level.block.state.BlockState> blocksExisting = existing.getStates();
final Object dataObject = PaperweightPlatformAdapter.fieldData.get(blocksExisting); final Object dataObject = PaperweightPlatformAdapter.fieldData.get(blocksExisting);
//TODO this field doesn't exist in 1.18
final Palette<BlockState> palette = (Palette<BlockState>) PaperweightPlatformAdapter.fieldPalette.get( final Palette<BlockState> palette = (Palette<BlockState>) PaperweightPlatformAdapter.fieldPalette.get(
dataObject); dataObject);
int paletteSize; int paletteSize;

Datei anzeigen

@ -68,7 +68,6 @@ public class PaperweightGetBlocks_Copy implements IChunkGet {
} }
protected void storeEntity(Entity entity) { protected void storeEntity(Entity entity) {
//TODO 1.18 address raw access & possibly be a CBT ?
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter(); BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
net.minecraft.nbt.CompoundTag compoundTag = new net.minecraft.nbt.CompoundTag(); net.minecraft.nbt.CompoundTag compoundTag = new net.minecraft.nbt.CompoundTag();
entities.add((CompoundTag) adapter.toNative(entity.save(compoundTag))); entities.add((CompoundTag) adapter.toNative(entity.save(compoundTag)));