Port to 1.11

This commit is contained in:
yueh
2016-12-08 12:42:00 +01:00
parent 589730bfad
commit ed9e6dd21c
262 changed files with 4027 additions and 3954 deletions
@@ -53,7 +53,7 @@ public class StackSizeRenderer
final boolean unicodeFlag = fontRenderer.getUnicodeFlag();
fontRenderer.setUnicodeFlag( false );
if( is.stackSize == 0 )
if( is.getCount() == 0 )
{
final String craftLabelText = AEConfig.instance().useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft.getLocal();
GlStateManager.disableLighting();
@@ -70,7 +70,7 @@ public class StackSizeRenderer
GlStateManager.enableBlend();
}
final long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize;
final long amount = aeStack != null ? aeStack.getStackSize() : is.getCount();
if( amount != 0 )
{
final String stackSize = this.getToBeRenderedStackSize( amount );
@@ -174,10 +174,10 @@ public class CubeBuilder
putVertexTR( builder, face, x2, y2, z1, uv );
break;
case NORTH:
putVertexBR( builder, face, x2, y2, z1, uv );
putVertexTR( builder, face, x2, y1, z1, uv );
putVertexTL( builder, face, x2, y2, z1, uv );
putVertexTL( builder, face, x2, y1, z1, uv );
putVertexTL( builder, face, x1, y1, z1, uv );
putVertexBL( builder, face, x1, y2, z1, uv );
putVertexTL( builder, face, x1, y2, z1, uv );
break;
case SOUTH:
putVertexBL( builder, face, x1, y2, z2, uv );
@@ -26,7 +26,7 @@ import net.minecraft.world.World;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.EffectType;
import appeng.core.CommonHelper;
import appeng.core.AppEng;
import appeng.entity.EntityFloatingItem;
import appeng.entity.ICanDie;
@@ -46,7 +46,7 @@ public class AssemblerFX extends Particle implements ICanDie
this.motionZ = 0;
this.speed = speed;
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
w.spawnEntityInWorld( this.fi );
w.spawnEntity( this.fi );
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
}
@@ -76,7 +76,7 @@ public class AssemblerFX extends Particle implements ICanDie
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.move(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -99,10 +99,10 @@ public class AssemblerFX extends Particle implements ICanDie
if( this.time > 4.0 )
{
this.time -= 4.0;
// if ( CommonHelper.proxy.shouldAddParticles( r ) )
// if ( AppEng.proxy.shouldAddParticles( r ) )
for( int x = 0; x < (int) Math.ceil( this.speed / 5 ); x++ )
{
CommonHelper.proxy.spawnEffect( EffectType.Crafting, this.worldObj, this.posX, this.posY, this.posZ, null );
AppEng.proxy.spawnEffect( EffectType.Crafting, this.world, this.posX, this.posY, this.posZ, null );
}
}
}
@@ -55,9 +55,9 @@ public class CraftingFx extends ParticleBreaking
this.particleTextureIndex = ParticleTextures.BlockEnergyParticle;
this.particleMaxAge /= 1.2;
this.startBlkX = MathHelper.floor_double( this.posX );
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
this.startBlkX = MathHelper.floor( this.posX );
this.startBlkY = MathHelper.floor( this.posY );
this.startBlkZ = MathHelper.floor( this.posZ );
}
@Override
@@ -84,9 +84,9 @@ public class CraftingFx extends ParticleBreaking
float offY = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTick );
float offZ = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTick );
final int blkX = MathHelper.floor_double( offX );
final int blkY = MathHelper.floor_double( offY );
final int blkZ = MathHelper.floor_double( offZ );
final int blkX = MathHelper.floor( offX );
final int blkY = MathHelper.floor( offY );
final int blkZ = MathHelper.floor( offZ );
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
offX -= interpPosX;
@@ -127,7 +127,7 @@ public class CraftingFx extends ParticleBreaking
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.moveEntity( this.motionX, this.motionY, this.motionZ );
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -54,9 +54,9 @@ public class EnergyFx extends ParticleBreaking
this.particleScale = 3.5f;
this.particleTextureIndex = ParticleTextures.BlockEnergyParticle;
this.startBlkX = MathHelper.floor_double( this.posX );
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
this.startBlkX = MathHelper.floor( this.posX );
this.startBlkY = MathHelper.floor( this.posY );
this.startBlkZ = MathHelper.floor( this.posZ );
}
@Override
@@ -78,9 +78,9 @@ public class EnergyFx extends ParticleBreaking
final float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTicks - interpPosY );
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTicks - interpPosZ );
final int blkX = MathHelper.floor_double( this.posX );
final int blkY = MathHelper.floor_double( this.posY );
final int blkZ = MathHelper.floor_double( this.posZ );
final int blkX = MathHelper.floor( this.posX );
final int blkY = MathHelper.floor( this.posY );
final int blkZ = MathHelper.floor( this.posZ );
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
@@ -117,7 +117,7 @@ public class EnergyFx extends ParticleBreaking
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.moveEntity( this.motionX, this.motionY, this.motionZ );
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -89,7 +89,7 @@ public class LightningFX extends Particle
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.move(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -125,7 +125,7 @@ public class LightningFX extends Particle
double oy = 0;
double oz = 0;
final EntityPlayer p = Minecraft.getMinecraft().thePlayer;
final EntityPlayer p = Minecraft.getMinecraft().player;
double offX = -rZ;
double offY = MathHelper.cos( (float) ( Math.PI / 2.0f + p.rotationPitch * 0.017453292F ) );
double offZ = rX;
@@ -68,7 +68,7 @@ public class MatterCannonFX extends ParticleBreaking
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.moveEntity( this.motionX, this.motionY, this.motionZ );
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -212,10 +212,10 @@ class GlassBakedModel implements IBakedModel
// Apply the u,v shift.
// This mirrors the logic from OffsetIcon from 1.7
float u1 = MathHelper.clamp_float( 0 - uOffset, 0, 16 );
float u2 = MathHelper.clamp_float( 16 - uOffset, 0, 16 );
float v1 = MathHelper.clamp_float( 0 - vOffset, 0, 16 );
float v2 = MathHelper.clamp_float( 16 - vOffset, 0, 16 );
float u1 = MathHelper.clamp( 0 - uOffset, 0, 16 );
float u2 = MathHelper.clamp( 16 - uOffset, 0, 16 );
float v1 = MathHelper.clamp( 0 - vOffset, 0, 16 );
float v2 = MathHelper.clamp( 16 - vOffset, 0, 16 );
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( vertexFormat );
builder.setTexture( sprite );
@@ -50,7 +50,7 @@ public class SkyCompassTESR extends FastTESR<TileSkyCompass>
public void renderTileEntityFast( TileSkyCompass te, double x, double y, double z, float partialTicks, int destroyStage, VertexBuffer buffer )
{
if( !te.hasWorldObj() )
if( !te.hasWorld() )
{
return;
}
@@ -63,7 +63,7 @@ public class SkyCompassTESR extends FastTESR<TileSkyCompass>
BlockPos pos = te.getPos();
IBlockAccess world = MinecraftForgeClient.getRegionRenderCache( te.getWorld(), pos );
IBlockState state = world.getBlockState( pos );
if( state.getPropertyNames().contains( Properties.StaticProperty ) )
if( state.getPropertyKeys().contains( Properties.StaticProperty ) )
{
state = state.withProperty( Properties.StaticProperty, false );
}