Fix exp orb crash (#491)
This commit is contained in:
parent
37fdb9fa90
commit
eb2922c567
@ -46,7 +46,7 @@ public abstract class ExperienceOrbMixin extends EntityMixin {
|
|||||||
arclight$lastPlayer = null;
|
arclight$lastPlayer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(method = "tick", at = @At(value = "FIELD", ordinal = 6, target = "Lnet/minecraft/world/entity/ExperienceOrb;followingPlayer:Lnet/minecraft/world/entity/player/Player;"))
|
@Redirect(method = "tick", at = @At(value = "FIELD", ordinal = 4, target = "Lnet/minecraft/world/entity/ExperienceOrb;followingPlayer:Lnet/minecraft/world/entity/player/Player;"))
|
||||||
private Player arclight$targetPlayer(ExperienceOrb entity) {
|
private Player arclight$targetPlayer(ExperienceOrb entity) {
|
||||||
if (this.followingPlayer != arclight$lastPlayer) {
|
if (this.followingPlayer != arclight$lastPlayer) {
|
||||||
EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent((ExperienceOrb) (Object) this, this.followingPlayer, (this.followingPlayer != null) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.FORGOT_TARGET);
|
EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent((ExperienceOrb) (Object) this, this.followingPlayer, (this.followingPlayer != null) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.FORGOT_TARGET);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user