diff --git a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java index f250b8c4a..a0548ab4f 100644 --- a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java +++ b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java @@ -42,6 +42,7 @@ import ellpeck.actuallyadditions.recipe.HairyBallHandler; import ellpeck.actuallyadditions.recipe.TreasureChestHandler; import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.update.UpdateChecker; +import ellpeck.actuallyadditions.util.FakePlayerUtil; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.Util; import net.minecraft.init.Items; @@ -109,6 +110,8 @@ public class ActuallyAdditions{ proxy.postInit(event); ModUtil.LOGGER.info("PostInitialization Finished."); + + FakePlayerUtil.info(); } @EventHandler diff --git a/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java b/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java index f27502bd6..d8bcbd870 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java @@ -19,14 +19,18 @@ import java.util.UUID; public class FakePlayerUtil{ - private static final String fakeName = "EllpecksActuallyAdditionsFakePlayer"; - private static GameProfile fakeProfile = new GameProfile(UUID.nameUUIDFromBytes(fakeName.getBytes()), fakeName); + private static final String FAKE_NAME = "EllpecksActuallyAdditionsFakePlayer"; + private static final GameProfile FAKE_PROFILE = new GameProfile(UUID.nameUUIDFromBytes(FAKE_NAME.getBytes()), FAKE_NAME); private static FakePlayer theFakePlayer; - public static FakePlayer newFakePlayer(World world){ + public static void info(){ + ModUtil.LOGGER.info(ModUtil.NAME+"' Fake Player: '"+FAKE_PROFILE.getName()+"', UUID: "+FAKE_PROFILE.getId()); + } + + public static FakePlayer getFakePlayer(World world){ if(world instanceof WorldServer){ if(theFakePlayer == null){ - theFakePlayer = new FakePlayer((WorldServer)world, fakeProfile); + theFakePlayer = new FakePlayer((WorldServer)world, FAKE_PROFILE); } return theFakePlayer; } diff --git a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java index 64e114d2a..a493f2250 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java @@ -149,7 +149,7 @@ public class WorldUtil{ try{ //Blocks - stack.tryPlaceItemIntoWorld(FakePlayerUtil.newFakePlayer(world), world, x, y, z, side == ForgeDirection.UNKNOWN ? 0 : side.ordinal(), 0, 0, 0); + stack.tryPlaceItemIntoWorld(FakePlayerUtil.getFakePlayer(world), world, x, y, z, side == ForgeDirection.UNKNOWN ? 0 : side.ordinal(), 0, 0, 0); return stack; } catch(Exception e){