Class LivingEntityMixin
java.lang.Object
de.z0rdak.yawp.mixin.flag.LivingEntityMixin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable net.minecraft.world.entity.player.Player -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonCreateWitherRose(@Nullable net.minecraft.world.entity.LivingEntity adversary, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci, net.minecraft.server.level.ServerLevel level, boolean bl, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) If a corresponding flag is set, this injection prevents the placing of a wither rose as a block and drops it as ItemEntity as vanilla would do it when the gamerule doMobgrief is set to falsevoidonDrop(net.minecraft.server.level.ServerLevel level, net.minecraft.world.damagesource.DamageSource source, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) voidonFallDamage(double fallDistance, float damageMultiplier, net.minecraft.world.damagesource.DamageSource damageSource, org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Boolean> cir) voidonKnockback(double power, double xd, double zd, net.minecraft.world.damagesource.DamageSource source, float damage, boolean comesFromEffect, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) voidonXpDrop(org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) By definition of the vanilla code, this method is only called when - the entity is killed by a player or - drops always XP (which is only true for other players)
-
Field Details
-
attackingPlayer
@Nullable protected @Nullable net.minecraft.world.entity.player.Player attackingPlayer
-
-
Constructor Details
-
LivingEntityMixin
public LivingEntityMixin()
-
-
Method Details
-
onKnockback
public void onKnockback(double power, double xd, double zd, net.minecraft.world.damagesource.DamageSource source, float damage, boolean comesFromEffect, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) -
onDrop
public void onDrop(net.minecraft.server.level.ServerLevel level, net.minecraft.world.damagesource.DamageSource source, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) -
onFallDamage
public void onFallDamage(double fallDistance, float damageMultiplier, net.minecraft.world.damagesource.DamageSource damageSource, org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Boolean> cir) -
onXpDrop
public void onXpDrop(org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) By definition of the vanilla code, this method is only called when - the entity is killed by a player or - drops always XP (which is only true for other players) -
onCreateWitherRose
public void onCreateWitherRose(@Nullable @Nullable net.minecraft.world.entity.LivingEntity adversary, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci, net.minecraft.server.level.ServerLevel level, boolean bl, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) If a corresponding flag is set, this injection prevents the placing of a wither rose as a block and drops it as ItemEntity as vanilla would do it when the gamerule doMobgrief is set to false
-