mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-06 04:16:36 +01:00
Merge branch '1.18/dev' into 1.18/next
Conflicts: .github/ISSUE_TEMPLATE/bug_report.yml gradle.properties src/main/java/com/jozufozu/flywheel/backend/instancing/DrawBuffer.java src/main/java/com/jozufozu/flywheel/mixin/RenderTypeMixin.java
This commit is contained in:
commit
bb7d971ebe
5 changed files with 10 additions and 10 deletions
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -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"
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
|
|
@ -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.+
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 = "<init>", 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue