diff --git a/build.properties b/build.properties index 1960bb15..dd050e9a 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ minecraft.version=1.7.10 forge.version=10.13.4.1492-1.7.10 -gt.version=5.08.33.1 +gt.version=5.08.33.2 ae2.version=rv2-beta-33 applecore.version=1.7.10-1.2.1+107.59407 diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index b9dada47..8b778611 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -653,7 +653,7 @@ public enum ItemList implements IItemContainer { Teleporter, Cover_NeedsMaintainance, Casing_Turbine, - MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, LargeGasTurbine, LargeHPSteamTurbine, LargePlasmaTurbine, Cover_PlayerDetector, Machine_Multi_HeatExchanger; + MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, LargeGasTurbine, LargeHPSteamTurbine, LargePlasmaTurbine, Cover_PlayerDetector, Machine_Multi_HeatExchanger, Uraniumcell_1, Uraniumcell_2, Uraniumcell_4, Moxcell_1, Moxcell_2, Moxcell_4; public static final ItemList[] diff --git a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java index 66c92834..c1d8e428 100644 --- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java @@ -563,6 +563,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci if (tStats != null && (tStats[3] == -1 || tStats[3] == -3) && getRealCharge(aStack) > 0) return 1; tStats = getFluidContainerStats(aStack); if (tStats != null) return (int) (long) tStats[1]; + if(getDamage(aStack)==32763)return 1; return 64; } diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java index 9be65b15..ba1007f6 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -19,8 +19,11 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement public final float sEnergy; public final int sRadiation; public final float sHeat; + public final ItemStack sDepleted; + public final boolean sMox; - public GT_RadioactiveCellIC_Item(String aUnlocalized, String aEnglish, int aCellcount, int maxDamage, float aEnergy, int aRadiation, float aHeat) { + + public GT_RadioactiveCellIC_Item(String aUnlocalized, String aEnglish, int aCellcount, int maxDamage, float aEnergy, int aRadiation, float aHeat, ItemStack aDepleted, boolean aMox) { super(aUnlocalized, aEnglish, aCellcount); setMaxStackSize(64); this.maxDmg = maxDamage; @@ -28,6 +31,8 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement this.sEnergy = aEnergy; this.sRadiation = aRadiation; this.sHeat = aHeat; + this.sDepleted = aDepleted; + this.sMox = aMox; } @@ -54,7 +59,10 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement } else { pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun); - int heat = sumUp(pulses) * 4; + //int heat = sumUp(pulses) * 4; + + int heat = triangularNumber(pulses) * 4; + heat = getFinalHeat(reactor, yourStack, x, y, heat); ArrayList heatAcceptors = new ArrayList(); checkHeatAcceptor(reactor, x - 1, y, heatAcceptors); @@ -76,20 +84,32 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement } } if (getDamageOfStack(yourStack) >= getMaxDamageEx() - 1) { - switch (this.numberOfCells) { - case 1: - reactor.setItemAt(x, y, ItemList.Depleted_Thorium_1.get(1, new Object[0])); - break; - case 2: - reactor.setItemAt(x, y, ItemList.Depleted_Thorium_2.get(1, new Object[0])); - break; - case 4: - reactor.setItemAt(x, y, ItemList.Depleted_Thorium_4.get(1, new Object[0])); - } + // switch (this.numberOfCells) { + // case 1: + //reactor.setItemAt(x, y, ItemList.Depleted_Thorium_1.get(1, new Object[0])); + // break; + // case 2: + //reactor.setItemAt(x, y, ItemList.Depleted_Thorium_2.get(1, new Object[0])); + // break; + // case 4: + // reactor.setItemAt(x, y, ItemList.Depleted_Thorium_4.get(1, new Object[0])); + //} + reactor.setItemAt(x, y, sDepleted.copy()); } else if (heatrun) { damageItemStack(yourStack, 1); } } + protected int getFinalHeat(IReactor reactor, ItemStack stack, int x, int y, int heat) + { + if (sMox&&reactor.isFluidCooled()) + { + float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat(); + if (breedereffectiveness > 0.5D) { + heat *= 2; + } + } + return heat; + } private void checkHeatAcceptor(IReactor reactor, int x, int y, ArrayList heatAcceptors) { ItemStack thing = reactor.getItemAt(x, y); @@ -101,7 +121,12 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) { if (!heatrun) { - reactor.addOutput((float) (1.0F * this.sEnergy)); + if(sMox){ + float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat(); + float ReaktorOutput = 1.5F * breedereffectiveness + 1.0F; + reactor.addOutput(ReaktorOutput * this.sEnergy); + }else{ + reactor.addOutput((float) (1.0F * this.sEnergy));} } return true; } diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java index 7ceaf43f..9ef52663 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCell_Item.java @@ -37,6 +37,10 @@ public class GT_RadioactiveCell_Item return b; } + protected static int triangularNumber(int x) + { + return (x * x + x) / 2; + } protected boolean outputPulseForStack(ItemStack aStack) { NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index 40c45c5c..637d4a04 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -255,15 +255,18 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier if (!GT_Utility.isStackValid(aStack)) { return false; } - if (GT_ModHandler.isElectricItem(aStack, this.mTier)) { + if (mInventory[aIndex]==null && GT_ModHandler.isElectricItem(aStack, this.mTier)) { return true; } return false; } public long[] getStoredEnergy() { + boolean scaleOverflow =false; + boolean storedOverflow = false; long tScale = getBaseMetaTileEntity().getEUCapacity(); long tStored = getBaseMetaTileEntity().getStoredEU(); + long tStep = 0; if (mInventory != null) { for (ItemStack aStack : mInventory) { if (GT_ModHandler.isElectricItem(aStack)) { @@ -271,8 +274,11 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier if (aStack.getItem() instanceof GT_MetaBase_Item) { Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack); if (stats != null) { + if(stats[0]>Long.MAX_VALUE/2){scaleOverflow=true;} tScale = tScale + stats[0]; - tStored = tStored + ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack); + tStep = ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack); + if(tStep > Long.MAX_VALUE/2){storedOverflow=true;} + tStored = tStored + tStep; } } else if (aStack.getItem() instanceof IElectricItem) { tStored = tStored + (long) ic2.api.item.ElectricItem.manager.getCharge(aStack); @@ -282,6 +288,8 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier } } + if(scaleOverflow){tScale=Long.MAX_VALUE;} + if(storedOverflow){tStored=Long.MAX_VALUE;} return new long[]{tStored, tScale}; } diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 06615a68..2fd4b477 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -21,6 +21,7 @@ import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.RecipeOutput; +import ic2.api.recipe.ICannerBottleRecipeManager; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -801,6 +802,25 @@ public class GT_Utility { return copyMetaData(Items.feather.getDamage(aStack) + 1, aStack); return null; } + public static synchronized boolean removeIC2BottleRecipe(ItemStack aContainer, ItemStack aInput, Map aRecipeList, ItemStack aOutput){ + if ((isStackInvalid(aInput) && isStackInvalid(aOutput) && isStackInvalid(aContainer)) || aRecipeList == null) return false; + boolean rReturn = false; + Iterator> tIterator = aRecipeList.entrySet().iterator(); + aOutput = GT_OreDictUnificator.get(aOutput); + while (tIterator.hasNext()) { + Map.Entry tEntry = tIterator.next(); + if (aInput == null || tEntry.getKey().matches(aContainer, aInput)) { + List tList = tEntry.getValue().items; + if (tList != null) for (ItemStack tOutput : tList) + if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) { + tIterator.remove(); + rReturn = true; + break; + } + } + } + return rReturn; + } public static synchronized boolean removeSimpleIC2MachineRecipe(ItemStack aInput, Map aRecipeList, ItemStack aOutput) { if ((isStackInvalid(aInput) && isStackInvalid(aOutput)) || aRecipeList == null) return false; diff --git a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java index add80f07..9d23d095 100644 --- a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java +++ b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { public GT_DepletetCell_Item(String aUnlocalized, String aEnglish, int aRadiation) { - super(aUnlocalized, aEnglish, 1, 1, 0, aRadiation, 0); + super(aUnlocalized, aEnglish, 1, 1, 0, aRadiation, 0, null, false); } public void processChamber(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, boolean paramBoolean) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index ee472317..0410c927 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -1,6 +1,7 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -26,9 +27,13 @@ import net.minecraft.entity.projectile.EntityFireball; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; - +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidStack; import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @@ -151,6 +156,12 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { return new GT_MetaTileEntity_Teleporter(this.mName, this.mTier, this.mDescription, this.mTextures); } + @Override + public boolean isGivingInformation() { + return true; + } + + public String[] getInfoData() { return new String[]{"Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD}; } @@ -161,6 +172,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } public void saveNBTData(NBTTagCompound aNBT) { + if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); aNBT.setInteger("mTargetX", this.mTargetX); aNBT.setInteger("mTargetY", this.mTargetY); aNBT.setInteger("mTargetZ", this.mTargetZ); @@ -169,6 +181,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } public void loadNBTData(NBTTagCompound aNBT) { + mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); this.mTargetX = aNBT.getInteger("mTargetX"); this.mTargetY = aNBT.getInteger("mTargetY"); this.mTargetZ = aNBT.getInteger("mTargetZ"); @@ -206,7 +219,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { } public boolean hasDimensionalTeleportCapability() { - return (this.mDebug) || (this.hasEgg); + return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000); } public boolean isDimensionalTeleportAvailable() { @@ -215,18 +228,52 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (mFluid == null) { + mFluid = Materials.Nitrogen.getPlasma(0); + } super.onPostTick(aBaseMetaTileEntity, aTick); if (getBaseMetaTileEntity().isServerSide()) { if (getBaseMetaTileEntity().getTimer() % 100L == 50L) { this.hasEgg = checkForEgg(); } if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) { - if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(8192, false)) { + if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048, false)) { + if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) { + mFluid.amount--; + if (mFluid.amount < 1) { + mFluid = null; + } + } int tDistance = distanceCalculation(); + if (mInventory[0] != null) { + TileEntity tTile = null; + if (this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) { + tTile = getBaseMetaTileEntity().getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ); + } else { + World tWorld = DimensionManager.getWorld(this.mTargetD); + if (tWorld != null) { + tTile = tWorld.getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ); + } + } + if (tTile != null && tTile instanceof IInventory) { + int tStacksize = mInventory[0].stackSize; + GT_Utility.moveOneItemStack(this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (tDistance * tDistance * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize))), false); + } + } + + } for (Object tObject : getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2))) { if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) { Entity tEntity = (Entity) tObject; if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (tDistance * tDistance * weightCalculation(tEntity)), false)) { + if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) { + mFluid.amount = mFluid.amount - ((int) Math.min(1000, (tDistance * tDistance * weightCalculation(tEntity) / 8192))); + if (mFluid.amount < 1) { + mFluid = null; + } + } if (tEntity.ridingEntity != null) { tEntity.mountEntity(null); } @@ -335,6 +382,21 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { return true; } + @Override + public int getInputSlot() { + return 0; + } + + @Override + public int getOutputSlot() { + return 0; + } + + @Override + public int getCapacity() { + return 64000; + } + @Override public boolean doesFillContainers() { return false; @@ -352,7 +414,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public boolean canTankBeEmptied() { - return false; + return true; } @Override @@ -369,5 +431,4 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public ITexture[][][] getTextureSet(ITexture[] aTextures) { return null; } - -} +} \ No newline at end of file diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 2c4991b9..4328daa3 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -48,8 +48,24 @@ public class GT_Achievements { for (int i = 0; i < oreList.size(); i++) { if (GT_Values.D1 && this.achievementList.get(oreList.get(i).name()) == null) { GT_Log.out.println("achievement." + oreList.get(i).name() + "=Find " + oreList.get(i).name() + " Ore"); - GT_Log.out.println("achievement." + oreList.get(i).name() + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + (oreStats.get(i)[3] == 1 ? "Overworld" : "") + "/" + (oreStats.get(i)[4] == 1 ? "Nether" : "") + "/" + (oreStats.get(i)[5] == 1 ? "End" : "")); - } + StringBuilder dimensions = new StringBuilder(); + boolean isFirst = true; + if(oreStats.get(i)[3] == 1) { + dimensions.append("Overworld"); + isFirst = false; + } + if(oreStats.get(i)[4] == 1) { + if(!isFirst) dimensions.append("/"); + dimensions.append("Nether"); + isFirst = false; + } + if(oreStats.get(i)[5] == 1) { + if(!isFirst) dimensions.append("/"); + dimensions.append("End"); + isFirst = false; + } + GT_Log.out.println("achievement." + oreList.get(i).name() + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString()); + } registerOreAchievement(oreList.get(i)); } registerAchievement("flintpick", 0, 0, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(2, 1, Materials.Flint, Materials.Wood, null), "", false); diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index cf3b9c46..285df382 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -4,6 +4,7 @@ import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; +import gregtech.api.items.GT_RadioactiveCellIC_Item; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; @@ -582,9 +583,25 @@ public class GT_CraftingRecipeLoader } else { GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("glassFiberCableItem", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"GGG", "EDE", "GGG", Character.valueOf('G'), new ItemStack(Blocks.glass, 1, 32767), Character.valueOf('D'), OrePrefixes.dust.get(Materials.Silver), Character.valueOf('E'), ItemList.IC2_Energium_Dust.get(1L, new Object[0])}); } + if (Loader.isModLoaded("NotEnoughItems")) { + codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorUraniumSimple", 1L,1)); + codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorUraniumDual", 1L,1)); + codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorUraniumQuad", 1L,1)); + codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXSimple", 1L,1)); + codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXDual", 1L,1)); + codechicken.nei.api.API.hideItem(GT_ModHandler.getIC2Item("reactorMOXQuad", 1L,1)); + } + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("UranFuel", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.nugget.get(Materials.Uranium235)}); + GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("MOXFuel", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"UUU", "NNN", "UUU", 'U', OrePrefixes.ingot.get(Materials.Uranium), 'N', OrePrefixes.ingot.get(Materials.Plutonium)}); - GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Energium_Dust.get(1L, new Object[0])); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.gregtechrecipes, "energycrystalruby", true)) { + + GT_ModHandler.addCraftingRecipe(ItemList.Uraniumcell_2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.Uraniumcell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); + GT_ModHandler.addCraftingRecipe(ItemList.Uraniumcell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.Uraniumcell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Moxcell_2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.Moxcell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); + GT_ModHandler.addCraftingRecipe(ItemList.Moxcell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.Moxcell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); + + GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Energium_Dust.get(1L, new Object[0])); + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.gregtechrecipes, "energycrystalruby", true)) { GT_ModHandler.addCraftingRecipe(ItemList.IC2_Energium_Dust.get(9L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RDR", "DRD", "RDR", Character.valueOf('R'), OrePrefixes.dust.get(Materials.Redstone), Character.valueOf('D'), OrePrefixes.dust.get(Materials.Ruby)}); } else { GT_ModHandler.addCraftingRecipe(ItemList.IC2_Energium_Dust.get(9L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RDR", "DRD", "RDR", Character.valueOf('R'), OrePrefixes.dust.get(Materials.Redstone), Character.valueOf('D'), OrePrefixes.dust.get(Materials.Diamond)}); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 60433a13..aaf372b2 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -37,6 +37,8 @@ public class GT_MachineRecipeLoader GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Items.gunpowder), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.wool, 1, 32767), ic2.api.recipe.Recipes.extractor.getRecipes(), GT_Values.NI); } catch (Throwable e) { + GT_Utility.removeIC2BottleRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ic2.api.recipe.Recipes.cannerBottle.getRecipes(), GT_ModHandler.getIC2Item("reactorUraniumSimple", 1, 1)); + GT_Utility.removeIC2BottleRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MoxFuel", 1), ic2.api.recipe.Recipes.cannerBottle.getRecipes(), GT_ModHandler.getIC2Item("reactorMOXSimple", 1, 1)); } GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.wheat_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(5L), 10000, 32, 2); GT_Values.RA.addFluidExtractionRecipe(new ItemStack(Items.melon_seeds, 1, 32767), GT_Values.NI, Materials.SeedOil.getFluid(3L), 10000, 32, 2); @@ -767,8 +769,8 @@ public class GT_MachineRecipeLoader GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), GT_ModHandler.getIC2Item("reactorLithiumCell", 1, 1), null, 16, 64); GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getIC2Item("TritiumCell", 1), GT_ModHandler.getIC2Item("fuelRod", 1), Materials.Tritium.getGas(32), 10000, 16, 64); GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 3), ItemList.ThoriumCell_1.get(1L, new Object[0]), null, 30, 16); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), GT_ModHandler.getIC2Item("reactorUraniumSimple", 1, 1), null, 30, 16); - GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), GT_ModHandler.getIC2Item("reactorMOXSimple", 1, 1), null, 30, 16); + GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("UranFuel", 1), ItemList.Uraniumcell_1.get(1, new Object[0]), null, 30, 16); + GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_ModHandler.getIC2Item("MOXFuel", 1), ItemList.Moxcell_1.get(1, new Object[0]), null, 30, 16); GT_Values.RA.addFusionReactorRecipe(Materials.Lithium.getMolten(16), Materials.Tungsten.getMolten(16), Materials.Iridium.getMolten(16), 32, 32768, 300000000); GT_Values.RA.addFusionReactorRecipe(Materials.Deuterium.getGas(125), Materials.Tritium.getGas(125), Materials.Helium.getPlasma(125), 16, 4096, 40000000); //Mark 1 Cheap // diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 1b6b9610..8b302b4d 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -106,21 +106,28 @@ public class GT_Loader_Item_Block_And_Fluid ItemList.Reactor_Coolant_NaK_6.set(GregTech_API.constructCoolantCellItem("360k_NaK_Coolantcell", "360k NaK Coolantcell", 360000)); GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_6.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"PCP", "PDP", "PCP", 'C', ItemList.Reactor_Coolant_NaK_3, 'P', OrePrefixes.plate.get(Materials.Tin), 'D', OrePrefixes.plateDense.get(Materials.Copper)}); - ItemList.ThoriumCell_1.set(new GT_RadioactiveCellIC_Item("Thoriumcell", "Fuel Rod (Thorium)", 1, 50000, 0.2F, 0, 0.25F)); - - ItemList.ThoriumCell_2.set(new GT_RadioactiveCellIC_Item("Double_Thoriumcell", "Double Fuel Rod (Thorium)", 2, 50000, 0.2F, 0, 0.25F)); - GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.ThoriumCell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); - - ItemList.ThoriumCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Thoriumcell", "Quad Fuel Rod (Thorium)", 4, 50000, 0.2F, 0, 0.25F)); - GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.ThoriumCell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); - ItemList.Depleted_Thorium_1.set(new GT_DepletetCell_Item("ThoriumcellDep", "Fuel Rod (Depleted Thorium)", 1)); ItemList.Depleted_Thorium_2.set(new GT_DepletetCell_Item("Double_ThoriumcellDep", "Dual Fuel Rod (Depleted Thorium)", 2)); ItemList.Depleted_Thorium_4.set(new GT_DepletetCell_Item("Quad_ThoriumcellDep", "Quad Fuel Rod (Depleted Thorium)", 4)); - GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L)}); - GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L)}); - GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 4L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 8L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L)}); + ItemList.ThoriumCell_1.set(new GT_RadioactiveCellIC_Item("Thoriumcell", "Fuel Rod (Thorium)", 1, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_1.get(1, new Object[0]),false)); + + ItemList.ThoriumCell_2.set(new GT_RadioactiveCellIC_Item("Double_Thoriumcell", "Double Fuel Rod (Thorium)", 2, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_2.get(1, new Object[0]), false)); + GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", " ", " ", 'R', ItemList.ThoriumCell_1, 'P', OrePrefixes.plate.get(Materials.Iron)}); + + ItemList.ThoriumCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Thoriumcell", "Quad Fuel Rod (Thorium)", 4, 50000, 0.4F, 0, 0.25F, ItemList.Depleted_Thorium_4.get(1, new Object[0]),false)); + GT_ModHandler.addCraftingRecipe(ItemList.ThoriumCell_4.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"RPR", "CPC", "RPR", 'R', ItemList.ThoriumCell_1, 'P', OrePrefixes.plate.get(Materials.Iron), 'C', OrePrefixes.plate.get(Materials.Copper)}); + + ItemList.Uraniumcell_1.set(new GT_RadioactiveCellIC_Item("reactorUraniumSimple", "Fuel Rod (Uranium)", 1, 20000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedUraniumSimple", 1), false)); + ItemList.Uraniumcell_2.set(new GT_RadioactiveCellIC_Item("reactorUraniumDual", "Dual Fuel Rod (Uranium)" , 2, 20000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedUraniumDual", 1),false)); + ItemList.Uraniumcell_4.set(new GT_RadioactiveCellIC_Item("reactorUraniumQuad", "Quad Fuel Rod (Uranium)", 4, 20000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedUraniumQuad", 1), false)); + ItemList.Moxcell_1.set(new GT_RadioactiveCellIC_Item("reactorMOXSimple", "Fuel Rod (Mox)", 1, 10000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedMoxSimple", 1), true)); + ItemList.Moxcell_2.set(new GT_RadioactiveCellIC_Item("reactorMOXDual", "Dual Fuel Rod (Mox)", 2, 10000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedMoxDual", 1), true)); + ItemList.Moxcell_4.set(new GT_RadioactiveCellIC_Item("reactorMOXQuad", "Quad Fuel Rod (Mox)" , 4, 10000, 2F, 1, 1F, GT_ModHandler.getIC2Item("reactorDepletedMoxQuad" , 1),true)); + + GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_1.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1L)}); + GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_2.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 3L)}); + GT_ModHandler.addThermalCentrifugeRecipe(ItemList.Depleted_Thorium_4.get(1, new Object[0]), 5000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lutetium, 2L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 6L)}); GT_Log.out.println("GT_Mod: Adding Blocks."); diff --git a/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXDual.png b/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXDual.png new file mode 100644 index 00000000..d4e9db23 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXDual.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXQuad.png b/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXQuad.png new file mode 100644 index 00000000..c2033c67 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXQuad.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXSimple.png b/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXSimple.png new file mode 100644 index 00000000..8b1d1bc6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.reactorMOXSimple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumDual.png b/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumDual.png new file mode 100644 index 00000000..80fe3da0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumDual.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumQuad.png b/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumQuad.png new file mode 100644 index 00000000..1a58dad3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumQuad.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumSimple.png b/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumSimple.png new file mode 100644 index 00000000..b2a9614b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.reactorUraniumSimple.png differ