diff --git a/build.gradle b/build.gradle index bc973f5da..50025979e 100644 --- a/build.gradle +++ b/build.gradle @@ -202,6 +202,6 @@ curseforge { changelog = file('changelog.txt') releaseType = project.curse_type mainArtifact jar - addGameVersion '1.19' + addGameVersion '1.19.2' } } diff --git a/gradle.properties b/gradle.properties index d2d98e349..f6642f3c5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ mod_version = 0.6.8 artifact_minecraft_version = 1.19.2 minecraft_version = 1.19.2 -forge_version = 43.0.8 +forge_version = 43.1.23 # build dependency versions forgegradle_version = 5.1.53 diff --git a/src/main/java/com/jozufozu/flywheel/core/hardcoded/ModelPart.java b/src/main/java/com/jozufozu/flywheel/core/hardcoded/ModelPart.java index d318471cd..25546213e 100644 --- a/src/main/java/com/jozufozu/flywheel/core/hardcoded/ModelPart.java +++ b/src/main/java/com/jozufozu/flywheel/core/hardcoded/ModelPart.java @@ -4,9 +4,7 @@ import java.util.List; import com.jozufozu.flywheel.api.vertex.VertexList; import com.jozufozu.flywheel.api.vertex.VertexType; -import com.jozufozu.flywheel.backend.model.ElementBuffer; import com.jozufozu.flywheel.core.Formats; -import com.jozufozu.flywheel.core.QuadConverter; import com.jozufozu.flywheel.core.model.Model; import com.jozufozu.flywheel.core.vertex.PosTexNormalWriterUnsafe; import com.mojang.blaze3d.platform.MemoryTracker; @@ -60,12 +58,6 @@ public class ModelPart implements Model { return Formats.POS_TEX_NORMAL; } - @Override - public ElementBuffer createEBO() { - return QuadConverter.getInstance() - .quads2Tris(vertices / 4); - } - @Override public void delete() { if (reader instanceof AutoCloseable closeable) { diff --git a/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java b/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java index 676913648..61df69354 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java @@ -32,7 +32,6 @@ public class BlockModel implements Model { private final VertexList reader; private final String name; - private final EBOSupplier eboSupplier; public BlockModel(BlockState state) { diff --git a/src/main/java/com/jozufozu/flywheel/core/model/Model.java b/src/main/java/com/jozufozu/flywheel/core/model/Model.java index bbf320e7f..b0d31a15f 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/Model.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/Model.java @@ -5,6 +5,7 @@ import java.nio.ByteBuffer; import com.jozufozu.flywheel.api.vertex.VertexList; import com.jozufozu.flywheel.api.vertex.VertexType; import com.jozufozu.flywheel.backend.model.ElementBuffer; +import com.jozufozu.flywheel.core.QuadConverter; /** * A model that can be rendered by flywheel. @@ -53,7 +54,10 @@ public interface Model { *

* @return an element buffer object indexing this model's vertices. */ - ElementBuffer createEBO(); + default ElementBuffer createEBO() { + return QuadConverter.getInstance() + .quads2Tris(vertexCount() / 4); + } void delete(); diff --git a/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualChunk.java b/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualChunk.java index 32d0d9fad..5b0027bb9 100644 --- a/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualChunk.java +++ b/src/main/java/com/jozufozu/flywheel/core/virtual/VirtualChunk.java @@ -192,43 +192,6 @@ public class VirtualChunk extends ChunkAccess { return null; } -// @Override -// @Nullable -// public StructureStart getStartForFeature(ConfiguredStructureFeature pStructure) { -// return null; -// } -// -// @Override -// public void setStartForFeature(ConfiguredStructureFeature pStructure, StructureStart pStart) { -// } -// -// @Override -// public Map, StructureStart> getAllStarts() { -// return Collections.emptyMap(); -// } -// -// @Override -// public void setAllStarts(Map, StructureStart> pStructureStarts) { -// } -// -// @Override -// public LongSet getReferencesForFeature(ConfiguredStructureFeature pStructure) { -// return LongSets.emptySet(); -// } -// -// @Override -// public void addReferenceForFeature(ConfiguredStructureFeature pStructure, long pReference) { -// } -// -// @Override -// public Map, LongSet> getAllReferences() { -// return Collections.emptyMap(); -// } -// -// @Override -// public void setAllReferences(Map, LongSet> pStructureReferences) { -// } - @Override @Nullable public StructureStart getStartForStructure(Structure structure) {