Port to MC 1.19-pre3

This commit is contained in:
Jonas Herzig
2022-05-27 07:03:35 +02:00
parent 9f8957f468
commit 9ce25f711f
41 changed files with 299 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend;
import com.replaymod.render.blend.data.DMaterial;

View File

@@ -2,7 +2,7 @@ package com.replaymod.render.blend;
import com.replaymod.render.blend.data.DScene;
import com.replaymod.render.blend.data.Serializer;
//#if MC>=10800
//#if MC>=10800 && MC<11900
// FIXME 1.15
//#if MC<11500
//$$ import com.replaymod.render.blend.exporters.ChunkExporter;
@@ -53,7 +53,7 @@ public class BlendState implements Exporter {
this.blenderFile = BlenderFactory.newBlenderFile(file);
this.factory = new BlenderFactory(blenderFile);
//#if MC>=10800
//#if MC>=10800 && MC<11900
RenderState renderState = new RenderState(this);
register(renderState);
// FIXME 1.15

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.exporters;
import com.replaymod.core.versions.MCVer;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendMeshBuilder;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendMeshBuilder;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.exporters;
import com.replaymod.core.versions.MCVer;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendState;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.exporters;
import com.replaymod.core.versions.MCVer;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;

View File

@@ -1,4 +1,4 @@
//#if MC>=10800
//#if MC>=10800 && MC<11900
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;

View File

@@ -3,7 +3,6 @@ package com.replaymod.render.mixin;
//#if MC>=10904
import com.replaymod.core.versions.MCVer;
import com.replaymod.render.blend.BlendState;
import com.replaymod.render.blend.exporters.ParticlesExporter;
import com.replaymod.render.hooks.EntityRendererHandler;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleManager;
@@ -12,6 +11,11 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
//#if MC>=11900
//#else
import com.replaymod.render.blend.exporters.ParticlesExporter;
//#endif
//#if MC>=11500
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.util.math.Quaternion;
@@ -52,10 +56,12 @@ public abstract class MixinParticleManager {
}
private void buildGeometry(Particle particle, VertexConsumer vertexConsumer, Camera camera, float partialTicks) {
//#if MC<11900
BlendState blendState = BlendState.getState();
if (blendState != null) {
blendState.get(ParticlesExporter.class).onRender(particle, partialTicks);
}
//#endif
particle.buildGeometry(vertexConsumer, camera, partialTicks);
}
//#else