From 7718e97e09f898054f0cdab6ee44983da78203c0 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 27 Sep 2016 02:00:19 +0200 Subject: Pollution bloodasp1 --- .../api/metatileentity/BaseMetaTileEntity.java | 71 ++++++++++------------ 1 file changed, 32 insertions(+), 39 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index de81b09cec..5cd09577fa 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -207,13 +207,11 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) { GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!"); } else { - if (aID != 0) { - if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null); - GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this); - mTickTimer = 0; - mID = aID; - return true; - } + if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null); + GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this); + mTickTimer = 0; + mID = aID; + return true; } return false; } @@ -251,8 +249,11 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE mRunningThroughTick = true; long tTime = System.currentTimeMillis(); + int tCode = 0; + boolean aSideServer = isServerSide(); + boolean aSideClient = isClientSide(); - try { for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) { + try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) { switch (tCode) { case 0: tCode++; @@ -260,13 +261,11 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE oX = xCoord; oY = yCoord; oZ = zCoord; - if (isServerSide()) for (byte i = 0; i < 6; i++) + if (aSideServer) 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; @@ -275,7 +274,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } case 1: tCode++; - if (isClientSide()) { + if (aSideClient) { if (mColor != oColor) { mMetaTileEntity.onColorChangeClient(oColor = mColor); issueTextureUpdate(); @@ -306,7 +305,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE case 5: case 6: case 7: - if (isServerSide() && mTickTimer > 10) { + if (aSideServer && mTickTimer > 10) { for (byte i = (byte) (tCode - 2); i < 6; i++) if (getCoverIDAtSide(i) != 0) { tCode++; @@ -324,7 +323,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } case 8: tCode = 9; - if (isServerSide()) { + if (aSideServer) { if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0; if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0; @@ -340,7 +339,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } case 10: tCode++; - if (isServerSide()) { + if (aSideServer) { if (mRedstone != oRedstone || mTickTimer == 10) { for (byte i = 0; i < 6; i++) mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]); @@ -413,10 +412,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE || (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) { - } + try{GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");}catch(Exception e){} doEnergyExplosion(); } else setOnFire(); } @@ -425,10 +421,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE 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) { - } + try{GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");}catch(Exception e){} doEnergyExplosion(); } } @@ -443,7 +436,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } case 11: tCode++; - if (isServerSide()) { + if (aSideServer) { 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()) { @@ -457,7 +450,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } case 12: tCode++; - if (isServerSide()) { + if (aSideServer) { 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) { @@ -485,7 +478,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } case 15: tCode++; - if (isServerSide()) { + if (aSideServer) { 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); @@ -522,14 +515,14 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } default: tCode = -1; - break; - }} + } + } } catch (Throwable e) { - //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 immediately to GregTech Intergalactical!!!"); + //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!!!"); e.printStackTrace(GT_Log.err); } - if (isServerSide() && hasValidMetaTileEntity()) { + if (aSideServer && hasValidMetaTileEntity()) { tTime = System.currentTimeMillis() - tTime; if (mTimeStatistics.length > 0) mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int) tTime; @@ -588,7 +581,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE mFacing = (byte) (aValue & 7); mActive = ((aValue & 8) != 0); mRedstone = ((aValue & 16) != 0); -// mLockUpgrade = ((aValue&32) != 0); + //mLockUpgrade = ((aValue&32) != 0); break; case 1: if (hasValidMetaTileEntity()) mMetaTileEntity.onValueUpdate((byte) aValue); @@ -598,12 +591,12 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE mColor = (byte) aValue; break; case 3: - mSidedRedstone[0] = (byte) ((aValue & 1) > 0 ? 15 : 0); - mSidedRedstone[1] = (byte) ((aValue & 2) > 0 ? 15 : 0); - mSidedRedstone[2] = (byte) ((aValue & 4) > 0 ? 15 : 0); - mSidedRedstone[3] = (byte) ((aValue & 8) > 0 ? 15 : 0); - mSidedRedstone[4] = (byte) ((aValue & 16) > 0 ? 15 : 0); - mSidedRedstone[5] = (byte) ((aValue & 32) > 0 ? 15 : 0); + mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0); + mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0); + mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0); + mSidedRedstone[3] = (byte) ((aValue & 8) == 8 ? 15 : 0); + mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0); + mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0); break; case 4: if (hasValidMetaTileEntity() && mTickTimer > 20) @@ -1076,8 +1069,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE public boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely) { if (!canAccessData()) return false; - if (aCheckPrecicely || privateAccess() || mOwnerName.equals("")) - if (mOwnerName.equals("") && isServerSide()) setOwnerName(aPlayer.getDisplayName()); + if (aCheckPrecicely || privateAccess() || (mOwnerName.length() == 0)) + if ((mOwnerName.length() == 0) && isServerSide()) setOwnerName(aPlayer.getDisplayName()); else if (privateAccess() && !aPlayer.getDisplayName().equals("Player") && !mOwnerName.equals("Player") && !mOwnerName.equals(aPlayer.getDisplayName())) return false; return true; -- cgit From adaadb6236ac0f850d9564cdffdf03ee57a8ea97 Mon Sep 17 00:00:00 2001 From: Technus Date: Thu, 8 Sep 2016 23:49:50 +0200 Subject: Scanner reformatting --- .../java/gregtech/api/metatileentity/BaseMetaPipeEntity.java | 9 +++++---- .../java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 2 +- src/main/java/gregtech/api/util/GT_Utility.java | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index 9fcf3bc21b..247530d822 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; @@ -383,18 +384,18 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE public ArrayList getDebugInfo(EntityPlayer aPlayer, int aLogLevel) { ArrayList tList = new ArrayList(); if (aLogLevel > 2) { - tList.add("Meta-ID: " + mID + (hasValidMetaTileEntity() ? " valid" : " invalid") + (mMetaTileEntity == null ? " MetaTileEntity == null!" : " ")); + tList.add("Meta-ID: " + EnumChatFormatting.BLUE+ mID +EnumChatFormatting.RESET + (canAccessData() ? EnumChatFormatting.GREEN+" valid"+EnumChatFormatting.RESET : EnumChatFormatting.RED+" invalid"+EnumChatFormatting.RESET) + (mMetaTileEntity == null ? EnumChatFormatting.RED+" MetaTileEntity == null!"+EnumChatFormatting.RESET : " ")); } if (aLogLevel > 1) { if (mTimeStatistics.length > 0) { double tAverageTime = 0; for (int tTime : mTimeStatistics) tAverageTime += tTime; - tList.add("This particular TileEntity has caused an average CPU-load of ~" + (tAverageTime / mTimeStatistics.length) + "ms over the last " + mTimeStatistics.length + " ticks."); + tList.add("Average CPU-load of ~" + (tAverageTime / mTimeStatistics.length) + "ms since " + mTimeStatistics.length + " ticks."); } if (mLagWarningCount > 0) { - tList.add("This TileEntity has also caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); + tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); } - tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : " not ") + "accessible for you"); + tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : EnumChatFormatting.RED+" not "+EnumChatFormatting.RESET) + "accessible for you"); } return mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList); } diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 5cd09577fa..23c72a2a03 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -632,7 +632,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE if (mLagWarningCount > 0) { tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server."); } - tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : " not ") + "accessible for you"); + tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : EnumChatFormatting.RED+" not "+EnumChatFormatting.RESET) + "accessible for you"); } if (aLogLevel > 0) { if (getSteamCapacity() > 0 && hasSteamEngineUpgrade()) diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index d32bb10e2e..14600f2c32 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1677,7 +1677,11 @@ public class GT_Utility { rEUAmount += 400; int tValue = 0; if (0 < (tValue = ((IMachineProgress) tTileEntity).getMaxProgress())) +<<<<<<< HEAD tList.add("Progress: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(((IMachineProgress) tTileEntity).getProgress()) +EnumChatFormatting.RESET+ " / " +EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(tValue) +EnumChatFormatting.RESET); +======= + tList.add("Progress: " +EnumChatFormatting.GREEN+GT_Utility.formatNumbers(((IMachineProgress) tTileEntity).getProgress()) +EnumChatFormatting.RESET+ " ticks / " +EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(tValue) +EnumChatFormatting.RESET+" ticks"); +>>>>>>> 00c69b5... Scanner done. } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); -- cgit From c15fd5b8556c81514dbd2b3b014ca57bee0e7ba5 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 13 Oct 2016 22:26:10 +0200 Subject: drop items from exploding gt machines + config --- src/main/java/gregtech/GT_Mod.java | 1 + .../api/metatileentity/BaseMetaTileEntity.java | 30 +++++++ src/main/java/gregtech/common/GT_Proxy.java | 95 +++++++++++----------- 3 files changed, 79 insertions(+), 47 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index b2fc618ad4..6168c34aed 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -241,6 +241,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", 750000).getInt(750000); gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", 1000000).getInt(1000000); gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", 2000000).getInt(2000000); + gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 23c72a2a03..fbfdb1a556 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -32,9 +32,11 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Random; import static gregtech.api.enums.GT_Values.NW; import static gregtech.api.enums.GT_Values.V; @@ -1090,6 +1092,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE @Override public void doExplosion(long aAmount) { + System.out.println("doExplosion"); if (canAccessData()) { // This is only for Electric Machines if (GregTech_API.sMachineWireFire && mMetaTileEntity.isElectric()) { @@ -1101,6 +1104,33 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE mReleaseEnergy = false; // Normal Explosion Code mMetaTileEntity.onExplosion(); + if(GT_Mod.gregtechproxy.mExplosionItemDrop){ + Random tRandom = new Random(); + for (int i = 0; i < this.getSizeInventory(); i++) { + ItemStack tItem = this.getStackInSlot(i); + System.out.println("getInventory: "+i); + if ((tItem != null) && (tItem.stackSize > 0) && (this.isValidSlot(i))) { + EntityItem tItemEntity = new EntityItem(this.worldObj, this.xCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.yCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.zCoord + tRandom.nextFloat() * 0.8F + 0.1F, new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + } + tItemEntity.motionX = (tRandom.nextGaussian() * 0.0500000007450581D); + tItemEntity.motionY = (tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D); + tItemEntity.motionZ = (tRandom.nextGaussian() * 0.0500000007450581D); + tItemEntity.hurtResistantTime = 999999; + tItemEntity.lifespan = 60000; + try { + Field tField = tItemEntity.getClass().getDeclaredField("health"); + tField.setAccessible(true); + tField.setInt(tItemEntity, 99999999); + } catch (Exception e) {e.printStackTrace();} + this.worldObj.spawnEntityInWorld(tItemEntity); + System.out.println("spawnItem: "+tItemEntity.getEntityItem().getDisplayName()); + tItem.stackSize = 0; + this.setInventorySlotContents(i, null); + } + } + } mMetaTileEntity.doExplosion(aAmount); } } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index a6a3c54414..42f00bc4db 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -158,6 +158,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mHideUnusedOres = true; public boolean mHideRecyclingRecipes = true; public boolean mPollution = true; + public boolean mExplosionItemDrop = false; public int mSkeletonsShootGTArrows = 16; public int mMaxEqualEntitiesAtOneSpot = 3; public int mFlintChance = 30; @@ -1596,99 +1597,99 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { NBTTagCompound tNBT = aFuel.getTagCompound(); if (tNBT != null) { short tValue = tNBT.getShort("GT.ItemFuelValue"); - rFuelValue = (short) Math.max(rFuelValue, tValue); + rFuelValue = Math.max(rFuelValue, tValue); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemSodium")) { - rFuelValue = (short) Math.max(rFuelValue, 4000); + rFuelValue = Math.max(rFuelValue, 4000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedSodium")) { - rFuelValue = (short) Math.max(rFuelValue, 4000); + rFuelValue = Math.max(rFuelValue, 4000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureSodium")) { - rFuelValue = (short) Math.max(rFuelValue, 4000); + rFuelValue = Math.max(rFuelValue, 4000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSodium")) { - rFuelValue = (short) Math.max(rFuelValue, 4000); + rFuelValue = Math.max(rFuelValue, 400); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallSodium")) { - rFuelValue = (short) Math.max(rFuelValue, 1000); + rFuelValue = Math.max(rFuelValue, 100); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinySodium")) { - rFuelValue = (short) Math.max(rFuelValue, 444); + rFuelValue = Math.max(rFuelValue, 44); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLithium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLithium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLithium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLithium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLithium")) { - rFuelValue = (short) Math.max(rFuelValue, 2000); + rFuelValue = Math.max(rFuelValue, 2000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLithium")) { - rFuelValue = (short) Math.max(rFuelValue, 888); + rFuelValue = Math.max(rFuelValue, 888); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCaesium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCaesium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCaesium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCaesium")) { - rFuelValue = (short) Math.max(rFuelValue, 6000); + rFuelValue = Math.max(rFuelValue, 6000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCaesium")) { - rFuelValue = (short) Math.max(rFuelValue, 2000); + rFuelValue = Math.max(rFuelValue, 2000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCaesium")) { - rFuelValue = (short) Math.max(rFuelValue, 888); + rFuelValue = Math.max(rFuelValue, 888); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 1200); + rFuelValue = Math.max(rFuelValue, 1200); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 1200); + rFuelValue = Math.max(rFuelValue, 1200); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 1200); + rFuelValue = Math.max(rFuelValue, 1200); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 1200); + rFuelValue = Math.max(rFuelValue, 1200); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 375); + rFuelValue = Math.max(rFuelValue, 375); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 166); + rFuelValue = Math.max(rFuelValue, 166); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCoal")) { - rFuelValue = (short) Math.max(rFuelValue, 400); + rFuelValue = Math.max(rFuelValue, 400); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) { - rFuelValue = (short) Math.max(rFuelValue, 177); + rFuelValue = Math.max(rFuelValue, 177); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 1600); + rFuelValue = Math.max(rFuelValue, 1600); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 400); + rFuelValue = Math.max(rFuelValue, 400); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 177); + rFuelValue = Math.max(rFuelValue, 177); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustWood")) { - rFuelValue = (short) Math.max(rFuelValue, 100); + rFuelValue = Math.max(rFuelValue, 100); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallWood")) { - rFuelValue = (short) Math.max(rFuelValue, 25); + rFuelValue = Math.max(rFuelValue, 25); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyWood")) { - rFuelValue = (short) Math.max(rFuelValue, 11); + rFuelValue = Math.max(rFuelValue, 11); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "plateWood")) { - rFuelValue = (short) Math.min(rFuelValue, 300); + rFuelValue = Math.min(rFuelValue, 300); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockLignite")) { - rFuelValue = (short) Math.max(rFuelValue, 12000); + rFuelValue = Math.max(rFuelValue, 12000); } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockCharcoal")) { - rFuelValue = (short) Math.max(rFuelValue, 16000); + rFuelValue = Math.max(rFuelValue, 16000); } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) { - rFuelValue = (short) Math.max(rFuelValue, 150); + rFuelValue = Math.max(rFuelValue, 150); } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) { - rFuelValue = (short) Math.max(rFuelValue, 100); + rFuelValue = Math.max(rFuelValue, 100); } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) { - rFuelValue = (short) Math.max(rFuelValue, 600); + rFuelValue = Math.max(rFuelValue, 600); } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) { - rFuelValue = (short) Math.max(rFuelValue, 600); + rFuelValue = Math.max(rFuelValue, 600); } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) { rFuelValue = Math.max(rFuelValue, 150000); } -- cgit