Endermen hate boats
(Also leave faster in daytime)
This commit is contained in:
parent
96eb25aa78
commit
e43131daf5
|
|
@ -0,0 +1,32 @@
|
||||||
|
package xyz.nearmisses.patience.mc_rebalance.mixin.mob;
|
||||||
|
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraft.world.entity.monster.EnderMan;
|
||||||
|
import net.minecraft.world.entity.monster.Monster;
|
||||||
|
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.Constant;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(EnderMan.class)
|
||||||
|
public class EndermanRework extends Monster {
|
||||||
|
protected EndermanRework(EntityType<? extends Monster> entityType, Level level) {
|
||||||
|
super(entityType, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ModifyConstant(method="customServerAiStep", constant=@Constant(floatValue = 30.0F))
|
||||||
|
private float leaveFasterInDaytime(float constant){
|
||||||
|
return constant/3.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method="customServerAiStep", at=@At("HEAD"))
|
||||||
|
private void hatesBoats(CallbackInfo ci){
|
||||||
|
if(this.getTarget()!=null && this.getVehicle()!=null){
|
||||||
|
this.stopRiding();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
"mob.BlazeRework",
|
"mob.BlazeRework",
|
||||||
"mob.CreakingRework",
|
"mob.CreakingRework",
|
||||||
"mob.EnderDragonHitRateCap",
|
"mob.EnderDragonHitRateCap",
|
||||||
|
"mob.EndermanRework",
|
||||||
"mob.HappyGhastTweak",
|
"mob.HappyGhastTweak",
|
||||||
"mob.MagmaCubeTweak",
|
"mob.MagmaCubeTweak",
|
||||||
"mob.PiglinBruteTweak",
|
"mob.PiglinBruteTweak",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue