diff options
author | Tec <daniel112092@gmail.com> | 2019-07-16 12:27:31 +0200 |
---|---|---|
committer | Tec <daniel112092@gmail.com> | 2019-07-16 12:27:31 +0200 |
commit | 0989424cca10758930071d0846070e521f856957 (patch) | |
tree | 9df5221defef0ed85931156a9b7f5fb4d95498df /src | |
parent | 312baeb8c15e01551885606989a2a3268b89573c (diff) | |
download | GT5-Unofficial-0989424cca10758930071d0846070e521f856957.tar.gz GT5-Unofficial-0989424cca10758930071d0846070e521f856957.tar.bz2 GT5-Unofficial-0989424cca10758930071d0846070e521f856957.zip |
Route get player to proxy
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java | 14 |
1 files changed, 6 insertions, 8 deletions
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<Integer, ChunkDataHandler.ChunkHashMap> 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<Integer, ChunkDataHandler.ChunkHashMap> 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) { |