diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ae340d909..a4a763b61 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -60,6 +60,7 @@ body: description: The version of the mod you were using when the bug occured options: - "0.7.0" + - "0.6.5" - "0.6.4" - "0.6.3" - "0.6.2" @@ -90,6 +91,7 @@ body: label: Minecraft Version description: The version of Minecraft you were using when the bug occured options: + - "1.18.2" - "1.18.1" - "1.18" - "1.17.1" diff --git a/build.gradle b/build.gradle index 10988a0ef..3a7e20f4c 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { maven { url = 'https://maven.parchmentmc.org' } } dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: "${forgegradle_version}", changing: true + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: "${forgegradle_version}", changing: false classpath "org.spongepowered:mixingradle:${mixingradle_version}" classpath "org.parchmentmc:librarian:${librarian_version}" } diff --git a/gradle.properties b/gradle.properties index 95019e8cf..79c69ac95 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ minecraft_version = 1.18.2 forge_version = 40.1.68 # build dependency versions -forgegradle_version = 5.1.+ +forgegradle_version = 5.1.53 mixingradle_version = 0.7-SNAPSHOT mixin_version = 0.8.5 librarian_version = 1.+ diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/DrawBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/DrawBuffer.java index 4e2cd4fc9..f044691c5 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/DrawBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/DrawBuffer.java @@ -2,6 +2,8 @@ package com.jozufozu.flywheel.backend.instancing.batching; import java.nio.ByteBuffer; +import org.jetbrains.annotations.ApiStatus; + import com.jozufozu.flywheel.api.vertex.ReusableVertexList; import com.jozufozu.flywheel.api.vertex.VertexListProvider; import com.jozufozu.flywheel.backend.memory.MemoryBlock; @@ -26,6 +28,7 @@ public class DrawBuffer { private int expectedVertices; + @ApiStatus.Internal public DrawBuffer(RenderType parent) { this.parent = parent; format = parent.format(); diff --git a/src/main/java/com/jozufozu/flywheel/mixin/RenderTypeMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/RenderTypeMixin.java index 12c3e7edb..e26dc339f 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/RenderTypeMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/RenderTypeMixin.java @@ -3,9 +3,6 @@ package com.jozufozu.flywheel.mixin; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import com.jozufozu.flywheel.backend.instancing.batching.DrawBuffer; import com.jozufozu.flywheel.util.RenderTypeExtension; @@ -17,14 +14,12 @@ public class RenderTypeMixin implements RenderTypeExtension { @Unique private DrawBuffer flywheel$drawBuffer; - @Inject(method = "", at = @At("RETURN")) - private void onReturnInit(CallbackInfo ci) { - flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this); - } - @Override @NotNull public DrawBuffer flywheel$getDrawBuffer() { + if (flywheel$drawBuffer == null) { + flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this); + } return flywheel$drawBuffer; } }