Disable .blend export for 1.7.10

This commit is contained in:
Jonas Herzig
2018-06-11 00:27:45 +02:00
parent c5229628e3
commit c48187e784
21 changed files with 56 additions and 17 deletions

View File

@@ -16,8 +16,6 @@ import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.client.resources.ResourcePackRepository;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.crash.CrashReportCategory;
@@ -62,6 +60,8 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
//#if MC>=10800
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.GlStateManager.BooleanState;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.world.WorldType;
import net.minecraftforge.fml.common.eventhandler.EventBus;
//#else
@@ -533,6 +533,7 @@ public class MCVer {
//#endif
}
//#if MC>=10800
//#if MC>=10904
//#if MC>=11200
public static BufferBuilder getBuffer(Tessellator tessellator) {
@@ -553,6 +554,7 @@ public class MCVer {
public static List<VertexFormatElement> getElements(VertexFormat vertexFormat) {
return vertexFormat.getElements();
}
//#endif
public static Tessellator Tessellator_getInstance() {
//#if MC>=10800

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend;
import com.replaymod.render.blend.data.DMaterial;
@@ -263,3 +264,4 @@ public class BlendMeshBuilder
return mesh;
}
}
//#endif

View File

@@ -2,12 +2,14 @@ package com.replaymod.render.blend;
import com.replaymod.render.blend.data.DScene;
import com.replaymod.render.blend.data.Serializer;
//#if MC>=10800
import com.replaymod.render.blend.exporters.ChunkExporter;
import com.replaymod.render.blend.exporters.EntityExporter;
import com.replaymod.render.blend.exporters.ItemExporter;
import com.replaymod.render.blend.exporters.ParticlesExporter;
import com.replaymod.render.blend.exporters.RenderState;
import com.replaymod.render.blend.exporters.TileEntityExporter;
//#endif
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.util.ReportedException;
@@ -48,6 +50,7 @@ public class BlendState implements Exporter {
this.blenderFile = BlenderFactory.newBlenderFile(file);
this.factory = new BlenderFactory(blenderFile);
//#if MC>=10800
RenderState renderState = new RenderState(this);
register(renderState);
register(new ChunkExporter());
@@ -55,6 +58,7 @@ public class BlendState implements Exporter {
register(new TileEntityExporter(renderState));
register(new ParticlesExporter(renderState));
register(new ItemExporter(renderState));
//#endif
}
public void register(Exporter exporter) {

View File

@@ -19,12 +19,6 @@ import org.cakelab.blender.nio.CPointer;
import org.lwjgl.util.vector.Vector2f;
import org.lwjgl.util.vector.Vector3f;
//#if MC>=10904
import net.minecraft.util.math.Vec3i;
//#else
//$$ import net.minecraft.util.Vec3i;
//#endif
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -197,7 +191,7 @@ public class DMesh {
public static class Vertex {
public Vector3f pos;
public Vec3i norm = Vec3i.NULL_VECTOR;
public short normX, normY, normZ;
public Vertex(float x, float y, float z) {
this.pos = new Vector3f(x, y, z);
@@ -209,9 +203,9 @@ public class DMesh {
pos.set(1, this.pos.y);
pos.set(2, this.pos.z);
CArrayFacade<Short> norm = mVert.getNo();
norm.set(0, (short) this.norm.getX());
norm.set(1, (short) this.norm.getY());
norm.set(2, (short) this.norm.getZ());
norm.set(0, this.normX);
norm.set(1, this.normY);
norm.set(2, this.normZ);
}
}

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendMeshBuilder;
@@ -173,3 +174,4 @@ public class ChunkExporter implements Exporter {
private static final int STRIDE = 28;
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendState;
@@ -81,3 +82,4 @@ public class EntityExporter implements Exporter {
renderState.pop();
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendMeshBuilder;
@@ -133,3 +134,4 @@ public class ItemExporter implements Exporter {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendMeshBuilder;
@@ -104,3 +105,4 @@ public class ModelRendererExporter implements Exporter {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendMeshBuilder;
@@ -168,3 +169,4 @@ public class ParticlesExporter implements Exporter {
particleObjectsSeen = new IdentityHashMap<>();
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendState;
@@ -141,3 +142,4 @@ public class RenderState implements Exporter {
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.exporters;
import com.replaymod.render.blend.BlendState;
@@ -106,3 +107,4 @@ public class TileEntityExporter implements Exporter {
tileEntityObjectsSeen = new IdentityHashMap<>();
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -29,3 +30,4 @@ public abstract class MixinChunkRenderWorker {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -53,3 +54,4 @@ public abstract class MixinEffectRenderer {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -63,3 +64,4 @@ public abstract class MixinModelRenderer {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -66,3 +67,4 @@ public abstract class MixinRenderGlobal {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -32,3 +33,4 @@ public abstract class MixinRenderItem {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -48,3 +49,4 @@ public abstract class MixinRenderManager {
}
}
}
//#endif

View File

@@ -1,3 +1,4 @@
//#if MC>=10800
package com.replaymod.render.blend.mixin;
import com.replaymod.render.blend.BlendState;
@@ -43,3 +44,4 @@ public abstract class MixinTileEntityRendererDispatcher {
}
}
}
//#endif

View File

@@ -359,6 +359,11 @@ public class GuiRenderSettings extends GuiScreen implements Closeable {
&& videoWidth != videoHeight) {
return "replaymod.gui.rendersettings.customresolution.warning.ods";
}
//#if MC<10800
//$$ if (method == RenderSettings.RenderMethod.BLEND) {
//$$ return "replaymod.gui.rendersettings.no_blend_on_1_7_10";
//$$ }
//#endif
return null;
}

View File

@@ -2,7 +2,6 @@ package com.replaymod.render.mixin;
//#if MC<10904
//$$ import com.replaymod.render.blend.BlendState;
//$$ import com.replaymod.render.blend.exporters.ParticlesExporter;
//$$ import com.replaymod.render.hooks.EntityRendererHandler;
//$$ import net.minecraft.client.Minecraft;
//$$ import net.minecraft.client.particle.EffectRenderer;
@@ -13,6 +12,7 @@ package com.replaymod.render.mixin;
//$$ import org.spongepowered.asm.mixin.injection.Redirect;
//$$
//#if MC>=10800
//$$ import com.replaymod.render.blend.exporters.ParticlesExporter;
//$$ import net.minecraft.client.renderer.WorldRenderer;
//#else
//$$ import net.minecraft.client.renderer.Tessellator;
@@ -83,10 +83,12 @@ package com.replaymod.render.mixin;
//$$ rotYZ = (float) (-rotZ * Math.sin(pitch));
//$$ rotXY = (float) (rotX * Math.sin(pitch));
//$$ }
//$$ BlendState blendState = BlendState.getState();
//$$ if (blendState != null) {
//$$ blendState.get(ParticlesExporter.class).onRender(fx, partialTicks);
//$$ }
//#if MC>=10800
//$$ BlendState blendState = BlendState.getState();
//$$ if (blendState != null) {
//$$ blendState.get(ParticlesExporter.class).onRender(fx, partialTicks);
//$$ }
//#endif
//#if MC>=10809
//$$ fx.renderParticle(worldRenderer, view, partialTicks, rotX, rotXZ, rotZ, rotYZ, rotXY);
//#else