From 0cb924d25dd80c22d000898fb27ab3ed0e0f80fb Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 14 Mar 2019 18:16:17 +0000 Subject: + Added Bombs. % Made RAW collectors produce 10x less. $ Fixed tooltips on RAW collectors. $ Fixed a bug regarding STARTUP_PHASE. --- src/Java/gtPlusPlus/GTplusplus.java | 2 +- .../core/entity/InternalEntityRegistry.java | 3 + .../entity/projectile/EntityThrowableBomb.java | 115 +++++++++++++++++++ .../handler/events/GeneralTooltipEventHandler.java | 11 +- src/Java/gtPlusPlus/core/item/ModItems.java | 16 +++ .../core/item/base/itemblock/ItemBlockMeta.java | 2 +- .../core/item/general/ItemControlCore.java | 22 ++-- .../item/general/throwables/ItemThrowableBomb.java | 123 +++++++++++++++++++++ .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 70 ++++++++++++ .../machines/TileEntityAdvPooCollector.java | 3 +- .../machines/TileEntityBaseFluidCollector.java | 2 - .../machines/TileEntityPooCollector.java | 4 +- .../xmod/gregtech/api/enums/GregtechItemList.java | 7 +- .../common/items/MetaGeneratedGregtechItems.java | 14 +++ .../textures/items/MU-metaitem.01/111.png | Bin 0 -> 345 bytes .../textures/items/MU-metaitem.01/112.png | Bin 0 -> 341 bytes .../textures/items/MU-metaitem.01/113.png | Bin 0 -> 337 bytes .../textures/items/MU-metaitem.01/114.png | Bin 0 -> 396 bytes .../textures/items/MU-metaitem.01/115.png | Bin 0 -> 428 bytes 19 files changed, 370 insertions(+), 24 deletions(-) create mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java create mode 100644 src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java create mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png create mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png create mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png create mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png create mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 5c3d5fb801..e10369abe3 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -230,6 +230,7 @@ public class GTplusplus implements ActionListener { if (LoadedMods.Thaumcraft) { event.registerServerCommand(new CommandDumpAspects()); } + INIT_PHASE.STARTED.setPhaseActive(true); } @Mod.EventHandler @@ -257,7 +258,6 @@ public class GTplusplus implements ActionListener { */ @Mod.EventHandler public void onLoadComplete(FMLLoadCompleteEvent event) { - INIT_PHASE.STARTED.setPhaseActive(true); proxy.onLoadComplete(event); generateGregtechRecipeMaps(); } diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java index 36f5b86184..e5c779adcf 100644 --- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java +++ b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java @@ -14,6 +14,7 @@ import gtPlusPlus.core.entity.monster.EntitySickBlaze; import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion; import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; +import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; import gtPlusPlus.core.util.Utils; @@ -51,6 +52,8 @@ public class InternalEntityRegistry { //EntityRegistry.registerGlobalEntityID(EntityTeslaTowerLightning.class, "plasmaBolt", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(125, 125, 125)); EntityRegistry.registerModEntity(EntityTeslaTowerLightning.class, "plasmaBolt", mEntityID++, GTplusplus.instance, 64, 5, true); + EntityRegistry.registerModEntity(EntityThrowableBomb.class, "EntityThrowableBomb", mEntityID++, GTplusplus.instance, 64, 10, true); + /** * Globals, which generate spawn eggs. (Currently required for Giant chicken spawning) */ diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java new file mode 100644 index 0000000000..9e72daf687 --- /dev/null +++ b/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java @@ -0,0 +1,115 @@ +package gtPlusPlus.core.entity.projectile; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.init.Blocks; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; + +public class EntityThrowableBomb extends EntityThrowable { + + public EntityThrowableBomb(World world) { + super(world); + } + + public EntityThrowableBomb(World world, EntityLivingBase entity) { + super(world, entity); + } + + public EntityThrowableBomb(World world, double posX, double posY, double posZ) { + super(world, posX, posY, posZ); + } + + /** + * Called when this EntityThrowable hits a block or entity. + */ + @Override + protected void onImpact(MovingObjectPosition object) { + int xBlock = object.blockX; + int yBlock = object.blockY; + int zBlock = object.blockZ; + if (object.entityHit != null) { + byte b0 = 6; + if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ + object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); + EntityUtils.setEntityOnFire(object.entityHit, 10); + object.entityHit.fireResistance = 0; + ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit)); + } + } + if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){ + ravage(new BlockPos(xBlock, yBlock, zBlock)); + } + + String mParticleType = "reddust"; + int e=0; + for (int i = 0; i < 24; ++i) { + if ((e = MathUtils.randInt(0, 5)) <= 1){ + if (e==0) + mParticleType = "largesmoke"; + if (e==1) + mParticleType = "flame"; + } + this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + + if (!this.worldObj.isRemote) { + this.setDead(); + } + } + + private boolean ravage(BlockPos blockpos){ + + int radius = 1; + + for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){ + for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){ + for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){ + + int mChance = MathUtils.randInt(1, 10); + if (mChance <= 3){ + Block mBlockhit = worldObj.getBlock(i, j, h); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + + //GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), mPol); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.01f, true); + if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){ + worldObj.setBlock(i, j+1, h, Blocks.fire); + worldObj.setBlock(i, j, h, Blocks.dirt); + } + else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){ + worldObj.setBlock(i, j, h, Blocks.fire); + } + else if (mBlockhit == Blocks.tallgrass){ + worldObj.setBlock(i, j, h, Blocks.fire); + if (worldObj.getBlock(i, j-1, h) == Blocks.grass){ + worldObj.setBlock(i, j-1, h, Blocks.dirt); + } + } + else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){ + worldObj.setBlock(i, j+1, h, Blocks.fire); + worldObj.setBlock(i, j, h, Blocks.dirt); + } + else if (mBlockhit == Blocks.air){ + worldObj.setBlock(i, j, h, Blocks.fire); + } + } + } + } + } + + + return true; + } + + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java index 3acc3b6bcf..ef91647c1a 100644 --- a/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java @@ -8,8 +8,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_Utility; import gtPlusPlus.GTplusplus; import gtPlusPlus.GTplusplus.INIT_PHASE; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.handler.events.BlockEventHandler; import gtPlusPlus.core.lib.CORE; @@ -27,13 +29,12 @@ public class GeneralTooltipEventHandler { public void onItemTooltip(ItemTooltipEvent event){ - if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED) { + if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED && GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.SERVER_START) { return; } if (event.itemStack == null) { return; } - if (CORE.ConfigSwitches.chanceToDropFluoriteOre > 0) { if (BlockEventHandler.blockLimestone != null && !BlockEventHandler.blockLimestone.isEmpty()) { for (ItemStack h : BlockEventHandler.blockLimestone) { @@ -55,13 +56,14 @@ public class GeneralTooltipEventHandler { } } - //Material Collector Tooltips - if (event.itemStack.getItem() == Item.getItemFromBlock(ModBlocks.blockPooCollector)) { + //Material Collector Tooltips + if (ModBlocks.blockPooCollector != null && Block.getBlockFromItem(event.itemStack.getItem()) == ModBlocks.blockPooCollector) { //Normal if (event.itemStack.getItemDamage() == 0) { event.toolTip.add("Used to collect animal waste"); event.toolTip.add("Collects in a 5x4x5 area starting at Y+1"); event.toolTip.add("Use Hoppers/Pipes to empty"); + event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"8000L"); } //Advanced else { @@ -69,6 +71,7 @@ public class GeneralTooltipEventHandler { event.toolTip.add("Significantly faster than the simple version"); event.toolTip.add("Collects in a 5x4x5 area starting at Y+1"); event.toolTip.add("Use Hoppers/Pipes to empty"); + event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"128000L"); } } diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index ed1df1f333..bb2ab8ae47 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -61,6 +61,7 @@ import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoil; import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoilWire; import gtPlusPlus.core.item.general.throwables.ItemHydrofluoricAcidPotion; import gtPlusPlus.core.item.general.throwables.ItemSulfuricAcidPotion; +import gtPlusPlus.core.item.general.throwables.ItemThrowableBomb; import gtPlusPlus.core.item.init.ItemsFoods; import gtPlusPlus.core.item.materials.DustDecayable; import gtPlusPlus.core.item.tool.misc.DebugScanner; @@ -338,6 +339,11 @@ public final class ModItems { public static ItemDummyResearch itemDummyResearch; + public static CoreItem itemBombCasing; + public static CoreItem itemBombUnf; + public static CoreItem itemDetCable; + public static ItemThrowableBomb itemBomb; + static { Logger.INFO("Items!"); //Default item used when recipes fail, handy for debugging. Let's make sure they exist when this class is called upon. @@ -889,6 +895,16 @@ public final class ModItems { //Farm Animal Fun new AgriculturalChem(); + + //Bombs + itemBombCasing = new CoreItem("itemBombCasing", "Bomb Casing", tabMisc); + itemBombCasing.setTextureName(CORE.MODID + ":bomb_casing"); + itemBombUnf = new CoreItem("itemBombUnf", "Bomb (unf)", tabMisc); + itemBombUnf.setTextureName(CORE.MODID + ":bomb_casing"); + itemDetCable = new CoreItem("itemDetCable", "Det. Cable", tabMisc); + itemDetCable.setTextureName("string"); + itemBomb = new ItemThrowableBomb(); + //Only used for debugging. /*if (CORE.DEVENV) { new ConnectedBlockFinder(); diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java index c271ab39d0..b26ac67225 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java @@ -22,7 +22,7 @@ public class ItemBlockMeta extends ItemBlockWithMetadata { super(aBlock, aBlock); this.mBlock = aBlock; - this.setMaxDamage(15); + this.setMaxDamage(0); this.setHasSubtypes(true); if (aBlock instanceof ITileTooltip) { ITileTooltip aTooltip = (ITileTooltip) aBlock; diff --git a/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java b/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java index eb22f8fa07..5ef72b6f17 100644 --- a/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java +++ b/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java @@ -17,7 +17,7 @@ import gtPlusPlus.core.lib.CORE; public class ItemControlCore extends Item { - public IIcon[] icons = new IIcon[10]; + public static IIcon[] icons = new IIcon[10]; public ItemControlCore() { super(); @@ -31,16 +31,16 @@ public class ItemControlCore extends Item { @Override public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_0"); - this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_1"); - this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_2"); - this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_3"); - this.icons[4] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_4"); - this.icons[5] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_5"); - this.icons[6] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_6"); - this.icons[7] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_7"); - this.icons[8] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_8"); - this.icons[9] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_9"); + icons[0] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_0"); + icons[1] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_1"); + icons[2] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_2"); + icons[3] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_3"); + icons[4] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_4"); + icons[5] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_5"); + icons[6] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_6"); + icons[7] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_7"); + icons[8] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_8"); + icons[9] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_9"); } @Override diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java new file mode 100644 index 0000000000..9467c3a58c --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java @@ -0,0 +1,123 @@ +package gtPlusPlus.core.item.general.throwables; + +import java.util.List; + +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemThrowableBomb extends CoreItem { + + private static AutoMap mLighters = new AutoMap(); + public static IIcon[] icons = new IIcon[10]; + + public ItemThrowableBomb() { + super("gtpp.throwable.bomb", "Bomb", AddToCreativeTab.tabMisc, 16, 0, new String[] {"Just like Bomberman", "Have a fire source in inventory to prime"}, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); + this.setHasSubtypes(true); + } + + @Override + public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { + + if (mLighters.isEmpty()) { + mLighters.put(ItemUtils.getSimpleStack(Items.flint_and_steel)); + mLighters.put(ItemList.Tool_Lighter_Invar_Full.get(1)); + mLighters.put(ItemList.Tool_Lighter_Invar_Used.get(1)); + mLighters.put(ItemList.Tool_Lighter_Platinum_Full.get(1)); + mLighters.put(ItemList.Tool_Lighter_Platinum_Used.get(1)); + mLighters.put(ItemUtils.getSimpleStack(ModItems.itemBasicFireMaker)); + } + + //Unlit + if (item.getItemDamage() == 0) { + boolean hasLighter = false; + for (ItemStack aPlaySlot : player.inventory.mainInventory) { + if (aPlaySlot != null) { + for (ItemStack aLighter : mLighters) { + if (GT_Utility.areStacksEqual(aPlaySlot, aLighter)) { + hasLighter = true; + break; + } + } + } + } + if (hasLighter) { + item.setItemDamage(1); + } + } + //Lit + else if (item.getItemDamage() == 1) { + if (!player.capabilities.isCreativeMode) { + --item.stackSize; + } + world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityThrowableBomb(world, player)); + } + /*if (item.stackSize <= 0) { + item = null; + }*/ + } + return item; + } + + + + @Override + public void registerIcons(IIconRegister reg) { + icons[0] = reg.registerIcon(CORE.MODID + ":" + "bomb"); + icons[1] = reg.registerIcon(CORE.MODID + ":" + "bomb_lit"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + + @SuppressWarnings({ "unchecked" }) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 2; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { + String aLitStatus = "unlit"; + if (stack.getItemDamage() == 0) { + aLitStatus = EnumChatFormatting.BLUE+"Unlit"; + } + else if (stack.getItemDamage() == 1) { + aLitStatus = EnumChatFormatting.RED+"Lit"; + } + list.add(EnumChatFormatting.GOLD+"Fuse Status: "+aLitStatus); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public String getItemStackDisplayName(ItemStack p_77653_1_) { + // TODO Auto-generated method stub + return super.getItemStackDisplayName(p_77653_1_); + } + + + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 1b24fb6e87..a22d8523ff 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -18,6 +18,7 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.item.chemistry.IonParticles; +import gtPlusPlus.core.item.chemistry.RocketFuels; import gtPlusPlus.core.item.crafting.ItemDummyResearch; import gtPlusPlus.core.item.crafting.ItemDummyResearch.ASSEMBLY_LINE_RESEARCH; import gtPlusPlus.core.lib.CORE; @@ -85,10 +86,34 @@ public class RECIPES_GREGTECH { breweryRecipes(); laserEngraverRecipes(); assemblyLineRecipes(); + latheRecipes(); + vacuumFreezerRecipes(); addFuels(); } + private static void vacuumFreezerRecipes() { + GT_Values.RA.addVacuumFreezerRecipe(GregtechItemList.Bomb_Cast_Molten.get(1), GregtechItemList.Bomb_Cast_Set.get(1), 20 * 30); + } + + private static void latheRecipes() { + + GT_Values.RA.addLatheRecipe( + ALLOY.EGLIN_STEEL.getBlock(1), + GregtechItemList.Bomb_Cast_Mold.get(1), + null, + 20 * 60 * 15, + 120); + + GT_Values.RA.addLatheRecipe( + GregtechItemList.Bomb_Cast_Set.get(1), + GregtechItemList.Bomb_Cast_Broken.get(2), + ItemUtils.getSimpleStack(ModItems.itemBombCasing, 2), + 20 * 60 * 5, + 30); + + } + private static void fusionRecipes() { /** @@ -1249,6 +1274,21 @@ public class RECIPES_GREGTECH { FluidUtils.getFluidStack("molten.krypton", 500), T6, 2000, 512000); + addAR(ItemUtils.getItemStackOfAmountFromOreDict( + "dustClay", 32), + GregtechItemList.Bomb_Cast_Mold.get(0), + FluidUtils.getWater(4000), + GregtechItemList.Bomb_Cast.get(4), + 30, 120); + addAR(ItemUtils.getSimpleStack(Items.redstone, 32), + ItemUtils.getSimpleStack(ModItems.itemRope, 16), + Materials.Glue.getFluid(500), + ItemUtils.getSimpleStack(ModItems.itemDetCable, 24), + 30, + 120); + + + /*addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateIncoloy020", 16), ItemUtils.getItemStackOfAmountFromOreDict("frameGtIncoloyMA956", 4), null, GregtechItemList.Casing_Power_SubStation.get(4), 80, 120);*/ @@ -1564,6 +1604,24 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 16), FluidUtils.getFluidStack("water", 1000), FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4), CI.emptyCells(1), 300 * 20); + + //Bombs + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4), + ItemUtils.getSimpleStack(RocketFuels.Ammonium_Nitrate_Dust, 8), + Materials.Fuel.getFluid(1000), + null, + ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), + 300 * 20); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), + ItemUtils.getSimpleStack(ModItems.itemDetCable, 4), + FluidUtils.getFluidStack(RocketFuels.Kerosene, 100), + null, + ItemUtils.getSimpleStack(ModItems.itemBomb, 4), + 10 * 20); + // LFTR Fuel Related Compounds if (GTNH) { @@ -1666,6 +1724,18 @@ public class RECIPES_GREGTECH { MaterialUtils.getVoltageForTier(GTNH ? 5 : 4), 4500); + //Bomb Casings + GT_Values.RA.addBlastRecipe( + GregtechItemList.Bomb_Cast.get(4), + ALLOY.STEEL.getDust(16), + ELEMENT.getInstance().OXYGEN.getFluid(2000), + GT_Values.NF, + GregtechItemList.Bomb_Cast_Molten.get(4), + null, + 4 * 60 * 20, + MaterialUtils.getVoltageForTier(GTNH ? 3 : 2), + 2800); + } diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java index bdf899e22d..18954f12b6 100644 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java +++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java @@ -24,7 +24,6 @@ public class TileEntityAdvPooCollector extends TileEntityBaseFluidCollector { public TileEntityAdvPooCollector() { super(18, 128000); - Logger.INFO("Created"); } @@ -120,7 +119,7 @@ public class TileEntityAdvPooCollector extends TileEntityBaseFluidCollector { } } aPooAmount = Math.max(Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount), 1); - return aPooAmount * MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4}); + return Math.max(1, (aPooAmount * MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4}) / 10)); } else { return 0; diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java index 2438d57355..7afb4727b4 100644 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java +++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java @@ -177,7 +177,6 @@ public abstract class TileEntityBaseFluidCollector extends TileEntityBase implem AxisAlignedBB box = AxisAlignedBB.getBoundingBox(startX, startY, startZ, endX, endY, endZ); if (box != null) { for (Class c2 : aThingsToLookFor()) { - Logger.INFO("Looking for "+c2.getName()); tickEntityType(w, box, c2); } } else { @@ -197,7 +196,6 @@ public abstract class TileEntityBaseFluidCollector extends TileEntityBase implem public final void tickEntityType(World w, AxisAlignedBB box, Class aClassToFind) { List entities = w.getEntitiesWithinAABB(aClassToFind, box); if (entities != null && !entities.isEmpty()) { - Logger.INFO("Found some "+aClassToFind.getName()); interactWithEntities(entities); } } diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java index 3667dd6a29..f6570c6cc6 100644 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java +++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java @@ -20,7 +20,7 @@ import net.minecraftforge.fluids.Fluid; public class TileEntityPooCollector extends TileEntityBaseFluidCollector { public TileEntityPooCollector() { - super(9, 64000); + super(9, 8000); } @@ -109,7 +109,7 @@ public class TileEntityPooCollector extends TileEntityBaseFluidCollector { aPooAmount = MathUtils.randInt(1, 10); } } - aPooAmount = Math.max(Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount), 1); + aPooAmount = Math.max((Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount)/10), 1); return aPooAmount; } else { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index f377a2da3d..83abe22568 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -104,6 +104,11 @@ public enum GregtechItemList implements GregtechItemContainer { //End Game Laser Engraver Lens Laser_Lens_Special, + //Bombs + Bomb_Cast, Bomb_Cast_Molten, + Bomb_Cast_Set, Bomb_Cast_Broken, + Bomb_Cast_Mold, + //---------------------------------------------------------------------------- @@ -561,7 +566,7 @@ public enum GregtechItemList implements GregtechItemContainer { */ //Fluid Void Covers - Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV, + Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index 6b061c3704..f42fc49e53 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -304,6 +304,20 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { + /* + * Bombs + */ + GregtechItemList.Bomb_Cast.set(this.addItem(111, "Bomb Cast", "Used in the production of Bombs", new Object[0])); + GregtechItemList.Bomb_Cast_Molten.set(this.addItem(112, "Bomb Cast (Hot)", "Consider cooling this off", new Object[0])); + GregtechItemList.Bomb_Cast_Set.set(this.addItem(113, "Bomb Cast (Set)", "Break it open for the goodies inside!", new Object[0])); + GregtechItemList.Bomb_Cast_Broken.set(this.addItem(114, "Bomb Cast (Broken)", "This is probably just junk", new Object[0])); + GregtechItemList.Bomb_Cast_Mold.set(this.addItem(115, "Mold (Bomb Cast)", "Used in the production of Bombs", new Object[0])); + + + + + + } private boolean registerComponents_ULV(){ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png new file mode 100644 index 0000000000..3147037815 Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png new file mode 100644 index 0000000000..dce530370f Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png new file mode 100644 index 0000000000..0c85939327 Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png new file mode 100644 index 0000000000..b3c3716abb Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png new file mode 100644 index 0000000000..a9a9c6fcee Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png differ -- cgit