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;
|
||||
|
||||
Reference in New Issue
Block a user