Fix magma cubes made of literal magma
This commit is contained in:
parent
466ba87d1a
commit
30b44ed43e
|
|
@ -0,0 +1,31 @@
|
|||
package xyz.nearmisses.patience.mc_rebalance.mixin.mob;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.entity.monster.MagmaCube;
|
||||
import net.minecraft.world.entity.monster.Slime;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(MagmaCube.class)
|
||||
public class MagmaCubeTweak extends Slime {
|
||||
public MagmaCubeTweak(EntityType<? extends Slime> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@Inject(method = "getAttackDamage", at=@At("HEAD"), cancellable = true)
|
||||
private void removeSecretSauce(CallbackInfoReturnable<Float> cir){
|
||||
cir.setReturnValue(super.getAttackDamage());
|
||||
}
|
||||
|
||||
@Inject(method="setSize", at=@At("TAIL"))
|
||||
private void addOrdinarySauce(int i, boolean bl, CallbackInfo ci){
|
||||
int j = Mth.clamp(i, 1, 127);
|
||||
this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue((double)j + 2.0F);
|
||||
}
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
"mob.CreakingRework",
|
||||
"mob.EnderDragonHitRateCap",
|
||||
"mob.HappyGhastTweak",
|
||||
"mob.MagmaCubeTweak",
|
||||
"mob.WardenRework",
|
||||
"mob.WitherSkeletonRework"
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue