diff --git a/build.gradle b/build.gradle index 2014b41faa..ad61546065 100644 --- a/build.gradle +++ b/build.gradle @@ -8,23 +8,7 @@ loom { silentMojangMappingsLicense() accessWidenerPath = file("src/main/resources/iris.accesswidener") - forge { - convertAccessWideners = true - mixinConfigs = [ - "mixins.oculus.json", - "mixins.oculus.fantastic.json", - "mixins.oculus.vertexformat.json", - "mixins.oculus.bettermipmaps.json", - "mixins.oculus.fixes.maxfpscrash.json", - "oculus-batched-entity-rendering.mixins.json", - "mixins.oculus.compat.sodium.json", - "mixins.oculus.compat.indigo.json", - "mixins.oculus.compat.dh.json", - "mixins.oculus.compat.indium.json", - "mixins.oculus.compat.pixelmon.json" - ] - } - mixin.defaultRefmapName = "oculus-mixins-refmap.json" + // mixin.defaultRefmapName = "oculus-mixins-refmap.json" } configurations { @@ -103,7 +87,7 @@ repositories { dependencies { minecraft "com.mojang:minecraft:${minecraft_version}" mappings loom.officialMojangMappings() - forge "net.neoforged:forge:${minecraft_version}-${forge_version}" + neoForge "net.neoforged:neoforge:${forge_version}" modCompileOnly "org.embeddedt:embeddium-${minecraft_version}:${embeddium_version}" compileOnly "maven.modrinth:distanthorizons:2.0.1-a-1.20.1" @@ -139,6 +123,8 @@ shadowJar { } remapJar { + atAccessWideners.add(loom.accessWidenerPath.get().asFile.name) + inputFile.set shadowJar.archiveFile dependsOn shadowJar } diff --git a/gradle.properties b/gradle.properties index b692dd2aa4..89ff29eb64 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,17 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx3G -loom.platform = forge +loom.platform = neoforge # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.20.1 - forge_version=47.1.84 + minecraft_version=1.20.4 + forge_version=20.4.56-beta # Mod Properties - mod_version = 1.6.13 + mod_version = 1.6.14 maven_group = net.coderbot archives_base_name = oculus # Dependencies - embeddium_version=0.2.14-git.dbe9f77+mc1.20.1 + embeddium_version=0.2.13-git.43882f7+mc1.20.4 diff --git a/src/main/java/net/coderbot/iris/Iris.java b/src/main/java/net/coderbot/iris/Iris.java index c83c878e50..e3cb8f5a71 100644 --- a/src/main/java/net/coderbot/iris/Iris.java +++ b/src/main/java/net/coderbot/iris/Iris.java @@ -33,17 +33,17 @@ import net.minecraft.network.chat.ClickEvent; import net.minecraft.network.chat.Component; -import net.minecraftforge.client.ConfigScreenHandler; -import net.minecraftforge.client.event.InputEvent; -import net.minecraftforge.client.event.RegisterKeyMappingsEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.IExtensionPoint; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.fml.loading.FMLPaths; -import net.minecraftforge.network.NetworkConstants; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.client.ConfigScreenHandler; +import net.neoforged.neoforge.client.event.InputEvent; +import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.fml.IExtensionPoint; +import net.neoforged.fml.ModList; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.loading.FMLPaths; +import net.neoforged.neoforge.network.NetworkConstants; import org.jetbrains.annotations.NotNull; import org.lwjgl.glfw.GLFW; @@ -89,9 +89,9 @@ public class Iris { private static PipelineManager pipelineManager; private static IrisConfig irisConfig; private static FileSystem zipFileSystem; - private static KeyMapping reloadKeybind; - private static KeyMapping toggleShadersKeybind; - private static KeyMapping shaderpackScreenKeybind; + private static final KeyMapping reloadKeybind = new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds"); + private static final KeyMapping toggleShadersKeybind = new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds"); + private static final KeyMapping shaderpackScreenKeybind = new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds"); private static final Map shaderPackOptionQueue = new HashMap<>(); // Flag variable used when reloading @@ -105,10 +105,10 @@ public class Iris { // Change this for snapshots! private static String backupVersionNumber = "1.20.3"; - public Iris() { + public Iris(IEventBus bus) { try { - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onKeyRegister); - MinecraftForge.EVENT_BUS.addListener(this::onKeyInput); + bus.addListener(this::onKeyRegister); + NeoForge.EVENT_BUS.addListener(this::onKeyInput); IRIS_VERSION = ModList.get().getModContainerById(MODID).get().getModInfo().getVersion().toString(); @@ -127,11 +127,7 @@ public Iris() { * *

This is called right before options are loaded, so we can add key bindings here.

*/ - public void onEarlyInitialize() { - reloadKeybind = new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds"); - toggleShadersKeybind = new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds"); - shaderpackScreenKeybind = new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds"); - + public static void onEarlyInitialize() { try { if (!Files.exists(getShaderpacksDirectory())) { Files.createDirectories(getShaderpacksDirectory()); diff --git a/src/main/java/net/coderbot/iris/block_rendering/BlockMaterialMapping.java b/src/main/java/net/coderbot/iris/block_rendering/BlockMaterialMapping.java index 8f46aa0f41..45e96f4268 100644 --- a/src/main/java/net/coderbot/iris/block_rendering/BlockMaterialMapping.java +++ b/src/main/java/net/coderbot/iris/block_rendering/BlockMaterialMapping.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.Property; -import net.minecraftforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/net/coderbot/iris/block_rendering/BlockRenderingSettings.java b/src/main/java/net/coderbot/iris/block_rendering/BlockRenderingSettings.java index 6b57c32ddc..19a29c5596 100644 --- a/src/main/java/net/coderbot/iris/block_rendering/BlockRenderingSettings.java +++ b/src/main/java/net/coderbot/iris/block_rendering/BlockRenderingSettings.java @@ -6,7 +6,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; import org.jetbrains.annotations.Nullable; import java.util.Map; diff --git a/src/main/java/net/coderbot/iris/compat/dh/mixin/IrisDHCompatMixinPlugin.java b/src/main/java/net/coderbot/iris/compat/dh/mixin/IrisDHCompatMixinPlugin.java index d7e39b6728..434e601e98 100644 --- a/src/main/java/net/coderbot/iris/compat/dh/mixin/IrisDHCompatMixinPlugin.java +++ b/src/main/java/net/coderbot/iris/compat/dh/mixin/IrisDHCompatMixinPlugin.java @@ -1,6 +1,6 @@ package net.coderbot.iris.compat.dh.mixin; -import net.minecraftforge.fml.loading.FMLLoader; +import net.neoforged.fml.loading.FMLLoader; import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; diff --git a/src/main/java/net/coderbot/iris/compat/indigo/mixin/IrisIndigoCompatMixinPlugin.java b/src/main/java/net/coderbot/iris/compat/indigo/mixin/IrisIndigoCompatMixinPlugin.java index bb833dd852..b2d18829a0 100644 --- a/src/main/java/net/coderbot/iris/compat/indigo/mixin/IrisIndigoCompatMixinPlugin.java +++ b/src/main/java/net/coderbot/iris/compat/indigo/mixin/IrisIndigoCompatMixinPlugin.java @@ -1,6 +1,6 @@ package net.coderbot.iris.compat.indigo.mixin; -import net.minecraftforge.fml.loading.FMLLoader; +import net.neoforged.fml.loading.FMLLoader; import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; diff --git a/src/main/java/net/coderbot/iris/compat/indium/mixin/IrisIndiumCompatMixinPlugin.java b/src/main/java/net/coderbot/iris/compat/indium/mixin/IrisIndiumCompatMixinPlugin.java index eb3dcd2695..3e8f21d583 100644 --- a/src/main/java/net/coderbot/iris/compat/indium/mixin/IrisIndiumCompatMixinPlugin.java +++ b/src/main/java/net/coderbot/iris/compat/indium/mixin/IrisIndiumCompatMixinPlugin.java @@ -1,6 +1,6 @@ package net.coderbot.iris.compat.indium.mixin; -import net.minecraftforge.fml.loading.FMLLoader; +import net.neoforged.fml.loading.FMLLoader; import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; diff --git a/src/main/java/net/coderbot/iris/compat/pixelmon/mixin/OculusPixelmonCompatMixinPlugin.java b/src/main/java/net/coderbot/iris/compat/pixelmon/mixin/OculusPixelmonCompatMixinPlugin.java index 9189816f7c..7ad3b92ede 100644 --- a/src/main/java/net/coderbot/iris/compat/pixelmon/mixin/OculusPixelmonCompatMixinPlugin.java +++ b/src/main/java/net/coderbot/iris/compat/pixelmon/mixin/OculusPixelmonCompatMixinPlugin.java @@ -1,6 +1,6 @@ package net.coderbot.iris.compat.pixelmon.mixin; -import net.minecraftforge.fml.loading.FMLLoader; +import net.neoforged.fml.loading.FMLLoader; import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; diff --git a/src/main/java/net/coderbot/iris/gui/OldImageButton.java b/src/main/java/net/coderbot/iris/gui/OldImageButton.java index 91611ddc82..36d541d9e6 100644 --- a/src/main/java/net/coderbot/iris/gui/OldImageButton.java +++ b/src/main/java/net/coderbot/iris/gui/OldImageButton.java @@ -1,15 +1,15 @@ package net.coderbot.iris.gui; import com.mojang.blaze3d.systems.RenderSystem; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; -@Environment(EnvType.CLIENT) +@OnlyIn(Dist.CLIENT) public class OldImageButton extends Button { protected final ResourceLocation resourceLocation; protected final int xTexStart; diff --git a/src/main/java/net/coderbot/iris/mixin/MixinItemBlockRenderTypes.java b/src/main/java/net/coderbot/iris/mixin/MixinItemBlockRenderTypes.java index cc2b639540..5c946a7294 100644 --- a/src/main/java/net/coderbot/iris/mixin/MixinItemBlockRenderTypes.java +++ b/src/main/java/net/coderbot/iris/mixin/MixinItemBlockRenderTypes.java @@ -5,7 +5,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/src/main/java/net/coderbot/iris/mixin/MixinOptions_Entrypoint.java b/src/main/java/net/coderbot/iris/mixin/MixinOptions_Entrypoint.java index e375340ed0..4be1a10445 100644 --- a/src/main/java/net/coderbot/iris/mixin/MixinOptions_Entrypoint.java +++ b/src/main/java/net/coderbot/iris/mixin/MixinOptions_Entrypoint.java @@ -25,6 +25,6 @@ public class MixinOptions_Entrypoint { } iris$initialized = true; - new Iris().onEarlyInitialize(); + Iris.onEarlyInitialize(); } } diff --git a/src/main/java/net/coderbot/iris/mixin/OculusMixinPlugin.java b/src/main/java/net/coderbot/iris/mixin/OculusMixinPlugin.java index 281d0f7aed..afd0786aa2 100644 --- a/src/main/java/net/coderbot/iris/mixin/OculusMixinPlugin.java +++ b/src/main/java/net/coderbot/iris/mixin/OculusMixinPlugin.java @@ -1,6 +1,6 @@ package net.coderbot.iris.mixin; -import net.minecraftforge.fml.loading.LoadingModList; +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; diff --git a/src/main/java/net/coderbot/iris/mixin/fantastic/MixinStationaryItemParticle.java b/src/main/java/net/coderbot/iris/mixin/fantastic/MixinStationaryItemParticle.java index 27998c8264..53ade7b9cc 100644 --- a/src/main/java/net/coderbot/iris/mixin/fantastic/MixinStationaryItemParticle.java +++ b/src/main/java/net/coderbot/iris/mixin/fantastic/MixinStationaryItemParticle.java @@ -10,8 +10,8 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.item.BlockItem; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.model.data.ModelData; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; diff --git a/src/main/java/net/coderbot/iris/mixin/fantastic/MixinTerrainParticle.java b/src/main/java/net/coderbot/iris/mixin/fantastic/MixinTerrainParticle.java index 6d37b2b9bd..909f112e9a 100644 --- a/src/main/java/net/coderbot/iris/mixin/fantastic/MixinTerrainParticle.java +++ b/src/main/java/net/coderbot/iris/mixin/fantastic/MixinTerrainParticle.java @@ -10,8 +10,8 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.model.data.ModelData; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; diff --git a/src/main/java/net/coderbot/iris/pipeline/HandRenderer.java b/src/main/java/net/coderbot/iris/pipeline/HandRenderer.java index 7f801aad9f..a0747c541b 100644 --- a/src/main/java/net/coderbot/iris/pipeline/HandRenderer.java +++ b/src/main/java/net/coderbot/iris/pipeline/HandRenderer.java @@ -3,7 +3,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelData; import org.joml.Matrix4f; import net.coderbot.batchedentityrendering.impl.FullyBufferedMultiBufferSource; import net.coderbot.iris.mixin.GameRendererAccessor; diff --git a/src/main/java/net/coderbot/iris/pipeline/ShaderPrinter.java b/src/main/java/net/coderbot/iris/pipeline/ShaderPrinter.java index da426bdb90..df39eb1e65 100644 --- a/src/main/java/net/coderbot/iris/pipeline/ShaderPrinter.java +++ b/src/main/java/net/coderbot/iris/pipeline/ShaderPrinter.java @@ -11,7 +11,7 @@ import net.coderbot.iris.Iris; import net.coderbot.iris.pipeline.transform.PatchShaderType; -import net.minecraftforge.fml.loading.FMLPaths; +import net.neoforged.fml.loading.FMLPaths; /** * Static class that deals with printing the patched_shader folder. diff --git a/src/main/java/net/coderbot/iris/pipeline/newshader/NewShaderTests.java b/src/main/java/net/coderbot/iris/pipeline/newshader/NewShaderTests.java index f3ce772418..f55fc0f83c 100644 --- a/src/main/java/net/coderbot/iris/pipeline/newshader/NewShaderTests.java +++ b/src/main/java/net/coderbot/iris/pipeline/newshader/NewShaderTests.java @@ -26,7 +26,7 @@ import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceProvider; import com.mojang.blaze3d.vertex.VertexFormat; -import net.minecraftforge.fml.loading.FMLPaths; +import net.neoforged.fml.loading.FMLPaths; import org.apache.commons.io.IOUtils; import java.io.ByteArrayInputStream; diff --git a/src/main/java/net/coderbot/iris/shaderpack/ShaderProperties.java b/src/main/java/net/coderbot/iris/shaderpack/ShaderProperties.java index 094b1e5989..6cc84e7b0f 100644 --- a/src/main/java/net/coderbot/iris/shaderpack/ShaderProperties.java +++ b/src/main/java/net/coderbot/iris/shaderpack/ShaderProperties.java @@ -29,7 +29,7 @@ import net.coderbot.iris.shaderpack.preprocessor.PropertiesPreprocessor; import net.coderbot.iris.shaderpack.texture.TextureStage; import net.coderbot.iris.uniforms.custom.CustomUniforms; -import net.minecraftforge.fml.loading.FMLPaths; +import net.neoforged.fml.loading.FMLPaths; import java.io.IOException; import java.io.StringReader; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 6b9c63e9b0..0418c8f3bd 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -20,16 +20,39 @@ provides = ["iris"] "mixin.features.render.entity"=false "mixin.features.render.gui.font"=false +[[mixins]] +config = "mixins.oculus.json" +[[mixins]] +config = "mixins.oculus.fantastic.json" +[[mixins]] +config = "mixins.oculus.vertexformat.json" +[[mixins]] +config = "mixins.oculus.bettermipmaps.json" +[[mixins]] +config = "mixins.oculus.fixes.maxfpscrash.json" +[[mixins]] +config = "oculus-batched-entity-rendering.mixins.json" +[[mixins]] +config = "mixins.oculus.compat.sodium.json" +[[mixins]] +config = "mixins.oculus.compat.indigo.json" +[[mixins]] +config = "mixins.oculus.compat.dh.json" +[[mixins]] +config = "mixins.oculus.compat.indium.json" +[[mixins]] +config = "mixins.oculus.compat.pixelmon.json" + [[dependencies.oculus]] modId = "minecraft" mandatory = true -versionRange = "[1.20.1]" +versionRange = "[1.20.3,]" ordering = "NONE" side = "BOTH" [[dependencies.oculus]] modId = "embeddium" mandatory = false -versionRange = "[0.2.14,)" +versionRange = "[0.2.13,)" ordering = "NONE" side = "CLIENT" \ No newline at end of file diff --git a/src/main/resources/iris.accesswidener b/src/main/resources/iris.accesswidener index 44206808e9..eb490a040b 100644 --- a/src/main/resources/iris.accesswidener +++ b/src/main/resources/iris.accesswidener @@ -11,7 +11,6 @@ accessible class net/minecraft/client/renderer/RenderType$CompositeState accessible class net/minecraft/client/renderer/FogRenderer$FogData accessible class net/minecraft/client/renderer/texture/Stitcher$Holder accessible class net/minecraft/world/level/biome/Biome$ClimateSettings -accessible class net/minecraft/client/renderer/LevelRenderer$RenderChunkInfo accessible class net/minecraft/client/Options$FieldAccess accessible class net/minecraft/client/renderer/texture/SpriteContents$AnimatedTexture accessible class net/minecraft/client/renderer/texture/SpriteContents$FrameInfo diff --git a/src/main/resources/mixins.oculus.json b/src/main/resources/mixins.oculus.json index c0338b89c4..8e412b60b2 100644 --- a/src/main/resources/mixins.oculus.json +++ b/src/main/resources/mixins.oculus.json @@ -61,7 +61,6 @@ "entity_render_context.MixinHumanoidArmorLayer", "entity_render_context.MixinItemRenderer", "fabulous.MixinDisableFabulousGraphics", - "gui.MixinForgeGui", "gui.MixinGui", "gui.MixinVideoSettingsScreen", "math.MixinMatrix4f", diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java index 1042462b47..a507b24c92 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java @@ -1,6 +1,6 @@ package net.coderbot.iris.compat.sodium.mixin; -import net.minecraftforge.fml.loading.LoadingModList; +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; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinCube.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinCube.java deleted file mode 100644 index e62a113b8d..0000000000 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinCube.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.coderbot.iris.compat.sodium.mixin.fast_render; - -import me.jellysquid.mods.sodium.client.model.ModelCuboidAccessor; -import me.jellysquid.mods.sodium.client.render.immediate.model.ModelCuboid; -import net.minecraft.client.model.geom.ModelPart; -import net.minecraft.core.Direction; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import java.util.Set; - -@Mixin(ModelPart.Cube.class) -public class MixinCube implements ModelCuboidAccessor { - private ModelCuboid sodium$cuboid; - - @Mutable - @Shadow - @Final - private float minX; - - @Redirect(method = "", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/model/geom/ModelPart$Cube;minX:F", ordinal = 0)) - private void onInit(ModelPart.Cube instance, float value, int u, int v, float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extraX, float extraY, float extraZ, boolean mirror, float textureWidth, float textureHeight, Set renderDirections) { - this.sodium$cuboid = new ModelCuboid(u, v, x, y, z, sizeX, sizeY, sizeZ, extraX, extraY, extraZ, mirror, textureWidth, textureHeight, renderDirections); - - this.minX = value; - } - - @Override - public ModelCuboid sodium$copy() { - return this.sodium$cuboid; - } -}