TryCatch changes

This commit is contained in:
Muramasa 2016-08-13 10:10:11 +01:00
parent 0345ada52c
commit 009709462e
13 changed files with 632 additions and 701 deletions

View file

@ -58,8 +58,7 @@ import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") @Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;")
public class GT_Mod public class GT_Mod implements IGT_Mod {
implements IGT_Mod {
public static final int VERSION = 509; public static final int VERSION = 509;
public static final int REQUIRED_IC2 = 624; public static final int REQUIRED_IC2 = 624;
@Mod.Instance("gregtech") @Mod.Instance("gregtech")
@ -104,13 +103,11 @@ public class GT_Mod
if (GregTech_API.sPreloadStarted) { if (GregTech_API.sPreloadStarted) {
return; return;
} }
for (Runnable tRunnable : GregTech_API.sBeforeGTPreload) { try {
try { for (Runnable tRunnable : GregTech_API.sBeforeGTPreload) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg"); File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg");
Configuration tMainConfig = new Configuration(tFile); Configuration tMainConfig = new Configuration(tFile);
tMainConfig.load(); tMainConfig.load();
@ -367,13 +364,11 @@ public class GT_Mod
GregTech_API.sPreloadFinished = true; GregTech_API.sPreloadFinished = true;
GT_Log.out.println("GT_Mod: Preload-Phase finished!"); GT_Log.out.println("GT_Mod: Preload-Phase finished!");
GT_Log.ore.println("GT_Mod: Preload-Phase finished!"); GT_Log.ore.println("GT_Mod: Preload-Phase finished!");
for (Runnable tRunnable : GregTech_API.sAfterGTPreload) { try {
try { for (Runnable tRunnable : GregTech_API.sAfterGTPreload) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
@Mod.EventHandler @Mod.EventHandler
@ -381,13 +376,11 @@ public class GT_Mod
if (GregTech_API.sLoadStarted) { if (GregTech_API.sLoadStarted) {
return; return;
} }
for (Runnable tRunnable : GregTech_API.sBeforeGTLoad) { try {
try { for (Runnable tRunnable : GregTech_API.sBeforeGTLoad) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
new GT_Bees(); new GT_Bees();
@ -400,13 +393,11 @@ public class GT_Mod
GregTech_API.sLoadFinished = true; GregTech_API.sLoadFinished = true;
GT_Log.out.println("GT_Mod: Load-Phase finished!"); GT_Log.out.println("GT_Mod: Load-Phase finished!");
GT_Log.ore.println("GT_Mod: Load-Phase finished!"); GT_Log.ore.println("GT_Mod: Load-Phase finished!");
for (Runnable tRunnable : GregTech_API.sAfterGTLoad) { try {
try { for (Runnable tRunnable : GregTech_API.sAfterGTLoad) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
@Mod.EventHandler @Mod.EventHandler
@ -414,13 +405,11 @@ public class GT_Mod
if (GregTech_API.sPostloadStarted) { if (GregTech_API.sPostloadStarted) {
return; return;
} }
for (Runnable tRunnable : GregTech_API.sBeforeGTPostload) { try {
try { for (Runnable tRunnable : GregTech_API.sBeforeGTPostload) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
gregtechproxy.onPostLoad(); gregtechproxy.onPostLoad();
if (gregtechproxy.mSortToTheEnd) { if (gregtechproxy.mSortToTheEnd) {
gregtechproxy.registerUnificationEntries(); gregtechproxy.registerUnificationEntries();
@ -605,13 +594,11 @@ public class GT_Mod
GregTech_API.sPostloadFinished = true; GregTech_API.sPostloadFinished = true;
GT_Log.out.println("GT_Mod: PostLoad-Phase finished!"); GT_Log.out.println("GT_Mod: PostLoad-Phase finished!");
GT_Log.ore.println("GT_Mod: PostLoad-Phase finished!"); GT_Log.ore.println("GT_Mod: PostLoad-Phase finished!");
for (Runnable tRunnable : GregTech_API.sAfterGTPostload) { try {
try { for (Runnable tRunnable : GregTech_API.sAfterGTPostload) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI"); GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI");
if (ItemList.FR_Bee_Drone.get(1L, new Object[0]) != null) { if (ItemList.FR_Bee_Drone.get(1L, new Object[0]) != null) {
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0); GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
@ -700,13 +687,11 @@ public class GT_Mod
@Mod.EventHandler @Mod.EventHandler
public void onServerStarting(FMLServerStartingEvent aEvent) { public void onServerStarting(FMLServerStartingEvent aEvent) {
for (Runnable tRunnable : GregTech_API.sBeforeGTServerstart) { try {
try { for (Runnable tRunnable : GregTech_API.sBeforeGTServerstart) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
gregtechproxy.onServerStarting(); gregtechproxy.onServerStarting();
GT_Log.out.println("GT_Mod: Unificating outputs of all known Recipe Types."); GT_Log.out.println("GT_Mod: Unificating outputs of all known Recipe Types.");
ArrayList<ItemStack> tStacks = new ArrayList(10000); ArrayList<ItemStack> tStacks = new ArrayList(10000);
@ -840,13 +825,11 @@ public class GT_Mod
GregTech_API.mServerStarted = true; GregTech_API.mServerStarted = true;
GT_Log.out.println("GT_Mod: ServerStarting-Phase finished!"); GT_Log.out.println("GT_Mod: ServerStarting-Phase finished!");
GT_Log.ore.println("GT_Mod: ServerStarting-Phase finished!"); GT_Log.ore.println("GT_Mod: ServerStarting-Phase finished!");
for (Runnable tRunnable : GregTech_API.sAfterGTServerstart) { try {
try { for (Runnable tRunnable : GregTech_API.sAfterGTServerstart) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
@Mod.EventHandler @Mod.EventHandler
@ -858,14 +841,12 @@ public class GT_Mod
public void onIDChangingEvent(FMLModIdMappingEvent aEvent) { public void onIDChangingEvent(FMLModIdMappingEvent aEvent) {
GT_Utility.reInit(); GT_Utility.reInit();
GT_Recipe.reInit(); GT_Recipe.reInit();
for (Iterator i$ = GregTech_API.sItemStackMappings.iterator(); i$.hasNext(); ) { try {
Map tMap = (Map) i$.next(); for (Iterator i$ = GregTech_API.sItemStackMappings.iterator(); i$.hasNext(); ) {
try { Map tMap = (Map) i$.next();
GT_Utility.reMap(tMap); GT_Utility.reMap(tMap);
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
// public void onIDChangingEvent(FMLModIdMappingEvent aEvent) // public void onIDChangingEvent(FMLModIdMappingEvent aEvent)
@ -880,13 +861,11 @@ public class GT_Mod
@Mod.EventHandler @Mod.EventHandler
public void onServerStopping(FMLServerStoppingEvent aEvent) { public void onServerStopping(FMLServerStoppingEvent aEvent) {
for (Runnable tRunnable : GregTech_API.sBeforeGTServerstop) { try {
try { for (Runnable tRunnable : GregTech_API.sBeforeGTServerstop) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
gregtechproxy.onServerStopping(); gregtechproxy.onServerStopping();
try { try {
if ((GT_Values.D1) || (GT_Log.out != System.out)) { if ((GT_Values.D1) || (GT_Log.out != System.out)) {
@ -954,13 +933,11 @@ public class GT_Mod
e.printStackTrace(GT_Log.err); e.printStackTrace(GT_Log.err);
} }
} }
for (Runnable tRunnable : GregTech_API.sAfterGTServerstop) { try {
try { for (Runnable tRunnable : GregTech_API.sAfterGTServerstop) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
public boolean isServerSide() { public boolean isServerSide() {

View file

@ -120,19 +120,18 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
use(aStack, 0, aPlayer); use(aStack, 0, aPlayer);
isItemStackUsable(aStack); isItemStackUsable(aStack);
ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack));
if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList)
try { if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) {
if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) { if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); return true;
return true;
}
if (aStack.stackSize <= 0) {
aPlayer.destroyCurrentEquippedItem();
return false;
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
} }
if (aStack.stackSize <= 0) {
aPlayer.destroyCurrentEquippedItem();
return false;
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
}
return false; return false;
} }
@ -141,19 +140,18 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
use(aStack, 0, aPlayer); use(aStack, 0, aPlayer);
isItemStackUsable(aStack); isItemStackUsable(aStack);
ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack));
if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList)
try { if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) {
if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); return true;
return true;
}
if (aStack.stackSize <= 0) {
aPlayer.destroyCurrentEquippedItem();
return false;
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
} }
if (aStack.stackSize <= 0) {
aPlayer.destroyCurrentEquippedItem();
return false;
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
}
return false; return false;
} }
@ -162,19 +160,18 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
use(aStack, 0, aPlayer); use(aStack, 0, aPlayer);
isItemStackUsable(aStack); isItemStackUsable(aStack);
ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack));
if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList)
try { if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) {
if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem();
if (aStack.stackSize <= 0) aPlayer.destroyCurrentEquippedItem(); return true;
return true;
}
if (aStack.stackSize <= 0) {
aPlayer.destroyCurrentEquippedItem();
return false;
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
} }
if (aStack.stackSize <= 0) {
aPlayer.destroyCurrentEquippedItem();
return false;
}
} catch (Throwable e) {
if (D1) e.printStackTrace(GT_Log.err);
}
return false; return false;
} }
@ -183,12 +180,11 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
use(aStack, 0, aPlayer); use(aStack, 0, aPlayer);
isItemStackUsable(aStack); isItemStackUsable(aStack);
ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack)); ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = mItemBehaviors.get((short) getDamage(aStack));
if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList) try { if (tList != null) for (IItemBehaviour<GT_MetaBase_Item> tBehavior : tList)
try { aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer);
aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer); } catch (Throwable e) {
} catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err);
if (D1) e.printStackTrace(GT_Log.err); }
}
return aStack; return aStack;
} }

View file

@ -180,116 +180,114 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
long tTime = System.currentTimeMillis(); long tTime = System.currentTimeMillis();
for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) { try { for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
try { switch (tCode) {
switch (tCode) { case 0:
case 0: tCode++;
tCode++; if (mTickTimer++ == 0) {
if (mTickTimer++ == 0) { oX = xCoord;
oY = yCoord;
oZ = zCoord;
if (isServerSide()) for (byte i = 0; i < 6; i++)
if (getCoverIDAtSide(i) != 0)
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
dropCover(i, i, true);
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
mMetaTileEntity.onFirstTick(this);
if (!hasValidMetaTileEntity()) return;
}
case 1:
tCode++;
if (isClientSide()) {
if (mColor != oColor) {
mMetaTileEntity.onColorChangeClient(oColor = mColor);
issueTextureUpdate();
}
if (mNeedsUpdate) {
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
mNeedsUpdate = false;
}
}
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
if (isServerSide() && mTickTimer > 10) {
for (byte i = (byte) (tCode - 2); i < 6; i++)
if (getCoverIDAtSide(i) != 0) {
tCode++;
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
if (!hasValidMetaTileEntity()) return;
}
}
mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63));
if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
mConnections = (byte) ((mConnections & ~64) | -128);
}
}
case 8:
tCode = 9;
mMetaTileEntity.onPreTick(this, mTickTimer);
if (!hasValidMetaTileEntity()) return;
case 9:
tCode++;
if (isServerSide()) {
if (mTickTimer == 10) {
for (byte i = 0; i < 6; i++)
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
issueBlockUpdate();
}
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
oX = xCoord; oX = xCoord;
oY = yCoord; oY = yCoord;
oZ = zCoord; oZ = zCoord;
if (isServerSide()) for (byte i = 0; i < 6; i++) issueClientUpdate();
if (getCoverIDAtSide(i) != 0) clearTileEntityBuffer();
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
dropCover(i, i, true);
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
mMetaTileEntity.onFirstTick(this);
if (!hasValidMetaTileEntity()) return;
} }
case 1: }
tCode++; case 10:
if (isClientSide()) { tCode++;
if (mColor != oColor) { mMetaTileEntity.onPostTick(this, mTickTimer);
mMetaTileEntity.onColorChangeClient(oColor = mColor); if (!hasValidMetaTileEntity()) return;
issueTextureUpdate(); case 11:
tCode++;
if (isServerSide()) {
if (mTickTimer % 10 == 0) {
if (mSendClientData) {
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
mSendClientData = false;
} }
}
if (mNeedsUpdate) { if (mTickTimer > 10) {
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); if (mConnections != oTextureData) sendBlockEvent((byte) 0, oTextureData = mConnections);
//worldObj.func_147479_m(xCoord, yCoord, zCoord); byte tData = mMetaTileEntity.getUpdateData();
mNeedsUpdate = false; if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
} if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
} }
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
if (isServerSide() && mTickTimer > 10) {
for (byte i = (byte) (tCode - 2); i < 6; i++)
if (getCoverIDAtSide(i) != 0) {
tCode++;
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
if (!hasValidMetaTileEntity()) return;
}
}
mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63));
if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
mConnections = (byte) ((mConnections & ~64) | -128);
}
}
case 8:
tCode = 9;
mMetaTileEntity.onPreTick(this, mTickTimer);
if (!hasValidMetaTileEntity()) return;
case 9:
tCode++;
if (isServerSide()) {
if (mTickTimer == 10) {
for (byte i = 0; i < 6; i++)
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
issueBlockUpdate();
}
if (xCoord != oX || yCoord != oY || zCoord != oZ) { if (mNeedsBlockUpdate) {
oX = xCoord; worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
oY = yCoord; mNeedsBlockUpdate = false;
oZ = zCoord;
issueClientUpdate();
clearTileEntityBuffer();
}
} }
case 10: }
tCode++; default:
mMetaTileEntity.onPostTick(this, mTickTimer); tCode = -1;
if (!hasValidMetaTileEntity()) return; break;
case 11:
tCode++;
if (isServerSide()) {
if (mTickTimer % 10 == 0) {
if (mSendClientData) {
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
mSendClientData = false;
}
}
if (mTickTimer > 10) {
if (mConnections != oTextureData) sendBlockEvent((byte) 0, oTextureData = mConnections);
byte tData = mMetaTileEntity.getUpdateData();
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
}
if (mNeedsBlockUpdate) {
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
mNeedsBlockUpdate = false;
}
}
default:
tCode = -1;
break;
}
} catch (Throwable e) {
GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
} }
}} catch (Throwable e) {
//GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
} }
if (isServerSide() && hasValidMetaTileEntity()) { if (isServerSide() && hasValidMetaTileEntity()) {
@ -706,7 +704,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
} }
@Override @Override
public ITexture[] getTexture(Block aBlock, byte aSide) { public ITexture[] getTexture(byte aSide) {
ITexture rIcon = getCoverTexture(aSide); ITexture rIcon = getCoverTexture(aSide);
if (rIcon != null) return new ITexture[]{rIcon}; if (rIcon != null) return new ITexture[]{rIcon};
return getTextureUncovered(aSide); return getTextureUncovered(aSide);

View file

@ -251,37 +251,256 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
mRunningThroughTick = true; mRunningThroughTick = true;
long tTime = System.currentTimeMillis(); long tTime = System.currentTimeMillis();
for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) { try { for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
try { switch (tCode) {
switch (tCode) { case 0:
case 0: tCode++;
tCode++; if (mTickTimer++ == 0) {
if (mTickTimer++ == 0) { oX = xCoord;
oY = yCoord;
oZ = zCoord;
if (isServerSide()) for (byte i = 0; i < 6; i++)
if (getCoverIDAtSide(i) != 0)
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
dropCover(i, i, true);
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
mMetaTileEntity.onFirstTick(this);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
}
case 1:
tCode++;
if (isClientSide()) {
if (mColor != oColor) {
mMetaTileEntity.onColorChangeClient(oColor = mColor);
issueTextureUpdate();
}
if (mLightValue != oLightValueClient) {
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
oLightValueClient = mLightValue;
issueTextureUpdate();
}
if (mNeedsUpdate) {
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
mNeedsUpdate = false;
}
}
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
if (isServerSide() && mTickTimer > 10) {
for (byte i = (byte) (tCode - 2); i < 6; i++)
if (getCoverIDAtSide(i) != 0) {
tCode++;
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
}
}
}
case 8:
tCode = 9;
if (isServerSide()) {
if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0;
if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0;
mAverageEUInput[mAverageEUInputIndex] = 0;
mAverageEUOutput[mAverageEUOutputIndex] = 0;
}
case 9:
tCode++;
mMetaTileEntity.onPreTick(this, mTickTimer);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
case 10:
tCode++;
if (isServerSide()) {
if (mRedstone != oRedstone || mTickTimer == 10) {
for (byte i = 0; i < 6; i++)
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
oRedstone = mRedstone;
issueBlockUpdate();
}
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
oX = xCoord; oX = xCoord;
oY = yCoord; oY = yCoord;
oZ = zCoord; oZ = zCoord;
if (isServerSide()) for (byte i = 0; i < 6; i++) issueClientUpdate();
clearTileEntityBuffer();
}
if (mFacing != oFacing) {
oFacing = mFacing;
for (byte i = 0; i < 6; i++)
if (getCoverIDAtSide(i) != 0) if (getCoverIDAtSide(i) != 0)
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i)))) if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
dropCover(i, i, true); dropCover(i, i, true);
issueBlockUpdate();
}
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this); if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
mAcceptedAmperes = 0;
mMetaTileEntity.onFirstTick(this); if (getOutputVoltage() != oOutput) {
if (!hasValidMetaTileEntity()) { oOutput = getOutputVoltage();
mRunningThroughTick = false; }
return;
if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
for (byte i = 0; i < 6; i++) {
boolean
temp = isEnergyInputSide(i);
if (temp != mActiveEUInputs[i]) {
mActiveEUInputs[i] = temp;
}
temp = isEnergyOutputSide(i);
if (temp != mActiveEUOutputs[i]) {
mActiveEUOutputs[i] = temp;
}
}
}
if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
if (tUsableAmperage > 0) {
long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
mAverageEUOutput[mAverageEUOutputIndex] += tEU;
decreaseStoredEU(tEU, true);
}
}
if (getEUCapacity() > 0) {
if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
Block tBlock = getBlockAtSide((byte) getRandomNumber(6));
if (tBlock instanceof BlockFire) doEnergyExplosion();
}
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
if (getRandomNumber(1000) == 0) {
if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord)
|| (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord)
|| (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord)
|| (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord)
|| (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) {
if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
if (getRandomNumber(10) == 0) {
try {
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
} catch (Exception e) {
}
doEnergyExplosion();
} else setOnFire();
}
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
try {
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
} catch (Exception e) {
}
doEnergyExplosion();
}
}
}
} }
} }
case 1:
tCode++;
if (isClientSide()) {
if (mColor != oColor) {
mMetaTileEntity.onColorChangeClient(oColor = mColor);
issueTextureUpdate();
}
if (mLightValue != oLightValueClient) { if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
}
case 11:
tCode++;
if (isServerSide()) {
if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
dischargeItem(mMetaTileEntity.mInventory[i]);
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
mMetaTileEntity.mInventory[i] = null;
mInventoryChanged = true;
}
}
}
}
case 12:
tCode++;
if (isServerSide()) {
if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
chargeItem(mMetaTileEntity.mInventory[i]);
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
mMetaTileEntity.mInventory[i] = null;
mInventoryChanged = true;
}
}
}
}
case 13:
tCode++;
updateStatus();
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
case 14:
tCode++;
mMetaTileEntity.onPostTick(this, mTickTimer);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
case 15:
tCode++;
if (isServerSide()) {
if (mTickTimer % 10 == 0) {
if (mSendClientData) {
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)), oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
mSendClientData = false;
}
}
if (mTickTimer > 10) {
byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
tData = mMetaTileEntity.getUpdateData();
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
if (mLightValue != oLightValue) {
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue); worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord); worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord); worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
@ -290,250 +509,23 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord); worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1); worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1); worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
oLightValueClient = mLightValue;
issueTextureUpdate(); issueTextureUpdate();
} sendBlockEvent((byte) 7, oLightValue = mLightValue);
if (mNeedsUpdate) {
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
mNeedsUpdate = false;
} }
} }
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
if (isServerSide() && mTickTimer > 10) {
for (byte i = (byte) (tCode - 2); i < 6; i++)
if (getCoverIDAtSide(i) != 0) {
tCode++;
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
}
}
if (mNeedsBlockUpdate) {
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
mNeedsBlockUpdate = false;
} }
case 8: }
tCode = 9; default:
if (isServerSide()) { tCode = -1;
if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0; break;
if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0; }}
} catch (Throwable e) {
mAverageEUInput[mAverageEUInputIndex] = 0; //gregtech.api.util.GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
mAverageEUOutput[mAverageEUOutputIndex] = 0; e.printStackTrace(GT_Log.err);
}
case 9:
tCode++;
mMetaTileEntity.onPreTick(this, mTickTimer);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
case 10:
tCode++;
if (isServerSide()) {
if (mRedstone != oRedstone || mTickTimer == 10) {
for (byte i = 0; i < 6; i++)
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
oRedstone = mRedstone;
issueBlockUpdate();
}
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
oX = xCoord;
oY = yCoord;
oZ = zCoord;
issueClientUpdate();
clearTileEntityBuffer();
}
if (mFacing != oFacing) {
oFacing = mFacing;
for (byte i = 0; i < 6; i++)
if (getCoverIDAtSide(i) != 0)
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
dropCover(i, i, true);
issueBlockUpdate();
}
if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
mAcceptedAmperes = 0;
if (getOutputVoltage() != oOutput) {
oOutput = getOutputVoltage();
}
if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
for (byte i = 0; i < 6; i++) {
boolean
temp = isEnergyInputSide(i);
if (temp != mActiveEUInputs[i]) {
mActiveEUInputs[i] = temp;
}
temp = isEnergyOutputSide(i);
if (temp != mActiveEUOutputs[i]) {
mActiveEUOutputs[i] = temp;
}
}
}
if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
if (tUsableAmperage > 0) {
long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
mAverageEUOutput[mAverageEUOutputIndex] += tEU;
decreaseStoredEU(tEU, true);
}
}
if (getEUCapacity() > 0) {
if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
Block tBlock = getBlockAtSide((byte) getRandomNumber(6));
if (tBlock instanceof BlockFire) doEnergyExplosion();
}
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
if (getRandomNumber(1000) == 0) {
if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord)
|| (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord)
|| (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord)
|| (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord)
|| (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) {
if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
if (getRandomNumber(10) == 0) {
try {
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
} catch (Exception e) {
}
doEnergyExplosion();
} else setOnFire();
}
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
try {
GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
} catch (Exception e) {
}
doEnergyExplosion();
}
}
}
}
}
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
}
case 11:
tCode++;
if (isServerSide()) {
if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
dischargeItem(mMetaTileEntity.mInventory[i]);
if(ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])>0){
if((getStoredEU() + ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]))<getEUCapacity()){
increaseStoredEnergyUnits((long)ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]),false);
mMetaTileEntity.mInventory[i].stackSize--;
}
}
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
mMetaTileEntity.mInventory[i] = null;
mInventoryChanged = true;
}
}
}
}
case 12:
tCode++;
if (isServerSide()) {
if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
chargeItem(mMetaTileEntity.mInventory[i]);
if (mMetaTileEntity.mInventory[i].stackSize <= 0)
mMetaTileEntity.mInventory[i] = null;
mInventoryChanged = true;
}
}
}
}
case 13:
tCode++;
updateStatus();
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
case 14:
tCode++;
mMetaTileEntity.onPostTick(this, mTickTimer);
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
case 15:
tCode++;
if (isServerSide()) {
if (mTickTimer % 10 == 0) {
if (mSendClientData) {
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)), oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
mSendClientData = false;
}
}
if (mTickTimer > 10) {
byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
tData = mMetaTileEntity.getUpdateData();
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
if (mLightValue != oLightValue) {
worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
issueTextureUpdate();
sendBlockEvent((byte) 7, oLightValue = mLightValue);
}
}
if (mNeedsBlockUpdate) {
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
mNeedsBlockUpdate = false;
}
}
default:
tCode = -1;
break;
}
} catch (Throwable e) {
GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
} }
if (isServerSide() && hasValidMetaTileEntity()) { if (isServerSide() && hasValidMetaTileEntity()) {

View file

@ -30,27 +30,23 @@ public class GT_FluidStack extends FluidStack {
} }
public static final synchronized void fixAllThoseFuckingFluidIDs() { public static final synchronized void fixAllThoseFuckingFluidIDs() {
if (ForgeVersion.getBuildVersion() < 1355) { if (ForgeVersion.getBuildVersion() < 1355 && ForgeVersion.getRevisionVersion() < 4) {
while (lock) { try {
try { while (lock) {
Thread.sleep(1); Thread.sleep(1);
} catch (InterruptedException e) { }} catch (InterruptedException e) {}
}
}
lock = true; lock = true;
for (GT_FluidStack tFluid : sAllFluidStacks) tFluid.fixFluidIDForFucksSake(); for (GT_FluidStack tFluid : sAllFluidStacks) tFluid.fixFluidIDForFucksSake();
for (Map<Fluid, ?> tMap : GregTech_API.sFluidMappings) try {
try { for (Map<Fluid, ?> tMap : GregTech_API.sFluidMappings)
GT_Utility.reMap(tMap); GT_Utility.reMap(tMap);
} catch (Throwable e) { } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
e.printStackTrace(GT_Log.err);
}
lock = false; lock = false;
} }
} }
public final void fixFluidIDForFucksSake() { public final void fixFluidIDForFucksSake() {
if (ForgeVersion.getBuildVersion() < 1355) { if (ForgeVersion.getBuildVersion() < 1355 && ForgeVersion.getRevisionVersion() < 4) {
int fluidID; int fluidID;
try { try {
fluidID = this.getFluid().getID(); fluidID = this.getFluid().getID();
@ -67,7 +63,7 @@ public class GT_FluidStack extends FluidStack {
@Override @Override
public FluidStack copy() { public FluidStack copy() {
if (ForgeVersion.getBuildVersion() < 1355) { if (ForgeVersion.getBuildVersion() < 1355 && ForgeVersion.getRevisionVersion() < 4) {
fixFluidIDForFucksSake(); fixFluidIDForFucksSake();
} }
return new GT_FluidStack(this); return new GT_FluidStack(this);

View file

@ -1993,16 +1993,14 @@ public class GT_Utility {
if (aStack != null) { if (aStack != null) {
NBTTagList nbttaglist = aStack.getEnchantmentTagList(); NBTTagList nbttaglist = aStack.getEnchantmentTagList();
if (nbttaglist != null) { if (nbttaglist != null) {
for (int i = 0; i < nbttaglist.tagCount(); ++i) { try {
try { for (int i = 0; i < nbttaglist.tagCount(); ++i) {
short short1 = nbttaglist.getCompoundTagAt(i).getShort("id"); short short1 = nbttaglist.getCompoundTagAt(i).getShort("id");
short short2 = nbttaglist.getCompoundTagAt(i).getShort("lvl"); short short2 = nbttaglist.getCompoundTagAt(i).getShort("lvl");
if (Enchantment.enchantmentsList[short1] != null) if (Enchantment.enchantmentsList[short1] != null)
aBullshitModifier.calculateModifier(Enchantment.enchantmentsList[short1], short2); aBullshitModifier.calculateModifier(Enchantment.enchantmentsList[short1], short2);
} catch (Throwable e) {
//
} }
} } catch (Throwable e) {/**/}
} }
} }
} }

View file

@ -204,9 +204,9 @@ public class GT_Client extends GT_Proxy
public void onPostLoad() { public void onPostLoad() {
super.onPostLoad(); super.onPostLoad();
label0: try {
for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) label0:
try { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++)
do { do {
if (i >= GregTech_API.METATILEENTITIES.length) if (i >= GregTech_API.METATILEENTITIES.length)
continue label0; continue label0;
@ -214,9 +214,7 @@ public class GT_Client extends GT_Proxy
GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true); GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true);
i++; i++;
} while (true); } while (true);
} catch (Throwable e) { } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
e.printStackTrace(GT_Log.err);
}
// super.onPostLoad(); // super.onPostLoad();

View file

@ -483,17 +483,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
} }
} }
GT_Log.out.println("GT_Mod: Adding Configs specific for MetaTileEntities"); GT_Log.out.println("GT_Mod: Adding Configs specific for MetaTileEntities");
for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { try {
try { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) {
for (; i < GregTech_API.METATILEENTITIES.length; i++) { for (; i < GregTech_API.METATILEENTITIES.length; i++) {
if (GregTech_API.METATILEENTITIES[i] != null) { if (GregTech_API.METATILEENTITIES[i] != null) {
GregTech_API.METATILEENTITIES[i].onConfigLoad(GregTech_API.sMachineFile); GregTech_API.METATILEENTITIES[i].onConfigLoad(GregTech_API.sMachineFile);
} }
} }
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Adding Tool Usage Crafting Recipes for OreDict Items."); GT_Log.out.println("GT_Mod: Adding Tool Usage Crafting Recipes for OreDict Items.");
long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED
| GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler.RecipeBits.NOT_REMOVABLE; | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler.RecipeBits.NOT_REMOVABLE;
@ -740,17 +738,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
break; break;
} }
} }
for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { try {
try { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) {
for (; i < GregTech_API.METATILEENTITIES.length; i++) { for (; i < GregTech_API.METATILEENTITIES.length; i++) {
if (GregTech_API.METATILEENTITIES[i] != null) { if (GregTech_API.METATILEENTITIES[i] != null) {
GregTech_API.METATILEENTITIES[i].onServerStart(); GregTech_API.METATILEENTITIES[i].onServerStart();
} }
} }
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
public void onServerStarted() { public void onServerStarted() {
@ -782,17 +778,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
File tSaveDirectory = getSaveDirectory(); File tSaveDirectory = getSaveDirectory();
GregTech_API.sWirelessRedstone.clear(); GregTech_API.sWirelessRedstone.clear();
if (tSaveDirectory != null) { if (tSaveDirectory != null) {
for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { try {
try { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) {
for (; i < GregTech_API.METATILEENTITIES.length; i++) { for (; i < GregTech_API.METATILEENTITIES.length; i++) {
if (GregTech_API.METATILEENTITIES[i] != null) { if (GregTech_API.METATILEENTITIES[i] != null) {
GregTech_API.METATILEENTITIES[i].onWorldSave(tSaveDirectory); GregTech_API.METATILEENTITIES[i].onWorldSave(tSaveDirectory);
} }
} }
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
this.mUniverse = null; this.mUniverse = null;
} }
@ -1413,15 +1407,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
File tSaveDiretory = getSaveDirectory(); File tSaveDiretory = getSaveDirectory();
if (tSaveDiretory != null) { if (tSaveDiretory != null) {
this.isFirstServerWorldTick = false; this.isFirstServerWorldTick = false;
for (IMetaTileEntity tMetaTileEntity : GregTech_API.METATILEENTITIES) { try {
try { for (IMetaTileEntity tMetaTileEntity : GregTech_API.METATILEENTITIES) {
if (tMetaTileEntity != null) { if (tMetaTileEntity != null) {
tMetaTileEntity.onWorldLoad(tSaveDiretory); tMetaTileEntity.onWorldLoad(tSaveDiretory);
} }
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
} }
} }
if ((aEvent.world.getTotalWorldTime() % 100L == 0L) && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) { if ((aEvent.world.getTotalWorldTime() % 100L == 0L) && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) {

View file

@ -112,13 +112,11 @@ public class GT_Worldgenerator
if (tBiome == null) { if (tBiome == null) {
tBiome = BiomeGenBase.plains.biomeName; tBiome = BiomeGenBase.plains.biomeName;
} }
for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) { try {
try { for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider); tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider);
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
j++; j++;
} }
i++; i++;

View file

@ -212,15 +212,13 @@ public class GT_Block_Machines
GregTech_API.sBlockIcons = aIconRegister; GregTech_API.sBlockIcons = aIconRegister;
GT_Log.out.println("GT_Mod: Registering MetaTileEntity specific Textures"); GT_Log.out.println("GT_Mod: Registering MetaTileEntity specific Textures");
for (IMetaTileEntity tMetaTileEntity : GregTech_API.METATILEENTITIES) { try {
try { for (IMetaTileEntity tMetaTileEntity : GregTech_API.METATILEENTITIES) {
if (tMetaTileEntity != null) { if (tMetaTileEntity != null) {
tMetaTileEntity.registerIcons(aIconRegister); tMetaTileEntity.registerIcons(aIconRegister);
} }
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Registering Crop specific Textures"); GT_Log.out.println("GT_Mod: Registering Crop specific Textures");
try { try {
for (GT_BaseCrop tCrop : GT_BaseCrop.sCropList) { for (GT_BaseCrop tCrop : GT_BaseCrop.sCropList) {
@ -231,13 +229,11 @@ public class GT_Block_Machines
} }
GT_Log.out.println("GT_Mod: Starting Block Icon Load Phase"); GT_Log.out.println("GT_Mod: Starting Block Icon Load Phase");
System.out.println("GT_Mod: Starting Block Icon Load Phase"); System.out.println("GT_Mod: Starting Block Icon Load Phase");
for (Runnable tRunnable : GregTech_API.sGTBlockIconload) { try {
try { for (Runnable tRunnable : GregTech_API.sGTBlockIconload) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Finished Block Icon Load Phase"); GT_Log.out.println("GT_Mod: Finished Block Icon Load Phase");
System.out.println("GT_Mod: Finished Block Icon Load Phase"); System.out.println("GT_Mod: Finished Block Icon Load Phase");
} }

View file

@ -98,13 +98,11 @@ public class GT_IntegratedCircuit_Item
GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase"); GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase");
System.out.println("GT_Mod: Starting Item Icon Load Phase"); System.out.println("GT_Mod: Starting Item Icon Load Phase");
GregTech_API.sItemIcons = aIconRegister; GregTech_API.sItemIcons = aIconRegister;
for (Runnable tRunnable : GregTech_API.sGTItemIconload) { try {
try { for (Runnable tRunnable : GregTech_API.sGTItemIconload) {
tRunnable.run(); tRunnable.run();
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Finished Item Icon Load Phase"); GT_Log.out.println("GT_Mod: Finished Item Icon Load Phase");
System.out.println("GT_Mod: Finished Item Icon Load Phase"); System.out.println("GT_Mod: Finished Item Icon Load Phase");
} }

View file

@ -94,7 +94,7 @@ public class Behaviour_DataOrb
} }
public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
if (!getDataTitle(aStack).equals("")) { if (!(getDataTitle(aStack).length() == 0)) {
aList.add(getDataTitle(aStack)); aList.add(getDataTitle(aStack));
aList.add(getDataName(aStack)); aList.add(getDataName(aStack));
} }

View file

@ -54,14 +54,14 @@ public class GT_ItemIterator
GT_Log.out.println("GT_Mod: Scanning ItemList."); GT_Log.out.println("GT_Mod: Scanning ItemList.");
Iterator tIterator = Item.itemRegistry.iterator(); try {
while (tIterator.hasNext()) { Iterator tIterator = Item.itemRegistry.iterator();
Object tObject; while (tIterator.hasNext()) {
if (((tObject = tIterator.next()) instanceof Item) && (!(tObject instanceof GT_Generic_Item))) { Object tObject;
Item tItem = (Item) tObject; if (((tObject = tIterator.next()) instanceof Item) && (!(tObject instanceof GT_Generic_Item))) {
String tName; Item tItem = (Item) tObject;
if ((tName = tItem.getUnlocalizedName()) != null) { String tName;
try { if ((tName = tItem.getUnlocalizedName()) != null) {
if ((tItem instanceof IToolCrowbar)) { if ((tItem instanceof IToolCrowbar)) {
if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) {
if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityRCCrowbars", false)) && if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityRCCrowbars", false)) &&
@ -72,9 +72,6 @@ public class GT_ItemIterator
GT_Log.out.println("GT_Mod: Registered valid RC Crowbar: " + tName); GT_Log.out.println("GT_Mod: Registered valid RC Crowbar: " + tName);
} }
} }
} catch (Throwable e) {
}
try {
if ((tItem instanceof IToolWrench)) { if ((tItem instanceof IToolWrench)) {
if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) {
if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityBCWrenches", false)) && if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityBCWrenches", false)) &&
@ -85,180 +82,175 @@ public class GT_ItemIterator
GT_Log.out.println("GT_Mod: Registered valid BC Wrench: " + tName); GT_Log.out.println("GT_Mod: Registered valid BC Wrench: " + tName);
} }
} }
} catch (Throwable e) { Block tBlock = GT_Utility.getBlockFromStack(new ItemStack(tItem, 1, 0));
} if (tBlock != null) {
Block tBlock = GT_Utility.getBlockFromStack(new ItemStack(tItem, 1, 0)); if (tName.endsWith("beehives")) {
if (tBlock != null) { tBlock.setHarvestLevel("scoop", 0);
if (tName.endsWith("beehives")) { gregtech.common.tools.GT_Tool_Scoop.sBeeHiveMaterial = tBlock.getMaterial();
tBlock.setHarvestLevel("scoop", 0); }
gregtech.common.tools.GT_Tool_Scoop.sBeeHiveMaterial = tBlock.getMaterial(); if (OrePrefixes.stone.mDefaultStackSize < tItem.getItemStackLimit(new ItemStack(tItem, 1, 0))) {
}
if (OrePrefixes.stone.mDefaultStackSize < tItem.getItemStackLimit(new ItemStack(tItem, 1, 0))) {
try {
if ((tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.stone)) || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.netherrack)) || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.end_stone))) { if ((tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.stone)) || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.netherrack)) || (tBlock.isReplaceableOreGen(GT_Values.DW, 0, 0, 0, Blocks.end_stone))) {
tItem.setMaxStackSize(OrePrefixes.stone.mDefaultStackSize); tItem.setMaxStackSize(OrePrefixes.stone.mDefaultStackSize);
} }
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
} }
} }
} if (((tItem instanceof ItemFood)) && (tItem != ItemList.IC2_Food_Can_Filled.getItem()) && (tItem != ItemList.IC2_Food_Can_Spoiled.getItem())) {
if (((tItem instanceof ItemFood)) && (tItem != ItemList.IC2_Food_Can_Filled.getItem()) && (tItem != ItemList.IC2_Food_Can_Spoiled.getItem())) { int tFoodValue = ((ItemFood) tItem).func_150905_g(new ItemStack(tItem, 1, 0));
int tFoodValue = ((ItemFood) tItem).func_150905_g(new ItemStack(tItem, 1, 0)); if (tFoodValue > 0) {
if (tFoodValue > 0) { GT_Values.RA.addCannerRecipe(new ItemStack(tItem, 1, 32767), ItemList.IC2_Food_Can_Empty.get(tFoodValue, new Object[0]), ItemList.IC2_Food_Can_Filled.get(tFoodValue, new Object[0]), GT_Utility.getContainerItem(new ItemStack(tItem, 1, 0), true), tFoodValue * 100, 1);
GT_Values.RA.addCannerRecipe(new ItemStack(tItem, 1, 32767), ItemList.IC2_Food_Can_Empty.get(tFoodValue, new Object[0]), ItemList.IC2_Food_Can_Filled.get(tFoodValue, new Object[0]), GT_Utility.getContainerItem(new ItemStack(tItem, 1, 0), true), tFoodValue * 100, 1); }
} }
} if ((tItem instanceof IFluidContainerItem)) {
if ((tItem instanceof IFluidContainerItem)) { GT_OreDictUnificator.addToBlacklist(new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.addToBlacklist(new ItemStack(tItem, 1, 32767)); }
} if ((tName.equals("item.ItemSensorLocationCard")) || (tName.equals("item.ItemEnergySensorLocationCard")) || (tName.equals("item.ItemEnergyArrayLocationCard")) || (tName.equals("item.ItemTextCard"))) {
if ((tName.equals("item.ItemSensorLocationCard")) || (tName.equals("item.ItemEnergySensorLocationCard")) || (tName.equals("item.ItemEnergyArrayLocationCard")) || (tName.equals("item.ItemTextCard"))) { GT_Values.RA.addAssemblerRecipe(new ItemStack(tItem, 1, 32767), null, ItemList.Circuit_Basic.get(2L, new Object[0]), 200, 32);
GT_Values.RA.addAssemblerRecipe(new ItemStack(tItem, 1, 32767), null, ItemList.Circuit_Basic.get(2L, new Object[0]), 200, 32); }
} if (tName.equals("item.ItemTimeCard")) {
if (tName.equals("item.ItemTimeCard")) { GT_Values.RA.addAssemblerRecipe(new ItemStack(tItem, 1, 32767), null, ItemList.Circuit_Basic.get(1L, new Object[0]), 100, 32);
GT_Values.RA.addAssemblerRecipe(new ItemStack(tItem, 1, 32767), null, ItemList.Circuit_Basic.get(1L, new Object[0]), 100, 32); }
} if (tName.equals("tile.ArsMagica:ore_vinteum")) {
if (tName.equals("tile.ArsMagica:ore_vinteum")) { GT_OreDictUnificator.set(OrePrefixes.ore, Materials.Vinteum, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.set(OrePrefixes.ore, Materials.Vinteum, new ItemStack(tItem, 1, 0)); }
} if (tName.equals("item.ArsMagica:purified_vinteum")) {
if (tName.equals("item.ArsMagica:purified_vinteum")) { GT_Values.RA.addFuel(new ItemStack(tItem, 1, 0), null, 256, 5);
GT_Values.RA.addFuel(new ItemStack(tItem, 1, 0), null, 256, 5); }
} if ((tName.equals("item.fieryBlood")) || (tName.equals("item.fieryTears"))) {
if ((tName.equals("item.fieryBlood")) || (tName.equals("item.fieryTears"))) { GT_Values.RA.addFuel(new ItemStack(tItem, 1, 0), null, 2048, 5);
GT_Values.RA.addFuel(new ItemStack(tItem, 1, 0), null, 2048, 5); }
} if (tName.equals("tile.TFRoots")) {
if (tName.equals("tile.TFRoots")) { GT_ModHandler.addPulverisationRecipe(new ItemStack(tItem, 1, 0), new ItemStack(Items.stick, 2), new ItemStack(Items.stick, 1), 30);
GT_ModHandler.addPulverisationRecipe(new ItemStack(tItem, 1, 0), new ItemStack(Items.stick, 2), new ItemStack(Items.stick, 1), 30); GT_ModHandler.addSawmillRecipe(new ItemStack(tItem, 1, 0), new ItemStack(Items.stick, 4), new ItemStack(Items.stick, 2));
GT_ModHandler.addSawmillRecipe(new ItemStack(tItem, 1, 0), new ItemStack(Items.stick, 4), new ItemStack(Items.stick, 2)); GT_Values.RA.addFuel(new ItemStack(tItem, 1, 1), new ItemStack(Items.stick, 4), 32, 5);
GT_Values.RA.addFuel(new ItemStack(tItem, 1, 1), new ItemStack(Items.stick, 4), 32, 5); }
} if (tName.equals("item.tconstruct.manual")) {
if (tName.equals("item.tconstruct.manual")) { GT_OreDictUnificator.registerOre("bookTinkersManual", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("bookTinkersManual", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ArsMagica:spell_parchment")) {
if (tName.equals("item.ArsMagica:spell_parchment")) { GT_OreDictUnificator.registerOre("paperArsSpellParchment", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperArsSpellParchment", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ArsMagica:spell_recipe")) {
if (tName.equals("item.ArsMagica:spell_recipe")) { GT_OreDictUnificator.registerOre("paperArsSpellRecipe", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperArsSpellRecipe", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ArsMagica:spell_book")) {
if (tName.equals("item.ArsMagica:spell_book")) { GT_OreDictUnificator.registerOre("bookArsSpells", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("bookArsSpells", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.myst.page")) {
if (tName.equals("item.myst.page")) { GT_OreDictUnificator.registerOre("paperMystcraft", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperMystcraft", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.myst.agebook")) {
if (tName.equals("item.myst.agebook")) { GT_OreDictUnificator.registerOre("bookMystcraftAge", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("bookMystcraftAge", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.myst.linkbook")) {
if (tName.equals("item.myst.linkbook")) { GT_OreDictUnificator.registerOre("bookMystcraftLink", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("bookMystcraftLink", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.myst.notebook")) {
if (tName.equals("item.myst.notebook")) { GT_OreDictUnificator.registerOre("bookNotes", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("bookNotes", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.itemManuelBook")) {
if (tName.equals("item.itemManuelBook")) { GT_OreDictUnificator.registerOre("bookWritten", new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre("bookWritten", new ItemStack(tItem, 1, 0)); }
} if (tName.equals("item.blueprintItem")) {
if (tName.equals("item.blueprintItem")) { GT_OreDictUnificator.registerOre("paperBlueprint", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperBlueprint", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ccprintout")) {
if (tName.equals("item.ccprintout")) { GT_OreDictUnificator.registerOre("paperWritten", new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre("paperWritten", new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre("paperWritten", new ItemStack(tItem, 1, 1));
GT_OreDictUnificator.registerOre("paperWritten", new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre("bookWritten", new ItemStack(tItem, 1, 2));
GT_OreDictUnificator.registerOre("bookWritten", new ItemStack(tItem, 1, 2)); }
} if (tName.equals("item.blueprintItem")) {
if (tName.equals("item.blueprintItem")) { GT_OreDictUnificator.registerOre("paperBlueprint", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperBlueprint", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.wirelessmap")) {
if (tName.equals("item.wirelessmap")) { GT_OreDictUnificator.registerOre("paperMap", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperMap", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ItemResearchNotes")) {
if (tName.equals("item.ItemResearchNotes")) { GT_OreDictUnificator.registerOre("paperResearch", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("paperResearch", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ItemThaumonomicon")) {
if (tName.equals("item.ItemThaumonomicon")) { GT_OreDictUnificator.registerOre("bookThaumonomicon", new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre("bookThaumonomicon", new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("item.ligniteCoal")) {
if (tName.equals("item.ligniteCoal")) { GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Lignite, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Lignite, new ItemStack(tItem, 1, 0)); }
} if ((tName.equals("tile.extrabiomes.redrock")) || (tName.equals("tile.bop.redRocks"))) {
if ((tName.equals("tile.extrabiomes.redrock")) || (tName.equals("tile.bop.redRocks"))) { GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 1));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 2));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Redrock, new ItemStack(tItem, 1, 2)); }
} if (tName.equals("tile.rpstone")) {
if (tName.equals("tile.rpstone")) { GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 1));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 3));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 3)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 4));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 4)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 6));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 6)); }
} if (/**(tName.equals("tile.sedimentaryStone")) ||**/ ((tName.equals("tile.igneousStone")) || (tName.equals("tile.igneousStoneBrick")) || (tName.equals("tile.igneousCobblestone")))) {
if (/**(tName.equals("tile.sedimentaryStone")) ||**/ ((tName.equals("tile.igneousStone")) || (tName.equals("tile.igneousStoneBrick")) || (tName.equals("tile.igneousCobblestone")))) { GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 1));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 2));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 2)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 3));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 3)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 4));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 4)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 5)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 6));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 6)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 7));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 7));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 8));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteRed, new ItemStack(tItem, 1, 8)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 9));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.GraniteBlack, new ItemStack(tItem, 1, 9)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 10));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Rhyolite, new ItemStack(tItem, 1, 10)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 11));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Andesite, new ItemStack(tItem, 1, 11)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 12));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gabbro, new ItemStack(tItem, 1, 12)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 13));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(tItem, 1, 13)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 14));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Komatiite, new ItemStack(tItem, 1, 14)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 15));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Dacite, new ItemStack(tItem, 1, 15)); }
} if ((tName.equals("tile.metamorphicStone")) || (tName.equals("tile.metamorphicStoneBrick")) || (tName.equals("tile.metamorphicCobblestone"))) {
if ((tName.equals("tile.metamorphicStone")) || (tName.equals("tile.metamorphicStoneBrick")) || (tName.equals("tile.metamorphicCobblestone"))) { GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 1));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 2)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 3));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 3)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 4));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 4)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 5));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 5)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 6));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 6)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 7));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 7));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 8));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Gneiss, new ItemStack(tItem, 1, 8)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 9));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Eclogite, new ItemStack(tItem, 1, 9)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 10));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(tItem, 1, 10)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 11));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Quartzite, new ItemStack(tItem, 1, 11)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 12));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Blueschist, new ItemStack(tItem, 1, 12)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 13));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Greenschist, new ItemStack(tItem, 1, 13)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 14));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Soapstone, new ItemStack(tItem, 1, 14)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 15));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Migmatite, new ItemStack(tItem, 1, 15)); }
} if (tName.equals("tile.blockCosmeticSolid")) {
if (tName.equals("tile.blockCosmeticSolid")) { GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 0)); GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 1));
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Obsidian, new ItemStack(tItem, 1, 1)); GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.Thaumium, new ItemStack(tItem, 1, 4));
GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.Thaumium, new ItemStack(tItem, 1, 4)); }
} if (tName.equals("tile.enderchest")) {
if (tName.equals("tile.enderchest")) { GT_OreDictUnificator.registerOre(OreDictNames.enderChest, new ItemStack(tItem, 1, 32767));
GT_OreDictUnificator.registerOre(OreDictNames.enderChest, new ItemStack(tItem, 1, 32767)); }
} if (tName.equals("tile.autoWorkbenchBlock")) {
if (tName.equals("tile.autoWorkbenchBlock")) { GT_OreDictUnificator.registerOre(OreDictNames.craftingWorkBench, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OreDictNames.craftingWorkBench, new ItemStack(tItem, 1, 0)); }
} if (tName.equals("tile.pumpBlock")) {
if (tName.equals("tile.pumpBlock")) { GT_OreDictUnificator.registerOre(OreDictNames.craftingPump, new ItemStack(tItem, 1, 0));
GT_OreDictUnificator.registerOre(OreDictNames.craftingPump, new ItemStack(tItem, 1, 0)); if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "BCPump", false)) {
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "BCPump", false)) { GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 0));
GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, 0)); }
}
if (tName.equals("tile.tankBlock")) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingTank, new ItemStack(tItem, 1, 0));
}
if (tName.equals("item.drawplateDiamond")) {
GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolDrawplate, new ItemStack(tItem, 1, 32767));
} }
}
if (tName.equals("tile.tankBlock")) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingTank, new ItemStack(tItem, 1, 0));
}
if (tName.equals("item.drawplateDiamond")) {
GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolDrawplate, new ItemStack(tItem, 1, 32767));
} }
} }
} }
} } catch (Throwable e) {/**/}
} }
} }