diff --git a/src/main/java/biomesoplenty/api/item/BOPItems.java b/src/main/java/biomesoplenty/api/item/BOPItems.java index 4b3cb4af7..ec34ebd1a 100644 --- a/src/main/java/biomesoplenty/api/item/BOPItems.java +++ b/src/main/java/biomesoplenty/api/item/BOPItems.java @@ -35,7 +35,6 @@ public class BOPItems public static Item green_dye; public static Item white_dye; public static Item black_dye; - public static Item pixie_dust; public static Item other_slab; public static Item boat_sacred_oak; diff --git a/src/main/java/biomesoplenty/api/particle/BOPParticleTypes.java b/src/main/java/biomesoplenty/api/particle/BOPParticleTypes.java index adc15c031..d513fc05e 100644 --- a/src/main/java/biomesoplenty/api/particle/BOPParticleTypes.java +++ b/src/main/java/biomesoplenty/api/particle/BOPParticleTypes.java @@ -2,5 +2,5 @@ package biomesoplenty.api.particle; public enum BOPParticleTypes { - PIXIETRAIL, MUD, PLAYER_TRAIL, CURSE + MUD, PLAYER_TRAIL, CURSE } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/api/sound/BOPSounds.java b/src/main/java/biomesoplenty/api/sound/BOPSounds.java index d9590eb1b..3dd2a517e 100644 --- a/src/main/java/biomesoplenty/api/sound/BOPSounds.java +++ b/src/main/java/biomesoplenty/api/sound/BOPSounds.java @@ -11,8 +11,6 @@ import net.minecraft.util.SoundEvent; public class BOPSounds { - public static SoundEvent pixie_ambient; - public static SoundEvent pixie_hurt; public static SoundEvent wasp_ambient; public static SoundEvent wasp_hurt; public static SoundEvent records_wanderer; diff --git a/src/main/java/biomesoplenty/client/particle/EntityCurseFX.java b/src/main/java/biomesoplenty/client/particle/EntityCurseFX.java index 95a2312a2..4ef86ea32 100644 --- a/src/main/java/biomesoplenty/client/particle/EntityCurseFX.java +++ b/src/main/java/biomesoplenty/client/particle/EntityCurseFX.java @@ -30,7 +30,6 @@ public class EntityCurseFX extends Particle { super(world, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D); - // pixie trail texture is row from position 0,1 to position 8,1 this.particleTextureIndexX = 7; this.particleTextureIndexY = 5; diff --git a/src/main/java/biomesoplenty/client/particle/EntityPixieTrailFX.java b/src/main/java/biomesoplenty/client/particle/EntityPixieTrailFX.java deleted file mode 100644 index fa3664189..000000000 --- a/src/main/java/biomesoplenty/client/particle/EntityPixieTrailFX.java +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************************* - * Copyright 2014-2016, the Biomes O' Plenty Team - * - * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. - * - * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. - ******************************************************************************/ - -package biomesoplenty.client.particle; - -import biomesoplenty.core.ClientProxy; -import net.minecraft.client.particle.Particle; -import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.fml.client.FMLClientHandler; - -public class EntityPixieTrailFX extends Particle -{ - private float defaultParticleScale; - - public EntityPixieTrailFX(World world, double xCoordIn, double yCoordIn, double zCoordIn, double motionXIn, double motionYIn, double motionZIn) - { - this(world, xCoordIn, yCoordIn, zCoordIn, motionXIn, motionYIn, motionZIn, 1.0F); - } - - public EntityPixieTrailFX(World world, double xCoordIn, double yCoordIn, double zCoordIn, double motionXIn, double motionYIn, double motionZIn, float par14) - { - super(world, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D); - - // pixie trail texture is row from position 0,1 to position 8,1 - this.particleTextureIndexX = 7; - this.particleTextureIndexY = 1; - - this.motionX *= 0.10000000149011612D; - this.motionY *= 0.10000000149011612D; - this.motionZ *= 0.10000000149011612D; - this.motionX += motionXIn; - this.motionY += motionYIn; - this.motionZ += motionZIn; - this.particleScale *= 0.75F; - this.particleScale *= par14; - this.defaultParticleScale = this.particleScale; - this.particleMaxAge = (int)((8.0D / (Math.random() * 0.8D + 0.2D)) * 8); - this.particleMaxAge = (int)((float)this.particleMaxAge * par14); - this.particleAge = world.rand.nextInt(3); - this.particleAlpha = 1.0F; - this.particleGravity = 0.02F; - this.canCollide = false; - } - - @Override - public int getFXLayer() - { - return 2; - } - - @Override - public void renderParticle(BufferBuilder buffer, Entity entity, float partialTicks, float rotX, float rotXZ, float rotZ, float rotYZ, float rotXY) - { - // EffectRenderer will by default bind the vanilla particles texture, override with our own - FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particleTexturesLocation); - - float scaleMultiplier = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F; - scaleMultiplier = MathHelper.clamp(scaleMultiplier, 0.0F, 1.0F); - this.particleScale = this.defaultParticleScale * scaleMultiplier; - - GlStateManager.depthMask(false); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 1); - - super.renderParticle(buffer, entity, partialTicks, rotX, rotXZ, rotZ, rotYZ, rotXY); - - GlStateManager.disableBlend(); - GlStateManager.depthMask(true); - } - - @Override - public int getBrightnessForRender(float p_189214_1_) - { - float f = (float)this.particleMaxAge - (((float)this.particleAge + p_189214_1_) / (float)this.particleMaxAge); - f = MathHelper.clamp(f, 0.0F, 1.0F); - int i = super.getBrightnessForRender(p_189214_1_); - int j = i & 255; - int k = i >> 16 & 255; - j = j + (int)(f * 15.0F * 16.0F); - - if (j > 240) - { - j = 240; - } - - return j | k << 16; - } - - @Override - public void onUpdate() - { - prevPosX = posX; - prevPosY = posY; - prevPosZ = posZ; - - if (particleAge++ >= particleMaxAge) - { - this.setExpired(); - } - - this.particleTextureIndexX = 7 - this.particleAge * 8 / this.particleMaxAge; - this.move(motionX, motionY, motionZ); - - if (posY == prevPosY) - { - motionX *= 1.1D; - motionZ *= 1.1D; - } - - motionX *= 0.9599999785423279D; - motionY *= 0.9599999785423279D; - motionZ *= 0.9599999785423279D; - - if (onGround) - { - motionX *= 0.699999988079071D; - motionZ *= 0.699999988079071D; - } - } - -} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java index 68b00dea5..8567e13a9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java @@ -23,7 +23,6 @@ import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPLilypad; import biomesoplenty.common.block.BlockBOPMushroom; -import biomesoplenty.common.entities.EntityPixie; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.world.generator.GeneratorBigMushroom; import biomesoplenty.common.world.generator.GeneratorDoubleFlora; @@ -71,8 +70,6 @@ public class BiomeGenMysticGrove extends BOPOverworldBiome this.spawnableWaterCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4)); - this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityPixie.class, 2, 1, 2)); - // hot springs this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).create()); diff --git a/src/main/java/biomesoplenty/common/entities/EntityPixie.java b/src/main/java/biomesoplenty/common/entities/EntityPixie.java deleted file mode 100644 index 7379e5c03..000000000 --- a/src/main/java/biomesoplenty/common/entities/EntityPixie.java +++ /dev/null @@ -1,441 +0,0 @@ -/******************************************************************************* - * Copyright 2015-2016, the Biomes O' Plenty Team - * - * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. - * - * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. - ******************************************************************************/ - -package biomesoplenty.common.entities; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Random; - -import biomesoplenty.api.item.BOPItems; -import biomesoplenty.api.particle.BOPParticleTypes; -import biomesoplenty.api.sound.BOPSounds; -import biomesoplenty.core.BiomesOPlenty; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.MoverType; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.entity.ai.EntityMoveHelper; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.passive.EntityAmbientCreature; -import net.minecraft.item.Item; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; - -public class EntityPixie extends EntityAmbientCreature implements IMob { - - public EntityPixie(World worldIn) { - super(worldIn); - this.setSize(0.7F, 0.7F); - - this.moveHelper = new EntityPixie.PixieMoveHelper(); - this.tasks.addTask(3, new EntityPixie.AIPixieRandomFly()); - } - - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(0.5D); - } - - @Override - protected SoundEvent getAmbientSound() - { - return BOPSounds.pixie_ambient; - } - - @Override - protected SoundEvent getHurtSound(DamageSource source) - { - return BOPSounds.pixie_hurt; - } - - @Override - protected Item getDropItem() - { - return BOPItems.pixie_dust; - } - - @Override - public void onLivingUpdate() - { - super.onLivingUpdate(); - - if (this.world.isRemote) - { - if (world.rand.nextInt(2) == 0) - { - BiomesOPlenty.proxy.spawnParticle(BOPParticleTypes.PIXIETRAIL, this.world, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D, new int[0]); - } - } - } - - @Override - public boolean getCanSpawnHere() - { - BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ); - - if (blockpos.getY() <= this.world.getSeaLevel()) - { - return false; - } - else - { - if (blockpos.getY() >= 90) - { - return false; - } - else - { - int light = this.world.getLightFromNeighbors(blockpos); - - return light > 8 && super.getCanSpawnHere(); - } - } - } - - @Override - public boolean canBePushed() - { - return false; - } - - @Override - protected void collideWithEntity(Entity entityIn) - { - } - - @Override - protected void collideWithNearbyEntities() - { - } - - @Override - protected boolean canTriggerWalking() - { - return false; - } - - @Override - public void fall(float distance, float damageMultiplier) - { - } - - @Override - protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos) - { - } - - @Override - public boolean doesEntityNotTriggerPressurePlate() - { - return true; - } - - @Override - public boolean isOnLadder() - { - return false; - } - - @Override - public void travel(float strafe, float vertical, float forward) - { - if (this.isInWater()) - { - this.moveRelative(strafe, vertical, forward, 0.02F); - this.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.800000011920929D; - this.motionY *= 0.800000011920929D; - this.motionZ *= 0.800000011920929D; - } - else if (this.isInLava()) - { - this.moveRelative(strafe, vertical, forward, 0.02F); - this.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.5D; - this.motionY *= 0.5D; - this.motionZ *= 0.5D; - } - else - { - float f = 0.91F; - - if (this.onGround) - { - BlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ)); - IBlockState underState = this.world.getBlockState(underPos); - f = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F; - } - - float f1 = 0.16277136F / (f * f * f); - this.moveRelative(strafe, vertical, forward, this.onGround ? 0.1F * f1 : 0.02F); - f = 0.91F; - - if (this.onGround) - { - BlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ)); - IBlockState underState = this.world.getBlockState(underPos); - f = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F; - } - - this.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ); - this.motionX *= (double)f; - this.motionY *= (double)f; - this.motionZ *= (double)f; - } - - this.prevLimbSwingAmount = this.limbSwingAmount; - double d1 = this.posX - this.prevPosX; - double d0 = this.posZ - this.prevPosZ; - float f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F; - - if (f2 > 1.0F) - { - f2 = 1.0F; - } - - this.limbSwingAmount += (f2 - this.limbSwingAmount) * 0.4F; - this.limbSwing += this.limbSwingAmount; - } - - // Helper class representing a point in space that the pixie is targeting for some reason - class PixieMoveTargetPos - { - private EntityPixie pixie = EntityPixie.this; - - public double posX; - public double posY; - public double posZ; - public double distX; - public double distY; - public double distZ; - public double dist; - public double aimX; - public double aimY; - public double aimZ; - - public PixieMoveTargetPos() - { - this(0, 0, 0); - } - - public PixieMoveTargetPos(double posX, double posY, double posZ) - { - this.setTarget(posX, posY, posZ); - } - - public void setTarget(double posX, double posY, double posZ) - { - this.posX = posX; - this.posY = posY; - this.posZ = posZ; - this.refresh(); - } - - public void refresh() - { - this.distX = this.posX - this.pixie.posX; - this.distY = this.posY - this.pixie.posY; - this.distZ = this.posZ - this.pixie.posZ; - - this.dist = (double)MathHelper.sqrt(this.distX * this.distX + this.distY * this.distY + this.distZ * this.distZ); - - // (aimX,aimY,aimZ) is a unit vector in the direction we want to go - if (this.dist == 0.0D) - { - this.aimX = 0.0D; - this.aimY = 0.0D; - this.aimZ = 0.0D; - } - else - { - this.aimX = this.distX / this.dist; - this.aimY = this.distY / this.dist; - this.aimZ = this.distZ / this.dist; - } - } - - public boolean isBoxBlocked(AxisAlignedBB box) - { - return !this.pixie.world.getCollisionBoxes(this.pixie, box).isEmpty(); - } - - // check nothing will collide with the pixie in the direction of aim, for howFar units (or until the destination - whichever is closer) - public boolean isPathClear(double howFar) - { - howFar = Math.min(howFar, this.dist); - AxisAlignedBB box = this.pixie.getEntityBoundingBox(); - for (double i = 0.5D; i < howFar; ++i) - { - // check there's nothing in the way - if (this.isBoxBlocked(box.offset(this.aimX * i, this.aimY * i, this.aimZ * i))) - { - return false; - } - } - return !this.isBoxBlocked(box.offset(this.aimX * howFar, this.aimY * howFar, this.aimZ * howFar)); - } - - } - - class PixieMoveHelper extends EntityMoveHelper - { - // EntityMoveHelper has the boolean 'update' which is set to true when the target is changed, and set to false when a bearing is set - // So it means 'the target has changed but we're not yet heading for it' - // We'll re-use it here with a slightly different interpretation - // Here it will mean 'has a target and not yet arrived' - - private EntityPixie pixie = EntityPixie.this; - private int courseChangeCooldown = 0; - private double closeEnough = 0.3D; - private PixieMoveTargetPos targetPos = new PixieMoveTargetPos(); - - public PixieMoveHelper() - { - super(EntityPixie.this); - } - - @Override - public void setMoveTo(double x, double y, double z, double speedIn) - { - super.setMoveTo(x,y,z,speedIn); - this.targetPos.setTarget(x, y, z); - } - - @Override - public void onUpdateMoveHelper() - { - // if we have arrived at the previous target, or we have no target to aim for, do nothing - if (this.action != Action.MOVE_TO) {return;} - - if (this.courseChangeCooldown-- > 0) { - // limit the rate at which we change course - return; - } - this.courseChangeCooldown += this.pixie.getRNG().nextInt(2) + 2; - - // update the target position - this.targetPos.refresh(); - - // accelerate the pixie towards the target - double acceleration = 0.1D; - this.pixie.motionX += this.targetPos.aimX * acceleration; - this.pixie.motionY += this.targetPos.aimY * acceleration; - this.pixie.motionZ += this.targetPos.aimZ * acceleration; - - // rotate to point at target - this.pixie.renderYawOffset = this.pixie.rotationYaw = -((float)Math.atan2(this.targetPos.distX, this.targetPos.distZ)) * 180.0F / (float)Math.PI; - - // abandon this movement if we have reached the target or there is no longer a clear path to the target - if (!this.targetPos.isPathClear(5.0D)) - { - //System.out.println("Abandoning move target - way is blocked" ); - this.action = Action.WAIT; - } else if (this.targetPos.dist < this.closeEnough) { - //System.out.println("Arrived (close enough) dist:"+this.targetPos.dist); - this.action = Action.WAIT; - } - } - - } - - // AI class for implementing the random flying behaviour - class AIPixieRandomFly extends EntityAIBase - { - private EntityPixie pixie = EntityPixie.this; - private PixieMoveTargetPos targetPos = new PixieMoveTargetPos(); - - public AIPixieRandomFly() - { - this.setMutexBits(1); - } - - // should we choose a new random destination for the pixie to fly to? - // yes, if the pixie doesn't already have a destination - @Override - public boolean shouldExecute() - { - return !this.pixie.getMoveHelper().isUpdating(); - } - - @Override - public boolean shouldContinueExecuting() {return false;} - - // choose a a new random destination for the pixie to fly to - @Override - public void startExecuting() - { - Random rand = this.pixie.getRNG(); - // pick a random nearby point and see if we can fly to it - if (this.tryGoingRandomDirection(rand, 6.0D)) {return;} - // pick a random closer point to fly to instead - if (this.tryGoingRandomDirection(rand, 2.0D)) {return;} - // try going straight along axes (try all 6 directions in random order) - List directions = Arrays.asList(EnumFacing.values()); - Collections.shuffle(directions); - for (EnumFacing facing : directions) - { - if (this.tryGoingAlongAxis(rand, facing, 1.0D)) {return;} - } - } - - - // note y direction has a slight downward bias to stop them flying too high - public boolean tryGoingRandomDirection(Random rand, double maxDistance) - { - double dirX = ((rand.nextDouble() * 2.0D - 1.0D) * maxDistance); - double dirY = ((rand.nextDouble() * 2.0D - 1.1D) * maxDistance); - double dirZ = ((rand.nextDouble() * 2.0D - 1.0D) * maxDistance); - return this.tryGoing(dirX, dirY, dirZ); - } - - public boolean tryGoingAlongAxis(Random rand, EnumFacing facing, double maxDistance) - { - double dirX = 0.0D; - double dirY = 0.0D; - double dirZ = 0.0D; - switch (facing.getAxis()) - { - case X: - dirX = rand.nextDouble() * facing.getAxisDirection().getOffset() * maxDistance; - break; - case Y: - dirY = rand.nextDouble() * facing.getAxisDirection().getOffset() * maxDistance; - break; - case Z: default: - dirZ = rand.nextDouble() * facing.getAxisDirection().getOffset() * maxDistance; - break; - } - return this.tryGoing(dirX, dirY, dirZ); - } - - public boolean tryGoing(double dirX, double dirY, double dirZ) - { - //System.out.println("("+dirX+","+dirY+","+dirZ+")"); - this.targetPos.setTarget(this.pixie.posX + dirX, this.pixie.posY + dirY, this.pixie.posZ + dirZ); - //System.out.println("Testing random move target distance:"+this.targetPos.dist+" direction:("+this.targetPos.aimX+","+this.targetPos.aimY+","+this.targetPos.aimZ+")"); - boolean result = this.targetPos.isPathClear(5.0F); - if (result) - { - this.pixie.getMoveHelper().setMoveTo(this.targetPos.posX, this.targetPos.posY, this.targetPos.posZ, 1.0D); - } - return result; - } - } - - -} diff --git a/src/main/java/biomesoplenty/common/entities/ModelPixie.java b/src/main/java/biomesoplenty/common/entities/ModelPixie.java deleted file mode 100644 index 825ee37dc..000000000 --- a/src/main/java/biomesoplenty/common/entities/ModelPixie.java +++ /dev/null @@ -1,66 +0,0 @@ -package biomesoplenty.common.entities; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.MathHelper; - -public class ModelPixie extends ModelBase -{ - //fields - ModelRenderer Body; - ModelRenderer LeftWing; - ModelRenderer RightWing; - - public ModelPixie() - { - textureWidth = 64; - textureHeight = 32; - - Body = new ModelRenderer(this, 0, 0); - Body.addBox(0F, 0F, 0F, 4, 4, 4); - Body.setRotationPoint(-2F, 16F, -2F); - Body.setTextureSize(64, 32); - Body.mirror = true; - setRotation(Body, 0F, 0F, 0F); - LeftWing = new ModelRenderer(this, 32, 0); - LeftWing.addBox(0F, 0F, -1F, 0, 4, 7); - LeftWing.setRotationPoint(2F, 15F, 2F); - LeftWing.setTextureSize(64, 32); - LeftWing.mirror = true; - setRotation(LeftWing, 0F, 0F, 0F); - RightWing = new ModelRenderer(this, 50, 0); - RightWing.addBox(0F, 0F, -1F, 0, 4, 7); - RightWing.setRotationPoint(-2F, 15F, 2F); - RightWing.setTextureSize(64, 32); - RightWing.mirror = true; - setRotation(RightWing, 0F, 0F, 0F); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Body.render(f5); - LeftWing.render(f5); - RightWing.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - RightWing.rotateAngleY = -(MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F); - LeftWing.rotateAngleY = MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F; - } - -} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/entities/RenderPixie.java b/src/main/java/biomesoplenty/common/entities/RenderPixie.java deleted file mode 100644 index 7838a1f2b..000000000 --- a/src/main/java/biomesoplenty/common/entities/RenderPixie.java +++ /dev/null @@ -1,52 +0,0 @@ -package biomesoplenty.common.entities; - -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class RenderPixie extends RenderLiving -{ - private static final ResourceLocation pixieTextureLocation = new ResourceLocation("biomesoplenty:textures/entity/pixie.png"); - - public RenderPixie(RenderManager renderManager) - { - super(renderManager, new ModelPixie(), 0.25F); - this.shadowSize = 0.0F; - } - - @Override - protected ResourceLocation getEntityTexture(EntityPixie entity) - { - return pixieTextureLocation; - } - - // TODO: Not sure about all this - Adubbz check please - // Looks like the idea is to set some rendering functions, then call super.doRender, then go back to normal - // LayerEndermanEyes have the same kind of approach I think - @Override - public void doRender(EntityPixie entity, double x, double y, double z, float entityYaw, float partialTicks) - { - GlStateManager.enableBlend(); - GlStateManager.disableAlpha(); - GlStateManager.blendFunc(1, 1); - GlStateManager.disableLighting(); - - char c0 = 61680; - int i = c0 % 65536; - int j = c0 / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)i / 1.0F, (float)j / 1.0F); - GlStateManager.enableLighting(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - - super.doRender(entity, x, y, z, entityYaw, partialTicks); - - GlStateManager.disableBlend(); - GlStateManager.enableAlpha(); - } - -} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/init/ModEntities.java b/src/main/java/biomesoplenty/common/init/ModEntities.java index bd03b96b9..dd2f6e446 100644 --- a/src/main/java/biomesoplenty/common/init/ModEntities.java +++ b/src/main/java/biomesoplenty/common/init/ModEntities.java @@ -9,7 +9,6 @@ package biomesoplenty.common.init; import biomesoplenty.common.command.BOPCommand; -import biomesoplenty.common.entities.EntityPixie; import biomesoplenty.common.entities.EntityWasp; import biomesoplenty.common.entities.item.EntityBOPBoat; import biomesoplenty.common.entities.projectiles.EntityMudball; @@ -36,7 +35,6 @@ public class ModEntities // mobs registerBOPEntityWithSpawnEgg(EntityWasp.class, "wasp", 80, 3, true, 0xE5B013, 0x333234); - registerBOPEntityWithSpawnEgg(EntityPixie.class, "pixie", 80, 3, true, 0xFF99E9, 0xFFFFFF); } // register an entity diff --git a/src/main/java/biomesoplenty/common/init/ModItems.java b/src/main/java/biomesoplenty/common/init/ModItems.java index 8a48a747d..672b2b95c 100644 --- a/src/main/java/biomesoplenty/common/init/ModItems.java +++ b/src/main/java/biomesoplenty/common/init/ModItems.java @@ -46,7 +46,6 @@ import static biomesoplenty.api.item.BOPItems.mudball; import static biomesoplenty.api.item.BOPItems.peach; import static biomesoplenty.api.item.BOPItems.pear; import static biomesoplenty.api.item.BOPItems.persimmon; -import static biomesoplenty.api.item.BOPItems.pixie_dust; import static biomesoplenty.api.item.BOPItems.record_wanderer; import static biomesoplenty.api.item.BOPItems.ricebowl; import static biomesoplenty.api.item.BOPItems.shroompowder; @@ -116,8 +115,6 @@ public class ModItems ash = registerItem(new Item(), "ash"); fleshchunk = registerItem(new Item(), "fleshchunk"); - pixie_dust = registerItem(new Item(), "pixie_dust"); - gem = registerItem(new ItemGem(), "gem"); terrestrial_artifact = registerItem(new Item(), "terrestrial_artifact"); diff --git a/src/main/java/biomesoplenty/common/init/ModSounds.java b/src/main/java/biomesoplenty/common/init/ModSounds.java index 5defd9eac..e50ad3a99 100644 --- a/src/main/java/biomesoplenty/common/init/ModSounds.java +++ b/src/main/java/biomesoplenty/common/init/ModSounds.java @@ -7,8 +7,6 @@ ******************************************************************************/ package biomesoplenty.common.init; -import static biomesoplenty.api.sound.BOPSounds.pixie_ambient; -import static biomesoplenty.api.sound.BOPSounds.pixie_hurt; import static biomesoplenty.api.sound.BOPSounds.records_wanderer; import static biomesoplenty.api.sound.BOPSounds.wasp_ambient; import static biomesoplenty.api.sound.BOPSounds.wasp_hurt; @@ -22,8 +20,6 @@ public class ModSounds { public static void init() { - pixie_ambient = registerSound("entity.biomesoplenty.pixie.ambient"); - pixie_hurt = registerSound("entity.biomesoplenty.pixie.hurt"); wasp_ambient = registerSound("entity.biomesoplenty.wasp.ambient"); wasp_hurt = registerSound("entity.biomesoplenty.wasp.hurt"); records_wanderer = registerSound("records.wanderer"); diff --git a/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java b/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java index 4930226cc..fd726577d 100644 --- a/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java +++ b/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java @@ -10,10 +10,7 @@ package biomesoplenty.common.item; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.item.BOPItems; -import biomesoplenty.common.entities.EntityPixie; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -24,7 +21,6 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; public class ItemJarEmpty extends Item @@ -101,27 +97,5 @@ public class ItemJarEmpty extends Item return stack; } } - - @Override - public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase target, EnumHand hand) - { - // right clicking a pixie with an empty jar catches it in the jar - if (target instanceof EntityPixie) - { - EntityPixie pixie = (EntityPixie)target; - pixie.setDead(); - stack.setCount(stack.getCount() - 1); - ItemStack pixieJar = new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.PIXIE.ordinal()); - EntityItem pixieJarEntity = new EntityItem(player.world, player.posX, player.posY, player.posZ, pixieJar); - if (!player.world.isRemote) - { - player.world.spawnEntity(pixieJarEntity); - if (!(player instanceof FakePlayer)) {pixieJarEntity.onCollideWithPlayer(player);} - } - return true; - } - return false; - } - } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/item/ItemJarFilled.java b/src/main/java/biomesoplenty/common/item/ItemJarFilled.java index d04c8d5cd..6b24f775c 100644 --- a/src/main/java/biomesoplenty/common/item/ItemJarFilled.java +++ b/src/main/java/biomesoplenty/common/item/ItemJarFilled.java @@ -10,11 +10,8 @@ package biomesoplenty.common.item; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.item.BOPItems; -import biomesoplenty.common.entities.EntityPixie; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; @@ -24,12 +21,10 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.IStringSerializable; import net.minecraft.util.NonNullList; -import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; -import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -39,7 +34,7 @@ public class ItemJarFilled extends Item public enum JarContents implements IStringSerializable { - HONEY, PIXIE, BLUE_FIRE; + HONEY, BLUE_FIRE; @Override public String getName() @@ -127,23 +122,6 @@ public class ItemJarFilled extends Item } } - // TODO: should you get back an empty jar? - public boolean releasePixie(ItemStack stack, World world, EntityPlayer player, Vec3d releasePoint) - { - if (world.provider.isSurfaceWorld()) - { - EntityPixie pixie = new EntityPixie(world); - pixie.setLocationAndAngles(releasePoint.x, releasePoint.y, releasePoint.z, MathHelper.wrapDegrees(world.rand.nextFloat() * 360.0F), 0.0F); - world.spawnEntity(pixie); - pixie.playLivingSound(); - if (stack.hasDisplayName()) {pixie.setCustomNameTag(stack.getDisplayName());} - return true; - } else { - player.sendMessage(new TextComponentString("\u00a75Pixies cannot survive in this environment!")); - return false; - } - } - @Override public ActionResult onItemRightClick(World world, EntityPlayer player, EnumHand hand) { @@ -151,17 +129,6 @@ public class ItemJarFilled extends Item if (world.isRemote) {return new ActionResult(EnumActionResult.FAIL, stack);} switch (this.getContentsType(stack)) { - // right click in air releases pixie - case PIXIE: - if (this.getContentsType(stack) == JarContents.PIXIE) - { - // release pixie into the air in front of the player (target distance 0.8, but will be closer if there's blocks in the way) - Vec3d releasePoint = this.getAirPositionInFrontOfPlayer(world, player, 0.8D); - this.releasePixie(stack, world, player, releasePoint); - this.emptyJar(stack, player, new ItemStack(BOPItems.jar_empty)); - return new ActionResult(EnumActionResult.SUCCESS, stack); - } - case HONEY: default: return new ActionResult(EnumActionResult.FAIL, stack); } @@ -195,15 +162,6 @@ public class ItemJarFilled extends Item if (world.isRemote) {return EnumActionResult.FAIL;} switch (this.getContentsType(stack)) { - // right click on block also releases pixie - case PIXIE: - double distX = hitX - player.posX; - double distY = hitY - (player.posY + (double)player.getEyeHeight()); - double distZ = hitZ - player.posZ; - double a = 0.9D; - Vec3d releasePoint = new Vec3d(player.posX + a * distX, player.posY + (double)player.getEyeHeight() + a * distY, player.posZ + a * distZ); - return this.releasePixie(stack, world, player, releasePoint) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; - case BLUE_FIRE: pos = pos.offset(facing); ItemStack itemstack = player.getHeldItem(hand); diff --git a/src/main/java/biomesoplenty/core/ClientProxy.java b/src/main/java/biomesoplenty/core/ClientProxy.java index e689fc4aa..f8260c8f0 100644 --- a/src/main/java/biomesoplenty/core/ClientProxy.java +++ b/src/main/java/biomesoplenty/core/ClientProxy.java @@ -16,13 +16,10 @@ import com.google.common.collect.Lists; import biomesoplenty.api.item.BOPItems; import biomesoplenty.api.particle.BOPParticleTypes; import biomesoplenty.client.particle.EntityCurseFX; -import biomesoplenty.client.particle.EntityPixieTrailFX; import biomesoplenty.client.particle.EntityTrailFX; import biomesoplenty.common.block.IBOPBlock; import biomesoplenty.common.config.MiscConfigurationHandler; -import biomesoplenty.common.entities.EntityPixie; import biomesoplenty.common.entities.EntityWasp; -import biomesoplenty.common.entities.RenderPixie; import biomesoplenty.common.entities.RenderWasp; import biomesoplenty.common.entities.item.EntityBOPBoat; import biomesoplenty.common.entities.item.RenderBOPBoat; @@ -52,7 +49,6 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.common.ForgeModContainer; import net.minecraftforge.fml.client.registry.IRenderFactory; import net.minecraftforge.fml.client.registry.RenderingRegistry; @@ -72,7 +68,6 @@ public class ClientProxy extends CommonProxy //Entity rendering and other stuff will go here in future registerEntityRenderer(EntityWasp.class, RenderWasp.class); - registerEntityRenderer(EntityPixie.class, RenderPixie.class); registerEntityRenderer(EntityMudball.class, RenderMudball.class); registerEntityRenderer(EntityBOPBoat.class, RenderBOPBoat.class); } @@ -181,9 +176,6 @@ public class ClientProxy extends CommonProxy Particle entityFx = null; switch (type) { - case PIXIETRAIL: - entityFx = new EntityPixieTrailFX(parWorld, x, y, z, MathHelper.nextDouble(parWorld.rand, -0.03, 0.03), -0.02D, MathHelper.nextDouble(parWorld.rand, -0.03, 0.03)); - break; case MUD: int itemId = Item.getIdFromItem(BOPItems.mudball); minecraft.world.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), itemId); diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index 2d7163620..8946ac618 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -105,7 +105,6 @@ item.honeycomb.name=Empty Honeycomb item.jacaranda_door.name=Jacaranda Door item.jar_empty.name=Empty Jar item.jar_filled_honey.name=Honey Jar -item.jar_filled_pixie.name=Pixie Jar item.jar_filled_blue_fire.name=Blue Fire Jar item.magic_door.name=Magic Door item.mahogany_door.name=Mahogany Door @@ -117,7 +116,6 @@ item.persimmon.name=Persimmon item.peach.name=Peach item.pear.name=Pear item.pine_door.name=Pine Door -item.pixie_dust.name=Pixie Dust item.record_wanderer.name=Music Disc item.record.wanderer.desc=Tim Rurkowski - Wanderer item.redwood_door.name=Redwood Door @@ -433,6 +431,5 @@ tile.mud_brick.name=Mud Bricks tile.crystal.name=Celestial Crystal entity.mudball.name=Mudball -entity.pixie.name=Pixie entity.wasp.name=Nether Wasp entity.bop_boat.name=Boat \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/jar_filled_pixie.json b/src/main/resources/assets/biomesoplenty/models/item/jar_filled_pixie.json deleted file mode 100644 index 7fccf71f3..000000000 --- a/src/main/resources/assets/biomesoplenty/models/item/jar_filled_pixie.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "biomesoplenty:items/jar_filled_pixie" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/item/pixie_dust.json b/src/main/resources/assets/biomesoplenty/models/item/pixie_dust.json deleted file mode 100644 index 66f97b7bb..000000000 --- a/src/main/resources/assets/biomesoplenty/models/item/pixie_dust.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "biomesoplenty:items/pixie_dust" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/sounds.json b/src/main/resources/assets/biomesoplenty/sounds.json index adc3bed58..d5012cd2c 100644 --- a/src/main/resources/assets/biomesoplenty/sounds.json +++ b/src/main/resources/assets/biomesoplenty/sounds.json @@ -1,14 +1,4 @@ { - "entity.biomesoplenty.pixie.hurt": { - "sounds": [ - "biomesoplenty:entity/pixie/hurt" - ] - }, - "entity.biomesoplenty.pixie.ambient": { - "sounds": [ - "biomesoplenty:entity/pixie/ambient" - ] - }, "entity.biomesoplenty.wasp.hurt": { "sounds": [ "biomesoplenty:entity/wasp/hurt" diff --git a/src/main/resources/assets/biomesoplenty/sounds/entity/pixie/ambient.ogg b/src/main/resources/assets/biomesoplenty/sounds/entity/pixie/ambient.ogg deleted file mode 100644 index 068a050b2..000000000 Binary files a/src/main/resources/assets/biomesoplenty/sounds/entity/pixie/ambient.ogg and /dev/null differ diff --git a/src/main/resources/assets/biomesoplenty/sounds/entity/pixie/hurt.ogg b/src/main/resources/assets/biomesoplenty/sounds/entity/pixie/hurt.ogg deleted file mode 100644 index 13edfba02..000000000 Binary files a/src/main/resources/assets/biomesoplenty/sounds/entity/pixie/hurt.ogg and /dev/null differ diff --git a/src/main/resources/assets/biomesoplenty/textures/entity/lost_soul.png b/src/main/resources/assets/biomesoplenty/textures/entity/lost_soul.png deleted file mode 100644 index 96543374d..000000000 Binary files a/src/main/resources/assets/biomesoplenty/textures/entity/lost_soul.png and /dev/null differ diff --git a/src/main/resources/assets/biomesoplenty/textures/entity/lost_soul_angry.png b/src/main/resources/assets/biomesoplenty/textures/entity/lost_soul_angry.png deleted file mode 100644 index 653b41576..000000000 Binary files a/src/main/resources/assets/biomesoplenty/textures/entity/lost_soul_angry.png and /dev/null differ diff --git a/src/main/resources/assets/biomesoplenty/textures/entity/pixie.png b/src/main/resources/assets/biomesoplenty/textures/entity/pixie.png deleted file mode 100644 index 9ccd05c4f..000000000 Binary files a/src/main/resources/assets/biomesoplenty/textures/entity/pixie.png and /dev/null differ diff --git a/src/main/resources/assets/biomesoplenty/textures/items/jar_filled_pixie.png b/src/main/resources/assets/biomesoplenty/textures/items/jar_filled_pixie.png deleted file mode 100644 index 072748498..000000000 Binary files a/src/main/resources/assets/biomesoplenty/textures/items/jar_filled_pixie.png and /dev/null differ diff --git a/src/main/resources/assets/biomesoplenty/textures/items/pixie_dust.png b/src/main/resources/assets/biomesoplenty/textures/items/pixie_dust.png deleted file mode 100644 index 52e9ed7c4..000000000 Binary files a/src/main/resources/assets/biomesoplenty/textures/items/pixie_dust.png and /dev/null differ