diff --git a/src/main/java/forestry/apiculture/entities/EntityFXBee.java b/src/main/java/forestry/apiculture/entities/EntityFXBee.java index 08de8115b..a467882ec 100644 --- a/src/main/java/forestry/apiculture/entities/EntityFXBee.java +++ b/src/main/java/forestry/apiculture/entities/EntityFXBee.java @@ -36,9 +36,9 @@ public class EntityFXBee extends EntityFX { this.particleScale *= 0.2F; this.particleMaxAge = (int) (80.0D / (Math.random() * 0.8D + 0.2D)); - this.xSpeed *= 0.9D; - this.ySpeed *= 0.015D; - this.zSpeed *= 0.9D; + this.motionX *= 0.9D; + this.motionY *= 0.015D; + this.motionZ *= 0.9D; } /** @@ -49,21 +49,21 @@ public class EntityFXBee extends EntityFX { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; - this.moveEntity(this.xSpeed, this.ySpeed, this.zSpeed); + this.moveEntity(this.motionX, this.motionY, this.motionZ); if (this.particleAge == this.particleMaxAge / 2) { - this.xSpeed = (this.originX - this.posX) * 0.04; - this.zSpeed = (this.originZ - this.posZ) * 0.04; + this.motionX = (this.originX - this.posX) * 0.04; + this.motionZ = (this.originZ - this.posZ) * 0.04; } if (this.particleAge < this.particleMaxAge / 4 || this.particleAge > this.particleMaxAge * 3 / 4) { - this.xSpeed *= 0.92 + 0.2D * rand.nextFloat(); - this.ySpeed = (this.ySpeed + 0.2 * (-0.5 + rand.nextFloat())) / 2; - this.zSpeed *= 0.92 + 0.2D * rand.nextFloat(); + this.motionX *= 0.92 + 0.2D * rand.nextFloat(); + this.motionY = (this.motionY + 0.2 * (-0.5 + rand.nextFloat())) / 2; + this.motionZ *= 0.92 + 0.2D * rand.nextFloat(); } else { - this.xSpeed *= 0.95; - this.ySpeed = (this.ySpeed + 0.2 * (-0.5 + rand.nextFloat())) / 2; - this.zSpeed *= 0.95; + this.motionX *= 0.95; + this.motionY = (this.motionY + 0.2 * (-0.5 + rand.nextFloat())) / 2; + this.motionZ *= 0.95; } if (this.particleAge++ >= this.particleMaxAge) { diff --git a/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java b/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java index 2fcb204be..8b908e225 100644 --- a/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java +++ b/src/main/java/forestry/arboriculture/blocks/BlockForestryLeaves.java @@ -79,6 +79,7 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi public BlockForestryLeaves() { setCreativeTab(Tabs.tabArboriculture); + setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, true).withProperty(DECAYABLE, true)); } @Override @@ -89,8 +90,12 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi @Override protected BlockStateContainer createBlockState() { - return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[]{UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS}); + return new ExtendedBlockState(this, new IProperty[]{DECAYABLE, CHECK_DECAY}, new IUnlistedProperty[]{UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS}); } + + public int getMetaFromState(IBlockState state){ + return 0; + } /* TILE ENTITY */ @Override diff --git a/src/main/java/forestry/core/entities/EntityFXColoredDripParticle.java b/src/main/java/forestry/core/entities/EntityFXColoredDripParticle.java index d9608685a..5171c07ec 100644 --- a/src/main/java/forestry/core/entities/EntityFXColoredDripParticle.java +++ b/src/main/java/forestry/core/entities/EntityFXColoredDripParticle.java @@ -48,21 +48,21 @@ public class EntityFXColoredDripParticle extends EntityFX { this.prevPosY = this.posY; this.prevPosZ = this.posZ; - this.ySpeed -= this.particleGravity; + this.motionY -= this.particleGravity; if (this.bobTimer-- > 0) { - this.xSpeed *= 0.02D; - this.ySpeed *= 0.02D; - this.zSpeed *= 0.02D; + this.motionX *= 0.02D; + this.motionY *= 0.02D; + this.motionZ *= 0.02D; this.setParticleTextureIndex(113); } else { this.setParticleTextureIndex(112); } - this.moveEntity(this.xSpeed, this.ySpeed, this.zSpeed); - this.xSpeed *= 0.9800000190734863D; - this.ySpeed *= 0.9800000190734863D; - this.zSpeed *= 0.9800000190734863D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.9800000190734863D; + this.motionY *= 0.9800000190734863D; + this.motionZ *= 0.9800000190734863D; if (this.particleMaxAge-- <= 0) { this.setExpired(); @@ -71,8 +71,8 @@ public class EntityFXColoredDripParticle extends EntityFX { if (this.isCollided) { this.setParticleTextureIndex(114); - this.xSpeed *= 0.699999988079071D; - this.zSpeed *= 0.699999988079071D; + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; } IBlockState state = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))); diff --git a/src/main/java/forestry/core/entities/EntityFXIgnition.java b/src/main/java/forestry/core/entities/EntityFXIgnition.java index f7386924f..048861962 100644 --- a/src/main/java/forestry/core/entities/EntityFXIgnition.java +++ b/src/main/java/forestry/core/entities/EntityFXIgnition.java @@ -25,10 +25,10 @@ public class EntityFXIgnition extends EntityFX { public EntityFXIgnition(World world, double x, double y, double z) { super(world, x, y, z, 0, 0, 0); - this.xSpeed *= 0.8; - this.ySpeed *= 0.8; - this.zSpeed *= 0.8; - this.ySpeed = this.rand.nextFloat() * 0.4F + 0.05F; + this.motionX *= 0.8; + this.motionY *= 0.8; + this.motionZ *= 0.8; + this.motionY = this.rand.nextFloat() * 0.4F + 0.05F; this.particleRed = this.particleGreen = this.particleBlue = 1.0F; this.particleScale *= this.rand.nextFloat() / 2 + 0.3F; this.ignitionParticleScale = this.particleScale; @@ -67,18 +67,18 @@ public class EntityFXIgnition extends EntityFX { float f = (float) this.particleAge / (float) this.particleMaxAge; if (this.rand.nextFloat() > f * 2) { - this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.posX, this.posY, this.posZ, this.xSpeed, this.ySpeed, this.zSpeed); + this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ); } - this.ySpeed -= 0.03D; - this.moveEntity(this.xSpeed, this.ySpeed, this.zSpeed); - this.xSpeed *= 0.999D; - this.ySpeed *= 0.999D; - this.zSpeed *= 0.999D; + this.motionY -= 0.03D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.999D; + this.motionY *= 0.999D; + this.motionZ *= 0.999D; if (this.isCollided) { - this.xSpeed *= 0.7; - this.zSpeed *= 0.7; + this.motionX *= 0.7; + this.motionZ *= 0.7; } } } \ No newline at end of file diff --git a/src/main/java/forestry/core/entities/EntityFXSmoke.java b/src/main/java/forestry/core/entities/EntityFXSmoke.java index f4c6df1ae..937196a1c 100644 --- a/src/main/java/forestry/core/entities/EntityFXSmoke.java +++ b/src/main/java/forestry/core/entities/EntityFXSmoke.java @@ -25,10 +25,10 @@ public class EntityFXSmoke extends EntityFX { public EntityFXSmoke(World world, double x, double y, double z) { super(world, x, y, z, 0, 0, 0); - this.xSpeed *= 0.8; - this.xSpeed *= 0.8; - this.xSpeed *= 0.8; - this.xSpeed = this.rand.nextFloat() * 0.2F + 0.05F; + this.motionX *= 0.8; + this.motionY *= 0.8; + this.motionZ *= 0.8; + this.motionY = this.rand.nextFloat() * 0.2F + 0.05F; this.particleRed = this.particleGreen = this.particleBlue = 1.0F; this.particleScale *= this.rand.nextFloat() / 4; this.ignitionParticleScale = this.particleScale; @@ -66,18 +66,18 @@ public class EntityFXSmoke extends EntityFX { float f = (float) this.particleAge / (float) this.particleMaxAge; if (this.rand.nextFloat() > f * 2) { - this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX, this.posY, this.posZ, this.xSpeed, this.ySpeed, this.zSpeed); + this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ); } - this.ySpeed -= 0.03D; - this.moveEntity(this.xSpeed, this.ySpeed, this.zSpeed); - this.xSpeed *= 0.999D; - this.ySpeed *= 0.999D; - this.zSpeed *= 0.999D; + this.motionY -= 0.03D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.999D; + this.motionY *= 0.999D; + this.motionZ *= 0.999D; if (this.isCollided) { - this.xSpeed *= 0.7; - this.zSpeed *= 0.7; + this.motionX *= 0.7; + this.motionZ *= 0.7; } } } \ No newline at end of file diff --git a/src/main/java/forestry/core/entities/EntityFXSnow.java b/src/main/java/forestry/core/entities/EntityFXSnow.java index 35dbb1c9b..a528d62ba 100644 --- a/src/main/java/forestry/core/entities/EntityFXSnow.java +++ b/src/main/java/forestry/core/entities/EntityFXSnow.java @@ -27,9 +27,9 @@ public class EntityFXSnow extends EntityFX { this.particleScale *= 0.5F; this.particleMaxAge = (int) (40.0D / (Math.random() * 0.8D + 0.2D)); - this.xSpeed *= 0.01D; - this.ySpeed *= -0.4D; - this.zSpeed *= 0.01D; + this.motionX *= 0.01D; + this.motionY *= -0.4D; + this.motionZ *= 0.01D; } @Override