aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-03-16 18:59:20 +0100
committerTechnus <daniel112092@gmail.com>2017-03-16 18:59:20 +0100
commitc4b9f49272d56c0e8b3a1a27220ca763749d6db9 (patch)
tree1a3bd2a81233573dbf4c7802c37ac952e123c8af /src/main/java/com
parent02160c703d303861137badea121db3514f706b2d (diff)
downloadGT5-Unofficial-c4b9f49272d56c0e8b3a1a27220ca763749d6db9.tar.gz
GT5-Unofficial-c4b9f49272d56c0e8b3a1a27220ca763749d6db9.tar.bz2
GT5-Unofficial-c4b9f49272d56c0e8b3a1a27220ca763749d6db9.zip
Debug EM container
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/github/technus/tectech/loader/GT_CustomLoader.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java16
2 files changed, 15 insertions, 3 deletions
diff --git a/src/main/java/com/github/technus/tectech/loader/GT_CustomLoader.java b/src/main/java/com/github/technus/tectech/loader/GT_CustomLoader.java
index 2e9bb371af..deec6e4306 100644
--- a/src/main/java/com/github/technus/tectech/loader/GT_CustomLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/GT_CustomLoader.java
@@ -23,6 +23,6 @@ public class GT_CustomLoader {
public void run2() {
ElementalRecipes = new GT_Loader_Recipes();
ElementalRecipes.run();
- TecTech.Logger.info("Recipe Init Done Done");
+ TecTech.Logger.info("Recipe Init Done");
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java b/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java
index 4a354524c0..d828a672aa 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java
@@ -8,6 +8,7 @@ import com.github.technus.tectech.elementalMatter.interfaces.iElementalInstanceC
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
@@ -36,7 +37,11 @@ public class debug_container_EM extends Item {
@Override
public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- NBTTagCompound tNBT = aStack.getTagCompound();
+ NBTTagCompound tNBT;
+ //if(aStack.getTagCompound()==null){
+ // aStack.setTagCompound(new NBTTagCompound());
+ //}
+ tNBT = aStack.getTagCompound();
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (aPlayer instanceof EntityPlayerMP) {
aStack.stackSize = 1;
@@ -73,7 +78,7 @@ public class debug_container_EM extends Item {
aList.add("Container for elemental matter");
try {
NBTTagCompound tNBT = aStack.getTagCompound();
- if (tNBT.hasKey("info")) {
+ if (tNBT!=null && tNBT.hasKey("info")) {
aList.add("Contains:");
Collections.addAll(aList, cElementalInstanceStackTree.infoFromNBT(tNBT.getCompoundTag("info")));
}
@@ -86,4 +91,11 @@ public class debug_container_EM extends Item {
INSTANCE=new debug_container_EM();
GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName());
}
+
+ @Override
+ public void getSubItems(Item item, CreativeTabs tab, List list) {
+ ItemStack that=new ItemStack(this,1);
+ that.setTagCompound(new NBTTagCompound());
+ list.add(that);
+ }
}