mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Fixed Fake Player
This commit is contained in:
parent
732da75c9f
commit
583d6e025e
1 changed files with 3 additions and 2 deletions
|
@ -14,6 +14,7 @@ import com.mojang.authlib.GameProfile;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.WorldServer;
|
import net.minecraft.world.WorldServer;
|
||||||
import net.minecraftforge.common.util.FakePlayer;
|
import net.minecraftforge.common.util.FakePlayer;
|
||||||
|
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -29,8 +30,8 @@ public class FakePlayerUtil{
|
||||||
|
|
||||||
public static FakePlayer getFakePlayer(World world){
|
public static FakePlayer getFakePlayer(World world){
|
||||||
if(world instanceof WorldServer){
|
if(world instanceof WorldServer){
|
||||||
if(theFakePlayer == null || theFakePlayer.worldObj != world){
|
if(theFakePlayer == null){
|
||||||
theFakePlayer = new FakePlayer((WorldServer)world, FAKE_PROFILE);
|
theFakePlayer = FakePlayerFactory.get((WorldServer)world, FAKE_PROFILE);
|
||||||
}
|
}
|
||||||
return theFakePlayer;
|
return theFakePlayer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue