Port to 1.11
This commit is contained in:
@@ -58,7 +58,7 @@ import appeng.client.render.tesr.InscriberTESR;
|
||||
import appeng.client.render.textures.ParticleTextures;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketAssemblerAnimation;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
@@ -117,7 +117,7 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return Minecraft.getMinecraft().theWorld;
|
||||
return Minecraft.getMinecraft().world;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,7 +137,7 @@ public class ClientHelper extends ServerHelper
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
final List<EntityPlayer> o = new ArrayList<>();
|
||||
o.add( Minecraft.getMinecraft().thePlayer );
|
||||
o.add( Minecraft.getMinecraft().player );
|
||||
return o;
|
||||
}
|
||||
else
|
||||
@@ -147,29 +147,29 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnEffect( final EffectType effect, final World worldObj, final double posX, final double posY, final double posZ, final Object o )
|
||||
public void spawnEffect( final EffectType effect, final World world, final double posX, final double posY, final double posZ, final Object o )
|
||||
{
|
||||
if( AEConfig.instance().isEnableEffects() )
|
||||
{
|
||||
switch( effect )
|
||||
{
|
||||
case Assembler:
|
||||
this.spawnAssembler( worldObj, posX, posY, posZ, o );
|
||||
this.spawnAssembler( world, posX, posY, posZ, o );
|
||||
return;
|
||||
case Vibrant:
|
||||
this.spawnVibrant( worldObj, posX, posY, posZ );
|
||||
this.spawnVibrant( world, posX, posY, posZ );
|
||||
return;
|
||||
case Crafting:
|
||||
this.spawnCrafting( worldObj, posX, posY, posZ );
|
||||
this.spawnCrafting( world, posX, posY, posZ );
|
||||
return;
|
||||
case Energy:
|
||||
this.spawnEnergy( worldObj, posX, posY, posZ );
|
||||
this.spawnEnergy( world, posX, posY, posZ );
|
||||
return;
|
||||
case Lightning:
|
||||
this.spawnLightning( worldObj, posX, posY, posZ );
|
||||
this.spawnLightning( world, posX, posY, posZ );
|
||||
return;
|
||||
case LightningArc:
|
||||
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3d) o );
|
||||
this.spawnLightningArc( world, posX, posY, posZ, (Vec3d) o );
|
||||
return;
|
||||
default:
|
||||
}
|
||||
@@ -216,7 +216,7 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final EntityPlayer player = mc.player;
|
||||
|
||||
return this.renderModeForPlayer( player );
|
||||
}
|
||||
@@ -225,12 +225,12 @@ public class ClientHelper extends ServerHelper
|
||||
public void triggerUpdates()
|
||||
{
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
if( mc == null || mc.thePlayer == null || mc.theWorld == null )
|
||||
if( mc == null || mc.player == null || mc.world == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final EntityPlayer player = mc.player;
|
||||
|
||||
final int x = (int) player.posX;
|
||||
final int y = (int) player.posY;
|
||||
@@ -238,7 +238,7 @@ public class ClientHelper extends ServerHelper
|
||||
|
||||
final int range = 16 * 16;
|
||||
|
||||
mc.theWorld.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range );
|
||||
mc.world.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -262,17 +262,17 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnAssembler( final World worldObj, final double posX, final double posY, final double posZ, final Object o )
|
||||
private void spawnAssembler( final World world, final double posX, final double posY, final double posZ, final Object o )
|
||||
{
|
||||
final PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
||||
|
||||
final AssemblerFX fx = new AssemblerFX( worldObj, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
||||
final AssemblerFX fx = new AssemblerFX( world, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnVibrant( final World w, final double x, final double y, final double z )
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
if( AppEng.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
{
|
||||
final double d0 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
final double d1 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
@@ -313,15 +313,15 @@ public class ClientHelper extends ServerHelper
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightning( final World worldObj, final double posX, final double posY, final double posZ )
|
||||
private void spawnLightning( final World world, final double posX, final double posY, final double posZ )
|
||||
{
|
||||
final LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
|
||||
final LightningFX fx = new LightningFX( world, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3d second )
|
||||
private void spawnLightningArc( final World world, final double posX, final double posY, final double posZ, final Vec3d second )
|
||||
{
|
||||
final LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
final LightningFX fx = new LightningArcFX( world, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final EntityPlayer player = mc.player;
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
final EnumHand hand;
|
||||
|
||||
@@ -251,14 +251,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
if( fs.isEnabled() )
|
||||
{
|
||||
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||
18 );
|
||||
}
|
||||
else
|
||||
{
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
|
||||
GlStateManager.enableBlend();
|
||||
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||
18 );
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
protected void mouseClickMove( final int x, final int y, final int c, final long d )
|
||||
{
|
||||
final Slot slot = this.getSlot( x, y );
|
||||
final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
final ItemStack itemstack = this.mc.player.inventory.getItemStack();
|
||||
|
||||
if( this.getScrollBar() != null )
|
||||
{
|
||||
@@ -326,7 +326,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
@Override
|
||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int mouseButton, final ClickType clickType )
|
||||
{
|
||||
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
final EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
|
||||
if( slot instanceof SlotFake )
|
||||
{
|
||||
@@ -521,7 +521,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for( final Slot inventorySlot : slots )
|
||||
{
|
||||
if( inventorySlot != null && inventorySlot.canTakeStack(
|
||||
this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
|
||||
this.mc.player ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
|
||||
inventorySlot, this.dbl_whichItem, true ) )
|
||||
{
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
|
||||
@@ -540,7 +540,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
final Slot theSlot = this.getSlotUnderMouse();
|
||||
|
||||
if( this.mc.thePlayer.inventory.getItemStack() == null && theSlot != null )
|
||||
if( this.mc.player.inventory.getItemStack() == null && theSlot != null )
|
||||
{
|
||||
for( int j = 0; j < 9; ++j )
|
||||
{
|
||||
@@ -594,7 +594,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for( final Slot slot : slots )
|
||||
{
|
||||
// isPointInRegion
|
||||
if( this.isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
if( this.isPointInRegion( slot.xPos, slot.yPos, 16, 16, mouseX, mouseY ) )
|
||||
{
|
||||
return slot;
|
||||
}
|
||||
@@ -704,7 +704,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if( !this.isPowered() )
|
||||
{
|
||||
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66111111 );
|
||||
drawRect( s.xPos, s.yPos, 16 + s.xPos, 16 + s.yPos, 0x66111111 );
|
||||
}
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
@@ -713,7 +713,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
// Annoying but easier than trying to splice into render item
|
||||
super.drawSlot( new Size1Slot( s ) );
|
||||
|
||||
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xDisplayPosition, s.yDisplayPosition );
|
||||
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xPos, s.yPos );
|
||||
|
||||
}
|
||||
catch( final Exception err )
|
||||
@@ -745,8 +745,8 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.blendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
final float par1 = aes.xDisplayPosition;
|
||||
final float par2 = aes.yDisplayPosition;
|
||||
final float par1 = aes.xPos;
|
||||
final float par2 = aes.yPos;
|
||||
final float par3 = uv_x * 16;
|
||||
final float par4 = uv_y * 16;
|
||||
|
||||
@@ -786,7 +786,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
try
|
||||
{
|
||||
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.theWorld );
|
||||
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.world );
|
||||
}
|
||||
catch( final Exception err )
|
||||
{
|
||||
@@ -802,7 +802,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.itemRender.zLevel = 100.0F;
|
||||
|
||||
GlStateManager.disableLighting();
|
||||
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66ff6666 );
|
||||
drawRect( s.xPos, s.yPos, 16 + s.xPos, 16 + s.yPos, 0x66ff6666 );
|
||||
GlStateManager.enableLighting();
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
|
||||
@@ -82,10 +82,10 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
currentToolTip.add( TextFormatting.GRAY + format );
|
||||
}
|
||||
}
|
||||
else if( stack.stackSize > BigNumber || ( stack.stackSize > 1 && stack.isItemDamaged() ) )
|
||||
else if( stack.getCount() > BigNumber || ( stack.getCount() > 1 && stack.isItemDamaged() ) )
|
||||
{
|
||||
final String local = ButtonToolTips.ItemsStored.getLocal();
|
||||
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize );
|
||||
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.getCount() );
|
||||
final String format = String.format( local, formattedAmount );
|
||||
|
||||
currentToolTip.add( TextFormatting.GRAY + format );
|
||||
@@ -119,7 +119,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
if( myStack != null )
|
||||
{
|
||||
@SuppressWarnings( "unchecked" )
|
||||
final List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
final List<String> currentToolTip = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
||||
{
|
||||
@@ -134,10 +134,10 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
this.drawTooltip( x, y, currentToolTip );
|
||||
return;
|
||||
}
|
||||
else if( stack.stackSize > BigNumber )
|
||||
else if( stack.getCount() > BigNumber )
|
||||
{
|
||||
List<String> var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
List<String> var4 = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
|
||||
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.getCount() ) );
|
||||
this.drawTooltip( x, y, var4 );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class Size1Slot extends Slot
|
||||
|
||||
public Size1Slot( Slot delegate )
|
||||
{
|
||||
super( delegate.inventory, delegate.getSlotIndex(), delegate.xDisplayPosition, delegate.yDisplayPosition );
|
||||
super( delegate.inventory, delegate.getSlotIndex(), delegate.xPos, delegate.yPos );
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class Size1Slot extends Slot
|
||||
if( orgStack != null )
|
||||
{
|
||||
ItemStack modifiedStack = orgStack.copy();
|
||||
modifiedStack.stackSize = 1;
|
||||
modifiedStack.setCount( 1 );
|
||||
return modifiedStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
final String which = Integer.toString( x );
|
||||
if( invData.hasKey( which ) )
|
||||
{
|
||||
current.getInventory().setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
|
||||
current.getInventory().setInventorySlotContents( x, new ItemStack( invData.getCompoundTag( which ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
for( int i = 0; i < outTag.tagCount(); i++ )
|
||||
{
|
||||
|
||||
final ItemStack parsedItemStack = ItemStack.loadItemStackFromNBT( outTag.getCompoundTagAt( i ) );
|
||||
final ItemStack parsedItemStack = new ItemStack( outTag.getCompoundTagAt( i ) );
|
||||
if( parsedItemStack != null )
|
||||
{
|
||||
final String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase();
|
||||
|
||||
@@ -323,7 +323,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
{
|
||||
if( s instanceof AppEngSlot )
|
||||
{
|
||||
if( ( (Slot) s ).xDisplayPosition < 197 )
|
||||
if( ( (Slot) s ).xPos < 197 )
|
||||
{
|
||||
this.repositionSlot( (AppEngSlot) s );
|
||||
}
|
||||
@@ -332,10 +332,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
|
||||
{
|
||||
final Slot g = (Slot) s;
|
||||
if( g.xDisplayPosition > 0 && g.yDisplayPosition > 0 )
|
||||
if( g.xPos > 0 && g.yPos > 0 )
|
||||
{
|
||||
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xDisplayPosition );
|
||||
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yDisplayPosition );
|
||||
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xPos );
|
||||
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yPos );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -443,7 +443,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
protected void repositionSlot( final AppEngSlot s )
|
||||
{
|
||||
s.yDisplayPosition = s.getY() + this.ySize - 78 - 5;
|
||||
s.yPos = s.getY() + this.ySize - 78 - 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -253,7 +253,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
if( myStack != null )
|
||||
{
|
||||
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
List<String> currentToolTip = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
while( currentToolTip.size() > 1 )
|
||||
{
|
||||
|
||||
@@ -176,6 +176,6 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
{
|
||||
final int offsetPlayerSide = s.isPlayerSide() ? 5 : 3;
|
||||
|
||||
s.yDisplayPosition = s.getY() + this.ySize - 78 - offsetPlayerSide;
|
||||
s.yPos = s.getY() + this.ySize - 78 - offsetPlayerSide;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,11 +76,6 @@ public class SlotDisconnected extends AppEngSlot
|
||||
return super.getStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getHasStack()
|
||||
{
|
||||
|
||||
@@ -47,11 +47,6 @@ public class SlotME extends Slot
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid( final ItemStack par1ItemStack )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user