|
1 |
| -package net.irisshaders.iris.mixin.fantastic; |
| 1 | +package net.irisshaders.iris.mixin.forge; |
2 | 2 |
|
3 |
| -import com.google.common.collect.ImmutableList; |
4 |
| -import com.google.common.collect.Sets; |
5 |
| -import com.mojang.blaze3d.systems.RenderSystem; |
6 |
| -import net.irisshaders.iris.fantastic.ParticleRenderingPhase; |
7 |
| -import net.irisshaders.iris.fantastic.PhasedParticleEngine; |
8 |
| -import net.irisshaders.iris.pipeline.programs.ShaderAccess; |
| 3 | +import net.irisshaders.iris.fantastic.IrisParticleRenderTypes; |
9 | 4 | import net.minecraft.client.Camera;
|
10 | 5 | import net.minecraft.client.particle.Particle;
|
11 | 6 | import net.minecraft.client.particle.ParticleEngine;
|
12 | 7 | import net.minecraft.client.particle.ParticleRenderType;
|
13 |
| -import net.minecraft.client.renderer.LightTexture; |
14 | 8 | import net.minecraft.client.renderer.MultiBufferSource;
|
15 | 9 | import net.minecraft.client.renderer.culling.Frustum;
|
16 |
| -import org.spongepowered.asm.mixin.Final; |
17 | 10 | import org.spongepowered.asm.mixin.Mixin;
|
18 |
| -import org.spongepowered.asm.mixin.Shadow; |
19 |
| -import org.spongepowered.asm.mixin.Unique; |
20 | 11 | import org.spongepowered.asm.mixin.injection.At;
|
21 |
| -import org.spongepowered.asm.mixin.injection.Inject; |
22 | 12 | import org.spongepowered.asm.mixin.injection.Redirect;
|
23 | 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
24 | 14 |
|
25 |
| -import javax.annotation.Nullable; |
26 |
| -import java.util.ArrayList; |
27 | 15 | import java.util.List;
|
28 |
| -import java.util.Map; |
29 | 16 | import java.util.Queue;
|
30 |
| -import java.util.Set; |
31 |
| -import java.util.function.Predicate; |
32 |
| -import java.util.function.Supplier; |
33 | 17 |
|
34 | 18 | /**
|
35 | 19 | * Extends the ParticleEngine class to allow multiple phases of particle rendering.
|
@@ -64,4 +48,14 @@ public class MixinParticleEngine {
|
64 | 48 | // RenderSystem.setShader(ShaderAccess.getParticleTranslucentShader());
|
65 | 49 | //}
|
66 | 50 | }
|
| 51 | + |
| 52 | + @Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/util/List;of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;")) |
| 53 | + private static <E> List<E> iris$changeList(E e1, E e2, E e3) { |
| 54 | + return (List<E>) List.of(IrisParticleRenderTypes.TERRAIN_OPAQUE, e1, e2, e3); |
| 55 | + } |
| 56 | + |
| 57 | + //@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")) |
| 58 | + 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) { |
| 59 | + System.out.println("Rendering particle " + p_383179_.name()); |
| 60 | + } |
67 | 61 | }
|
0 commit comments