Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -9,33 +9,35 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
public class RenderStatue extends TileEntitySpecialRenderer<TileEntityStatue> {
private int destroyStage = 0; // Gets set each time a statue is rendered to allow access from the layer renderer
@Override
public void renderTileEntityAt(TileEntityStatue statue, double x, double y, double z, float partialTicks, int destroyStage){
public void renderTileEntityAt(TileEntityStatue statue, double x, double y, double z, float partialTicks,
int destroyStage){
// Multiblock support for the breaking animation. The chest has its own way of doing this in
// TileEntityRendererDispatcher, but I don't have access to that.
if(statue.position != 1 && destroyStage >= 0){
TileEntity tileentity = statue.getWorld().getTileEntity(statue.getPos().down(statue.position-1));
//System.out.println(tileentity);
TileEntity tileentity = statue.getWorld().getTileEntity(statue.getPos().down(statue.position - 1));
// System.out.println(tileentity);
if(tileentity instanceof TileEntityStatue){
// If this is the block breaking animation pass and this isn't the bottom block, divert the call to
// the bottom block.
this.renderTileEntityAt((TileEntityStatue)tileentity, x, y - (statue.position-1), z, partialTicks, destroyStage);
this.renderTileEntityAt((TileEntityStatue)tileentity, x, y - (statue.position - 1), z, partialTicks,
destroyStage);
}
}
if(statue.creature != null && statue.position == 1){
this.destroyStage = destroyStage;
GlStateManager.pushMatrix();
// The next line makes stuff render in the same place relative to the world wherever the player is.
GlStateManager.translate((float)x + 0.5F, (float)y, (float)z + 0.5F);
GlStateManager.enableLighting();
float yaw = statue.creature.prevRotationYaw;
int i = statue.creature.getBrightnessForRender(0);
@@ -51,12 +53,12 @@ public class RenderStatue extends TileEntitySpecialRenderer<TileEntityStatue> {
// For some reason, passing in the partialTicks causes the entity to spin round really fast
Minecraft.getMinecraft().getRenderManager().doRenderEntity(statue.creature, 0, 0, 0, 0, 0, true);
if(!statue.isIce) statue.creature.setInvisible(false);
GlStateManager.popMatrix();
}
}
public ResourceLocation getBlockBreakingTexture(){
return destroyStage < 0 ? null : DESTROY_STAGES[destroyStage];
}