net.minecraft.entity.attribute.EntityAttributes Java Examples
The following examples show how to use
net.minecraft.entity.attribute.EntityAttributes.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EvolvedCreeperEntity.java From Galacticraft-Rewoven with MIT License | 5 votes |
public void setBaby(boolean baby) { this.getDataTracker().set(BABY, baby); if (this.world != null && !this.world.isClient) { EntityAttributeInstance entityAttributeInstance = this.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED); entityAttributeInstance.removeModifier(BABY_SPEED_BONUS); if (baby) { ((EntityAttributeInstanceAccessor) entityAttributeInstance).callAddModifier(BABY_SPEED_BONUS); } } }
Example #2
Source File: CultistEntity.java From the-hallow with MIT License | 5 votes |
@Override protected void initAttributes() { super.initAttributes(); this.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).setBaseValue(0.35D); this.getAttributeInstance(EntityAttributes.ATTACK_DAMAGE).setBaseValue(3.0D); this.getAttributeInstance(EntityAttributes.ARMOR).setBaseValue(2.8D); }
Example #3
Source File: MummyEntity.java From the-hallow with MIT License | 5 votes |
@Override protected void initAttributes() { super.initAttributes(); this.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).setBaseValue(0.3D); this.getAttributeInstance(EntityAttributes.ATTACK_DAMAGE).setBaseValue(4.0D); this.getAttributeInstance(EntityAttributes.ARMOR).setBaseValue(2.5D); }
Example #4
Source File: CrowEntity.java From the-hallow with MIT License | 5 votes |
@Override protected void initAttributes() { super.initAttributes(); this.getAttributes().register(EntityAttributes.FLYING_SPEED); this.getAttributeInstance(EntityAttributes.MAX_HEALTH).setBaseValue(6.0D); this.getAttributeInstance(EntityAttributes.FLYING_SPEED).setBaseValue(0.4000000059604645D); this.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).setBaseValue(0.20000000298023224D); }
Example #5
Source File: MoonVillagerEntity.java From Galacticraft-Rewoven with MIT License | 4 votes |
public static DefaultAttributeContainer.Builder createMoonVillagerAttributes() { return MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.5D).add(EntityAttributes.GENERIC_FOLLOW_RANGE, 48.0D); }
Example #6
Source File: EvolvedZombieEntity.java From Galacticraft-Rewoven with MIT License | 4 votes |
@Override protected void initAttributes() { super.initAttributes(); this.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED).setBaseValue(0.5d); }
Example #7
Source File: RestlessCactusEntity.java From the-hallow with MIT License | 4 votes |
@Override protected void initAttributes() { super.initAttributes(); this.getAttributeInstance(EntityAttributes.MAX_HEALTH).setBaseValue(10.0D); this.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).setBaseValue(0.20000000298023224D); }