mirror of
https://github.com/FatherToast/SpecialMobs.git
synced 2025-04-25 06:45:11 +00:00
jk missed more than one
This commit is contained in:
parent
feab288514
commit
09edb5eda9
3 changed files with 9 additions and 14 deletions
|
@ -4,9 +4,8 @@ import fathertoast.specialmobs.common.bestiary.BestiaryInfo;
|
|||
import fathertoast.specialmobs.common.bestiary.SpecialMob;
|
||||
import fathertoast.specialmobs.common.core.register.SMItems;
|
||||
import fathertoast.specialmobs.common.entity.MobHelper;
|
||||
import fathertoast.specialmobs.common.entity.ai.AIHelper;
|
||||
import fathertoast.specialmobs.common.entity.ai.SpecialInjectCreeperGoal;
|
||||
import fathertoast.specialmobs.common.entity.ai.SpecialLeapAtTargetGoal;
|
||||
import fathertoast.specialmobs.common.entity.spider._SpecialSpiderEntity;
|
||||
import fathertoast.specialmobs.common.util.AttributeHelper;
|
||||
import fathertoast.specialmobs.common.util.References;
|
||||
import fathertoast.specialmobs.datagen.loot.LootTableBuilder;
|
||||
|
@ -16,13 +15,10 @@ import net.minecraft.entity.ai.attributes.AttributeModifierMap;
|
|||
import net.minecraft.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.Difficulty;
|
||||
import net.minecraft.world.DifficultyInstance;
|
||||
import net.minecraft.world.IServerWorld;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -45,8 +41,8 @@ public class MadScientistZombieEntity extends _SpecialZombieEntity {
|
|||
|
||||
@SpecialMob.AttributeCreator
|
||||
public static AttributeModifierMap.MutableAttribute createAttributes() {
|
||||
return AttributeHelper.of( _SpecialSpiderEntity.createAttributes() )
|
||||
.addAttribute( Attributes.MOVEMENT_SPEED, 1.1 )
|
||||
return AttributeHelper.of( _SpecialZombieEntity.createAttributes() )
|
||||
.multAttribute( Attributes.MOVEMENT_SPEED, 1.1 )
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -74,7 +70,7 @@ public class MadScientistZombieEntity extends _SpecialZombieEntity {
|
|||
/** Override to change this entity's AI goals. */
|
||||
@Override
|
||||
protected void registerVariantGoals() {
|
||||
goalSelector.addGoal( 3, new SpecialInjectCreeperGoal<>(
|
||||
AIHelper.insertGoal( goalSelector, 2, new SpecialInjectCreeperGoal<>(
|
||||
this, 1.0D, 20.0D,
|
||||
( madman, creeper ) -> creeper.isAlive() && !creeper.isPowered() && madman.getSensing().canSee( creeper ) ) );
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import fathertoast.specialmobs.common.bestiary.SpecialMob;
|
|||
import fathertoast.specialmobs.common.core.SpecialMobs;
|
||||
import fathertoast.specialmobs.common.entity.ISpecialMob;
|
||||
import fathertoast.specialmobs.common.entity.SpecialMobData;
|
||||
import fathertoast.specialmobs.common.entity.spider._SpecialSpiderEntity;
|
||||
import fathertoast.specialmobs.common.util.References;
|
||||
import fathertoast.specialmobs.datagen.loot.LootTableBuilder;
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
|
@ -98,7 +97,7 @@ public class _SpecialZombieEntity extends ZombieEntity implements ISpecialMob<_S
|
|||
//--------------- Family-Specific Implementations ----------------
|
||||
|
||||
/** The parameter for special mob render scale. */
|
||||
private static final DataParameter<Float> SCALE = EntityDataManager.defineId( _SpecialSpiderEntity.class, DataSerializers.FLOAT );
|
||||
private static final DataParameter<Float> SCALE = EntityDataManager.defineId( _SpecialZombieEntity.class, DataSerializers.FLOAT );
|
||||
|
||||
/** Called from the Entity.class constructor to define data watcher variables. */
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class AnnotationHelper {
|
|||
return constructor.newInstance( entityType, world );
|
||||
}
|
||||
catch( InstantiationException | IllegalAccessException | InvocationTargetException ex ) {
|
||||
throw new RuntimeException( "Class for " + constructor.getDeclaringClass().getName() + " has invalid constructor", ex );
|
||||
throw new RuntimeException( "Caught exception during instantiation of " + constructor.getDeclaringClass().getName(), ex );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue