Port to 1.11
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user