Skip to content

Commit

Permalink
Neo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Dec 11, 2024
1 parent 92d421c commit 1ed1d36
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 41 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

val MINECRAFT_VERSION by extra { "1.21.4" }
val NEOFORGE_VERSION by extra { "21.4.0-beta" }
val NEOFORGE_VERSION by extra { "21.4.13-beta" }
val FABRIC_LOADER_VERSION by extra { "0.16.9" }
val FABRIC_API_VERSION by extra { "0.110.5+1.21.4" }

Expand Down
6 changes: 3 additions & 3 deletions common/src/main/java/net/irisshaders/iris/NeoLambdas.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.irisshaders.iris;

public class NeoLambdas {
public static final String NEO_RENDER_SKY = "lambda$addSkyPass$10";
public static final String NEO_RENDER_SKY = "lambda$addSkyPass$12";
public static final String NEO_RENDER_MAIN_PASS = "lambda$addMainPass$2";
public static final String NEO_RENDER_WEATHER = "lambda$addWeatherPass$5";
public static final String NEO_RENDER_CLOUDS = "lambda$addCloudsPass$4";
public static final String NEO_RENDER_WEATHER = "lambda$addWeatherPass$7";
public static final String NEO_RENDER_CLOUDS = "lambda$addCloudsPass$6";
public static final String NEO_PARTICLE = "lambda$static$26";
public static final String NEO_WEATHER_TYPE = "lambda$createWeather$35";
}
2 changes: 1 addition & 1 deletion neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ dependencies {
runtimeOnly("org.sinytra.forgified-fabric-api:fabric-rendering-data-attachment-v1:0.3.48+73761d2e19")
runtimeOnly("org.sinytra.forgified-fabric-api:fabric-block-view-api-v2:1.0.10+9afaaf8c19")

implementation("maven.modrinth", "sodium", "mc1.21.4-0.6.2-neoforge")
implementation("maven.modrinth", "sodium", "mc1.21.4-0.6.3-neoforge")
includeAdditional("io.github.douira:glsl-transformer:2.0.1")
includeAdditional("org.anarres:jcpp:1.4.14")
includeAdditional("org.antlr:antlr4-runtime:4.13.1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
package net.irisshaders.iris.mixin.fantastic;
package net.irisshaders.iris.mixin.forge;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import net.irisshaders.iris.Iris;
import net.irisshaders.iris.fantastic.ParticleRenderingPhase;
import net.irisshaders.iris.fantastic.PhasedParticleEngine;
import net.irisshaders.iris.pipeline.WorldRenderingPipeline;
import net.irisshaders.iris.shaderpack.properties.ParticleRenderingSettings;
import net.minecraft.client.Camera;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.ParticleEngine;
import net.minecraft.client.particle.ParticleRenderType;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderBuffers;
import net.minecraft.client.renderer.culling.Frustum;
import org.joml.Matrix4fStack;
import org.joml.Matrix4fc;
import org.joml.Matrix4f;
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.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.function.Predicate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
package net.irisshaders.iris.mixin.fantastic;
package net.irisshaders.iris.mixin.forge;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
import com.mojang.blaze3d.systems.RenderSystem;
import net.irisshaders.iris.fantastic.ParticleRenderingPhase;
import net.irisshaders.iris.fantastic.PhasedParticleEngine;
import net.irisshaders.iris.pipeline.programs.ShaderAccess;
import net.irisshaders.iris.fantastic.IrisParticleRenderTypes;
import net.minecraft.client.Camera;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleEngine;
import net.minecraft.client.particle.ParticleRenderType;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.culling.Frustum;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.function.Predicate;
import java.util.function.Supplier;

/**
* Extends the ParticleEngine class to allow multiple phases of particle rendering.
Expand Down Expand Up @@ -64,4 +48,14 @@ public class MixinParticleEngine {
// RenderSystem.setShader(ShaderAccess.getParticleTranslucentShader());
//}
}

@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/util/List;of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;"))
private static <E> List<E> iris$changeList(E e1, E e2, E e3) {
return (List<E>) List.of(IrisParticleRenderTypes.TERRAIN_OPAQUE, e1, e2, e3);
}

//@Inject(method = "renderParticleType(Lnet/minecraft/client/Camera;FLnet/minecraft/client/renderer/MultiBufferSource$BufferSource;Lnet/minecraft/client/particle/ParticleRenderType;Ljava/util/Queue;Lnet/minecraft/client/renderer/culling/Frustum;)V", at = @At("HEAD"))
private static void i(Camera p_382847_, float p_383032_, MultiBufferSource.BufferSource p_383105_, ParticleRenderType p_383179_, Queue<Particle> p_383046_, Frustum frustum, CallbackInfo ci) {
System.out.println("Rendering particle " + p_383179_.name());
}
}
2 changes: 2 additions & 0 deletions neoforge/src/main/resources/mixins.iris.forge.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"MixinItemBlockRenderTypes",
"MixinRenderFlame",
"MixinRenderMekasuit",
"MixinLevelRenderer",
"MixinParticleEngine",
"MixinRenderSPS",
"MixinShadowRenderer",
"MixinVBOIE"
Expand Down

0 comments on commit 1ed1d36

Please sign in to comment.