mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-07 12:56:31 +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
|
description: The version of the mod you were using when the bug occured
|
||||||
options:
|
options:
|
||||||
- "0.7.0"
|
- "0.7.0"
|
||||||
|
- "0.6.5"
|
||||||
- "0.6.4"
|
- "0.6.4"
|
||||||
- "0.6.3"
|
- "0.6.3"
|
||||||
- "0.6.2"
|
- "0.6.2"
|
||||||
|
@ -90,6 +91,7 @@ body:
|
||||||
label: Minecraft Version
|
label: Minecraft Version
|
||||||
description: The version of Minecraft you were using when the bug occured
|
description: The version of Minecraft you were using when the bug occured
|
||||||
options:
|
options:
|
||||||
|
- "1.18.2"
|
||||||
- "1.18.1"
|
- "1.18.1"
|
||||||
- "1.18"
|
- "1.18"
|
||||||
- "1.17.1"
|
- "1.17.1"
|
||||||
|
|
|
@ -6,7 +6,7 @@ buildscript {
|
||||||
maven { url = 'https://maven.parchmentmc.org' }
|
maven { url = 'https://maven.parchmentmc.org' }
|
||||||
}
|
}
|
||||||
dependencies {
|
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.spongepowered:mixingradle:${mixingradle_version}"
|
||||||
classpath "org.parchmentmc:librarian:${librarian_version}"
|
classpath "org.parchmentmc:librarian:${librarian_version}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ minecraft_version = 1.18.2
|
||||||
forge_version = 40.1.68
|
forge_version = 40.1.68
|
||||||
|
|
||||||
# build dependency versions
|
# build dependency versions
|
||||||
forgegradle_version = 5.1.+
|
forgegradle_version = 5.1.53
|
||||||
mixingradle_version = 0.7-SNAPSHOT
|
mixingradle_version = 0.7-SNAPSHOT
|
||||||
mixin_version = 0.8.5
|
mixin_version = 0.8.5
|
||||||
librarian_version = 1.+
|
librarian_version = 1.+
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.jozufozu.flywheel.backend.instancing.batching;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
import com.jozufozu.flywheel.api.vertex.ReusableVertexList;
|
||||||
import com.jozufozu.flywheel.api.vertex.VertexListProvider;
|
import com.jozufozu.flywheel.api.vertex.VertexListProvider;
|
||||||
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
import com.jozufozu.flywheel.backend.memory.MemoryBlock;
|
||||||
|
@ -26,6 +28,7 @@ public class DrawBuffer {
|
||||||
|
|
||||||
private int expectedVertices;
|
private int expectedVertices;
|
||||||
|
|
||||||
|
@ApiStatus.Internal
|
||||||
public DrawBuffer(RenderType parent) {
|
public DrawBuffer(RenderType parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
format = parent.format();
|
format = parent.format();
|
||||||
|
|
|
@ -3,9 +3,6 @@ package com.jozufozu.flywheel.mixin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
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.backend.instancing.batching.DrawBuffer;
|
||||||
import com.jozufozu.flywheel.util.RenderTypeExtension;
|
import com.jozufozu.flywheel.util.RenderTypeExtension;
|
||||||
|
@ -17,14 +14,12 @@ public class RenderTypeMixin implements RenderTypeExtension {
|
||||||
@Unique
|
@Unique
|
||||||
private DrawBuffer flywheel$drawBuffer;
|
private DrawBuffer flywheel$drawBuffer;
|
||||||
|
|
||||||
@Inject(method = "<init>", at = @At("RETURN"))
|
|
||||||
private void onReturnInit(CallbackInfo ci) {
|
|
||||||
flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public DrawBuffer flywheel$getDrawBuffer() {
|
public DrawBuffer flywheel$getDrawBuffer() {
|
||||||
|
if (flywheel$drawBuffer == null) {
|
||||||
|
flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this);
|
||||||
|
}
|
||||||
return flywheel$drawBuffer;
|
return flywheel$drawBuffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue