Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (this.motionX > -1.2F && this.motionX < 1.2F){
- this.motionX *= 1.2F;
- }
- if (this.motionZ > -1.2F && this.motionZ < 1.2F){
- this.motionZ *= 1.2F;
- }
- if (this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL)
- this.despawnEntity();
- this.musicTick--;
- if (this.musicTick == 0){
- this.musicTick = 233;
- this.playSound("nevermine:MusicCrystocore", 3.00F, 1.0F);
- }
- this.stateSwitch--;
- if (this.stateSwitch == 0){
- this.state = rand.nextInt(6);
- this.stateSwitch = 180;
- if (!this.worldObj.isRemote)
- for (EntityPlayer e : (List<EntityPlayer>) this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, this.boundingBox.expand(60, 60, 60))){
- if (this.state == 1)
- e.addPotionEffect(new PotionEffect(Potion.poison.id, 180, 1));
- else if (this.state == 2)
- e.addPotionEffect(new PotionEffect(Potion.blindness.id, 180, 2));
- else if (this.state == 3)
- e.addPotionEffect(new PotionEffect(Potion.weakness.id, 180, 1));
- else if (this.state == 4)
- e.addPotionEffect(new PotionEffect(Potion.confusion.id, 180, 10));
- else if (this.state == 5)
- e.addPotionEffect(new PotionEffect(Potion.wither.id, 180, 1));
- else
- e.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 180, 1));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement