From 0989424cca10758930071d0846070e521f856957 Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 16 Jul 2019 12:27:31 +0200 Subject: Route get player to proxy --- .../technus/tectech/mechanics/anomaly/AnomalyHandler.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java b/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java index c4e6c026ea..4eb2cc45a2 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java +++ b/src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java @@ -2,11 +2,11 @@ package com.github.technus.tectech.mechanics.anomaly; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; -import com.github.technus.tectech.mechanics.data.ChunkDataHandler; -import com.github.technus.tectech.mechanics.data.IChunkMetaDataHandler; import com.github.technus.tectech.loader.MainLoader; -import com.github.technus.tectech.mechanics.data.ChunkDataMessage; import com.github.technus.tectech.loader.NetworkDispatcher; +import com.github.technus.tectech.mechanics.data.ChunkDataHandler; +import com.github.technus.tectech.mechanics.data.ChunkDataMessage; +import com.github.technus.tectech.mechanics.data.IChunkMetaDataHandler; import com.github.technus.tectech.mechanics.data.PlayerDataMessage; import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition; import cpw.mods.fml.common.gameevent.TickEvent; @@ -14,8 +14,6 @@ import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -152,7 +150,7 @@ public class AnomalyHandler implements IChunkMetaDataHandler { @Override public void tickPlayer(HashMap data, TickEvent.PlayerTickEvent aEvent) { if (aEvent.side.isClient()) { - EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; + EntityPlayer player = TecTech.proxy.getPlayer(); ChunkCoordIntPair pair = new ChunkCoordIntPair(player.chunkCoordX, player.chunkCoordZ); NBTTagCompound compound = data.get(player.worldObj.provider.dimensionId).get(pair); if (compound != null) { @@ -199,10 +197,10 @@ public class AnomalyHandler implements IChunkMetaDataHandler { @Override public void tickRender(HashMap data, TickEvent.RenderTickEvent aEvent) { - EntityClientPlayerMP player=Minecraft.getMinecraft().thePlayer; + EntityPlayer player=TecTech.proxy.getPlayer(); if(player!=null) { if(!player.capabilities.isCreativeMode) { - NBTTagCompound tagCompound = TecTech.playerPersistence.getDataOrSetToNewTag(Minecraft.getMinecraft().thePlayer); + NBTTagCompound tagCompound = TecTech.playerPersistence.getDataOrSetToNewTag(player); if (tagCompound != null) { float cancer = tagCompound.getFloat(SPACE_CANCER); if (cancer > 0) { -- cgit