mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-14 01:14:11 +00:00
fix: use renderViewEntity for camera math (#1492)
This commit is contained in:
1 parent
70e83130b2
commit
94e2a184b8
2 files changed
+4
-4
No files matched your search
@@ -4,8 +4,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -85,7 +85,7 @@ public class BlockPosHighlighter {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
int dimension = mc.theWorld.provider.dimensionId;
|
||||
|
||||
EntityPlayerSP p = mc.thePlayer;
|
||||
EntityLivingBase p = mc.renderViewEntity;
|
||||
double doubleX = p.lastTickPosX + (p.posX - p.lastTickPosX) * event.partialTicks;
|
||||
double doubleY = p.lastTickPosY + (p.posY - p.lastTickPosY) * event.partialTicks;
|
||||
double doubleZ = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) * event.partialTicks;
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -134,7 +134,7 @@ public class BlockPosHighlighter implements IHighlighter {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
dimension = mc.theWorld.provider.dimensionId;
|
||||
|
||||
EntityPlayerSP p = mc.thePlayer;
|
||||
EntityLivingBase p = mc.renderViewEntity;
|
||||
doubleX = p.lastTickPosX + (p.posX - p.lastTickPosX) * event.partialTicks;
|
||||
doubleY = p.lastTickPosY + (p.posY - p.lastTickPosY) * event.partialTicks;
|
||||
doubleZ = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) * event.partialTicks;
|
||||
|
||||
Reference in new issue
Block a user