mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fracksol chemplant recipe, oil spot indicators, HazardSystem debug spam
This commit is contained in:
parent
d19e073c41
commit
6cde27e91d
@ -1736,6 +1736,9 @@ public class MachineRecipes {
|
|||||||
case GASOLINE:
|
case GASOLINE:
|
||||||
list.add(new ItemStack(ModItems.antiknock, 1));
|
list.add(new ItemStack(ModItems.antiknock, 1));
|
||||||
break;
|
break;
|
||||||
|
case FRACKSOL:
|
||||||
|
list.add(new ItemStack(ModItems.sulfur, 1));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1975,6 +1978,10 @@ public class MachineRecipes {
|
|||||||
case GASOLINE:
|
case GASOLINE:
|
||||||
input[0] = new FluidStack(10000, FluidType.PETROIL);
|
input[0] = new FluidStack(10000, FluidType.PETROIL);
|
||||||
break;
|
break;
|
||||||
|
case FRACKSOL:
|
||||||
|
input[0] = new FluidStack(100, FluidType.PETROLEUM);
|
||||||
|
input[1] = new FluidStack(1000, FluidType.WATER);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2273,6 +2280,9 @@ public class MachineRecipes {
|
|||||||
case GASOLINE:
|
case GASOLINE:
|
||||||
output[0] = new FluidStack(12000, FluidType.GASOLINE);
|
output[0] = new FluidStack(12000, FluidType.GASOLINE);
|
||||||
break;
|
break;
|
||||||
|
case FRACKSOL:
|
||||||
|
output[0] = new FluidStack(1000, FluidType.FRACKSOL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import net.minecraft.item.ItemBlock;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ItemBlockHazard extends ItemBlock {
|
public class ItemBlockHazard extends ItemBlock implements IItemHazard {
|
||||||
|
|
||||||
ItemHazardModule module;
|
ItemHazardModule module;
|
||||||
|
|
||||||
@ -52,4 +52,10 @@ public class ItemBlockHazard extends ItemBlock {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemHazardModule getModule() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,8 @@ public class ItemChemistryTemplate extends Item {
|
|||||||
VIT_LIQUID,
|
VIT_LIQUID,
|
||||||
VIT_GAS,
|
VIT_GAS,
|
||||||
TEL,
|
TEL,
|
||||||
GASOLINE;
|
GASOLINE,
|
||||||
|
FRACKSOL;
|
||||||
|
|
||||||
public static EnumChemistryTemplate getEnum(int i) {
|
public static EnumChemistryTemplate getEnum(int i) {
|
||||||
if(i < EnumChemistryTemplate.values().length)
|
if(i < EnumChemistryTemplate.values().length)
|
||||||
@ -294,6 +295,8 @@ public class ItemChemistryTemplate extends Item {
|
|||||||
return 40;
|
return 40;
|
||||||
case GASOLINE:
|
case GASOLINE:
|
||||||
return 40;
|
return 40;
|
||||||
|
case FRACKSOL:
|
||||||
|
return 20;
|
||||||
default:
|
default:
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import com.hbm.world.feature.Geyser;
|
|||||||
import com.hbm.world.feature.GeyserLarge;
|
import com.hbm.world.feature.GeyserLarge;
|
||||||
import com.hbm.world.feature.OilBubble;
|
import com.hbm.world.feature.OilBubble;
|
||||||
import com.hbm.world.feature.OilSandBubble;
|
import com.hbm.world.feature.OilSandBubble;
|
||||||
|
import com.hbm.world.feature.OilSpot;
|
||||||
import com.hbm.world.feature.Sellafield;
|
import com.hbm.world.feature.Sellafield;
|
||||||
import com.hbm.world.generator.CellularDungeonFactory;
|
import com.hbm.world.generator.CellularDungeonFactory;
|
||||||
import com.hbm.world.generator.DungeonToolbox;
|
import com.hbm.world.generator.DungeonToolbox;
|
||||||
@ -559,6 +560,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DungeonToolbox.generateOre(world, rand, i, j, 16, 8, 10, 50, ModBlocks.stone_porous);
|
DungeonToolbox.generateOre(world, rand, i, j, 16, 8, 10, 50, ModBlocks.stone_porous);
|
||||||
|
OilSpot.generateOilSpot(world, randPosX, randPosZ, 10, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GeneralConfig.enableNITAN) {
|
if (GeneralConfig.enableNITAN) {
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import net.minecraftforge.oredict.RecipeSorter;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
@ -44,6 +45,9 @@ public class CraftingManager {
|
|||||||
|
|
||||||
GameRegistry.addRecipe(new RBMKFuelCraftingHandler());
|
GameRegistry.addRecipe(new RBMKFuelCraftingHandler());
|
||||||
GameRegistry.addRecipe(new MKUCraftingHandler());
|
GameRegistry.addRecipe(new MKUCraftingHandler());
|
||||||
|
|
||||||
|
//TODO: find out what this actually did
|
||||||
|
RecipeSorter.register("hbm:rbmk", RBMKFuelCraftingHandler.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AddCraftingRec() {
|
public static void AddCraftingRec() {
|
||||||
@ -813,7 +817,7 @@ public class CraftingManager {
|
|||||||
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', "ingotSteel", 'I', "plateIron", 'C', ModItems.board_copper }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', "ingotSteel", 'I', "plateIron", 'C', ModItems.board_copper }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_fracking_tower), new Object[] { "NDN", "PRP", "CRC", 'N', "ingotNiobium", 'D', ModBlocks.machine_well, 'P', ModItems.plate_desh, 'R', ModItems.pipes_steel, 'C', ModBlocks.concrete_smooth }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_fracking_tower), new Object[] { "NDN", "PRP", "CRC", 'N', "ingotNiobium", 'D', ModBlocks.machine_well, 'P', ModItems.plate_desh, 'R', ModItems.pipes_steel, 'C', ModBlocks.concrete_smooth }));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.canister_fracksol, 4), new Object[] { "dustSulfur", "dustSulfur", "dustSulfur", "dustSulfur", ModItems.gas_petroleum, ModItems.canister_empty, ModItems.canister_empty, ModItems.canister_empty, ModItems.canister_empty }));
|
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.canister_fracksol, 4), new Object[] { "dustSulfur", "dustSulfur", "dustSulfur", "dustSulfur", ModItems.gas_petroleum, ModItems.canister_empty, ModItems.canister_empty, ModItems.canister_empty, ModItems.canister_empty }));
|
||||||
|
|
||||||
if(GeneralConfig.enableBabyMode) {
|
if(GeneralConfig.enableBabyMode) {
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.cordite, 3), new Object[] { ModItems.ballistite, Items.gunpowder, new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.cordite, 3), new Object[] { ModItems.ballistite, Items.gunpowder, new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||||
|
|||||||
@ -69,6 +69,8 @@ import com.hbm.handler.imc.IMCCrystallizer;
|
|||||||
import com.hbm.handler.imc.IMCHandler;
|
import com.hbm.handler.imc.IMCHandler;
|
||||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||||
import com.hbm.hazard.HazardRegistry;
|
import com.hbm.hazard.HazardRegistry;
|
||||||
|
import com.hbm.hazard.HazardSystem;
|
||||||
|
import com.hbm.interfaces.IItemHazard;
|
||||||
import com.hbm.inventory.*;
|
import com.hbm.inventory.*;
|
||||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||||
import com.hbm.inventory.recipes.BreederRecipes;
|
import com.hbm.inventory.recipes.BreederRecipes;
|
||||||
@ -894,6 +896,14 @@ public class MainRegistry {
|
|||||||
TileEntityMachineReactorLarge.registerAll();
|
TileEntityMachineReactorLarge.registerAll();
|
||||||
|
|
||||||
proxy.registerMissileItems();
|
proxy.registerMissileItems();
|
||||||
|
|
||||||
|
for(Object i : Item.itemRegistry) {
|
||||||
|
Item item = (Item) i;
|
||||||
|
|
||||||
|
if(item instanceof IItemHazard && HazardSystem.getHazardsFromStack(new ItemStack(item)).isEmpty()) {
|
||||||
|
logger.warn(item.getUnlocalizedName() + " not yet in HazardSystem!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.hbm.blocks.ModBlocks;
|
|||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.world.feature.OilSpot;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@ -93,27 +94,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
|
|||||||
|
|
||||||
this.tanks[2].setFill(tanks[2].getFill() - 10);
|
this.tanks[2].setFill(tanks[2].getFill() - 10);
|
||||||
|
|
||||||
for(int i = 0; i < 10; i++) {
|
OilSpot.generateOilSpot(worldObj, xCoord, zCoord, 75, 10);
|
||||||
int rX = xCoord + (int)(worldObj.rand.nextGaussian() * 75);
|
|
||||||
int rZ = zCoord + (int)(worldObj.rand.nextGaussian() * 75);
|
|
||||||
int rY = worldObj.getHeightValue(rX, rZ) - 1;
|
|
||||||
|
|
||||||
Block ground = worldObj.getBlock(rX, rY, rZ);
|
|
||||||
|
|
||||||
if(ground == Blocks.grass || ground == Blocks.dirt) {
|
|
||||||
worldObj.setBlock(rX, rY, rZ, worldObj.rand.nextInt(10) == 0 ? ModBlocks.dirt_oily : ModBlocks.dirt_dead);
|
|
||||||
|
|
||||||
} else if(ground == Blocks.sand || ground == ModBlocks.ore_oil_sand) {
|
|
||||||
|
|
||||||
if(worldObj.getBlockMetadata(rX, rY, rZ) == 1)
|
|
||||||
worldObj.setBlock(rX, rY, rZ, ModBlocks.sand_dirty_red);
|
|
||||||
else
|
|
||||||
worldObj.setBlock(rX, rY, rZ, ModBlocks.sand_dirty);
|
|
||||||
|
|
||||||
} else if(ground.getMaterial() == Material.leaves) {
|
|
||||||
worldObj.setBlockToAir(rX, rY, rZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
36
src/main/java/com/hbm/world/feature/OilSpot.java
Normal file
36
src/main/java/com/hbm/world/feature/OilSpot.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package com.hbm.world.feature;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class OilSpot {
|
||||||
|
|
||||||
|
public static void generateOilSpot(World world, int x, int z, int width, int count) {
|
||||||
|
|
||||||
|
for(int i = 0; i < count; i++) {
|
||||||
|
int rX = x + (int)(world.rand.nextGaussian() * width);
|
||||||
|
int rZ = z + (int)(world.rand.nextGaussian() * width);
|
||||||
|
int rY = world.getHeightValue(rX, rZ) - 1;
|
||||||
|
|
||||||
|
Block ground = world.getBlock(rX, rY, rZ);
|
||||||
|
|
||||||
|
if(ground == Blocks.grass || ground == Blocks.dirt) {
|
||||||
|
world.setBlock(rX, rY, rZ, world.rand.nextInt(10) == 0 ? ModBlocks.dirt_oily : ModBlocks.dirt_dead);
|
||||||
|
|
||||||
|
} else if(ground == Blocks.sand || ground == ModBlocks.ore_oil_sand) {
|
||||||
|
|
||||||
|
if(world.getBlockMetadata(rX, rY, rZ) == 1)
|
||||||
|
world.setBlock(rX, rY, rZ, ModBlocks.sand_dirty_red);
|
||||||
|
else
|
||||||
|
world.setBlock(rX, rY, rZ, ModBlocks.sand_dirty);
|
||||||
|
|
||||||
|
} else if(ground.getMaterial() == Material.leaves) {
|
||||||
|
world.setBlockToAir(rX, rY, rZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 442 B |
Loading…
x
Reference in New Issue
Block a user