Update blend export to 1.12.2

This commit is contained in:
Jonas Herzig
2018-03-03 18:40:52 +01:00
parent 6794b58524
commit 1bdf7da525
16 changed files with 407 additions and 102 deletions

View File

@@ -12,18 +12,31 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(TileEntityRendererDispatcher.class)
public abstract class MixinTileEntityRendererDispatcher {
@Inject(method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntity;DDDFI)V",
//#if MC>=11200
@Inject(method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntity;DDDFIF)V",
at = @At("HEAD"))
public void preRender(TileEntity tileEntity, double x, double y, double z, float renderPartialTicks, int destroyStage, CallbackInfo ci) {
public void preRender(TileEntity tileEntity, double x, double y, double z, float renderPartialTicks, int destroyStage, float alpha, CallbackInfo ci) {
//#else
//$$ @Inject(method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntity;DDDFI)V",
//$$ at = @At("HEAD"))
//$$ public void preRender(TileEntity tileEntity, double x, double y, double z, float renderPartialTicks, int destroyStage, CallbackInfo ci) {
//$$ float alpha = 1;
//#endif
BlendState blendState = BlendState.getState();
if (blendState != null) {
blendState.get(TileEntityExporter.class).preRender(tileEntity, x, y, z, renderPartialTicks, destroyStage);
blendState.get(TileEntityExporter.class).preRender(tileEntity, x, y, z, renderPartialTicks, destroyStage, alpha);
}
}
@Inject(method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntity;DDDFI)V",
//#if MC>=11200
@Inject(method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntity;DDDFIF)V",
at = @At("RETURN"))
public void postRender(TileEntity tileEntity, double x, double y, double z, float renderPartialTicks, int destroyStage, CallbackInfo ci) {
public void postRender(TileEntity tileEntity, double x, double y, double z, float renderPartialTicks, int destroyStage, float alpha, CallbackInfo ci) {
//#else
//$$ @Inject(method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntity;DDDFI)V",
//$$ at = @At("RETURN"))
//$$ public void postRender(TileEntity tileEntity, double x, double y, double z, float renderPartialTicks, int destroyStage, CallbackInfo ci) {
//#endif
BlendState blendState = BlendState.getState();
if (blendState != null) {
blendState.get(TileEntityExporter.class).postRender();