From 583d6e025e1f7bef724c56e3e96525f68c3d4f30 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 23 Dec 2015 23:14:39 +0100 Subject: [PATCH] Fixed Fake Player --- .../java/ellpeck/actuallyadditions/util/FakePlayerUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java b/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java index 698a54a57..25acc79b3 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java @@ -14,6 +14,7 @@ import com.mojang.authlib.GameProfile; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.FakePlayerFactory; import java.util.UUID; @@ -29,8 +30,8 @@ public class FakePlayerUtil{ public static FakePlayer getFakePlayer(World world){ if(world instanceof WorldServer){ - if(theFakePlayer == null || theFakePlayer.worldObj != world){ - theFakePlayer = new FakePlayer((WorldServer)world, FAKE_PROFILE); + if(theFakePlayer == null){ + theFakePlayer = FakePlayerFactory.get((WorldServer)world, FAKE_PROFILE); } return theFakePlayer; }