aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/blocks
diff options
context:
space:
mode:
authorTechlone <techlone.mc@gmail.com>2017-06-01 20:23:13 +0500
committerTechlone <techlone.mc@gmail.com>2017-06-01 20:23:13 +0500
commit75a33be210cda273ef9e6cc9cbbf739dd913907e (patch)
treee9b10d60389add58abfb7428a761c2cf7e2a0347 /src/main/java/gregtech/common/blocks
parent19f70748971c556fa4d1d0dbd930e8d90b413c47 (diff)
downloadGT5-Unofficial-75a33be210cda273ef9e6cc9cbbf739dd913907e.tar.gz
GT5-Unofficial-75a33be210cda273ef9e6cc9cbbf739dd913907e.tar.bz2
GT5-Unofficial-75a33be210cda273ef9e6cc9cbbf739dd913907e.zip
Fix OreDrill; fix getting block in ItemList; some changes in addInformation - need check this
Diffstat (limited to 'src/main/java/gregtech/common/blocks')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index 4014b01f39..8189a8a52b 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -33,14 +33,9 @@ public class GT_Item_Machines
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
return;
}
- TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
- temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
- temp.xCoord = 0;
- temp.yCoord = 0;
- temp.zCoord = 0;
- if ((temp instanceof IGregTechTileEntity)) {
- IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
- tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
+
+ if (GregTech_API.METATILEENTITIES[tDamage] != null) {
+ IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity();
if (tTileEntity.getDescription() != null) {
int i = 0;
for (String tDescription : tTileEntity.getDescription()) {