mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Hooked renderingEntityInGUI accordingly
This commit is contained in:
1 parent
00ea0200c4
commit
27de3c77a4
3 files changed
+10
-2
No files matched your search
@@ -5,6 +5,7 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.client.ClientEventHandler;
|
||||
import noppes.npcs.client.EntityUtil;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.data.ModelData;
|
||||
@@ -159,12 +160,13 @@ public class GuiModelInterface extends GuiNPCInterface {
|
||||
entity.prevRotationYawHead = entity.rotationYawHead = followMouse ? entity.rotationYaw : rotation;
|
||||
GL11.glTranslatef(0.0F, entity.yOffset, 1F);
|
||||
RenderManager.instance.playerViewY = 180F;
|
||||
|
||||
ClientEventHandler.renderingEntityInGUI = true;
|
||||
try {
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
|
||||
} catch (Exception e) {
|
||||
playerdata.setEntityClass(null);
|
||||
}
|
||||
ClientEventHandler.renderingEntityInGUI = false;
|
||||
entity.prevRenderYawOffset = entity.renderYawOffset = f2;
|
||||
entity.prevRotationYaw = entity.rotationYaw = f3;
|
||||
entity.rotationPitch = f4;
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.client.ClientEventHandler;
|
||||
import noppes.npcs.client.EntityUtil;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -109,12 +110,13 @@ public class GuiModelInterface2 extends GuiNPCInterface2 {
|
||||
entity.prevRotationYawHead = entity.rotationYawHead = entity.rotationYaw;
|
||||
GL11.glTranslatef(0.0F, entity.yOffset, 0.0F);
|
||||
RenderManager.instance.playerViewY = 180F;
|
||||
|
||||
ClientEventHandler.renderingEntityInGUI = true;
|
||||
try {
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
|
||||
} catch (Exception e) {
|
||||
playerdata.setEntityClass(null);
|
||||
}
|
||||
ClientEventHandler.renderingEntityInGUI = false;
|
||||
entity.prevRenderYawOffset = entity.renderYawOffset = f2;
|
||||
entity.prevRotationYaw = entity.rotationYaw = f3;
|
||||
entity.rotationPitch = f4;
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import noppes.npcs.client.ClientEventHandler;
|
||||
import noppes.npcs.client.CustomNpcResourceListener;
|
||||
import noppes.npcs.client.TextBlockClient;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -534,11 +535,14 @@ public abstract class GuiNPCInterface extends GuiScreen {
|
||||
entity.rotationYawHead = entity.rotationYaw;
|
||||
GL11.glTranslatef(0.0F, entity.yOffset, 0.0F);
|
||||
RenderManager.instance.playerViewY = 180F;
|
||||
ClientEventHandler.renderingEntityInGUI = true;
|
||||
|
||||
try {
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0, 0, 0, 0, 1);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
ClientEventHandler.renderingEntityInGUI = false;
|
||||
entity.prevRenderYawOffset = entity.renderYawOffset = f2;
|
||||
entity.prevRotationYaw = entity.rotationYaw = f3;
|
||||
entity.prevRotationPitch = entity.rotationPitch = f4;
|
||||
|
||||
Reference in new issue
Block a user