fixes, briquettes, fluid gauges and paintable ducts, recipe changes
@ -1,5 +1,6 @@
|
||||
package api.hbm.fluid;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
@ -25,4 +26,5 @@ public interface IPipeNet {
|
||||
|
||||
public long transferFluid(long fill);
|
||||
public FluidType getType();
|
||||
public BigInteger getTotalTransfer();
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package api.hbm.fluid;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -15,6 +16,9 @@ public class PipeNet implements IPipeNet {
|
||||
private List<IFluidConductor> links = new ArrayList();
|
||||
private HashSet<IFluidConnector> subscribers = new HashSet();
|
||||
|
||||
public static List<PipeNet> trackingInstances = null;
|
||||
protected BigInteger totalTransfer = BigInteger.ZERO;
|
||||
|
||||
public PipeNet(FluidType type) {
|
||||
this.type = type;
|
||||
}
|
||||
@ -90,6 +94,8 @@ public class PipeNet implements IPipeNet {
|
||||
if(this.subscribers.isEmpty())
|
||||
return fill;
|
||||
|
||||
trackingInstances = new ArrayList();
|
||||
trackingInstances.add(this);
|
||||
List<IFluidConnector> subList = new ArrayList(subscribers);
|
||||
return fairTransfer(subList, type, fill);
|
||||
}
|
||||
@ -120,6 +126,14 @@ public class PipeNet implements IPipeNet {
|
||||
totalGiven += (given - con.transferFluid(type, given));
|
||||
}
|
||||
|
||||
if(trackingInstances != null) {
|
||||
|
||||
for(int i = 0; i < trackingInstances.size(); i++) {
|
||||
PipeNet net = trackingInstances.get(i);
|
||||
net.totalTransfer = net.totalTransfer.add(BigInteger.valueOf(totalGiven));
|
||||
}
|
||||
}
|
||||
|
||||
return fill - totalGiven;
|
||||
}
|
||||
|
||||
@ -143,4 +157,9 @@ public class PipeNet implements IPipeNet {
|
||||
public boolean isValid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigInteger getTotalTransfer() {
|
||||
return this.totalTransfer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -791,6 +791,8 @@ public class ModBlocks {
|
||||
public static Block fluid_duct_solid;
|
||||
public static Block fluid_duct_neo;
|
||||
public static Block fluid_duct_box;
|
||||
public static Block fluid_duct_paintable;
|
||||
public static Block fluid_duct_gauge;
|
||||
public static Block radio_torch_sender;
|
||||
public static Block radio_torch_receiver;
|
||||
|
||||
@ -1985,6 +1987,8 @@ public class ModBlocks {
|
||||
fluid_duct_solid = new BlockFluidDuctSolid(Material.iron).setBlockName("fluid_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_solid");
|
||||
fluid_duct_neo = new FluidDuctStandard(Material.iron).setBlockName("fluid_duct_neo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pipe_neo");
|
||||
fluid_duct_box = new FluidDuctBox(Material.iron).setBlockName("fluid_duct_box").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||
fluid_duct_paintable = new FluidDuctPaintable().setBlockName("fluid_duct_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
fluid_duct_gauge = new FluidDuctGauge().setBlockName("fluid_duct_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
radio_torch_receiver = new RadioTorchReceiver().setBlockName("radio_torch_receiver").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
|
||||
@ -2125,7 +2129,7 @@ public class ModBlocks {
|
||||
|
||||
tesla = new MachineTesla(Material.iron).setBlockName("tesla").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":tesla");
|
||||
|
||||
marker_structure = new BlockMarker(Material.iron).setBlockName("marker_structure").setHardness(0.0F).setResistance(0.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":marker_structure");
|
||||
marker_structure = new BlockMarker(Material.iron).setBlockName("marker_structure").setHardness(0.1F).setResistance(0.1F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":marker_structure");
|
||||
|
||||
muffler = new BlockGeneric(Material.cloth).setBlockName("muffler").setHardness(0.8F).setStepSound(Block.soundTypeCloth).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":muffler");
|
||||
|
||||
@ -3168,8 +3172,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(gas_duct, gas_duct.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct, fluid_duct.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct_neo, ItemBlockBase.class, fluid_duct_neo.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct_box, ItemBlockBase.class, fluid_duct_box.getUnlocalizedName());
|
||||
register(fluid_duct_neo);
|
||||
register(fluid_duct_box);
|
||||
register(fluid_duct_paintable);
|
||||
register(fluid_duct_gauge);
|
||||
GameRegistry.registerBlock(fluid_duct_solid, fluid_duct_solid.getUnlocalizedName());
|
||||
register(radio_torch_sender);
|
||||
register(radio_torch_receiver);
|
||||
|
||||
@ -29,159 +29,126 @@ public class BlockMarker extends BlockContainer {
|
||||
return new TileEntityStructureMarker();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
private boolean func_150107_m(World p_150107_1_, int p_150107_2_, int p_150107_3_, int p_150107_4_)
|
||||
{
|
||||
if (World.doesBlockHaveSolidTopSurface(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Block block = p_150107_1_.getBlock(p_150107_2_, p_150107_3_, p_150107_4_);
|
||||
return block.canPlaceTorchOnTop(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_);
|
||||
}
|
||||
}
|
||||
private boolean func_150107_m(World p_150107_1_, int p_150107_2_, int p_150107_3_, int p_150107_4_) {
|
||||
if(World.doesBlockHaveSolidTopSurface(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_)) {
|
||||
return true;
|
||||
} else {
|
||||
Block block = p_150107_1_.getBlock(p_150107_2_, p_150107_3_, p_150107_4_);
|
||||
return block.canPlaceTorchOnTop(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
{
|
||||
return func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
||||
}
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) {
|
||||
return func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 6, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 7, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 8, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 9, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_);
|
||||
@Override
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {
|
||||
super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_);
|
||||
|
||||
if (p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_) == 0)
|
||||
{
|
||||
this.onBlockAdded(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
}
|
||||
if(p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_) == 0) {
|
||||
this.onBlockAdded(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
{
|
||||
this.func_150108_b(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, p_149695_5_);
|
||||
}
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) {
|
||||
this.func_150108_b(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, p_149695_5_);
|
||||
}
|
||||
|
||||
protected boolean func_150108_b(World p_150108_1_, int p_150108_2_, int p_150108_3_, int p_150108_4_, Block p_150108_5_)
|
||||
{
|
||||
if (this.func_150109_e(p_150108_1_, p_150108_2_, p_150108_3_, p_150108_4_))
|
||||
{
|
||||
boolean flag = false;
|
||||
protected boolean func_150108_b(World p_150108_1_, int p_150108_2_, int p_150108_3_, int p_150108_4_, Block p_150108_5_) {
|
||||
if(this.func_150109_e(p_150108_1_, p_150108_2_, p_150108_3_, p_150108_4_)) {
|
||||
boolean flag = false;
|
||||
|
||||
if (!this.func_150107_m(p_150108_1_, p_150108_2_, p_150108_3_ - 1, p_150108_4_))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
if(!this.func_150107_m(p_150108_1_, p_150108_2_, p_150108_3_ - 1, p_150108_4_)) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
this.dropBlockAsItem(p_150108_1_, p_150108_2_, p_150108_3_, p_150108_4_, p_150108_1_.getBlockMetadata(p_150108_2_, p_150108_3_, p_150108_4_), 0);
|
||||
p_150108_1_.setBlockToAir(p_150108_2_, p_150108_3_, p_150108_4_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(flag) {
|
||||
this.dropBlockAsItem(p_150108_1_, p_150108_2_, p_150108_3_, p_150108_4_, p_150108_1_.getBlockMetadata(p_150108_2_, p_150108_3_, p_150108_4_), 0);
|
||||
p_150108_1_.setBlockToAir(p_150108_2_, p_150108_3_, p_150108_4_);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean func_150109_e(World p_150109_1_, int p_150109_2_, int p_150109_3_, int p_150109_4_)
|
||||
{
|
||||
if (!this.canPlaceBlockAt(p_150109_1_, p_150109_2_, p_150109_3_, p_150109_4_))
|
||||
{
|
||||
if (p_150109_1_.getBlock(p_150109_2_, p_150109_3_, p_150109_4_) == this)
|
||||
{
|
||||
this.dropBlockAsItem(p_150109_1_, p_150109_2_, p_150109_3_, p_150109_4_, p_150109_1_.getBlockMetadata(p_150109_2_, p_150109_3_, p_150109_4_), 0);
|
||||
p_150109_1_.setBlockToAir(p_150109_2_, p_150109_3_, p_150109_4_);
|
||||
}
|
||||
protected boolean func_150109_e(World p_150109_1_, int p_150109_2_, int p_150109_3_, int p_150109_4_) {
|
||||
if(!this.canPlaceBlockAt(p_150109_1_, p_150109_2_, p_150109_3_, p_150109_4_)) {
|
||||
if(p_150109_1_.getBlock(p_150109_2_, p_150109_3_, p_150109_4_) == this) {
|
||||
this.dropBlockAsItem(p_150109_1_, p_150109_2_, p_150109_3_, p_150109_4_, p_150109_1_.getBlockMetadata(p_150109_2_, p_150109_3_, p_150109_4_), 0);
|
||||
p_150109_1_.setBlockToAir(p_150109_2_, p_150109_3_, p_150109_4_);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, Vec3 p_149731_5_, Vec3 p_149731_6_)
|
||||
{
|
||||
float f = 0.15F;
|
||||
f = 0.1F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f);
|
||||
@Override
|
||||
public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, Vec3 p_149731_5_, Vec3 p_149731_6_) {
|
||||
float f = 0.15F;
|
||||
f = 0.1F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f);
|
||||
|
||||
return super.collisionRayTrace(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_, p_149731_5_, p_149731_6_);
|
||||
}
|
||||
|
||||
return super.collisionRayTrace(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_, p_149731_5_, p_149731_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
int i = ((TileEntityStructureMarker)world.getTileEntity(x, y, z)).type + 1;
|
||||
if(i > 2)
|
||||
i -= 3;
|
||||
if(world.isRemote) {
|
||||
int i = ((TileEntityStructureMarker) world.getTileEntity(x, y, z)).type + 1;
|
||||
if(i > 2) i -= 3;
|
||||
if(i == 0) player.addChatMessage(new ChatComponentText("[Structure Marker] Set template: Nuclear Reactor"));
|
||||
if(i == 1) player.addChatMessage(new ChatComponentText("[Structure Marker] Set template: Watz Power Plant"));
|
||||
if(i == 2) player.addChatMessage(new ChatComponentText("[Structure Marker] Set template: Fusionary Watz Plant"));
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
} else if(!player.isSneaking()) {
|
||||
if(world.getTileEntity(x, y, z) != null && world.getTileEntity(x, y, z) instanceof TileEntityStructureMarker) {
|
||||
((TileEntityStructureMarker)world.getTileEntity(x, y, z)).type ++;
|
||||
((TileEntityStructureMarker) world.getTileEntity(x, y, z)).type++;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@ -2,7 +2,8 @@ package com.hbm.blocks.machine.rbmk;
|
||||
|
||||
import com.hbm.blocks.generic.BlockGeneric;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable;
|
||||
|
||||
import api.hbm.fluid.IFluidConnectorBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -17,8 +18,8 @@ public class RBMKLoader extends BlockGeneric implements IFluidConnectorBlock {
|
||||
|
||||
@Override
|
||||
public boolean canConnect(FluidType type, IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
||||
if(type == Fluids.WATER) return dir == ForgeDirection.UP;
|
||||
return true;
|
||||
if(type.hasTrait(FT_Heatable.class)) return dir == ForgeDirection.DOWN;
|
||||
return type.hasTrait(FT_Coolable.class) && dir != ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@ public abstract class BlockCraneBase extends BlockContainer implements IBlockSid
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
|
||||
@ -14,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class FluidDuctBase extends BlockContainer implements IBlockFluidDuct {
|
||||
|
||||
protected FluidDuctBase(Material mat) {
|
||||
public FluidDuctBase(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
|
||||
148
src/main/java/com/hbm/blocks/network/FluidDuctGauge.java
Normal file
@ -0,0 +1,148 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, ILookOverlay, ITooltipProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlay;
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
||||
|
||||
public FluidDuctGauge() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityPipeGauge();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
this.blockIcon = reg.registerIcon(RefStrings.MODID + ":deco_steel");
|
||||
this.overlay = reg.registerIcon(RefStrings.MODID + ":fluid_duct_paintable_overlay");
|
||||
this.overlayGauge = reg.registerIcon(RefStrings.MODID + ":pipe_gauge");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0) {
|
||||
return blockIcon;
|
||||
}
|
||||
|
||||
return side == world.getBlockMetadata(x, y, z) ? this.overlayGauge : this.overlay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPasses() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityPipeBaseNT))
|
||||
return;
|
||||
|
||||
TileEntityPipeGauge duct = (TileEntityPipeGauge) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add(String.format("%,d", duct.deltaTick) + " mB/t");
|
||||
text.add(String.format("%,d", duct.deltaLastSecond) + " mB/s");
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return IBlockMultiPass.getRenderType();
|
||||
}
|
||||
|
||||
public static class TileEntityPipeGauge extends TileEntityPipeBaseNT implements INBTPacketReceiver {
|
||||
|
||||
private BigInteger lastMeasurement = BigInteger.valueOf(10);
|
||||
private long deltaTick = 0;
|
||||
private long deltaSecond = 0;
|
||||
private long deltaLastSecond = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
IPipeNet net = this.getPipeNet(this.getType());
|
||||
|
||||
if(net != null && this.getType() != Fluids.NONE) {
|
||||
BigInteger total = net.getTotalTransfer();
|
||||
BigInteger delta = total.subtract(this.lastMeasurement);
|
||||
this.lastMeasurement = total;
|
||||
|
||||
try {
|
||||
this.deltaTick = delta.longValueExact();
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
this.deltaLastSecond = this.deltaSecond;
|
||||
this.deltaSecond = 0;
|
||||
}
|
||||
this.deltaSecond += deltaTick;
|
||||
|
||||
} catch(Exception ex) { }
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("deltaT", deltaTick);
|
||||
data.setLong("deltaS", deltaLastSecond);
|
||||
INBTPacketReceiver.networkPack(this, data, 25);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.deltaTick = Math.max(nbt.getLong("deltaT"), 0);
|
||||
this.deltaLastSecond = Math.max(nbt.getLong("deltaS"), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
200
src/main/java/com/hbm/blocks/network/FluidDuctPaintable.java
Normal file
@ -0,0 +1,200 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlockMultiPass, ILookOverlay {
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlay;
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlayColor;
|
||||
|
||||
public FluidDuctPaintable() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityPipePaintable();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
this.blockIcon = reg.registerIcon(RefStrings.MODID + ":fluid_duct_paintable");
|
||||
this.overlay = reg.registerIcon(RefStrings.MODID + ":fluid_duct_paintable_overlay");
|
||||
this.overlayColor = reg.registerIcon(RefStrings.MODID + ":fluid_duct_paintable_color");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityPipePaintable) {
|
||||
TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
|
||||
|
||||
if(pipe.block != null) {
|
||||
if(RenderBlockMultipass.currentPass == 1) {
|
||||
return this.overlay;
|
||||
} else {
|
||||
return pipe.block.getIcon(side, pipe.meta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return RenderBlockMultipass.currentPass == 1 ? this.overlayColor : this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return 0xffffff;
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityPipePaintable) {
|
||||
TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
|
||||
|
||||
if(pipe.block == null) {
|
||||
return pipe.getType().getColor();
|
||||
}
|
||||
}
|
||||
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float fX, float fY, float fZ) {
|
||||
|
||||
ItemStack stack = player.getHeldItem();
|
||||
|
||||
if(stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
ItemBlock ib = (ItemBlock) stack.getItem();
|
||||
Block block = ib.field_150939_a;
|
||||
|
||||
if(block.renderAsNormalBlock() && block != this) {
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityPipePaintable) {
|
||||
TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
|
||||
|
||||
if(pipe.block == null) {
|
||||
pipe.block = block;
|
||||
pipe.meta = stack.getItemDamage() & 15;
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
pipe.markDirty();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.onBlockActivated(world, x, y, z, player, side, fX, fY, fZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
if(tool != ToolType.SCREWDRIVER) return false;
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityPipePaintable) {
|
||||
TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
|
||||
|
||||
if(pipe.block != null) {
|
||||
pipe.block = null;
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
pipe.markDirty();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPasses() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return IBlockMultiPass.getRenderType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityPipeBaseNT))
|
||||
return;
|
||||
|
||||
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
public static class TileEntityPipePaintable extends TileEntityPipeBaseNT {
|
||||
|
||||
private Block block;
|
||||
private int meta;
|
||||
private Block lastBlock;
|
||||
private int lastMeta;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(worldObj.isRemote && (lastBlock != block || lastMeta != meta)) {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
lastBlock = block;
|
||||
lastMeta = meta;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
int id = nbt.getInteger("block");
|
||||
this.block = id == 0 ? null : Block.getBlockById(id);
|
||||
this.meta = nbt.getInteger("meta");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
if(block != null) nbt.setInteger("block", Block.getIdFromBlock(block));
|
||||
nbt.setInteger("meta", meta);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4,9 +4,9 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumBriquetteType;
|
||||
import com.hbm.items.ItemEnums.EnumCokeType;
|
||||
import com.hbm.items.ItemEnums.EnumPlantType;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.special.ItemHot;
|
||||
|
||||
@ -59,14 +59,9 @@ public class SmeltingRecipes {
|
||||
GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_australium), new ItemStack(ModItems.nugget_australium), 2.5F);
|
||||
GameRegistry.addSmelting(ModItems.powder_australium, new ItemStack(ModItems.ingot_australium), 5.0F);
|
||||
|
||||
/* in-furnace coking didn't need to be removed since combination coking is already better in every way */
|
||||
//GameRegistry.addSmelting(ModItems.powder_coal, DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.coal_infernal, DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), 0.5F);
|
||||
GameRegistry.addSmelting(ModItems.briquette_lignite, DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE), DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK), DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL), DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.WOOD), DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL), DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE), DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), 1.0F);
|
||||
GameRegistry.addSmelting(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.WOOD), new ItemStack(Items.coal, 1, 1), 1.0F);
|
||||
|
||||
GameRegistry.addSmelting(ModItems.powder_lead, new ItemStack(ModItems.ingot_lead), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_neptunium, new ItemStack(ModItems.ingot_neptunium), 1.0F);
|
||||
|
||||
@ -31,13 +31,21 @@ public class FuelHandler implements IFuelHandler {
|
||||
if(fuel.getItem() == ModItems.powder_fire) return 6400;
|
||||
if(fuel.getItem() == ModItems.lignite) return 1200;
|
||||
if(fuel.getItem() == ModItems.powder_lignite) return 1200;
|
||||
if(fuel.getItem() == ModItems.briquette_lignite) return 1600;
|
||||
if(fuel.getItem() == ModItems.coke) return 3200;
|
||||
if(fuel.getItem() == ModItems.book_guide) return single;
|
||||
if(fuel.getItem() == ModItems.coal_infernal) return 4800;
|
||||
if(fuel.getItem() == ModItems.crystal_coal) return 6400;
|
||||
if(fuel.getItem() == ModItems.powder_sawdust) return single / 2;
|
||||
|
||||
if(fuel.getItem() == ModItems.briquette) {
|
||||
int meta = fuel.getItemDamage();
|
||||
switch(meta) {
|
||||
case 0: return single * 10;
|
||||
case 1: return single * 8;
|
||||
case 2: return single * 2;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
16
src/main/java/com/hbm/handler/nei/SawmillHandler.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.tileentity.machine.TileEntitySawmill;
|
||||
|
||||
public class SawmillHandler extends NEIUniversalHandler {
|
||||
|
||||
public SawmillHandler() {
|
||||
super("Sawmill", ModBlocks.machine_sawmill, TileEntitySawmill.getRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmSawmill";
|
||||
}
|
||||
}
|
||||
@ -8,6 +8,7 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.FluidType.ExtContainer;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -85,6 +86,8 @@ public class FluidContainerRegistry {
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.fluid_tank_full, 1, i), new ItemStack(ModItems.fluid_tank_empty), Fluids.fromID(i), 1000));
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.fluid_barrel_full, 1, i), new ItemStack(ModItems.fluid_barrel_empty), Fluids.fromID(i), 16000));
|
||||
}
|
||||
|
||||
Compat.registerCompatFluidContainers();
|
||||
}
|
||||
|
||||
public static void registerContainer(FluidContainer con) {
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.hazard.HazardEntry;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.items.ItemEnums.EnumBriquetteType;
|
||||
import com.hbm.items.ItemEnums.EnumCokeType;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -457,6 +458,10 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre(name, fromOne(coke, EnumCokeType.PETROLEUM));
|
||||
}
|
||||
|
||||
OreDictionary.registerOre("briquetteCoal", fromOne(briquette, EnumBriquetteType.COAL));
|
||||
OreDictionary.registerOre("briquetteLignite", fromOne(briquette, EnumBriquetteType.LIGNITE));
|
||||
OreDictionary.registerOre("briquetteWood", fromOne(briquette, EnumBriquetteType.WOOD));
|
||||
|
||||
OreDictionary.registerOre(getReflector(), neutron_reflector);
|
||||
OreDictionary.registerOre("oreRareEarth", ore_rare);
|
||||
OreDictionary.registerOre("oreRareEarth", ore_gneiss_rare);
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ItemEnums.EnumBriquetteType;
|
||||
import com.hbm.items.ItemEnums.EnumCokeType;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -26,20 +27,23 @@ public class CombinationRecipes {
|
||||
public static void register() {
|
||||
recipes.put(COAL.gem(), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), new FluidStack(Fluids.COALCREOSOTE, 100)));
|
||||
recipes.put(COAL.dust(), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), new FluidStack(Fluids.COALCREOSOTE, 100)));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), new FluidStack(Fluids.COALCREOSOTE, 150)));
|
||||
|
||||
|
||||
recipes.put(LIGNITE.gem(), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 50)));
|
||||
recipes.put(LIGNITE.dust(), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 50)));
|
||||
recipes.put(new ComparableStack(ModItems.briquette_lignite), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 100)));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 100)));
|
||||
|
||||
recipes.put(CINNABAR.crystal(), new Pair(new ItemStack(ModItems.sulfur), new FluidStack(Fluids.MERCURY, 100)));
|
||||
|
||||
recipes.put(KEY_LOG, new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 250)));
|
||||
recipes.put(KEY_SAPLING, new Pair(null, new FluidStack(Fluids.WOODOIL, 50)));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.WOOD)), new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 500)));
|
||||
|
||||
recipes.put(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), null));
|
||||
recipes.put(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), null));
|
||||
recipes.put(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), null));
|
||||
recipes.put(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.WOOD), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), null));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), null));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.PETROLEUM), null));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.COAL)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), null));
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.WOOD)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.COAL), null));
|
||||
|
||||
recipes.put(new ComparableStack(Items.reeds), new Pair(new ItemStack(Items.sugar, 2), new FluidStack(Fluids.ETHANOL, 50)));
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ public class MachineRecipes {
|
||||
fuels.add(new ItemStack(Items.blaze_powder));
|
||||
fuels.add(new ItemStack(ModItems.lignite));
|
||||
fuels.add(new ItemStack(ModItems.powder_lignite));
|
||||
fuels.add(new ItemStack(ModItems.briquette_lignite));
|
||||
fuels.add(new ItemStack(ModItems.briquette));
|
||||
fuels.add(new ItemStack(ModItems.coke));
|
||||
fuels.add(new ItemStack(ModItems.solid_fuel));
|
||||
fuels.add(new ItemStack(ModItems.powder_coal));
|
||||
|
||||
@ -7,6 +7,7 @@ import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ItemEnums.EnumBriquetteType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
@ -48,10 +49,13 @@ public class PressRecipes {
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(EMERALD.dust()), Items.emerald);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.pellet_coal), Items.diamond);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.biomass), ModItems.biomass_compressed);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_lignite), ModItems.briquette_lignite);
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(ANY_COKE.gem()), ModItems.ingot_graphite);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.meteorite_sword_reforged), ModItems.meteorite_sword_hardened);
|
||||
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_coal), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL));
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_lignite), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE));
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_sawdust), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.WOOD));
|
||||
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(IRON.ingot()), ModItems.plate_iron);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(GOLD.ingot()), ModItems.plate_gold);
|
||||
makeRecipe(StampType.PLATE, new OreDictStack(TI.ingot()), ModItems.plate_titanium);
|
||||
|
||||
@ -21,6 +21,12 @@ public class ItemEnums {
|
||||
WOOD
|
||||
}
|
||||
|
||||
public static enum EnumBriquetteType {
|
||||
COAL,
|
||||
LIGNITE,
|
||||
WOOD
|
||||
}
|
||||
|
||||
public static enum EnumLegendaryType {
|
||||
TIER1,
|
||||
TIER2,
|
||||
|
||||
@ -102,7 +102,7 @@ public class ModItems {
|
||||
public static Item coke;
|
||||
public static Item lignite;
|
||||
public static Item powder_lignite;
|
||||
public static Item briquette_lignite;
|
||||
public static Item briquette;
|
||||
public static Item coal_infernal;
|
||||
public static Item cinnebar;
|
||||
|
||||
@ -2824,7 +2824,7 @@ public class ModItems {
|
||||
rocket_fuel = new Item().setUnlocalizedName("rocket_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rocket_fuel");
|
||||
coke = new ItemEnumMulti(EnumCokeType.class, true, true).setUnlocalizedName("coke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coke");
|
||||
lignite = new Item().setUnlocalizedName("lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":lignite");
|
||||
briquette_lignite = new Item().setUnlocalizedName("briquette_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":briquette_lignite");
|
||||
briquette = new ItemEnumMulti(EnumBriquetteType.class, true, true).setUnlocalizedName("briquette").setCreativeTab(MainRegistry.partsTab);
|
||||
powder_lignite = new Item().setUnlocalizedName("powder_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lignite");
|
||||
coal_infernal = new Item().setUnlocalizedName("coal_infernal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coal_infernal");
|
||||
cinnebar = new Item().setUnlocalizedName("cinnebar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cinnebar");
|
||||
@ -5945,7 +5945,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(coke, coke.getUnlocalizedName());
|
||||
GameRegistry.registerItem(lignite, lignite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(coal_infernal, coal_infernal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(briquette_lignite, briquette_lignite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(briquette, briquette.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sulfur, sulfur.getUnlocalizedName());
|
||||
GameRegistry.registerItem(niter, niter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluorite, fluorite.getUnlocalizedName());
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4441)";
|
||||
public static final String VERSION = "1.0.27 BETA (4445)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -597,16 +597,18 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_neo, 8, 0), new Object[] { "SAS", " ", "SAS", 'S', STEEL.plate(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_neo, 8, 1), new Object[] { "IAI", " ", "IAI", 'I', IRON.plate(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_neo, 8, 2), new Object[] { "ASA", " ", "ASA", 'S', STEEL.plate(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_paintable, 8), new Object[] { "SAS", "A A", "SAS", 'S', STEEL.ingot(), 'A', AL.plate() });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_gauge), new Object[] { ModBlocks.fluid_duct_paintable, STEEL.ingot(), ModItems.circuit_aluminium });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct, 8), new Object[] { "SAS", " D ", "SAS", 'S', STEEL.plate(), 'A', AL.plate(), 'D', ModItems.ducttape });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_neo, 1, 0), new Object[] { ModBlocks.fluid_duct });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_solid, 8), new Object[] { "SAS", "A A", "SAS", 'S', STEEL.ingot(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_solid, 8), new Object[] { "SAS", "ADA", "SAS", 'S', STEEL.ingot(), 'A', AL.plate(), 'D', ModItems.ducttape });
|
||||
addRecipeAuto(new ItemStack(ModItems.template_folder, 1), new Object[] { "LPL", "BPB", "LPL", 'P', Items.paper, 'L', "dye", 'B', "dye" });
|
||||
addRecipeAuto(new ItemStack(ModItems.pellet_antimatter, 1), new Object[] { "###", "###", "###", '#', ModItems.cell_antimatter });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_tank_empty, 8), new Object[] { "121", "1G1", "121", '1', AL.plate(), '2', IRON.plate(), 'G', KEY_ANYPANE });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_tank_lead_empty, 4), new Object[] { "LUL", "LTL", "LUL", 'L', PB.plate(), 'U', U238.billet(), 'T', ModItems.fluid_tank_empty });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_barrel_empty, 2), new Object[] { "121", "1G1", "121", '1', STEEL.plate(), '2', AL.plate(), 'G', KEY_ANYPANE });
|
||||
addRecipeAuto(new ItemStack(ModItems.inf_water, 1), new Object[] { "222", "131", "222", '1', Items.water_bucket, '2', AL.plate(), '3', DIAMOND.gem() });
|
||||
addRecipeAuto(new ItemStack(ModItems.inf_water_mk2, 1), new Object[] { "BPB", "PTP", "BPB", 'B', ModItems.inf_water, 'P', ModBlocks.fluid_duct, 'T', ModItems.tank_steel });
|
||||
addRecipeAuto(new ItemStack(ModItems.inf_water_mk2, 1), new Object[] { "BPB", "PTP", "BPB", 'B', ModItems.inf_water, 'P', ModBlocks.fluid_duct_neo, 'T', ModItems.tank_steel });
|
||||
|
||||
//not so Temporary Crappy Recipes
|
||||
addRecipeAuto(new ItemStack(ModItems.piston_selenium, 1), new Object[] { "SSS", "STS", " D ", 'S', STEEL.plate(), 'T', W.ingot(), 'D', ModItems.bolt_dura_steel });
|
||||
@ -706,7 +708,6 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(Items.redstone, 1), new Object[] { ModItems.redstone_depleted, ModItems.redstone_depleted });
|
||||
|
||||
addRecipeAuto(new ItemStack(Blocks.torch, 3), new Object[] { "L", "S", 'L', LIGNITE.gem(), 'S', KEY_STICK });
|
||||
addRecipeAuto(new ItemStack(Blocks.torch, 6), new Object[] { "L", "S", 'L', ModItems.briquette_lignite, 'S', KEY_STICK });
|
||||
addRecipeAuto(new ItemStack(Blocks.torch, 8), new Object[] { "L", "S", 'L', ANY_COKE.gem(), 'S', KEY_STICK });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_missile_assembly, 1), new Object[] { "PWP", "SSS", "CCC", 'P', ModItems.pedestal_steel, 'W', ModItems.wrench, 'S', STEEL.plate(), 'C', ModBlocks.steel_scaffold });
|
||||
|
||||
@ -993,6 +993,7 @@ public class MainRegistry {
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
remapItems.put("hbm:item.man_explosive8", ModItems.explosive_lenses);
|
||||
remapItems.put("hbm:item.briquette_lignite", ModItems.briquette);
|
||||
|
||||
for(MissingMapping mapping : event.get()) {
|
||||
|
||||
|
||||
@ -32,9 +32,7 @@ import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.BobmazonOfferFactory;
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.handler.EntityEffectHandler;
|
||||
import com.hbm.hazard.HazardEntry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.handler.HTTPHandler;
|
||||
import com.hbm.handler.SiegeOrchestrator;
|
||||
|
||||
@ -51,7 +51,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
registerHandler(new CrucibleSmeltingHandler());
|
||||
registerHandler(new CrucibleAlloyingHandler());
|
||||
registerHandler(new CrucibleCastingHandler());
|
||||
registerHandler(new ChunkyHandler());
|
||||
|
||||
//universal boyes
|
||||
registerHandler(new ZirnoxRecipeHandler());
|
||||
@ -64,6 +63,9 @@ public class NEIConfig implements IConfigureNEI {
|
||||
registerHandler(new FractioningHandler());
|
||||
registerHandler(new BoilingHandler());
|
||||
registerHandler(new CombinationHandler());
|
||||
registerHandler(new SawmillHandler());
|
||||
|
||||
registerHandler(new ChunkyHandler());
|
||||
|
||||
//Some things are even beyond my control...or are they?
|
||||
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
|
||||
|
||||
@ -11,6 +11,8 @@ import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||
import com.hbm.blocks.network.CableDiode.TileEntityDiode;
|
||||
import com.hbm.blocks.network.FluidDuctGauge.TileEntityPipeGauge;
|
||||
import com.hbm.blocks.network.FluidDuctPaintable.TileEntityPipePaintable;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
@ -173,6 +175,8 @@ public class TileMappings {
|
||||
put(TileEntityDeaerator.class, "tileentity_deaerator");
|
||||
put(TileEntityCableBaseNT.class, "tileentity_ohgod");
|
||||
put(TileEntityPipeBaseNT.class, "tileentity_pipe_base");
|
||||
put(TileEntityPipePaintable.class, "tileentity_pipe_paintable");
|
||||
put(TileEntityPipeGauge.class, "tileentity_pipe_gauge");
|
||||
put(TileEntityWatz.class, "tileentity_watz");
|
||||
put(TileEntityMachineBAT9000.class, "tileentity_bat9000");
|
||||
put(TileEntityMachineOrbus.class, "tileentity_orbus");
|
||||
|
||||
@ -9,12 +9,10 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@ -43,15 +41,13 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
|
||||
this.updateConnections();
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
if(hasPower() && hasEnoughWater() && tanks[1].getMaxFill() > tanks[1].getFill()) {
|
||||
int convert = Math.min(tanks[1].getMaxFill(), tanks[0].getFill()) / 50;
|
||||
convert = Math.min(convert, tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - convert * 50); //dividing first, then multiplying, will remove any rounding issues
|
||||
tanks[1].setFill(tanks[1].getFill() + convert);
|
||||
power -= this.getMaxPower() / 20;
|
||||
}
|
||||
if(hasPower() && hasEnoughWater() && tanks[1].getMaxFill() > tanks[1].getFill()) {
|
||||
int convert = Math.min(tanks[1].getMaxFill(), tanks[0].getFill()) / 50;
|
||||
convert = Math.min(convert, tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - convert * 50); //dividing first, then multiplying, will remove any rounding issues
|
||||
tanks[1].setFill(tanks[1].getFill() + convert);
|
||||
power -= this.getMaxPower() / 20;
|
||||
}
|
||||
|
||||
this.subscribeToAllAround(tanks[0].getTankType(), this);
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -101,10 +100,13 @@ public class TileEntityDeuteriumTower extends TileEntityDeuteriumExtractor {
|
||||
return new DirPos[] {
|
||||
new DirPos(this.xCoord - dir.offsetX * 2, this.yCoord, this.zCoord - dir.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(this.xCoord - dir.offsetX * 2 + rot.offsetX, this.yCoord, this.zCoord - dir.offsetZ * 2 + rot.offsetZ, dir.getOpposite()),
|
||||
new DirPos(this.xCoord + dir.offsetX, this.yCoord, this.zCoord - dir.offsetZ, dir),
|
||||
new DirPos(this.xCoord + dir.offsetX + rot.offsetX, this.yCoord, this.zCoord - dir.offsetZ + rot.offsetZ, dir),
|
||||
|
||||
new DirPos(this.xCoord + dir.offsetX, this.yCoord, this.zCoord + dir.offsetZ, dir),
|
||||
new DirPos(this.xCoord + dir.offsetX + rot.offsetX, this.yCoord, this.zCoord + dir.offsetZ + rot.offsetZ, dir),
|
||||
|
||||
new DirPos(this.xCoord - rot.offsetX, this.yCoord, this.zCoord - rot.offsetZ, rot.getOpposite()),
|
||||
new DirPos(this.xCoord - dir.offsetX - rot.offsetX, this.yCoord, this.zCoord - dir.offsetZ - rot.offsetZ, rot.getOpposite()),
|
||||
|
||||
new DirPos(this.xCoord + rot.offsetX * 2, this.yCoord, this.zCoord + rot.offsetZ * 2, rot),
|
||||
new DirPos(this.xCoord - dir.offsetX + rot.offsetX * 2, this.yCoord, this.zCoord - dir.offsetZ + rot.offsetZ * 2, rot),
|
||||
};
|
||||
|
||||
@ -131,7 +131,7 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory,
|
||||
if(item == ModItems.lignite) return 150;
|
||||
if(item == ModItems.powder_lignite) return 150;
|
||||
if(item == ModItems.powder_coal) return 200;
|
||||
if(item == ModItems.briquette_lignite) return 200;
|
||||
if(item == ModItems.briquette) return 200;
|
||||
if(item == ModItems.coke) return 400;
|
||||
if(item == ModItems.solid_fuel) return 400;
|
||||
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.entity.projectile.EntitySawblade;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
@ -15,6 +17,7 @@ import api.hbm.tile.IHeatSource;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
@ -264,6 +267,18 @@ public class TileEntitySawmill extends TileEntityMachineBase {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
|
||||
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
|
||||
recipes.put(new OreDictStack("logWood"), new Object[] { new ItemStack(Blocks.planks, 6), ItemStackUtil.addTooltipToStack(new ItemStack(ModItems.powder_sawdust), "50%") });
|
||||
recipes.put(new OreDictStack("plankWood"), new Object[] { new ItemStack(Items.stick, 6), ItemStackUtil.addTooltipToStack(new ItemStack(ModItems.powder_sawdust), "10%") });
|
||||
recipes.put(new OreDictStack("stickWood"), new Object[] { new ItemStack(ModItems.powder_sawdust) });
|
||||
recipes.put(new OreDictStack("treeSapling"), new Object[] { new ItemStack(Items.stick, 1), ItemStackUtil.addTooltipToStack(new ItemStack(ModItems.powder_sawdust), "10%") });
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
|
||||
@ -130,6 +130,16 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
if(fill > 0 && send) {
|
||||
List<IFluidConnector> con = new ArrayList();
|
||||
con.addAll(consumers);
|
||||
|
||||
if(PipeNet.trackingInstances == null) {
|
||||
PipeNet.trackingInstances = new ArrayList();
|
||||
}
|
||||
|
||||
PipeNet.trackingInstances.clear();
|
||||
nets.forEach(x -> {
|
||||
if(x instanceof PipeNet) PipeNet.trackingInstances.add((PipeNet) x);
|
||||
});
|
||||
|
||||
fill = (int) PipeNet.fairTransfer(con, type, fill);
|
||||
}
|
||||
|
||||
|
||||
@ -38,8 +38,8 @@ public class RTTYSystem {
|
||||
channel.signal = lastSignal;
|
||||
|
||||
broadcast.put(identifier, channel);
|
||||
newMessages.clear();
|
||||
}
|
||||
newMessages.clear();
|
||||
}
|
||||
|
||||
public static class RTTYChannel {
|
||||
|
||||
@ -16,7 +16,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor {
|
||||
|
||||
private IPipeNet network;
|
||||
protected IPipeNet network;
|
||||
protected FluidType type = Fluids.NONE;
|
||||
protected FluidType lastType = Fluids.NONE;
|
||||
|
||||
|
||||
@ -6,6 +6,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.hbm.handler.HazmatRegistry;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.inventory.FluidContainer;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
@ -28,6 +31,7 @@ public class Compat {
|
||||
public static final String MOD_REC = "ReactorCraft";
|
||||
public static final String MOD_TIC = "TConstruct";
|
||||
public static final String MOD_RC = "Railcraft";
|
||||
public static final String MOD_TC = "tc";
|
||||
|
||||
public static Item tryLoadItem(String domain, String name) {
|
||||
return (Item) Item.itemRegistry.getObject(getReg(domain, name));
|
||||
@ -154,6 +158,15 @@ public class Compat {
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerCompatFluidContainers() {
|
||||
|
||||
if(Compat.isModLoaded(Compat.MOD_TC)) {
|
||||
Item canister = Compat.tryLoadItem(Compat.MOD_TC, "emptyCanister");
|
||||
Item diesel = Compat.tryLoadItem(Compat.MOD_TC, "diesel");
|
||||
if(diesel != null && canister != null) FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(diesel), new ItemStack(canister), Fluids.DIESEL, 1000));
|
||||
}
|
||||
}
|
||||
|
||||
public static void handleRailcraftNonsense() {
|
||||
|
||||
if(!Loader.isModLoaded(MOD_RC)) return;
|
||||
|
||||
@ -84,7 +84,7 @@ public class ItemStackUtil {
|
||||
* @param stack
|
||||
* @param lines
|
||||
*/
|
||||
public static void addTooltipToStack(ItemStack stack, String... lines) {
|
||||
public static ItemStack addTooltipToStack(ItemStack stack, String... lines) {
|
||||
|
||||
if(!stack.hasTagCompound())
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
@ -98,6 +98,8 @@ public class ItemStackUtil {
|
||||
|
||||
display.setTag("Lore", lore);
|
||||
stack.stackTagCompound.setTag("display", display);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public static void addStacksToNBT(ItemStack stack, ItemStack... stacks) {
|
||||
|
||||
@ -1164,7 +1164,9 @@ item.boy_kit.name=Little Boy Kit
|
||||
item.boy_propellant.name=Treibladung
|
||||
item.boy_shielding.name=Neutronenschild
|
||||
item.boy_target.name=Unterkritischer U235 Hohlkörper
|
||||
item.briquette_lignite.name=Braunkohlebrikett
|
||||
item.briquette.coal.name=Kohlebrikett
|
||||
item.briquette.lignite.name=Braunkohlebrikett
|
||||
item.briquette.wood.name=Holzbrikett
|
||||
item.bucket_acid.name=Säureeimer
|
||||
item.bucket_mud.name=Eimer mit giftigem Schlamm
|
||||
item.bucket_schrabidic_acid.name=Eimer mit Schrabidischer Säure
|
||||
@ -3518,8 +3520,11 @@ tile.flame_war.name=Flamewar aus der Box
|
||||
tile.float_bomb.name=Schwebebombe
|
||||
tile.fluid_duct.name=Universelles Flüssigkeitsrohr (Veraltet)
|
||||
tile.fluid_duct_box.name=Universelles Flüssigkeitsrohr (Boxrohr)
|
||||
tile.fluid_duct_gauge.name=Flussmessrohr
|
||||
tile.fluid_duct_gauge.desc=Rohr welches anzeight, wie viel Flüssigkeit$sich pro Tick im Netzwerk bewegt.$Geteilte Netzwerke die über Fässer oder Tanks$verbunden sind, werden als ein einzelnes gezählt.
|
||||
tile.fluid_duct_neo.name=Universelles Flüssigkeitsrohr
|
||||
tile.fluid_duct_solid.name=Geschirmtes universelles Flüssigkeitsrohr
|
||||
tile.fluid_duct_paintable.name=Geschirmtes universelles Flüssigkeitsrohr (Färbbar)
|
||||
tile.fluid_duct_solid.name=Geschirmtes universelles Flüssigkeitsrohr (Veraltet)
|
||||
tile.foam_layer.name=Schaumdecke
|
||||
tile.foundry_basin.name=Gussbecken
|
||||
tile.foundry_channel.name=Gusskanal
|
||||
|
||||
@ -1538,7 +1538,9 @@ item.boy_kit.name=Little Boy Kit
|
||||
item.boy_propellant.name=Propellant
|
||||
item.boy_shielding.name=Neutron Shielding
|
||||
item.boy_target.name=Subcritical U235 Target
|
||||
item.briquette_lignite.name=Lignite Briquette
|
||||
item.briquette.coal.name=Coal Briquette
|
||||
item.briquette.lignite.name=Lignite Briquette
|
||||
item.briquette.wood.name=Sawdust Briquette
|
||||
item.bucket_acid.name=Bucket of Acid
|
||||
item.bucket_mud.name=Bucket of Poisonous Mud
|
||||
item.bucket_schrabidic_acid.name=Bucket of Schrabidic Acid
|
||||
@ -4088,8 +4090,11 @@ tile.flame_war.name=Flame War in a Box
|
||||
tile.float_bomb.name=Levitation Bomb
|
||||
tile.fluid_duct.name=Universal Fluid Duct (Deprecated)
|
||||
tile.fluid_duct_box.name=Universal Fluid Duct (Boxduct)
|
||||
tile.fluid_duct_gauge.name=Flow Gauge Pipe
|
||||
tile.fluid_duct_gauge.desc=Pipe that displays how much fluid$moves within the network per tick.$Split networks connected by barrels$or tanks are considered as one shared network.
|
||||
tile.fluid_duct_neo.name=Universal Fluid Duct
|
||||
tile.fluid_duct_solid.name=Coated Universal Fluid Duct
|
||||
tile.fluid_duct_paintable.name=Paintable Coated Universal Fluid Duct
|
||||
tile.fluid_duct_solid.name=Coated Universal Fluid Duct (Deprecated)
|
||||
tile.foam_layer.name=Foam layer
|
||||
tile.foundry_basin.name=Foundry Basin
|
||||
tile.foundry_channel.name=Foundry Channel
|
||||
|
||||
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 181 B |
BIN
src/main/resources/assets/hbm/textures/blocks/pipe_gauge.png
Normal file
|
After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
src/main/resources/assets/hbm/textures/items/briquette.coal.png
Normal file
|
After Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 349 B |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4441",
|
||||
"version":"1.0.27_X4445",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||