2
1
Fork 1
mirror of https://github.com/ACGaming/Spackenmobs synced 2024-11-29 10:12:41 +01:00

Fix Gisela, nerf spawn rates

This commit is contained in:
ACGaming 2021-09-13 20:00:16 +02:00
parent 0c3f8dfe27
commit 4d2572db2c
4 changed files with 49 additions and 58 deletions

View file

@ -2,6 +2,7 @@ package mod.acgaming.spackenmobs.entities;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.*; import net.minecraft.entity.ai.*;
import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityAnimal;
@ -13,12 +14,14 @@ import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import mod.acgaming.spackenmobs.misc.ModSoundEvents;
public class EntityGisela extends EntityAnimal public class EntityGisela extends EntityAnimal
{ {
public EntityGisela(World worldIn) public EntityGisela(World worldIn)
{ {
super(worldIn); super(worldIn);
this.setSize(0.9F, 1.4F); this.setSize(0.6F, 1.8F);
} }
public EntityGisela createChild(EntityAgeable ageable) public EntityGisela createChild(EntityAgeable ageable)
@ -31,11 +34,12 @@ public class EntityGisela extends EntityAnimal
this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 2.0D)); this.tasks.addTask(1, new EntityAIPanic(this, 2.0D));
this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.SUGAR, true)); this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.SUGAR, false));
this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D)); this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D));
this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D)); this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(7, new EntityAILookIdle(this)); this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this, EntityLiving.class, true));
} }
protected void applyEntityAttributes() protected void applyEntityAttributes()
@ -47,31 +51,21 @@ public class EntityGisela extends EntityAnimal
protected SoundEvent getAmbientSound() protected SoundEvent getAmbientSound()
{ {
return SoundEvents.ENTITY_COW_AMBIENT; return ModSoundEvents.ENTITY_GISELA_AMBIENT;
} }
protected SoundEvent getHurtSound(DamageSource damageSourceIn) protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{ {
return SoundEvents.ENTITY_COW_HURT; return ModSoundEvents.ENTITY_GISELA_HURT;
} }
protected SoundEvent getDeathSound() protected SoundEvent getDeathSound()
{ {
return SoundEvents.ENTITY_COW_DEATH; return ModSoundEvents.ENTITY_GISELA_HURT;
}
protected float getSoundVolume()
{
return 0.6F;
} }
protected void playStepSound(BlockPos pos, Block blockIn) protected void playStepSound(BlockPos pos, Block blockIn)
{ {
this.playSound(SoundEvents.ENTITY_COW_STEP, 0.15F, 1.0F); this.playSound(SoundEvents.ENTITY_COW_STEP, 0.15F, 1.0F);
} }
public float getEyeHeight()
{
return this.isChild() ? this.height : 1.3F;
}
} }

View file

@ -41,90 +41,90 @@ public class ModConfigs
@Name("Allow tilera Ghast to spawn?") @Name("Allow tilera Ghast to spawn?")
public static boolean tileraGhast_spawn = true; public static boolean tileraGhast_spawn = true;
@Name("ApoRed spawn probability:") @Name("ApoRed spawn weight:")
public static int ApoRed_weight = 15; public static int ApoRed_weight = 10;
@Name("ApoRed min group size:") @Name("ApoRed min group size:")
public static int ApoRed_min = 1; public static int ApoRed_min = 1;
@Name("ApoRed max group size:") @Name("ApoRed max group size:")
public static int ApoRed_max = 2; public static int ApoRed_max = 1;
@Name("Baka Mitai Creeper spawn probability:") @Name("Baka Mitai Creeper spawn weight:")
public static int BakaMitaiCreeper_weight = 10; public static int BakaMitaiCreeper_weight = 10;
@Name("Baka Mitai Creeper min group size:") @Name("Baka Mitai Creeper min group size:")
public static int BakaMitaiCreeper_min = 1; public static int BakaMitaiCreeper_min = 1;
@Name("Baka Mitai Creeper max group size:") @Name("Baka Mitai Creeper max group size:")
public static int BakaMitaiCreeper_max = 2; public static int BakaMitaiCreeper_max = 1;
@Name("Drachenlord spawn probability:") @Name("Drachenlord spawn weight:")
public static int Drachenlord_weight = 15; public static int Drachenlord_weight = 10;
@Name("Drachenlord min group size:") @Name("Drachenlord min group size:")
public static int Drachenlord_min = 1; public static int Drachenlord_min = 1;
@Name("Drachenlord max group size:") @Name("Drachenlord max group size:")
public static int Drachenlord_max = 2; public static int Drachenlord_max = 1;
@Name("Friedrich Liechtenstein spawn probability:") @Name("Friedrich Liechtenstein spawn weight:")
public static int Friedrich_weight = 15; public static int Friedrich_weight = 10;
@Name("Friedrich Liechtenstein min group size:") @Name("Friedrich Liechtenstein min group size:")
public static int Friedrich_min = 1; public static int Friedrich_min = 1;
@Name("Friedrich Liechtenstein max group size:") @Name("Friedrich Liechtenstein max group size:")
public static int Friedrich_max = 2; public static int Friedrich_max = 1;
@Name("Holzstammhuhn spawn probability:") @Name("Holzstammhuhn spawn weight:")
public static int Holzstammhuhn_weight = 15; public static int Holzstammhuhn_weight = 10;
@Name("Holzstammhuhn min group size:") @Name("Holzstammhuhn min group size:")
public static int Holzstammhuhn_min = 1; public static int Holzstammhuhn_min = 1;
@Name("Holzstammhuhn max group size:") @Name("Holzstammhuhn max group size:")
public static int Holzstammhuhn_max = 2; public static int Holzstammhuhn_max = 1;
@Name("Islamist spawn probability:") @Name("Islamist spawn weight:")
public static int Islamist_weight = 15; public static int Islamist_weight = 10;
@Name("Islamist min group size:") @Name("Islamist min group size:")
public static int Islamist_min = 1; public static int Islamist_min = 1;
@Name("Islamist max group size:") @Name("Islamist max group size:")
public static int Islamist_max = 2; public static int Islamist_max = 1;
@Name("Jens spawn probability:") @Name("Jens spawn weight:")
public static int Jens_weight = 15; public static int Jens_weight = 10;
@Name("Jens min group size:") @Name("Jens min group size:")
public static int Jens_min = 1; public static int Jens_min = 1;
@Name("Jens max group size:") @Name("Jens max group size:")
public static int Jens_max = 2; public static int Jens_max = 1;
@Name("Marcell D'Avis spawn probability:") @Name("Marcell D'Avis spawn weight:")
public static int MarcellDAvis_weight = 15; public static int MarcellDAvis_weight = 10;
@Name("Marcell D'Avis min group size:") @Name("Marcell D'Avis min group size:")
public static int MarcellDAvis_min = 1; public static int MarcellDAvis_min = 1;
@Name("Marcell D'Avis max group size:") @Name("Marcell D'Avis max group size:")
public static int MarcellDAvis_max = 2; public static int MarcellDAvis_max = 1;
@Name("Mr. Bean spawn probability:") @Name("Mr. Bean spawn weight:")
public static int MrBean_weight = 15; public static int MrBean_weight = 10;
@Name("Mr. Bean min group size:") @Name("Mr. Bean min group size:")
public static int MrBean_min = 1; public static int MrBean_min = 1;
@Name("Mr. Bean max group size:") @Name("Mr. Bean max group size:")
public static int MrBean_max = 2; public static int MrBean_max = 1;
@Name("Schalker spawn probability:") @Name("Schalker spawn weight:")
public static int Schalker_weight = 10; public static int Schalker_weight = 10;
@Name("Schalker min group size:") @Name("Schalker min group size:")
public static int Schalker_min = 1; public static int Schalker_min = 1;
@Name("Schalker max group size:") @Name("Schalker max group size:")
public static int Schalker_max = 2; public static int Schalker_max = 1;
@Name("Smava Creeper spawn probability:") @Name("Smava Creeper spawn weight:")
public static int SmavaCreeper_weight = 15; public static int SmavaCreeper_weight = 10;
@Name("Smava Creeper min group size:") @Name("Smava Creeper min group size:")
public static int SmavaCreeper_min = 1; public static int SmavaCreeper_min = 1;
@Name("Smava Creeper max group size:") @Name("Smava Creeper max group size:")
public static int SmavaCreeper_max = 2; public static int SmavaCreeper_max = 1;
@Name("MZTEWolf spawn probability:") @Name("MZTEWolf spawn weight:")
public static int MZTEWolf_weight = 15; public static int MZTEWolf_weight = 10;
@Name("MZTEWolf min group size:") @Name("MZTEWolf min group size:")
public static int MZTEWolf_min = 1; public static int MZTEWolf_min = 1;
@Name("MZTEWolf max group size:") @Name("MZTEWolf max group size:")
public static int MZTEWolf_max = 2; public static int MZTEWolf_max = 1;
@Name("Gisela spawn probability:") @Name("Gisela spawn weight:")
public static int Gisela_weight = 15; public static int Gisela_weight = 10;
@Name("Gisela min group size:") @Name("Gisela min group size:")
public static int Gisela_min = 1; public static int Gisela_min = 1;
@Name("Gisela max group size:") @Name("Gisela max group size:")
public static int Gisela_max = 2; public static int Gisela_max = 1;
@Name("tilera Ghast spawn probability:") @Name("tilera Ghast spawn weight:")
public static int tileraGhast_weight = 15; public static int tileraGhast_weight = 10;
@Name("tilera Ghast min group size:") @Name("tilera Ghast min group size:")
public static int tileraGhast_min = 1; public static int tileraGhast_min = 1;
@Name("tilera Ghast max group size:") @Name("tilera Ghast max group size:")
public static int tileraGhast_max = 2; public static int tileraGhast_max = 1;
@Name("Time in seconds Jens needs to digest:") @Name("Time in seconds Jens needs to digest:")
public static int Jens_digest_time = 120; public static int Jens_digest_time = 120;

View file

@ -56,5 +56,4 @@ public class ModSoundEvents
public static final SoundEvent ENTITY_GISELA_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.ambient")); public static final SoundEvent ENTITY_GISELA_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.ambient"));
public static final SoundEvent ENTITY_GISELA_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.hurt")); public static final SoundEvent ENTITY_GISELA_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.hurt"));
public static final SoundEvent ENTITY_GISELA_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.death"));
} }

View file

@ -238,7 +238,5 @@ public class RegistryHandler
event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_AMBIENT);
ModSoundEvents.ENTITY_GISELA_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.gisela.hurt")); ModSoundEvents.ENTITY_GISELA_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.gisela.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_HURT);
ModSoundEvents.ENTITY_GISELA_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.gisela.death"));
event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_DEATH);
} }
} }