an big slappy
@ -16,6 +16,7 @@
|
||||
* Standard, special, HE artillery shells and most missiles now use updated explosion animations
|
||||
* Decreased hardness of slag blocks
|
||||
* Removed legacy circuits
|
||||
* Removed a bunch of random unused items
|
||||
|
||||
## Fixed
|
||||
* Fixed crash caused by decontaminating items with the radiolysis machine
|
||||
@ -26,4 +27,6 @@
|
||||
* Fixed radiolysis recipes not showing up in NEI unless the usage recipes are loaded first
|
||||
* Fixed autocrafter's grid not properly updating when using NEI drag and drop for the filter
|
||||
* Fixed all carbon-based crucible materials having the wrong ID, this fix will shift IDs but prevent collisions with silicon
|
||||
* Fixed primary bedrock ore fraction roasing yielding one extra pile of crumbs
|
||||
* Fixed primary bedrock ore fraction roasing yielding one extra pile of crumbs
|
||||
* Fixed filing cabinets being unreasonably laggy due to the old packet code
|
||||
* Fixed the secure access door taking way longer to craft than any other door
|
||||
@ -763,8 +763,6 @@ public class ModBlocks {
|
||||
public static Block cable_detector;
|
||||
public static Block cable_diode;
|
||||
public static Block machine_detector;
|
||||
public static Block fluid_duct;
|
||||
public static Block fluid_duct_solid;
|
||||
public static Block fluid_duct_neo;
|
||||
public static Block fluid_duct_box;
|
||||
public static Block fluid_duct_paintable;
|
||||
@ -1881,8 +1879,6 @@ public class ModBlocks {
|
||||
cable_detector = new CableDetector(Material.iron).setBlockName("cable_detector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
cable_diode = new CableDiode(Material.iron).setBlockName("cable_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":cable_diode");
|
||||
machine_detector = new PowerDetector(Material.iron).setBlockName("machine_detector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_detector_off");
|
||||
fluid_duct = new BlockFluidDuct(Material.iron).setBlockName("fluid_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fluid_duct_icon");
|
||||
fluid_duct_solid = new BlockFluidDuctSolid(Material.iron).setBlockName("fluid_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fluid_duct_solid");
|
||||
fluid_duct_neo = new FluidDuctStandard(Material.iron).setBlockName("fluid_duct_neo").setStepSound(ModSoundTypes.pipe).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").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||
fluid_duct_exhaust = new FluidDuctBoxExhaust(Material.iron).setBlockName("fluid_duct_exhaust").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||
@ -3131,13 +3127,11 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(cable_detector, cable_detector.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(cable_diode, ItemBlockBase.class, cable_diode.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_detector, machine_detector.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct, fluid_duct.getUnlocalizedName());
|
||||
register(fluid_duct_neo);
|
||||
register(fluid_duct_box);
|
||||
register(fluid_duct_exhaust);
|
||||
register(fluid_duct_paintable);
|
||||
register(fluid_duct_gauge);
|
||||
GameRegistry.registerBlock(fluid_duct_solid, fluid_duct_solid.getUnlocalizedName());
|
||||
register(fluid_valve);
|
||||
register(fluid_switch);
|
||||
register(machine_drain);
|
||||
|
||||
@ -12,44 +12,38 @@ import com.hbm.tileentity.machine.storage.TileEntityMachinePuF6Tank;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachinePuF6Tank extends BlockContainer implements IMultiblock {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
public MachinePuF6Tank(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconregister) {
|
||||
@ -62,101 +56,41 @@ public class MachinePuF6Tank extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_puf6_tank);
|
||||
}
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_puf6_tank);
|
||||
}
|
||||
|
||||
@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, 2, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
|
||||
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.uf6Dimension)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.uf6Dimension, ModBlocks.dummy_block_puf6);
|
||||
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
if (!keepInventory)
|
||||
{
|
||||
TileEntityMachinePuF6Tank tileentityfurnace = (TileEntityMachinePuF6Tank)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if (tileentityfurnace != null)
|
||||
{
|
||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
||||
{
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while (itemstack.stackSize > 0)
|
||||
{
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if (j1 > itemstack.stackSize)
|
||||
{
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_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)
|
||||
{
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityMachinePuF6Tank entity = (TileEntityMachinePuF6Tank) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -12,44 +12,38 @@ import com.hbm.tileentity.machine.storage.TileEntityMachineUF6Tank;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineUF6Tank extends BlockContainer implements IMultiblock {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
public MachineUF6Tank(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconregister) {
|
||||
@ -62,101 +56,41 @@ public class MachineUF6Tank extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_uf6_tank);
|
||||
}
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_uf6_tank);
|
||||
}
|
||||
|
||||
@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, 2, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
|
||||
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.uf6Dimension)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.uf6Dimension, ModBlocks.dummy_block_uf6);
|
||||
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
if (!keepInventory)
|
||||
{
|
||||
TileEntityMachineUF6Tank tileentityfurnace = (TileEntityMachineUF6Tank)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if (tileentityfurnace != null)
|
||||
{
|
||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
||||
{
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while (itemstack.stackSize > 0)
|
||||
{
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if (j1 > itemstack.stackSize)
|
||||
{
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_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)
|
||||
{
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityMachineUF6Tank entity = (TileEntityMachineUF6Tank) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -1,103 +0,0 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class BlockFluidDuct extends BlockContainer implements ILookOverlay {
|
||||
|
||||
public BlockFluidDuct(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
float p = 1F/16F;
|
||||
this.setBlockBounds(11 * p / 2, 11 * p / 2, 11 * p / 2, 1 - 11 * p / 2, 1 - 11 * p / 2, 1 - 11 * p / 2);
|
||||
this.useNeighborBrightness = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
if(world.getTileEntity(x, y, z) instanceof TileEntityFluidDuct) {
|
||||
TileEntityFluidDuct cable = (TileEntityFluidDuct)world.getTileEntity(x, y, z);
|
||||
|
||||
if(cable != null)
|
||||
{
|
||||
float p = 1F/16F;
|
||||
float minX = 11 * p / 2 - (cable.connections[5] != null ? (11 * p / 2) : 0);
|
||||
float minY = 11 * p / 2 - (cable.connections[1] != null ? (11 * p / 2) : 0);
|
||||
float minZ = 11 * p / 2 - (cable.connections[2] != null ? (11 * p / 2) : 0);
|
||||
float maxX = 1 - 11 * p / 2 + (cable.connections[3] != null ? (11 * p / 2) : 0);
|
||||
float maxY = 1 - 11 * p / 2 + (cable.connections[0] != null ? (11 * p / 2) : 0);
|
||||
float maxZ = 1 - 11 * p / 2 + (cable.connections[4] != null ? (11 * p / 2) : 0);
|
||||
|
||||
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
}
|
||||
}
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
if(world.getTileEntity(x, y, z) instanceof TileEntityFluidDuct) {
|
||||
TileEntityFluidDuct cable = (TileEntityFluidDuct)world.getTileEntity(x, y, z);
|
||||
|
||||
if(cable != null)
|
||||
{
|
||||
float p = 1F/16F;
|
||||
float minX = 11 * p / 2 - (cable.connections[5] != null ? (11 * p / 2) : 0);
|
||||
float minY = 11 * p / 2 - (cable.connections[1] != null ? (11 * p / 2) : 0);
|
||||
float minZ = 11 * p / 2 - (cable.connections[2] != null ? (11 * p / 2) : 0);
|
||||
float maxX = 1 - 11 * p / 2 + (cable.connections[3] != null ? (11 * p / 2) : 0);
|
||||
float maxY = 1 - 11 * p / 2 + (cable.connections[0] != null ? (11 * p / 2) : 0);
|
||||
float maxZ = 1 - 11 * p / 2 + (cable.connections[4] != null ? (11 * p / 2) : 0);
|
||||
|
||||
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityFluidDuct();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityFluidDuctSimple))
|
||||
return;
|
||||
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -1,88 +0,0 @@
|
||||
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.render.block.RenderBlockMultipass;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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 BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPass, ILookOverlay {
|
||||
|
||||
public BlockFluidDuctSolid(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityFluidDuctSimple();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon overlay;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
this.blockIcon = p_149651_1_.registerIcon(this.getTextureName());
|
||||
this.overlay = p_149651_1_.registerIcon(this.getTextureName() + "_overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPasses() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return RenderBlockMultipass.currentPass == 0 ? this.blockIcon : this.overlay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return IBlockMultiPass.getRenderType();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return 0xffffff;
|
||||
|
||||
TileEntityFluidDuctSimple te = (TileEntityFluidDuctSimple) world.getTileEntity(x, y, z);
|
||||
|
||||
if(te != null) {
|
||||
return te.getType().getColor();
|
||||
}
|
||||
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityFluidDuctSimple))
|
||||
return;
|
||||
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -95,7 +95,6 @@ public class ToolRecipes {
|
||||
CraftingManager.addRecipeAuto(ItemToolAbilityFueled.getEmptyTool(ModItems.chainsaw), new Object[] { "CCH", "BBP", "CCE", 'H', STEEL.shell(), 'B', ModItems.blades_steel, 'P', ModItems.piston_selenium, 'C', ModBlocks.chain, 'E', ModItems.canister_empty });
|
||||
|
||||
//Misc
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', EUPH.ingot(), 'S', KEY_STICK });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.crowbar, 1), new Object[] { "II", " I", " I", 'I', STEEL.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bottle_opener, 1), new Object[] { "S", "P", 'S', STEEL.plate(), 'P', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(Items.saddle, 1), new Object[] { "LLL", "LRL", " S ", 'S', STEEL.ingot(), 'L', Items.leather, 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE) });
|
||||
@ -147,7 +146,7 @@ public class ToolRecipes {
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', AL.ingot(), 'I', IRON.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_tool), new Object[] { " A ", " IA", "I ", 'A', PB.ingot(), 'I', IRON.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', MINGRADE.wireFine(), 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', ModItems.battery_su });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', MINGRADE.wireFine(), 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', ModItems.battery_generic });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.analysis_tool), new Object[] { " G", " S ", "S ", 'G', KEY_ANYPANE, 'S', STEEL.ingot() });
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.kit_toolbox_empty), new Object[] { "CCC", "CIC", 'C', CU.plate(), 'I', IRON.ingot() });
|
||||
|
||||
@ -73,13 +73,11 @@ public class EntityMappings {
|
||||
addEntity(EntityMissileDrill.class, "entity_missile_drill", 1000);
|
||||
addEntity(EntityMissileMirv.class, "entity_missile_mirv", 1000);
|
||||
addEntity(EntityMIRV.class, "entity_mirvlet", 1000);
|
||||
addEntity(EntitySmokeFX.class, "entity_smoke_fx", 1000);
|
||||
addEntity(EntityGrenadeNuclear.class, "entity_grenade_nuclear", 1000);
|
||||
addEntity(EntityBSmokeFX.class, "entity_b_smoke_fx", 1000);
|
||||
addEntity(EntityGrenadePlasma.class, "entity_grenade_plasma", 500);
|
||||
addEntity(EntityGrenadeTau.class, "entity_grenade_tau", 500);
|
||||
addEntity(EntityChopperMine.class, "entity_chopper_mine", 1000);
|
||||
addEntity(EntityCombineBall.class, "entity_combine_ball", 1000);
|
||||
addEntity(EntityRainbow.class, "entity_rainbow", 1000);
|
||||
addEntity(EntityGrenadeLemon.class, "entity_grenade_lemon", 500);
|
||||
addEntity(EntityCloudFleija.class, "entity_cloud_fleija", 500);
|
||||
@ -96,8 +94,6 @@ public class EntityMappings {
|
||||
addEntity(EntityLaserBeam.class, "entity_laser_beam", 1000);
|
||||
addEntity(EntityMinerBeam.class, "entity_miner_beam", 1000);
|
||||
addEntity(EntityRubble.class, "entity_rubble", 1000);
|
||||
addEntity(EntityDSmokeFX.class, "entity_d_smoke_fx", 1000);
|
||||
addEntity(EntitySSmokeFX.class, "entity_s_smoke_fx", 1000);
|
||||
addEntity(EntityShrapnel.class, "entity_shrapnel", 1000);
|
||||
addEntity(EntityGrenadeShrapnel.class, "entity_grenade_shrapnel", 250);
|
||||
addEntity(EntityBlackHole.class, "entity_black_hole", 250);
|
||||
@ -109,7 +105,6 @@ public class EntityMappings {
|
||||
addEntity(EntitySparkBeam.class, "entity_spark_beam", 1000);
|
||||
addEntity(EntityMissileDoomsday.class, "entity_missile_doomsday", 1000);
|
||||
addEntity(EntityMissileDoomsdayRusted.class, "entity_missile_doomsday_rusted", 1000);
|
||||
addEntity(EntityTSmokeFX.class, "entity_t_smoke_fx", 1000);
|
||||
addEntity(EntityNukeExplosionMK3.class, "entity_nuke_mk3", 1000);
|
||||
addEntity(EntityVortex.class, "entity_vortex", 250);
|
||||
addEntity(EntityMeteor.class, "entity_meteor", 250);
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.entity.missile;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -41,8 +40,6 @@ public class EntityMIRV extends EntityThrowable {
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
}
|
||||
|
||||
protected void rotation() {
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.entity.particle;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityDSmokeFX extends EntityModFX {
|
||||
public EntityDSmokeFX(World world) {
|
||||
super(world, 0, 0, 0);
|
||||
}
|
||||
|
||||
public EntityDSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_,
|
||||
double p_i1225_10_, double p_i1225_12_) {
|
||||
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
|
||||
}
|
||||
|
||||
public EntityDSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_,
|
||||
double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) {
|
||||
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += p_i1226_8_;
|
||||
this.motionY += p_i1226_10_;
|
||||
this.motionZ += p_i1226_12_;
|
||||
this.particleRed = this.particleGreen = this.particleBlue = (float) (Math.random() * 0.30000001192092896D);
|
||||
this.particleScale *= 0.75F;
|
||||
this.particleScale *= p_i1226_14_;
|
||||
this.smokeParticleScale = this.particleScale;
|
||||
// this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
|
||||
// this.particleMaxAge = (int)((float)this.particleMaxAge *
|
||||
// p_i1226_14_);
|
||||
this.noClip = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (maxAge < 100) {
|
||||
maxAge = rand.nextInt(21) + 65;
|
||||
}
|
||||
|
||||
this.particleAge++;
|
||||
|
||||
if (this.particleAge >= maxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionX *= 0.7599999785423279D;
|
||||
this.motionY *= 0.7599999785423279D;
|
||||
this.motionZ *= 0.7599999785423279D;
|
||||
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
}
|
||||
}
|
||||
@ -1,80 +0,0 @@
|
||||
package com.hbm.entity.particle;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntitySSmokeFX extends EntityModFX
|
||||
{
|
||||
public EntitySSmokeFX(World world) {
|
||||
super(world, 0, 0, 0);
|
||||
}
|
||||
|
||||
public EntitySSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
|
||||
{
|
||||
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
|
||||
}
|
||||
|
||||
public EntitySSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
|
||||
{
|
||||
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += p_i1226_8_;
|
||||
this.motionY += p_i1226_10_;
|
||||
this.motionZ += p_i1226_12_;
|
||||
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
|
||||
this.particleScale *= 0.75F;
|
||||
this.particleScale *= p_i1226_14_;
|
||||
this.smokeParticleScale = this.particleScale;
|
||||
//this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
|
||||
//this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_);
|
||||
this.noClip = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if(maxAge < 25)
|
||||
{
|
||||
maxAge = rand.nextInt(6) + 25;
|
||||
}
|
||||
|
||||
this.particleAge++;
|
||||
|
||||
if (this.particleAge >= maxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionX *= 0.7599999785423279D;
|
||||
this.motionY *= 0.7599999785423279D;
|
||||
this.motionZ *= 0.7599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBrightnessForRender(float p_70070_1_)
|
||||
{
|
||||
return 15728880;
|
||||
}
|
||||
}
|
||||
@ -1,76 +0,0 @@
|
||||
package com.hbm.entity.particle;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntitySmokeFX extends EntityModFX
|
||||
{
|
||||
public EntitySmokeFX(World world) {
|
||||
super(world, 0, 0, 0);
|
||||
}
|
||||
|
||||
public EntitySmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
|
||||
{
|
||||
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
|
||||
}
|
||||
|
||||
public EntitySmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
|
||||
{
|
||||
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += p_i1226_8_;
|
||||
this.motionY += p_i1226_10_;
|
||||
this.motionZ += p_i1226_12_;
|
||||
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
|
||||
this.particleScale *= 0.75F;
|
||||
this.particleScale *= p_i1226_14_;
|
||||
this.smokeParticleScale = this.particleScale;
|
||||
//this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
|
||||
//this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_);
|
||||
this.noClip = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if(maxAge < 100)
|
||||
{
|
||||
maxAge = rand.nextInt(21) + 65;
|
||||
}
|
||||
|
||||
this.particleAge++;
|
||||
|
||||
if (this.particleAge >= maxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBrightnessForRender(float p_70070_1_)
|
||||
{
|
||||
return 15728880;
|
||||
}
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
package com.hbm.entity.particle;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityTSmokeFX extends EntityModFX
|
||||
{
|
||||
public EntityTSmokeFX(World world) {
|
||||
super(world, 0, 0, 0);
|
||||
}
|
||||
|
||||
public EntityTSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
|
||||
{
|
||||
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
|
||||
}
|
||||
|
||||
public EntityTSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
|
||||
{
|
||||
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += p_i1226_8_;
|
||||
this.motionY += p_i1226_10_;
|
||||
this.motionZ += p_i1226_12_;
|
||||
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
|
||||
this.particleScale *= 0.75F;
|
||||
this.particleScale *= p_i1226_14_;
|
||||
this.smokeParticleScale = this.particleScale;
|
||||
//this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
|
||||
//this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_);
|
||||
this.noClip = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if(maxAge < 25)
|
||||
{
|
||||
maxAge = rand.nextInt(6) + 25;
|
||||
}
|
||||
|
||||
this.particleAge++;
|
||||
|
||||
if (this.particleAge >= maxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionX *= 0.7599999785423279D;
|
||||
this.motionY *= 0.7599999785423279D;
|
||||
this.motionZ *= 0.7599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
}
|
||||
}
|
||||
@ -1,571 +0,0 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.play.server.S2BPacketChangeGameState;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityCombineBall extends Entity implements IProjectile
|
||||
{
|
||||
private int field_145791_d = -1;
|
||||
private int field_145792_e = -1;
|
||||
private int field_145789_f = -1;
|
||||
public double gravity = 0.0D;
|
||||
private Block field_145790_g;
|
||||
private int inData;
|
||||
private boolean inGround;
|
||||
/** 1 if the player can pick up the arrow */
|
||||
public int canBePickedUp;
|
||||
/** Seems to be some sort of timer for animating an arrow. */
|
||||
public int arrowShake;
|
||||
/** The owner of this arrow. */
|
||||
public Entity shootingEntity;
|
||||
private int ticksInGround;
|
||||
private int ticksInAir;
|
||||
private double damage = 2.0D;
|
||||
/** The amount of knockback an arrow applies when it hits a mob. */
|
||||
private int knockbackStrength;
|
||||
public EntityCombineBall(World p_i1753_1_)
|
||||
{
|
||||
super(p_i1753_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
}
|
||||
|
||||
public EntityCombineBall(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_)
|
||||
{
|
||||
super(p_i1754_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_);
|
||||
this.yOffset = 0.0F;
|
||||
}
|
||||
|
||||
public EntityCombineBall(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_)
|
||||
{
|
||||
super(p_i1755_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1755_2_;
|
||||
|
||||
if (p_i1755_2_ instanceof EntityPlayer)
|
||||
{
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D;
|
||||
double d0 = p_i1755_3_.posX - p_i1755_2_.posX;
|
||||
double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY;
|
||||
double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
|
||||
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
|
||||
|
||||
if (d3 >= 1.0E-7D)
|
||||
{
|
||||
float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
|
||||
float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI));
|
||||
double d4 = d0 / d3;
|
||||
double d5 = d2 / d3;
|
||||
this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3);
|
||||
this.yOffset = 0.0F;
|
||||
float f4 = (float)d3 * 0.2F;
|
||||
this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_);
|
||||
}
|
||||
}
|
||||
|
||||
public EntityCombineBall(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_)
|
||||
{
|
||||
super(p_i1756_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1756_2_;
|
||||
|
||||
if (p_i1756_2_ instanceof EntityPlayer)
|
||||
{
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch);
|
||||
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0F;
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||
}
|
||||
|
||||
public EntityCombineBall(World world, int x, int y, int z, double mx, double my, double mz, double grav) {
|
||||
super(world);
|
||||
this.posX = x + 0.5F;
|
||||
this.posY = y + 0.5F;
|
||||
this.posZ = z + 0.5F;
|
||||
|
||||
this.motionX = mx;
|
||||
this.motionY = my;
|
||||
this.motionZ = mz;
|
||||
|
||||
this.gravity = grav;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
|
||||
*/
|
||||
@Override
|
||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
|
||||
{
|
||||
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
|
||||
p_70186_1_ /= f2;
|
||||
p_70186_3_ /= f2;
|
||||
p_70186_5_ /= f2;
|
||||
p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_1_ *= p_70186_7_;
|
||||
p_70186_3_ *= p_70186_7_;
|
||||
p_70186_5_ *= p_70186_7_;
|
||||
this.motionX = p_70186_1_;
|
||||
this.motionY = p_70186_3_;
|
||||
this.motionZ = p_70186_5_;
|
||||
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
|
||||
* posY, posZ, yaw, pitch
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_)
|
||||
{
|
||||
this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
|
||||
this.setRotation(p_70056_7_, p_70056_8_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the velocity to the args. Args: x, y, z
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
|
||||
{
|
||||
this.motionX = p_70016_1_;
|
||||
this.motionY = p_70016_3_;
|
||||
this.motionZ = p_70016_5_;
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
//@Override
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
//this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
|
||||
Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
|
||||
if (block.getMaterial() != Material.air)
|
||||
{
|
||||
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
|
||||
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))
|
||||
{
|
||||
this.inGround = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.arrowShake > 0)
|
||||
{
|
||||
--this.arrowShake;
|
||||
}
|
||||
|
||||
if (this.inGround)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
else
|
||||
{
|
||||
++this.ticksInAir;
|
||||
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
|
||||
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
int i;
|
||||
float f1;
|
||||
|
||||
for (i = 0; i < list.size(); ++i)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(i);
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
|
||||
{
|
||||
f1 = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
|
||||
|
||||
if (movingobjectposition1 != null)
|
||||
{
|
||||
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
|
||||
|
||||
if (d1 < d0 || d0 == 0.0D)
|
||||
{
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit;
|
||||
|
||||
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
|
||||
{
|
||||
movingobjectposition = null;
|
||||
}
|
||||
}
|
||||
|
||||
float f2;
|
||||
float f4;
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
if (movingobjectposition.entityHit != null)
|
||||
{
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
int k = MathHelper.ceiling_double_int(f2 * this.damage);
|
||||
|
||||
if (this.getIsCritical())
|
||||
{
|
||||
k += this.rand.nextInt(k / 2 + 2);
|
||||
}
|
||||
|
||||
DamageSource damagesource = null;
|
||||
|
||||
if (this.shootingEntity == null)
|
||||
{
|
||||
damagesource = DamageSource.generic;
|
||||
}
|
||||
else
|
||||
{
|
||||
damagesource = ModDamageSource.causeCombineDamage(this, this);
|
||||
}
|
||||
|
||||
if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman))
|
||||
{
|
||||
movingobjectposition.entityHit.setFire(5);
|
||||
}
|
||||
|
||||
if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k))
|
||||
{
|
||||
if (movingobjectposition.entityHit instanceof EntityLivingBase)
|
||||
{
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit;
|
||||
|
||||
if (this.knockbackStrength > 0)
|
||||
{
|
||||
f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
|
||||
if (f4 > 0.0F)
|
||||
{
|
||||
movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase)
|
||||
{
|
||||
EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity);
|
||||
EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase);
|
||||
}
|
||||
|
||||
if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)
|
||||
{
|
||||
((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
|
||||
}
|
||||
}
|
||||
|
||||
if (!(movingobjectposition.entityHit instanceof EntityEnderman))
|
||||
{
|
||||
if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase)
|
||||
{
|
||||
movingobjectposition.entityHit.attackEntityFrom(damagesource, 1000F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_145791_d = movingobjectposition.blockX;
|
||||
this.field_145792_e = movingobjectposition.blockY;
|
||||
this.field_145789_f = movingobjectposition.blockZ;
|
||||
this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX));
|
||||
this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY));
|
||||
this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ));
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
this.posX -= this.motionX / f2 * 0.05000000074505806D;
|
||||
this.posY -= this.motionY / f2 * 0.05000000074505806D;
|
||||
this.posZ -= this.motionZ / f2 * 0.05000000074505806D;
|
||||
this.inGround = true;
|
||||
this.arrowShake = 7;
|
||||
this.setIsCritical(false);
|
||||
|
||||
if (this.field_145790_g.getMaterial() != Material.air)
|
||||
{
|
||||
this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
float f3 = 0.99F;
|
||||
f1 = 0.05F;
|
||||
|
||||
if (this.isInWater())
|
||||
{
|
||||
for (int l = 0; l < 4; ++l)
|
||||
{
|
||||
f4 = 0.25F;
|
||||
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ);
|
||||
}
|
||||
|
||||
f3 = 0.8F;
|
||||
}
|
||||
|
||||
if (this.isWet())
|
||||
{
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
this.motionX *= f3;
|
||||
this.motionY *= f3;
|
||||
this.motionZ *= f3;
|
||||
this.motionY -= gravity;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.func_145775_I();
|
||||
}
|
||||
|
||||
if (this.ticksExisted > 250)
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
||||
{
|
||||
p_70014_1_.setShort("xTile", (short)this.field_145791_d);
|
||||
p_70014_1_.setShort("yTile", (short)this.field_145792_e);
|
||||
p_70014_1_.setShort("zTile", (short)this.field_145789_f);
|
||||
p_70014_1_.setShort("life", (short)this.ticksInGround);
|
||||
p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g));
|
||||
p_70014_1_.setByte("inData", (byte)this.inData);
|
||||
p_70014_1_.setByte("shake", (byte)this.arrowShake);
|
||||
p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0));
|
||||
p_70014_1_.setByte("pickup", (byte)this.canBePickedUp);
|
||||
p_70014_1_.setDouble("damage", this.damage);
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
||||
{
|
||||
this.field_145791_d = p_70037_1_.getShort("xTile");
|
||||
this.field_145792_e = p_70037_1_.getShort("yTile");
|
||||
this.field_145789_f = p_70037_1_.getShort("zTile");
|
||||
this.ticksInGround = p_70037_1_.getShort("life");
|
||||
this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
|
||||
this.inData = p_70037_1_.getByte("inData") & 255;
|
||||
this.arrowShake = p_70037_1_.getByte("shake") & 255;
|
||||
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
||||
|
||||
if (p_70037_1_.hasKey("damage", 99))
|
||||
{
|
||||
this.damage = p_70037_1_.getDouble("damage");
|
||||
}
|
||||
|
||||
if (p_70037_1_.hasKey("pickup", 99))
|
||||
{
|
||||
this.canBePickedUp = p_70037_1_.getByte("pickup");
|
||||
}
|
||||
else if (p_70037_1_.hasKey("player", 99))
|
||||
{
|
||||
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by a player entity when they collide with an entity
|
||||
*/
|
||||
@Override
|
||||
public void onCollideWithPlayer(EntityPlayer p_70100_1_)
|
||||
{
|
||||
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
|
||||
{
|
||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
p_70100_1_.onItemPickup(this, 1);
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
|
||||
* prevent them from trampling crops
|
||||
*/
|
||||
@Override
|
||||
protected boolean canTriggerWalking()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public void setDamage(double p_70239_1_)
|
||||
{
|
||||
this.damage = p_70239_1_;
|
||||
}
|
||||
|
||||
public double getDamage()
|
||||
{
|
||||
return this.damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the amount of knockback the arrow applies when it hits a mob.
|
||||
*/
|
||||
public void setKnockbackStrength(int p_70240_1_)
|
||||
{
|
||||
this.knockbackStrength = p_70240_1_;
|
||||
}
|
||||
|
||||
/**
|
||||
* If returns false, the item will not inflict any damage against entities.
|
||||
*/
|
||||
@Override
|
||||
public boolean canAttackWithItem()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public void setIsCritical(boolean p_70243_1_)
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
|
||||
if (p_70243_1_)
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public boolean getIsCritical()
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
return (b0 & 1) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBrightnessForRender(float p_70070_1_)
|
||||
{
|
||||
return 15728880;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness(float p_70013_1_)
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.entity.particle.EntityTSmokeFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
@ -448,16 +447,6 @@ public class EntityRocketHoming extends Entity implements IProjectile
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
//for (i = 0; i < 4; ++i)
|
||||
{
|
||||
//this.worldObj.spawnParticle("cloud", this.posX, this.posY, this.posZ, /*0, 0, 0 this.posX + this.motionX * (double)i / 4.0D, this.posY + this.motionY * (double)i / 4.0D, this.posZ + this.motionZ * (double)i / 4.0D,*/ -this.motionX/4, -this.motionY/4, -this.motionZ/4);
|
||||
if(!worldObj.isRemote && this.ticksExisted > 1)
|
||||
this.worldObj.spawnEntityInWorld(new EntityTSmokeFX(worldObj, this.posX, this.posY, this.posZ, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
@Deprecated
|
||||
public interface IFluidAcceptor extends IFluidContainer {
|
||||
|
||||
@Deprecated int getMaxFluidFill(FluidType type);
|
||||
|
||||
@Deprecated
|
||||
public default void setFluidFillForReceive(int fill, FluidType type) {
|
||||
this.setFluidFill(fill, type);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public default int getFluidFillForReceive(FluidType type) {
|
||||
return this.getFluidFill(type);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public default int getMaxFluidFillForReceive(FluidType type) {
|
||||
return this.getMaxFluidFill(type);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public default void receiveFluid(int amount, FluidType type) {
|
||||
this.setFluidFill(this.getFluidFill(type) + amount, type);
|
||||
}
|
||||
}
|
||||
@ -2,19 +2,12 @@ package com.hbm.interfaces;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated //legacy crap we can't get rid of because some ancient machines still use this for sync
|
||||
public interface IFluidContainer {
|
||||
|
||||
//Args: fill, what the fill should be set to; index, index for array if there are multiple tanks
|
||||
public void setFillForSync(int fill, int index);
|
||||
|
||||
//Args: fill: what the fill should be set to; type, what type the tank in question has
|
||||
void setFluidFill(int fill, FluidType type);
|
||||
|
||||
//Args: type, what the type should be set to; index, index for array if there are multiple tanks
|
||||
public void setTypeForSync(FluidType type, int index);
|
||||
|
||||
//Args: type, what type the tank in question has
|
||||
int getFluidFill(FluidType type);
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
public interface IFluidDuct {
|
||||
|
||||
public FluidType getType();
|
||||
public boolean setType(FluidType type);
|
||||
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
@Deprecated
|
||||
public interface IFluidSource extends IFluidContainer {
|
||||
|
||||
@Deprecated void fillFluidInit(FluidType type);
|
||||
|
||||
@Deprecated void fillFluid(int x, int y, int z, boolean newTact, FluidType type);
|
||||
|
||||
@Deprecated boolean getTact();
|
||||
@Deprecated List<IFluidAcceptor> getFluidList(FluidType type);
|
||||
@Deprecated void clearFluidList(FluidType type);
|
||||
|
||||
@Deprecated
|
||||
public default void setFluidFillForTransfer(int fill, FluidType type) {
|
||||
this.setFluidFill(fill, type);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public default int getFluidFillForTransfer(FluidType type) {
|
||||
return this.getFluidFill(type);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public default void transferFluid(int amount, FluidType type) {
|
||||
this.setFluidFillForTransfer(this.getFluidFillForTransfer(type) - amount, type);
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public interface IGasAcceptor {
|
||||
|
||||
void setGasFill(int i);
|
||||
|
||||
int getGasFill();
|
||||
|
||||
int getMaxGasFill();
|
||||
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public interface IGasDuct {
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IGasSource {
|
||||
|
||||
void fillGasInit();
|
||||
|
||||
void fillGas(int x, int y, int z, boolean newTact);
|
||||
|
||||
boolean getTact();
|
||||
int getGasFill();
|
||||
void setGasFill(int i);
|
||||
List<IGasAcceptor> getGasList();
|
||||
void clearGasList();
|
||||
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public interface IOilAcceptor {
|
||||
|
||||
void setFill(int i);
|
||||
|
||||
int getFill();
|
||||
|
||||
int getMaxFill();
|
||||
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public interface IOilDuct {
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IOilSource {
|
||||
|
||||
void fillInit();
|
||||
|
||||
void fill(int x, int y, int z, boolean newTact);
|
||||
|
||||
boolean getTact();
|
||||
int getSFill();
|
||||
void setSFill(int i);
|
||||
List<IOilAcceptor> getList();
|
||||
void clearList();
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IReactor {
|
||||
|
||||
boolean isStructureValid(World world);
|
||||
|
||||
boolean isCoatingValid(World world);
|
||||
|
||||
boolean hasFuse();
|
||||
|
||||
int getWaterScaled(int i);
|
||||
|
||||
int getCoolantScaled(int i);
|
||||
|
||||
long getPowerScaled(long i);
|
||||
|
||||
int getHeatScaled(int i);
|
||||
|
||||
}
|
||||
@ -1,85 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotTakeOnly;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachinePuF6Tank;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerPuF6Tank extends Container {
|
||||
|
||||
private TileEntityMachinePuF6Tank testNuke;
|
||||
|
||||
public ContainerPuF6Tank(InventoryPlayer invPlayer, TileEntityMachinePuF6Tank tedf) {
|
||||
testNuke = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 1, 44, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 3, 116, 53));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return testNuke.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,85 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotTakeOnly;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineUF6Tank;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerUF6Tank extends Container {
|
||||
|
||||
private TileEntityMachineUF6Tank testNuke;
|
||||
|
||||
public ContainerUF6Tank(InventoryPlayer invPlayer, TileEntityMachineUF6Tank tedf) {
|
||||
testNuke = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 1, 44, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 3, 116, 53));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return testNuke.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPuF6Tank;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachinePuF6Tank;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachinePuF6Tank extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/puf6Tank.png");
|
||||
private TileEntityMachinePuF6Tank tank;
|
||||
|
||||
public GUIMachinePuF6Tank(InventoryPlayer invPlayer, TileEntityMachinePuF6Tank tedf) {
|
||||
super(new ContainerPuF6Tank(invPlayer, tedf));
|
||||
tank = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
tank.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.tank.hasCustomInventoryName() ? this.tank.getInventoryName() : I18n.format(this.tank.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
tank.tank.renderTank(guiLeft + 80, guiTop + 69, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerUF6Tank;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineUF6Tank;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineUF6Tank extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/uf6Tank.png");
|
||||
private TileEntityMachineUF6Tank tank;
|
||||
|
||||
public GUIMachineUF6Tank(InventoryPlayer invPlayer, TileEntityMachineUF6Tank tedf) {
|
||||
super(new ContainerUF6Tank(invPlayer, tedf));
|
||||
tank = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
tank.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.tank.hasCustomInventoryName() ? this.tank.getInventoryName() : I18n.format(this.tank.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
tank.tank.renderTank(guiLeft + 80, guiTop + 69, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -47,24 +47,24 @@ public class Mats {
|
||||
public static final int _ES = 20_000;
|
||||
|
||||
//Vanilla and vanilla-like
|
||||
public static final NTMMaterial MAT_STONE = makeSmeltable(_VS + 00, df("Stone"), 0x7F7F7F, 0x353535, 0x4D2F23).n();
|
||||
public static final NTMMaterial MAT_CARBON = makeAdditive( 699, CARBON, 0x363636, 0x030303, 0x404040).setShapes(WIRE, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_COAL = makeNonSmeltable(600, COAL, 0x363636, 0x030303, 0x404040).setConversion(MAT_CARBON, 2, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_LIGNITE = makeNonSmeltable(601, LIGNITE, 0x542D0F, 0x261508, 0x472913).setConversion(MAT_CARBON, 3, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_COALCOKE = make( 610, COALCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_PETCOKE = make( 611, PETCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_LIGCOKE = make( 612, LIGCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_GRAPHITE = make( 620, GRAPHITE) .setConversion(MAT_CARBON, 1, 1).n();
|
||||
public static final NTMMaterial MAT_DIAMOND = makeNonSmeltable(1430, DIAMOND, 0xFFFFFF, 0x1B7B6B, 0x8CF4E2).setConversion(MAT_CARBON, 1, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setShapes(FRAGMENT, INGOT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(FRAGMENT, WIRE, NUGGET, INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_OBSIDIAN = makeSmeltable(_VS + 02, df("Obsidian"), 0x3D234D).n();
|
||||
public static final NTMMaterial MAT_HEMATITE = makeAdditive( 2601, HEMATITE, 0xDFB7AE, 0x5F372E, 0x6E463D).m();
|
||||
public static final NTMMaterial MAT_STONE = makeSmeltable(_VS + 00, df("Stone"), 0x7F7F7F, 0x353535, 0x4D2F23).n();
|
||||
public static final NTMMaterial MAT_CARBON = makeAdditive( 699, CARBON, 0x363636, 0x030303, 0x404040).setShapes(WIRE, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_COAL = makeNonSmeltable(600, COAL, 0x363636, 0x030303, 0x404040).setConversion(MAT_CARBON, 2, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_LIGNITE = makeNonSmeltable(601, LIGNITE, 0x542D0F, 0x261508, 0x472913).setConversion(MAT_CARBON, 3, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_COALCOKE = make( 610, COALCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_PETCOKE = make( 611, PETCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_LIGCOKE = make( 612, LIGCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_GRAPHITE = make( 620, GRAPHITE) .setConversion(MAT_CARBON, 1, 1).n();
|
||||
public static final NTMMaterial MAT_DIAMOND = makeNonSmeltable(1430, DIAMOND, 0xFFFFFF, 0x1B7B6B, 0x8CF4E2).setConversion(MAT_CARBON, 1, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setShapes(FRAGMENT, INGOT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(FRAGMENT, WIRE, NUGGET, INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_OBSIDIAN = makeSmeltable(_VS + 02, df("Obsidian"), 0x3D234D).n();
|
||||
public static final NTMMaterial MAT_HEMATITE = makeAdditive( 2601, HEMATITE, 0xDFB7AE, 0x5F372E, 0x6E463D).m();
|
||||
public static final NTMMaterial MAT_WROUGHTIRON = makeSmeltable(2602, df("WroughtIron"), 0xFAAB89).m();
|
||||
public static final NTMMaterial MAT_PIGIRON = makeSmeltable(2603, df("PigIron"), 0xFF8B59).m();
|
||||
public static final NTMMaterial MAT_METEORICIRON = makeSmeltable(2604, df("MeteoricIron"), 0x715347).m();
|
||||
public static final NTMMaterial MAT_MALACHITE = makeAdditive( 2901, MALACHITE, 0xA2F0C8, 0x227048, 0x61AF87).m();
|
||||
public static final NTMMaterial MAT_MALACHITE = makeAdditive( 2901, MALACHITE, 0xA2F0C8, 0x227048, 0x61AF87).m();
|
||||
|
||||
//Radioactive
|
||||
public static final NTMMaterial MAT_URANIUM = makeSmeltable(9200, U, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
@ -78,17 +78,17 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_PU239 = makeSmeltable(9439, PU239, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU240 = makeSmeltable(9440, PU240, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU241 = makeSmeltable(9441, PU241, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGA = makeSmeltable(9501, AMRG, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM241 = makeSmeltable(9541, AM241, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM242 = makeSmeltable(9542, AM242, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEPTUNIUM = makeSmeltable(9337, NP237, 0x647064).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGA = makeSmeltable(9501, AMRG, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM241 = makeSmeltable(9541, AM241, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM242 = makeSmeltable(9542, AM242, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEPTUNIUM = makeSmeltable(9337, NP237, 0xA6B2A6, 0x030F03, 0x647064).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_POLONIUM = makeSmeltable(8410, PO210, 0x968779, 0x3D1509, 0x715E4A).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_TECHNETIUM = makeSmeltable(4399, TC99, 0xFAFFFF, 0x576C6C, 0xCADFDF).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RADIUM = makeSmeltable(8826, RA226, 0xE9FAF6).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ACTINIUM = makeSmeltable(8927, AC227, 0x958989).setShapes(NUGGET, BILLET, INGOT).m();
|
||||
public static final NTMMaterial MAT_RADIUM = makeSmeltable(8826, RA226, 0xFCFCFC, 0xADBFBA, 0xE9FAF6).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ACTINIUM = makeSmeltable(8927, AC227, 0xECE0E0, 0x221616, 0x958989).setShapes(NUGGET, BILLET, INGOT).m();
|
||||
public static final NTMMaterial MAT_CO60 = makeSmeltable(2760, CO60, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_AU198 = makeSmeltable(7998, AU198, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_PB209 = makeSmeltable(8209, PB209, 0x7B535D).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_PB209 = makeSmeltable(8209, PB209, 0xB38A94, 0x12020E, 0x7B535D).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_SCHRABIDIUM = makeSmeltable(12626, SA326, 0x32FFFF, 0x005C5C, 0x32FFFF).setShapes(NUGGET, WIRE, BILLET, INGOT, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SOLINIUM = makeSmeltable(12627, SA327, 0xA2E6E0, 0x00433D, 0x72B6B0).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SCHRABIDATE = makeSmeltable(12600, SBD, 0x77C0D7, 0x39005E, 0x6589B4).setShapes(INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
@ -96,39 +96,39 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_GHIORSIUM = makeSmeltable(12836, GH336, 0xF4EFE1, 0x2A3306, 0xC6C6A1).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
|
||||
//Base metals
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0xF7F3F2, 0x4F4C4B, 0xA99E79).setShapes(FRAGMENT, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xFDCA88, 0x601E0D, 0xC18336).setShapes(FRAGMENT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(FRAGMENT, WIRE, BOLT, INGOT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(FRAGMENT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setShapes(FRAGMENT, NUGGET, WIRE, INGOT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF ).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ARSENIC = makeSmeltable(3300, AS, 0x6CBABA, 0x242525, 0x558080).setShapes(NUGGET, INGOT).m();
|
||||
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setShapes(NUGGET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEODYMIUM = makeSmeltable(6000, ND, 0xE6E6B6, 0x1C1C00, 0x8F8F5F).setShapes(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setShapes(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BERYLLIUM = makeSmeltable(400, BE, 0xB2B2A6, 0x0F0F03, 0xAE9572).setShapes(FRAGMENT, NUGGET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_EMERALD = make( 401, EMERALD) .setConversion(MAT_BERYLLIUM, 4, 3).n();
|
||||
public static final NTMMaterial MAT_COBALT = makeSmeltable(2700, CO, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(FRAGMENT, NUGGET, DUSTTINY, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(FRAGMENT, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORAX = makeSmeltable(501, BORAX, 0xFFFFFF, 0x946E23, 0xFFECC6).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_LANTHANIUM = makeSmeltable(5700, LA, 0xC8E0E0, 0x3B5353, 0xA1B9B9).setShapes(FRAGMENT, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ZIRCONIUM = makeSmeltable(4000, ZR, 0xE3DCBE, 0x3E3719, 0xADA688).setShapes(FRAGMENT, NUGGET, WIRE, DUSTTINY, BILLET, INGOT, DUST, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SODIUM = makeSmeltable(1100, NA, 0xD3BF9E, 0x3A5A6B, 0x7E9493).setShapes(FRAGMENT, DUST).m();
|
||||
public static final NTMMaterial MAT_SODALITE = makeNonSmeltable(1101, SODALITE, 0xDCE5F6, 0x4927B4, 0x96A7E6).setShapes(FRAGMENT, GEM).n();
|
||||
public static final NTMMaterial MAT_STRONTIUM = makeSmeltable(3800, SR, 0xF1E8BA, 0x271E00, 0xCAC193).setShapes(FRAGMENT, DUST).m();
|
||||
public static final NTMMaterial MAT_CALCIUM = makeSmeltable(2000, CA, 0xCFCFA6, 0x747F6E, 0xB7B784).setShapes(INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_LITHIUM = makeSmeltable(300, LI, 0xFFFFFF, 0x818181, 0xD6D6D6).setShapes(FRAGMENT, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SULFUR = makeNonSmeltable(1600, S, 0xFCEE80, 0xBDA022, 0xF1DF68).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_KNO = makeNonSmeltable(700, KNO, 0xD4D4D4, 0x969696, 0xC9C9C9).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_FLUORITE = makeNonSmeltable(900, F, 0xFFFFFF, 0xB0A192, 0xE1DBD4).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_PHOSPHORUS = makeNonSmeltable(1500, P_RED, 0xCB0213, 0x600006, 0xBA0615).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_CHLOROCALCITE = makeNonSmeltable(1701, CHLOROCALCITE, 0xF7E761, 0x475B46, 0xB8B963).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_MOLYSITE = makeNonSmeltable(1702, MOLYSITE, 0xF9E97B, 0x216E00, 0xD0D264).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_CINNABAR = makeNonSmeltable(8001, CINNABAR, 0xD87070, 0x993030, 0xBF4E4E).setShapes(FRAGMENT, GEM).n();
|
||||
public static final NTMMaterial MAT_CADMIUM = makeSmeltable(4800, CD, 0xFFFADE, 0x350000, 0xA85600).setShapes(INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_SILICON = makeSmeltable(1400, SI, 0xD1D7DF, 0x1A1A3D, 0x878B9E).setShapes(FRAGMENT, NUGGET, BILLET, INGOT).m();
|
||||
public static final NTMMaterial MAT_ASBESTOS = makeSmeltable(1401, ASBESTOS, 0xD8D9CF, 0x616258, 0xB0B3A8).setShapes(FRAGMENT, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, INGOT, CASTPLATE, WELDEDPLATE).m();
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0xF7F3F2, 0x4F4C4B, 0xA99E79).setShapes(FRAGMENT, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xFDCA88, 0x601E0D, 0xC18336).setShapes(FRAGMENT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(FRAGMENT, WIRE, BOLT, INGOT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(FRAGMENT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setShapes(FRAGMENT, NUGGET, WIRE, INGOT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF, 0xB200FF, 0xB200FF).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ARSENIC = makeSmeltable(3300, AS, 0x6CBABA, 0x242525, 0x558080).setShapes(NUGGET, INGOT).m();
|
||||
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setShapes(NUGGET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEODYMIUM = makeSmeltable(6000, ND, 0xE6E6B6, 0x1C1C00, 0x8F8F5F).setShapes(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setShapes(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BERYLLIUM = makeSmeltable(400, BE, 0xB2B2A6, 0x0F0F03, 0xAE9572).setShapes(FRAGMENT, NUGGET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_EMERALD = makeNonSmeltable(401, EMERALD, 0xBAFFD4, 0x003900, 0x17DD62).setConversion(MAT_BERYLLIUM, 4, 3).setShapes(FRAGMENT, DUST, GEM, BLOCK).n();
|
||||
public static final NTMMaterial MAT_COBALT = makeSmeltable(2700, CO, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(FRAGMENT, NUGGET, DUSTTINY, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(FRAGMENT, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORAX = makeSmeltable(501, BORAX, 0xFFFFFF, 0x946E23, 0xFFECC6).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_LANTHANIUM = makeSmeltable(5700, LA, 0xC8E0E0, 0x3B5353, 0xA1B9B9).setShapes(FRAGMENT, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ZIRCONIUM = makeSmeltable(4000, ZR, 0xE3DCBE, 0x3E3719, 0xADA688).setShapes(FRAGMENT, NUGGET, WIRE, DUSTTINY, BILLET, INGOT, DUST, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SODIUM = makeSmeltable(1100, NA, 0xD3BF9E, 0x3A5A6B, 0x7E9493).setShapes(FRAGMENT, DUST).m();
|
||||
public static final NTMMaterial MAT_SODALITE = makeNonSmeltable(1101, SODALITE, 0xDCE5F6, 0x4927B4, 0x96A7E6).setShapes(FRAGMENT, GEM).n();
|
||||
public static final NTMMaterial MAT_STRONTIUM = makeSmeltable(3800, SR, 0xF1E8BA, 0x271E00, 0xCAC193).setShapes(FRAGMENT, DUST).m();
|
||||
public static final NTMMaterial MAT_CALCIUM = makeSmeltable(2000, CA, 0xCFCFA6, 0x747F6E, 0xB7B784).setShapes(INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_LITHIUM = makeSmeltable(300, LI, 0xFFFFFF, 0x818181, 0xD6D6D6).setShapes(FRAGMENT, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SULFUR = makeNonSmeltable(1600, S, 0xFCEE80, 0xBDA022, 0xF1DF68).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_KNO = makeNonSmeltable(700, KNO, 0xD4D4D4, 0x969696, 0xC9C9C9).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_FLUORITE = makeNonSmeltable(900, F, 0xFFFFFF, 0xB0A192, 0xE1DBD4).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_PHOSPHORUS = makeNonSmeltable(1500, P_RED, 0xCB0213, 0x600006, 0xBA0615).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_CHLOROCALCITE = makeNonSmeltable(1701, CHLOROCALCITE, 0xF7E761, 0x475B46, 0xB8B963).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_MOLYSITE = makeNonSmeltable(1702, MOLYSITE, 0xF9E97B, 0x216E00, 0xD0D264).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_CINNABAR = makeNonSmeltable(8001, CINNABAR, 0xD87070, 0x993030, 0xBF4E4E).setShapes(FRAGMENT, GEM).n();
|
||||
public static final NTMMaterial MAT_CADMIUM = makeSmeltable(4800, CD, 0xFFFADE, 0x350000, 0xA85600).setShapes(INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_SILICON = makeSmeltable(1400, SI, 0xD1D7DF, 0x1A1A3D, 0x878B9E).setShapes(FRAGMENT, NUGGET, BILLET, INGOT).m();
|
||||
public static final NTMMaterial MAT_ASBESTOS = makeSmeltable(1401, ASBESTOS, 0xD8D9CF, 0x616258, 0xB0B3A8).setShapes(FRAGMENT, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, INGOT, CASTPLATE, WELDEDPLATE).m();
|
||||
|
||||
//Alloys
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, BOLT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
@ -152,10 +152,9 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_MUD = makeSmeltable(_AS + 14, MUD, 0xBCB5A9, 0x481213, 0x96783B).setShapes(INGOT).n();
|
||||
|
||||
//Extension
|
||||
public static final NTMMaterial MAT_RAREEARTH = makeNonSmeltable(_ES + 00, RAREEARTH, 0xC1BDBD, 0x384646, 0x7B7F7F).setShapes(FRAGMENT, INGOT).n();
|
||||
public static final NTMMaterial MAT_RAREEARTH = makeNonSmeltable(_ES + 00, RAREEARTH, 0xC1BDBD, 0x384646, 0x7B7F7F).setShapes(FRAGMENT, INGOT).n();
|
||||
|
||||
@Deprecated public static NTMMaterial makeSmeltable(int id, DictFrame dict, int color) { return makeSmeltable(id, dict, color, color, color); }
|
||||
@Deprecated public static NTMMaterial makeAdditive(int id, DictFrame dict, int color) { return makeAdditive(id, dict, color, color, color); }
|
||||
public static NTMMaterial makeSmeltable(int id, DictFrame dict, int color) { return makeSmeltable(id, dict, color, color, color); }
|
||||
|
||||
public static NTMMaterial make(int id, DictFrame dict) {
|
||||
return new NTMMaterial(id, dict);
|
||||
@ -246,9 +245,7 @@ public class Mats {
|
||||
|
||||
public static String formatAmount(int amount, boolean showInMb) {
|
||||
|
||||
if(showInMb) {
|
||||
return (amount * 2) + "mB";
|
||||
}
|
||||
if(showInMb) return (amount * 2) + "mB";
|
||||
|
||||
String format = "";
|
||||
|
||||
|
||||
@ -557,14 +557,6 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
new ComparableStack(ModItems.powder_chlorophyte, 1),
|
||||
new OreDictStack(PB.nugget(), 12),
|
||||
}, 50);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_mercury, 2), new AStack[] {
|
||||
new ComparableStack(ModItems.ingot_mercury, 1),
|
||||
new OreDictStack(PB.nugget(), 12),
|
||||
}, 50);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_meteorite, 2), new AStack[] {
|
||||
new ComparableStack(ModItems.powder_meteorite, 1),
|
||||
new OreDictStack(PB.nugget(), 12),
|
||||
}, 50);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_canister, 2), new AStack[] {
|
||||
new OreDictStack(IRON.ingot(), 3),
|
||||
}, 50);
|
||||
@ -1261,7 +1253,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModBlocks.qe_containment, 1), new AStack[]{new OreDictStack(STEEL.plateCast(), 4), new OreDictStack(ALLOY.plate(), 4), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.motor, 2), new OreDictStack(DURA.bolt(), 32), new OreDictStack("dyeBlack", 4)}, 400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.qe_sliding_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 4), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.motor, 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack("dyeWhite", 4), new ComparableStack(Blocks.glass, 4)}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.round_airlock_door, 1), new AStack[]{new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ALLOY.plate(), 8), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.motor, 4), new OreDictStack(DURA.bolt(), 16), new OreDictStack("dyeGreen", 4)}, 400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.secure_access_door, 1), new AStack[]{new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ALLOY.plate(), 16), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.motor, 4), new OreDictStack(DURA.bolt(), 32), new OreDictStack("dyeRed", 8)}, 4000);
|
||||
makeRecipe(new ComparableStack(ModBlocks.secure_access_door, 1), new AStack[]{new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ALLOY.plate(), 16), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.motor, 4), new OreDictStack(DURA.bolt(), 32), new OreDictStack("dyeRed", 8)}, 400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.sliding_seal_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.motor, 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack("dyeWhite", 2)}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.silo_hatch, 1), new AStack[]{new OreDictStack(STEEL.plateWelded(), 4), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.motor, 2), new OreDictStack(STEEL.bolt(), 16), new OreDictStack(KEY_GREEN, 4)}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.silo_hatch_large, 1), new AStack[]{new OreDictStack(STEEL.plateWelded(), 6), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.motor, 2), new OreDictStack(STEEL.bolt(), 16), new OreDictStack(KEY_GREEN, 8)}, 200);
|
||||
|
||||
@ -59,8 +59,6 @@ public class MachineRecipes {
|
||||
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
|
||||
fuels.add(new ItemStack(ModItems.battery_potato));
|
||||
fuels.add(new ItemStack(ModItems.battery_potatos));
|
||||
fuels.add(new ItemStack(ModItems.battery_su));
|
||||
fuels.add(new ItemStack(ModItems.battery_su_l));
|
||||
fuels.add(new ItemStack(ModItems.battery_generic));
|
||||
fuels.add(new ItemStack(ModItems.battery_red_cell));
|
||||
fuels.add(new ItemStack(ModItems.battery_red_cell_6));
|
||||
|
||||
@ -425,12 +425,9 @@ public class AnvilRecipes {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new ComparableStack(ModItems.sulfur, 8),
|
||||
new OreDictStack(STEEL.plate528(), 4),
|
||||
new OreDictStack(AL.plate528(), 2),
|
||||
new ComparableStack(ModItems.sulfur, 12),
|
||||
new OreDictStack(STEEL.shell(), 4),
|
||||
new OreDictStack(CU.plateCast(), 4),
|
||||
new ComparableStack(ModItems.turbine_titanium, 1),
|
||||
new OreDictStack(CU.plateCast(), 6),
|
||||
new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC.ordinal())
|
||||
},
|
||||
new AnvilOutput(new ItemStack(ModBlocks.machine_deuterium_extractor))).setTier(2));
|
||||
|
||||
@ -502,7 +502,6 @@ public class ModItems {
|
||||
public static Item powder_lithium;
|
||||
public static Item powder_zirconium;
|
||||
public static Item powder_sodium;
|
||||
public static Item redstone_depleted;
|
||||
|
||||
public static Item powder_australium;
|
||||
public static Item powder_weidanium;
|
||||
@ -1230,8 +1229,6 @@ public class ModItems {
|
||||
public static Item pellet_buckshot;
|
||||
public static Item pellet_flechette;
|
||||
public static Item pellet_chlorophyte;
|
||||
public static Item pellet_mercury;
|
||||
public static Item pellet_meteorite;
|
||||
public static Item pellet_canister;
|
||||
public static Item pellet_claws;
|
||||
public static Item pellet_charged;
|
||||
@ -1799,8 +1796,6 @@ public class ModItems {
|
||||
public static Item battery_sc_lead;
|
||||
public static Item battery_sc_americium;
|
||||
|
||||
public static Item battery_su;
|
||||
public static Item battery_su_l;
|
||||
public static Item battery_potato;
|
||||
public static Item battery_potatos;
|
||||
public static Item hev_battery;
|
||||
@ -1871,7 +1866,6 @@ public class ModItems {
|
||||
public static Item euphemium_boots;
|
||||
public static Item apple_euphemium;
|
||||
public static Item watch;
|
||||
public static Item euphemium_stopper;
|
||||
|
||||
public static Item goggles;
|
||||
public static Item ashglasses;
|
||||
@ -2363,14 +2357,6 @@ public class ModItems {
|
||||
public static Item book_lemegeton;
|
||||
public static Item burnt_bark;
|
||||
|
||||
public static Item smoke1;
|
||||
public static Item smoke2;
|
||||
public static Item smoke3;
|
||||
public static Item smoke4;
|
||||
public static Item smoke5;
|
||||
public static Item smoke6;
|
||||
public static Item smoke7;
|
||||
public static Item smoke8;
|
||||
public static Item b_smoke1;
|
||||
public static Item b_smoke2;
|
||||
public static Item b_smoke3;
|
||||
@ -2379,14 +2365,6 @@ public class ModItems {
|
||||
public static Item b_smoke6;
|
||||
public static Item b_smoke7;
|
||||
public static Item b_smoke8;
|
||||
public static Item d_smoke1;
|
||||
public static Item d_smoke2;
|
||||
public static Item d_smoke3;
|
||||
public static Item d_smoke4;
|
||||
public static Item d_smoke5;
|
||||
public static Item d_smoke6;
|
||||
public static Item d_smoke7;
|
||||
public static Item d_smoke8;
|
||||
public static Item spill1;
|
||||
public static Item spill2;
|
||||
public static Item spill3;
|
||||
@ -2443,9 +2421,6 @@ public class ModItems {
|
||||
public static Item gasflame6;
|
||||
public static Item gasflame7;
|
||||
public static Item gasflame8;*/
|
||||
public static Item energy_ball;
|
||||
public static Item discharge;
|
||||
public static Item empblast;
|
||||
public static Item flame_1;
|
||||
public static Item flame_2;
|
||||
public static Item flame_3;
|
||||
@ -2467,7 +2442,6 @@ public class ModItems {
|
||||
public static Item ln2_9;
|
||||
public static Item ln2_10;
|
||||
public static Item nothing;
|
||||
public static Item void_anim;
|
||||
|
||||
public static Item achievement_icon;
|
||||
public static Item bob_metalworks;
|
||||
@ -2706,11 +2680,10 @@ public class ModItems {
|
||||
ore_nitrocrystalline = new ItemBedrockOre().setUnlocalizedName("ore_nitrocrystalline").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_nitrocrystalline");
|
||||
ore_deepcleaned = new ItemBedrockOre().setUnlocalizedName("ore_deepcleaned").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_deepcleaned");
|
||||
ore_seared = new ItemBedrockOre().setUnlocalizedName("ore_seared").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_seared");
|
||||
//ore_radcleaned = new ItemBedrockOre().setUnlocalizedName("ore_radcleaned").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_radcleaned");
|
||||
ore_enriched = new ItemBedrockOre().setUnlocalizedName("ore_enriched").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_enriched");
|
||||
bedrock_ore_base = new ItemBedrockOreBase().setUnlocalizedName("bedrock_ore_base").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bedrock_ore_new");
|
||||
bedrock_ore = new ItemBedrockOreNew().setUnlocalizedName("bedrock_ore").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bedrock_ore_new");
|
||||
bedrock_ore_fragment = new ItemAutogen(MaterialShapes.FRAGMENT).setUnlocalizedName("bedrock_ore_fragment").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bedrock_ore_fragment");
|
||||
bedrock_ore_fragment = new ItemAutogen(MaterialShapes.FRAGMENT).aot(Mats.MAT_BISMUTH, "bedrock_ore_fragment_bismuth").setUnlocalizedName("bedrock_ore_fragment").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bedrock_ore_fragment");
|
||||
|
||||
ingot_lanthanium = new ItemCustomLore().setUnlocalizedName("ingot_lanthanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_lanthanium");
|
||||
ingot_actinium = new ItemCustomLore().setUnlocalizedName("ingot_actinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_actinium");
|
||||
@ -2903,7 +2876,6 @@ public class ModItems {
|
||||
powder_lithium = new Item().setUnlocalizedName("powder_lithium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lithium");
|
||||
powder_zirconium = new Item().setUnlocalizedName("powder_zirconium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_zirconium");
|
||||
powder_sodium = new Item().setUnlocalizedName("powder_sodium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_sodium");
|
||||
redstone_depleted = new Item().setUnlocalizedName("redstone_depleted").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":redstone_depleted");
|
||||
powder_power = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_power").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_energy_alt");
|
||||
powder_iodine = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("powder_iodine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_iodine");
|
||||
powder_thorium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_thorium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_thorium");
|
||||
@ -3869,8 +3841,6 @@ public class ModItems {
|
||||
pellet_buckshot = new Item().setUnlocalizedName("pellet_buckshot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_lead");
|
||||
pellet_flechette = new Item().setUnlocalizedName("pellet_flechette").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_flechette");
|
||||
pellet_chlorophyte = new Item().setUnlocalizedName("pellet_chlorophyte").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_chlorophyte");
|
||||
pellet_mercury = new Item().setUnlocalizedName("pellet_mercury").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_mercury");
|
||||
pellet_meteorite = new Item().setUnlocalizedName("pellet_meteorite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_meteorite");
|
||||
pellet_canister = new Item().setUnlocalizedName("pellet_canister").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_canister");
|
||||
pellet_claws = new Item().setUnlocalizedName("pellet_claws").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_claws");
|
||||
pellet_charged = new Item().setUnlocalizedName("pellet_charged").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_charged");
|
||||
@ -4398,8 +4368,6 @@ public class ModItems {
|
||||
|
||||
battery_potato = new ItemBattery(1000, 0, 100).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
|
||||
battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
|
||||
battery_su = new ItemBattery(50000, 0, 1000).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su");
|
||||
battery_su_l = new ItemBattery(150000, 0, 1000).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l");
|
||||
hev_battery = new ItemFusionCore(150000).setUnlocalizedName("hev_battery").setMaxStackSize(4).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hev_battery");
|
||||
fusion_core = new ItemFusionCore(2500000).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core");
|
||||
fusion_core_infinite = new Item().setUnlocalizedName("fusion_core_infinite").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core_infinite");
|
||||
@ -5375,7 +5343,6 @@ public class ModItems {
|
||||
shimmer_axe = new WeaponSpecial(MainRegistry.enumToolMaterialSledge).setUnlocalizedName("shimmer_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":shimmer_axe");
|
||||
bottle_opener = new WeaponSpecial(MainRegistry.enumToolMaterialBottleOpener).setUnlocalizedName("bottle_opener").setCreativeTab(MainRegistry.consumableTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":bottle_opener");
|
||||
pch = new WeaponSpecial(MainRegistry.tMatHammmer).setUnlocalizedName("pch").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":schrabidium_hammer");
|
||||
euphemium_stopper = new ItemSyringe().setUnlocalizedName("euphemium_stopper").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":euphemium_stopper");
|
||||
matchstick = new ItemMatch().setUnlocalizedName("matchstick").setCreativeTab(CreativeTabs.tabTools).setFull3D().setTextureName(RefStrings.MODID + ":matchstick");
|
||||
balefire_and_steel = new ItemBalefireMatch().setUnlocalizedName("balefire_and_steel").setCreativeTab(CreativeTabs.tabTools).setFull3D().setTextureName(RefStrings.MODID + ":balefire_and_steel");
|
||||
crowbar = new ModSword(MainRegistry.tMatSteel).setUnlocalizedName("crowbar").setFull3D().setTextureName(RefStrings.MODID + ":crowbar");
|
||||
@ -5450,14 +5417,6 @@ public class ModItems {
|
||||
book_lemegeton = new ItemBookLemegeton().setUnlocalizedName("book_lemegeton").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_lemegeton");
|
||||
burnt_bark = new ItemCustomLore().setUnlocalizedName("burnt_bark").setCreativeTab(null).setTextureName(RefStrings.MODID + ":burnt_bark");
|
||||
|
||||
smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1");
|
||||
smoke2 = new Item().setUnlocalizedName("smoke2").setTextureName(RefStrings.MODID + ":smoke2");
|
||||
smoke3 = new Item().setUnlocalizedName("smoke3").setTextureName(RefStrings.MODID + ":smoke3");
|
||||
smoke4 = new Item().setUnlocalizedName("smoke4").setTextureName(RefStrings.MODID + ":smoke4");
|
||||
smoke5 = new Item().setUnlocalizedName("smoke5").setTextureName(RefStrings.MODID + ":smoke5");
|
||||
smoke6 = new Item().setUnlocalizedName("smoke6").setTextureName(RefStrings.MODID + ":smoke6");
|
||||
smoke7 = new Item().setUnlocalizedName("smoke7").setTextureName(RefStrings.MODID + ":smoke7");
|
||||
smoke8 = new Item().setUnlocalizedName("smoke8").setTextureName(RefStrings.MODID + ":smoke8");
|
||||
b_smoke1 = new Item().setUnlocalizedName("b_smoke1").setTextureName(RefStrings.MODID + ":b_smoke1");
|
||||
b_smoke2 = new Item().setUnlocalizedName("b_smoke2").setTextureName(RefStrings.MODID + ":b_smoke2");
|
||||
b_smoke3 = new Item().setUnlocalizedName("b_smoke3").setTextureName(RefStrings.MODID + ":b_smoke3");
|
||||
@ -5466,14 +5425,6 @@ public class ModItems {
|
||||
b_smoke6 = new Item().setUnlocalizedName("b_smoke6").setTextureName(RefStrings.MODID + ":b_smoke6");
|
||||
b_smoke7 = new Item().setUnlocalizedName("b_smoke7").setTextureName(RefStrings.MODID + ":b_smoke7");
|
||||
b_smoke8 = new Item().setUnlocalizedName("b_smoke8").setTextureName(RefStrings.MODID + ":b_smoke8");
|
||||
d_smoke1 = new Item().setUnlocalizedName("d_smoke1").setTextureName(RefStrings.MODID + ":d_smoke1");
|
||||
d_smoke2 = new Item().setUnlocalizedName("d_smoke2").setTextureName(RefStrings.MODID + ":d_smoke2");
|
||||
d_smoke3 = new Item().setUnlocalizedName("d_smoke3").setTextureName(RefStrings.MODID + ":d_smoke3");
|
||||
d_smoke4 = new Item().setUnlocalizedName("d_smoke4").setTextureName(RefStrings.MODID + ":d_smoke4");
|
||||
d_smoke5 = new Item().setUnlocalizedName("d_smoke5").setTextureName(RefStrings.MODID + ":d_smoke5");
|
||||
d_smoke6 = new Item().setUnlocalizedName("d_smoke6").setTextureName(RefStrings.MODID + ":d_smoke6");
|
||||
d_smoke7 = new Item().setUnlocalizedName("d_smoke7").setTextureName(RefStrings.MODID + ":d_smoke7");
|
||||
d_smoke8 = new Item().setUnlocalizedName("d_smoke8").setTextureName(RefStrings.MODID + ":d_smoke8");
|
||||
spill1 = new Item().setUnlocalizedName("spill1").setTextureName(RefStrings.MODID + ":spill1");
|
||||
spill2 = new Item().setUnlocalizedName("spill2").setTextureName(RefStrings.MODID + ":spill2");
|
||||
spill3 = new Item().setUnlocalizedName("spill3").setTextureName(RefStrings.MODID + ":spill3");
|
||||
@ -5522,9 +5473,6 @@ public class ModItems {
|
||||
orange6 = new Item().setUnlocalizedName("orange6").setTextureName(RefStrings.MODID + ":orange6");
|
||||
orange7 = new Item().setUnlocalizedName("orange7").setTextureName(RefStrings.MODID + ":orange7");
|
||||
orange8 = new Item().setUnlocalizedName("orange8").setTextureName(RefStrings.MODID + ":orange8");
|
||||
energy_ball = new Item().setUnlocalizedName("energy_ball").setTextureName(RefStrings.MODID + ":energy_ball");
|
||||
discharge = new Item().setUnlocalizedName("discharge").setTextureName(RefStrings.MODID + ":discharge");
|
||||
empblast = new Item().setUnlocalizedName("empblast").setTextureName(RefStrings.MODID + ":empblast");
|
||||
flame_1 = new Item().setUnlocalizedName("flame_1").setTextureName(RefStrings.MODID + ":flame_1");
|
||||
flame_2 = new Item().setUnlocalizedName("flame_2").setTextureName(RefStrings.MODID + ":flame_2");
|
||||
flame_3 = new Item().setUnlocalizedName("flame_3").setTextureName(RefStrings.MODID + ":flame_3");
|
||||
@ -5546,7 +5494,6 @@ public class ModItems {
|
||||
ln2_9 = new Item().setUnlocalizedName("ln2_9").setTextureName(RefStrings.MODID + ":ln2_9");
|
||||
ln2_10 = new Item().setUnlocalizedName("ln2_10").setTextureName(RefStrings.MODID + ":ln2_10");
|
||||
nothing = new Item().setUnlocalizedName("nothing").setTextureName(RefStrings.MODID + ":nothing");
|
||||
void_anim = new Item().setUnlocalizedName("void_anim").setTextureName(RefStrings.MODID + ":void_anim");
|
||||
|
||||
|
||||
achievement_icon = new ItemEnumMulti(ItemEnums.EnumAchievementType.class, true, true).setUnlocalizedName("achievement_icon");
|
||||
@ -5884,7 +5831,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_meteorite_tiny, powder_meteorite_tiny.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_euphemium, powder_euphemium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_dineutronium, powder_dineutronium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(redstone_depleted, redstone_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dust, dust.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dust_tiny, dust_tiny.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fallout, fallout.getUnlocalizedName());
|
||||
@ -6288,8 +6234,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(pellet_buckshot, pellet_buckshot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_flechette, pellet_flechette.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_chlorophyte, pellet_chlorophyte.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_mercury, pellet_mercury.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_meteorite, pellet_meteorite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_canister, pellet_canister.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_claws, pellet_claws.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_charged, pellet_charged.getUnlocalizedName());
|
||||
@ -6411,8 +6355,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(battery_spark_cell_power, battery_spark_cell_power.getUnlocalizedName());
|
||||
GameRegistry.registerItem(cube_power, cube_power.getUnlocalizedName());
|
||||
GameRegistry.registerItem(battery_creative, battery_creative.getUnlocalizedName());
|
||||
GameRegistry.registerItem(battery_su, battery_su.getUnlocalizedName());
|
||||
GameRegistry.registerItem(battery_su_l, battery_su_l.getUnlocalizedName());
|
||||
GameRegistry.registerItem(battery_potato, battery_potato.getUnlocalizedName());
|
||||
GameRegistry.registerItem(battery_potatos, battery_potatos.getUnlocalizedName());
|
||||
GameRegistry.registerItem(battery_sc_uranium, battery_sc_uranium.getUnlocalizedName());
|
||||
@ -7817,9 +7759,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(structure_randomly, structure_randomly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(structure_custommachine, structure_custommachine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_of_discord, rod_of_discord.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(analyzer, analyzer.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(remote, remote.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName());
|
||||
GameRegistry.registerItem(glitch, glitch.getUnlocalizedName());
|
||||
GameRegistry.registerItem(book_secret, book_secret.getUnlocalizedName());
|
||||
@ -7887,14 +7826,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(holotape_damaged, holotape_damaged.getUnlocalizedName());
|
||||
|
||||
//Technical Items
|
||||
GameRegistry.registerItem(smoke1, smoke1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke2, smoke2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke3, smoke3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke4, smoke4.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke5, smoke5.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke6, smoke6.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke7, smoke7.getUnlocalizedName());
|
||||
GameRegistry.registerItem(smoke8, smoke8.getUnlocalizedName());
|
||||
GameRegistry.registerItem(b_smoke1, b_smoke1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(b_smoke2, b_smoke2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(b_smoke3, b_smoke3.getUnlocalizedName());
|
||||
@ -7903,14 +7834,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(b_smoke6, b_smoke6.getUnlocalizedName());
|
||||
GameRegistry.registerItem(b_smoke7, b_smoke7.getUnlocalizedName());
|
||||
GameRegistry.registerItem(b_smoke8, b_smoke8.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke1, d_smoke1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke2, d_smoke2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke3, d_smoke3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke4, d_smoke4.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke5, d_smoke5.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke6, d_smoke6.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke7, d_smoke7.getUnlocalizedName());
|
||||
GameRegistry.registerItem(d_smoke8, d_smoke8.getUnlocalizedName());
|
||||
GameRegistry.registerItem(spill1, spill1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(spill2, spill2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(spill3, spill3.getUnlocalizedName());
|
||||
@ -7959,9 +7882,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(orange6, orange6.getUnlocalizedName());
|
||||
GameRegistry.registerItem(orange7, orange7.getUnlocalizedName());
|
||||
GameRegistry.registerItem(orange8, orange8.getUnlocalizedName());
|
||||
GameRegistry.registerItem(energy_ball, energy_ball.getUnlocalizedName());
|
||||
GameRegistry.registerItem(discharge, discharge.getUnlocalizedName());
|
||||
GameRegistry.registerItem(empblast, empblast.getUnlocalizedName());
|
||||
GameRegistry.registerItem(flame_1, flame_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(flame_2, flame_2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(flame_3, flame_3.getUnlocalizedName());
|
||||
@ -7983,7 +7903,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ln2_9, ln2_9.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ln2_10, ln2_10.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nothing, nothing.getUnlocalizedName());
|
||||
GameRegistry.registerItem(void_anim, void_anim.getUnlocalizedName());
|
||||
GameRegistry.registerItem(achievement_icon, achievement_icon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_metalworks, bob_metalworks.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bob_assembly, bob_assembly.getUnlocalizedName());
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -12,7 +10,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.PlayerInformPacket;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
@ -26,10 +23,8 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IItemControlReceiver, IGUIProvider {
|
||||
|
||||
@ -147,80 +142,6 @@ public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IIte
|
||||
int type = stack.stackTagCompound.getInteger("fluid" + (primary ? 1 : 2));
|
||||
return Fluids.fromID(type);
|
||||
}
|
||||
|
||||
/*
|
||||
* CRAPPY COMPAT SECTION
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f1, float f2, float f3) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileEntityFluidDuctSimple) {
|
||||
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
if(!world.isRemote) {
|
||||
FluidType type = getType(world, x, y ,z, stack);
|
||||
|
||||
if (player.isSneaking()) {
|
||||
markDuctsRecursively(world, x, y, z, type);
|
||||
} else {
|
||||
duct.setType(type);
|
||||
}
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void markDuctsRecursively(World world, int x, int y, int z, FluidType type) {
|
||||
markDuctsRecursively(world, x, y, z, type, 64);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private void markDuctsRecursively(World world, int x, int y, int z, FluidType type, int maxRecursion) {
|
||||
TileEntity start = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(start instanceof TileEntityFluidDuctSimple))
|
||||
return;
|
||||
|
||||
TileEntityFluidDuctSimple startDuct = (TileEntityFluidDuctSimple) start;
|
||||
FluidType oldType = startDuct.getType();
|
||||
|
||||
if (oldType == type)
|
||||
return; // prevent infinite loops
|
||||
|
||||
startDuct.setType(type);
|
||||
|
||||
directionLoop: for (ForgeDirection direction : ForgeDirection.values()) {
|
||||
for (int currentRecursion = 1; currentRecursion <= maxRecursion; currentRecursion++) {
|
||||
|
||||
int nextX = x + direction.offsetX * currentRecursion;
|
||||
int nextY = y + direction.offsetY * currentRecursion;
|
||||
int nextZ = z + direction.offsetZ * currentRecursion;
|
||||
|
||||
TileEntity te = world.getTileEntity(nextX, nextY, nextZ);
|
||||
if (te instanceof TileEntityFluidDuctSimple && ((TileEntityFluidDuctSimple) te).getType() == oldType) {
|
||||
|
||||
TileEntityFluidDuctSimple nextDuct = (TileEntityFluidDuctSimple) te;
|
||||
long connectionsCount = Arrays.stream(nextDuct.connections).filter(Objects::nonNull).count(); // (o -> Objects.nonNull(o))
|
||||
|
||||
if (connectionsCount > 1) {
|
||||
markDuctsRecursively(world, nextX, nextY, nextZ, type, maxRecursion - currentRecursion);
|
||||
continue directionLoop;
|
||||
} else {
|
||||
nextDuct.setType(type);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -17,11 +14,9 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
|
||||
|
||||
@ -88,75 +83,6 @@ public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f1, float f2, float f3) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileEntityFluidDuctSimple) {
|
||||
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
if(!world.isRemote) {
|
||||
FluidType type = Fluids.fromID(stack.getItemDamage());
|
||||
|
||||
if (player.isSneaking()) {
|
||||
markDuctsRecursively(world, x, y, z, type);
|
||||
} else {
|
||||
duct.setType(type);
|
||||
}
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
player.swingItem();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void markDuctsRecursively(World world, int x, int y, int z, FluidType type) {
|
||||
markDuctsRecursively(world, x, y, z, type, 64);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private void markDuctsRecursively(World world, int x, int y, int z, FluidType type, int maxRecursion) {
|
||||
TileEntity start = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(start instanceof TileEntityFluidDuctSimple))
|
||||
return;
|
||||
|
||||
TileEntityFluidDuctSimple startDuct = (TileEntityFluidDuctSimple) start;
|
||||
FluidType oldType = startDuct.getType();
|
||||
|
||||
if (oldType == type)
|
||||
return; // prevent infinite loops
|
||||
|
||||
startDuct.setType(type);
|
||||
|
||||
directionLoop: for (ForgeDirection direction : ForgeDirection.values()) {
|
||||
for (int currentRecursion = 1; currentRecursion <= maxRecursion; currentRecursion++) {
|
||||
|
||||
int nextX = x + direction.offsetX * currentRecursion;
|
||||
int nextY = y + direction.offsetY * currentRecursion;
|
||||
int nextZ = z + direction.offsetZ * currentRecursion;
|
||||
|
||||
TileEntity te = world.getTileEntity(nextX, nextY, nextZ);
|
||||
if (te instanceof TileEntityFluidDuctSimple && ((TileEntityFluidDuctSimple) te).getType() == oldType) {
|
||||
|
||||
TileEntityFluidDuctSimple nextDuct = (TileEntityFluidDuctSimple) te;
|
||||
long connectionsCount = Arrays.stream(nextDuct.connections).filter(Objects::nonNull).count(); // (o -> Objects.nonNull(o))
|
||||
|
||||
if (connectionsCount > 1) {
|
||||
markDuctsRecursively(world, nextX, nextY, nextZ, type, maxRecursion - currentRecursion);
|
||||
continue directionLoop;
|
||||
} else {
|
||||
nextDuct.setType(type);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
|
||||
@ -360,10 +360,6 @@ public class ItemSyringe extends Item {
|
||||
if(this == ModItems.syringe_awesome) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
if(this == ModItems.euphemium_stopper) {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
return EnumRarity.common;
|
||||
}
|
||||
|
||||
@ -527,14 +523,6 @@ public class ItemSyringe extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.euphemium_stopper) {
|
||||
if(!world.isRemote) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 30 * 20, 9));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 30 * 20, 9));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 30 * 20, 9));
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_mkunicorn) {
|
||||
if(!world.isRemote) {
|
||||
HbmLivingProps.setContagion(entity, 3 * 60 * 60 * 20);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import com.hbm.entity.particle.EntitySSmokeFX;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseNT;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.interfaces.IHoldableWeapon;
|
||||
@ -65,20 +64,6 @@ public class GunFolly extends Item implements IHoldableWeapon {
|
||||
if (!world.isRemote) {
|
||||
EntityBulletBaseNT bullet = new EntityBulletBaseNT(world, BulletConfigSyncingUtil.TEST_CONFIG, player);
|
||||
world.spawnEntityInWorld(bullet);
|
||||
|
||||
for(int i = 0; i < 25; i++) {
|
||||
EntitySSmokeFX flame = new EntitySSmokeFX(world);
|
||||
|
||||
flame.motionX = player.getLookVec().xCoord;
|
||||
flame.motionY = player.getLookVec().yCoord;
|
||||
flame.motionZ = player.getLookVec().zCoord;
|
||||
|
||||
flame.posX = player.posX + flame.motionX + world.rand.nextGaussian() * 0.35;
|
||||
flame.posY = player.posY + flame.motionY + world.rand.nextGaussian() * 0.35 + player.eyeHeight;
|
||||
flame.posZ = player.posZ + flame.motionZ + world.rand.nextGaussian() * 0.35;
|
||||
|
||||
world.spawnEntityInWorld(flame);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,13 +7,9 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.mob.EntityHunterChopper;
|
||||
import com.hbm.entity.projectile.EntityChopperMine;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import api.hbm.energymk2.IEnergyConnectorBlock;
|
||||
@ -109,26 +105,6 @@ public class Library {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkFluidConnectables(World world, int x, int y, int z, FluidType type)
|
||||
{
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if(tileentity != null && tileentity instanceof IFluidDuct && ((IFluidDuct)tileentity).getType() == type)
|
||||
return true;
|
||||
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
||||
tileentity instanceof IFluidSource)) ||
|
||||
world.getBlock(x, y, z) == ModBlocks.fusion_hatch ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_compact_launcher ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_launch_table ||
|
||||
world.getBlock(x, y, z) == ModBlocks.rbmk_loader) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(world.getBlock(x, y, z) == ModBlocks.machine_mining_laser && tileentity instanceof TileEntityProxyInventory)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static EntityLivingBase getClosestEntityForChopper(World world, double x, double y, double z, double radius) {
|
||||
double d4 = -1.0D;
|
||||
@ -319,8 +295,6 @@ public class Library {
|
||||
*/
|
||||
}
|
||||
|
||||
public static void transmitFluid(int x, int y, int z, boolean newTact, IFluidSource that, World worldObj, FluidType type) { }
|
||||
|
||||
public static boolean isArrayEmpty(Object[] array) {
|
||||
if(array == null)
|
||||
return true;
|
||||
|
||||
@ -116,7 +116,6 @@ import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.sound.AudioWrapperClient;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.conductor.*;
|
||||
import com.hbm.tileentity.deco.*;
|
||||
import com.hbm.tileentity.machine.*;
|
||||
import com.hbm.tileentity.machine.oil.*;
|
||||
@ -349,7 +348,6 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzLauncher.class, new RenderSoyuzLauncher());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzCapsule.class, new RenderCapsule());
|
||||
//network
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidDuct.class, new RenderFluidDuct());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylon.class, new RenderPylon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnector.class, new RenderConnector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonMedium.class, new RenderPylonMedium());
|
||||
@ -629,7 +627,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBulletBaseNT.class, new RenderBullet());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRainbow.class, new RenderRainbow());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNightmareBlast.class, new RenderOminousBullet());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFire.class, new RenderFireball(ModItems.energy_ball));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFire.class, new RenderFireball(ModItems.nothing));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPlasmaBeam.class, new RenderBeam());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLaserBeam.class, new RenderBeam2());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMinerBeam.class, new RenderBeam3());
|
||||
@ -637,7 +635,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityExplosiveBeam.class, new RenderBeam5());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityModBeam.class, new RenderBeam6());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeLaser.class, new RenderSiegeLaser());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLN2.class, new RenderLN2(ModItems.energy_ball));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLN2.class, new RenderLN2(ModItems.nothing));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBombletZeta.class, new RenderBombletTheta());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new RenderMeteor());
|
||||
@ -820,20 +818,15 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPlasticBag.class, new RenderPlasticBag());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPigeon.class, new RenderPigeon(new ModelPigeon(), 0.3F));
|
||||
//"particles"
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.smoke1, ModItems.smoke2, ModItems.smoke3, ModItems.smoke4, ModItems.smoke5, ModItems.smoke6, ModItems.smoke7, ModItems.smoke8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.b_smoke1, ModItems.b_smoke2, ModItems.b_smoke3, ModItems.b_smoke4, ModItems.b_smoke5, ModItems.b_smoke6, ModItems.b_smoke7, ModItems.b_smoke8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.d_smoke1, ModItems.d_smoke2, ModItems.d_smoke3, ModItems.d_smoke4, ModItems.d_smoke5, ModItems.d_smoke6, ModItems.d_smoke7, ModItems.d_smoke8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(com.hbm.entity.particle.EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityOrangeFX.class, new MultiCloudRenderer(new Item[] { ModItems.orange1, ModItems.orange2, ModItems.orange3, ModItems.orange4, ModItems.orange5, ModItems.orange6, ModItems.orange7, ModItems.orange8 }));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFogFX.class, new FogRenderer());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySSmokeFX.class, new SSmokeRenderer(ModItems.nuclear_waste));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityOilSpillFX.class, new SpillRenderer(ModItems.nuclear_waste));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGasFX.class, new GasRenderer(ModItems.nuclear_waste));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityCombineBall.class, new RenderSnowball(ModItems.energy_ball));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEMPBlast.class, new RenderEMPBlast());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTSmokeFX.class, new TSmokeRenderer(ModItems.nuclear_waste));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -581,12 +581,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_10000), new Object[] { "OSO", "SVS", "OSO", 'S', ModItems.singularity_spark, 'V', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_2500), 'O', ModItems.ingot_osmiridium });
|
||||
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_power), new Object[] { "YSY", "SCS", "YSY", 'S', ModItems.singularity_spark, 'C', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_10000), 'Y', ModItems.billet_yharonite });
|
||||
|
||||
addRecipeAuto(ItemBattery.getFullBattery(ModItems.battery_su), new Object[] { "P", "R", "C", 'P', Items.paper, 'R', REDSTONE.dust(), 'C', COAL.dust() });
|
||||
addRecipeAuto(ItemBattery.getFullBattery(ModItems.battery_su), new Object[] { "P", "C", "R", 'P', Items.paper, 'R', REDSTONE.dust(), 'C', COAL.dust() });
|
||||
addRecipeAuto(ItemBattery.getFullBattery(ModItems.battery_su_l), new Object[] { " W ", "CPC", "RPR", 'W', AL.wireFine(), 'P', Items.paper, 'R', REDSTONE.dust(), 'C', COAL.dust() });
|
||||
addRecipeAuto(ItemBattery.getFullBattery(ModItems.battery_su_l), new Object[] { " W ", "RPR", "CPC", 'W', AL.wireFine(), 'P', Items.paper, 'R', REDSTONE.dust(), 'C', COAL.dust() });
|
||||
addRecipeAuto(ItemBattery.getFullBattery(ModItems.battery_su_l), new Object[] { " W ", "CPC", "RPR", 'W', CU.wireFine(), 'P', Items.paper, 'R', REDSTONE.dust(), 'C', COAL.dust() });
|
||||
addRecipeAuto(ItemBattery.getFullBattery(ModItems.battery_su_l), new Object[] { " W ", "RPR", "CPC", 'W', CU.wireFine(), 'P', Items.paper, 'R', REDSTONE.dust(), 'C', COAL.dust() });
|
||||
addShapelessAuto(ItemBattery.getFullBattery(ModItems.battery_potato), new Object[] { Items.potato, AL.wireFine(), CU.wireFine() });
|
||||
addShapelessAuto(ItemBattery.getFullBattery(ModItems.battery_potatos), new Object[] { ItemBattery.getFullBattery(ModItems.battery_potato), ModItems.turret_chip, REDSTONE.dust() });
|
||||
|
||||
@ -632,9 +626,6 @@ public class CraftingManager {
|
||||
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(), DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
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", "ADA", "SAS", 'S', STEEL.ingot(), 'A', AL.plate(), 'D', ModItems.ducttape });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_valve, 1), new Object[] { "S", "W", 'S', Blocks.lever, 'W', ModBlocks.fluid_duct_paintable });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_switch, 1), new Object[] { "S", "W", 'S', REDSTONE.dust(), 'W', ModBlocks.fluid_duct_paintable });
|
||||
addRecipeAuto(new ItemStack(ModItems.template_folder, 1), new Object[] { "LPL", "BPB", "LPL", 'P', Items.paper, 'L', "dye", 'B', "dye" });
|
||||
@ -724,10 +715,6 @@ public class CraftingManager {
|
||||
|
||||
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_neo, 1), new Object[] { new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.redstone_depleted, 1), new Object[] { new ItemStack(ModItems.battery_su, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
addShapelessAuto(new ItemStack(ModItems.redstone_depleted, 2), new Object[] { new ItemStack(ModItems.battery_su_l, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
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, 8), new Object[] { "L", "S", 'L', ANY_COKE.gem(), 'S', KEY_STICK });
|
||||
|
||||
|
||||
@ -1364,6 +1364,34 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.circuit_targeting_tier4");
|
||||
ignoreMappings.add("hbm:item.circuit_targeting_tier5");
|
||||
ignoreMappings.add("hbm:item.circuit_targeting_tier6");
|
||||
ignoreMappings.add("hbm:tile.fluid_duct");
|
||||
ignoreMappings.add("hbm:tile.fluid_duct_solid");
|
||||
ignoreMappings.add("hbm:item.void_anim");
|
||||
ignoreMappings.add("hbm:item.pellet_mercury");
|
||||
ignoreMappings.add("hbm:item.pellet_meteorite");
|
||||
ignoreMappings.add("hbm:item.d_smoke1");
|
||||
ignoreMappings.add("hbm:item.d_smoke2");
|
||||
ignoreMappings.add("hbm:item.d_smoke3");
|
||||
ignoreMappings.add("hbm:item.d_smoke4");
|
||||
ignoreMappings.add("hbm:item.d_smoke5");
|
||||
ignoreMappings.add("hbm:item.d_smoke6");
|
||||
ignoreMappings.add("hbm:item.d_smoke7");
|
||||
ignoreMappings.add("hbm:item.d_smoke8");
|
||||
ignoreMappings.add("hbm:item.smoke1");
|
||||
ignoreMappings.add("hbm:item.smoke2");
|
||||
ignoreMappings.add("hbm:item.smoke3");
|
||||
ignoreMappings.add("hbm:item.smoke4");
|
||||
ignoreMappings.add("hbm:item.smoke5");
|
||||
ignoreMappings.add("hbm:item.smoke6");
|
||||
ignoreMappings.add("hbm:item.smoke7");
|
||||
ignoreMappings.add("hbm:item.smoke8");
|
||||
ignoreMappings.add("hbm:item.battery_su");
|
||||
ignoreMappings.add("hbm:item.battery_su_l");
|
||||
ignoreMappings.add("hbm:item.redstone_depleted");
|
||||
ignoreMappings.add("hbm:item.euphemium_stopper");
|
||||
ignoreMappings.add("hbm:item.energy_ball");
|
||||
ignoreMappings.add("hbm:item.discharge");
|
||||
ignoreMappings.add("hbm:item.empblast");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
package com.hbm.render.entity.effect;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.entity.particle.EntityDSmokeFX;
|
||||
import com.hbm.items.ModItems;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class DSmokeRenderer extends Render {
|
||||
private Item field_94151_a;
|
||||
public DSmokeRenderer(Item p_i1259_1_, int p_i1259_2_) {
|
||||
this.field_94151_a = p_i1259_1_;
|
||||
}
|
||||
|
||||
public DSmokeRenderer(Item p_i1260_1_) {
|
||||
this(p_i1260_1_, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
|
||||
if (p_76986_1_ instanceof EntityDSmokeFX) {
|
||||
EntityDSmokeFX fx = (EntityDSmokeFX) p_76986_1_;
|
||||
|
||||
if (fx.particleAge <= fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) {
|
||||
field_94151_a = ModItems.d_smoke8;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) {
|
||||
field_94151_a = ModItems.d_smoke7;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) {
|
||||
field_94151_a = ModItems.d_smoke6;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) {
|
||||
field_94151_a = ModItems.d_smoke5;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) {
|
||||
field_94151_a = ModItems.d_smoke4;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) {
|
||||
field_94151_a = ModItems.d_smoke3;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) {
|
||||
field_94151_a = ModItems.d_smoke2;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) {
|
||||
field_94151_a = ModItems.d_smoke1;
|
||||
}
|
||||
|
||||
IIcon iicon = field_94151_a.getIconFromDamage(0);
|
||||
|
||||
if (iicon != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(7.5F, 7.5F, 7.5F);
|
||||
//
|
||||
//GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//
|
||||
this.bindEntityTexture(p_76986_1_);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
this.func_77026_a(tessellator, iicon);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return TextureMap.locationItemsTexture;
|
||||
}
|
||||
|
||||
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
|
||||
float f = p_77026_2_.getMinU();
|
||||
float f1 = p_77026_2_.getMaxU();
|
||||
float f2 = p_77026_2_.getMinV();
|
||||
float f3 = p_77026_2_.getMaxV();
|
||||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
p_77026_1_.startDrawingQuads();
|
||||
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
|
||||
p_77026_1_.draw();
|
||||
}
|
||||
}
|
||||
@ -1,117 +0,0 @@
|
||||
package com.hbm.render.entity.effect;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.items.ModItems;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ModEffectRenderer extends Render {
|
||||
private Item field_94151_a;
|
||||
public ModEffectRenderer(Item p_i1259_1_, int p_i1259_2_) {
|
||||
this.field_94151_a = p_i1259_1_;
|
||||
}
|
||||
|
||||
public ModEffectRenderer(Item p_i1260_1_) {
|
||||
this(p_i1260_1_, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
if (p_76986_1_ instanceof EntitySmokeFX) {
|
||||
EntitySmokeFX fx = (EntitySmokeFX) p_76986_1_;
|
||||
|
||||
if (fx.particleAge <= fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) {
|
||||
field_94151_a = ModItems.smoke8;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) {
|
||||
field_94151_a = ModItems.smoke7;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) {
|
||||
field_94151_a = ModItems.smoke6;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) {
|
||||
field_94151_a = ModItems.smoke5;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) {
|
||||
field_94151_a = ModItems.smoke4;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) {
|
||||
field_94151_a = ModItems.smoke3;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) {
|
||||
field_94151_a = ModItems.smoke2;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) {
|
||||
field_94151_a = ModItems.smoke1;
|
||||
}
|
||||
|
||||
IIcon iicon = field_94151_a.getIconFromDamage(0);
|
||||
|
||||
if (iicon != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(7.5F, 7.5F, 7.5F);
|
||||
this.bindEntityTexture(p_76986_1_);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
this.func_77026_a(tessellator, iicon);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return TextureMap.locationItemsTexture;
|
||||
}
|
||||
|
||||
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
|
||||
float f = p_77026_2_.getMinU();
|
||||
float f1 = p_77026_2_.getMaxU();
|
||||
float f2 = p_77026_2_.getMinV();
|
||||
float f3 = p_77026_2_.getMaxV();
|
||||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
p_77026_1_.startDrawingQuads();
|
||||
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
|
||||
p_77026_1_.draw();
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
package com.hbm.render.entity.effect;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.entity.particle.EntitySSmokeFX;
|
||||
import com.hbm.items.ModItems;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class SSmokeRenderer extends Render {
|
||||
private Item field_94151_a;
|
||||
public SSmokeRenderer(Item p_i1259_1_, int p_i1259_2_) {
|
||||
this.field_94151_a = p_i1259_1_;
|
||||
}
|
||||
|
||||
public SSmokeRenderer(Item p_i1260_1_) {
|
||||
this(p_i1260_1_, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
if (p_76986_1_ instanceof EntitySSmokeFX) {
|
||||
EntitySSmokeFX fx = (EntitySSmokeFX) p_76986_1_;
|
||||
|
||||
if (fx.particleAge <= fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) {
|
||||
field_94151_a = ModItems.smoke8;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) {
|
||||
field_94151_a = ModItems.smoke7;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) {
|
||||
field_94151_a = ModItems.smoke6;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) {
|
||||
field_94151_a = ModItems.smoke5;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) {
|
||||
field_94151_a = ModItems.smoke4;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) {
|
||||
field_94151_a = ModItems.smoke3;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) {
|
||||
field_94151_a = ModItems.smoke2;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) {
|
||||
field_94151_a = ModItems.smoke1;
|
||||
}
|
||||
|
||||
IIcon iicon = field_94151_a.getIconFromDamage(0);
|
||||
|
||||
if (iicon != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(7.5F, 7.5F, 7.5F);
|
||||
//
|
||||
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||
//
|
||||
this.bindEntityTexture(p_76986_1_);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
this.func_77026_a(tessellator, iicon);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return TextureMap.locationItemsTexture;
|
||||
}
|
||||
|
||||
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
|
||||
float f = p_77026_2_.getMinU();
|
||||
float f1 = p_77026_2_.getMaxU();
|
||||
float f2 = p_77026_2_.getMinV();
|
||||
float f3 = p_77026_2_.getMaxV();
|
||||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
p_77026_1_.startDrawingQuads();
|
||||
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
|
||||
p_77026_1_.draw();
|
||||
}
|
||||
}
|
||||
@ -1,113 +0,0 @@
|
||||
package com.hbm.render.entity.effect;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.entity.particle.EntityTSmokeFX;
|
||||
import com.hbm.items.ModItems;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class TSmokeRenderer extends Render {
|
||||
private Item field_94151_a;
|
||||
public TSmokeRenderer(Item p_i1259_1_, int p_i1259_2_) {
|
||||
this.field_94151_a = p_i1259_1_;
|
||||
}
|
||||
|
||||
public TSmokeRenderer(Item p_i1260_1_) {
|
||||
this(p_i1260_1_, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
|
||||
if (p_76986_1_ instanceof EntityTSmokeFX) {
|
||||
EntityTSmokeFX fx = (EntityTSmokeFX) p_76986_1_;
|
||||
|
||||
if (fx.particleAge <= fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) {
|
||||
field_94151_a = ModItems.d_smoke8;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) {
|
||||
field_94151_a = ModItems.d_smoke7;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) {
|
||||
field_94151_a = ModItems.d_smoke6;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) {
|
||||
field_94151_a = ModItems.d_smoke5;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) {
|
||||
field_94151_a = ModItems.d_smoke4;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) {
|
||||
field_94151_a = ModItems.d_smoke3;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) {
|
||||
field_94151_a = ModItems.d_smoke2;
|
||||
}
|
||||
|
||||
if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) {
|
||||
field_94151_a = ModItems.d_smoke1;
|
||||
}
|
||||
|
||||
IIcon iicon = field_94151_a.getIconFromDamage(0);
|
||||
|
||||
if (iicon != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
//
|
||||
//GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//
|
||||
this.bindEntityTexture(p_76986_1_);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
this.func_77026_a(tessellator, iicon);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return TextureMap.locationItemsTexture;
|
||||
}
|
||||
|
||||
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
|
||||
float f = p_77026_2_.getMinU();
|
||||
float f1 = p_77026_2_.getMaxU();
|
||||
float f2 = p_77026_2_.getMinV();
|
||||
float f3 = p_77026_2_.getMaxV();
|
||||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
p_77026_1_.startDrawingQuads();
|
||||
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
|
||||
p_77026_1_.draw();
|
||||
}
|
||||
}
|
||||
@ -1,194 +0,0 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RenderFluidDuct extends TileEntitySpecialRenderer {
|
||||
|
||||
public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/fluid_duct.png");
|
||||
float pixel = 1F/16F;
|
||||
float textureP = 1F / 32F;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double offsetX, double offsetY, double offsetZ, float f) {
|
||||
GL11.glTranslated(offsetX, offsetY, offsetZ);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.bindTexture(texture);
|
||||
drawCore(tileentity);
|
||||
TileEntityFluidDuct cable = (TileEntityFluidDuct) tileentity;
|
||||
for(int i = 0; i < cable.connections.length; i++)
|
||||
{
|
||||
if(cable.connections[i] != null)
|
||||
{
|
||||
drawConnection(cable.connections[i], cable.getType().getColor());
|
||||
}
|
||||
}
|
||||
GL11.glTranslated(-offsetX, -offsetY, -offsetZ);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
}
|
||||
|
||||
public void drawCore(TileEntity tileentity) {
|
||||
Tessellator tesseract = Tessellator.instance;
|
||||
tesseract.startDrawingQuads();
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 5 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 5 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP);
|
||||
tesseract.draw();
|
||||
}
|
||||
|
||||
public void drawConnection(ForgeDirection direction, int hex)
|
||||
{
|
||||
Tessellator tesseract = Tessellator.instance;
|
||||
tesseract.startDrawingQuads();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(direction.equals(ForgeDirection.UP))
|
||||
{
|
||||
|
||||
}
|
||||
if(direction.equals(ForgeDirection.DOWN))
|
||||
{
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.NORTH))
|
||||
{
|
||||
GL11.glRotatef(270, 1, 0, 0);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.SOUTH))
|
||||
{
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.EAST))
|
||||
{
|
||||
GL11.glRotatef(270, 0, 0, 1);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.WEST))
|
||||
{
|
||||
GL11.glRotatef(90, 0, 0, 1);
|
||||
}
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 5 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 0 * textureP);
|
||||
tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP);
|
||||
tesseract.draw();
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
float p = 0.01F;
|
||||
float n = -0.01F;
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = (hex & 0xFF);
|
||||
tesseract.startDrawing(5);
|
||||
tesseract.setColorRGBA(r, g, b, 255);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawing(5);
|
||||
tesseract.setColorRGBA(r, g, b, 255);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1 - 11 * pixel / 2, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1 - 11 * pixel / 2, 11 * pixel / 2 + p);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawing(5);
|
||||
tesseract.setColorRGBA(r, g, b, 255);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1 - 11 * pixel / 2, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.addVertex(1 - 11 * pixel / 2 + n, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.draw();
|
||||
|
||||
tesseract.startDrawing(5);
|
||||
tesseract.setColorRGBA(r, g, b, 255);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1 - 11 * pixel / 2, 11 * pixel / 2 + p);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.addVertex(11 * pixel / 2 + p, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2 + n);
|
||||
tesseract.draw();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(direction.equals(ForgeDirection.UP))
|
||||
{
|
||||
|
||||
}
|
||||
if(direction.equals(ForgeDirection.DOWN))
|
||||
{
|
||||
GL11.glRotatef(-180, 1, 0, 0);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.NORTH))
|
||||
{
|
||||
GL11.glRotatef(-270, 1, 0, 0);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.SOUTH))
|
||||
{
|
||||
GL11.glRotatef(-90, 1, 0, 0);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.EAST))
|
||||
{
|
||||
GL11.glRotatef(-270, 0, 0, 1);
|
||||
}
|
||||
if(direction.equals(ForgeDirection.WEST))
|
||||
{
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
}
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
}
|
||||
}
|
||||
@ -37,7 +37,7 @@ public abstract class RenderTurretBase extends TileEntitySpecialRenderer {
|
||||
|
||||
private void checkPlug(World world, int x, int y, int z, boolean power, boolean fluid, FluidType type, int ox, int oz, int rot, ForgeDirection dir) {
|
||||
|
||||
if((power && Library.canConnect(world, x, y, z, dir)) || (fluid && Library.checkFluidConnectables(world, x, y, z, type)) || (fluid && Library.canConnectFluid(world, x, y, z, dir, type))) {
|
||||
if((power && Library.canConnect(world, x, y, z, dir)) || (fluid && Library.canConnectFluid(world, x, y, z, dir, type))) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(rot, 0, 1, 0);
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
|
||||
import api.hbm.block.ICrucibleAcceptor;
|
||||
import com.hbm.handler.CompatHandler.OCComponent;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
@ -27,7 +24,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
@Optional.Interface(iface = "com.hbm.handler.CompatHandler.OCComponent", modid = "opencomputers"),
|
||||
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")
|
||||
})
|
||||
public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergyReceiverMK2, IFluidAcceptor, ISidedInventory, IFluidConnector, IHeatSource, ICrucibleAcceptor, SimpleComponent, OCComponent {
|
||||
public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergyReceiverMK2, ISidedInventory, IFluidConnector, IHeatSource, ICrucibleAcceptor, SimpleComponent, OCComponent {
|
||||
|
||||
TileEntity tile;
|
||||
boolean inventory;
|
||||
@ -77,101 +74,6 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
return tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidContainer) {
|
||||
((IFluidContainer)getTile()).setFillForSync(fill, index);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidContainer) {
|
||||
((IFluidContainer)getTile()).setFluidFill(fill, type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFillForReceive(FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
return ((IFluidAcceptor)getTile()).getFluidFillForReceive(type);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFillForReceive(FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
return ((IFluidAcceptor)getTile()).getMaxFluidFillForReceive(type);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveFluid(int amount, FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
((IFluidAcceptor)getTile()).receiveFluid(amount, type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidContainer) {
|
||||
((IFluidContainer)getTile()).setTypeForSync(type, index);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IFluidContainer) {
|
||||
return ((IFluidContainer)getTile()).getFluidFill(type);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
return ((IFluidAcceptor)getTile()).getMaxFluidFill(type);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
|
||||
|
||||
@ -31,10 +31,7 @@ import com.hbm.blocks.network.CranePartitioner.TileEntityCranePartitioner;
|
||||
import com.hbm.blocks.network.FluidDuctGauge.TileEntityPipeGauge;
|
||||
import com.hbm.blocks.network.FluidDuctPaintable.TileEntityPipePaintable;
|
||||
import com.hbm.blocks.rail.RailStandardSwitch.TileEntityRailSwitch;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.conductor.*;
|
||||
import com.hbm.tileentity.deco.*;
|
||||
import com.hbm.tileentity.machine.*;
|
||||
import com.hbm.tileentity.machine.oil.*;
|
||||
@ -43,9 +40,7 @@ import com.hbm.tileentity.machine.rbmk.*;
|
||||
import com.hbm.tileentity.machine.storage.*;
|
||||
import com.hbm.tileentity.network.*;
|
||||
import com.hbm.tileentity.turret.*;
|
||||
import com.hbm.util.LoggingUtil;
|
||||
|
||||
import api.hbm.fluid.IFluidConnector;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileMappings {
|
||||
@ -96,8 +91,6 @@ public class TileMappings {
|
||||
put(TileEntityMachineRTG.class, "tileentity_machine_rtg");
|
||||
put(TileEntityMachineExcavator.class, "tileentity_ntm_excavator");
|
||||
put(TileEntityMachineOreSlopper.class, "tileentity_ore_slopper");
|
||||
put(TileEntityFluidDuctSimple.class, "tileentity_universal_duct_simple");
|
||||
put(TileEntityFluidDuct.class, "tileentity_universal_duct");
|
||||
put(TileEntityMachineDrain.class, "tileentity_fluid_drain");
|
||||
put(TileEntityMachineFluidTank.class, "tileentity_fluid_tank");
|
||||
put(TileEntityMachineTurbofan.class, "tileentity_machine_turbofan");
|
||||
@ -424,9 +417,9 @@ public class TileMappings {
|
||||
private static void put(Class<? extends TileEntity> clazz, String... names) {
|
||||
map.put(clazz, names);
|
||||
|
||||
if((IFluidSource.class.isAssignableFrom(clazz) || IFluidAcceptor.class.isAssignableFrom(clazz)) && !IFluidConnector.class.isAssignableFrom(clazz)) {
|
||||
/*if((IFluidSource.class.isAssignableFrom(clazz) || IFluidAcceptor.class.isAssignableFrom(clazz)) && !IFluidConnector.class.isAssignableFrom(clazz)) {
|
||||
LoggingUtil.errorWithHighlight(clazz.getCanonicalName() + " implements the old interfaces but not IFluidConnector!");
|
||||
}
|
||||
}*/
|
||||
|
||||
if(IConfigurableMachine.class.isAssignableFrom(clazz)) {
|
||||
configurables.add((Class<? extends IConfigurableMachine>) clazz);
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.entity.missile.EntityMissileCustom;
|
||||
import com.hbm.handler.MissileStruct;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerCompactLauncher;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -48,7 +47,7 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityCompactLauncher extends TileEntityLoadedBase implements ISidedInventory, IFluidContainer, IFluidAcceptor, IEnergyReceiverMK2, IFluidStandardReceiver, IGUIProvider, IRadarCommandReceiver {
|
||||
public class TileEntityCompactLauncher extends TileEntityLoadedBase implements ISidedInventory, IFluidContainer, IEnergyReceiverMK2, IFluidStandardReceiver, IGUIProvider, IRadarCommandReceiver {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
@ -547,45 +546,17 @@ public class TileEntityCompactLauncher extends TileEntityLoadedBase implements I
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(fill);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.entity.missile.EntityMissileCustom;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.handler.MissileStruct;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerLaunchTable;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -54,7 +53,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISidedInventory, IEnergyReceiverMK2, IFluidContainer, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, SimpleComponent, IRadarCommandReceiver, CompatHandler.OCComponent {
|
||||
public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISidedInventory, IEnergyReceiverMK2, IFluidContainer, IFluidStandardReceiver, IGUIProvider, SimpleComponent, IRadarCommandReceiver, CompatHandler.OCComponent {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
@ -545,45 +544,17 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(fill);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
package com.hbm.tileentity.conductor;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TileEntityFluidDuct extends TileEntityFluidDuctSimple {
|
||||
|
||||
public TileEntityFluidDuct() { }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -1,102 +0,0 @@
|
||||
package com.hbm.tileentity.conductor;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityFluidDuctSimple extends TileEntity implements IFluidDuct {
|
||||
|
||||
protected FluidType type = Fluids.NONE;
|
||||
|
||||
|
||||
public ForgeDirection[] connections = new ForgeDirection[6];
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
this.writeToNBT(nbt);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
this.readFromNBT(pkt.func_148857_g());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
type = Fluids.fromID(nbt.getInteger("fluid"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("fluid", type.getID());
|
||||
}
|
||||
|
||||
public boolean setType(FluidType type) {
|
||||
|
||||
if(this.type == type)
|
||||
return true;
|
||||
|
||||
this.type = type;
|
||||
this.markDirty();
|
||||
|
||||
if(worldObj instanceof WorldServer) {
|
||||
WorldServer world = (WorldServer) worldObj;
|
||||
world.getPlayerManager().markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
/*this.updateConnections();
|
||||
|
||||
if(lastType != type) {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
lastType = type;
|
||||
}*/
|
||||
|
||||
if(this.getBlockType() == ModBlocks.fluid_duct) worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.fluid_duct_neo);
|
||||
if(this.getBlockType() == ModBlocks.fluid_duct_solid) worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.fluid_duct_paintable);
|
||||
|
||||
TileEntity tile = worldObj.getTileEntity(xCoord, yCoord, zCoord);
|
||||
if(tile instanceof TileEntityPipeBaseNT) {
|
||||
((TileEntityPipeBaseNT) tile).setType(this.type);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateConnections() {
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord + 1, zCoord, type)) connections[0] = ForgeDirection.UP;
|
||||
else connections[0] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord - 1, zCoord, type)) connections[1] = ForgeDirection.DOWN;
|
||||
else connections[1] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord - 1, type)) connections[2] = ForgeDirection.NORTH;
|
||||
else connections[2] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord + 1, yCoord, zCoord, type)) connections[3] = ForgeDirection.EAST;
|
||||
else connections[3] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord + 1, type)) connections[4] = ForgeDirection.SOUTH;
|
||||
else connections[4] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord - 1, yCoord, zCoord, type)) connections[5] = ForgeDirection.WEST;
|
||||
else connections[5] = null;
|
||||
}
|
||||
}
|
||||
@ -1,19 +1,14 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -41,7 +36,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IEnergyProviderMK2, INBTPacketReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
public class TileEntityChungus extends TileEntityLoadedBase implements IEnergyProviderMK2, INBTPacketReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000000000L;
|
||||
@ -50,8 +45,6 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
public float lastRotor;
|
||||
public float fanAcceleration = 0F;
|
||||
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
|
||||
public FluidTank[] tanks;
|
||||
protected double[] info = new double[3];
|
||||
|
||||
@ -60,8 +53,8 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
|
||||
public TileEntityChungus() {
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.STEAM, 1000000000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.SPENTSTEAM, 1000000000, 1);
|
||||
tanks[0] = new FluidTank(Fluids.STEAM, 1_000_000_000);
|
||||
tanks[1] = new FluidTank(Fluids.SPENTSTEAM, 1_000_000_000);
|
||||
|
||||
Random rand = new Random();
|
||||
audioDesync = rand.nextFloat() * 0.05F;
|
||||
@ -112,10 +105,7 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
|
||||
turnTimer--;
|
||||
|
||||
if(operational)
|
||||
turnTimer = 25;
|
||||
|
||||
this.fillFluidInit(tanks[1].getTankType());
|
||||
if(operational) turnTimer = 25;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
@ -217,74 +207,6 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
tanks[1].writeToNBT(nbt, "steam");
|
||||
nbt.setLong("power", power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
dir = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
fillFluid(xCoord + dir.offsetX * 3, yCoord, zCoord + dir.offsetZ * 3, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * -3, yCoord, zCoord + dir.offsetZ * -3, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return worldObj.getTotalWorldTime() % 2 == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
tanks[0].setFill(i);
|
||||
else if(type == tanks[1].getTankType())
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
return tanks[0].getFill();
|
||||
else if(type == tanks[1].getTankType())
|
||||
return tanks[1].getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list2.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerCoreInjector;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -28,7 +28,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityCoreInjector extends TileEntityMachineBase implements IFluidAcceptor, IFluidStandardReceiver, SimpleComponent, IGUIProvider, CompatHandler.OCComponent {
|
||||
public class TileEntityCoreInjector extends TileEntityMachineBase implements IFluidContainer, IFluidStandardReceiver, SimpleComponent, IGUIProvider, CompatHandler.OCComponent {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
public static final int range = 15;
|
||||
@ -117,34 +117,6 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
||||
beam = data.getInteger("beam");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerCoreReceiver;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -33,7 +33,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEnergyProviderMK2, IFluidAcceptor, ILaserable, IFluidStandardReceiver, SimpleComponent, IGUIProvider, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEnergyProviderMK2, IFluidContainer, ILaserable, IFluidStandardReceiver, SimpleComponent, IGUIProvider, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
|
||||
public long power;
|
||||
public long joules;
|
||||
@ -105,28 +105,6 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
@ -11,9 +9,6 @@ import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable;
|
||||
@ -38,11 +33,10 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluidSource, IFluidAcceptor, INBTPacketReceiver, IFluidStandardTransceiver, IConfigurableMachine {
|
||||
public class TileEntityHeatBoiler extends TileEntityLoadedBase implements INBTPacketReceiver, IFluidStandardTransceiver, IConfigurableMachine {
|
||||
|
||||
public int heat;
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
public boolean isOn;
|
||||
public boolean hasExploded = false;
|
||||
|
||||
@ -88,7 +82,6 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluid
|
||||
|
||||
if(this.tanks[1].getFill() > 0) {
|
||||
this.sendFluid();
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,62 +282,6 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluid
|
||||
nbt.setBoolean("exploded", hasExploded);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
tank.setFill(fill);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void setFillForSync(int fill, int index) { }
|
||||
@Override public void setTypeForSync(FluidType type, int index) { }
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
return tank.getFill();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type == tanks[0].getTankType() ? tanks[0].getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getRotation(ForgeDirection.UP);
|
||||
this.fillFluid(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, this.getTact(), type);
|
||||
this.fillFluid(xCoord - dir.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2, this.getTact(), type);
|
||||
this.fillFluid(xCoord, yCoord + 4, zCoord, this.getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return worldObj.getTotalWorldTime() % 2 == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
this.list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
|
||||
@ -9,8 +9,7 @@ import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerITER;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -53,13 +52,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityITER extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, IGUIProvider, IInfoProviderEC, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityITER extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidContainer, IFluidStandardTransceiver, IGUIProvider, IInfoProviderEC, SimpleComponent, CompatHandler.OCComponent {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 10000000;
|
||||
public static final int powerReq = 100000;
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
public FluidTank plasma;
|
||||
|
||||
@ -96,14 +93,6 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyRece
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
age++;
|
||||
if (age >= 20) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if (age == 9 || age == 19)
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
|
||||
this.updateConnections();
|
||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
@ -419,16 +408,6 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyRece
|
||||
plasma.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
else if (type.name().equals(plasma.getTankType().name()))
|
||||
plasma.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
@ -438,60 +417,6 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyRece
|
||||
plasma.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else if (type.name().equals(plasma.getTankType().name()))
|
||||
return plasma.getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(xCoord, yCoord - 3, zCoord, getTact(), type);
|
||||
fillFluid(xCoord, yCoord + 3, zCoord, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else if (type.name().equals(plasma.getTankType().name()))
|
||||
return plasma.getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
|
||||
@ -6,7 +6,6 @@ import java.util.HashMap;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.container.ContainerMachineDiesel;
|
||||
@ -38,7 +37,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineDiesel extends TileEntityMachinePolluting implements IEnergyProviderMK2, IFluidContainer, IFluidAcceptor, IFluidStandardTransceiver, IConfigurableMachine, IGUIProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineDiesel extends TileEntityMachinePolluting implements IEnergyProviderMK2, IFluidContainer, IFluidStandardTransceiver, IConfigurableMachine, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public int soundCycle = 0;
|
||||
@ -248,22 +247,6 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] {tank};
|
||||
|
||||
@ -1,351 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityMachineInserter extends TileEntity implements ISidedInventory, IFluidContainer, IFluidSource, IFluidAcceptor {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
//public static final int maxFill = 64 * 3;
|
||||
public FluidTank tanks[];
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {0};
|
||||
private static final int[] slots_side = new int[] {0};
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list1 = new ArrayList();
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
public List<IFluidAcceptor> list3 = new ArrayList();
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineInserter() {
|
||||
slots = new ItemStack[9];
|
||||
tanks = new FluidTank[3];
|
||||
tanks[0] = new FluidTank(Fluids.NONE, 32000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.NONE, 32000, 0);
|
||||
tanks[2] = new FluidTank(Fluids.NONE, 32000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.inserter";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
tanks[0].readFromNBT(nbt, "content1");
|
||||
tanks[1].readFromNBT(nbt, "content2");
|
||||
tanks[2].readFromNBT(nbt, "content3");
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
tanks[0].writeToNBT(nbt, "content1");
|
||||
tanks[1].writeToNBT(nbt, "content2");
|
||||
tanks[2].writeToNBT(nbt, "content3");
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
age++;
|
||||
if(age >= 20)
|
||||
{
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if(age == 9 || age == 19) {
|
||||
if(dna1())
|
||||
fillFluidInit(tanks[0].getTankType());
|
||||
if(dna2())
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
if(dna3())
|
||||
fillFluidInit(tanks[2].getTankType());
|
||||
}
|
||||
|
||||
tanks[0].setType(1, 2, slots);
|
||||
tanks[1].setType(4, 5, slots);
|
||||
tanks[2].setType(7, 8, slots);
|
||||
tanks[0].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
tanks[1].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
tanks[2].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean dna1() {
|
||||
if(slots[0] != null && (slots[0].getItem() == ModItems.fuse || slots[0].getItem() == ModItems.screwdriver))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean dna2() {
|
||||
if(slots[3] != null && (slots[3].getItem() == ModItems.fuse || slots[3].getItem() == ModItems.screwdriver))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean dna3() {
|
||||
if(slots[6] != null && (slots[6].getItem() == ModItems.fuse || slots[6].getItem() == ModItems.screwdriver))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
tanks[2].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
return tanks[2].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
return tanks[2].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return list1;
|
||||
if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return list2;
|
||||
if(type.name().equals(tanks[2].getTankType().name()))
|
||||
return list3;
|
||||
return new ArrayList<IFluidAcceptor>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
list1.clear();
|
||||
if(type.name().equals(tanks[1].getTankType().name()))
|
||||
list2.clear();
|
||||
if(type.name().equals(tanks[2].getTankType().name()))
|
||||
list3.clear();
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,10 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.container.ContainerMachineLargeTurbine;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -44,12 +40,10 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityMachineLargeTurbine extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IEnergyProviderMK2, IFluidStandardTransceiver, IGUIProvider, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
public class TileEntityMachineLargeTurbine extends TileEntityMachineBase implements IFluidContainer, IEnergyProviderMK2, IFluidStandardTransceiver, IGUIProvider, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000000;
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
protected double[] info = new double[3];
|
||||
|
||||
@ -84,13 +78,6 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
|
||||
this.info = new double[3];
|
||||
|
||||
age++;
|
||||
if(age >= 2) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
this.tryProvide(worldObj, xCoord + dir.offsetX * -4, yCoord, zCoord + dir.offsetZ * -4, dir.getOpposite());
|
||||
for(DirPos pos : getConPos()) this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
@ -210,57 +197,6 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
nbt.setLong("power", power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
dir = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
fillFluid(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * -2, yCoord, zCoord + dir.offsetZ * -2, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
@ -272,16 +208,6 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list2.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerMiningLaser;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -54,14 +52,13 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineMiningLaser extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidSource, IMiningDrill, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider {
|
||||
public class TileEntityMachineMiningLaser extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidContainer, IMiningDrill, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider {
|
||||
|
||||
public long power;
|
||||
public int age = 0;
|
||||
public static final long maxPower = 100000000;
|
||||
public static final int consumption = 10000;
|
||||
public FluidTank tank;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
|
||||
public boolean isOn;
|
||||
public int targetX;
|
||||
@ -95,14 +92,6 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
||||
|
||||
this.updateConnections();
|
||||
|
||||
age++;
|
||||
if (age >= 20) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if (age == 9 || age == 19)
|
||||
fillFluidInit(tank.getTankType());
|
||||
|
||||
this.sendFluid(tank, worldObj, xCoord + 2, yCoord, zCoord, Library.POS_X);
|
||||
this.sendFluid(tank, worldObj, xCoord - 2, yCoord, zCoord, Library.NEG_X);
|
||||
this.sendFluid(tank, worldObj, xCoord, yCoord + 2, zCoord, Library.POS_Z);
|
||||
@ -622,57 +611,11 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if(type == Fluids.OIL)
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == Fluids.OIL)
|
||||
return tank.getFill();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
fillFluid(xCoord + 2, yCoord, zCoord, this.getTact(), type);
|
||||
fillFluid(xCoord - 2, yCoord, zCoord, this.getTact(), type);
|
||||
fillFluid(xCoord, yCoord, zCoord + 2, this.getTact(), type);
|
||||
fillFluid(xCoord, yCoord, zCoord - 2, this.getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachineITER;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerPlasmaHeater;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -29,7 +29,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase implements IFluidAcceptor, IEnergyReceiverMK2, IFluidStandardReceiver, IGUIProvider {
|
||||
public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase implements IFluidContainer, IEnergyReceiverMK2, IFluidStandardReceiver, IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000000;
|
||||
@ -212,40 +212,6 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
plasma.writeToNBT(nbt, "plasma");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else if (type.name().equals(plasma.getTankType().name()))
|
||||
return plasma.getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
else if (type.name().equals(plasma.getTankType().name()))
|
||||
plasma.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else if (type.name().equals(plasma.getTankType().name()))
|
||||
return plasma.getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.container.ContainerRadiolysis;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -39,15 +34,13 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineRadiolysis extends TileEntityMachineBase implements IEnergyProviderMK2, IFluidAcceptor, IFluidSource, IFluidContainer, IFluidStandardTransceiver, IGUIProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineRadiolysis extends TileEntityMachineBase implements IEnergyProviderMK2, IFluidContainer, IFluidStandardTransceiver, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final int maxPower = 1000000;
|
||||
public int heat;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list1 = new ArrayList();
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
|
||||
private static final int[] slot_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13 };
|
||||
private static final int[] slot_rtg = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
@ -138,11 +131,6 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
sterilize();
|
||||
}
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
fillFluidInit(tanks[2].getTankType());
|
||||
}
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.tryProvide(worldObj, pos.getX(), pos.getY(),pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(),pos.getZ(), pos.getDir());
|
||||
@ -268,73 +256,11 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
this.tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
return tank.getFill();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(tanks[0].getTankType() == type) {
|
||||
return tanks[0].getMaxFill();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord, this.getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, this.getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 2, this.getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 2, this.getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return worldObj.getTotalWorldTime() % 20 < 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
if(type == tanks[1].getTankType())
|
||||
return list1;
|
||||
if(type == tanks[2].getTankType())
|
||||
return list2;
|
||||
return new ArrayList<IFluidAcceptor>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
if(type == tanks[1].getTankType())
|
||||
list1.clear();
|
||||
if(type == tanks[2].getTankType())
|
||||
list2.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
|
||||
@ -279,24 +279,6 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
|
||||
@ -5,11 +5,8 @@ import java.util.List;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerMachineTurbofan;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible;
|
||||
@ -50,7 +47,7 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implements IEnergyProviderMK2, IFluidContainer, IFluidAcceptor, IFluidStandardTransceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implements IEnergyProviderMK2, IFluidStandardTransceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1_000_000;
|
||||
@ -438,32 +435,6 @@ public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implem
|
||||
public void setPower(long i) {
|
||||
this.power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
@ -13,19 +13,14 @@ import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.container.ContainerReactorZirnox;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIReactorZirnox;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemZirnoxRod;
|
||||
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
@ -53,7 +48,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IGUIProvider, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IGUIProvider, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
|
||||
public int heat;
|
||||
public static final int maxHeat = 100000;
|
||||
@ -61,9 +56,6 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
public static final int maxPressure = 100000;
|
||||
public boolean isOn = false;
|
||||
|
||||
public List<IFluidAcceptor> list = new ArrayList<IFluidAcceptor>();
|
||||
public byte age;
|
||||
|
||||
public FluidTank steam;
|
||||
public FluidTank carbonDioxide;
|
||||
public FluidTank water;
|
||||
@ -88,9 +80,9 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
|
||||
public TileEntityReactorZirnox() {
|
||||
super(28);
|
||||
steam = new FluidTank(Fluids.SUPERHOTSTEAM, 8000, 0);
|
||||
carbonDioxide = new FluidTank(Fluids.CARBONDIOXIDE, 16000, 1);
|
||||
water = new FluidTank(Fluids.WATER, 32000, 2);
|
||||
steam = new FluidTank(Fluids.SUPERHOTSTEAM, 8000);
|
||||
carbonDioxide = new FluidTank(Fluids.CARBONDIOXIDE, 16000);
|
||||
water = new FluidTank(Fluids.WATER, 32000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -193,15 +185,6 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.output = 0;
|
||||
age++;
|
||||
|
||||
if (age >= 20) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if(age == 9 || age == 19) {
|
||||
fillFluidInit(steam.getTankType());
|
||||
}
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
this.updateConnections();
|
||||
@ -395,23 +378,6 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
fillFluid(this.xCoord + rot.offsetX * 3, this.yCoord + 1, this.zCoord + rot.offsetZ * 3, getTact(), type);
|
||||
fillFluid(this.xCoord + rot.offsetX * 3, this.yCoord + 3, this.zCoord + rot.offsetZ * 3, getTact(), type);
|
||||
|
||||
fillFluid(this.xCoord + rot.offsetX * -3, this.yCoord + 1, this.zCoord + rot.offsetZ * -3, getTact(), type);
|
||||
fillFluid(this.xCoord + rot.offsetX * -3, this.yCoord + 3, this.zCoord + rot.offsetZ * -3, getTact(), type);
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
@ -431,59 +397,6 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
};
|
||||
}
|
||||
|
||||
public boolean getTact() {
|
||||
if(age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type == Fluids.SUPERHOTSTEAM) return 0;
|
||||
if(type == Fluids.CARBONDIOXIDE) return carbonDioxide.getMaxFill();
|
||||
if(type == Fluids.WATER) return water.getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == Fluids.SUPERHOTSTEAM) steam.setFill(i);
|
||||
if(type == Fluids.CARBONDIOXIDE) carbonDioxide.setFill(i);
|
||||
if(type == Fluids.WATER) water.setFill(i);
|
||||
}
|
||||
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == Fluids.SUPERHOTSTEAM) return steam.getFill();
|
||||
if(type == Fluids.CARBONDIOXIDE) return carbonDioxide.getFill();
|
||||
if(type == Fluids.WATER) return water.getFill();
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setFillForSync(int fill, int index) {
|
||||
switch (index) {
|
||||
case 0: steam.setFill(fill);
|
||||
break;
|
||||
case 1: carbonDioxide.setFill(fill);
|
||||
break;
|
||||
case 2: water.setFill(fill);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
switch (index) {
|
||||
case 0: steam.setTankType(type);
|
||||
break;
|
||||
case 1: carbonDioxide.setTankType(type);
|
||||
break;
|
||||
case 2: water.setTankType(type);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList<FluidTank>();
|
||||
list.add(steam);
|
||||
@ -493,14 +406,6 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return AxisAlignedBB.getBoundingBox(xCoord - 2, yCoord, zCoord - 2, xCoord + 3, yCoord + 5, zCoord + 3);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.container.ContainerSILEX;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -35,7 +34,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, IInfoProviderEC {
|
||||
public class TileEntitySILEX extends TileEntityMachineBase implements IFluidStandardReceiver, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public EnumWavelengths mode = EnumWavelengths.NULL;
|
||||
public boolean hasLaser;
|
||||
@ -54,7 +53,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
|
||||
public TileEntitySILEX() {
|
||||
super(11);
|
||||
tank = new FluidTank(Fluids.PEROXIDE, 16000, 0);
|
||||
tank = new FluidTank(Fluids.PEROXIDE, 16000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -345,41 +344,6 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
if(type == tank.getTankType())
|
||||
return tank.getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
if(type == tank.getTankType())
|
||||
return tank.getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[] {tank};
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
@ -24,19 +19,18 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, IBufPacketReceiver {
|
||||
public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFluidStandardTransceiver, IBufPacketReceiver {
|
||||
|
||||
private FluidTank water;
|
||||
private FluidTank steam;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
public int heat;
|
||||
|
||||
public HashSet<ChunkCoordinates> primary = new HashSet();
|
||||
public HashSet<ChunkCoordinates> secondary = new HashSet();
|
||||
|
||||
public TileEntitySolarBoiler() {
|
||||
water = new FluidTank(Fluids.WATER, 100, 0);
|
||||
steam = new FluidTank(Fluids.STEAM, 10_000, 1);
|
||||
water = new FluidTank(Fluids.WATER, 100);
|
||||
steam = new FluidTank(Fluids.STEAM, 10_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,76 +66,6 @@ public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFlui
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index == 0)
|
||||
water.setFill(fill);
|
||||
if(index == 1)
|
||||
steam.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if(type == Fluids.WATER)
|
||||
water.setFill(fill);
|
||||
if(type == Fluids.STEAM)
|
||||
steam.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index == 0)
|
||||
water.setTankType(type);
|
||||
if(index == 1)
|
||||
steam.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == Fluids.WATER)
|
||||
return water.getFill();
|
||||
if(type == Fluids.STEAM)
|
||||
return steam.getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord, this.yCoord + 3, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return worldObj.getTotalWorldTime() % 2 == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type == Fluids.WATER)
|
||||
return water.getMaxFill();
|
||||
if(type == Fluids.STEAM)
|
||||
return steam.getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.entity.missile.EntitySoyuz;
|
||||
import com.hbm.handler.MissileStruct;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerSoyuzLauncher;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -38,7 +37,7 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements ISidedInventory, IEnergyReceiverMK2, IFluidContainer, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider {
|
||||
public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements ISidedInventory, IEnergyReceiverMK2, IFluidContainer, IFluidStandardReceiver, IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1000000;
|
||||
@ -400,46 +399,18 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(fill);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerStorageDrum;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -16,7 +14,6 @@ import com.hbm.inventory.gui.GUIStorageDrum;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemWasteLong;
|
||||
import com.hbm.items.special.ItemWasteShort;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
@ -37,12 +34,10 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityStorageDrum extends TileEntityMachineBase implements IFluidSource, IFluidStandardSender, IGUIProvider {
|
||||
public class TileEntityStorageDrum extends TileEntityMachineBase implements IFluidContainer, IFluidStandardSender, IGUIProvider {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
private static final int[] slots_arr = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 };
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
public int age = 0;
|
||||
|
||||
public TileEntityStorageDrum() {
|
||||
@ -148,13 +143,6 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
||||
if(age >= 20)
|
||||
age -= 20;
|
||||
|
||||
if(age == 9 || age == 19) {
|
||||
fillFluidInit(tanks[0].getTankType());
|
||||
}
|
||||
if(age == 8 || age == 18) {
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
}
|
||||
|
||||
this.sendFluidToAll(tanks[0], this);
|
||||
this.sendFluidToAll(tanks[1], this);
|
||||
|
||||
@ -246,62 +234,6 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
||||
return slots_arr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return age < 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
return tanks[0].getFill();
|
||||
else if(type == tanks[1].getTankType())
|
||||
return tanks[1].getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
tanks[0].setFill(i);
|
||||
else if(type == tanks[1].getTankType())
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
return list;
|
||||
if(type == tanks[1].getTankType())
|
||||
return list2;
|
||||
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
this.list.clear();
|
||||
if(type == tanks[1].getTankType())
|
||||
this.list2.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
|
||||
@ -6,9 +6,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.container.ContainerMachineOilWell;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIMachineOilWell;
|
||||
@ -30,7 +28,7 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase implements IFluidAcceptor {
|
||||
public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase {
|
||||
|
||||
protected static int maxPower = 5_000_000;
|
||||
protected static int consumption = 5000;
|
||||
@ -48,9 +46,9 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
|
||||
public TileEntityMachineFrackingTower() {
|
||||
super();
|
||||
tanks = new FluidTank[3];
|
||||
tanks[0] = new FluidTank(Fluids.OIL, 64_000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.GAS, 64_000, 1);
|
||||
tanks[2] = new FluidTank(Fluids.FRACKSOL, 64_000, 2);
|
||||
tanks[0] = new FluidTank(Fluids.OIL, 64_000);
|
||||
tanks[1] = new FluidTank(Fluids.GAS, 64_000);
|
||||
tanks[2] = new FluidTank(Fluids.FRACKSOL, 64_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -134,19 +132,6 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
|
||||
OilSpot.generateOilSpot(worldObj, xCoord, zCoord, destructionRange, 10, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type == tanks[2].getTankType() ? tanks[2].getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { tanks[0], tanks[1] };
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerMachineGasFlare;
|
||||
@ -44,7 +43,7 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineGasFlare extends TileEntityMachineBase implements IEnergyProviderMK2, IFluidContainer, IFluidAcceptor, IFluidStandardReceiver, IControlReceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineGasFlare extends TileEntityMachineBase implements IEnergyProviderMK2, IFluidContainer, IFluidStandardReceiver, IControlReceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -289,22 +288,6 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { tank };
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
package com.hbm.tileentity.machine.oil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerLiquefactor;
|
||||
@ -37,7 +35,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineLiquefactor extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidSource, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineLiquefactor extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidContainer, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -80,10 +78,6 @@ public class TileEntityMachineLiquefactor extends TileEntityMachineBase implemen
|
||||
else
|
||||
this.progress = 0;
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
this.fillFluidInit(tank.getTankType());
|
||||
}
|
||||
|
||||
this.sendFluid();
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
@ -211,54 +205,11 @@ public class TileEntityMachineLiquefactor extends TileEntityMachineBase implemen
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type == tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(xCoord, yCoord - 1, zCoord, getTact(), type);
|
||||
fillFluid(xCoord, yCoord + 4, zCoord, getTact(), type);
|
||||
fillFluid(xCoord + 2, yCoord + 1, zCoord, getTact(), type);
|
||||
fillFluid(xCoord - 2, yCoord + 1, zCoord, getTact(), type);
|
||||
fillFluid(xCoord, yCoord + 1, zCoord + 2, getTact(), type);
|
||||
fillFluid(xCoord, yCoord + 1, zCoord - 2, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return worldObj.getTotalWorldTime() % 20 < 10;
|
||||
}
|
||||
|
||||
private List<IFluidAcceptor> consumers = new ArrayList();
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return consumers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
consumers.clear();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -8,7 +8,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.inventory.container.ContainerMachineOilWell;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.gui.GUIMachineOilWell;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
@ -105,14 +104,6 @@ public class TileEntityMachineOilWell extends TileEntityOilDrillBase {
|
||||
worldObj.setBlock(x, y, z, ModBlocks.ore_oil_empty);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.container.ContainerMachineOilWell;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.gui.GUIMachineOilWell;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
@ -141,25 +140,6 @@ public class TileEntityMachinePumpjack extends TileEntityOilDrillBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
int pX2 = xCoord + rot.offsetX * 2;
|
||||
int pZ2 = zCoord + rot.offsetZ * 2;
|
||||
int pX4 = xCoord + rot.offsetX * 4;
|
||||
int pZ4 = zCoord + rot.offsetZ * 4;
|
||||
int oX = Math.abs(dir.offsetX) * 2;
|
||||
int oZ = Math.abs(dir.offsetZ) * 2;
|
||||
|
||||
fillFluid(pX2 + oX, this.yCoord, pZ2 + oZ, getTact(), type);
|
||||
fillFluid(pX2 - oX, this.yCoord, pZ2 - oZ, getTact(), type);
|
||||
fillFluid(pX4 + oX, this.yCoord, pZ4 + oZ, getTact(), type);
|
||||
fillFluid(pX4 - oX, this.yCoord, pZ4 - oZ, getTact(), type);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.tileentity.machine.oil;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerSolidifier;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -35,7 +35,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineSolidifier extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineSolidifier extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidContainer, IFluidStandardReceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -214,26 +214,10 @@ public class TileEntityMachineSolidifier extends TileEntityMachineBase implement
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return tank.getTankType() == type ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return tank.getTankType() == type ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
|
||||
@ -1,14 +1,9 @@
|
||||
package com.hbm.tileentity.machine.oil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
@ -35,21 +30,19 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public abstract class TileEntityOilDrillBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidSource, IFluidStandardTransceiver, IConfigurableMachine, IPersistentNBT, IGUIProvider, IUpgradeInfoProvider {
|
||||
public abstract class TileEntityOilDrillBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver, IConfigurableMachine, IPersistentNBT, IGUIProvider, IUpgradeInfoProvider {
|
||||
|
||||
public int indicator = 0;
|
||||
|
||||
public long power;
|
||||
|
||||
public List<IFluidAcceptor> list1 = new ArrayList();
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
|
||||
public TileEntityOilDrillBase() {
|
||||
super(8);
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.OIL, 64_000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.GAS, 64_000, 1);
|
||||
tanks[0] = new FluidTank(Fluids.OIL, 64_000);
|
||||
tanks[1] = new FluidTank(Fluids.GAS, 64_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -127,11 +120,6 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
|
||||
if(this.worldObj.getTotalWorldTime() % 10 == 0)
|
||||
this.fillFluidInit(tanks[0].getTankType());
|
||||
if(this.worldObj.getTotalWorldTime() % 10 == 5)
|
||||
this.fillFluidInit(tanks[1].getTankType());
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
if(tanks[0].getFill() > 0) this.sendFluid(tanks[0], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
if(tanks[1].getFill() > 0) this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
@ -286,62 +274,6 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
|
||||
|
||||
public abstract void onSuck(int x, int y, int z);
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return this.worldObj.getTotalWorldTime() % 20 < 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(type == tank.getTankType()) {
|
||||
return tank.getFill();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(type == tank.getTankType()) {
|
||||
tank.setFill(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
if(type == tanks[0].getTankType()) return this.list1;
|
||||
if(type == tanks[1].getTankType()) return this.list2;
|
||||
return new ArrayList<IFluidAcceptor>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
if(type == tanks[0].getTankType()) list1.clear();
|
||||
if(type == tanks[1].getTankType()) list2.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < tanks.length && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < tanks.length && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
this.power = i;
|
||||
|
||||
@ -9,8 +9,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerRBMKGeneric;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -34,15 +33,11 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements IFluidAcceptor, IFluidSource, IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements IFluidContainer, IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent {
|
||||
|
||||
public FluidTank feed;
|
||||
public FluidTank steam;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
protected int consumption;
|
||||
protected int output;
|
||||
|
||||
@ -103,8 +98,6 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
this.heat -= waterUsed * HEAT_PER_MB_WATER;
|
||||
}
|
||||
|
||||
fillFluidInit(steam.getTankType());
|
||||
|
||||
this.trySubscribe(feed.getTankType(), worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||
for(DirPos pos : getOutputPos()) {
|
||||
if(this.steam.getFill() > 0) this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
@ -129,31 +122,6 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
if(type == Fluids.ULTRAHOTSTEAM) return 1000D;
|
||||
return 0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
}
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 2, zCoord) == ModBlocks.rbmk_loader) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 3, this.zCoord, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
protected DirPos[] getOutputPos() {
|
||||
|
||||
@ -182,46 +150,6 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated //why are we still doing this?
|
||||
public boolean getTact() { return worldObj.getTotalWorldTime() % 2 == 0; }
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
|
||||
if(type == feed.getTankType())
|
||||
feed.setFill(i);
|
||||
else if(type == steam.getTankType())
|
||||
steam.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
if(type == feed.getTankType())
|
||||
return feed.getFill();
|
||||
else if(type == steam.getTankType())
|
||||
return steam.getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
if(type == feed.getTankType())
|
||||
return feed.getMaxFill();
|
||||
else if(type == steam.getTankType())
|
||||
return steam.getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
|
||||
@ -240,16 +168,6 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
steam.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
@ -2,8 +2,6 @@ package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
@ -21,7 +19,7 @@ import net.minecraft.util.DamageSource;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAcceptor, IFluidStandardReceiver, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidStandardReceiver, SimpleComponent, CompatHandler.OCComponent {
|
||||
|
||||
private FluidTank tank;
|
||||
private int lastCooled;
|
||||
@ -108,32 +106,6 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
|
||||
return ColumnType.COOLER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if (type == tank.getTankType())
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type == tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type == tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[]{tank};
|
||||
|
||||
@ -4,8 +4,7 @@ import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerRBMKHeater;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -30,15 +29,11 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")})
|
||||
public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements IFluidContainer, IFluidStandardTransceiver, SimpleComponent, CompatHandler.OCComponent {
|
||||
|
||||
public FluidTank feed;
|
||||
public FluidTank steam;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
|
||||
public TileEntityRBMKHeater() {
|
||||
super(1);
|
||||
@ -84,8 +79,6 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
steam.setTankType(Fluids.NONE);
|
||||
}
|
||||
|
||||
fillFluidInit(steam.getTankType());
|
||||
|
||||
this.trySubscribe(feed.getTankType(), worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||
for(DirPos pos : getOutputPos()) {
|
||||
if(this.steam.getFill() > 0) this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
@ -122,71 +115,6 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
fillFluid(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, getTact(), type);
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
}
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 2, zCoord) == ModBlocks.rbmk_loader) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord - 2, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 2, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 3, this.zCoord, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated //why are we still doing this?
|
||||
public boolean getTact() { return worldObj.getTotalWorldTime() % 2 == 0; }
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
|
||||
if(type == feed.getTankType())
|
||||
feed.setFill(i);
|
||||
else if(type == steam.getTankType())
|
||||
steam.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
if(type == feed.getTankType())
|
||||
return feed.getFill();
|
||||
else if(type == steam.getTankType())
|
||||
return steam.getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
if(type == feed.getTankType())
|
||||
return feed.getMaxFill();
|
||||
else if(type == steam.getTankType())
|
||||
return steam.getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
|
||||
@ -205,16 +133,6 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
steam.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
@ -3,8 +3,6 @@ package com.hbm.tileentity.machine.storage;
|
||||
import api.hbm.fluid.*;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.container.ContainerBarrel;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -45,24 +43,23 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")})
|
||||
public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcceptor, IFluidSource, SimpleComponent, IFluidStandardTransceiver, IPersistentNBT, IGUIProvider, CompatHandler.OCComponent {
|
||||
public class TileEntityBarrel extends TileEntityMachineBase implements SimpleComponent, IFluidStandardTransceiver, IPersistentNBT, IGUIProvider, CompatHandler.OCComponent {
|
||||
|
||||
public FluidTank tank;
|
||||
public short mode = 0;
|
||||
public static final short modes = 4;
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
protected boolean sendingBrake = false;
|
||||
public byte lastRedstone = 0;
|
||||
|
||||
public TileEntityBarrel() {
|
||||
super(6);
|
||||
tank = new FluidTank(Fluids.NONE, 0, 0);
|
||||
tank = new FluidTank(Fluids.NONE, 0);
|
||||
}
|
||||
|
||||
public TileEntityBarrel(int capacity) {
|
||||
super(6);
|
||||
tank = new FluidTank(Fluids.NONE, capacity, 0);
|
||||
tank = new FluidTank(Fluids.NONE, capacity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -115,9 +112,6 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
tank.setFill(transmitFluidFairly(worldObj, tank, this, tank.getFill(), this.mode == 0 || this.mode == 1, this.mode == 1 || this.mode == 2, getConPos()));
|
||||
this.sendingBrake = false;
|
||||
|
||||
if((mode == 1 || mode == 2) && (age == 9 || age == 19))
|
||||
fillFluidInit(tank.getTankType());
|
||||
|
||||
if(tank.getFill() > 0) {
|
||||
checkFluidInteraction();
|
||||
}
|
||||
@ -278,69 +272,6 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
if(mode == 2 || mode == 3)
|
||||
return 0;
|
||||
|
||||
return type == this.tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type == tank.getTankType()) tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
this.list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
@ -2,24 +2,24 @@ package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.inventory.container.ContainerFileCabinet;
|
||||
import com.hbm.inventory.gui.GUIFileCabinet;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.BufPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityFileCabinet extends TileEntityCrateBase implements IGUIProvider, INBTPacketReceiver {
|
||||
public class TileEntityFileCabinet extends TileEntityCrateBase implements IGUIProvider, IBufPacketReceiver {
|
||||
|
||||
private int timer = 0;
|
||||
private int playersUsing = 0;
|
||||
@ -47,6 +47,16 @@ public class TileEntityFileCabinet extends TileEntityCrateBase implements IGUIPr
|
||||
public void closeInventory() {
|
||||
if(!worldObj.isRemote) this.playersUsing--;
|
||||
}
|
||||
|
||||
@Override public void serialize(ByteBuf buf) {
|
||||
buf.writeInt(timer);
|
||||
buf.writeInt(playersUsing);
|
||||
}
|
||||
|
||||
@Override public void deserialize(ByteBuf buf) {
|
||||
timer = buf.readInt();
|
||||
playersUsing = buf.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
@ -60,10 +70,7 @@ public class TileEntityFileCabinet extends TileEntityCrateBase implements IGUIPr
|
||||
} else
|
||||
timer = 0;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("timer", timer);
|
||||
data.setInteger("playersUsing", this.playersUsing);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(data, xCoord, yCoord, zCoord), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 25));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new BufPacket(xCoord, yCoord, zCoord, this), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 25));
|
||||
} else {
|
||||
this.prevLowerExtent = lowerExtent;
|
||||
this.prevUpperExtent = upperExtent;
|
||||
@ -103,12 +110,6 @@ public class TileEntityFileCabinet extends TileEntityCrateBase implements IGUIPr
|
||||
this.upperExtent = MathHelper.clamp_float(upperExtent, 0F, maxExtent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.timer = nbt.getInteger("timer");
|
||||
this.playersUsing = nbt.getInteger("playersUsing");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerFileCabinet(player.inventory, this);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
@ -42,18 +41,6 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 3, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord + 3, getTact(), type);
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 3, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord - 3, getTact(), type);
|
||||
fillFluid(this.xCoord + 3, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord + 3, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -7,9 +7,6 @@ import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.handler.CompatHandler.OCComponent;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
@ -56,7 +53,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")})
|
||||
public class TileEntityMachineFluidTank extends TileEntityMachineBase implements IFluidContainer, SimpleComponent, OCComponent, IFluidSource, IFluidAcceptor, IFluidStandardTransceiver, IPersistentNBT, IOverpressurable, IGUIProvider, IRepairable {
|
||||
public class TileEntityMachineFluidTank extends TileEntityMachineBase implements SimpleComponent, OCComponent, IFluidStandardTransceiver, IPersistentNBT, IOverpressurable, IGUIProvider, IRepairable {
|
||||
|
||||
public FluidTank tank;
|
||||
public short mode = 0;
|
||||
@ -68,7 +65,6 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
public Explosion lastExplosion = null;
|
||||
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
|
||||
public TileEntityMachineFluidTank() {
|
||||
super(6);
|
||||
@ -119,9 +115,6 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
tank.setFill(TileEntityBarrel.transmitFluidFairly(worldObj, tank, this, tank.getFill(), this.mode == 0 || this.mode == 1, this.mode == 1 || this.mode == 2, getConPos()));
|
||||
this.sendingBrake = false;
|
||||
|
||||
if((mode == 1 || mode == 2) && (age == 9 || age == 19))
|
||||
fillFluidInit(tank.getTankType());
|
||||
|
||||
tank.loadTank(2, 3, slots);
|
||||
tank.setType(0, 1, slots);
|
||||
} else {
|
||||
@ -312,72 +305,6 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
|
||||
if(mode == 2 || mode == 3 || this.sendingBrake)
|
||||
return 0;
|
||||
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
this.list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -23,20 +22,6 @@ public class TileEntityMachineOrbus extends TileEntityBarrel {
|
||||
@Override
|
||||
public void checkFluidInteraction() { } //NO!
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
for(int i = -1; i < 6; i += 6) {
|
||||
this.fillFluid(xCoord, yCoord + i, zCoord, this.getTact(), this.tank.getTankType());
|
||||
this.fillFluid(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ, this.getTact(), this.tank.getTankType());
|
||||
this.fillFluid(xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ, this.getTact(), this.tank.getTankType());
|
||||
this.fillFluid(xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ, this.getTact(), this.tank.getTankType());
|
||||
}
|
||||
}
|
||||
|
||||
protected DirPos[] conPos;
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,248 +1,5 @@
|
||||
package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerPuF6Tank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIMachinePuF6Tank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInventory, IFluidContainer, IGUIProvider {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public FluidTank tank;
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {1, 3};
|
||||
private static final int[] slots_side = new int[] {2};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachinePuF6Tank() {
|
||||
slots = new ItemStack[4];
|
||||
tank = new FluidTank(Fluids.PUF6, 64000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.puf6_tank";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if(i == 0 && stack.getItem() == ModItems.cell_puf6)
|
||||
return true;
|
||||
if(i == 2 && stack.getItem() == ModItems.cell_empty)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
tank.readFromNBT(nbt, "content");
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
tank.writeToNBT(nbt, "content");
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
tank.loadTank(0, 1, slots);
|
||||
tank.unloadTank(2, 3, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerPuF6Tank(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachinePuF6Tank(player.inventory, this);
|
||||
}
|
||||
}
|
||||
public class TileEntityMachinePuF6Tank extends TileEntity { }
|
||||
|
||||
@ -1,250 +1,5 @@
|
||||
package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.container.ContainerUF6Tank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIMachineUF6Tank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInventory, IFluidContainer, IGUIProvider {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
//public static final int maxFill = 64 * 3;
|
||||
public FluidTank tank;
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {1, 3};
|
||||
private static final int[] slots_side = new int[] {2};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineUF6Tank() {
|
||||
slots = new ItemStack[4];
|
||||
tank = new FluidTank(Fluids.UF6, 64000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.uf6_tank";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if(i == 0 && stack.getItem() == ModItems.cell_uf6)
|
||||
return true;
|
||||
if(i == 2 && stack.getItem() == ModItems.cell_empty)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
tank.readFromNBT(nbt, "content");
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
tank.writeToNBT(nbt, "content");
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
tank.loadTank(0, 1, slots);
|
||||
tank.unloadTank(2, 3, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerUF6Tank(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineUF6Tank(player.inventory, this);
|
||||
}
|
||||
}
|
||||
public class TileEntityMachineUF6Tank extends TileEntity { }
|
||||
|
||||
@ -7,7 +7,7 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseNT;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
@ -31,7 +31,7 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFluidAcceptor, IFluidStandardReceiver {
|
||||
public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFluidContainer, IFluidStandardReceiver {
|
||||
|
||||
public FluidTank tank;
|
||||
|
||||
@ -207,22 +207,6 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { tank };
|
||||
|
||||
@ -830,6 +830,7 @@ hbmmat.desh=Desh
|
||||
hbmmat.diamond=Diamant
|
||||
hbmmat.dineutronium=Dineutronium
|
||||
hbmmat.durasteel=Schnellarbeitsstahl
|
||||
hbmmat.emerald=Smaragd
|
||||
hbmmat.euphemium=Euphemium
|
||||
hbmmat.ferrouranium=Ferrouran
|
||||
hbmmat.fiberglass=Fiberglas
|
||||
|
||||
@ -1538,6 +1538,7 @@ hbmmat.desh=Desh
|
||||
hbmmat.diamond=Diamond
|
||||
hbmmat.dineutronium=Dineutronium
|
||||
hbmmat.durasteel=High-Speed Steel
|
||||
hbmmat.emerald=Emerald
|
||||
hbmmat.euphemium=Euphemium
|
||||
hbmmat.ferrouranium=Ferrouranium
|
||||
hbmmat.fiberglass=Fiberglass
|
||||
|
||||
|
Before Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 269 B |
|
Before Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 282 B |