Recipes, refinery textures, oil generation
@ -264,6 +264,8 @@ item.plate_paa.name=PaA-Legierungsplatte
|
||||
item.ingot_dura_steel.name=Schnellarbeitsstahlbarren
|
||||
item.ingot_polymer.name=Polymerbarren
|
||||
item.bolt_dura_steel.name=Schnellarbeitsstahlbolzen
|
||||
item.pipes_steel.name=Stahlrohre
|
||||
item.drill_titanium.name=Titanbohrer
|
||||
|
||||
item.ingot_australium.name=Australiumbarren
|
||||
item.ingot_weidanium.name=Weidaniumbarren
|
||||
@ -491,6 +493,7 @@ item.canister_empty.name=Leerer Kanister
|
||||
item.canister_canola.name=Schmiermittelkanister
|
||||
item.canister_oil.name=Rohölkanister
|
||||
item.canister_fuel.name=Treibstoffkanister
|
||||
item.canister_kerosene.name=Kerosinkanister
|
||||
item.canister_napalm.name=Napalm B
|
||||
item.canister_NITAN.name=NITAN© 100 Oktan Supertreibstoff
|
||||
|
||||
|
||||
@ -264,6 +264,8 @@ item.plate_paa.name=PaA Alloy Plate
|
||||
item.ingot_dura_steel.name=High-Speed Steel Ingot
|
||||
item.ingot_polymer.name=Polymer Ingot
|
||||
item.bolt_dura_steel.name=High-Speed Steel Bolt
|
||||
item.pipes_steel.name=Steel Pipes
|
||||
item.drill_titanium.name=Titanium Drill
|
||||
|
||||
item.ingot_australium.name=Australium Ingot
|
||||
item.ingot_weidanium.name=Weidanium Ingot
|
||||
@ -491,6 +493,7 @@ item.canister_empty.name=Empty Canister
|
||||
item.canister_canola.name=Engine Lubricant
|
||||
item.canister_oil.name=Crude Oil Canister
|
||||
item.canister_fuel.name=Fuel Canister
|
||||
item.canister_kerosene.name=Kerosene Canister
|
||||
item.canister_napalm.name=Napalm B
|
||||
item.canister_NITAN.name=NITAN© 100 Octane Super Fuel
|
||||
|
||||
|
||||
BIN
assets/hbm/textures/blocks/machine_refinery_side.png
Normal file
|
After Width: | Height: | Size: 542 B |
BIN
assets/hbm/textures/blocks/machine_refinery_side_alt.png
Normal file
|
After Width: | Height: | Size: 522 B |
BIN
assets/hbm/textures/blocks/machine_refinery_top.png
Normal file
|
After Width: | Height: | Size: 490 B |
BIN
assets/hbm/textures/gui/gui_refinery.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/hbm/textures/items/canister_kerosene.png
Normal file
|
After Width: | Height: | Size: 284 B |
BIN
assets/hbm/textures/items/drill_titanium.png
Normal file
|
After Width: | Height: | Size: 213 B |
BIN
assets/hbm/textures/items/pipes_steel.png
Normal file
|
After Width: | Height: | Size: 235 B |
@ -1234,28 +1234,28 @@ public class MachineRecipes {
|
||||
} else if (s.length() > 3 && s.substring(0, 3).equals("ore")) {
|
||||
ItemStack stack = canFindDustByName(s.substring(3));
|
||||
if (stack != null) {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 2));
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 2, stack.getItemDamage()));
|
||||
} else {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap));
|
||||
}
|
||||
} else if (s.length() > 3 && s.substring(0, 3).equals("rod")) {
|
||||
ItemStack stack = canFindDustByName(s.substring(3));
|
||||
if (stack != null) {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 2));
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 2, stack.getItemDamage()));
|
||||
} else {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap));
|
||||
}
|
||||
} else if (s.length() > 5 && s.substring(0, 5).equals("block")) {
|
||||
ItemStack stack = canFindDustByName(s.substring(5));
|
||||
if (stack != null) {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 9));
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 9, stack.getItemDamage()));
|
||||
} else {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap));
|
||||
}
|
||||
} else if (s.length() > 3 && s.substring(0, 3).equals("gem")) {
|
||||
ItemStack stack = canFindDustByName(s.substring(3));
|
||||
if (stack != null) {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 1));
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 1, stack.getItemDamage()));
|
||||
} else {
|
||||
setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap));
|
||||
}
|
||||
|
||||
@ -204,6 +204,8 @@ public class ModItems {
|
||||
public static Item plate_paa;
|
||||
public static Item board_copper;
|
||||
public static Item bolt_dura_steel;
|
||||
public static Item pipes_steel;
|
||||
public static Item drill_titanium;
|
||||
|
||||
public static Item ingot_dura_steel;
|
||||
public static Item ingot_polymer;
|
||||
@ -420,6 +422,7 @@ public class ModItems {
|
||||
public static Item canister_canola;
|
||||
public static Item canister_oil;
|
||||
public static Item canister_fuel;
|
||||
public static Item canister_kerosene;
|
||||
public static Item canister_napalm;
|
||||
public static Item canister_NITAN;
|
||||
|
||||
@ -1036,6 +1039,8 @@ public class ModItems {
|
||||
plate_paa = new ItemCustomLore().setUnlocalizedName("plate_paa").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_paa");
|
||||
board_copper = new Item().setUnlocalizedName("board_copper").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":board_copper");
|
||||
bolt_dura_steel = new Item().setUnlocalizedName("bolt_dura_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":bolt_dura_steel");
|
||||
pipes_steel = new Item().setUnlocalizedName("pipes_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pipes_steel");
|
||||
drill_titanium = new Item().setUnlocalizedName("drill_titanium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":drill_titanium");
|
||||
|
||||
ingot_dura_steel = new ItemCustomLore().setUnlocalizedName("ingot_dura_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_dura_steel");
|
||||
ingot_polymer = new ItemCustomLore().setUnlocalizedName("ingot_polymer").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_polymer");
|
||||
@ -1270,6 +1275,7 @@ public class ModItems {
|
||||
canister_canola = new ItemCustomLore().setUnlocalizedName("canister_canola").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_canola");
|
||||
canister_oil = new ItemCustomLore().setUnlocalizedName("canister_oil").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_oil");
|
||||
canister_fuel = new ItemCustomLore().setUnlocalizedName("canister_fuel").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fuel");
|
||||
canister_kerosene = new ItemCustomLore().setUnlocalizedName("canister_kerosene").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_kerosene");
|
||||
canister_napalm = new ItemCustomLore().setUnlocalizedName("canister_napalm").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_napalm");
|
||||
canister_NITAN = new ItemCustomLore().setUnlocalizedName("canister_NITAN").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_superfuel");
|
||||
|
||||
@ -2025,6 +2031,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(thermo_unit_endo, thermo_unit_endo.getUnlocalizedName());
|
||||
GameRegistry.registerItem(thermo_unit_exo, thermo_unit_exo.getUnlocalizedName());
|
||||
GameRegistry.registerItem(levitation_unit, levitation_unit.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pipes_steel, pipes_steel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(drill_titanium, drill_titanium.getUnlocalizedName());
|
||||
|
||||
//Teleporter Parts
|
||||
GameRegistry.registerItem(telepad, telepad.getUnlocalizedName());
|
||||
@ -2156,6 +2164,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(canister_canola, canister_canola.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_oil, canister_oil.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_fuel, canister_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_kerosene, canister_kerosene.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_napalm, canister_napalm.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canister_NITAN, canister_NITAN.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -45,6 +45,32 @@ public class ItemOilDetector extends Item {
|
||||
if(world.getBlock(x, i, z - 5) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
|
||||
for(int i = y + 15; i > 10; i--)
|
||||
if(world.getBlock(x + 10, i, z) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
for(int i = y + 15; i > 10; i--)
|
||||
if(world.getBlock(x - 10, i, z) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
for(int i = y + 15; i > 10; i--)
|
||||
if(world.getBlock(x, i, z + 10) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
for(int i = y + 15; i > 10; i--)
|
||||
if(world.getBlock(x, i, z - 10) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
|
||||
for(int i = y + 15; i > 5; i--)
|
||||
if(world.getBlock(x + 5, i, z + 5) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
for(int i = y + 15; i > 5; i--)
|
||||
if(world.getBlock(x - 5, i, z + 5) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
for(int i = y + 15; i > 5; i--)
|
||||
if(world.getBlock(x + 5, i, z - 5) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
for(int i = y + 15; i > 5; i--)
|
||||
if(world.getBlock(x - 5, i, z - 5) == ModBlocks.ore_oil)
|
||||
oil = true;
|
||||
|
||||
if(direct)
|
||||
oil = true;
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.world.DesertAtom001;
|
||||
import com.hbm.world.Dud;
|
||||
import com.hbm.world.Factory;
|
||||
import com.hbm.world.LibraryDungeon;
|
||||
import com.hbm.world.OilBubble;
|
||||
import com.hbm.world.Radio01;
|
||||
import com.hbm.world.Relay;
|
||||
import com.hbm.world.Satellite;
|
||||
@ -317,6 +318,14 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
new Spaceship().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if (rand.nextInt(15) == 0) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(25);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
|
||||
OilBubble.spawnOil(world, randPosX, randPosY, randPosZ, 7 + rand.nextInt(9));
|
||||
}
|
||||
}
|
||||
|
||||
if (MainRegistry.enableNITAN) {
|
||||
|
||||
@ -49,6 +49,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.filter_coal, 1), new Object[] { "SCS", "CPC", "SCS", 'S', Items.string, 'P', Items.paper, 'C', "dustCoal" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_mixed, 3), new Object[] { "ANA", "NCN", "ANA", 'A', ModItems.plate_advanced_alloy, 'N', "plateDenseLead", 'C', ModItems.plate_combine_steel }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bolt_dura_steel, 4), new Object[] { "D", "D", 'D', ModItems.ingot_dura_steel});
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pipes_steel, 1), new Object[] { "B", "B", "B", 'B', "blockSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.drill_titanium, 1), new Object[] { " B ", "IBI", "PPP", 'B', ModItems.bolt_dura_steel, 'I', ModItems.ingot_dura_steel, 'P', "plateTitanium" }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnet_dee, 1), new Object[] { "SMM", "M M", "MMT", 'S', "ingotSteel", 'M', ModBlocks.fusion_conductor, 'T', ModItems.coil_advanced_torus }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnet_circular, 2), new Object[] { "PSP", "MMM", "PSP", 'S', "ingotSteel", 'M', ModBlocks.fusion_conductor, 'P', "plateAdvanced" }));
|
||||
@ -466,6 +468,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_teleporter), 1), new Object[] { "PTP", "FKF", "BBB", 'P', "plateTitanium", 'T', ModItems.telepad, 'F', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'K', ModItems.entanglement_kit, 'B', Item.getItemFromBlock(ModBlocks.machine_battery) }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 1), new Object[] { "UPU", "UWU", "UPU", 'P', "plateSteel", 'U', ModItems.rtg_unit, 'W', ModBlocks.red_wire_coated }));
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_cyclotron), 1), new Object[] { "PTP", "PCP", "WBW", 'P', ModItems.board_copper, 'T', ModItems.cyclotron_tower, 'C', ModBlocks.fusion_core, 'W', ModBlocks.red_wire_coated, 'B', ModBlocks.machine_battery });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_well), 1), new Object[] { "TPM", "GPG", "GDG", 'T', ModItems.tank_steel, 'P', ModItems.pipes_steel, 'M', ModItems.motor, 'G', ModBlocks.steel_scaffold, 'D', ModItems.drill_titanium });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', "plateTitanium", 'I', "ingotTitanium" }));
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) });
|
||||
@ -859,6 +862,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.designator, 1), new Object[] { " A", "#B#", "#B#", '#', "plateIron", 'A', "plateSteel", 'B', ModItems.circuit_red_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.designator_range, 1), new Object[] { "RRD", "PIC", " P", 'P', "plateSteel", 'R', Items.redstone, 'C', ModItems.circuit_gold, 'D', ModItems.designator, 'I', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.linker, 1), new Object[] { "I I", "ICI", "GGG", 'I', "plateIron", 'G', "plateGold", 'C', ModItems.circuit_gold }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', ModItems.wire_gold, 'I', "ingotCopper", 'C', ModItems.circuit_red_copper, 'P', "plateSteel" }));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_hammer, 1), new Object[] { "BBB", "BBB", " S ", 'B', Item.getItemFromBlock(ModBlocks.block_schrabidium), 'S', Items.stick });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', new ItemStack(ModItems.ingot_euphemium, 1, 34), 'S', Items.stick });
|
||||
|
||||
@ -7,7 +7,9 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachineElectricFurnace;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.handler.ShredderRecipeHandler;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.inventory.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
import com.hbm.lib.Library;
|
||||
@ -24,6 +26,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class TileEntityMachineOilWell extends TileEntity implements ISidedInventory, IConsumer {
|
||||
|
||||
@ -154,6 +157,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
|
||||
this.power = nbt.getInteger("powerTime");
|
||||
this.oil = nbt.getInteger("oil");
|
||||
this.age = nbt.getInteger("age");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
@ -172,6 +176,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("powerTime", power);
|
||||
nbt.setInteger("oil", oil);
|
||||
nbt.setInteger("age", age);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
@ -244,7 +249,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
|
||||
//operation start
|
||||
|
||||
if(age % timer == 0) {
|
||||
if(age == timer - 1) {
|
||||
warning = 0;
|
||||
|
||||
//warning 0, green: derrick is operational
|
||||
@ -264,7 +269,9 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
continue;
|
||||
|
||||
if(b == Blocks.air || b == Blocks.grass || b == Blocks.dirt ||
|
||||
b == Blocks.stone || b == Blocks.sand || b == Blocks.sandstone) {
|
||||
b == Blocks.stone || b == Blocks.sand || b == Blocks.sandstone ||
|
||||
b == Blocks.gravel || isOre(b, worldObj.getBlockMetadata(xCoord, i, zCoord)) ||
|
||||
b.isReplaceable(worldObj, xCoord, i, zCoord)) {
|
||||
worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe);
|
||||
|
||||
//Code 2: The drilling ended
|
||||
@ -304,6 +311,21 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
||||
|
||||
}
|
||||
|
||||
public boolean isOre(Block b, int meta) {
|
||||
|
||||
int[] ids = OreDictionary.getOreIDs(new ItemStack(b, 1, meta));
|
||||
|
||||
for(int i = 0; i < ids.length; i++) {
|
||||
|
||||
String s = OreDictionary.getOreName(ids[i]);
|
||||
|
||||
if(s.length() > 3 && s.substring(0, 3).equals("ore"))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean succ(int x, int y, int z) {
|
||||
|
||||
list.clear();
|
||||
|
||||
33
com/hbm/world/OilBubble.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.hbm.world;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class OilBubble {
|
||||
|
||||
public static void spawnOil(World world, int x, int y, int z, int radius) {
|
||||
int r = radius;
|
||||
int r2 = r * r;
|
||||
int r22 = r2 / 2;
|
||||
|
||||
for (int xx = -r; xx < r; xx++) {
|
||||
int X = xx + x;
|
||||
int XX = xx * xx;
|
||||
for (int yy = -r; yy < r; yy++) {
|
||||
int Y = yy + y;
|
||||
int YY = XX + yy * yy * 3;
|
||||
for (int zz = -r; zz < r; zz++) {
|
||||
int Z = zz + z;
|
||||
int ZZ = YY + zz * zz;
|
||||
if (ZZ < r22) {
|
||||
if(world.getBlock(X, Y, Z) == Blocks.stone)
|
||||
world.setBlock(X, Y, Z, ModBlocks.ore_oil);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||