aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorUnknown <tudurap.com@gmail.com>2019-07-16 13:02:13 +0200
committerUnknown <tudurap.com@gmail.com>2019-07-16 13:02:13 +0200
commit8910a24fd7180debaf010f8a7403c9bf82b71c4c (patch)
treecd854f743ef01ce13dcff0d10793e07c8a1af29f /src/main
parentd7a1b485741091668b88328e3ae9df0a7d6419e8 (diff)
parent0989424cca10758930071d0846070e521f856957 (diff)
downloadGT5-Unofficial-8910a24fd7180debaf010f8a7403c9bf82b71c4c.tar.gz
GT5-Unofficial-8910a24fd7180debaf010f8a7403c9bf82b71c4c.tar.bz2
GT5-Unofficial-8910a24fd7180debaf010f8a7403c9bf82b71c4c.zip
Merge remote-tracking branch 'origin/betterParametrizers' into BassAddons
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java4
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java14
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/anomaly/CancerCommand.java (renamed from src/main/java/com/github/technus/tectech/mechanics/commands/CancerCommand.java)7
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/data/ChunkDataHandler.java11
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/ClientProxy.java6
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/CommonProxy.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java1
7 files changed, 30 insertions, 17 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index 096aafc468..264c8dd797 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -2,10 +2,10 @@ package com.github.technus.tectech;
import com.github.technus.tectech.loader.MainLoader;
import com.github.technus.tectech.loader.TecTechConfig;
-import com.github.technus.tectech.mechanics.commands.CancerCommand;
+import com.github.technus.tectech.mechanics.anomaly.AnomalyHandler;
+import com.github.technus.tectech.mechanics.anomaly.CancerCommand;
import com.github.technus.tectech.mechanics.commands.ConvertFloat;
import com.github.technus.tectech.mechanics.commands.ConvertInteger;
-import com.github.technus.tectech.mechanics.anomaly.AnomalyHandler;
import com.github.technus.tectech.mechanics.data.ChunkDataHandler;
import com.github.technus.tectech.mechanics.data.PlayerPersistence;
import com.github.technus.tectech.mechanics.elementalMatter.core.commands.GiveEM;
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) {
diff --git a/src/main/java/com/github/technus/tectech/mechanics/commands/CancerCommand.java b/src/main/java/com/github/technus/tectech/mechanics/anomaly/CancerCommand.java
index 64caeb1caf..c19cca64d5 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/commands/CancerCommand.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/anomaly/CancerCommand.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.mechanics.commands;
+package com.github.technus.tectech.mechanics.anomaly;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.loader.NetworkDispatcher;
@@ -18,7 +18,10 @@ public class CancerCommand implements ICommand {
ArrayList<String> aliases=new ArrayList<>();
public CancerCommand(){
+ aliases.add("cancer_EM");
aliases.add("cancer");
+ aliases.add("sanser");
+ aliases.add("sancer");
}
@Override
@@ -69,7 +72,7 @@ public class CancerCommand implements ICommand {
@Override
public String getCommandUsage(ICommandSender p_71518_1_) {
- return "cancer [Amount 0.0-2.0]";
+ return "cancer_EM [Amount 0.0-2.0]";
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/ChunkDataHandler.java b/src/main/java/com/github/technus/tectech/mechanics/data/ChunkDataHandler.java
index f6d84d6b12..8109db9b86 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/data/ChunkDataHandler.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/data/ChunkDataHandler.java
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraftforge.event.world.ChunkDataEvent;
@@ -102,10 +103,12 @@ public class ChunkDataHandler {
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onUnLoadChunk(ChunkEvent.Unload aEvent){
- pullSyncHandlers.forEach(chunkMetaDataHandler -> dimensionWiseMetaChunkData
- .get(chunkMetaDataHandler.getTagName())
- .get(aEvent.world.provider.dimensionId)
- .remove(aEvent.getChunk().getChunkCoordIntPair()));
+ if(aEvent.world.isRemote && !Minecraft.getMinecraft().isSingleplayer()) {
+ pullSyncHandlers.forEach(chunkMetaDataHandler -> dimensionWiseMetaChunkData
+ .get(chunkMetaDataHandler.getTagName())
+ .get(aEvent.world.provider.dimensionId)
+ .remove(aEvent.getChunk().getChunkCoordIntPair()));
+ }
}
@SideOnly(Side.CLIENT)
diff --git a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
index 255cf56e96..d66cc8bf82 100644
--- a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
@@ -14,6 +14,7 @@ import cpw.mods.fml.common.Loader;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiNewChat;
import net.minecraft.client.particle.EntityExplodeFX;
@@ -138,4 +139,9 @@ public class ClientProxy extends CommonProxy {
public void renderAABB(AxisAlignedBB box) {
renderAABB(Minecraft.getMinecraft().theWorld,box);
}
+
+ @Override
+ public EntityClientPlayerMP getPlayer(){
+ return Minecraft.getMinecraft().thePlayer;
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
index 598a8b148f..6f5f367d7f 100644
--- a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
@@ -81,4 +81,8 @@ public class CommonProxy implements IGuiHandler {
}
return false;
}
+
+ public EntityPlayer getPlayer(){
+ return null;
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
index 8e2a1c1a9b..15567bc477 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
@@ -40,7 +40,6 @@ public final class FrontRotationTriggerItem extends Item {
IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
if (metaTE instanceof IFrontRotation) {
((IFrontRotation) metaTE).rotateAroundFrontPlane(!aPlayer.isSneaking());
- System.out.println("DID SHIT");
return true;
}
} else if (tTileEntity instanceof IFrontRotation) {