Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.Killer.killersblocksnstuff.entity.customEntities;
- import net.minecraft.block.*;
- import net.minecraft.entity.*;
- import net.minecraft.entity.ai.attributes.*;
- import net.minecraft.entity.ai.goal.*;
- import net.minecraft.entity.merchant.villager.*;
- import net.minecraft.entity.monster.*;
- import net.minecraft.entity.passive.*;
- import net.minecraft.entity.player.*;
- import net.minecraft.util.*;
- import net.minecraft.util.math.*;
- import net.minecraft.world.*;
- import net.minecraftforge.api.distmarker.*;
- import net.minecraftforge.fml.common.*;
- @Mod.EventBusSubscriber(modid = "kbns", bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
- public class MiniBossEntity extends ZombieEntity {
- public MiniBossEntity(EntityType<? extends ZombieEntity> type, World worldIn) {
- super(type, worldIn);
- }
- public static AttributeModifierMap.MutableAttribute registerAttributes() {
- return MonsterEntity.createMobAttributes()
- .add(Attributes.MAX_HEALTH, 20.0D)
- .add(Attributes.MOVEMENT_SPEED, 0.33D)
- .add(Attributes.ATTACK_DAMAGE, 13.0D)
- .add(Attributes.FOLLOW_RANGE, 50.0D)
- .add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
- }
- @Override
- protected void registerGoals() {
- super.registerGoals();
- this.goalSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
- this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
- this.goalSelector.addGoal(7, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
- this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true));
- this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillagerEntity.class, false));
- this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
- }
- @Override
- protected int getExperienceReward(PlayerEntity player) {
- return 3;
- }
- @Override
- protected SoundEvent getAmbientSound() {
- return SoundEvents.HOGLIN_AMBIENT;
- }
- @Override
- protected SoundEvent getDeathSound() {
- return SoundEvents.HOGLIN_DEATH;
- }
- @Override
- protected SoundEvent getHurtSound(DamageSource damageSourceIn) {
- return SoundEvents.IRON_GOLEM_HURT;
- }
- @Override
- protected void playStepSound(BlockPos pos, BlockState blockIn) {
- this.playSound(SoundEvents.HOGLIN_STEP, 0.20F, 0.5F);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment