diff --git a/assets/hbm/textures/blocks/cyclotron.png b/assets/hbm/textures/blocks/cyclotron.png index a48415602..1b833a95b 100644 Binary files a/assets/hbm/textures/blocks/cyclotron.png and b/assets/hbm/textures/blocks/cyclotron.png differ diff --git a/assets/hbm/textures/blocks/machine_chemplant.png b/assets/hbm/textures/blocks/machine_chemplant.png new file mode 100644 index 000000000..4c1fe040d Binary files /dev/null and b/assets/hbm/textures/blocks/machine_chemplant.png differ diff --git a/assets/hbm/textures/blocks/machine_refinery.png b/assets/hbm/textures/blocks/machine_refinery.png new file mode 100644 index 000000000..5242ab569 Binary files /dev/null and b/assets/hbm/textures/blocks/machine_refinery.png differ diff --git a/assets/hbm/textures/gui/gui_info.png b/assets/hbm/textures/gui/gui_info.png new file mode 100644 index 000000000..587d44964 Binary files /dev/null and b/assets/hbm/textures/gui/gui_info.png differ diff --git a/assets/hbm/textures/items/pellet_antimatter.png b/assets/hbm/textures/items/pellet_antimatter.png new file mode 100644 index 000000000..cbc9b2e40 Binary files /dev/null and b/assets/hbm/textures/items/pellet_antimatter.png differ diff --git a/assets/hbm/textures/items/powder_actinium_tiny.png b/assets/hbm/textures/items/powder_actinium_tiny.png new file mode 100644 index 000000000..a12ad7c60 Binary files /dev/null and b/assets/hbm/textures/items/powder_actinium_tiny.png differ diff --git a/assets/hbm/textures/items/powder_cerium_tiny.png b/assets/hbm/textures/items/powder_cerium_tiny.png new file mode 100644 index 000000000..d13574589 Binary files /dev/null and b/assets/hbm/textures/items/powder_cerium_tiny.png differ diff --git a/assets/hbm/textures/items/powder_lanthanium_tiny.png b/assets/hbm/textures/items/powder_lanthanium_tiny.png new file mode 100644 index 000000000..cf3934d34 Binary files /dev/null and b/assets/hbm/textures/items/powder_lanthanium_tiny.png differ diff --git a/assets/hbm/textures/items/powder_neodymium_tiny.png b/assets/hbm/textures/items/powder_neodymium_tiny.png new file mode 100644 index 000000000..3c99cd896 Binary files /dev/null and b/assets/hbm/textures/items/powder_neodymium_tiny.png differ diff --git a/assets/hbm/textures/items/powder_niobium_tiny.png b/assets/hbm/textures/items/powder_niobium_tiny.png new file mode 100644 index 000000000..94859fb84 Binary files /dev/null and b/assets/hbm/textures/items/powder_niobium_tiny.png differ diff --git a/assets/hbm/textures/models/chemplant.png b/assets/hbm/textures/models/chemplant.png new file mode 100755 index 000000000..33b95476b Binary files /dev/null and b/assets/hbm/textures/models/chemplant.png differ diff --git a/assets/hbm/textures/models/refinery.png b/assets/hbm/textures/models/refinery.png new file mode 100755 index 000000000..d89127c80 Binary files /dev/null and b/assets/hbm/textures/models/refinery.png differ diff --git a/com/hbm/explosion/ExplosionNukeGeneric.java b/com/hbm/explosion/ExplosionNukeGeneric.java index 9c0f8477a..6e97101ea 100644 --- a/com/hbm/explosion/ExplosionNukeGeneric.java +++ b/com/hbm/explosion/ExplosionNukeGeneric.java @@ -269,11 +269,15 @@ public class ExplosionNukeGeneric { // entity.boundingBox); // if(d10 > 0) isOccupied = true; double d11 = (1.0D - d4);// * d10; - + if(entity instanceof EntityItem && ((EntityItem)entity).getEntityItem().getItem() == ModItems.flame_pony) { entity.setDead(); return true; } + if(entity instanceof EntityItem && ((EntityItem)entity).getEntityItem().getItem() == ModItems.pellet_antimatter) { + entity.setDead(); + return true; + } if (!(entity instanceof EntityPlayerMP && ((EntityPlayerMP) entity).theItemInWorldManager.getGameType() == GameType.CREATIVE)) { diff --git a/com/hbm/handler/MultiblockHandler.java b/com/hbm/handler/MultiblockHandler.java index c38e2e958..8d5d73d85 100644 --- a/com/hbm/handler/MultiblockHandler.java +++ b/com/hbm/handler/MultiblockHandler.java @@ -48,10 +48,10 @@ public class MultiblockHandler { public static final int[] wellDimension = new int[] { 1, 1, 5, 0, 1, 1 }; public static final int[] flareDimension = new int[] { 1, 1, 9, 0, 1, 1 }; public static final int[] drillDimension = new int[] { 1, 1, 3, 0, 1, 1 }; - public static final int[] assemblerDimensionNorth = new int[] { 2, 1, 2, 0, 1, 2 }; - public static final int[] assemblerDimensionEast = new int[] { 2, 1, 2, 0, 2, 1 }; - public static final int[] assemblerDimensionSouth = new int[] { 1, 2, 2, 0, 2, 1 }; - public static final int[] assemblerDimensionWest = new int[] { 1, 2, 2, 0, 1, 2 }; + public static final int[] assemblerDimensionNorth = new int[] { 2, 1, 1, 0, 1, 2 }; + public static final int[] assemblerDimensionEast = new int[] { 2, 1, 1, 0, 2, 1 }; + public static final int[] assemblerDimensionSouth = new int[] { 1, 2, 1, 0, 2, 1 }; + public static final int[] assemblerDimensionWest = new int[] { 1, 2, 1, 0, 1, 2 }; public static final int[] chemplantDimensionNorth = new int[] { 2, 1, 2, 0, 1, 2 }; public static final int[] chemplantDimensionEast = new int[] { 2, 1, 2, 0, 2, 1 }; public static final int[] chemplantDimensionSouth = new int[] { 1, 2, 2, 0, 2, 1 }; diff --git a/com/hbm/handler/AlloyFurnaceRecipeHandler.java b/com/hbm/handler/nei/AlloyFurnaceRecipeHandler.java similarity index 96% rename from com/hbm/handler/AlloyFurnaceRecipeHandler.java rename to com/hbm/handler/nei/AlloyFurnaceRecipeHandler.java index 416001f2d..c1b896503 100644 --- a/com/hbm/handler/AlloyFurnaceRecipeHandler.java +++ b/com/hbm/handler/nei/AlloyFurnaceRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.ArrayList; diff --git a/com/hbm/handler/AssemblerRecipeHandler.java b/com/hbm/handler/nei/AssemblerRecipeHandler.java similarity index 97% rename from com/hbm/handler/AssemblerRecipeHandler.java rename to com/hbm/handler/nei/AssemblerRecipeHandler.java index 26a3cf823..c13f29143 100644 --- a/com/hbm/handler/AssemblerRecipeHandler.java +++ b/com/hbm/handler/nei/AssemblerRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.Arrays; diff --git a/com/hbm/handler/CMBFurnaceRecipeHandler.java b/com/hbm/handler/nei/CMBFurnaceRecipeHandler.java similarity index 96% rename from com/hbm/handler/CMBFurnaceRecipeHandler.java rename to com/hbm/handler/nei/CMBFurnaceRecipeHandler.java index 781a9c47d..e8ad974a7 100644 --- a/com/hbm/handler/CMBFurnaceRecipeHandler.java +++ b/com/hbm/handler/nei/CMBFurnaceRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.Arrays; diff --git a/com/hbm/handler/CentrifugeRecipeHandler.java b/com/hbm/handler/nei/CentrifugeRecipeHandler.java similarity index 96% rename from com/hbm/handler/CentrifugeRecipeHandler.java rename to com/hbm/handler/nei/CentrifugeRecipeHandler.java index 071c3dda1..f220a546c 100644 --- a/com/hbm/handler/CentrifugeRecipeHandler.java +++ b/com/hbm/handler/nei/CentrifugeRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.ArrayList; diff --git a/com/hbm/handler/CyclotronRecipeHandler.java b/com/hbm/handler/nei/CyclotronRecipeHandler.java similarity index 99% rename from com/hbm/handler/CyclotronRecipeHandler.java rename to com/hbm/handler/nei/CyclotronRecipeHandler.java index 2c48cec85..fc729c900 100644 --- a/com/hbm/handler/CyclotronRecipeHandler.java +++ b/com/hbm/handler/nei/CyclotronRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.Arrays; diff --git a/com/hbm/handler/nei/ModInfoHandler.java b/com/hbm/handler/nei/ModInfoHandler.java new file mode 100644 index 000000000..0a8ed1a9c --- /dev/null +++ b/com/hbm/handler/nei/ModInfoHandler.java @@ -0,0 +1,102 @@ +package com.hbm.handler.nei; + +import java.awt.Rectangle; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.hbm.handler.nei.CyclotronRecipeHandler.SmeltingSet; +import com.hbm.inventory.MachineRecipes; +import com.hbm.inventory.gui.GUIMachineCyclotron; +import com.hbm.lib.RefStrings; + +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.api.IOverlayHandler; +import codechicken.nei.api.IRecipeOverlayRenderer; +import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.ICraftingHandler; +import codechicken.nei.recipe.TemplateRecipeHandler; +import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; +import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRectHandler; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.inventory.Container; +import net.minecraft.item.ItemStack; + +public class ModInfoHandler extends TemplateRecipeHandler { + + public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe + { + PositionedStack item; + + public SmeltingSet(ItemStack item) { + item.stackSize = 1; + this.item = new PositionedStack(item, 129, 24); + } + + @Override + public List getIngredients() { + return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {item})); + } + + @Override + public PositionedStack getResult() { + return item; + } + } + + @Override + public String getRecipeName() { + return "Cyclotron"; + } + + @Override + public String getGuiTexture() { + return RefStrings.MODID + ":textures/gui/gui_info.png"; + } + + @Override + public void loadCraftingRecipes(String outputId, Object... results) { + if ((outputId.equals("hbminfo")) && getClass() == ModInfoHandler.class) { + Map recipes = MachineRecipes.instance().getItemInfo(); + for (Map.Entry recipe : recipes.entrySet()) { + this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey())); + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(ItemStack result) { + Map recipes = MachineRecipes.instance().getItemInfo(); + for (Map.Entry recipe : recipes.entrySet()) { + if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getKey(), result)) + this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey())); + } + } + + @Override + public void loadUsageRecipes(String inputId, Object... ingredients) { + if ((inputId.equals("hbminfo")) && getClass() == ModInfoHandler.class) { + loadCraftingRecipes("hbminfo", new Object[0]); + } else { + super.loadUsageRecipes(inputId, ingredients); + } + } + + @Override + public void loadUsageRecipes(ItemStack ingredient) { + Map recipes = MachineRecipes.instance().getItemInfo(); + for (Map.Entry recipe : recipes.entrySet()) { + if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey())) + this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey())); + } + } + + @Override + public TemplateRecipeHandler newInstance() { + return super.newInstance(); + } +} diff --git a/com/hbm/handler/ReactorRecipeHandler.java b/com/hbm/handler/nei/ReactorRecipeHandler.java similarity index 96% rename from com/hbm/handler/ReactorRecipeHandler.java rename to com/hbm/handler/nei/ReactorRecipeHandler.java index e77ab9cc2..a9f470136 100644 --- a/com/hbm/handler/ReactorRecipeHandler.java +++ b/com/hbm/handler/nei/ReactorRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.ArrayList; diff --git a/com/hbm/handler/RefineryRecipeHandler.java b/com/hbm/handler/nei/RefineryRecipeHandler.java similarity index 97% rename from com/hbm/handler/RefineryRecipeHandler.java rename to com/hbm/handler/nei/RefineryRecipeHandler.java index ff1d5896a..0cbbebf40 100644 --- a/com/hbm/handler/RefineryRecipeHandler.java +++ b/com/hbm/handler/nei/RefineryRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.ArrayList; diff --git a/com/hbm/handler/ShredderRecipeHandler.java b/com/hbm/handler/nei/ShredderRecipeHandler.java similarity index 96% rename from com/hbm/handler/ShredderRecipeHandler.java rename to com/hbm/handler/nei/ShredderRecipeHandler.java index 9d7738e0b..786b74fd2 100644 --- a/com/hbm/handler/ShredderRecipeHandler.java +++ b/com/hbm/handler/nei/ShredderRecipeHandler.java @@ -1,4 +1,4 @@ -package com.hbm.handler; +package com.hbm.handler.nei; import java.awt.Rectangle; import java.util.ArrayList; diff --git a/com/hbm/inventory/MachineRecipes.java b/com/hbm/inventory/MachineRecipes.java index fd8298ead..b28a8243d 100644 --- a/com/hbm/inventory/MachineRecipes.java +++ b/com/hbm/inventory/MachineRecipes.java @@ -2685,4 +2685,11 @@ public class MachineRecipes { return input; } + + public Map getItemInfo() { + Map map = new HashMap(); + map.put(new ItemStack(ModBlocks.asphalt), new String[] {"test", "test"}); + + return map; + } } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index bb5686ccb..d3cfa5c59 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -184,12 +184,26 @@ public class ModItems { public static Item powder_dura_steel; public static Item powder_polymer; + public static Item powder_lithium_tiny; + public static Item powder_neodymium_tiny; + public static Item powder_caesium_tiny; public static Item powder_cobalt_tiny; + public static Item powder_niobium_tiny; + public static Item powder_cerium_tiny; + public static Item powder_lanthanium_tiny; + public static Item powder_actinium_tiny; public static Item powder_lanthanium; public static Item powder_actinium; public static Item powder_desh; + + public static Item fragment_neodymium; + public static Item fragment_caesium; + public static Item fragment_niobium; + public static Item fragment_cerium; + public static Item fragment_lanthanium; + public static Item fragment_actinium; public static Item coil_copper; public static Item coil_copper_torus; @@ -329,6 +343,7 @@ public class ModItems { public static Item cell_sas3; public static Item cell_antimatter; public static Item cell_anti_schrabidium; + public static Item pellet_antimatter; public static Item singularity; public static Item singularity_counter_resonant; public static Item singularity_super_heated; @@ -1253,6 +1268,7 @@ public class ModItems { singularity_counter_resonant = new ItemDrop().setUnlocalizedName("singularity_counter_resonant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.nuclear_waste).setTextureName(RefStrings.MODID + ":singularity_alt"); singularity_super_heated = new ItemDrop().setUnlocalizedName("singularity_super_heated").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.nuclear_waste).setTextureName(RefStrings.MODID + ":singularity_5"); black_hole = new ItemDrop().setUnlocalizedName("black_hole").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.nuclear_waste).setTextureName(RefStrings.MODID + ":singularity_4"); + pellet_antimatter = new ItemDrop().setUnlocalizedName("pellet_antimatter").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":pellet_antimatter"); crystal_xen = new ItemDrop().setUnlocalizedName("crystal_xen").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":crystal_xen"); inf_water = new Item().setUnlocalizedName("inf_water").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_water"); inf_coolant = new Item().setUnlocalizedName("inf_coolant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_coolant"); @@ -2236,6 +2252,7 @@ public class ModItems { GameRegistry.registerItem(singularity_super_heated, singularity_super_heated.getUnlocalizedName()); GameRegistry.registerItem(black_hole, black_hole.getUnlocalizedName()); GameRegistry.registerItem(crystal_xen, crystal_xen.getUnlocalizedName()); + GameRegistry.registerItem(pellet_antimatter, pellet_antimatter.getUnlocalizedName()); //Infinite Tanks GameRegistry.registerItem(inf_water, inf_water.getUnlocalizedName()); diff --git a/com/hbm/items/special/ItemDrop.java b/com/hbm/items/special/ItemDrop.java index e47a899f8..41b9bcce9 100644 --- a/com/hbm/items/special/ItemDrop.java +++ b/com/hbm/items/special/ItemDrop.java @@ -6,6 +6,7 @@ import com.hbm.entity.effect.EntityBlackHole; import com.hbm.entity.effect.EntityCloudFleija; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionLarge; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; @@ -29,6 +30,12 @@ public class ItemDrop extends Item { entityItem.posZ, 10.0F, true); } } + if (stack.getItem() != null && stack.getItem() == ModItems.pellet_antimatter) { + if (!entityItem.worldObj.isRemote) { + ExplosionLarge.explodeFire(entityItem.worldObj, entityItem.posX, entityItem.posY, + entityItem.posZ, 100, true, true, true); + } + } if (stack.getItem() != null && stack.getItem() == ModItems.cell_anti_schrabidium) { if (!entityItem.worldObj.isRemote) { entityItem.worldObj.playSoundEffect(entityItem.posX, entityItem.posY, entityItem.posZ, @@ -151,6 +158,10 @@ public class ItemDrop extends Item { list.add("Warning: Exposure to matter will"); list.add("lead to violent annihilation!"); } + if (itemstack.getItem() != null && itemstack.getItem() == ModItems.pellet_antimatter) { + list.add("Very heavy antimatter cluster."); + list.add("Gets rid of black holes."); + } if (itemstack.getItem() != null && itemstack.getItem() == ModItems.cell_anti_schrabidium) { list.add("Warning: Exposure to matter will"); list.add("create a fólkvangr field!"); diff --git a/com/hbm/main/NEIConfig.java b/com/hbm/main/NEIConfig.java index d63d113cc..df962b1e2 100644 --- a/com/hbm/main/NEIConfig.java +++ b/com/hbm/main/NEIConfig.java @@ -1,14 +1,15 @@ package com.hbm.main; import com.hbm.blocks.ModBlocks; -import com.hbm.handler.AlloyFurnaceRecipeHandler; -import com.hbm.handler.AssemblerRecipeHandler; -import com.hbm.handler.CMBFurnaceRecipeHandler; -import com.hbm.handler.CentrifugeRecipeHandler; -import com.hbm.handler.CyclotronRecipeHandler; -import com.hbm.handler.ReactorRecipeHandler; -import com.hbm.handler.RefineryRecipeHandler; -import com.hbm.handler.ShredderRecipeHandler; +import com.hbm.handler.nei.AlloyFurnaceRecipeHandler; +import com.hbm.handler.nei.AssemblerRecipeHandler; +import com.hbm.handler.nei.CMBFurnaceRecipeHandler; +import com.hbm.handler.nei.CentrifugeRecipeHandler; +import com.hbm.handler.nei.CyclotronRecipeHandler; +import com.hbm.handler.nei.ModInfoHandler; +import com.hbm.handler.nei.ReactorRecipeHandler; +import com.hbm.handler.nei.RefineryRecipeHandler; +import com.hbm.handler.nei.ShredderRecipeHandler; import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; @@ -37,6 +38,8 @@ public class NEIConfig implements IConfigureNEI { API.registerUsageHandler(new AssemblerRecipeHandler()); API.registerRecipeHandler(new RefineryRecipeHandler()); API.registerUsageHandler(new RefineryRecipeHandler()); + API.registerRecipeHandler(new ModInfoHandler()); + API.registerUsageHandler(new ModInfoHandler()); //Some things are even beyond my control...or are they? API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_coal_on))); diff --git a/com/hbm/render/tileentity/RenderChemplant.java b/com/hbm/render/tileentity/RenderChemplant.java index 2d8515bb2..6e96a6137 100644 --- a/com/hbm/render/tileentity/RenderChemplant.java +++ b/com/hbm/render/tileentity/RenderChemplant.java @@ -24,7 +24,7 @@ public class RenderChemplant extends TileEntitySpecialRenderer { public RenderChemplant() { bodyModel = AdvancedModelLoader.loadModel(body); - bodyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/textureIGenRotor.png"); + bodyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant.png"); boltModel = AdvancedModelLoader.loadModel(bolt); boltTexture = new ResourceLocation(RefStrings.MODID, "textures/models/textureIGenRotor.png"); } diff --git a/com/hbm/render/tileentity/RenderRefinery.java b/com/hbm/render/tileentity/RenderRefinery.java index 45a4d4467..f2ec88ee3 100644 --- a/com/hbm/render/tileentity/RenderRefinery.java +++ b/com/hbm/render/tileentity/RenderRefinery.java @@ -19,7 +19,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer { public RenderRefinery() { genModel = AdvancedModelLoader.loadModel(body); - genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png"); + genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/refinery.png"); } @Override