Skip to content

Commit 4e31be1

Browse files
committed
nerf baby mob attributes
1 parent c419029 commit 4e31be1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/additions/java/mekanism/additions/common/registries/AdditionsEntityTypes.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ public class AdditionsEntityTypes {
3838
private AdditionsEntityTypes() {
3939
}
4040

41-
//COPY of Zombie SPEED_MODIFIER_BABY_ID and SPEED_MODIFIER_BABY
42-
private static final AttributeModifier BABY_SPEED_BOOST_MODIFIER = new AttributeModifier(ResourceLocation.withDefaultNamespace("baby"), 0.5D, Operation.ADD_MULTIPLIED_BASE);
41+
//Opposite of Zombie SPEED_MODIFIER_BABY_ID and SPEED_MODIFIER_BABY
42+
private static final AttributeModifier BABY_SPEED_NERF_MODIFIER = new AttributeModifier(ResourceLocation.withDefaultNamespace("baby"), -0.5D, Operation.ADD_MULTIPLIED_BASE);
43+
private static final AttributeModifier BABY_HEALTH_NERF_MODIFIER = new AttributeModifier(ResourceLocation.withDefaultNamespace("baby_health"), -0.5D, Operation.ADD_MULTIPLIED_TOTAL);
44+
private static final AttributeModifier BABY_ATTACK_NERF_MODIFIER = new AttributeModifier(ResourceLocation.withDefaultNamespace("baby_attack"), -0.75D, Operation.ADD_MULTIPLIED_TOTAL);
4345

4446
public static final EntityTypeDeferredRegister ENTITY_TYPES = new EntityTypeDeferredRegister(MekanismAdditions.MODID);
4547

@@ -66,7 +68,15 @@ public static void setupBabyModifiers(LivingEntity entity) {
6668
if (!entity.level().isClientSide) {
6769
AttributeInstance attributeInstance = entity.getAttribute(Attributes.MOVEMENT_SPEED);
6870
if (attributeInstance != null) {
69-
attributeInstance.addPermanentModifier(BABY_SPEED_BOOST_MODIFIER);
71+
attributeInstance.addPermanentModifier(BABY_SPEED_NERF_MODIFIER);
72+
}
73+
attributeInstance = entity.getAttribute(Attributes.MAX_HEALTH);
74+
if (attributeInstance != null) {
75+
attributeInstance.addPermanentModifier(BABY_HEALTH_NERF_MODIFIER);
76+
}
77+
attributeInstance = entity.getAttribute(Attributes.ATTACK_DAMAGE);
78+
if (attributeInstance != null) {
79+
attributeInstance.addPermanentModifier(BABY_ATTACK_NERF_MODIFIER);
7080
}
7181
}
7282
}

0 commit comments

Comments
 (0)