diff --git a/gradle.properties b/gradle.properties index 769b26b..d43cb10 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,17 +2,17 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_base_version=1.19.3 -minecraft_version=1.19.3 -yarn_mappings=1.19.3+build.3 -loader_version=0.14.11 +minecraft_base_version=1.19.4 +minecraft_version=1.19.4 +yarn_mappings=1.19.4+build.1 +loader_version=0.14.18 # Mod Properties mod_version=0.4.4 maven_group=com.glisco archives_base_name=isometric-renders # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.75.1+1.19.3 +fabric_version=0.76.0+1.19.4 # https://maven.wispforest.io/io/wispforest/worldmesher/ worldmesher_version=0.3.0+1.19.3 @@ -21,4 +21,4 @@ worldmesher_version=0.3.0+1.19.3 exo_version=0.1.5+1.19 # https://maven.wispforest.io/io/wispforest/owo-lib/ -owo_version=0.9.3+1.19.3 +owo_version=0.10.3+1.19.4 diff --git a/src/main/java/com/glisco/isometricrenders/command/IsorenderCommand.java b/src/main/java/com/glisco/isometricrenders/command/IsorenderCommand.java index c00581d..352b9af 100644 --- a/src/main/java/com/glisco/isometricrenders/command/IsorenderCommand.java +++ b/src/main/java/com/glisco/isometricrenders/command/IsorenderCommand.java @@ -339,6 +339,6 @@ public static BlockPos getPosFromArgument(DefaultPosArgument argument, FabricCli DefaultPosArgumentAccessor accessor = (DefaultPosArgumentAccessor) argument; Vec3d pos = source.getPlayer().getPos(); - return new BlockPos(accessor.isometric$getX().toAbsoluteCoordinate(pos.x), accessor.isometric$getY().toAbsoluteCoordinate(pos.y), accessor.isometric$getZ().toAbsoluteCoordinate(pos.z)); + return BlockPos.ofFloored(accessor.isometric$getX().toAbsoluteCoordinate(pos.x), accessor.isometric$getY().toAbsoluteCoordinate(pos.y), accessor.isometric$getZ().toAbsoluteCoordinate(pos.z)); } } diff --git a/src/main/java/com/glisco/isometricrenders/mixin/ScreenMixin.java b/src/main/java/com/glisco/isometricrenders/mixin/ScreenMixin.java index 78fe37d..15215e7 100644 --- a/src/main/java/com/glisco/isometricrenders/mixin/ScreenMixin.java +++ b/src/main/java/com/glisco/isometricrenders/mixin/ScreenMixin.java @@ -27,16 +27,16 @@ private void captureTooltipDimensions(MatrixStack matrices, List= this.items.size()) continue; - client.getItemRenderer().renderItem( + this.client.getItemRenderer().renderItem( this.items.get(index), - ModelTransformation.Mode.GUI, + ModelTransformationMode.GUI, LightmapTextureManager.MAX_LIGHT_COORDINATE, OverlayTexture.DEFAULT_UV, matrices, vertexConsumers, + this.client.world, 0 ); } diff --git a/src/main/java/com/glisco/isometricrenders/render/ItemRenderable.java b/src/main/java/com/glisco/isometricrenders/render/ItemRenderable.java index b9fe075..6d27390 100644 --- a/src/main/java/com/glisco/isometricrenders/render/ItemRenderable.java +++ b/src/main/java/com/glisco/isometricrenders/render/ItemRenderable.java @@ -6,7 +6,7 @@ import net.minecraft.client.render.LightmapTextureManager; import net.minecraft.client.render.OverlayTexture; import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.ItemStack; import net.minecraft.registry.Registries; @@ -46,8 +46,8 @@ public void emitVertices(MatrixStack matrices, VertexConsumerProvider vertexCons matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180)); } - itemRenderer.renderItem(this.stack, ModelTransformation.Mode.FIXED, LightmapTextureManager.MAX_LIGHT_COORDINATE, - OverlayTexture.DEFAULT_UV, matrices, vertexConsumers, 0); + itemRenderer.renderItem(this.stack, ModelTransformationMode.FIXED, LightmapTextureManager.MAX_LIGHT_COORDINATE, + OverlayTexture.DEFAULT_UV, matrices, vertexConsumers, MinecraftClient.getInstance().world, 0); matrices.pop(); } diff --git a/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java b/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java index ad6d73e..2fe0c12 100644 --- a/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java +++ b/src/main/java/com/glisco/isometricrenders/util/AreaSelectionHelper.java @@ -38,7 +38,7 @@ public static void renderSelectionBox(MatrixStack matrices, Camera camera) { BlockPos origin = AreaSelectionHelper.pos1; HitResult result = player.raycast(player.getAbilities().creativeMode ? 5.0F : 4.5F, 0, false); - BlockPos size = AreaSelectionHelper.pos2 != null ? AreaSelectionHelper.pos2 : (result.getType() == HitResult.Type.BLOCK ? ((BlockHitResult) result).getBlockPos() : new BlockPos(result.getPos())); + BlockPos size = AreaSelectionHelper.pos2 != null ? AreaSelectionHelper.pos2 : (result.getType() == HitResult.Type.BLOCK ? ((BlockHitResult) result).getBlockPos() : BlockPos.ofFloored(result.getPos())); size = size.subtract(origin); origin = origin.add(size.getX() < 0 ? 1 : 0, size.getY() < 0 ? 1 : 0, size.getZ() < 0 ? 1 : 0); @@ -58,7 +58,7 @@ public static void select() { final MinecraftClient client = MinecraftClient.getInstance(); final HitResult target = client.crosshairTarget; if ((target == null)) return; - BlockPos targetPos = new BlockPos(target.getType() == HitResult.Type.BLOCK ? ((BlockHitResult) target).getBlockPos() : new BlockPos(target.getPos())); + BlockPos targetPos = new BlockPos(target.getType() == HitResult.Type.BLOCK ? ((BlockHitResult) target).getBlockPos() : BlockPos.ofFloored(target.getPos())); if (pos1 == null) { pos1 = targetPos;