Ender Dragon always uses breath damage type
Positives: dragon gives normal immunity frames. Negatives: dragon ignores armour. Nerfed?
This commit is contained in:
parent
4efacd691c
commit
819ae130b1
|
|
@ -0,0 +1,26 @@
|
||||||
|
package xyz.nearmisses.patience.mc_rebalance.mixin.mob;
|
||||||
|
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.damagesource.DamageSources;
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.Mob;
|
||||||
|
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
|
||||||
|
import net.minecraft.world.entity.monster.Enemy;
|
||||||
|
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.Redirect;
|
||||||
|
|
||||||
|
@Mixin(EnderDragon.class)
|
||||||
|
public class EnderDragonHitRateCap extends Mob implements Enemy {
|
||||||
|
|
||||||
|
protected EnderDragonHitRateCap(EntityType<? extends Mob> entityType, Level level) {
|
||||||
|
super(entityType, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Redirect(method = "hurt(Ljava/util/List;)V", at=@At(value="INVOKE", target = "Lnet/minecraft/world/damagesource/DamageSources;mobAttack(Lnet/minecraft/world/entity/LivingEntity;)Lnet/minecraft/world/damagesource/DamageSource;"))
|
||||||
|
private DamageSource hurt(DamageSources instance, LivingEntity livingEntity){
|
||||||
|
return this.damageSources().dragonBreath();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue