From c3686923e1ae16fbdbb33d86fb3f0d761f5bcd84 Mon Sep 17 00:00:00 2001 From: iChun Date: Thu, 17 Jul 2014 08:18:30 +0800 Subject: [PATCH] Fixed issues with player size not being set properly, as well as other more major issues. Closes #547 --- build.gradle | 2 +- src/main/java/morph/client/core/TickHandlerClient.java | 6 +++++- src/main/java/morph/common/core/EventHandler.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index eaae83d1..4e60c402 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { apply plugin: 'forge' // Requires iChunUtil to run. Just put iChunUtil-deobf.jar in the /libs/ folder or it won't compile. -version = "0.8.1" +version = "0.9.0" group= "morph" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Morph-Beta" diff --git a/src/main/java/morph/client/core/TickHandlerClient.java b/src/main/java/morph/client/core/TickHandlerClient.java index bb3365f1..0b341085 100644 --- a/src/main/java/morph/client/core/TickHandlerClient.java +++ b/src/main/java/morph/client/core/TickHandlerClient.java @@ -695,6 +695,10 @@ public void worldTick(TickEvent.ClientTickEvent event) if(info.getMorphing()) { +// System.out.println(info.morphProgress); +// System.out.println(info.prevState); +// System.out.println(info.player); +// System.out.println(world.playerEntities.size()); info.morphProgress++; if(info.morphProgress > 80) { @@ -754,7 +758,7 @@ else if(info.prevState != null && info.player != null) } //TODO make sure that the lack of sleep timer doesn't affect anything. //if(info.player != null && (info.player.dimension != mc.thePlayer.dimension || !info.player.isEntityAlive() || !world.playerEntities.contains(info.player) || !info.player.isPlayerSleeping() && info.player.sleepTimer > 0)) - if(info.player != null && (info.player.dimension != mc.thePlayer.dimension || !info.player.isEntityAlive() || !world.playerEntities.contains(info.player) || !info.player.isPlayerSleeping())) + if(info.player != null && (info.player.dimension != mc.thePlayer.dimension || !info.player.isEntityAlive() || !world.playerEntities.contains(info.player) || info.player.isPlayerSleeping())) { info.player = null; } diff --git a/src/main/java/morph/common/core/EventHandler.java b/src/main/java/morph/common/core/EventHandler.java index a87859c0..59e22cfc 100644 --- a/src/main/java/morph/common/core/EventHandler.java +++ b/src/main/java/morph/common/core/EventHandler.java @@ -324,7 +324,7 @@ public void onRenderPlayer(RenderPlayerEvent.Pre event) if(Morph.proxy.tickHandlerClient.playerMorphInfo.containsKey(event.entityPlayer.getCommandSenderName())) { MorphInfoClient info = Morph.proxy.tickHandlerClient.playerMorphInfo.get(event.entityPlayer.getCommandSenderName()); - if(!event.entityPlayer.isPlayerSleeping()) + if(!event.entityPlayer.isPlayerSleeping() && event.entityPlayer.worldObj.playerEntities.contains(event.entityPlayer)) { info.player = event.entityPlayer; }