From 94170c1ba88ae755a432c4d0a077fa7af32a2184 Mon Sep 17 00:00:00 2001 From: glisco Date: Wed, 16 Mar 2022 23:07:54 +0100 Subject: [PATCH] general cleanup, port to 1.18.2 --- .../mixin/HandledScreenMixin.java | 24 ++--- .../mixin/MinecraftClientMixin.java | 8 +- .../mixin/TextureManagerMixin.java | 6 +- .../{ => access}/BlockEntityAccessor.java | 2 +- .../BlockStateArgumentAccessor.java | 2 +- .../mixin/{ => access}/CameraInvoker.java | 2 +- .../DefaultPosArgumentAccessor.java | 2 +- .../EntitySummonArgumentTypeAccessor.java | 2 +- .../{ => access}/MinecraftClientAccessor.java | 2 +- .../{ => access}/NativeImageAccessor.java | 2 +- .../{ => access}/ParticleManagerAccessor.java | 2 +- .../{ => access}/SliderWidgetInvoker.java | 2 +- .../render/DefaultLightingProfiles.java | 9 +- .../render/IsometricRenderHelper.java | 8 +- .../render/IsometricRenderPresets.java | 15 ++- .../screen/AreaIsometricRenderScreen.java | 12 +-- .../screen/BatchIsometricRenderScreen.java | 7 +- .../screen/IsometricRenderScreen.java | 4 +- .../screen/ItemAtlasRenderScreen.java | 3 +- .../isometricrenders/screen/RenderScreen.java | 6 +- .../util/AreaSelectionHelper.java | 9 +- .../isometricrenders/util/CommandServer.java | 0 .../isometricrenders/util/ImageExporter.java | 17 ++- .../util/IsoRenderCommand.java | 101 +++++++++++------- .../isometricrenders/util/RuntimeConfig.java | 4 + .../isometricrenders/util/Translate.java | 41 +++++++ .../isometricrenders/util/Translator.java | 24 ----- .../assets/isometric-renders/lang/en_us.json | 6 +- .../resources/isometric-renders.mixins.json | 18 ++-- 29 files changed, 189 insertions(+), 151 deletions(-) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/BlockEntityAccessor.java (85%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/BlockStateArgumentAccessor.java (86%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/CameraInvoker.java (83%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/DefaultPosArgumentAccessor.java (89%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/EntitySummonArgumentTypeAccessor.java (89%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/MinecraftClientAccessor.java (86%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/NativeImageAccessor.java (83%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/ParticleManagerAccessor.java (90%) rename src/main/java/com/glisco/isometricrenders/mixin/{ => access}/SliderWidgetInvoker.java (84%) delete mode 100644 src/main/java/com/glisco/isometricrenders/util/CommandServer.java create mode 100644 src/main/java/com/glisco/isometricrenders/util/Translate.java delete mode 100644 src/main/java/com/glisco/isometricrenders/util/Translator.java diff --git a/src/main/java/com/glisco/isometricrenders/mixin/HandledScreenMixin.java b/src/main/java/com/glisco/isometricrenders/mixin/HandledScreenMixin.java index fe909e6..ead60c2 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/HandledScreenMixin.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/HandledScreenMixin.java @@ -29,19 +29,19 @@ protected HandledScreenMixin(Text title) { super(title); } - @Inject(method = "keyPressed", at = @At("HEAD"), cancellable = true) + @Inject(method = "keyPressed", at = @At("HEAD")) public void renderInventory(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable cir) { - if (keyCode == GLFW.GLFW_KEY_F12) { - if (Screen.hasControlDown()) { - client.setScreen(new BatchIsometricBlockRenderScreen(IsometricRenderHelper.extractBlocks(handler.slots.stream().map(Slot::getStack).collect(Collectors.toList())), "inventory")); - cir.cancel(); - } else if (Screen.hasAltDown()) { - client.setScreen(new BatchIsometricItemRenderScreen(handler.slots.stream().map(Slot::getStack).iterator(), "inventory")); - cir.cancel(); - } else if (Screen.hasShiftDown()) { - IsometricRenderHelper.renderItemAtlas("inventory", handler.slots.stream().map(Slot::getStack).filter(itemStack -> !itemStack.isEmpty()).collect(Collectors.toList()), true); - cir.cancel(); - } + if (keyCode != GLFW.GLFW_KEY_F12) return; + + if (Screen.hasControlDown()) { + client.setScreen(new BatchIsometricBlockRenderScreen(IsometricRenderHelper.extractBlocks(handler.slots.stream().map(Slot::getStack).collect(Collectors.toList())), "inventory")); + cir.cancel(); + } else if (Screen.hasAltDown()) { + client.setScreen(new BatchIsometricItemRenderScreen(handler.slots.stream().map(Slot::getStack).iterator(), "inventory")); + cir.cancel(); + } else if (Screen.hasShiftDown()) { + IsometricRenderHelper.renderItemAtlas("inventory", handler.slots.stream().map(Slot::getStack).filter(itemStack -> !itemStack.isEmpty()).collect(Collectors.toList()), true); + cir.cancel(); } } diff --git a/src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientMixin.java b/src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientMixin.java index 54f3b66..2dca272 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientMixin.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientMixin.java @@ -13,10 +13,10 @@ public class MinecraftClientMixin { @Inject(method = "setScreen", at = @At("HEAD"), cancellable = true) public void openScheduled(Screen screen, CallbackInfo ci) { - if (screen == null && IsometricRenderHelper.isScreenScheduled()) { - IsometricRenderHelper.openScheduledScreen(); - ci.cancel(); - } + if (screen != null || !IsometricRenderHelper.isScreenScheduled()) return; + + IsometricRenderHelper.openScheduledScreen(); + ci.cancel(); } } diff --git a/src/main/java/com/glisco/isometricrenders/mixin/TextureManagerMixin.java b/src/main/java/com/glisco/isometricrenders/mixin/TextureManagerMixin.java index f9b4a4c..2a66d9b 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/TextureManagerMixin.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/TextureManagerMixin.java @@ -13,9 +13,9 @@ public class TextureManagerMixin { @Inject(method = "tick", at = @At("HEAD"), cancellable = true) public void stopTick(CallbackInfo ci) { - if (MinecraftClient.getInstance().currentScreen instanceof RenderScreen && !((RenderScreen) MinecraftClient.getInstance().currentScreen).playAnimations) { - ci.cancel(); - } + if (!(MinecraftClient.getInstance().currentScreen instanceof RenderScreen) || ((RenderScreen) MinecraftClient.getInstance().currentScreen).playAnimations) + return; + ci.cancel(); } } diff --git a/src/main/java/com/glisco/isometricrenders/mixin/BlockEntityAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/BlockEntityAccessor.java similarity index 85% rename from src/main/java/com/glisco/isometricrenders/mixin/BlockEntityAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/BlockEntityAccessor.java index 5fcc9c1..371d40a 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/BlockEntityAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/BlockEntityAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/BlockStateArgumentAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/BlockStateArgumentAccessor.java similarity index 86% rename from src/main/java/com/glisco/isometricrenders/mixin/BlockStateArgumentAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/BlockStateArgumentAccessor.java index 5cf3e47..c3247bb 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/BlockStateArgumentAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/BlockStateArgumentAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.command.argument.BlockStateArgument; import net.minecraft.nbt.NbtCompound; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/CameraInvoker.java b/src/main/java/com/glisco/isometricrenders/mixin/access/CameraInvoker.java similarity index 83% rename from src/main/java/com/glisco/isometricrenders/mixin/CameraInvoker.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/CameraInvoker.java index 5632a72..44a1c39 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/CameraInvoker.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/CameraInvoker.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.client.render.Camera; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/DefaultPosArgumentAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/DefaultPosArgumentAccessor.java similarity index 89% rename from src/main/java/com/glisco/isometricrenders/mixin/DefaultPosArgumentAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/DefaultPosArgumentAccessor.java index 43643fd..4de7b53 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/DefaultPosArgumentAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/DefaultPosArgumentAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.command.argument.CoordinateArgument; import net.minecraft.command.argument.DefaultPosArgument; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/EntitySummonArgumentTypeAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/EntitySummonArgumentTypeAccessor.java similarity index 89% rename from src/main/java/com/glisco/isometricrenders/mixin/EntitySummonArgumentTypeAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/EntitySummonArgumentTypeAccessor.java index 4c749fb..7633ac2 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/EntitySummonArgumentTypeAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/EntitySummonArgumentTypeAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.command.argument.EntitySummonArgumentType; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/MinecraftClientAccessor.java similarity index 86% rename from src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/MinecraftClientAccessor.java index ad8b946..133aa90 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/MinecraftClientAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/MinecraftClientAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.RenderTickCounter; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/NativeImageAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/NativeImageAccessor.java similarity index 83% rename from src/main/java/com/glisco/isometricrenders/mixin/NativeImageAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/NativeImageAccessor.java index 82b51fc..fff608e 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/NativeImageAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/NativeImageAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.client.texture.NativeImage; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/ParticleManagerAccessor.java b/src/main/java/com/glisco/isometricrenders/mixin/access/ParticleManagerAccessor.java similarity index 90% rename from src/main/java/com/glisco/isometricrenders/mixin/ParticleManagerAccessor.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/ParticleManagerAccessor.java index 37e7dbe..f19206e 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/ParticleManagerAccessor.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/ParticleManagerAccessor.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.client.particle.Particle; import net.minecraft.client.particle.ParticleManager; diff --git a/src/main/java/com/glisco/isometricrenders/mixin/SliderWidgetInvoker.java b/src/main/java/com/glisco/isometricrenders/mixin/access/SliderWidgetInvoker.java similarity index 84% rename from src/main/java/com/glisco/isometricrenders/mixin/SliderWidgetInvoker.java rename to src/main/java/com/glisco/isometricrenders/mixin/access/SliderWidgetInvoker.java index 5bb513d..1c10217 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/SliderWidgetInvoker.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/access/SliderWidgetInvoker.java @@ -1,4 +1,4 @@ -package com.glisco.isometricrenders.mixin; +package com.glisco.isometricrenders.mixin.access; import net.minecraft.client.gui.widget.SliderWidget; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/com/glisco/isometricrenders/render/DefaultLightingProfiles.java b/src/main/java/com/glisco/isometricrenders/render/DefaultLightingProfiles.java index 0c1b8db..5da6b4a 100644 --- a/src/main/java/com/glisco/isometricrenders/render/DefaultLightingProfiles.java +++ b/src/main/java/com/glisco/isometricrenders/render/DefaultLightingProfiles.java @@ -1,12 +1,11 @@ package com.glisco.isometricrenders.render; +import com.glisco.isometricrenders.util.Translate; import net.minecraft.client.render.DiffuseLighting; import net.minecraft.text.Text; import net.minecraft.util.math.Matrix4f; import net.minecraft.util.math.Vec3f; -import static com.glisco.isometricrenders.util.Translator.tr; - public class DefaultLightingProfiles { public static final LightingProfile FLAT = new FlatLightingProfile(); @@ -21,7 +20,7 @@ public void setup() { @Override public Text getFriendlyName() { - return tr("gui.isometric-renders.lighting_profile.flat"); + return Translate.gui("lighting_profile.flat"); } } @@ -41,7 +40,7 @@ public void setup() { @Override public Text getFriendlyName() { - return tr("gui.isometric-renders.lighting_profile.default"); + return Translate.gui("lighting_profile.default"); } @Override @@ -70,7 +69,7 @@ public void setup() { @Override public Text getFriendlyName() { - return tr("gui.isometric-renders.lighting_profile.custom"); + return Translate.gui("lighting_profile.custom"); } public Vec3f getVector() { diff --git a/src/main/java/com/glisco/isometricrenders/render/IsometricRenderHelper.java b/src/main/java/com/glisco/isometricrenders/render/IsometricRenderHelper.java index 0674187..eed6f6a 100644 --- a/src/main/java/com/glisco/isometricrenders/render/IsometricRenderHelper.java +++ b/src/main/java/com/glisco/isometricrenders/render/IsometricRenderHelper.java @@ -1,9 +1,9 @@ package com.glisco.isometricrenders.render; -import com.glisco.isometricrenders.mixin.BlockEntityAccessor; -import com.glisco.isometricrenders.mixin.CameraInvoker; -import com.glisco.isometricrenders.mixin.DefaultPosArgumentAccessor; -import com.glisco.isometricrenders.mixin.NativeImageAccessor; +import com.glisco.isometricrenders.mixin.access.BlockEntityAccessor; +import com.glisco.isometricrenders.mixin.access.CameraInvoker; +import com.glisco.isometricrenders.mixin.access.DefaultPosArgumentAccessor; +import com.glisco.isometricrenders.mixin.access.NativeImageAccessor; import com.glisco.isometricrenders.screen.BatchIsometricBlockRenderScreen; import com.glisco.isometricrenders.screen.BatchIsometricItemRenderScreen; import com.glisco.isometricrenders.screen.ItemAtlasRenderScreen; diff --git a/src/main/java/com/glisco/isometricrenders/render/IsometricRenderPresets.java b/src/main/java/com/glisco/isometricrenders/render/IsometricRenderPresets.java index 42bf273..3be7fae 100644 --- a/src/main/java/com/glisco/isometricrenders/render/IsometricRenderPresets.java +++ b/src/main/java/com/glisco/isometricrenders/render/IsometricRenderPresets.java @@ -2,6 +2,7 @@ import com.glisco.isometricrenders.screen.AreaIsometricRenderScreen; import com.glisco.isometricrenders.screen.IsometricRenderScreen; +import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; @@ -62,14 +63,18 @@ public static void setupAreaRender(IsometricRenderScreen screen, BlockPos origin public static void setupBlockEntityRender(IsometricRenderScreen screen, @NotNull BlockEntity entity) { final MinecraftClient client = MinecraftClient.getInstance(); - final Identifier blockId = Registry.BLOCK.getId(entity.getCachedState().getBlock()); + final var state = entity.getCachedState(); + final var block = state.getBlock(); + final Identifier blockId = Registry.BLOCK.getId(block); screen.setup((matrices, vertexConsumerProvider, tickDelta) -> { matrices.push(); matrices.translate(-0.5, -0.5, -0.5); - client.getBlockRenderManager().renderBlockAsEntity(entity.getCachedState(), matrices, vertexConsumerProvider, 15728880, OverlayTexture.DEFAULT_UV); + if (block.getRenderType(state) != BlockRenderType.ENTITYBLOCK_ANIMATED) { + client.getBlockRenderManager().renderBlockAsEntity(state, matrices, vertexConsumerProvider, 15728880, OverlayTexture.DEFAULT_UV); + } if (client.getBlockEntityRenderDispatcher().get(entity) != null) { client.getBlockEntityRenderDispatcher().get(entity).render(entity, tickDelta, matrices, vertexConsumerProvider, 15728880, OverlayTexture.DEFAULT_UV); @@ -90,12 +95,12 @@ public static void setupBlockEntityRender(IsometricRenderScreen screen, @NotNull screen.setTickCallback(() -> { - if (entity.getCachedState().getBlockEntityTicker(client.world, entity.getType()) != null) { - entity.getCachedState().getBlockEntityTicker(client.world, (BlockEntityType) entity.getType()).tick(client.world, client.player.getBlockPos(), entity.getCachedState(), entity); + if (state.getBlockEntityTicker(client.world, entity.getType()) != null) { + state.getBlockEntityTicker(client.world, (BlockEntityType) entity.getType()).tick(client.world, client.player.getBlockPos(), state, entity); } if (client.world.random.nextDouble() < 0.150) { - entity.getCachedState().getBlock().randomDisplayTick(entity.getCachedState(), client.world, client.player.getBlockPos(), client.world.random); + block.randomDisplayTick(state, client.world, client.player.getBlockPos(), client.world.random); } }); diff --git a/src/main/java/com/glisco/isometricrenders/screen/AreaIsometricRenderScreen.java b/src/main/java/com/glisco/isometricrenders/screen/AreaIsometricRenderScreen.java index 786cd92..19d623a 100644 --- a/src/main/java/com/glisco/isometricrenders/screen/AreaIsometricRenderScreen.java +++ b/src/main/java/com/glisco/isometricrenders/screen/AreaIsometricRenderScreen.java @@ -1,6 +1,7 @@ package com.glisco.isometricrenders.screen; import com.glisco.isometricrenders.render.IsometricRenderHelper; +import com.glisco.isometricrenders.util.Translate; import com.mojang.blaze3d.systems.RenderSystem; import io.wispforest.worldmesher.WorldMesh; import net.minecraft.client.MinecraftClient; @@ -9,12 +10,11 @@ import net.minecraft.client.util.Window; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.Text; +import net.minecraft.util.Formatting; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Matrix4f; import net.minecraft.util.math.Vec3f; -import static com.glisco.isometricrenders.util.Translator.gui; -import static com.glisco.isometricrenders.util.Translator.tr; import static com.glisco.isometricrenders.util.RuntimeConfig.*; public class AreaIsometricRenderScreen extends IsometricRenderScreen { @@ -47,7 +47,7 @@ protected void buildGuiElements() { if (tempOpacity == areaRenderOpacity) return; opacitySlider.setValue(areaRenderOpacity / 100f); }); - opacitySlider = new RenderScreen.SliderWidgetImpl(50, 275, sliderWidth, tr("message.isometric-renders.opacity"), 1, 0.05, areaRenderOpacity / 100f, aDouble -> { + opacitySlider = new RenderScreen.SliderWidgetImpl(50, 275, sliderWidth, Translate.make("message.isometric-renders.opacity"), 1, 0.05, areaRenderOpacity / 100f, aDouble -> { areaRenderOpacity = (int) Math.round(aDouble * 100); opacityField.setText(String.valueOf(areaRenderOpacity)); }); @@ -61,12 +61,12 @@ protected void drawGuiText(MatrixStack matrices) { super.drawGuiText(matrices); final AreaRenderCallback renderCallback = (AreaRenderCallback) this.renderCallback; - var meshStatus = gui("mesh_status"); + var meshStatus = Translate.gui("mesh_status"); if (renderCallback.canRender()) { - meshStatus.append(gui("mesh_ready")); + meshStatus.append(Translate.gui("mesh_ready").formatted(Formatting.GREEN)); } else { var percentage = Math.round(renderCallback.getMeshProgress() * 100); - meshStatus.append(gui("mesh_building", percentage)); + meshStatus.append(Translate.gui("mesh_building", percentage).formatted(Formatting.RED)); } MinecraftClient.getInstance().textRenderer.draw(matrices, meshStatus, 12, 260, 0xAAAAAA); diff --git a/src/main/java/com/glisco/isometricrenders/screen/BatchIsometricRenderScreen.java b/src/main/java/com/glisco/isometricrenders/screen/BatchIsometricRenderScreen.java index c3e2db4..29227c1 100644 --- a/src/main/java/com/glisco/isometricrenders/screen/BatchIsometricRenderScreen.java +++ b/src/main/java/com/glisco/isometricrenders/screen/BatchIsometricRenderScreen.java @@ -2,7 +2,7 @@ import com.glisco.isometricrenders.util.ImageExporter; import com.glisco.isometricrenders.util.RuntimeConfig; -import net.minecraft.client.MinecraftClient; +import com.glisco.isometricrenders.util.Translate; import net.minecraft.client.gui.widget.ClickableWidget; import net.minecraft.client.texture.NativeImage; import net.minecraft.client.util.math.MatrixStack; @@ -13,7 +13,6 @@ import static com.glisco.isometricrenders.util.RuntimeConfig.exportResolution; import static com.glisco.isometricrenders.util.RuntimeConfig.useExternalRenderer; -import static com.glisco.isometricrenders.util.Translator.msg; public abstract class BatchIsometricRenderScreen extends IsometricRenderScreen { @@ -29,14 +28,14 @@ public BatchIsometricRenderScreen(Iterator renderObjects, String name) { this.name = name; if (ImageExporter.Threaded.busy()) { - MinecraftClient.getInstance().player.sendMessage(msg("threaded_export_system_not_available"), false); + Translate.chat("threaded_export_system_not_available"); invalid = true; } ImageExporter.Threaded.init(); if (useExternalRenderer && exportResolution > 2048 && !RuntimeConfig.allowInsaneResolutions) { - MinecraftClient.getInstance().player.sendMessage(msg("resolution_not_supported"), false); + Translate.chat("resolution_not_supported"); invalid = true; } diff --git a/src/main/java/com/glisco/isometricrenders/screen/IsometricRenderScreen.java b/src/main/java/com/glisco/isometricrenders/screen/IsometricRenderScreen.java index f9f19e1..50a0630 100644 --- a/src/main/java/com/glisco/isometricrenders/screen/IsometricRenderScreen.java +++ b/src/main/java/com/glisco/isometricrenders/screen/IsometricRenderScreen.java @@ -1,6 +1,6 @@ package com.glisco.isometricrenders.screen; -import com.glisco.isometricrenders.mixin.MinecraftClientAccessor; +import com.glisco.isometricrenders.mixin.access.MinecraftClientAccessor; import com.glisco.isometricrenders.render.DefaultLightingProfiles; import com.glisco.isometricrenders.render.IsometricRenderHelper; import com.glisco.isometricrenders.util.ImageExporter; @@ -21,8 +21,8 @@ import java.io.File; import java.util.concurrent.CompletableFuture; -import static com.glisco.isometricrenders.util.Translator.gui; import static com.glisco.isometricrenders.util.RuntimeConfig.*; +import static com.glisco.isometricrenders.util.Translate.gui; public class IsometricRenderScreen extends RenderScreen { diff --git a/src/main/java/com/glisco/isometricrenders/screen/ItemAtlasRenderScreen.java b/src/main/java/com/glisco/isometricrenders/screen/ItemAtlasRenderScreen.java index 11191b1..1f3bff7 100644 --- a/src/main/java/com/glisco/isometricrenders/screen/ItemAtlasRenderScreen.java +++ b/src/main/java/com/glisco/isometricrenders/screen/ItemAtlasRenderScreen.java @@ -1,6 +1,5 @@ package com.glisco.isometricrenders.screen; -import com.glisco.isometricrenders.mixin.MinecraftClientAccessor; import com.glisco.isometricrenders.render.IsometricRenderHelper; import com.glisco.isometricrenders.util.ImageExporter; import com.mojang.blaze3d.systems.RenderSystem; @@ -15,8 +14,8 @@ import java.util.Locale; import java.util.concurrent.CompletableFuture; -import static com.glisco.isometricrenders.util.Translator.gui; import static com.glisco.isometricrenders.util.RuntimeConfig.*; +import static com.glisco.isometricrenders.util.Translate.gui; public class ItemAtlasRenderScreen extends RenderScreen { diff --git a/src/main/java/com/glisco/isometricrenders/screen/RenderScreen.java b/src/main/java/com/glisco/isometricrenders/screen/RenderScreen.java index 6334744..4766169 100644 --- a/src/main/java/com/glisco/isometricrenders/screen/RenderScreen.java +++ b/src/main/java/com/glisco/isometricrenders/screen/RenderScreen.java @@ -1,7 +1,7 @@ package com.glisco.isometricrenders.screen; -import com.glisco.isometricrenders.mixin.ParticleManagerAccessor; -import com.glisco.isometricrenders.mixin.SliderWidgetInvoker; +import com.glisco.isometricrenders.mixin.access.ParticleManagerAccessor; +import com.glisco.isometricrenders.mixin.access.SliderWidgetInvoker; import com.glisco.isometricrenders.render.IsometricRenderHelper; import com.glisco.isometricrenders.util.ImageExporter; import com.glisco.isometricrenders.util.RuntimeConfig; @@ -23,8 +23,8 @@ import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; -import static com.glisco.isometricrenders.util.Translator.*; import static com.glisco.isometricrenders.util.RuntimeConfig.*; +import static com.glisco.isometricrenders.util.Translate.gui; import static org.lwjgl.opengl.GL11.GL_DEPTH_BUFFER_BIT; public abstract class RenderScreen extends Screen { diff --git a/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java b/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java index 6aa768d..ccff074 100644 --- a/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java +++ b/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java @@ -14,9 +14,6 @@ import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; -import static com.glisco.isometricrenders.util.Translator.msg; -import static com.glisco.isometricrenders.util.Translator.tr; - public class AreaSelectionHelper { public static BlockPos pos1 = null; @@ -29,7 +26,7 @@ public static boolean shouldDraw() { public static void clear() { AreaSelectionHelper.pos1 = null; AreaSelectionHelper.pos2 = null; - MinecraftClient.getInstance().player.sendMessage(msg("selection_cleared"), true); + Translate.actionBar("selection_cleared"); } public static void renderSelectionBox(MatrixStack matrices, Camera camera) { @@ -65,9 +62,9 @@ public static void select() { if (pos1 == null) { pos1 = targetPos; - client.player.sendMessage(msg("selection_started"), true); + Translate.actionBar("selection_started"); } else { - client.player.sendMessage(msg("selection_finished"), true); + Translate.actionBar("selection_finished"); pos2 = targetPos; } } diff --git a/src/main/java/com/glisco/isometricrenders/util/CommandServer.java b/src/main/java/com/glisco/isometricrenders/util/CommandServer.java deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/java/com/glisco/isometricrenders/util/ImageExporter.java b/src/main/java/com/glisco/isometricrenders/util/ImageExporter.java index 2bb6c61..75bbf4e 100644 --- a/src/main/java/com/glisco/isometricrenders/util/ImageExporter.java +++ b/src/main/java/com/glisco/isometricrenders/util/ImageExporter.java @@ -4,10 +4,8 @@ import com.glisco.isometricrenders.render.IsometricRenderHelper; import com.google.common.util.concurrent.ThreadFactoryBuilder; import net.fabricmc.loader.api.FabricLoader; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.texture.NativeImage; import net.minecraft.text.Text; -import net.minecraft.util.Pair; import java.io.File; import java.io.IOException; @@ -17,8 +15,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; -import static com.glisco.isometricrenders.util.Translator.gui; -import static com.glisco.isometricrenders.util.Translator.msg; +import static com.glisco.isometricrenders.util.Translate.gui; public class ImageExporter extends Thread { @@ -65,7 +62,7 @@ public static boolean currentlyExporting() { } private static void sendErrorMessage() { - MinecraftClient.getInstance().player.sendMessage(msg("full_queue"), false); + Translate.chat("full_queue"); } @Override @@ -91,7 +88,7 @@ public synchronized void run() { } public static Text getProgressBarText() { - int jobs = getJobCount(); + int jobs = getJobCount(); if (jobs == 0) return gui("exporter.idle"); return gui("exporter.jobs", jobs); } @@ -126,7 +123,7 @@ public static class Threaded { public static void init() { exporters = (ThreadPoolExecutor) Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); exporters.setThreadFactory(new ThreadFactoryBuilder().setNameFormat("image-export-worker-%d").build()); - MinecraftClient.getInstance().player.sendMessage(msg("threaded_export_system_initialized"), false); + Translate.chat("threaded_export_system_initialized"); } public static CompletableFuture submit(NativeImage image, String name) { @@ -143,9 +140,9 @@ public static CompletableFuture submit(NativeImage image, String name) { public static void finish() { exporters.shutdown(); if (getJobCount() > 0) { - MinecraftClient.getInstance().player.sendMessage(msg("threaded_export_system_shutdown_with_job", getJobCount()), false); + Translate.chat("threaded_export_system_shutdown_with_job", getJobCount()); } else { - MinecraftClient.getInstance().player.sendMessage(msg("threaded_export_system_shutdown"), false); + Translate.chat("threaded_export_system_shutdown"); } } @@ -164,5 +161,5 @@ private static int getJobCount() { } - private static record Job(NativeImage image, String name, CompletableFuture future) {} + private record Job(NativeImage image, String name, CompletableFuture future) {} } diff --git a/src/main/java/com/glisco/isometricrenders/util/IsoRenderCommand.java b/src/main/java/com/glisco/isometricrenders/util/IsoRenderCommand.java index 5fa2e12..31ab991 100644 --- a/src/main/java/com/glisco/isometricrenders/util/IsoRenderCommand.java +++ b/src/main/java/com/glisco/isometricrenders/util/IsoRenderCommand.java @@ -1,15 +1,17 @@ package com.glisco.isometricrenders.util; -import com.glisco.isometricrenders.mixin.BlockStateArgumentAccessor; -import com.glisco.isometricrenders.mixin.EntitySummonArgumentTypeAccessor; +import com.glisco.isometricrenders.mixin.access.BlockStateArgumentAccessor; +import com.glisco.isometricrenders.mixin.access.EntitySummonArgumentTypeAccessor; import com.glisco.isometricrenders.render.DefaultLightingProfiles; import com.glisco.isometricrenders.render.IsometricRenderHelper; import com.glisco.isometricrenders.render.IsometricRenderPresets; import com.glisco.isometricrenders.screen.AreaIsometricRenderScreen; import com.glisco.isometricrenders.screen.IsometricRenderScreen; import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.arguments.FloatArgumentType; import com.mojang.brigadier.arguments.StringArgumentType; +import com.mojang.brigadier.builder.RequiredArgumentBuilder; import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.suggestion.SuggestionProvider; import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource; @@ -39,7 +41,7 @@ import java.util.List; import java.util.function.Function; -import static com.glisco.isometricrenders.util.Translator.msg; +import static com.glisco.isometricrenders.util.Translate.msg; import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.argument; import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.literal; @@ -51,14 +53,16 @@ public class IsoRenderCommand { private static final List NAMESPACES = new ArrayList<>(); + private static final ArgKey ITEMGROUP = new ArgKey<>(ItemGroup.class, "itemgroup"); + private static final ArgKey NAMESPACE = new ArgKey<>(String.class, "namespace"); + static { - CLIENT_SUMMONABLE_ENTITIES = (context, builder) -> CommandSource.suggestFromIdentifier(Registry.ENTITY_TYPE.stream().filter(EntityType::isSummonable), builder, EntityType::getId, entityType -> - new TranslatableText(Util.createTranslationKey("entity", EntityType.getId(entityType))) - ); + CLIENT_SUMMONABLE_ENTITIES = (context, builder) -> CommandSource.suggestFromIdentifier(Registry.ENTITY_TYPE.stream().filter(EntityType::isSummonable), + builder, EntityType::getId, entityType -> new TranslatableText(Util.createTranslationKey("entity", EntityType.getId(entityType))) + ); ITEM_GROUPS = (context, builder) -> - CommandSource.suggestMatching(Arrays.stream(ItemGroup.GROUPS).map(ItemGroup::getName), builder); - + CommandSource.suggestMatching(Arrays.stream(ItemGroup.GROUPS).map(ItemGroup::getName), builder); NAMESPACE_PROVIDER = (context, builder) -> { cacheNamespaces(); @@ -86,67 +90,60 @@ public static void register(CommandDispatcher dispatc }).then(argument("item", ItemStackArgumentType.itemStack()).executes(context -> { final ItemStack stack = ItemStackArgumentType.getItemStackArgument(context, "item").createStack(1, false); return executeItem(context.getSource(), stack); - }))).then(literal("entity").executes(context -> executeEntityTarget(context.getSource()) - ).then(argument("entity", EntitySummonArgumentType.entitySummon()).suggests(CLIENT_SUMMONABLE_ENTITIES).executes(context -> { + }))).then(literal("entity").executes(context -> { + return executeEntityTarget(context.getSource()); + }).then(argument("entity", EntitySummonArgumentType.entitySummon()).suggests(CLIENT_SUMMONABLE_ENTITIES).executes(context -> { Identifier id = context.getArgument("entity", Identifier.class); return executeEntity(context.getSource(), EntitySummonArgumentTypeAccessor.invokeValidate(id), new NbtCompound()); }).then(argument("nbt", NbtCompoundArgumentType.nbtCompound()).executes(context -> { Identifier id = context.getArgument("entity", Identifier.class); return executeEntity(context.getSource(), EntitySummonArgumentTypeAccessor.invokeValidate(id), context.getArgument("nbt", NbtCompound.class)); })))).then(literal("insanity").executes(context -> { - - RuntimeConfig.allowInsaneResolutions = !RuntimeConfig.allowInsaneResolutions; - - if (RuntimeConfig.allowInsaneResolutions) { - context.getSource().sendFeedback(msg("insane_resolution_unlocked")); - } else { - context.getSource().sendFeedback(msg("insane_resolution_locked")); - } - + Translate.commandFeedback(context, RuntimeConfig.toggleInsaneResolutions() ? "insane_resolution_unlocked" : "insane_resolution_locked"); return 0; })).then(literal("area").executes(context -> { - if (!AreaSelectionHelper.tryOpenScreen()) { - context.getSource().sendError(msg("incomplete_selection")); - } + if (AreaSelectionHelper.tryOpenScreen()) return 0; + Translate.commandError(context, "incomplete_selection"); return 0; }).then(argument("start", BlockPosArgumentType.blockPos()).then(argument("end", BlockPosArgumentType.blockPos()).executes(context -> { return executeArea(context, false); }).then(literal("enable_translucency").executes(context -> { return executeArea(context, true); - }))))).then(literal("creative_tab").then(argument("itemgroup", ItemGroupArgumentType.itemGroup()).suggests(ITEM_GROUPS).then(literal("batch").then(literal("blocks").executes(context -> { - ItemGroup group = context.getArgument("itemgroup", ItemGroup.class); - IsometricRenderHelper.batchRenderItemGroupBlocks(group); + }))))).then(literal("creative_tab").then(ITEMGROUP.toNode(ItemGroupArgumentType.itemGroup()).suggests(ITEM_GROUPS).then(literal("batch").then(literal("blocks").executes(context -> { + IsometricRenderHelper.batchRenderItemGroupBlocks(ITEMGROUP.get(context)); return 0; })).then(literal("items").executes(context -> { - ItemGroup group = context.getArgument("itemgroup", ItemGroup.class); - IsometricRenderHelper.batchRenderItemGroupItems(group); + IsometricRenderHelper.batchRenderItemGroupItems(ITEMGROUP.get(context)); return 0; }))).then(literal("atlas").executes(context -> { - ItemGroup group = context.getArgument("itemgroup", ItemGroup.class); - IsometricRenderHelper.renderItemGroupAtlas(group); + IsometricRenderHelper.renderItemGroupAtlas(ITEMGROUP.get(context)); return 0; })))).then(literal("lighting").executes(context -> { if (RuntimeConfig.lightingProfile instanceof DefaultLightingProfiles.UserLightingProfile profile) { - context.getSource().sendFeedback(msg("custom_lighting", profile.getVector().getX(), profile.getVector().getY(), profile.getVector().getZ())); + final var vector = profile.getVector(); + Translate.commandFeedback(context, "custom_lighting", vector.getX(), vector.getY(), vector.getZ()); } else { - context.getSource().sendFeedback(msg("current_profile", RuntimeConfig.lightingProfile.getFriendlyName())); + Translate.commandFeedback(context, "current_profile"); } return 0; }).then(argument("x", FloatArgumentType.floatArg()).then(argument("y", FloatArgumentType.floatArg()).then(argument("z", FloatArgumentType.floatArg()).executes(context -> { - RuntimeConfig.lightingProfile = new DefaultLightingProfiles.UserLightingProfile(FloatArgumentType.getFloat(context, "x"), FloatArgumentType.getFloat(context, "y"), FloatArgumentType.getFloat(context, "z")); - context.getSource().sendFeedback(msg("lighting_profile_updated")); + + RuntimeConfig.lightingProfile = new DefaultLightingProfiles.UserLightingProfile( + FloatArgumentType.getFloat(context, "x"), + FloatArgumentType.getFloat(context, "y"), + FloatArgumentType.getFloat(context, "z") + ); + + Translate.commandFeedback(context, "lighting_profile_updated"); return 0; - }))))).then(literal("namespace").then(argument("namespace", StringArgumentType.string()).suggests(NAMESPACE_PROVIDER).then(literal("batch").then(literal("items").executes(context -> { - String namespace = StringArgumentType.getString(context, "namespace"); - IsometricRenderHelper.batchRenderNamespaceItems(namespace); + }))))).then(literal("namespace").then(NAMESPACE.toNode(StringArgumentType.string()).suggests(NAMESPACE_PROVIDER).then(literal("batch").then(literal("items").executes(context -> { + IsometricRenderHelper.batchRenderNamespaceItems(NAMESPACE.get(context)); return 0; })).then(literal("blocks").executes(context -> { - String namespace = StringArgumentType.getString(context, "namespace"); - IsometricRenderHelper.batchRenderNamespaceBlocks(namespace); + IsometricRenderHelper.batchRenderNamespaceBlocks(NAMESPACE.get(context)); return 0; }))).then(literal("atlas").executes(context -> { - String namespace = StringArgumentType.getString(context, "namespace"); - IsometricRenderHelper.renderNamespaceAtlas(namespace); + IsometricRenderHelper.renderNamespaceAtlas(NAMESPACE.get(context)); return 0; }))))); } @@ -273,4 +270,28 @@ private static int executeArea(CommandContext context return 0; } + + private static ItemGroup itemgroup(CommandContext context) { + return context.getArgument("itemgroup", ItemGroup.class); + } + + private static final class ArgKey { + + public final Class clazz; + public final String name; + + public ArgKey(Class clazz, String name) { + this.clazz = clazz; + this.name = name; + } + + public V get(CommandContext context) { + return context.getArgument(this.name, this.clazz); + } + + public RequiredArgumentBuilder toNode(ArgumentType type) { + return argument(this.name, type); + } + } + } diff --git a/src/main/java/com/glisco/isometricrenders/util/RuntimeConfig.java b/src/main/java/com/glisco/isometricrenders/util/RuntimeConfig.java index 41005fd..a6880ac 100644 --- a/src/main/java/com/glisco/isometricrenders/util/RuntimeConfig.java +++ b/src/main/java/com/glisco/isometricrenders/util/RuntimeConfig.java @@ -29,4 +29,8 @@ public class RuntimeConfig { public static boolean dumpIntoRoot = false; public static int exportResolution = 2048; + public static boolean toggleInsaneResolutions() { + return allowInsaneResolutions = !allowInsaneResolutions; + } + } diff --git a/src/main/java/com/glisco/isometricrenders/util/Translate.java b/src/main/java/com/glisco/isometricrenders/util/Translate.java new file mode 100644 index 0000000..7c2b739 --- /dev/null +++ b/src/main/java/com/glisco/isometricrenders/util/Translate.java @@ -0,0 +1,41 @@ +package com.glisco.isometricrenders.util; + +import com.mojang.brigadier.context.CommandContext; +import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource; +import net.minecraft.client.MinecraftClient; +import net.minecraft.text.MutableText; +import net.minecraft.text.TranslatableText; +import net.minecraft.util.Formatting; + +public class Translate { + + private static final String MESSAGE_PREFIX = "message.isometric-renders.prefix"; + + public static TranslatableText make(String key, Object... args) { + return new TranslatableText("message.isometric-renders." + key, args); + } + + public static TranslatableText gui(String key, Object... args) { + return new TranslatableText("gui.isometric-renders." + key, args); + } + + public static MutableText msg(String key, Object... args) { + return new TranslatableText(MESSAGE_PREFIX).append(make(key, args).formatted(Formatting.GRAY)); + } + + public static void commandFeedback(CommandContext context, String key, Object... args) { + context.getSource().sendFeedback(msg(key, args)); + } + + public static void commandError(CommandContext context, String key, Object... args) { + context.getSource().sendError(msg(key, args)); + } + + public static void chat(String key, Object... args) { + MinecraftClient.getInstance().player.sendMessage(msg(key, args), false); + } + + public static void actionBar(String key, Object... args) { + MinecraftClient.getInstance().player.sendMessage(make(key, args), true); + } +} diff --git a/src/main/java/com/glisco/isometricrenders/util/Translator.java b/src/main/java/com/glisco/isometricrenders/util/Translator.java deleted file mode 100644 index 854b035..0000000 --- a/src/main/java/com/glisco/isometricrenders/util/Translator.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.glisco.isometricrenders.util; - -import net.minecraft.client.resource.language.I18n; -import net.minecraft.text.MutableText; -import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; - -public class Translator { - private static final String MESSAGE_PREFIX = "message.isometric-renders.prefix"; - - public static TranslatableText tr(String key, Object... args) { - return new TranslatableText(key, args); - } - public static TranslatableText gui(String key, Object... args) { - return tr("gui.isometric-renders." + key, args); - } - public static MutableText msg(String key, Object... args) { - return tr(MESSAGE_PREFIX).append(tr("message.isometric-renders." + key, args)); - } - - public static String trString(String key, Object... args) { - return I18n.translate(key, args); - } -} diff --git a/src/main/resources/assets/isometric-renders/lang/en_us.json b/src/main/resources/assets/isometric-renders/lang/en_us.json index 0577575..898b5cb 100644 --- a/src/main/resources/assets/isometric-renders/lang/en_us.json +++ b/src/main/resources/assets/isometric-renders/lang/en_us.json @@ -42,13 +42,13 @@ "gui.isometric-renders.lighting_profile.custom": "Custom", "gui.isometric-renders.mesh_status": "Mesh Status: ", - "gui.isometric-renders.mesh_building": "§cBuilding - ", - "gui.isometric-renders.mesh_ready": "§aReady", + "gui.isometric-renders.mesh_building": "Building - %d%%", + "gui.isometric-renders.mesh_ready": "Ready", "gui.isometric-renders.exporter.idle": "Exporter Idle", "gui.isometric-renders.exporter.jobs": "Export Jobs: %s", - "message.isometric-renders.prefix": "§9[§aIsometric Renders§9]§7 ", + "message.isometric-renders.prefix": "§9[§aIsometric Renders§9] ", "message.isometric-renders.no_block": "You're not looking at a block", "message.isometric-renders.no_entity": "You're not looking at an entity", "message.isometric-renders.incomplete_selection": "Your selection is not complete!", diff --git a/src/main/resources/isometric-renders.mixins.json b/src/main/resources/isometric-renders.mixins.json index 4f320c0..d130682 100644 --- a/src/main/resources/isometric-renders.mixins.json +++ b/src/main/resources/isometric-renders.mixins.json @@ -4,18 +4,18 @@ "package": "com.glisco.isometricrenders.mixin", "compatibilityLevel": "JAVA_16", "mixins": [ - "BlockEntityAccessor", - "BlockStateArgumentAccessor", - "CameraInvoker", - "DefaultPosArgumentAccessor", - "EntitySummonArgumentTypeAccessor", + "access.BlockEntityAccessor", + "access.BlockStateArgumentAccessor", + "access.CameraInvoker", + "access.DefaultPosArgumentAccessor", + "access.EntitySummonArgumentTypeAccessor", "HandledScreenMixin", - "MinecraftClientAccessor", + "access.MinecraftClientAccessor", "MinecraftClientMixin", - "NativeImageAccessor", - "ParticleManagerAccessor", + "access.NativeImageAccessor", + "access.ParticleManagerAccessor", "ParticleManagerMixin", - "SliderWidgetInvoker", + "access.SliderWidgetInvoker", "TextureManagerMixin", "WorldRendererMixin" ],