Make use of the source remapping feature of The Preprocessor plugin

This commit is contained in:
Jonas Herzig
2019-04-24 15:02:33 +02:00
parent 6127e0a027
commit 2ee91515f7
72 changed files with 401 additions and 1121 deletions

View File

@@ -106,7 +106,7 @@ public class BlendMeshBuilder
throw new IllegalStateException("Not building!");
} else {
if (!wellBehaved) {
getBuffer(Tessellator.getInstance()).finishDrawing();
Tessellator.getInstance().getBuffer().finishDrawing();
}
//#if MC<10809

View File

@@ -12,6 +12,7 @@ import com.replaymod.render.blend.exporters.TileEntityExporter;
//#endif
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.crash.ReportedException;
import org.apache.commons.io.output.NullOutputStream;
import org.blender.utils.BlenderFactory;
import org.cakelab.blender.io.BlenderFile;
@@ -82,7 +83,7 @@ public class BlendState implements Exporter {
CrashReport report = CrashReport.makeCrashReport(e, "Setup of blend exporter");
CrashReportCategory category = report.makeCategory("Exporter");
addDetail(category, "Exporter", exporter::toString);
throw newReportedException(report);
throw new ReportedException(report);
}
}
}
@@ -96,7 +97,7 @@ public class BlendState implements Exporter {
CrashReport report = CrashReport.makeCrashReport(e, "Tear down of blend exporter");
CrashReportCategory category = report.makeCategory("Exporter");
addDetail(category, "Exporter", exporter::toString);
throw newReportedException(report);
throw new ReportedException(report);
}
}
@@ -134,7 +135,7 @@ public class BlendState implements Exporter {
CrashReportCategory category = report.makeCategory("Exporter");
addDetail(category, "Exporter", exporter::toString);
addDetail(category, "Frame", () -> String.valueOf(frame));
throw newReportedException(report);
throw new ReportedException(report);
}
}
}
@@ -149,7 +150,7 @@ public class BlendState implements Exporter {
CrashReportCategory category = report.makeCategory("Exporter");
addDetail(category, "Exporter", exporter::toString);
addDetail(category, "Frame", () -> String.valueOf(frame));
throw newReportedException(report);
throw new ReportedException(report);
}
}

View File

@@ -26,7 +26,6 @@ import java.io.IOException;
import java.util.IdentityHashMap;
import java.util.Map;
import static com.replaymod.core.versions.MCVer.*;
import static com.replaymod.render.blend.Util.getGlModelViewMatrix;
public class ParticlesExporter implements Exporter {
@@ -111,9 +110,9 @@ public class ParticlesExporter implements Exporter {
// renderer translate there again.
// Instead of actually translating, we just add the translation on the current model-view-matrix.
Matrix4f modelView = getGlModelViewMatrix();
double dx = particle.prevPosX + (particle.posX - particle.prevPosX) * renderPartialTicks - interpPosX();
double dy = particle.prevPosY + (particle.posY - particle.prevPosY) * renderPartialTicks - interpPosY();
double dz = particle.prevPosZ + (particle.posZ - particle.prevPosZ) * renderPartialTicks - interpPosZ();
double dx = particle.prevPosX + (particle.posX - particle.prevPosX) * renderPartialTicks - Particle.interpPosX;
double dy = particle.prevPosY + (particle.posY - particle.prevPosY) * renderPartialTicks - Particle.interpPosY;
double dz = particle.prevPosZ + (particle.posZ - particle.prevPosZ) * renderPartialTicks - Particle.interpPosZ;
Vector3f offset = new Vector3f((float) dx, (float) dy, (float) dz);
Matrix4f.translate(offset, modelView, modelView);
renderState.pushModelView(modelView);