diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 06100a98e..0036a2c8a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -84,6 +84,7 @@ body: label: Minecraft Version description: The version of Minecraft you were using when the bug occured options: + - "1.20.4" - "1.20.1" - "1.19.2" - "1.18.2" diff --git a/build.gradle b/build.gradle index 86ee637af..e2d3f41a9 100644 --- a/build.gradle +++ b/build.gradle @@ -158,6 +158,6 @@ curseforge { changelog = file('changelog.txt') releaseType = project.curse_type mainArtifact jar - addGameVersion '1.20.1' + addGameVersion '1.20.4' } } diff --git a/gradle.properties b/gradle.properties index a6c5a8d44..a7a646d69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,14 @@ org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false # mod version info mod_version = 0.6.10 -artifact_minecraft_version = 1.20.1 +artifact_minecraft_version = 1.20.4 -minecraft_version = 1.20.1 -loader_version = 0.14.21 -fabric_version = 0.90.0+1.20.1 +minecraft_version = 1.20.4 +loader_version = 0.15.7 +fabric_version = 0.96.4+1.20.4 # build dependency versions -loom_version = 1.4-SNAPSHOT +loom_version = 1.5-SNAPSHOT cursegradle_version = 1.4.0 parchment_version = 2023.06.25 diff --git a/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualRenderWorld.java b/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualRenderWorld.java index 7ccae95bf..1df5d91df 100644 --- a/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualRenderWorld.java +++ b/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualRenderWorld.java @@ -21,6 +21,7 @@ import net.minecraft.core.Vec3i; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundSource; +import net.minecraft.world.TickRateManager; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.flag.FeatureFlagSet; @@ -326,6 +327,11 @@ public FeatureFlagSet enabledFeatures() { return level.enabledFeatures(); } + @Override + public TickRateManager tickRateManager() { + return level.tickRateManager(); + } + // ADDITIONAL OVERRRIDES @Override diff --git a/src/main/java/com/jozufozu/flywheel/fabric/mixin/MinecraftMixin.java b/src/main/java/com/jozufozu/flywheel/fabric/mixin/MinecraftMixin.java index 5f645743d..f9b7619cf 100644 --- a/src/main/java/com/jozufozu/flywheel/fabric/mixin/MinecraftMixin.java +++ b/src/main/java/com/jozufozu/flywheel/fabric/mixin/MinecraftMixin.java @@ -24,7 +24,7 @@ private void onHeadSetLevel(CallbackInfo ci) { } } - @Inject(method = "clearLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At(value = "JUMP", opcode = Opcodes.IFNULL, ordinal = 2)) + @Inject(method = "disconnect(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At(value = "JUMP", opcode = Opcodes.IFNULL, ordinal = 2)) private void onClearLevel(CallbackInfo ci) { ForgeEvents.unloadWorld(level); } diff --git a/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java index 66d1ca504..18700d837 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java @@ -41,7 +41,7 @@ private void setupRender(Camera camera, Frustum frustum, boolean queue, boolean FlywheelEvents.BEGIN_FRAME.invoker().handleEvent(new BeginFrameEvent(level, camera, frustum)); } - @Inject(at = @At("TAIL"), method = "renderChunkLayer") + @Inject(at = @At("TAIL"), method = "renderSectionLayer") private void renderLayer(RenderType type, PoseStack stack, double camX, double camY, double camZ, Matrix4f projection, CallbackInfo ci) { FlywheelEvents.RENDER_LAYER.invoker().handleEvent(new RenderLayerEvent(level, type, stack, renderBuffers, camX, camY, camZ)); } diff --git a/src/main/java/com/jozufozu/flywheel/mixin/instancemanage/ChunkRebuildHooksMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/instancemanage/ChunkRebuildHooksMixin.java index 775caab6f..4a5c50df1 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/instancemanage/ChunkRebuildHooksMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/instancemanage/ChunkRebuildHooksMixin.java @@ -10,9 +10,9 @@ import net.minecraft.world.level.block.entity.BlockEntity; -@Mixin(targets = "net.minecraft.client.renderer.chunk.ChunkRenderDispatcher$RenderChunk$RebuildTask") +@Mixin(targets = "net.minecraft.client.renderer.chunk.SectionRenderDispatcher$RenderSection$RebuildTask") public class ChunkRebuildHooksMixin { - @Inject(method = "handleBlockEntity(Lnet/minecraft/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$RebuildTask$CompileResults;Lnet/minecraft/world/level/block/entity/BlockEntity;)V", at = @At("HEAD"), cancellable = true) + @Inject(method = "handleBlockEntity(Lnet/minecraft/client/renderer/chunk/SectionRenderDispatcher$RenderSection$RebuildTask$CompileResults;Lnet/minecraft/world/level/block/entity/BlockEntity;)V", at = @At("HEAD"), cancellable = true) private void flywheel$tryAddBlockEntity(@Coerce Object compileResults, BlockEntity blockEntity, CallbackInfo ci) { if (InstancedRenderDispatcher.tryAddBlockEntity(blockEntity)) { ci.cancel(); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index e8c9fdc51..d36a273b1 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ "depends": { "fabricloader": ">=0.11.3", "fabric": ">=0.84.0", - "minecraft": ">=1.20.1", + "minecraft": ">=1.20.4", "java": ">=17" }, "breaks": {