From 56b0fce44dd422768dc903a5a27583aad0c36390 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 5 May 2024 11:05:33 -0400
Subject: [PATCH 01/67] Port to 1.20.4
---
buildSrc/build.gradle.kts | 4 +-
.../gradle/subproject/SubprojectPlugin.kt | 4 +-
.../impl/mixin/LevelRendererMixin.java | 3 +-
.../mixin/visualmanage/RebuildTaskMixin.java | 4 +-
.../flywheel/impl/mixin/MinecraftMixin.java | 7 ++--
.../impl/mixin/fabric/MinecraftMixin.java | 2 +-
forge/build.gradle.kts | 12 +++---
forge/gradle.properties | 2 +-
.../flywheel/api/event/BeginFrameEvent.java | 2 +-
.../event/EndClientResourceReloadEvent.java | 4 +-
.../api/event/ReloadLevelRendererEvent.java | 3 +-
.../flywheel/api/event/RenderStageEvent.java | 3 +-
.../lib/model/baked/BakedModelBufferer.java | 5 ++-
.../model/baked/ForgeBakedModelBuilder.java | 3 +-
.../model/baked/ForgeBlockModelBuilder.java | 3 +-
.../baked/ForgeMultiBlockModelBuilder.java | 3 +-
.../model/baked/PartialModelEventHandler.java | 3 +-
.../flywheel/impl/FlwCommands.java | 9 ++--
.../flywheel/impl/FlwImplXplatImpl.java | 9 ++--
.../flywheel/impl/FlwLibXplatImpl.java | 6 ++-
.../flywheel/impl/FlywheelForge.java | 41 +++++++++++++++----
.../flywheel/impl/ForgeFlwConfig.java | 19 +++++----
.../flywheel/impl/mixin/MinecraftMixin.java | 16 ++++----
.../impl/mixin/sodium/SodiumMixinPlugin.java | 4 +-
forge/src/main/resources/META-INF/mods.toml | 21 ++++++----
gradle.properties | 21 +++++-----
settings.gradle.kts | 4 +-
27 files changed, 129 insertions(+), 88 deletions(-)
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 4853b6a15..6393c5701 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -7,8 +7,8 @@ plugins {
repositories {
gradlePluginPortal()
mavenCentral()
- maven("https://maven.minecraftforge.net/") {
- name = "MinecraftForge"
+ maven("https://maven.neoforged.net/releases/") {
+ name = "NeoForged"
}
maven("https://maven.architectury.dev/") {
name = "Architectury"
diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
index 8dd2dbd9d..8398fa57e 100644
--- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
+++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
@@ -53,6 +53,8 @@ class SubprojectPlugin: Plugin {
val loom = project.the()
loom.silentMojangMappingsLicense()
+ // FIXME y tho? :(
+ loom.mixin.useLegacyMixinAp = true
loom.mixin.defaultRefmapName = "flywheel.refmap.json"
}
@@ -182,6 +184,6 @@ val processResourcesExpandProperties = listOf(
"minecraft_semver_version_range",
"minecraft_maven_version_range",
"fabric_api_version_range",
- "forge_version_range",
+ "neoforge_version_range",
)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 9cbcf2790..dadebbbf1 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -102,7 +102,7 @@ abstract class LevelRendererMixin {
flywheel$dispatch(RenderStage.AFTER_TRANSLUCENT_TERRAIN);
}
- @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/LevelRenderer;renderChunkLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", ordinal = 6, shift = Shift.AFTER))
+ @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/LevelRenderer;renderSectionLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", ordinal = 6, shift = Shift.AFTER))
private void flywheel$onStage$afterTranslucentTerrain(CallbackInfo ci) {
flywheel$dispatch(RenderStage.AFTER_TRANSLUCENT_TERRAIN);
}
@@ -113,6 +113,7 @@ abstract class LevelRendererMixin {
flywheel$dispatch(RenderStage.AFTER_PARTICLES);
}
+ //fixme take a look over if this is still needed
@Group(name = "onStage$afterParticles")
@Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;)V", shift = Shift.AFTER))
private void flywheel$onStage$afterParticles$forge(CallbackInfo ci) {
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java
index c55c532fa..cd98fb932 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java
@@ -9,9 +9,9 @@
import dev.engine_room.flywheel.lib.visual.VisualizationHelper;
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")
abstract class RebuildTaskMixin {
- @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 (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
ci.cancel();
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index f96a68595..dcab8eeec 100644
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -7,6 +7,7 @@
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Coerce;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -30,14 +31,14 @@ abstract class MinecraftMixin {
FabricFlwConfig.INSTANCE.load();
}
- @Inject(method = "method_24040", at = @At("HEAD"))
- private void flywheel$onEndInitialResourceReload(Optional error, CallbackInfo ci) {
+ @Inject(method = "method_53522", at = @At("HEAD"))
+ private void flywheel$onEndInitialResourceReload(@Coerce Object gameLoadCookie, Optional error, CallbackInfo ci) {
EndClientResourceReloadCallback.EVENT.invoker()
.onEndClientResourceReload((Minecraft) (Object) this, resourceManager, true, error);
}
@Inject(method = "method_24228", at = @At("HEAD"))
- private void flywheel$onEndManualResourceReload(boolean recovery, CompletableFuture future,
+ private void flywheel$onEndManualResourceReload(boolean recovery, @Coerce Object gameLoadCookie, CompletableFuture future,
Optional error, CallbackInfo ci) {
EndClientResourceReloadCallback.EVENT.invoker()
.onEndClientResourceReload((Minecraft) (Object) this, resourceManager, false, error);
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
index e7d8b7af2..6ff63b33d 100644
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
+++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
@@ -22,7 +22,7 @@ abstract class MinecraftMixin {
}
}
- @Inject(method = "clearLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
+ @Inject(method = "clearClientLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
private void flywheel$onClearLevel(CallbackInfo ci) {
if (level != null) {
LevelAttached.invalidateLevel(level);
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts
index 5f51cc55e..c2779acd8 100644
--- a/forge/build.gradle.kts
+++ b/forge/build.gradle.kts
@@ -61,12 +61,6 @@ defaultPackageInfos {
}
loom {
- forge {
- mixinConfig("flywheel.backend.mixins.json")
- mixinConfig("flywheel.impl.mixins.json")
- mixinConfig("flywheel.impl.sodium.mixins.json")
- }
-
runs {
configureEach {
property("forge.logging.markers", "")
@@ -75,8 +69,12 @@ loom {
}
}
+repositories {
+ maven("https://maven.neoforged.net/releases/")
+}
+
dependencies {
- forge("net.minecraftforge:forge:${property("minecraft_version")}-${property("forge_version")}")
+ neoForge("net.neoforged:neoforge:${property("neoforge_version")}")
modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}")
diff --git a/forge/gradle.properties b/forge/gradle.properties
index a58ba1416..2e6ed7676 100644
--- a/forge/gradle.properties
+++ b/forge/gradle.properties
@@ -1 +1 @@
-loom.platform = forge
+loom.platform = neoforge
diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/BeginFrameEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/BeginFrameEvent.java
index 5da48c419..d96741099 100644
--- a/forge/src/api/java/dev/engine_room/flywheel/api/event/BeginFrameEvent.java
+++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/BeginFrameEvent.java
@@ -1,6 +1,6 @@
package dev.engine_room.flywheel.api.event;
-import net.minecraftforge.eventbus.api.Event;
+import net.neoforged.bus.api.Event;
/**
* This event is posted to the Forge event bus.
diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/EndClientResourceReloadEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/EndClientResourceReloadEvent.java
index 8e102c4ba..bacc99531 100644
--- a/forge/src/api/java/dev/engine_room/flywheel/api/event/EndClientResourceReloadEvent.java
+++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/EndClientResourceReloadEvent.java
@@ -4,8 +4,8 @@
import net.minecraft.client.Minecraft;
import net.minecraft.server.packs.resources.ResourceManager;
-import net.minecraftforge.eventbus.api.Event;
-import net.minecraftforge.fml.event.IModBusEvent;
+import net.neoforged.bus.api.Event;
+import net.neoforged.fml.event.IModBusEvent;
/**
* This event is posted to mod event buses.
diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java
index e74e792c9..a6a9ed00c 100644
--- a/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java
+++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java
@@ -1,9 +1,10 @@
package dev.engine_room.flywheel.api.event;
+import net.neoforged.bus.api.Event;
+
import org.jetbrains.annotations.Nullable;
import net.minecraft.client.multiplayer.ClientLevel;
-import net.minecraftforge.eventbus.api.Event;
/**
* This event is posted to the Forge event bus.
diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
index 4b0ec8254..d9c27aad7 100644
--- a/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
+++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
@@ -1,5 +1,7 @@
package dev.engine_room.flywheel.api.event;
+import net.neoforged.bus.api.Event;
+
import org.joml.Matrix4f;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -7,7 +9,6 @@
import net.minecraft.client.Camera;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.RenderBuffers;
-import net.minecraftforge.eventbus.api.Event;
/**
* This event is posted to the Forge event bus.
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
index 50162d4b9..4453ec5b8 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
@@ -3,6 +3,9 @@
import java.util.Iterator;
import java.util.function.Function;
+import net.neoforged.neoforge.client.ChunkRenderTypeSet;
+import net.neoforged.neoforge.client.model.data.ModelData;
+
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;
@@ -20,8 +23,6 @@
import net.minecraft.world.level.block.RenderShape;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
-import net.minecraftforge.client.ChunkRenderTypeSet;
-import net.minecraftforge.client.model.data.ModelData;
final class BakedModelBufferer {
static final RenderType[] CHUNK_LAYERS = RenderType.chunkBufferLayers().toArray(RenderType[]::new);
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
index 10714e848..3d9cf4885 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
@@ -2,6 +2,8 @@
import java.util.function.BiFunction;
+import net.neoforged.neoforge.client.model.data.ModelData;
+
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -16,7 +18,6 @@
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
-import net.minecraftforge.client.model.data.ModelData;
public final class ForgeBakedModelBuilder extends BakedModelBuilder {
@Nullable
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
index 4e1d9df82..d09730dc7 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
@@ -2,6 +2,8 @@
import java.util.function.BiFunction;
+import net.neoforged.neoforge.client.model.data.ModelData;
+
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -14,7 +16,6 @@
import net.minecraft.client.renderer.RenderType;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.state.BlockState;
-import net.minecraftforge.client.model.data.ModelData;
public final class ForgeBlockModelBuilder extends BlockModelBuilder {
@Nullable
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
index 183e03d84..9bbf47079 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
@@ -3,6 +3,8 @@
import java.util.function.BiFunction;
import java.util.function.Function;
+import net.neoforged.neoforge.client.model.data.ModelData;
+
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -15,7 +17,6 @@
import net.minecraft.client.renderer.RenderType;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockAndTintGetter;
-import net.minecraftforge.client.model.data.ModelData;
public final class ForgeMultiBlockModelBuilder extends MultiBlockModelBuilder {
@Nullable
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
index 5c490dcd7..f84fc5ff3 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
@@ -2,11 +2,12 @@
import java.util.Map;
+import net.neoforged.neoforge.client.event.ModelEvent;
+
import org.jetbrains.annotations.ApiStatus;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
-import net.minecraftforge.client.event.ModelEvent;
@ApiStatus.Internal
public final class PartialModelEventHandler {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
index 227973f4e..830c0fb0f 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
@@ -15,9 +15,8 @@
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
-import net.minecraftforge.client.event.RegisterClientCommandsEvent;
-import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
-import net.minecraftforge.common.ForgeConfigSpec.ConfigValue;
+import net.neoforged.neoforge.client.event.RegisterClientCommandsEvent;
+import net.neoforged.neoforge.common.ModConfigSpec;
public final class FlwCommands {
private FlwCommands() {
@@ -26,7 +25,7 @@ private FlwCommands() {
public static void registerClientCommands(RegisterClientCommandsEvent event) {
LiteralArgumentBuilder command = Commands.literal("flywheel");
- ConfigValue backendValue = ForgeFlwConfig.INSTANCE.client.backend;
+ ModConfigSpec.ConfigValue backendValue = ForgeFlwConfig.INSTANCE.client.backend;
command.then(Commands.literal("backend")
.executes(context -> {
Backend backend = BackendManager.getBackend();
@@ -56,7 +55,7 @@ public static void registerClientCommands(RegisterClientCommandsEvent event) {
return Command.SINGLE_SUCCESS;
})));
- BooleanValue limitUpdatesValue = ForgeFlwConfig.INSTANCE.client.limitUpdates;
+ ModConfigSpec.BooleanValue limitUpdatesValue = ForgeFlwConfig.INSTANCE.client.limitUpdates;
command.then(Commands.literal("limitUpdates")
.executes(context -> {
if (limitUpdatesValue.get()) {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
index 4ebf4532b..cddd85e4e 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
@@ -1,5 +1,7 @@
package dev.engine_room.flywheel.impl;
+import net.neoforged.neoforge.common.NeoForge;
+
import org.jetbrains.annotations.Nullable;
import dev.engine_room.flywheel.api.event.BeginFrameEvent;
@@ -8,22 +10,21 @@
import dev.engine_room.flywheel.api.event.RenderStage;
import dev.engine_room.flywheel.api.event.RenderStageEvent;
import net.minecraft.client.multiplayer.ClientLevel;
-import net.minecraftforge.common.MinecraftForge;
public class FlwImplXplatImpl implements FlwImplXplat {
@Override
public void dispatchBeginFrameEvent(RenderContext context) {
- MinecraftForge.EVENT_BUS.post(new BeginFrameEvent(context));
+ NeoForge.EVENT_BUS.post(new BeginFrameEvent(context));
}
@Override
public void dispatchReloadLevelRendererEvent(@Nullable ClientLevel level) {
- MinecraftForge.EVENT_BUS.post(new ReloadLevelRendererEvent(level));
+ NeoForge.EVENT_BUS.post(new ReloadLevelRendererEvent(level));
}
@Override
public void dispatchRenderStageEvent(RenderContext context, RenderStage stage) {
- MinecraftForge.EVENT_BUS.post(new RenderStageEvent(context, stage));
+ NeoForge.EVENT_BUS.post(new RenderStageEvent(context, stage));
}
@Override
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
index 7aa29a9b0..203460ef1 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
@@ -2,6 +2,9 @@
import java.lang.reflect.Field;
+import net.neoforged.fml.ModList;
+import net.neoforged.fml.util.ObfuscationReflectionHelper;
+
import org.jetbrains.annotations.Nullable;
import dev.engine_room.flywheel.lib.internal.FlwLibXplat;
@@ -20,8 +23,6 @@
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.state.BlockState;
-import net.minecraftforge.fml.ModList;
-import net.minecraftforge.fml.util.ObfuscationReflectionHelper;
public class FlwLibXplatImpl implements FlwLibXplat {
@Override
@@ -33,6 +34,7 @@ public BlockRenderDispatcher createVanillaBlockRenderDispatcher() {
field.setAccessible(true);
field.set(dispatcher, field.get(defaultDispatcher));
}
+ // fixme ~ is this still needed? neoforge uses mojmap at runtime
ObfuscationReflectionHelper.setPrivateValue(BlockRenderDispatcher.class, dispatcher, new ModelBlockRenderer(Minecraft.getInstance().getBlockColors()), "f_110900_");
} catch (Exception e) {
FlwImpl.LOGGER.error("Failed to initialize vanilla BlockRenderDispatcher!", e);
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
index 72e5ada1f..7eb1fd24f 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
@@ -1,5 +1,30 @@
package dev.engine_room.flywheel.impl;
+import net.minecraft.core.registries.Registries;
+import net.neoforged.api.distmarker.Dist;
+import net.neoforged.bus.api.IEventBus;
+import net.neoforged.fml.CrashReportCallables;
+import net.neoforged.fml.DistExecutor;
+import net.neoforged.fml.LogicalSide;
+import net.neoforged.fml.ModLoadingContext;
+
+import net.neoforged.fml.common.Mod;
+
+import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
+import net.neoforged.fml.event.lifecycle.FMLLoadCompleteEvent;
+import net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent;
+import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent;
+import net.neoforged.neoforge.common.NeoForge;
+
+import net.neoforged.neoforge.event.TickEvent;
+
+import net.neoforged.neoforge.event.entity.EntityJoinLevelEvent;
+
+import net.neoforged.neoforge.event.entity.EntityLeaveLevelEvent;
+
+import net.neoforged.neoforge.event.level.LevelEvent;
+import net.neoforged.neoforge.registries.RegisterEvent;
+
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.jetbrains.annotations.UnknownNullability;
@@ -41,7 +66,7 @@ public final class FlywheelForge {
@UnknownNullability
private static ArtifactVersion version;
- public FlywheelForge() {
+ public FlywheelForge(IEventBus modEventBus) {
ModLoadingContext modLoadingContext = ModLoadingContext.get();
version = modLoadingContext
@@ -49,9 +74,7 @@ public FlywheelForge() {
.getModInfo()
.getVersion();
- IEventBus forgeEventBus = MinecraftForge.EVENT_BUS;
- IEventBus modEventBus = FMLJavaModLoadingContext.get()
- .getModEventBus();
+ IEventBus forgeEventBus = NeoForge.EVENT_BUS;
ForgeFlwConfig.INSTANCE.registerSpecs(modLoadingContext);
@@ -86,23 +109,23 @@ private static void registerImplEventListeners(IEventBus forgeEventBus, IEventBu
forgeEventBus.addListener((CustomizeGuiOverlayEvent.DebugText e) -> {
Minecraft minecraft = Minecraft.getInstance();
- if (!minecraft.options.renderDebug) {
+ if (!minecraft.getDebugOverlay().showDebugScreen()) {
return;
}
FlwDebugInfo.addDebugInfo(minecraft, e.getRight());
});
- modEventBus.addListener((EndClientResourceReloadEvent e) -> BackendManagerImpl.onEndClientResourceReload(e.error().isPresent()));
+ modEventBus.addListener((EndClientResourceReloadEvent e) -> BackendManagerImpl.onEndClientResourceReload(e.error() != null));
modEventBus.addListener((FMLCommonSetupEvent e) -> {
ArgumentTypeInfos.registerByClass(BackendArgument.class, BackendArgument.INFO);
ArgumentTypeInfos.registerByClass(DebugModeArgument.class, DebugModeArgument.INFO);
});
modEventBus.addListener((RegisterEvent e) -> {
- if (e.getRegistryKey().equals(ForgeRegistries.Keys.COMMAND_ARGUMENT_TYPES)) {
- e.register(ForgeRegistries.Keys.COMMAND_ARGUMENT_TYPES, Flywheel.rl("backend"), () -> BackendArgument.INFO);
- e.register(ForgeRegistries.Keys.COMMAND_ARGUMENT_TYPES, Flywheel.rl("debug_mode"), () -> DebugModeArgument.INFO);
+ if (e.getRegistryKey().equals(Registries.COMMAND_ARGUMENT_TYPE)) {
+ e.register(Registries.COMMAND_ARGUMENT_TYPE, Flywheel.rl("backend"), () -> BackendArgument.INFO);
+ e.register(Registries.COMMAND_ARGUMENT_TYPE, Flywheel.rl("debug_mode"), () -> DebugModeArgument.INFO);
}
});
}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
index 69fd054c0..60832455d 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
@@ -1,5 +1,9 @@
package dev.engine_room.flywheel.impl;
+import net.neoforged.fml.ModLoadingContext;
+import net.neoforged.fml.config.ModConfig;
+import net.neoforged.neoforge.common.ModConfigSpec;
+
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.Nullable;
@@ -7,18 +11,15 @@
import dev.engine_room.flywheel.api.backend.BackendManager;
import net.minecraft.ResourceLocationException;
import net.minecraft.resources.ResourceLocation;
-import net.minecraftforge.common.ForgeConfigSpec;
-import net.minecraftforge.fml.ModLoadingContext;
-import net.minecraftforge.fml.config.ModConfig;
public class ForgeFlwConfig implements FlwConfig {
public static final ForgeFlwConfig INSTANCE = new ForgeFlwConfig();
public final ClientConfig client;
- private final ForgeConfigSpec clientSpec;
+ private final ModConfigSpec clientSpec;
private ForgeFlwConfig() {
- Pair clientPair = new ForgeConfigSpec.Builder().configure(ClientConfig::new);
+ Pair clientPair = new ModConfigSpec.Builder().configure(ClientConfig::new);
this.client = clientPair.getLeft();
clientSpec = clientPair.getRight();
}
@@ -68,11 +69,11 @@ public void registerSpecs(ModLoadingContext context) {
}
public static class ClientConfig {
- public final ForgeConfigSpec.ConfigValue backend;
- public final ForgeConfigSpec.BooleanValue limitUpdates;
- public final ForgeConfigSpec.IntValue workerThreads;
+ public final ModConfigSpec.ConfigValue backend;
+ public final ModConfigSpec.BooleanValue limitUpdates;
+ public final ModConfigSpec.IntValue workerThreads;
- private ClientConfig(ForgeConfigSpec.Builder builder) {
+ private ClientConfig(ModConfigSpec.Builder builder) {
backend = builder.comment("Select the backend to use.")
.define("backend", Backend.REGISTRY.getIdOrThrow(BackendManager.getDefaultBackend()).toString());
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index 99ca5d570..2305ba681 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -4,10 +4,13 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
+import net.neoforged.fml.ModLoader;
+
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Coerce;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -17,12 +20,9 @@
import dev.engine_room.flywheel.api.event.EndClientResourceReloadEvent;
import dev.engine_room.flywheel.impl.FlwImpl;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.main.GameConfig;
-import net.minecraft.server.packs.resources.ReloadInstance;
import net.minecraft.server.packs.resources.ReloadableResourceManager;
-import net.minecraftforge.fml.ModLoader;
-@Mixin(Minecraft.class)
+@Mixin(value = Minecraft.class, remap = false)
abstract class MinecraftMixin {
@Shadow
@Final
@@ -35,13 +35,13 @@ abstract class MinecraftMixin {
return arg0;
}
- @Inject(method = "lambda$new$5", at = @At("HEAD"))
- private void flywheel$onEndInitialResourceReload(RealmsClient realmsClient, ReloadInstance reloadInstance, GameConfig gameConfig, Optional error, CallbackInfo ci) {
+ @Inject(method = "lambda$new$7", at = @At("HEAD"))
+ private void flywheel$onEndInitialResourceReload(@Coerce Object minecraft$gameloadcookie, Optional error, CallbackInfo ci) {
ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error));
}
- @Inject(method = "lambda$reloadResourcePacks$28", at = @At("HEAD"))
- private void flywheel$onEndManualResourceReload(boolean recovery, CompletableFuture future, Optional error, CallbackInfo ci) {
+ @Inject(method = "lambda$reloadResourcePacks$39", at = @At("HEAD"))
+ private void flywheel$onEndManualResourceReload(boolean bl, @Coerce Object minecraft$gameloadcookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
}
}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
index 1048d91fd..5ee303ff0 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
@@ -4,14 +4,14 @@
import java.util.Set;
import java.util.function.Supplier;
+import net.neoforged.fml.loading.LoadingModList;
+
import org.objectweb.asm.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
import com.google.common.base.Suppliers;
-import net.minecraftforge.fml.loading.LoadingModList;
-
public class SodiumMixinPlugin implements IMixinConfigPlugin {
private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("rubidium") != null);
diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml
index 2dc330582..546372adf 100644
--- a/forge/src/main/resources/META-INF/mods.toml
+++ b/forge/src/main/resources/META-INF/mods.toml
@@ -14,22 +14,29 @@ authors = "Jozufozu, PepperCode1"
displayURL = "${mod_homepage}"
displayTest = "IGNORE_ALL_VERSION"
+[[mixins]]
+config = "flywheel.backend.mixins.json"
+[[mixins]]
+config = "flywheel.impl.mixins.json"
+[[mixins]]
+config = "flywheel.impl.sodium.mixins.json"
+
[[dependencies.${mod_id}]]
modId = "minecraft"
-mandatory = true
+type = "required"
versionRange = "${minecraft_maven_version_range}"
side = "CLIENT"
[[dependencies.${mod_id}]]
-modId = "forge"
-mandatory = true
-versionRange = "${forge_version_range}"
+modId = "neoforge"
+type = "required"
+versionRange = "${neoforge_version_range}"
side = "CLIENT"
+# Breaks dependency
[[dependencies.${mod_id}]]
-# This replicates a "breaks" dependency.
-# There's a mixin crash with Rubidium <0.7.0.
modId = "rubidium"
-mandatory = false
+type = "incompatible"
+reason = "mixin crash with any version of rubidium under 0.7.0"
versionRange = "[0.7.0,)"
side = "CLIENT"
diff --git a/gradle.properties b/gradle.properties
index 431fbe0d6..db47dc3ce 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -12,22 +12,21 @@ mod_issues = https://github.com/Jozufozu/Flywheel/issues
mod_homepage = https://github.com/Jozufozu/Flywheel
# Mod dependency declarations
-minecraft_semver_version_range = >=1.20.1 <1.20.2
-minecraft_maven_version_range = [1.20.1,1.20.2)
-fabric_api_version_range = >=0.86.0
-forge_version_range = [47.0.0,)
+minecraft_semver_version_range = >=1.20.4 <1.20.5
+minecraft_maven_version_range = [1.20.4,1.20.5)
+fabric_api_version_range = >=0.97.0
+neoforge_version_range = [20.4.234,)
# General build dependency versions
java_version = 17
arch_loom_version = 1.6-SNAPSHOT
-cursegradle_version = 1.4.0
-parchment_version = 2023.09.03
+parchment_version = 2024.04.14
# Minecraft build dependency versions
-minecraft_version = 1.20.1
-forge_version = 47.2.19
-fabric_loader_version = 0.15.9
-fabric_api_version = 0.92.1+1.20.1
+minecraft_version = 1.20.4
+neoforge_version = 20.4.234
+fabric_loader_version = 0.15.10
+fabric_api_version = 0.97.0+1.20.4
# Build dependency mod versions
sodium_version = mc1.20.1-0.5.8
@@ -37,4 +36,4 @@ oculus_version = 1.20.1-1.6.15a
# Publication info
group = dev.engine_room.flywheel
-artifact_minecraft_version = 1.20.1
+artifact_minecraft_version = 1.20.4
diff --git a/settings.gradle.kts b/settings.gradle.kts
index cf8fd7a12..5bb943455 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -2,8 +2,8 @@ pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
- maven("https://maven.minecraftforge.net/") {
- name = "MinecraftForge"
+ maven("https://maven.neoforged.net/releases/") {
+ name = "NeoForged"
}
maven("https://maven.architectury.dev/") {
name = "Architectury"
From 8c61f3fc1e9cf5d1f063567510d7d9acd96a9696 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sat, 11 May 2024 21:14:18 -0400
Subject: [PATCH 02/67] Obfuscated Obfuscation
- Fix ObfuscationReflectionHelper#setPrivateValue using SRG mapped names, Neoforge has switched to mojmap at runtime
---
.../java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
index 203460ef1..c4bc9ffae 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
@@ -34,8 +34,7 @@ public BlockRenderDispatcher createVanillaBlockRenderDispatcher() {
field.setAccessible(true);
field.set(dispatcher, field.get(defaultDispatcher));
}
- // fixme ~ is this still needed? neoforge uses mojmap at runtime
- ObfuscationReflectionHelper.setPrivateValue(BlockRenderDispatcher.class, dispatcher, new ModelBlockRenderer(Minecraft.getInstance().getBlockColors()), "f_110900_");
+ ObfuscationReflectionHelper.setPrivateValue(BlockRenderDispatcher.class, dispatcher, new ModelBlockRenderer(Minecraft.getInstance().getBlockColors()), "modelRenderer");
} catch (Exception e) {
FlwImpl.LOGGER.error("Failed to initialize vanilla BlockRenderDispatcher!", e);
return defaultDispatcher;
From cbdc3189e23c7809f07a0adfcf4d2f1e1b5fa700 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 12 May 2024 17:41:27 -0400
Subject: [PATCH 03/67] fixme fixedme fixed...
---
.../dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index dadebbbf1..86e87717f 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -113,7 +113,6 @@ abstract class LevelRendererMixin {
flywheel$dispatch(RenderStage.AFTER_PARTICLES);
}
- //fixme take a look over if this is still needed
@Group(name = "onStage$afterParticles")
@Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;)V", shift = Shift.AFTER))
private void flywheel$onStage$afterParticles$forge(CallbackInfo ci) {
From 68d40b9a7d624b407905f36fa6e1aac1b907331d Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 12 May 2024 20:10:35 -0400
Subject: [PATCH 04/67] port rebase fixes
---
.../flywheel/impl/FlywheelForge.java | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
index 7eb1fd24f..c0892ed56 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
@@ -11,7 +11,6 @@
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
-import net.neoforged.fml.event.lifecycle.FMLLoadCompleteEvent;
import net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent;
import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent;
import net.neoforged.neoforge.common.NeoForge;
@@ -42,24 +41,6 @@
import dev.engine_room.flywheel.lib.util.LevelAttached;
import net.minecraft.client.Minecraft;
import net.minecraft.commands.synchronization.ArgumentTypeInfos;
-import net.minecraftforge.api.distmarker.Dist;
-import net.minecraftforge.client.event.CustomizeGuiOverlayEvent;
-import net.minecraftforge.client.event.RegisterClientReloadListenersEvent;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.TickEvent;
-import net.minecraftforge.event.entity.EntityJoinLevelEvent;
-import net.minecraftforge.event.entity.EntityLeaveLevelEvent;
-import net.minecraftforge.event.level.LevelEvent;
-import net.minecraftforge.eventbus.api.IEventBus;
-import net.minecraftforge.fml.CrashReportCallables;
-import net.minecraftforge.fml.DistExecutor;
-import net.minecraftforge.fml.LogicalSide;
-import net.minecraftforge.fml.ModLoadingContext;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
-import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegisterEvent;
@Mod(Flywheel.ID)
public final class FlywheelForge {
From 25a55227e41f849317398e17861d3fc2238e1038 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Tue, 4 Jun 2024 15:50:00 -0400
Subject: [PATCH 05/67] fix deps
---
gradle.properties | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index db47dc3ce..de2db2e5a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -29,9 +29,10 @@ fabric_loader_version = 0.15.10
fabric_api_version = 0.97.0+1.20.4
# Build dependency mod versions
-sodium_version = mc1.20.1-0.5.8
-iris_version = 1.6.17+1.20.1
-embeddium_version = 0.3.9+mc1.20.1
+sodium_version = mc1.20.4-0.5.8
+iris_version = 1.7.0+1.20.4
+embeddium_version = 0.3.14+mc1.20.4
+# not on 1.20.4
oculus_version = 1.20.1-1.6.15a
# Publication info
From 4190ac72c5b6cc1303a4c4c93823cb1de43f791e Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 7 Jun 2024 16:00:21 -0400
Subject: [PATCH 06/67] fix issues here and there
---
.../dev/engine_room/gradle/subproject/SubprojectPlugin.kt | 6 ++----
.../java/dev/engine_room/flywheel/impl/FlwCommands.java | 6 ++++--
.../java/dev/engine_room/flywheel/impl/FlywheelForge.java | 8 ++++----
.../engine_room/flywheel/impl/mixin/MinecraftMixin.java | 2 +-
.../flywheel/impl/mixin/sodium/SodiumMixinPlugin.java | 2 +-
forge/src/main/resources/META-INF/mods.toml | 8 --------
6 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
index 8398fa57e..e0c8ea1f1 100644
--- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
+++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
@@ -48,14 +48,12 @@ class SubprojectPlugin: Plugin {
}
}
- @Suppress("UnstableApiUsage")
private fun setupLoom(project: Project) {
val loom = project.the()
loom.silentMojangMappingsLicense()
- // FIXME y tho? :(
- loom.mixin.useLegacyMixinAp = true
- loom.mixin.defaultRefmapName = "flywheel.refmap.json"
+ //fixme is this still needed?
+// loom.mixin.defaultRefmapName = "flywheel.refmap.json"
}
private fun setupJava(project: Project) {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
index 830c0fb0f..a9bf69df4 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
@@ -17,6 +17,8 @@
import net.minecraft.world.entity.Entity;
import net.neoforged.neoforge.client.event.RegisterClientCommandsEvent;
import net.neoforged.neoforge.common.ModConfigSpec;
+import net.neoforged.neoforge.common.ModConfigSpec.BooleanValue;
+import net.neoforged.neoforge.common.ModConfigSpec.ConfigValue;
public final class FlwCommands {
private FlwCommands() {
@@ -25,7 +27,7 @@ private FlwCommands() {
public static void registerClientCommands(RegisterClientCommandsEvent event) {
LiteralArgumentBuilder command = Commands.literal("flywheel");
- ModConfigSpec.ConfigValue backendValue = ForgeFlwConfig.INSTANCE.client.backend;
+ ConfigValue backendValue = ForgeFlwConfig.INSTANCE.client.backend;
command.then(Commands.literal("backend")
.executes(context -> {
Backend backend = BackendManager.getBackend();
@@ -55,7 +57,7 @@ public static void registerClientCommands(RegisterClientCommandsEvent event) {
return Command.SINGLE_SUCCESS;
})));
- ModConfigSpec.BooleanValue limitUpdatesValue = ForgeFlwConfig.INSTANCE.client.limitUpdates;
+ BooleanValue limitUpdatesValue = ForgeFlwConfig.INSTANCE.client.limitUpdates;
command.then(Commands.literal("limitUpdates")
.executes(context -> {
if (limitUpdatesValue.get()) {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
index c0892ed56..cc1c871a3 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
@@ -6,6 +6,7 @@
import net.neoforged.fml.CrashReportCallables;
import net.neoforged.fml.DistExecutor;
import net.neoforged.fml.LogicalSide;
+import net.neoforged.fml.ModContainer;
import net.neoforged.fml.ModLoadingContext;
import net.neoforged.fml.common.Mod;
@@ -47,11 +48,10 @@ public final class FlywheelForge {
@UnknownNullability
private static ArtifactVersion version;
- public FlywheelForge(IEventBus modEventBus) {
+ public FlywheelForge(IEventBus modEventBus, ModContainer modContainer) {
ModLoadingContext modLoadingContext = ModLoadingContext.get();
- version = modLoadingContext
- .getActiveContainer()
+ version = modContainer
.getModInfo()
.getVersion();
@@ -97,7 +97,7 @@ private static void registerImplEventListeners(IEventBus forgeEventBus, IEventBu
FlwDebugInfo.addDebugInfo(minecraft, e.getRight());
});
- modEventBus.addListener((EndClientResourceReloadEvent e) -> BackendManagerImpl.onEndClientResourceReload(e.error() != null));
+ modEventBus.addListener((EndClientResourceReloadEvent e) -> BackendManagerImpl.onEndClientResourceReload(e.error().isPresent()));
modEventBus.addListener((FMLCommonSetupEvent e) -> {
ArgumentTypeInfos.registerByClass(BackendArgument.class, BackendArgument.INFO);
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index 2305ba681..282e0f7e6 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -22,7 +22,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.server.packs.resources.ReloadableResourceManager;
-@Mixin(value = Minecraft.class, remap = false)
+@Mixin(Minecraft.class)
abstract class MinecraftMixin {
@Shadow
@Final
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
index 5ee303ff0..d5dda574a 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
@@ -13,7 +13,7 @@
import com.google.common.base.Suppliers;
public class SodiumMixinPlugin implements IMixinConfigPlugin {
- private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("rubidium") != null);
+ private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("embeddium") != null);
@Override
public void onLoad(String mixinPackage) {
diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml
index 546372adf..0fe5ee7c5 100644
--- a/forge/src/main/resources/META-INF/mods.toml
+++ b/forge/src/main/resources/META-INF/mods.toml
@@ -32,11 +32,3 @@ modId = "neoforge"
type = "required"
versionRange = "${neoforge_version_range}"
side = "CLIENT"
-
-# Breaks dependency
-[[dependencies.${mod_id}]]
-modId = "rubidium"
-type = "incompatible"
-reason = "mixin crash with any version of rubidium under 0.7.0"
-versionRange = "[0.7.0,)"
-side = "CLIENT"
From 52d99e3a6195fd716f7d6a8139fcccb024944776 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 7 Jun 2024 16:02:09 -0400
Subject: [PATCH 07/67] fix param name
---
.../dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index 282e0f7e6..174a9a766 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -36,12 +36,12 @@ abstract class MinecraftMixin {
}
@Inject(method = "lambda$new$7", at = @At("HEAD"))
- private void flywheel$onEndInitialResourceReload(@Coerce Object minecraft$gameloadcookie, Optional error, CallbackInfo ci) {
+ private void flywheel$onEndInitialResourceReload(@Coerce Object gameLoadCookie, Optional error, CallbackInfo ci) {
ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error));
}
@Inject(method = "lambda$reloadResourcePacks$39", at = @At("HEAD"))
- private void flywheel$onEndManualResourceReload(boolean bl, @Coerce Object minecraft$gameloadcookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
+ private void flywheel$onEndManualResourceReload(boolean bl, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
}
}
From 47e80a66a03954ad2b2aa100ddde87dec433472e Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 7 Jun 2024 16:15:10 -0400
Subject: [PATCH 08/67] optimize imports
---
.../api/event/ReloadLevelRendererEvent.java | 3 +-
.../flywheel/api/event/RenderStageEvent.java | 3 +-
.../lib/model/baked/BakedModelBufferer.java | 5 +--
.../model/baked/ForgeBakedModelBuilder.java | 3 +-
.../model/baked/ForgeBlockModelBuilder.java | 3 +-
.../baked/ForgeMultiBlockModelBuilder.java | 3 +-
.../model/baked/PartialModelEventHandler.java | 3 +-
.../flywheel/impl/FlwCommands.java | 1 -
.../flywheel/impl/FlwImplXplatImpl.java | 3 +-
.../flywheel/impl/FlwLibXplatImpl.java | 5 +--
.../flywheel/impl/FlywheelForge.java | 41 ++++++++-----------
.../flywheel/impl/ForgeFlwConfig.java | 7 ++--
.../flywheel/impl/mixin/MinecraftMixin.java | 5 +--
.../impl/mixin/sodium/SodiumMixinPlugin.java | 4 +-
14 files changed, 34 insertions(+), 55 deletions(-)
diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java
index a6a9ed00c..ae4a0077f 100644
--- a/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java
+++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java
@@ -1,10 +1,9 @@
package dev.engine_room.flywheel.api.event;
-import net.neoforged.bus.api.Event;
-
import org.jetbrains.annotations.Nullable;
import net.minecraft.client.multiplayer.ClientLevel;
+import net.neoforged.bus.api.Event;
/**
* This event is posted to the Forge event bus.
diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
index d9c27aad7..1062e93e8 100644
--- a/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
+++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
@@ -1,7 +1,5 @@
package dev.engine_room.flywheel.api.event;
-import net.neoforged.bus.api.Event;
-
import org.joml.Matrix4f;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -9,6 +7,7 @@
import net.minecraft.client.Camera;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.RenderBuffers;
+import net.neoforged.bus.api.Event;
/**
* This event is posted to the Forge event bus.
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
index 4453ec5b8..8709e20a1 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
@@ -3,9 +3,6 @@
import java.util.Iterator;
import java.util.function.Function;
-import net.neoforged.neoforge.client.ChunkRenderTypeSet;
-import net.neoforged.neoforge.client.model.data.ModelData;
-
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;
@@ -23,6 +20,8 @@
import net.minecraft.world.level.block.RenderShape;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
+import net.neoforged.neoforge.client.ChunkRenderTypeSet;
+import net.neoforged.neoforge.client.model.data.ModelData;
final class BakedModelBufferer {
static final RenderType[] CHUNK_LAYERS = RenderType.chunkBufferLayers().toArray(RenderType[]::new);
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
index 3d9cf4885..dccefefec 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
@@ -2,8 +2,6 @@
import java.util.function.BiFunction;
-import net.neoforged.neoforge.client.model.data.ModelData;
-
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -18,6 +16,7 @@
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
+import net.neoforged.neoforge.client.model.data.ModelData;
public final class ForgeBakedModelBuilder extends BakedModelBuilder {
@Nullable
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
index d09730dc7..fabe098f6 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
@@ -2,8 +2,6 @@
import java.util.function.BiFunction;
-import net.neoforged.neoforge.client.model.data.ModelData;
-
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -16,6 +14,7 @@
import net.minecraft.client.renderer.RenderType;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.state.BlockState;
+import net.neoforged.neoforge.client.model.data.ModelData;
public final class ForgeBlockModelBuilder extends BlockModelBuilder {
@Nullable
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
index 9bbf47079..e8fd93325 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
@@ -3,8 +3,6 @@
import java.util.function.BiFunction;
import java.util.function.Function;
-import net.neoforged.neoforge.client.model.data.ModelData;
-
import org.jetbrains.annotations.Nullable;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -17,6 +15,7 @@
import net.minecraft.client.renderer.RenderType;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockAndTintGetter;
+import net.neoforged.neoforge.client.model.data.ModelData;
public final class ForgeMultiBlockModelBuilder extends MultiBlockModelBuilder {
@Nullable
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
index f84fc5ff3..0e2189468 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
@@ -2,12 +2,11 @@
import java.util.Map;
-import net.neoforged.neoforge.client.event.ModelEvent;
-
import org.jetbrains.annotations.ApiStatus;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
+import net.neoforged.neoforge.client.event.ModelEvent;
@ApiStatus.Internal
public final class PartialModelEventHandler {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
index a9bf69df4..3ff42e291 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
@@ -16,7 +16,6 @@
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
import net.neoforged.neoforge.client.event.RegisterClientCommandsEvent;
-import net.neoforged.neoforge.common.ModConfigSpec;
import net.neoforged.neoforge.common.ModConfigSpec.BooleanValue;
import net.neoforged.neoforge.common.ModConfigSpec.ConfigValue;
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
index cddd85e4e..dcbcce71c 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
@@ -1,7 +1,5 @@
package dev.engine_room.flywheel.impl;
-import net.neoforged.neoforge.common.NeoForge;
-
import org.jetbrains.annotations.Nullable;
import dev.engine_room.flywheel.api.event.BeginFrameEvent;
@@ -10,6 +8,7 @@
import dev.engine_room.flywheel.api.event.RenderStage;
import dev.engine_room.flywheel.api.event.RenderStageEvent;
import net.minecraft.client.multiplayer.ClientLevel;
+import net.neoforged.neoforge.common.NeoForge;
public class FlwImplXplatImpl implements FlwImplXplat {
@Override
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
index c4bc9ffae..2557efc45 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
@@ -2,9 +2,6 @@
import java.lang.reflect.Field;
-import net.neoforged.fml.ModList;
-import net.neoforged.fml.util.ObfuscationReflectionHelper;
-
import org.jetbrains.annotations.Nullable;
import dev.engine_room.flywheel.lib.internal.FlwLibXplat;
@@ -23,6 +20,8 @@
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.state.BlockState;
+import net.neoforged.fml.ModList;
+import net.neoforged.fml.util.ObfuscationReflectionHelper;
public class FlwLibXplatImpl implements FlwLibXplat {
@Override
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
index cc1c871a3..e60ade889 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
@@ -1,5 +1,22 @@
package dev.engine_room.flywheel.impl;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.jetbrains.annotations.UnknownNullability;
+
+import dev.engine_room.flywheel.api.Flywheel;
+import dev.engine_room.flywheel.api.event.BeginFrameEvent;
+import dev.engine_room.flywheel.api.event.EndClientResourceReloadEvent;
+import dev.engine_room.flywheel.api.event.ReloadLevelRendererEvent;
+import dev.engine_room.flywheel.api.event.RenderStageEvent;
+import dev.engine_room.flywheel.backend.compile.FlwProgramsReloader;
+import dev.engine_room.flywheel.backend.engine.uniform.Uniforms;
+import dev.engine_room.flywheel.impl.visualization.VisualizationEventHandler;
+import dev.engine_room.flywheel.lib.model.ModelCache;
+import dev.engine_room.flywheel.lib.model.ModelHolder;
+import dev.engine_room.flywheel.lib.model.baked.PartialModelEventHandler;
+import dev.engine_room.flywheel.lib.util.LevelAttached;
+import net.minecraft.client.Minecraft;
+import net.minecraft.commands.synchronization.ArgumentTypeInfos;
import net.minecraft.core.registries.Registries;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
@@ -8,41 +25,17 @@
import net.neoforged.fml.LogicalSide;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.ModLoadingContext;
-
import net.neoforged.fml.common.Mod;
-
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent;
import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent;
import net.neoforged.neoforge.common.NeoForge;
-
import net.neoforged.neoforge.event.TickEvent;
-
import net.neoforged.neoforge.event.entity.EntityJoinLevelEvent;
-
import net.neoforged.neoforge.event.entity.EntityLeaveLevelEvent;
-
import net.neoforged.neoforge.event.level.LevelEvent;
import net.neoforged.neoforge.registries.RegisterEvent;
-import org.apache.maven.artifact.versioning.ArtifactVersion;
-import org.jetbrains.annotations.UnknownNullability;
-
-import dev.engine_room.flywheel.api.Flywheel;
-import dev.engine_room.flywheel.api.event.BeginFrameEvent;
-import dev.engine_room.flywheel.api.event.EndClientResourceReloadEvent;
-import dev.engine_room.flywheel.api.event.ReloadLevelRendererEvent;
-import dev.engine_room.flywheel.api.event.RenderStageEvent;
-import dev.engine_room.flywheel.backend.compile.FlwProgramsReloader;
-import dev.engine_room.flywheel.backend.engine.uniform.Uniforms;
-import dev.engine_room.flywheel.impl.visualization.VisualizationEventHandler;
-import dev.engine_room.flywheel.lib.model.ModelCache;
-import dev.engine_room.flywheel.lib.model.ModelHolder;
-import dev.engine_room.flywheel.lib.model.baked.PartialModelEventHandler;
-import dev.engine_room.flywheel.lib.util.LevelAttached;
-import net.minecraft.client.Minecraft;
-import net.minecraft.commands.synchronization.ArgumentTypeInfos;
-
@Mod(Flywheel.ID)
public final class FlywheelForge {
@UnknownNullability
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
index 60832455d..9ef397337 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
@@ -1,9 +1,5 @@
package dev.engine_room.flywheel.impl;
-import net.neoforged.fml.ModLoadingContext;
-import net.neoforged.fml.config.ModConfig;
-import net.neoforged.neoforge.common.ModConfigSpec;
-
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.Nullable;
@@ -11,6 +7,9 @@
import dev.engine_room.flywheel.api.backend.BackendManager;
import net.minecraft.ResourceLocationException;
import net.minecraft.resources.ResourceLocation;
+import net.neoforged.fml.ModLoadingContext;
+import net.neoforged.fml.config.ModConfig;
+import net.neoforged.neoforge.common.ModConfigSpec;
public class ForgeFlwConfig implements FlwConfig {
public static final ForgeFlwConfig INSTANCE = new ForgeFlwConfig();
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index 174a9a766..a6c82dd10 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -4,8 +4,6 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
-import net.neoforged.fml.ModLoader;
-
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -15,12 +13,11 @@
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import com.mojang.realmsclient.client.RealmsClient;
-
import dev.engine_room.flywheel.api.event.EndClientResourceReloadEvent;
import dev.engine_room.flywheel.impl.FlwImpl;
import net.minecraft.client.Minecraft;
import net.minecraft.server.packs.resources.ReloadableResourceManager;
+import net.neoforged.fml.ModLoader;
@Mixin(Minecraft.class)
abstract class MinecraftMixin {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
index d5dda574a..c2fe3df02 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
@@ -4,14 +4,14 @@
import java.util.Set;
import java.util.function.Supplier;
-import net.neoforged.fml.loading.LoadingModList;
-
import org.objectweb.asm.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
import com.google.common.base.Suppliers;
+import net.neoforged.fml.loading.LoadingModList;
+
public class SodiumMixinPlugin implements IMixinConfigPlugin {
private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("embeddium") != null);
From 349e7b3cb319bca9901c3ef9dd296ab9e2c5e71c Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 7 Jun 2024 16:24:52 -0400
Subject: [PATCH 09/67] fix mixin
---
.../flywheel/impl/mixin/fabric/MinecraftMixin.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
index 6ff63b33d..c07e7b037 100644
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
+++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
@@ -22,8 +22,8 @@ abstract class MinecraftMixin {
}
}
- @Inject(method = "clearClientLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
- private void flywheel$onClearLevel(CallbackInfo ci) {
+ @Inject(method = "disconnect(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At("HEAD"))
+ private void flywheel$onDisconnect(CallbackInfo ci) {
if (level != null) {
LevelAttached.invalidateLevel(level);
}
From 045771dce540ce81b07a0be001d0defe6806d3d2 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 7 Jun 2024 16:46:30 -0400
Subject: [PATCH 10/67] fix param names
---
.../dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index a6c82dd10..b88686cd8 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -38,7 +38,7 @@ abstract class MinecraftMixin {
}
@Inject(method = "lambda$reloadResourcePacks$39", at = @At("HEAD"))
- private void flywheel$onEndManualResourceReload(boolean bl, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
+ private void flywheel$onEndManualResourceReload(boolean recovery, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
}
}
From a9127bee1c2987584db81a03cdef391e59ad8f42 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 7 Jun 2024 16:57:02 -0400
Subject: [PATCH 11/67] fix instance textures
---
.../engine_room/flywheel/lib/model/part/ModelPartConverter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/ModelPartConverter.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/ModelPartConverter.java
index 637c5523e..eee979b09 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/ModelPartConverter.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/ModelPartConverter.java
@@ -53,7 +53,7 @@ public interface TextureMapper {
void map(Vector2f uv);
static TextureMapper toSprite(TextureAtlasSprite sprite) {
- return uv -> uv.set(sprite.getU(uv.x * 16), sprite.getV(uv.y * 16));
+ return uv -> uv.set(sprite.getU(uv.x), sprite.getV(uv.y));
}
}
From eccbfbc64921eb497e90404e83ccf446f16b86aa Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Wed, 10 Jul 2024 10:24:12 -0400
Subject: [PATCH 12/67] build: update dependencies
---
gradle.properties | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 35192faf3..a7320e1e0 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -12,30 +12,30 @@ mod_issues = https://github.com/Jozufozu/Flywheel/issues
mod_homepage = https://github.com/Jozufozu/Flywheel
# Mod dependency declarations
-minecraft_semver_version_range = >=1.20.4 <1.20.5
-minecraft_maven_version_range = [1.20.4,1.20.5)
-fabric_api_version_range = >=0.97.0
-neoforge_version_range = [20.4.234,)
+minecraft_semver_version_range = >=1.21 <1.21.1
+minecraft_maven_version_range = [1.21,1.21.0)
+fabric_api_version_range = >=0.100.6
+neoforge_version_range = [21.0.79-beta,)
# General build dependency versions
-java_version = 17
+java_version = 21
# FIXME: This doesn't do anything.
# arch_loom_version = 1.6-SNAPSHOT
-parchment_version = 2024.04.14
+parchment_version = 2024.07.07
# Minecraft build dependency versions
-minecraft_version = 1.20.4
-neoforge_version = 20.4.234
-fabric_loader_version = 0.15.10
-fabric_api_version = 0.97.0+1.20.4
+minecraft_version = 1.21
+neoforge_version = 21.0.79-beta
+fabric_loader_version = 0.15.11
+fabric_api_version = 0.100.6+1.21
# Build dependency mod versions
-sodium_version = mc1.20.4-0.5.8
-iris_version = 1.7.0+1.20.4
-embeddium_version = 0.3.14+mc1.20.4
-# not on 1.20.4
+sodium_version = mc1.21-0.5.11
+iris_version = 1.7.3+1.21
+embeddium_version = 1.0.4+mc1.21
+# no 1.21 :(
oculus_version = 1.20.1-1.6.15a
# Publication info
group = dev.engine_room.flywheel
-artifact_minecraft_version = 1.20.4
+artifact_minecraft_version = 1.21
From d587ec0ec8b7763f60d8d07cf136e9e4db97047f Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Wed, 10 Jul 2024 11:27:18 -0400
Subject: [PATCH 13/67] 1.21 Port I
---
.github/workflows/build.yml | 2 +-
.../engine_room/flywheel/api/Flywheel.java | 2 +-
.../flywheel/lib/material/Materials.java | 2 +-
.../flywheel/lib/model/baked/MeshHelper.java | 8 +--
.../lib/model/baked/PartialModel.java | 8 +--
.../baked/TransformingVertexConsumer.java | 57 ++++++-------------
.../flywheel/lib/model/part/VertexWriter.java | 44 ++++++--------
.../flywheel/lib/util/ResourceUtil.java | 2 +-
.../lib/visual/component/ShadowComponent.java | 2 +-
.../lib/model/baked/BakedModelBufferer.java | 4 +-
.../lib/model/baked/UniversalMeshEmitter.java | 51 ++++++-----------
.../flywheel/impl/FabricFlwConfig.java | 2 +-
.../lib/model/baked/BakedModelBufferer.java | 4 +-
.../flywheel/lib/model/baked/MeshEmitter.java | 37 +++---------
.../model/baked/PartialModelEventHandler.java | 4 +-
.../flywheel/impl/FlywheelForge.java | 21 ++++---
.../flywheel/impl/ForgeFlwConfig.java | 6 +-
.../flywheel/impl/mixin/MinecraftMixin.java | 6 +-
.../sodium/ChunkBuilderMeshingTaskMixin.java | 4 +-
19 files changed, 102 insertions(+), 164 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dd1169eae..6a538b35b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
java: [
- 17 # Current Java LTS & minimum supported by Minecraft
+ 21 # Current Java LTS & minimum supported by Minecraft
]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
diff --git a/common/src/api/java/dev/engine_room/flywheel/api/Flywheel.java b/common/src/api/java/dev/engine_room/flywheel/api/Flywheel.java
index ef18b8b27..8193fa8e5 100644
--- a/common/src/api/java/dev/engine_room/flywheel/api/Flywheel.java
+++ b/common/src/api/java/dev/engine_room/flywheel/api/Flywheel.java
@@ -9,6 +9,6 @@ private Flywheel() {
}
public static ResourceLocation rl(String path) {
- return new ResourceLocation(ID, path);
+ return ResourceLocation.fromNamespaceAndPath(ID, path);
}
}
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/material/Materials.java b/common/src/lib/java/dev/engine_room/flywheel/lib/material/Materials.java
index 2cab44864..9b696f001 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/material/Materials.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/material/Materials.java
@@ -6,7 +6,7 @@
import net.minecraft.resources.ResourceLocation;
public final class Materials {
- private static final ResourceLocation MINECART_LOCATION = new ResourceLocation("textures/entity/minecart.png");
+ private static final ResourceLocation MINECART_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/minecart.png");
public static final Material CHUNK_SOLID_SHADED = SimpleMaterial.builder()
.build();
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshHelper.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshHelper.java
index e6326600b..5558a6316 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshHelper.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshHelper.java
@@ -5,7 +5,7 @@
import org.jetbrains.annotations.Nullable;
import org.lwjgl.system.MemoryUtil;
-import com.mojang.blaze3d.vertex.BufferBuilder;
+import com.mojang.blaze3d.vertex.MeshData;
import dev.engine_room.flywheel.api.vertex.VertexView;
import dev.engine_room.flywheel.lib.memory.MemoryBlock;
@@ -16,15 +16,15 @@ final class MeshHelper {
private MeshHelper() {
}
- public static SimpleMesh blockVerticesToMesh(BufferBuilder.RenderedBuffer buffer, @Nullable String meshDescriptor) {
- BufferBuilder.DrawState drawState = buffer.drawState();
+ public static SimpleMesh blockVerticesToMesh(MeshData data, @Nullable String meshDescriptor) {
+ MeshData.DrawState drawState = data.drawState();
int vertexCount = drawState.vertexCount();
long srcStride = drawState.format().getVertexSize();
VertexView vertexView = new NoOverlayVertexView();
long dstStride = vertexView.stride();
- ByteBuffer src = buffer.vertexBuffer();
+ ByteBuffer src = data.vertexBuffer();
MemoryBlock dst = MemoryBlock.malloc((long) vertexCount * dstStride);
long srcPtr = MemoryUtil.memAddress(src);
long dstPtr = dst.ptr();
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java
index ba96c09c0..4b0d375f6 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java
@@ -4,7 +4,7 @@
import java.util.List;
import net.minecraft.client.resources.model.BakedModel;
-import net.minecraft.resources.ResourceLocation;
+import net.minecraft.client.resources.model.ModelResourceLocation;
/**
* A helper class for loading and accessing JSON models not directly used by any blocks or items.
@@ -19,10 +19,10 @@ public class PartialModel {
static final List ALL = new ArrayList<>();
static boolean tooLate = false;
- protected final ResourceLocation modelLocation;
+ protected final ModelResourceLocation modelLocation;
protected BakedModel bakedModel;
- public PartialModel(ResourceLocation modelLocation) {
+ public PartialModel(ModelResourceLocation modelLocation) {
if (tooLate) {
throw new RuntimeException("Attempted to create PartialModel with location '" + modelLocation + "' after start of initial resource reload!");
}
@@ -34,7 +34,7 @@ public PartialModel(ResourceLocation modelLocation) {
}
}
- public ResourceLocation getLocation() {
+ public ModelResourceLocation getLocation() {
return modelLocation;
}
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/TransformingVertexConsumer.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/TransformingVertexConsumer.java
index d40a4df79..0e8b91380 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/TransformingVertexConsumer.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/TransformingVertexConsumer.java
@@ -26,67 +26,46 @@ public void clear() {
}
@Override
- public VertexConsumer vertex(double x, double y, double z) {
+ public VertexConsumer addVertex(float x, float y, float z) {
Matrix4f matrix = poseStack.last().pose();
- float fx = (float) x;
- float fy = (float) y;
- float fz = (float) z;
- delegate.vertex(
- MatrixMath.transformPositionX(matrix, fx, fy, fz),
- MatrixMath.transformPositionY(matrix, fx, fy, fz),
- MatrixMath.transformPositionZ(matrix, fx, fy, fz));
+ delegate.addVertex(
+ MatrixMath.transformPositionX(matrix, x, y, z),
+ MatrixMath.transformPositionY(matrix, x, y, z),
+ MatrixMath.transformPositionZ(matrix, x, y, z));
return this;
}
@Override
- public VertexConsumer color(int red, int green, int blue, int alpha) {
- delegate.color(red, green, blue, alpha);
+ public VertexConsumer setColor(int red, int green, int blue, int alpha) {
+ delegate.setColor(red, green, blue, alpha);
return this;
}
@Override
- public VertexConsumer uv(float u, float v) {
- delegate.uv(u, v);
+ public VertexConsumer setUv(float u, float v) {
+ delegate.setUv(u, v);
return this;
}
@Override
- public VertexConsumer overlayCoords(int u, int v) {
- delegate.overlayCoords(u, v);
+ public VertexConsumer setUv1(int u, int v) {
+ delegate.setUv1(u, v);
return this;
}
@Override
- public VertexConsumer uv2(int u, int v) {
- delegate.uv2(u, v);
+ public VertexConsumer setUv2(int u, int v) {
+ delegate.setUv2(u, v);
return this;
}
@Override
- public VertexConsumer normal(float x, float y, float z) {
+ public VertexConsumer setNormal(float x, float y, float z) {
Matrix3f matrix = poseStack.last().normal();
- float fx = (float) x;
- float fy = (float) y;
- float fz = (float) z;
- delegate.normal(
- MatrixMath.transformNormalX(matrix, fx, fy, fz),
- MatrixMath.transformNormalY(matrix, fx, fy, fz),
- MatrixMath.transformNormalZ(matrix, fx, fy, fz));
+ delegate.setNormal(
+ MatrixMath.transformNormalX(matrix, x, y, z),
+ MatrixMath.transformNormalY(matrix, x, y, z),
+ MatrixMath.transformNormalZ(matrix, x, y, z));
return this;
}
-
- @Override
- public void endVertex() {
- delegate.endVertex();
- }
-
- @Override
- public void defaultColor(int red, int green, int blue, int alpha) {
- delegate.defaultColor(red, green, blue, alpha);
- }
-
- @Override
- public void unsetDefaultColor() {
- delegate.unsetDefaultColor();
- }
}
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/VertexWriter.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/VertexWriter.java
index f8b9aa5f6..b76613cb3 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/VertexWriter.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/part/VertexWriter.java
@@ -34,25 +34,24 @@ public void setTextureMapper(@Nullable TextureMapper mapper) {
}
@Override
- public VertexConsumer vertex(double x, double y, double z) {
+ public VertexConsumer addVertex(float x, float y, float z) {
if (!filledPosition) {
long ptr = vertexPtr();
- MemoryUtil.memPutFloat(ptr, (float) x);
- MemoryUtil.memPutFloat(ptr + 4, (float) y);
- MemoryUtil.memPutFloat(ptr + 8, (float) z);
+ MemoryUtil.memPutFloat(ptr, x);
+ MemoryUtil.memPutFloat(ptr + 4, y);
+ MemoryUtil.memPutFloat(ptr + 8, z);
filledPosition = true;
}
- return this;
+ return endVertexIfNeeded();
}
@Override
- public VertexConsumer color(int red, int green, int blue, int alpha) {
- // ignore color
- return this;
+ public VertexConsumer setColor(int red, int green, int blue, int alpha) {
+ return endVertexIfNeeded();
}
@Override
- public VertexConsumer uv(float u, float v) {
+ public VertexConsumer setUv(float u, float v) {
if (!filledTexture) {
if (textureMapper != null) {
uvVec.set(u, v);
@@ -66,23 +65,23 @@ public VertexConsumer uv(float u, float v) {
MemoryUtil.memPutFloat(ptr + 16, v);
filledTexture = true;
}
- return this;
+ return endVertexIfNeeded();
}
@Override
- public VertexConsumer overlayCoords(int u, int v) {
+ public VertexConsumer setUv1(int u, int v) {
// ignore overlay
- return this;
+ return endVertexIfNeeded();
}
@Override
- public VertexConsumer uv2(int u, int v) {
+ public VertexConsumer setUv2(int u, int v) {
// ignore light
- return this;
+ return endVertexIfNeeded();
}
@Override
- public VertexConsumer normal(float x, float y, float z) {
+ public VertexConsumer setNormal(float x, float y, float z) {
if (!filledNormal) {
long ptr = vertexPtr();
MemoryUtil.memPutByte(ptr + 20, RenderMath.nb(x));
@@ -90,13 +89,12 @@ public VertexConsumer normal(float x, float y, float z) {
MemoryUtil.memPutByte(ptr + 22, RenderMath.nb(z));
filledNormal = true;
}
- return this;
+ return endVertexIfNeeded();
}
- @Override
- public void endVertex() {
+ public VertexConsumer endVertexIfNeeded() {
if (!filledPosition || !filledTexture || !filledNormal) {
- throw new IllegalStateException("Not filled all elements of the vertex");
+ return this;
}
filledPosition = false;
@@ -109,14 +107,8 @@ public void endVertex() {
if (byteSize > capacity) {
data = data.realloc(capacity * 2);
}
- }
-
- @Override
- public void defaultColor(int red, int green, int blue, int alpha) {
- }
- @Override
- public void unsetDefaultColor() {
+ return this;
}
private long vertexPtr() {
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java b/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java
index 9eb0f1419..0bc16e618 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java
@@ -30,7 +30,7 @@ public static ResourceLocation parseFlywheelDefault(String location) {
}
}
- return new ResourceLocation(namespace, path);
+ return ResourceLocation.fromNamespaceAndPath(namespace, path);
}
/**
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java b/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
index 337be2128..fe411ddeb 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
@@ -44,7 +44,7 @@
*/
public class ShadowComponent implements EntityComponent {
private static final Material SHADOW_MATERIAL = SimpleMaterial.builder()
- .texture(new ResourceLocation("textures/misc/shadow.png"))
+ .texture(ResourceLocation.withDefaultNamespace("textures/misc/shadow.png"))
.mipmap(false)
.polygonOffset(true) // vanilla shadows use "view offset" but this seems to work fine
.transparency(Transparency.TRANSLUCENT)
diff --git a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
index 2f8a09ca6..349b46164 100644
--- a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
+++ b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
@@ -4,7 +4,7 @@
import org.jetbrains.annotations.Nullable;
-import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;
+import com.mojang.blaze3d.vertex.MeshData;
import com.mojang.blaze3d.vertex.PoseStack;
import it.unimi.dsi.fastutil.objects.Reference2ReferenceMap;
@@ -129,7 +129,7 @@ public static void bufferMultiBlock(BlockRenderDispatcher renderDispatcher, Iter
}
public interface ResultConsumer {
- void accept(RenderType renderType, boolean shaded, RenderedBuffer data);
+ void accept(RenderType renderType, boolean shaded, MeshData data);
}
private static class ThreadLocalObjects {
diff --git a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/UniversalMeshEmitter.java b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/UniversalMeshEmitter.java
index feb560bcc..5547b4791 100644
--- a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/UniversalMeshEmitter.java
+++ b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/UniversalMeshEmitter.java
@@ -56,69 +56,54 @@ private void prepareForGeometry(RenderMaterial material) {
}
@Override
- public VertexConsumer vertex(double x, double y, double z) {
- currentDelegate.vertex(x, y, z);
+ public VertexConsumer addVertex(float x, float y, float z) {
+ currentDelegate.addVertex(x, y, z);
return this;
}
@Override
- public VertexConsumer color(int red, int green, int blue, int alpha) {
- currentDelegate.color(red, green, blue, alpha);
+ public VertexConsumer setColor(int red, int green, int blue, int alpha) {
+ currentDelegate.setColor(red, green, blue, alpha);
return this;
}
@Override
- public VertexConsumer uv(float u, float v) {
- currentDelegate.uv(u, v);
+ public VertexConsumer setUv(float u, float v) {
+ currentDelegate.setUv(u, v);
return this;
}
@Override
- public VertexConsumer overlayCoords(int u, int v) {
- currentDelegate.overlayCoords(u, v);
+ public VertexConsumer setUv1(int u, int v) {
+ currentDelegate.setUv1(u, v);
return this;
}
@Override
- public VertexConsumer uv2(int u, int v) {
- currentDelegate.uv2(u, v);
+ public VertexConsumer setUv2(int u, int v) {
+ currentDelegate.setUv2(u, v);
return this;
}
@Override
- public VertexConsumer normal(float x, float y, float z) {
- currentDelegate.normal(x, y, z);
+ public VertexConsumer setNormal(float x, float y, float z) {
+ currentDelegate.setNormal(x, y, z);
return this;
}
@Override
- public void endVertex() {
- currentDelegate.endVertex();
+ public void addVertex(float x, float y, float z, int color, float u, float v, int packedOverlay, int packedLight, float normalX, float normalY, float normalZ) {
+ currentDelegate.addVertex(x, y, z, color, u, v, packedOverlay, packedLight, normalX, normalY, normalZ);
}
@Override
- public void defaultColor(int red, int green, int blue, int alpha) {
- currentDelegate.defaultColor(red, green, blue, alpha);
+ public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float red, float green, float blue, float alpha, int packedLight, int packedOverlay) {
+ currentDelegate.putBulkData(pose, quad, red, green, blue, alpha, packedLight, packedOverlay);
}
@Override
- public void unsetDefaultColor() {
- currentDelegate.unsetDefaultColor();
- }
-
- @Override
- public void vertex(float x, float y, float z, float red, float green, float blue, float alpha, float u, float v, int overlay, int light, float normalX, float normalY, float normalZ) {
- currentDelegate.vertex(x, y, z, red, green, blue, alpha, u, v, overlay, light, normalX, normalY, normalZ);
- }
-
- @Override
- public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float red, float green, float blue, int light, int overlay) {
- currentDelegate.putBulkData(pose, quad, red, green, blue, light, overlay);
- }
-
- @Override
- public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float[] brightnesses, float red, float green, float blue, int[] lights, int overlay, boolean readExistingColor) {
- currentDelegate.putBulkData(pose, quad, brightnesses, red, green, blue, lights, overlay, readExistingColor);
+ public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float[] brightness, float red, float green, float blue, float alpha, int[] lightmap, int packedOverlay, boolean readAlpha) {
+ currentDelegate.putBulkData(pose, quad, brightness, red, green, blue, alpha, lightmap, packedOverlay, readAlpha);
}
private class WrapperModel extends ForwardingBakedModel {
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java
index 9c9554917..b8a7cecc0 100644
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java
+++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java
@@ -99,7 +99,7 @@ private void readBackend(JsonObject object) {
if (backendJson instanceof JsonPrimitive primitive && primitive.isString()) {
var value = primitive.getAsString();
try {
- this.backend = Backend.REGISTRY.getOrThrow(new ResourceLocation(value));
+ this.backend = Backend.REGISTRY.getOrThrow(ResourceLocation.parse(value));
return;
} catch (ResourceLocationException e) {
msg = "'backend' value '" + value + "' is not a valid resource location";
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
index 8709e20a1..8f3bae0b0 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
@@ -5,7 +5,7 @@
import org.jetbrains.annotations.Nullable;
-import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer;
+import com.mojang.blaze3d.vertex.MeshData;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.ItemBlockRenderTypes;
@@ -130,7 +130,7 @@ public static void bufferMultiBlock(BlockRenderDispatcher renderDispatcher, Iter
}
public interface ResultConsumer {
- void accept(RenderType renderType, boolean shaded, RenderedBuffer data);
+ void accept(RenderType renderType, boolean shaded, MeshData data);
}
private static class ThreadLocalObjects {
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
index e878ae95c..c6e181a5c 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
@@ -63,12 +63,6 @@ private void emit() {
}
}
- @Override
- public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float red, float green, float blue, int light, int overlay) {
- prepareForGeometry(quad);
- bufferBuilder.putBulkData(pose, quad, red, green, blue, light, overlay);
- }
-
@Override
public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float red, float green, float blue, float alpha, int light, int overlay, boolean readExistingColor) {
prepareForGeometry(quad);
@@ -76,9 +70,9 @@ public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float red, float gr
}
@Override
- public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float[] brightnesses, float red, float green, float blue, int[] lights, int overlay, boolean readExistingColor) {
+ public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float red, float green, float blue, float alpha, int packedLight, int packedOverlay) {
prepareForGeometry(quad);
- bufferBuilder.putBulkData(pose, quad, brightnesses, red, green, blue, lights, overlay, readExistingColor);
+ bufferBuilder.putBulkData(pose, quad, red, green, blue, alpha, packedLight, packedOverlay);
}
@Override
@@ -88,47 +82,32 @@ public void putBulkData(PoseStack.Pose pose, BakedQuad quad, float[] brightnesse
}
@Override
- public VertexConsumer vertex(double x, double y, double z) {
- throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
- }
-
- @Override
- public VertexConsumer color(int red, int green, int blue, int alpha) {
- throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
- }
-
- @Override
- public VertexConsumer uv(float u, float v) {
- throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
- }
-
- @Override
- public VertexConsumer overlayCoords(int u, int v) {
+ public VertexConsumer addVertex(float x, float y, float z) {
throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
}
@Override
- public VertexConsumer uv2(int u, int v) {
+ public VertexConsumer setColor(int red, int green, int blue, int alpha) {
throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
}
@Override
- public VertexConsumer normal(float x, float y, float z) {
+ public VertexConsumer setUv(float u, float v) {
throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
}
@Override
- public void endVertex() {
+ public VertexConsumer setUv1(int u, int v) {
throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
}
@Override
- public void defaultColor(int red, int green, int blue, int alpha) {
+ public VertexConsumer setUv2(int u, int v) {
throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
}
@Override
- public void unsetDefaultColor() {
+ public VertexConsumer setNormal(float normalX, float normalY, float normalZ) {
throw new UnsupportedOperationException("MeshEmitter only supports putBulkData!");
}
}
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
index 0e2189468..f403b7c44 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
@@ -5,7 +5,7 @@
import org.jetbrains.annotations.ApiStatus;
import net.minecraft.client.resources.model.BakedModel;
-import net.minecraft.resources.ResourceLocation;
+import net.minecraft.client.resources.model.ModelResourceLocation;
import net.neoforged.neoforge.client.event.ModelEvent;
@ApiStatus.Internal
@@ -22,7 +22,7 @@ public static void onRegisterAdditional(ModelEvent.RegisterAdditional event) {
}
public static void onBakingCompleted(ModelEvent.BakingCompleted event) {
- Map models = event.getModels();
+ Map models = event.getModels();
for (PartialModel partial : PartialModel.ALL) {
partial.set(models.get(partial.getLocation()));
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
index e60ade889..dc8e93a72 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
@@ -1,5 +1,7 @@
package dev.engine_room.flywheel.impl;
+import java.util.function.Supplier;
+
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.jetbrains.annotations.UnknownNullability;
@@ -18,22 +20,20 @@
import net.minecraft.client.Minecraft;
import net.minecraft.commands.synchronization.ArgumentTypeInfos;
import net.minecraft.core.registries.Registries;
-import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.CrashReportCallables;
-import net.neoforged.fml.DistExecutor;
-import net.neoforged.fml.LogicalSide;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.ModLoadingContext;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
+import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent;
import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent;
import net.neoforged.neoforge.common.NeoForge;
-import net.neoforged.neoforge.event.TickEvent;
import net.neoforged.neoforge.event.entity.EntityJoinLevelEvent;
import net.neoforged.neoforge.event.entity.EntityLeaveLevelEvent;
import net.neoforged.neoforge.event.level.LevelEvent;
+import net.neoforged.neoforge.event.tick.LevelTickEvent;
import net.neoforged.neoforge.registries.RegisterEvent;
@Mod(Flywheel.ID)
@@ -50,9 +50,12 @@ public FlywheelForge(IEventBus modEventBus, ModContainer modContainer) {
IEventBus forgeEventBus = NeoForge.EVENT_BUS;
- ForgeFlwConfig.INSTANCE.registerSpecs(modLoadingContext);
+ ForgeFlwConfig.INSTANCE.registerSpecs(modContainer);
- DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> FlywheelForge.clientInit(forgeEventBus, modEventBus));
+ if (FMLLoader.getDist().isClient()) {
+ Supplier toRun = () -> () -> FlywheelForge.clientInit(forgeEventBus, modEventBus);
+ toRun.get().run();
+ }
}
private static void clientInit(IEventBus forgeEventBus, IEventBus modEventBus) {
@@ -67,10 +70,10 @@ private static void clientInit(IEventBus forgeEventBus, IEventBus modEventBus) {
private static void registerImplEventListeners(IEventBus forgeEventBus, IEventBus modEventBus) {
forgeEventBus.addListener((ReloadLevelRendererEvent e) -> BackendManagerImpl.onReloadLevelRenderer(e.level()));
- forgeEventBus.addListener((TickEvent.LevelTickEvent e) -> {
+ forgeEventBus.addListener((LevelTickEvent.Post e) -> {
// Make sure we don't tick on the server somehow.
- if (e.phase == TickEvent.Phase.END && e.side == LogicalSide.CLIENT) {
- VisualizationEventHandler.onClientTick(Minecraft.getInstance(), e.level);
+ if (FMLLoader.getDist().isClient()) {
+ VisualizationEventHandler.onClientTick(Minecraft.getInstance(), e.getLevel());
}
});
forgeEventBus.addListener((BeginFrameEvent e) -> VisualizationEventHandler.onBeginFrame(e.context()));
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
index 9ef397337..4ae9d449b 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
@@ -7,7 +7,7 @@
import dev.engine_room.flywheel.api.backend.BackendManager;
import net.minecraft.ResourceLocationException;
import net.minecraft.resources.ResourceLocation;
-import net.neoforged.fml.ModLoadingContext;
+import net.neoforged.fml.ModContainer;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.neoforge.common.ModConfigSpec;
@@ -38,7 +38,7 @@ public Backend backend() {
private static Backend parseBackend(String idStr) {
ResourceLocation backendId;
try {
- backendId = new ResourceLocation(idStr);
+ backendId = ResourceLocation.parse(idStr);
} catch (ResourceLocationException e) {
FlwImpl.CONFIG_LOGGER.warn("'backend' value '{}' is not a valid resource location", idStr);
return null;
@@ -63,7 +63,7 @@ public int workerThreads() {
return client.workerThreads.get();
}
- public void registerSpecs(ModLoadingContext context) {
+ public void registerSpecs(ModContainer context) {
context.registerConfig(ModConfig.Type.CLIENT, clientSpec);
}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index b88686cd8..fb83f05a7 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -17,7 +17,7 @@
import dev.engine_room.flywheel.impl.FlwImpl;
import net.minecraft.client.Minecraft;
import net.minecraft.server.packs.resources.ReloadableResourceManager;
-import net.neoforged.fml.ModLoader;
+import net.neoforged.neoforge.common.NeoForge;
@Mixin(Minecraft.class)
abstract class MinecraftMixin {
@@ -34,11 +34,11 @@ abstract class MinecraftMixin {
@Inject(method = "lambda$new$7", at = @At("HEAD"))
private void flywheel$onEndInitialResourceReload(@Coerce Object gameLoadCookie, Optional error, CallbackInfo ci) {
- ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error));
+ NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error));
}
@Inject(method = "lambda$reloadResourcePacks$39", at = @At("HEAD"))
private void flywheel$onEndManualResourceReload(boolean recovery, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
- ModLoader.get().postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
+ NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
}
}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
index dd03548d3..51ddef6e1 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
@@ -1,18 +1,18 @@
package dev.engine_room.flywheel.impl.mixin.sodium;
+import org.embeddedt.embeddium.impl.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import dev.engine_room.flywheel.lib.visual.VisualizationHelper;
-import me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.world.level.block.entity.BlockEntity;
@Mixin(value = ChunkBuilderMeshingTask.class, remap = false)
abstract class ChunkBuilderMeshingTaskMixin {
- @Redirect(method = "execute", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
+ @Redirect(method = "execute(Lorg/embeddedt/embeddium/impl/render/chunk/compile/ChunkBuildContext;Lorg/embeddedt/embeddium/impl/util/task/CancellationToken;)Lorg/embeddedt/embeddium/impl/render/chunk/compile/ChunkBuildOutput;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
private BlockEntityRenderer> flywheel$redirectGetRenderer(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity) {
if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
return null;
From d0924175deffe8327e9fa36b38e4d90140a413d4 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Wed, 10 Jul 2024 11:44:52 -0400
Subject: [PATCH 14/67] 1.21 Port II
---
.../impl/mixin/BufferBuilderAccessor.java | 12 ++++++++
.../main/resources/flywheel.impl.mixins.json | 1 +
.../flywheel/lib/model/baked/MeshEmitter.java | 20 +++++++------
.../flywheel/lib/model/baked/MeshEmitter.java | 28 +++++++++++--------
4 files changed, 41 insertions(+), 20 deletions(-)
create mode 100644 common/src/main/java/dev/engine_room/flywheel/impl/mixin/BufferBuilderAccessor.java
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BufferBuilderAccessor.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BufferBuilderAccessor.java
new file mode 100644
index 000000000..1b9e4b0a3
--- /dev/null
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BufferBuilderAccessor.java
@@ -0,0 +1,12 @@
+package dev.engine_room.flywheel.impl.mixin;
+
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.gen.Accessor;
+
+import com.mojang.blaze3d.vertex.BufferBuilder;
+
+@Mixin(BufferBuilder.class)
+public interface BufferBuilderAccessor {
+ @Accessor("building")
+ boolean flywheel$getBuilding();
+}
diff --git a/common/src/main/resources/flywheel.impl.mixins.json b/common/src/main/resources/flywheel.impl.mixins.json
index c8d878e85..927b23ce3 100644
--- a/common/src/main/resources/flywheel.impl.mixins.json
+++ b/common/src/main/resources/flywheel.impl.mixins.json
@@ -6,6 +6,7 @@
"refmap": "flywheel.refmap.json",
"client": [
"BlockEntityTypeMixin",
+ "BufferBuilderAccessor",
"ClientChunkCacheMixin",
"ClientLevelMixin",
"EntityTypeMixin",
diff --git a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
index 268a6e1da..db3eb85ba 100644
--- a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
+++ b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
@@ -3,21 +3,25 @@
import org.jetbrains.annotations.UnknownNullability;
import com.mojang.blaze3d.vertex.BufferBuilder;
+import com.mojang.blaze3d.vertex.ByteBufferBuilder;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.VertexFormat;
+import dev.engine_room.flywheel.impl.mixin.BufferBuilderAccessor;
import net.minecraft.client.renderer.RenderType;
class MeshEmitter {
private final RenderType renderType;
- private final BufferBuilder bufferBuilder;
+ private final ByteBufferBuilder byteBufferBuilder;
+ private BufferBuilder bufferBuilder;
private BakedModelBufferer.@UnknownNullability ResultConsumer resultConsumer;
private boolean currentShade;
MeshEmitter(RenderType renderType) {
this.renderType = renderType;
- this.bufferBuilder = new BufferBuilder(renderType.bufferSize());
+ this.byteBufferBuilder = new ByteBufferBuilder(renderType.bufferSize());
+ this.bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}
public void prepare(BakedModelBufferer.ResultConsumer resultConsumer) {
@@ -25,7 +29,7 @@ public void prepare(BakedModelBufferer.ResultConsumer resultConsumer) {
}
public void end() {
- if (bufferBuilder.building()) {
+ if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
emit();
}
resultConsumer = null;
@@ -37,22 +41,22 @@ public BufferBuilder getBuffer(boolean shade) {
}
void prepareForGeometry(boolean shade) {
- if (!bufferBuilder.building()) {
- bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
+ if (!((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
+ bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) {
emit();
- bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
+ bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}
currentShade = shade;
}
void emit() {
- var renderedBuffer = bufferBuilder.endOrDiscardIfEmpty();
+ var renderedBuffer = bufferBuilder.build();
if (renderedBuffer != null) {
resultConsumer.accept(renderType, currentShade, renderedBuffer);
- renderedBuffer.release();
+ renderedBuffer.close();
}
}
}
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
index c6e181a5c..b45845d6f 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java
@@ -3,32 +3,36 @@
import org.jetbrains.annotations.UnknownNullability;
import com.mojang.blaze3d.vertex.BufferBuilder;
+import com.mojang.blaze3d.vertex.ByteBufferBuilder;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.blaze3d.vertex.VertexFormat;
+import dev.engine_room.flywheel.impl.mixin.BufferBuilderAccessor;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.block.model.BakedQuad;
class MeshEmitter implements VertexConsumer {
private final RenderType renderType;
- private final BufferBuilder bufferBuilder;
+ private final ByteBufferBuilder byteBufferBuilder;
+ private BufferBuilder bufferBuilder;
private BakedModelBufferer.@UnknownNullability ResultConsumer resultConsumer;
private boolean currentShade;
- MeshEmitter(RenderType renderType) {
- this.renderType = renderType;
- this.bufferBuilder = new BufferBuilder(renderType.bufferSize());
- }
+ MeshEmitter(RenderType renderType) {
+ this.renderType = renderType;
+ this.byteBufferBuilder = new ByteBufferBuilder(renderType.bufferSize());
+ this.bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
+ }
public void prepare(BakedModelBufferer.ResultConsumer resultConsumer) {
this.resultConsumer = resultConsumer;
}
public void end() {
- if (bufferBuilder.building()) {
+ if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
emit();
}
resultConsumer = null;
@@ -39,12 +43,12 @@ public BufferBuilder unwrap(boolean shade) {
return bufferBuilder;
}
- private void prepareForGeometry(boolean shade) {
- if (!bufferBuilder.building()) {
- bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
+ void prepareForGeometry(boolean shade) {
+ if (!((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
+ bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) {
emit();
- bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
+ bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}
currentShade = shade;
@@ -55,11 +59,11 @@ private void prepareForGeometry(BakedQuad quad) {
}
private void emit() {
- var renderedBuffer = bufferBuilder.endOrDiscardIfEmpty();
+ var renderedBuffer = bufferBuilder.build();
if (renderedBuffer != null) {
resultConsumer.accept(renderType, currentShade, renderedBuffer);
- renderedBuffer.release();
+ renderedBuffer.close();
}
}
From e374365ce45961d59bdd2ec9b8c5c6b7f9192f49 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Wed, 10 Jul 2024 12:51:47 -0400
Subject: [PATCH 15/67] 1.21 Port III
---
.../resources/flywheel.backend.mixins.json | 2 +-
.../impl/mixin/LevelRendererMixin.java | 20 ++++++++++----
.../impl/mixin/fix/FixNormalScalingMixin.java | 26 +++++++++----------
...skMixin.java => SectionCompilerMixin.java} | 7 ++---
.../main/resources/flywheel.impl.mixins.json | 4 +--
.../flywheel.impl.fabric.mixins.json | 2 +-
.../flywheel.impl.sodium.mixins.json | 2 +-
.../{mods.toml => neoforge.mods.toml} | 0
.../flywheel.impl.sodium.mixins.json | 2 +-
9 files changed, 38 insertions(+), 27 deletions(-)
rename common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/{RebuildTaskMixin.java => SectionCompilerMixin.java} (63%)
rename forge/src/main/resources/META-INF/{mods.toml => neoforge.mods.toml} (100%)
diff --git a/common/src/backend/resources/flywheel.backend.mixins.json b/common/src/backend/resources/flywheel.backend.mixins.json
index 2d924bef0..a961b6a1f 100644
--- a/common/src/backend/resources/flywheel.backend.mixins.json
+++ b/common/src/backend/resources/flywheel.backend.mixins.json
@@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "dev.engine_room.flywheel.backend.mixin",
- "compatibilityLevel": "JAVA_17",
+ "compatibilityLevel": "JAVA_21",
"refmap": "backend-flywheel.refmap.json",
"client": [
"AbstractClientPlayerAccessor",
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 86e87717f..3fe10e5d4 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -13,8 +13,11 @@
import org.spongepowered.asm.mixin.injection.At.Shift;
import org.spongepowered.asm.mixin.injection.Group;
import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import com.llamalad7.mixinextras.sugar.Share;
+import com.llamalad7.mixinextras.sugar.ref.LocalRef;
import com.mojang.blaze3d.vertex.PoseStack;
import dev.engine_room.flywheel.api.event.RenderStage;
@@ -23,6 +26,7 @@
import dev.engine_room.flywheel.impl.visualization.VisualizationManagerImpl;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import net.minecraft.client.Camera;
+import net.minecraft.client.DeltaTracker;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LevelRenderer;
@@ -50,12 +54,18 @@ abstract class LevelRendererMixin {
// @Inject(method = "renderLevel", at = @At("HEAD"))
@Inject(method = "renderLevel", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runLightUpdates()I"))
- private void flywheel$beginRender(PoseStack poseStack, float partialTick, long finishNanoTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projectionMatrix, CallbackInfo ci) {
- flywheel$renderContext = RenderContextImpl.create((LevelRenderer) (Object) this, level, renderBuffers, poseStack, projectionMatrix, camera, partialTick);
+ private void flywheel$beginRender(DeltaTracker deltaTracker, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f frustumMatrix, Matrix4f projectionMatrix, CallbackInfo ci, @Share("flywheel$poseStack") LocalRef poseStack) {
+ PoseStack flywheel$poseStack = new PoseStack();
+ flywheel$renderContext = RenderContextImpl.create((LevelRenderer) (Object) this, level, renderBuffers, flywheel$poseStack, projectionMatrix, camera, deltaTracker.getGameTimeDeltaTicks());
FlwImplXplat.INSTANCE.dispatchBeginFrameEvent(flywheel$renderContext);
}
+ @Redirect(method = "renderLevel", at = @At(value = "NEW", target = "()Lcom/mojang/blaze3d/vertex/PoseStack;"))
+ private PoseStack flywheel$fixPoseStack(@Share("flywheel$poseStack") LocalRef poseStack) {
+ return poseStack.get();
+ }
+
@Inject(method = "renderLevel", at = @At("RETURN"))
private void flywheel$endRender(CallbackInfo ci) {
flywheel$renderContext = null;
@@ -102,19 +112,19 @@ abstract class LevelRendererMixin {
flywheel$dispatch(RenderStage.AFTER_TRANSLUCENT_TERRAIN);
}
- @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/LevelRenderer;renderSectionLayer(Lnet/minecraft/client/renderer/RenderType;Lcom/mojang/blaze3d/vertex/PoseStack;DDDLorg/joml/Matrix4f;)V", ordinal = 6, shift = Shift.AFTER))
+ @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/LevelRenderer;renderSectionLayer(Lnet/minecraft/client/renderer/RenderType;DDDLorg/joml/Matrix4f;Lorg/joml/Matrix4f;)V", ordinal = 6, shift = Shift.AFTER))
private void flywheel$onStage$afterTranslucentTerrain(CallbackInfo ci) {
flywheel$dispatch(RenderStage.AFTER_TRANSLUCENT_TERRAIN);
}
@Group(name = "onStage$afterParticles", min = 2, max = 2)
- @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;F)V", shift = Shift.AFTER))
+ @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;F)V", shift = Shift.AFTER))
private void flywheel$onStage$afterParticles$fabric(CallbackInfo ci) {
flywheel$dispatch(RenderStage.AFTER_PARTICLES);
}
@Group(name = "onStage$afterParticles")
- @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;)V", shift = Shift.AFTER))
+ @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;Ljava/util/function/Predicate;)V", shift = Shift.AFTER))
private void flywheel$onStage$afterParticles$forge(CallbackInfo ci) {
flywheel$dispatch(RenderStage.AFTER_PARTICLES);
}
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java
index f6a9ca887..5ea214dab 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java
@@ -4,7 +4,6 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.At.Shift;
import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -17,20 +16,21 @@ abstract class FixNormalScalingMixin {
* applied, which negates the matrix again, resulting in the matrix being the
* same as in the beginning.
*/
- @Inject(method = "scale(FFF)V", at = @At(value = "INVOKE", target = "Lorg/joml/Matrix3f;scale(F)Lorg/joml/Matrix3f;", shift = Shift.AFTER, remap = false), cancellable = true)
+ @Inject(method = "scale(FFF)V", at = @At(value = "INVOKE", target = "Lorg/joml/Matrix4f;scale(FFF)Lorg/joml/Matrix4f;", shift = Shift.AFTER, remap = false), cancellable = true)
private void flywheel$returnAfterNegate(float x, float y, float z, CallbackInfo ci) {
ci.cancel();
}
- /**
- * Minecraft takes the inverse cube root of the product of all scales to provide a
- * rough estimate for normalization so that it does not need to be done later. It
- * does not make sense for this "normalization factor" to be negative though, as
- * that would invert all normals. Additionally, Minecraft's fastInvCubeRoot method
- * does not work for negative numbers.
- */
- @ModifyArg(method = "scale(FFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;fastInvCubeRoot(F)F"))
- private float flywheel$absInvCbrtInput(float input) {
- return Math.abs(input);
- }
+ //fixme not needed anymore?
+// /**
+// * Minecraft takes the inverse cube root of the product of all scales to provide a
+// * rough estimate for normalization so that it does not need to be done later. It
+// * does not make sense for this "normalization factor" to be negative though, as
+// * that would invert all normals. Additionally, Minecraft's fastInvCubeRoot method
+// * does not work for negative numbers.
+// */
+// @ModifyArg(method = "scale(FFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;fastInvCubeRoot(F)F"))
+// private float flywheel$absInvCbrtInput(float input) {
+// return Math.abs(input);
+// }
}
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/SectionCompilerMixin.java
similarity index 63%
rename from common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java
rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/SectionCompilerMixin.java
index cd98fb932..e86b1a2d2 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/RebuildTaskMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/SectionCompilerMixin.java
@@ -7,11 +7,12 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import dev.engine_room.flywheel.lib.visual.VisualizationHelper;
+import net.minecraft.client.renderer.chunk.SectionCompiler;
import net.minecraft.world.level.block.entity.BlockEntity;
-@Mixin(targets = "net.minecraft.client.renderer.chunk.SectionRenderDispatcher$RenderSection$RebuildTask")
-abstract class RebuildTaskMixin {
- @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)
+@Mixin(SectionCompiler.class)
+abstract class SectionCompilerMixin {
+ @Inject(method = "handleBlockEntity", at = @At("HEAD"), cancellable = true)
private void flywheel$tryAddBlockEntity(@Coerce Object compileResults, BlockEntity blockEntity, CallbackInfo ci) {
if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
ci.cancel();
diff --git a/common/src/main/resources/flywheel.impl.mixins.json b/common/src/main/resources/flywheel.impl.mixins.json
index 927b23ce3..97dab99a4 100644
--- a/common/src/main/resources/flywheel.impl.mixins.json
+++ b/common/src/main/resources/flywheel.impl.mixins.json
@@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "dev.engine_room.flywheel.impl.mixin",
- "compatibilityLevel": "JAVA_17",
+ "compatibilityLevel": "JAVA_21",
"refmap": "flywheel.refmap.json",
"client": [
"BlockEntityTypeMixin",
@@ -19,7 +19,7 @@
"visualmanage.BlockEntityMixin",
"visualmanage.LevelChunkMixin",
"visualmanage.LevelRendererMixin",
- "visualmanage.RebuildTaskMixin"
+ "visualmanage.SectionCompilerMixin"
],
"injectors": {
"defaultRequire": 1
diff --git a/fabric/src/main/resources/flywheel.impl.fabric.mixins.json b/fabric/src/main/resources/flywheel.impl.fabric.mixins.json
index ea3900fdd..43d75fb9d 100644
--- a/fabric/src/main/resources/flywheel.impl.fabric.mixins.json
+++ b/fabric/src/main/resources/flywheel.impl.fabric.mixins.json
@@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "dev.engine_room.flywheel.impl.mixin.fabric",
- "compatibilityLevel": "JAVA_17",
+ "compatibilityLevel": "JAVA_21",
"refmap": "flywheel.refmap.json",
"client": [
"DebugScreenOverlayMixin",
diff --git a/fabric/src/main/resources/flywheel.impl.sodium.mixins.json b/fabric/src/main/resources/flywheel.impl.sodium.mixins.json
index 7820cb594..0fd5cf55f 100644
--- a/fabric/src/main/resources/flywheel.impl.sodium.mixins.json
+++ b/fabric/src/main/resources/flywheel.impl.sodium.mixins.json
@@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "dev.engine_room.flywheel.impl.mixin.sodium",
- "compatibilityLevel": "JAVA_17",
+ "compatibilityLevel": "JAVA_21",
"refmap": "flywheel.refmap.json",
"plugin": "dev.engine_room.flywheel.impl.mixin.sodium.SodiumMixinPlugin",
"client": [
diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/neoforge.mods.toml
similarity index 100%
rename from forge/src/main/resources/META-INF/mods.toml
rename to forge/src/main/resources/META-INF/neoforge.mods.toml
diff --git a/forge/src/main/resources/flywheel.impl.sodium.mixins.json b/forge/src/main/resources/flywheel.impl.sodium.mixins.json
index 7820cb594..0fd5cf55f 100644
--- a/forge/src/main/resources/flywheel.impl.sodium.mixins.json
+++ b/forge/src/main/resources/flywheel.impl.sodium.mixins.json
@@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "dev.engine_room.flywheel.impl.mixin.sodium",
- "compatibilityLevel": "JAVA_17",
+ "compatibilityLevel": "JAVA_21",
"refmap": "flywheel.refmap.json",
"plugin": "dev.engine_room.flywheel.impl.mixin.sodium.SodiumMixinPlugin",
"client": [
From 10d032c53ecef73bc0b516ab375b2ff00b1e24f9 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Wed, 10 Jul 2024 13:03:07 -0400
Subject: [PATCH 16/67] 1.21 Port IV
---
.../engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
index c07e7b037..f87736ad1 100644
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
+++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/fabric/MinecraftMixin.java
@@ -15,7 +15,7 @@ abstract class MinecraftMixin {
@Shadow
public ClientLevel level;
- @Inject(method = "setLevel(Lnet/minecraft/client/multiplayer/ClientLevel;)V", at = @At("HEAD"))
+ @Inject(method = "setLevel(Lnet/minecraft/client/multiplayer/ClientLevel;Lnet/minecraft/client/gui/screens/ReceivingLevelScreen$Reason;)V", at = @At("HEAD"))
private void flywheel$onSetLevel(CallbackInfo ci) {
if (level != null) {
LevelAttached.invalidateLevel(level);
From dfbd451fdb4db2c33d869545dcbeea0e98e5bb47 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Wed, 10 Jul 2024 13:04:42 -0400
Subject: [PATCH 17/67] 1.21 Port V
---
.../engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 6 ------
1 file changed, 6 deletions(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 3fe10e5d4..a2afcb78e 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -13,7 +13,6 @@
import org.spongepowered.asm.mixin.injection.At.Shift;
import org.spongepowered.asm.mixin.injection.Group;
import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.llamalad7.mixinextras.sugar.Share;
@@ -61,11 +60,6 @@ abstract class LevelRendererMixin {
FlwImplXplat.INSTANCE.dispatchBeginFrameEvent(flywheel$renderContext);
}
- @Redirect(method = "renderLevel", at = @At(value = "NEW", target = "()Lcom/mojang/blaze3d/vertex/PoseStack;"))
- private PoseStack flywheel$fixPoseStack(@Share("flywheel$poseStack") LocalRef poseStack) {
- return poseStack.get();
- }
-
@Inject(method = "renderLevel", at = @At("RETURN"))
private void flywheel$endRender(CallbackInfo ci) {
flywheel$renderContext = null;
From 1cce5da6734cc18eba6ce127b90d51b4513183c2 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 14 Jul 2024 22:18:14 -0400
Subject: [PATCH 18/67] Mixin Fixin'
---
.../engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 2 +-
.../dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java | 4 ++--
gradle.properties | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index a2afcb78e..885475b02 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -111,7 +111,7 @@ abstract class LevelRendererMixin {
flywheel$dispatch(RenderStage.AFTER_TRANSLUCENT_TERRAIN);
}
- @Group(name = "onStage$afterParticles", min = 2, max = 2)
+ @Group(name = "onStage$afterParticles", min = 2, max = 3)
@Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;F)V", shift = Shift.AFTER))
private void flywheel$onStage$afterParticles$fabric(CallbackInfo ci) {
flywheel$dispatch(RenderStage.AFTER_PARTICLES);
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index fb83f05a7..15f884c12 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -32,12 +32,12 @@ abstract class MinecraftMixin {
return arg0;
}
- @Inject(method = "lambda$new$7", at = @At("HEAD"))
+ @Inject(method = "lambda$new$8", at = @At("HEAD"))
private void flywheel$onEndInitialResourceReload(@Coerce Object gameLoadCookie, Optional error, CallbackInfo ci) {
NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error));
}
- @Inject(method = "lambda$reloadResourcePacks$39", at = @At("HEAD"))
+ @Inject(method = "lambda$reloadResourcePacks$22", at = @At("HEAD"))
private void flywheel$onEndManualResourceReload(boolean recovery, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
}
diff --git a/gradle.properties b/gradle.properties
index a7320e1e0..7dc5dc633 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -13,9 +13,9 @@ mod_homepage = https://github.com/Jozufozu/Flywheel
# Mod dependency declarations
minecraft_semver_version_range = >=1.21 <1.21.1
-minecraft_maven_version_range = [1.21,1.21.0)
+minecraft_maven_version_range = [1.21,1.21.1)
fabric_api_version_range = >=0.100.6
-neoforge_version_range = [21.0.79-beta,)
+neoforge_version_range = [21.0.95-beta,)
# General build dependency versions
java_version = 21
@@ -25,7 +25,7 @@ parchment_version = 2024.07.07
# Minecraft build dependency versions
minecraft_version = 1.21
-neoforge_version = 21.0.79-beta
+neoforge_version = 21.0.95-beta
fabric_loader_version = 0.15.11
fabric_api_version = 0.100.6+1.21
From eeb6e0f37a3040cc8ef824a35274eaf2647a5c6e Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 14 Jul 2024 22:19:35 -0400
Subject: [PATCH 19/67] style: javadoc fixes
---
.../java/dev/engine_room/flywheel/lib/util/ResourceUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java b/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java
index 0bc16e618..2563e78ff 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/util/ResourceUtil.java
@@ -16,7 +16,7 @@ private ResourceUtil() {
}
/**
- * Same as {@link ResourceLocation#ResourceLocation(String)}, but defaults to Flywheel namespace.
+ * Same as {@link ResourceLocation#parse(String)}, but defaults to Flywheel namespace.
*/
public static ResourceLocation parseFlywheelDefault(String location) {
String namespace = Flywheel.ID;
From 1d9f96a8225878988bf71e24e260c8e8793a6a9d Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 14 Jul 2024 22:20:47 -0400
Subject: [PATCH 20/67] string substitution fixes
---
.../dev/engine_room/gradle/subproject/SubprojectPlugin.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
index e0c8ea1f1..eeff691a4 100644
--- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
+++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
@@ -168,7 +168,7 @@ class SubprojectPlugin: Plugin {
}
}
-val processResourcesExpandFiles = listOf("pack.mcmeta", "fabric.mod.json", "META-INF/mods.toml")
+val processResourcesExpandFiles = listOf("pack.mcmeta", "fabric.mod.json", "META-INF/neoforge.mods.toml")
val processResourcesExpandProperties = listOf(
"mod_id",
From 6533723fdf907f029f7fcff59bf2cded4da0b492 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Mon, 15 Jul 2024 17:36:57 -0400
Subject: [PATCH 21/67] feat(api): Make PartialModel's use RL's instead of
MRL's
---
.../flywheel/lib/model/baked/PartialModel.java | 8 ++++----
.../lib/model/baked/PartialModelEventHandler.java | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java
index 4b0d375f6..ba96c09c0 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModel.java
@@ -4,7 +4,7 @@
import java.util.List;
import net.minecraft.client.resources.model.BakedModel;
-import net.minecraft.client.resources.model.ModelResourceLocation;
+import net.minecraft.resources.ResourceLocation;
/**
* A helper class for loading and accessing JSON models not directly used by any blocks or items.
@@ -19,10 +19,10 @@ public class PartialModel {
static final List ALL = new ArrayList<>();
static boolean tooLate = false;
- protected final ModelResourceLocation modelLocation;
+ protected final ResourceLocation modelLocation;
protected BakedModel bakedModel;
- public PartialModel(ModelResourceLocation modelLocation) {
+ public PartialModel(ResourceLocation modelLocation) {
if (tooLate) {
throw new RuntimeException("Attempted to create PartialModel with location '" + modelLocation + "' after start of initial resource reload!");
}
@@ -34,7 +34,7 @@ public PartialModel(ModelResourceLocation modelLocation) {
}
}
- public ModelResourceLocation getLocation() {
+ public ResourceLocation getLocation() {
return modelLocation;
}
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
index f403b7c44..ec3ff4123 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
@@ -15,7 +15,7 @@ private PartialModelEventHandler() {
public static void onRegisterAdditional(ModelEvent.RegisterAdditional event) {
for (PartialModel partial : PartialModel.ALL) {
- event.register(partial.getLocation());
+ event.register(ModelResourceLocation.standalone(partial.getLocation()));
}
PartialModel.tooLate = true;
@@ -25,7 +25,7 @@ public static void onBakingCompleted(ModelEvent.BakingCompleted event) {
Map models = event.getModels();
for (PartialModel partial : PartialModel.ALL) {
- partial.set(models.get(partial.getLocation()));
+ partial.set(models.get(ModelResourceLocation.standalone(partial.getLocation())));
}
}
}
From 44c2f784581702bacf0f33fb6519cf44d11220f7 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sat, 27 Jul 2024 22:03:46 -0400
Subject: [PATCH 22/67] merge: post merge fixes & porting
---
.../flywheel/lib/visual/component/ShadowComponent.java | 2 +-
.../dev/engine_room/flywheel/vanilla/MinecartVisual.java | 2 +-
.../flywheel/lib/model/baked/PartialModelEventHandler.java | 5 +++--
.../java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java | 2 +-
.../java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java | 3 ++-
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java b/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
index 65a2d8dcd..0f8d0a97d 100644
--- a/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
+++ b/common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
@@ -42,7 +42,7 @@
* The shadow will be cast on blocks at most {@code min(radius, 2 * strength)} blocks below the entity.
*/
public final class ShadowComponent implements EntityComponent {
- private static final ResourceLocation SHADOW_TEXTURE = new ResourceLocation("textures/misc/shadow.png");
+ private static final ResourceLocation SHADOW_TEXTURE = ResourceLocation.withDefaultNamespace("textures/misc/shadow.png");
private static final Material SHADOW_MATERIAL = SimpleMaterial.builder()
.texture(SHADOW_TEXTURE)
.mipmap(false)
diff --git a/common/src/main/java/dev/engine_room/flywheel/vanilla/MinecartVisual.java b/common/src/main/java/dev/engine_room/flywheel/vanilla/MinecartVisual.java
index bc58879d8..c11e99d1a 100644
--- a/common/src/main/java/dev/engine_room/flywheel/vanilla/MinecartVisual.java
+++ b/common/src/main/java/dev/engine_room/flywheel/vanilla/MinecartVisual.java
@@ -32,7 +32,7 @@
import net.minecraft.world.phys.Vec3;
public class MinecartVisual extends ComponentEntityVisual implements SimpleTickableVisual, SimpleDynamicVisual {
- private static final ResourceLocation TEXTURE = new ResourceLocation("textures/entity/minecart.png");
+ private static final ResourceLocation TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/minecart.png");
private static final Material MATERIAL = SimpleMaterial.builder()
.texture(TEXTURE)
.mipmap(false)
diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
index 534360ff9..d87eee208 100644
--- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
+++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
@@ -6,6 +6,7 @@
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.client.resources.model.ModelResourceLocation;
+import net.minecraft.resources.ResourceLocation;
import net.neoforged.neoforge.client.event.ModelEvent;
@ApiStatus.Internal
@@ -15,7 +16,7 @@ private PartialModelEventHandler() {
public static void onRegisterAdditional(ModelEvent.RegisterAdditional event) {
for (ResourceLocation modelLocation : PartialModel.ALL.keySet()) {
- event.register(modelLocation);
+ event.register(ModelResourceLocation.standalone(modelLocation));
}
}
@@ -24,7 +25,7 @@ public static void onBakingCompleted(ModelEvent.BakingCompleted event) {
Map models = event.getModels();
for (PartialModel partial : PartialModel.ALL.values()) {
- partial.bakedModel = models.get(partial.modelLocation());
+ partial.bakedModel = models.get(ModelResourceLocation.standalone(partial.modelLocation()));
}
}
}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
index 70b6ac028..2cc0dee9d 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
@@ -7,7 +7,7 @@
public class FlwImplXplatImpl implements FlwImplXplat {
@Override
public void dispatchReloadLevelRendererEvent(ClientLevel level) {
- MinecraftForge.EVENT_BUS.post(new ReloadLevelRendererEvent(level));
+ NeoForge.EVENT_BUS.post(new ReloadLevelRendererEvent(level));
}
@Override
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
index b2cadac44..3671f3bf1 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
@@ -19,6 +19,7 @@
import net.minecraft.client.renderer.block.ModelBlockRenderer;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.client.resources.model.ModelManager;
+import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.BlockAndTintGetter;
@@ -30,7 +31,7 @@ public class FlwLibXplatImpl implements FlwLibXplat {
@Override
@UnknownNullability
public BakedModel getBakedModel(ModelManager modelManager, ResourceLocation location) {
- return modelManager.getModel(location);
+ return modelManager.getModel(ModelResourceLocation.standalone(location));
}
@Override
From 68393d11bb622540ab06064a1d02e2dd5c027010 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Mon, 29 Jul 2024 19:19:58 -0400
Subject: [PATCH 23/67] fix(mixins): broken LevelRenderer injector
---
.../dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 619dccf7e..ee90067e6 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -104,7 +104,7 @@ abstract class LevelRendererMixin {
}
@Group(name = "afterParticles", min = 2, max = 2)
- @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;F)V", shift = Shift.AFTER))
+ @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;F)V", shift = Shift.AFTER))
private void flywheel$afterParticles$fabric(CallbackInfo ci) {
if (flywheel$renderContext != null) {
VisualizationManager manager = VisualizationManager.get(level);
From 475b1d8d7d14b036ed6e52e9fa81ea9e683029c7 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sat, 10 Aug 2024 10:31:20 -0400
Subject: [PATCH 24/67] fix view -IMS
---
.../java/dev/engine_room/flywheel/api/RenderContext.java | 2 +-
.../flywheel/backend/engine/uniform/FrameUniforms.java | 2 +-
.../flywheel/impl/event/RenderContextImpl.java | 9 ++++-----
.../flywheel/impl/mixin/LevelRendererMixin.java | 9 ++++-----
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/common/src/api/java/dev/engine_room/flywheel/api/RenderContext.java b/common/src/api/java/dev/engine_room/flywheel/api/RenderContext.java
index 5fc9f68b5..2a1e77c59 100644
--- a/common/src/api/java/dev/engine_room/flywheel/api/RenderContext.java
+++ b/common/src/api/java/dev/engine_room/flywheel/api/RenderContext.java
@@ -16,7 +16,7 @@ public interface RenderContext {
RenderBuffers buffers();
- PoseStack stack();
+ Matrix4fc modelView();
Matrix4fc projection();
diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/engine/uniform/FrameUniforms.java b/common/src/backend/java/dev/engine_room/flywheel/backend/engine/uniform/FrameUniforms.java
index 33bb81901..7ca60b0d9 100644
--- a/common/src/backend/java/dev/engine_room/flywheel/backend/engine/uniform/FrameUniforms.java
+++ b/common/src/backend/java/dev/engine_room/flywheel/backend/engine/uniform/FrameUniforms.java
@@ -71,7 +71,7 @@ public static void update(RenderContext context) {
var camY = (float) (cameraPos.y - renderOrigin.getY());
var camZ = (float) (cameraPos.z - renderOrigin.getZ());
- VIEW.set(context.stack().last().pose());
+ VIEW.set(context.modelView());
VIEW.translate(-camX, -camY, -camZ);
PROJECTION.set(context.projection());
VIEW_PROJECTION.set(context.viewProjection());
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java b/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java
index 1ee538a73..df85a11dd 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java
@@ -11,14 +11,13 @@
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.RenderBuffers;
-public record RenderContextImpl(LevelRenderer renderer, ClientLevel level, RenderBuffers buffers, PoseStack stack,
+public record RenderContextImpl(LevelRenderer renderer, ClientLevel level, RenderBuffers buffers, Matrix4fc modelView,
Matrix4fc projection, Matrix4fc viewProjection, Camera camera,
float partialTick) implements RenderContext {
- public static RenderContextImpl create(LevelRenderer renderer, ClientLevel level, RenderBuffers buffers, PoseStack stack, Matrix4f projection, Camera camera, float partialTick) {
+ public static RenderContextImpl create(LevelRenderer renderer, ClientLevel level, RenderBuffers buffers, Matrix4fc modelView, Matrix4f projection, Camera camera, float partialTick) {
Matrix4f viewProjection = new Matrix4f(projection);
- viewProjection.mul(stack.last()
- .pose());
+ viewProjection.mul(modelView);
- return new RenderContextImpl(renderer, level, buffers, stack, projection, viewProjection, camera, partialTick);
+ return new RenderContextImpl(renderer, level, buffers, modelView, projection, viewProjection, camera, partialTick);
}
}
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index ee90067e6..9fda02fce 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -51,9 +51,8 @@ abstract class LevelRendererMixin {
// @Inject(method = "renderLevel", at = @At("HEAD"))
@Inject(method = "renderLevel", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runLightUpdates()I"))
- private void flywheel$beginRender(DeltaTracker deltaTracker, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f frustumMatrix, Matrix4f projectionMatrix, CallbackInfo ci, @Share("flywheel$poseStack") LocalRef poseStack) {
- PoseStack flywheel$poseStack = new PoseStack();
- flywheel$renderContext = RenderContextImpl.create((LevelRenderer) (Object) this, level, renderBuffers, flywheel$poseStack, projectionMatrix, camera, deltaTracker.getGameTimeDeltaTicks());
+ private void flywheel$beginRender(DeltaTracker deltaTracker, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f modelMatrix, Matrix4f projectionMatrix, CallbackInfo ci) {
+ flywheel$renderContext = RenderContextImpl.create((LevelRenderer) (Object) this, level, renderBuffers, modelMatrix, projectionMatrix, camera, deltaTracker.getGameTimeDeltaTicks());
VisualizationManager manager = VisualizationManager.get(level);
if (manager != null) {
@@ -114,8 +113,8 @@ abstract class LevelRendererMixin {
}
}
- @Group(name = "afterParticles")
- @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;Ljava/util/function/Predicate;)V", shift = Shift.AFTER))
+ //@Group(name = "afterParticles")
+ //@Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;Ljava/util/function/Predicate;)V", shift = Shift.AFTER))
private void flywheel$afterParticles$forge(CallbackInfo ci) {
if (flywheel$renderContext != null) {
VisualizationManager manager = VisualizationManager.get(level);
From f2c0b79085f78e155d1ca82760520b0152ed6854 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sat, 10 Aug 2024 10:32:46 -0400
Subject: [PATCH 25/67] uncomment the comments
"i commented out the particle stuff for testing something
uh you can revert that" -IMS
---
.../flywheel/impl/mixin/LevelRendererMixin.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 9fda02fce..5fd4a1d4f 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -14,10 +14,6 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import com.llamalad7.mixinextras.sugar.Share;
-import com.llamalad7.mixinextras.sugar.ref.LocalRef;
-import com.mojang.blaze3d.vertex.PoseStack;
-
import dev.engine_room.flywheel.api.visualization.VisualizationManager;
import dev.engine_room.flywheel.impl.FlwImplXplat;
import dev.engine_room.flywheel.impl.event.RenderContextImpl;
@@ -113,8 +109,8 @@ abstract class LevelRendererMixin {
}
}
- //@Group(name = "afterParticles")
- //@Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;Ljava/util/function/Predicate;)V", shift = Shift.AFTER))
+ @Group(name = "afterParticles")
+ @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/culling/Frustum;Ljava/util/function/Predicate;)V", shift = Shift.AFTER))
private void flywheel$afterParticles$forge(CallbackInfo ci) {
if (flywheel$renderContext != null) {
VisualizationManager manager = VisualizationManager.get(level);
From 5313585f3e2d0f0f647d14d56bad51f4c379b555 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sun, 11 Aug 2024 10:05:39 -0400
Subject: [PATCH 26/67] update neoforge & fix mixins
---
.../engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 2 +-
.../dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java | 2 +-
gradle.properties | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 5fd4a1d4f..0451150b9 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -98,7 +98,7 @@ abstract class LevelRendererMixin {
}
}
- @Group(name = "afterParticles", min = 2, max = 2)
+ @Group(name = "afterParticles", min = 2, max = 3)
@Inject(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/ParticleEngine;render(Lnet/minecraft/client/renderer/LightTexture;Lnet/minecraft/client/Camera;F)V", shift = Shift.AFTER))
private void flywheel$afterParticles$fabric(CallbackInfo ci) {
if (flywheel$renderContext != null) {
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
index 15f884c12..a248d541d 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java
@@ -37,7 +37,7 @@ abstract class MinecraftMixin {
NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error));
}
- @Inject(method = "lambda$reloadResourcePacks$22", at = @At("HEAD"))
+ @Inject(method = "lambda$reloadResourcePacks$21", at = @At("HEAD"))
private void flywheel$onEndManualResourceReload(boolean recovery, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) {
NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error));
}
diff --git a/gradle.properties b/gradle.properties
index 7dc5dc633..a8b43738f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,7 +15,7 @@ mod_homepage = https://github.com/Jozufozu/Flywheel
minecraft_semver_version_range = >=1.21 <1.21.1
minecraft_maven_version_range = [1.21,1.21.1)
fabric_api_version_range = >=0.100.6
-neoforge_version_range = [21.0.95-beta,)
+neoforge_version_range = [21.0.167,)
# General build dependency versions
java_version = 21
@@ -25,7 +25,7 @@ parchment_version = 2024.07.07
# Minecraft build dependency versions
minecraft_version = 1.21
-neoforge_version = 21.0.95-beta
+neoforge_version = 21.0.167
fabric_loader_version = 0.15.11
fabric_api_version = 0.100.6+1.21
From 44f045b96183a5e20880bfd71b7bafb177db7c69 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Thu, 15 Aug 2024 17:51:25 -0400
Subject: [PATCH 27/67] Fix lighting
---
.../impl/event/RenderContextImpl.java | 2 --
.../impl/mixin/fix/FixNormalScalingMixin.java | 36 -------------------
.../main/resources/flywheel.impl.mixins.json | 1 -
3 files changed, 39 deletions(-)
delete mode 100644 common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java b/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java
index df85a11dd..bf8e7c0c5 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/event/RenderContextImpl.java
@@ -3,8 +3,6 @@
import org.joml.Matrix4f;
import org.joml.Matrix4fc;
-import com.mojang.blaze3d.vertex.PoseStack;
-
import dev.engine_room.flywheel.api.RenderContext;
import net.minecraft.client.Camera;
import net.minecraft.client.multiplayer.ClientLevel;
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java
deleted file mode 100644
index 5ea214dab..000000000
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/fix/FixNormalScalingMixin.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package dev.engine_room.flywheel.impl.mixin.fix;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.At.Shift;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-
-@Mixin(PoseStack.class)
-abstract class FixNormalScalingMixin {
- /**
- * Minecraft negates the normal matrix if all scales are equal and negative, but
- * does not return afterward. This allows the rest of the method's logic to be
- * applied, which negates the matrix again, resulting in the matrix being the
- * same as in the beginning.
- */
- @Inject(method = "scale(FFF)V", at = @At(value = "INVOKE", target = "Lorg/joml/Matrix4f;scale(FFF)Lorg/joml/Matrix4f;", shift = Shift.AFTER, remap = false), cancellable = true)
- private void flywheel$returnAfterNegate(float x, float y, float z, CallbackInfo ci) {
- ci.cancel();
- }
-
- //fixme not needed anymore?
-// /**
-// * Minecraft takes the inverse cube root of the product of all scales to provide a
-// * rough estimate for normalization so that it does not need to be done later. It
-// * does not make sense for this "normalization factor" to be negative though, as
-// * that would invert all normals. Additionally, Minecraft's fastInvCubeRoot method
-// * does not work for negative numbers.
-// */
-// @ModifyArg(method = "scale(FFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;fastInvCubeRoot(F)F"))
-// private float flywheel$absInvCbrtInput(float input) {
-// return Math.abs(input);
-// }
-}
diff --git a/common/src/main/resources/flywheel.impl.mixins.json b/common/src/main/resources/flywheel.impl.mixins.json
index 97dab99a4..a932159b9 100644
--- a/common/src/main/resources/flywheel.impl.mixins.json
+++ b/common/src/main/resources/flywheel.impl.mixins.json
@@ -15,7 +15,6 @@
"MinecraftMixin",
"PoseStackMixin",
"fix.FixFabulousDepthMixin",
- "fix.FixNormalScalingMixin",
"visualmanage.BlockEntityMixin",
"visualmanage.LevelChunkMixin",
"visualmanage.LevelRendererMixin",
From 4e1a4b64907644a6465eac9172b0231114a619e8 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Fri, 16 Aug 2024 22:54:01 -0400
Subject: [PATCH 28/67] fix jittery visual animations
---
.../dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
index 0451150b9..f246bed96 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
@@ -48,7 +48,7 @@ abstract class LevelRendererMixin {
// @Inject(method = "renderLevel", at = @At("HEAD"))
@Inject(method = "renderLevel", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/level/lighting/LevelLightEngine;runLightUpdates()I"))
private void flywheel$beginRender(DeltaTracker deltaTracker, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f modelMatrix, Matrix4f projectionMatrix, CallbackInfo ci) {
- flywheel$renderContext = RenderContextImpl.create((LevelRenderer) (Object) this, level, renderBuffers, modelMatrix, projectionMatrix, camera, deltaTracker.getGameTimeDeltaTicks());
+ flywheel$renderContext = RenderContextImpl.create((LevelRenderer) (Object) this, level, renderBuffers, modelMatrix, projectionMatrix, camera, deltaTracker.getGameTimeDeltaPartialTick(false));
VisualizationManager manager = VisualizationManager.get(level);
if (manager != null) {
From c32fccc1337d1f7754a141f60e888ed629a1cc07 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Thu, 22 Aug 2024 19:41:28 -0400
Subject: [PATCH 29/67] Sodium 0.6
---
buildSrc/build.gradle.kts | 2 +-
fabric/build.gradle.kts | 4 ++--
.../sodium/ChunkBuilderMeshingTaskMixin.java | 4 ++--
forge/build.gradle.kts | 7 +++++--
.../sodium/ChunkBuilderMeshingTaskMixin.java | 4 ++--
.../impl/mixin/sodium/SodiumMixinPlugin.java | 2 +-
gradle.properties | 8 ++++----
gradle/wrapper/gradle-wrapper.jar | Bin 43453 -> 43583 bytes
gradle/wrapper/gradle-wrapper.properties | 2 +-
gradlew | 7 +++++--
gradlew.bat | 2 ++
11 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 36fc3fec0..ff4e92c48 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -32,5 +32,5 @@ gradlePlugin {
dependencies {
// FIXME: This should not hard-code the Loom version.
- implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.6.397")
+ implementation("dev.architectury.loom:dev.architectury.loom.gradle.plugin:1.7.+")
}
diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts
index b2c53440d..911424e38 100644
--- a/fabric/build.gradle.kts
+++ b/fabric/build.gradle.kts
@@ -64,8 +64,8 @@ dependencies {
modImplementation("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
modApi("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}")
- modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}")
- modCompileOnly("maven.modrinth:iris:${property("iris_version")}")
+ modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-fabric")
+ modCompileOnly("maven.modrinth:iris:${property("iris_version")}-fabric")
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib"))
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
index 64e4b31e2..865ba1978 100644
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
+++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
@@ -5,14 +5,14 @@
import org.spongepowered.asm.mixin.injection.Redirect;
import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
-import me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
+import net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.world.level.block.entity.BlockEntity;
@Mixin(value = ChunkBuilderMeshingTask.class, remap = false)
abstract class ChunkBuilderMeshingTaskMixin {
- @Redirect(method = "execute", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
+ @Redirect(method = "execute(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;)Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
private BlockEntityRenderer> flywheel$redirectGetRenderer(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity) {
if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
return null;
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts
index c2779acd8..ccd4aec73 100644
--- a/forge/build.gradle.kts
+++ b/forge/build.gradle.kts
@@ -76,8 +76,11 @@ repositories {
dependencies {
neoForge("net.neoforged:neoforge:${property("neoforge_version")}")
- modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
- modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}")
+ modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-neoforge")
+ modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge")
+
+ //modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
+ //modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}")
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
"forLib"(project(path = ":common", configuration = "commonLib"))
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
index c7714934a..865ba1978 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
@@ -1,18 +1,18 @@
package dev.engine_room.flywheel.impl.mixin.sodium;
-import org.embeddedt.embeddium.impl.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
+import net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.world.level.block.entity.BlockEntity;
@Mixin(value = ChunkBuilderMeshingTask.class, remap = false)
abstract class ChunkBuilderMeshingTaskMixin {
- @Redirect(method = "execute(Lorg/embeddedt/embeddium/impl/render/chunk/compile/ChunkBuildContext;Lorg/embeddedt/embeddium/impl/util/task/CancellationToken;)Lorg/embeddedt/embeddium/impl/render/chunk/compile/ChunkBuildOutput;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
+ @Redirect(method = "execute(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;)Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
private BlockEntityRenderer> flywheel$redirectGetRenderer(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity) {
if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
return null;
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
index c2fe3df02..94d5d560f 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
@@ -13,7 +13,7 @@
import net.neoforged.fml.loading.LoadingModList;
public class SodiumMixinPlugin implements IMixinConfigPlugin {
- private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("embeddium") != null);
+ private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("sodium") != null);
@Override
public void onLoad(String mixinPackage) {
diff --git a/gradle.properties b/gradle.properties
index a8b43738f..ef84f6a53 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -30,11 +30,11 @@ fabric_loader_version = 0.15.11
fabric_api_version = 0.100.6+1.21
# Build dependency mod versions
-sodium_version = mc1.21-0.5.11
-iris_version = 1.7.3+1.21
-embeddium_version = 1.0.4+mc1.21
+sodium_version = mc1.21-0.6.0-beta.1
+iris_version = 1.8.0-beta.1+1.21
+#embeddium_version = 1.0.4+mc1.21
# no 1.21 :(
-oculus_version = 1.20.1-1.6.15a
+#oculus_version = 1.20.1-1.6.15a
# Publication info
group = dev.engine_room.flywheel
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index e6441136f3d4ba8a0da8d277868979cfbc8ad796..a4b76b9530d66f5e68d973ea569d8e19de379189 100644
GIT binary patch
delta 12612
zcmY+pRa6|n(lttO3GVLh?(Xh3xVuAe26uONcL=V5;I6?T_zdn2`Oi5I_gl9gx~lft
zRjVKRp?B~8Wyrx5$mS3|py!Njy{0Wt4i%@s8v88pK
z6fPNA45)|*9+*w5kcg$o)}2g}%JfXe6l9ig4T8ia3Hlw#3f^fAKW63%<~GZJd-0YA
z9YjleCs~#Y?V+`#nr+49hhsr$K$k!lg}AZDw@>2j=f7t~5IW6#K|lAX7|^N}lJ)I!km`nrwx>
z))1Es16__aXGVzQM0EC8xH+O!nqTFBg9Ci{NwRK*CP<6s`Gq(~#lqb(zOlh6ZDB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B~ri$YUbW8fch64}7|0EWoT(TRj{
z*GT<7Y<7DsrCi79ZsM)z#c(!nNOGySOCkY1fAuQOq12&iUVC!a`#O;dBLf=d?&4*B
zI~LgAO7E0qxK(uRTM;IgJ}+z^gD+bi-6I!3x{r9`l~%8TRP%UE0V8E*Sz>Nl1NVG<<7(wDHZ+HcOkQm$O&k+vyx)y)x{Pz!U8hS$*m
zByc0h6BUI*BOpuL==P+H|Hx%`>7!W+1H!l9vi&)`V
zyn2o9{z=lc+VX*!Vh~SF=)L}Z40XeG>LF6cP^b+R$NxSeUqbK^Q*UTalKzP8X%{9@RSCXm_NhF>{=S2
zi}ezam_^P`S!!-cyEW9y7DBbK93roz@Raccy*v}?mKXScU9E_4g;hBU7}zSofAFda
zKYEe?{{I54
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index e7646dead..9355b4155 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index 1aa94a426..f5feea6d6 100755
--- a/gradlew
+++ b/gradlew
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
+' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
diff --git a/gradlew.bat b/gradlew.bat
index 25da30dbd..9d21a2183 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
From 6cf9f36c0c8e188451e41bb2f9311a0abd4911db Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Thu, 22 Aug 2024 20:28:52 -0400
Subject: [PATCH 30/67] iris support
---
.../java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
index 3671f3bf1..cf62e3d7e 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
@@ -70,7 +70,7 @@ public MultiBlockModelBuilder createMultiBlockModelBuilder(BlockAndTintGetter le
@Nullable
public ShadersModHandler.InternalHandler createIrisHandler() {
if (!ModList.get()
- .isLoaded("oculus")) {
+ .isLoaded("iris")) {
return null;
}
From 3453715f813d6255db7b6619b0e9c67d75ecfc45 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Thu, 22 Aug 2024 20:31:52 -0400
Subject: [PATCH 31/67] forge porting
---
.../java/dev/engine_room/flywheel/impl/FlywheelForge.java | 2 +-
.../java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
index 7bef593f8..2bc2f9cd9 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
@@ -101,7 +101,7 @@ private static void registerImplEventListeners(IEventBus forgeEventBus, IEventBu
if (e.getRegistryKey().equals(Registries.COMMAND_ARGUMENT_TYPE)) {
e.register(Registries.COMMAND_ARGUMENT_TYPE, Flywheel.rl("backend"), () -> BackendArgument.INFO);
e.register(Registries.COMMAND_ARGUMENT_TYPE, Flywheel.rl("debug_mode"), () -> DebugModeArgument.INFO);
- e.register(ForgeRegistries.Keys.COMMAND_ARGUMENT_TYPES, Flywheel.rl("light_smoothness"), () -> LightSmoothnessArgument.INFO);
+ e.register(Registries.COMMAND_ARGUMENT_TYPE, Flywheel.rl("light_smoothness"), () -> LightSmoothnessArgument.INFO);
}
});
}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
index 9e897ff3b..db8563519 100644
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
+++ b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
@@ -98,9 +98,9 @@ private ClientConfig(ModConfigSpec.Builder builder) {
}
public static class ForgeBackendConfig implements BackendConfig {
- public final ForgeConfigSpec.EnumValue lightSmoothness;
+ public final ModConfigSpec.EnumValue lightSmoothness;
- public ForgeBackendConfig(ForgeConfigSpec.Builder builder) {
+ public ForgeBackendConfig(ModConfigSpec.Builder builder) {
lightSmoothness = builder.comment("How smooth flywheel's shader-based lighting should be. May have a large performance impact.")
.defineEnum("lightSmoothness", LightSmoothness.SMOOTH);
}
From fc61ff1c9810e23ccac53e2b52a1a8df4d1b33f5 Mon Sep 17 00:00:00 2001
From: IThundxr
Date: Sat, 14 Sep 2024 09:20:59 -0400
Subject: [PATCH 32/67] Add sodium 0.6 compat
---
.../gradle/subproject/SubprojectPlugin.kt | 3 ++
common/build.gradle.kts | 2 +
.../flywheel/impl/compat/CompatMods.java | 22 ++++++++
.../flywheel/impl/compat/SodiumCompat.java | 19 +++++++
.../impl/mixin/BlockEntityTypeMixin.java | 14 +++++
fabric/build.gradle.kts | 2 +-
.../sodium/ChunkBuilderMeshingTaskMixin.java | 22 --------
.../impl/mixin/sodium/SodiumMixinPlugin.java | 48 ------------------
fabric/src/main/resources/fabric.mod.json | 3 +-
.../flywheel.impl.sodium.mixins.json | 14 -----
forge/build.gradle.kts | 8 +--
.../sodium/ChunkBuilderMeshingTaskMixin.java | 22 --------
.../impl/mixin/sodium/SodiumMixinPlugin.java | 48 ------------------
.../resources/META-INF/neoforge.mods.toml | 2 -
.../flywheel.impl.sodium.mixins.json | 14 -----
gradle.properties | 1 -
libs/sodium-fabric-0.6.0-beta.2+mc1.21.1.jar | Bin 0 -> 1263840 bytes
.../sodium-neoforge-0.6.0-beta.2+mc1.21.1.jar | Bin 0 -> 1125609 bytes
18 files changed, 63 insertions(+), 181 deletions(-)
create mode 100644 common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java
create mode 100644 common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java
delete mode 100644 fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
delete mode 100644 fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
delete mode 100644 fabric/src/main/resources/flywheel.impl.sodium.mixins.json
delete mode 100644 forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
delete mode 100644 forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
delete mode 100644 forge/src/main/resources/flywheel.impl.sodium.mixins.json
create mode 100644 libs/sodium-fabric-0.6.0-beta.2+mc1.21.1.jar
create mode 100644 libs/sodium-neoforge-0.6.0-beta.2+mc1.21.1.jar
diff --git a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
index 8eda2f418..8fea37a9c 100644
--- a/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
+++ b/buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
@@ -89,6 +89,9 @@ class SubprojectPlugin: Plugin {
includeGroup("maven.modrinth")
}
}
+ flatDir {
+ dirs = setOf(project.rootProject.file("libs"))
+ }
}
}
diff --git a/common/build.gradle.kts b/common/build.gradle.kts
index 23d1f23b4..3f9247a3f 100644
--- a/common/build.gradle.kts
+++ b/common/build.gradle.kts
@@ -72,6 +72,8 @@ jarSets {
dependencies {
modCompileOnly("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
+ modCompileOnly(":sodium-fabric-0.6.0-beta.2+mc1.21.1")
+
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
}
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java b/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java
new file mode 100644
index 000000000..612316dc3
--- /dev/null
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java
@@ -0,0 +1,22 @@
+package dev.engine_room.flywheel.impl.compat;
+
+import java.util.function.Supplier;
+
+import com.google.common.base.Suppliers;
+
+import net.fabricmc.loader.api.FabricLoader;
+
+public enum CompatMods {
+ SODIUM,
+ EMBEDDIUM;
+
+ private final Supplier isLoaded;
+
+ CompatMods() {
+ isLoaded = Suppliers.memoize(() -> FabricLoader.getInstance().isModLoaded(name()));
+ }
+
+ public boolean isLoaded() {
+ return isLoaded.get();
+ }
+}
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java b/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java
new file mode 100644
index 000000000..7b39a062b
--- /dev/null
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java
@@ -0,0 +1,19 @@
+package dev.engine_room.flywheel.impl.compat;
+
+import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
+import net.caffeinemc.mods.sodium.api.blockentity.BlockEntityRenderHandler;
+import net.caffeinemc.mods.sodium.api.blockentity.BlockEntityRenderPredicate;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntityType;
+
+public class SodiumCompat {
+ public static Object forBlockEntityType(BlockEntityType type) {
+ BlockEntityRenderPredicate predicate = (getter, pos, be) -> VisualizationHelper.tryAddBlockEntity(be);
+ BlockEntityRenderHandler.instance().addRenderPredicate(type, predicate);
+ return predicate;
+ }
+
+ public static void removePredicate(BlockEntityType type, Object predicate) {
+ BlockEntityRenderHandler.instance().removeRenderPredicate(type, (BlockEntityRenderPredicate) predicate);
+ }
+}
diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BlockEntityTypeMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BlockEntityTypeMixin.java
index 93c660d8d..ab9ef91f2 100644
--- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BlockEntityTypeMixin.java
+++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BlockEntityTypeMixin.java
@@ -5,6 +5,8 @@
import org.spongepowered.asm.mixin.Unique;
import dev.engine_room.flywheel.api.visualization.BlockEntityVisualizer;
+import dev.engine_room.flywheel.impl.compat.CompatMods;
+import dev.engine_room.flywheel.impl.compat.SodiumCompat;
import dev.engine_room.flywheel.impl.extension.BlockEntityTypeExtension;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
@@ -12,8 +14,13 @@
@Mixin(BlockEntityType.class)
abstract class BlockEntityTypeMixin implements BlockEntityTypeExtension {
@Unique
+ @Nullable
private BlockEntityVisualizer super T> flywheel$visualizer;
+ @Unique
+ @Nullable
+ private Object flywheel$sodiumPredicate;
+
@Override
@Nullable
public BlockEntityVisualizer super T> flywheel$getVisualizer() {
@@ -22,6 +29,13 @@ abstract class BlockEntityTypeMixin implements BlockEntit
@Override
public void flywheel$setVisualizer(@Nullable BlockEntityVisualizer super T> visualizer) {
+ if (CompatMods.SODIUM.isLoaded() && !CompatMods.EMBEDDIUM.isLoaded()) {
+ if (flywheel$visualizer == null && visualizer != null) {
+ flywheel$sodiumPredicate = SodiumCompat.forBlockEntityType((BlockEntityType>) (Object) this);
+ } else if (flywheel$visualizer != null && visualizer == null && flywheel$sodiumPredicate != null) {
+ SodiumCompat.removePredicate((BlockEntityType>) (Object) this, flywheel$sodiumPredicate);
+ }
+ }
this.flywheel$visualizer = visualizer;
}
}
diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts
index 0e6bc0621..3fb91957c 100644
--- a/fabric/build.gradle.kts
+++ b/fabric/build.gradle.kts
@@ -72,7 +72,7 @@ dependencies {
modImplementation("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
modApi("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}")
- modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-fabric")
+ modCompileOnly(":sodium-fabric-0.6.0-beta.2+mc1.21.1")
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-fabric")
"forApi"(project(path = ":common", configuration = "commonApiOnly"))
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
deleted file mode 100644
index 865ba1978..000000000
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package dev.engine_room.flywheel.impl.mixin.sodium;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Redirect;
-
-import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
-import net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
-import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher;
-import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
-import net.minecraft.world.level.block.entity.BlockEntity;
-
-@Mixin(value = ChunkBuilderMeshingTask.class, remap = false)
-abstract class ChunkBuilderMeshingTaskMixin {
- @Redirect(method = "execute(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;)Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
- private BlockEntityRenderer> flywheel$redirectGetRenderer(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity) {
- if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
- return null;
- }
- return dispatcher.getRenderer(blockEntity);
- }
-}
diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
deleted file mode 100644
index 0eda36012..000000000
--- a/fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package dev.engine_room.flywheel.impl.mixin.sodium;
-
-import java.util.List;
-import java.util.Set;
-import java.util.function.Supplier;
-
-import org.objectweb.asm.tree.ClassNode;
-import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
-import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
-
-import com.google.common.base.Suppliers;
-
-import net.fabricmc.loader.api.FabricLoader;
-
-public class SodiumMixinPlugin implements IMixinConfigPlugin {
- private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> FabricLoader.getInstance().isModLoaded("sodium"));
-
- @Override
- public void onLoad(String mixinPackage) {
- }
-
- @Override
- public String getRefMapperConfig() {
- return null;
- }
-
- @Override
- public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
- return IS_SODIUM_LOADED.get();
- }
-
- @Override
- public void acceptTargets(Set myTargets, Set otherTargets) {
- }
-
- @Override
- public List getMixins() {
- return null;
- }
-
- @Override
- public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
- }
-
- @Override
- public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
- }
-}
diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json
index 7bfb5a37f..995855618 100644
--- a/fabric/src/main/resources/fabric.mod.json
+++ b/fabric/src/main/resources/fabric.mod.json
@@ -24,7 +24,6 @@
"mixins": [
"flywheel.backend.mixins.json",
"flywheel.impl.mixins.json",
- "flywheel.impl.sodium.mixins.json",
"flywheel.impl.fabric.mixins.json"
],
"depends": {
@@ -32,6 +31,6 @@
"fabric-api": "${fabric_api_version_range}"
},
"breaks": {
- "sodium": "<0.5.0"
+ "sodium": ["<0.6.0-beta.2"]
}
}
diff --git a/fabric/src/main/resources/flywheel.impl.sodium.mixins.json b/fabric/src/main/resources/flywheel.impl.sodium.mixins.json
deleted file mode 100644
index 0fd5cf55f..000000000
--- a/fabric/src/main/resources/flywheel.impl.sodium.mixins.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "required": true,
- "minVersion": "0.8",
- "package": "dev.engine_room.flywheel.impl.mixin.sodium",
- "compatibilityLevel": "JAVA_21",
- "refmap": "flywheel.refmap.json",
- "plugin": "dev.engine_room.flywheel.impl.mixin.sodium.SodiumMixinPlugin",
- "client": [
- "ChunkBuilderMeshingTaskMixin"
- ],
- "injectors": {
- "defaultRequire": 1
- }
-}
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts
index 3ee25ef3c..2bdcad863 100644
--- a/forge/build.gradle.kts
+++ b/forge/build.gradle.kts
@@ -67,12 +67,6 @@ loom {
add(backend, "backend-flywheel.refmap.json")
}
- forge {
- mixinConfig("flywheel.backend.mixins.json")
- mixinConfig("flywheel.impl.mixins.json")
- mixinConfig("flywheel.impl.sodium.mixins.json")
- }
-
runs {
configureEach {
property("forge.logging.markers", "")
@@ -88,7 +82,7 @@ repositories {
dependencies {
neoForge("net.neoforged:neoforge:${property("neoforge_version")}")
- modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-neoforge")
+ modCompileOnly(":sodium-neoforge-0.6.0-beta.2+mc1.21.1")
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge")
//modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
deleted file mode 100644
index 865ba1978..000000000
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package dev.engine_room.flywheel.impl.mixin.sodium;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Redirect;
-
-import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
-import net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
-import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher;
-import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
-import net.minecraft.world.level.block.entity.BlockEntity;
-
-@Mixin(value = ChunkBuilderMeshingTask.class, remap = false)
-abstract class ChunkBuilderMeshingTaskMixin {
- @Redirect(method = "execute(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;)Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
- private BlockEntityRenderer> flywheel$redirectGetRenderer(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity) {
- if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
- return null;
- }
- return dispatcher.getRenderer(blockEntity);
- }
-}
diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
deleted file mode 100644
index 94d5d560f..000000000
--- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package dev.engine_room.flywheel.impl.mixin.sodium;
-
-import java.util.List;
-import java.util.Set;
-import java.util.function.Supplier;
-
-import org.objectweb.asm.tree.ClassNode;
-import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
-import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
-
-import com.google.common.base.Suppliers;
-
-import net.neoforged.fml.loading.LoadingModList;
-
-public class SodiumMixinPlugin implements IMixinConfigPlugin {
- private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("sodium") != null);
-
- @Override
- public void onLoad(String mixinPackage) {
- }
-
- @Override
- public String getRefMapperConfig() {
- return null;
- }
-
- @Override
- public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
- return IS_SODIUM_LOADED.get();
- }
-
- @Override
- public void acceptTargets(Set myTargets, Set otherTargets) {
- }
-
- @Override
- public List getMixins() {
- return null;
- }
-
- @Override
- public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
- }
-
- @Override
- public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
- }
-}
diff --git a/forge/src/main/resources/META-INF/neoforge.mods.toml b/forge/src/main/resources/META-INF/neoforge.mods.toml
index 0fe5ee7c5..4256c62e6 100644
--- a/forge/src/main/resources/META-INF/neoforge.mods.toml
+++ b/forge/src/main/resources/META-INF/neoforge.mods.toml
@@ -18,8 +18,6 @@ displayTest = "IGNORE_ALL_VERSION"
config = "flywheel.backend.mixins.json"
[[mixins]]
config = "flywheel.impl.mixins.json"
-[[mixins]]
-config = "flywheel.impl.sodium.mixins.json"
[[dependencies.${mod_id}]]
modId = "minecraft"
diff --git a/forge/src/main/resources/flywheel.impl.sodium.mixins.json b/forge/src/main/resources/flywheel.impl.sodium.mixins.json
deleted file mode 100644
index 0fd5cf55f..000000000
--- a/forge/src/main/resources/flywheel.impl.sodium.mixins.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "required": true,
- "minVersion": "0.8",
- "package": "dev.engine_room.flywheel.impl.mixin.sodium",
- "compatibilityLevel": "JAVA_21",
- "refmap": "flywheel.refmap.json",
- "plugin": "dev.engine_room.flywheel.impl.mixin.sodium.SodiumMixinPlugin",
- "client": [
- "ChunkBuilderMeshingTaskMixin"
- ],
- "injectors": {
- "defaultRequire": 1
- }
-}
diff --git a/gradle.properties b/gradle.properties
index 336e9a4a6..2be244cd0 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -20,7 +20,6 @@ neoforge_version_range = [21.0.167,)
# General build dependency versions
java_version = 21
arch_loom_version=1.7.412
-cursegradle_version = 1.4.0
parchment_version = 2024.07.07
# Minecraft build dependency versions
diff --git a/libs/sodium-fabric-0.6.0-beta.2+mc1.21.1.jar b/libs/sodium-fabric-0.6.0-beta.2+mc1.21.1.jar
new file mode 100644
index 0000000000000000000000000000000000000000..537f16846165bc5025fcac4a5f35dda5de41c9e0
GIT binary patch
literal 1263840
zcmb5VV~j3N@TfU9&lqRSGv+(CZQHhO+qP}nwr$&<{r&gD?k1ailUwPoba!>7llt^j
zs#;DG6buyz3JMAc2#D~%`Tq*)e@kg$C4L%l84)^Zei?BQVMQfcX%X!>e%U}iq~KeU
zFUXq^Xf$is~H;?Ldstq3J8i-_uVe{$A73bl+5Rl?|mu}B%#zX
z|BS>DP2uvzg0SV(R)+*c{OdXR>M}GzGX`u8|0bmd>HMNkM;>*cll7x1!)3G`;<7Jf?@(iRS*);%xZ*
z>}<0n^(3y=vj|{D#jWV!ObO{CoIdMhizwuklZ1o{E)hg~{x2viz(7E9|I4t!{C7i2
zTu@j>QJB`+s9J3^=BNeP`&1Qa2htNK1CQKC6AXgPkWF3Biq7R443^lBGW^0sg$PX{
zqvhe5U75t${22_EM3#vrez+scv7$`%A=|R_Hv9G{v~k{=CReK1dhP*nv^G{3_P+Fy
z{%L>u+dI}7e&u=RTTyjz{(aFKXEo%r&-2!OwpF0ZgA~6);x(`#8U3I-d1iHEvVS}g
zuc#qWO7qz4eOUeQm;aL%)xn|gYQ)c(ytcWItm~!-rom}YJ)}R=BCf`2S{#049VoE5
zDyv%hEBtSTHTcz=mke8jYHUqz7khRnZV3`^uCvBb7ni$nXdfPh+Eip?V_2>iazD$U
zu)8$*vdo3)b?Ls<73If_=iQgV9_`9xmkyjM%UC2%ylGIu_i$fDee|f#v}7ZdZpg8h
zeibulu1xu5JQ)*QN6Pn^C&rWfL~jSIdwfDE*}fI$_=a4=g#8>2ps3;>YS5Q3P_Iv_
zDxo{k@iD$`cZF)~tpbFOV+H54_~b>^o+F=e@iGS3F)z4$1yF0&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