Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```package shmoe6.s58.entity;
- import java.util.Random;
- import org.apache.http.impl.NoConnectionReuseStrategy;
- import net.minecraft.entity.EntityAgeable;
- import net.minecraft.entity.SharedMonsterAttributes;
- import net.minecraft.entity.ai.attributes.IAttributeInstance;
- import net.minecraft.entity.monster.EntityPigZombie;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.init.SoundEvents;
- import net.minecraft.network.datasync.EntityDataManager;
- import net.minecraft.util.DamageSource;
- import net.minecraft.util.SoundEvent;
- import net.minecraft.util.math.MathHelper;
- import net.minecraft.world.World;
- import shmoe6.s58.util.handlers.SoundsHandler;
- public class EntitySCP035 extends EntityPigZombie
- {
- private int randomSoundDelay;
- public EntitySCP035(World worldIn)
- {
- super(worldIn);
- }
- @Override
- protected void initEntityAI()
- {
- super.initEntityAI();
- }
- @Override
- protected void applyEntityAttributes()
- {
- super.applyEntityAttributes();
- this.getEntityAttribute(SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(0.0D);
- this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25000000417232513D);
- this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(7.5D);
- }
- @Override
- protected void updateAITasks()
- {
- if (this.randomSoundDelay > 0 && --this.randomSoundDelay == 0)
- {
- this.playSound(SoundsHandler.HURT035, this.getSoundVolume() * 0F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0F + 0F) * 0F);
- }
- super.updateAITasks();
- }
- /* @Override
- public EntityPigZombie createChild(EntityAgeable ageable)
- {
- return new EntitySCP035(world);
- } */
- @Override
- protected SoundEvent getAmbientSound()
- {
- return null;
- }
- @Override
- protected SoundEvent getHurtSound(DamageSource source)
- {
- int rand035hurt = new Random().nextInt(2);
- if(rand035hurt == 0)
- {
- return SoundsHandler.HURT035;
- }
- else if(rand035hurt == 1)
- {
- return SoundsHandler.COUGH035;
- }
- return null;
- }
- @Override
- protected SoundEvent getDeathSound()
- {
- int rand035hurt = new Random().nextInt(2);
- if(rand035hurt == 0)
- {
- return SoundsHandler.HURT035;
- }
- else if(rand035hurt == 1)
- {
- return SoundsHandler.COUGH035;
- }
- return null;
- }
- }```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement