diff --git a/build.gradle b/build.gradle index 16a1ebd65..1d554b045 100644 --- a/build.gradle +++ b/build.gradle @@ -172,7 +172,7 @@ dependencies { jarJar.ranged(it, '[MC1.18.2-1.1.3,)') } jarJar("com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}") { - jarJar.ranged(it, '[0.6.9,0.6.10)') + jarJar.ranged(it, '[0.6.10,0.6.11)') } implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}") diff --git a/gradle.properties b/gradle.properties index 6187a087b..dc9900bd6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,7 +23,7 @@ use_parchment = true # dependency versions registrate_version = MC1.18.2-1.1.3 flywheel_minecraft_version = 1.18.2 -flywheel_version = 0.6.9-101 +flywheel_version = 0.6.10-105 jei_minecraft_version = 1.18.2 jei_version = 9.7.0.209 curios_minecraft_version = 1.18.2 diff --git a/src/main/java/com/simibubi/create/content/contraptions/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/Contraption.java index edd763513..f42ad9a02 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/Contraption.java @@ -1367,7 +1367,7 @@ public abstract class Contraption { return blocks.values(); } - public Collection getSpecialRenderedTEs() { + public Collection getSpecialRenderedBEs() { return specialRenderedBlockEntities; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionRenderDispatcher.java index baa0b5ca4..25d6ff026 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/content/contraptions/render/ContraptionRenderDispatcher.java @@ -118,9 +118,9 @@ public class ContraptionRenderDispatcher { ContraptionWorld contraptionWorld = c.getContraptionWorld(); BlockPos origin = c.anchor; - int height = contraptionWorld.getHeight(); int minBuildHeight = contraptionWorld.getMinBuildHeight(); - VirtualRenderWorld renderWorld = new VirtualRenderWorld(world, origin, height, minBuildHeight) { + int height = contraptionWorld.getHeight(); + VirtualRenderWorld renderWorld = new VirtualRenderWorld(world, minBuildHeight, height, origin) { @Override public boolean supportsFlywheel() { return canInstance(); @@ -133,13 +133,13 @@ public class ContraptionRenderDispatcher { // Skip individual lighting updates to prevent lag with large contraptions renderWorld.setBlock(info.pos, info.state, Block.UPDATE_SUPPRESS_LIGHT); - renderWorld.runLightingEngine(); + renderWorld.runLightEngine(); return renderWorld; } public static void renderBlockEntities(Level world, VirtualRenderWorld renderWorld, Contraption c, ContraptionMatrices matrices, MultiBufferSource buffer) { - BlockEntityRenderHelper.renderBlockEntities(world, renderWorld, c.getSpecialRenderedTEs(), + BlockEntityRenderHelper.renderBlockEntities(world, renderWorld, c.getSpecialRenderedBEs(), matrices.getModelViewProjection(), matrices.getLight(), buffer); } diff --git a/src/main/java/com/simibubi/create/content/kinetics/crusher/AbstractCrushingRecipe.java b/src/main/java/com/simibubi/create/content/kinetics/crusher/AbstractCrushingRecipe.java index effcf39bc..b4647c196 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/crusher/AbstractCrushingRecipe.java +++ b/src/main/java/com/simibubi/create/content/kinetics/crusher/AbstractCrushingRecipe.java @@ -16,4 +16,9 @@ public abstract class AbstractCrushingRecipe extends ProcessingRecipe implements IA return 4; } + @Override + protected boolean canSpecifyDuration() { + return true; + } + @Override public void addAssemblyIngredients(List list) {} diff --git a/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java b/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java index ddcf9ecaa..9a86e0066 100644 --- a/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java +++ b/src/main/java/com/simibubi/create/content/processing/basin/BasinRecipe.java @@ -208,6 +208,11 @@ public class BasinRecipe extends ProcessingRecipe { return true; } + @Override + protected boolean canSpecifyDuration() { + return true; + } + @Override public boolean matches(SmartInventory inv, @Nonnull Level worldIn) { return false; diff --git a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java index e21ff458e..d14890ad5 100644 --- a/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java +++ b/src/main/java/com/simibubi/create/content/processing/recipe/ProcessingRecipe.java @@ -71,7 +71,7 @@ public abstract class ProcessingRecipe implements Recipe } protected boolean canSpecifyDuration() { - return true; + return false; } protected int getMaxFluidInputCount() { diff --git a/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java b/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java index f8be4a9c0..c791a3a24 100644 --- a/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java +++ b/src/main/java/com/simibubi/create/content/trains/entity/CarriageContraption.java @@ -289,9 +289,9 @@ public class CarriageContraption extends Contraption { } @Override - public Collection getSpecialRenderedTEs() { + public Collection getSpecialRenderedBEs() { if (notInPortal()) - return super.getSpecialRenderedTEs(); + return super.getSpecialRenderedBEs(); return specialRenderedBEsOutsidePortal; } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/client/FixNormalScalingMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/client/FixNormalScalingMixin.java deleted file mode 100644 index 4eb81c31c..000000000 --- a/src/main/java/com/simibubi/create/foundation/mixin/client/FixNormalScalingMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.simibubi.create.foundation.mixin.client; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.At.Shift; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import com.mojang.blaze3d.vertex.PoseStack; - -@Mixin(PoseStack.class) -public class FixNormalScalingMixin { - /** - * Minecraft negates the normal matrix if all scales are equal and negative, but - * does not return afterward. This allows the rest of the method's logic to be - * applied, which negates the matrix again, resulting in the matrix being the - * same as in the beginning. - */ - @Inject(at = @At(value = "INVOKE", target = "Lcom/mojang/math/Matrix3f;mul(F)V", shift = Shift.AFTER), method = "scale(FFF)V", cancellable = true) - private void create$returnAfterNegate(float x, float y, float z, CallbackInfo ci) { - ci.cancel(); - } - - /** - * Minecraft takes the inverse cube root of the product of all scales to provide a - * rough estimate for normalization so that it does not need to be done later. It - * does not make sense for this "normalization factor" to be negative though, as - * that would invert all normals. Additionally, Minecraft's fastInverseCbrt method - * does not work for negative numbers. - */ - @ModifyArg(at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;fastInvCubeRoot(F)F"), method = "scale(FFF)V") - private float create$absInvCbrtInput(float input) { - return Math.abs(input); - } -} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 0cb21ffad..a85a892d9 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -33,6 +33,6 @@ Technology that empowers the player.''' [[dependencies.create]] modId="flywheel" mandatory=true - versionRange="[0.6.9,0.6.10)" + versionRange="[0.6.10,0.6.11)" ordering="AFTER" side="CLIENT" diff --git a/src/main/resources/create.mixins.json b/src/main/resources/create.mixins.json index 774b68fcd..6488d89eb 100644 --- a/src/main/resources/create.mixins.json +++ b/src/main/resources/create.mixins.json @@ -27,7 +27,6 @@ "client.BlockDestructionProgressMixin", "client.CameraMixin", "client.EntityContraptionInteractionMixin", - "client.FixNormalScalingMixin", "client.GameRendererMixin", "client.HeavyBootsOnPlayerMixin", "client.HumanoidArmorLayerMixin",