mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'master' into more-more-qol
This commit is contained in:
commit
54ec5e7028
26
changelog
26
changelog
@ -1,8 +1,32 @@
|
||||
## Added
|
||||
* Plushies
|
||||
|
||||
## Changed
|
||||
* The fluid burner, heat exchanging heater and cooling tower now use the single steel pipe items instead of the larger steel pipes
|
||||
* Reduced the amount of condensers needed for crafting the cooling towers
|
||||
* Liquefactors and solidifiers now have a base processing time of 5 seconds per operation (instead of 10)
|
||||
* Added some info to the coltass about how the coltan deposit works
|
||||
* Moved some NEI handlers around, fluid containers are now listed last and radiolysis is now listed right after cracking, since they have the same recipes
|
||||
* The autocrafter's inputs are now limited to 4 items per slot
|
||||
* Autocrafters can now receive stacked items again (except for items with containers), if they do not exceed the 4 item threshold
|
||||
* Bedrock ores now produce bedrock ore fragments instead of straight outputs, one fragment is equivalent to a nugget
|
||||
* Fragments also differ in stack size when produced, most primary fractions yield 9 (equal to the previous full powder), but things with lower demands/higher value like bismuth now yield substantially less
|
||||
* The base speed of the large mining drill when mining bedrock has been reduced by 80%, it is now advisable to either invest in upgrades early on or use multiple drills
|
||||
* The bedrock ore processor now has a base speed of 30 seconds
|
||||
* 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
|
||||
* Fixed ICFs not forming correctly depending on the orientation
|
||||
* Fixed electrolyzer metal recipe config not working
|
||||
* Fixed electrolyzer metal recipe config not working
|
||||
* Fixed the meteor charms not working when used on helmets
|
||||
* Fixed NEI handler for the ICF's consturction showing inconsistent values
|
||||
* 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 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
|
||||
@ -31,8 +31,4 @@ public abstract class BlockMulti extends BlockBase implements IBlockMulti {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,20 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IBlockMulti {
|
||||
|
||||
public int getSubCount();
|
||||
|
||||
public default String getUnlocalizedName(ItemStack stack) {
|
||||
return ((Block)this).getUnlocalizedName();
|
||||
}
|
||||
|
||||
public default String getOverrideDisplayName(ItemStack stack) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public default int rectify(int meta) {
|
||||
return Math.abs(meta % getSubCount());
|
||||
}
|
||||
|
||||
@ -271,6 +271,7 @@ public class ModBlocks {
|
||||
public static Block pedestal;
|
||||
public static Block bobblehead;
|
||||
public static Block snowglobe;
|
||||
public static Block plushie;
|
||||
|
||||
public static Block hazmat;
|
||||
|
||||
@ -762,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;
|
||||
@ -1426,7 +1425,7 @@ public class ModBlocks {
|
||||
block_semtex = new BlockPlasticExplosive(Material.tnt).setBlockName("block_semtex").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(2.0F).setBlockTextureName(RefStrings.MODID + ":block_semtex");
|
||||
block_c4 = new BlockPlasticExplosive(Material.tnt).setBlockName("block_c4").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(2.0F).setBlockTextureName(RefStrings.MODID + ":block_c4");
|
||||
block_smore = new BlockPillar(Material.rock, RefStrings.MODID + ":block_smore_top").setBlockName("block_smore").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_smore_side");
|
||||
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
|
||||
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(2.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
|
||||
|
||||
block_australium = new BlockBeaconable(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
|
||||
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_weidanium");
|
||||
@ -1454,6 +1453,7 @@ public class ModBlocks {
|
||||
pedestal = new BlockPedestal().setBlockName("pedestal").setCreativeTab(null).setHardness(2.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":pedestal_top");
|
||||
bobblehead = new BlockBobble().setBlockName("bobblehead").setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
snowglobe = new BlockSnowglobe().setBlockName("snowglobe").setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":glass_boron");
|
||||
plushie = new BlockPlushie().setBlockName("plushie").setStepSound(Block.soundTypeCloth).setResistance(50_0000.0F).setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
|
||||
hazmat = new BlockGeneric(Material.cloth).setBlockName("hazmat").setStepSound(Block.soundTypeCloth).setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":hazmat");
|
||||
|
||||
gravel_obsidian = new BlockFalling(Material.iron).setBlockName("gravel_obsidian").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(5.0F).setResistance(240.0F).setBlockTextureName(RefStrings.MODID + ":gravel_obsidian");
|
||||
@ -1879,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");
|
||||
@ -2600,6 +2598,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(pedestal, pedestal.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(bobblehead, ItemBlockMeta.class, bobblehead.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(snowglobe, ItemBlockMeta.class, snowglobe.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(plushie, ItemBlockBase.class, plushie.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hazmat, hazmat.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_rbmk, deco_rbmk.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_rbmk_smooth, deco_rbmk_smooth.getUnlocalizedName());
|
||||
@ -3128,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);
|
||||
|
||||
172
src/main/java/com/hbm/blocks/generic/BlockPlushie.java
Normal file
172
src/main/java/com/hbm/blocks/generic/BlockPlushie.java
Normal file
@ -0,0 +1,172 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
|
||||
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.creativetab.CreativeTabs;
|
||||
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.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPlushie extends BlockContainer implements IBlockMulti, ITooltipProvider {
|
||||
|
||||
public BlockPlushie() {
|
||||
super(Material.cloth);
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return -1; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
@Override public Item getItemDropped(int i, Random rand, int j) { return null; }
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
TileEntityPlushie entity = (TileEntityPlushie) world.getTileEntity(x, y, z);
|
||||
if(entity != null) return new ItemStack(this, 1, entity.type.ordinal());
|
||||
return super.getPickBlock(target, world, x, y, z, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
||||
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
harvesters.set(player);
|
||||
if(!world.isRemote) {
|
||||
TileEntityPlushie entity = (TileEntityPlushie) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
EntityItem item = new EntityItem(world, x + 0.5, y, z + 0.5, new ItemStack(this, 1, entity.type.ordinal()));
|
||||
item.motionX = 0;
|
||||
item.motionY = 0;
|
||||
item.motionZ = 0;
|
||||
world.spawnEntityInWorld(item);
|
||||
}
|
||||
}
|
||||
harvesters.set(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
|
||||
player.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
|
||||
player.addExhaustion(0.025F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 1; i < PlushieType.values().length; i++) list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
int meta = MathHelper.floor_double((double)((player.rotationYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15;
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta, 2);
|
||||
|
||||
TileEntityPlushie plushie = (TileEntityPlushie) world.getTileEntity(x, y, z);
|
||||
plushie.type = PlushieType.values()[Math.abs(stack.getItemDamage()) % PlushieType.values().length];
|
||||
plushie.markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityPlushie();
|
||||
}
|
||||
|
||||
@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) {
|
||||
TileEntityPlushie plushie = (TileEntityPlushie) world.getTileEntity(x, y, z);
|
||||
plushie.squishTimer = 11;
|
||||
return true;
|
||||
} else {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.squeakyToy", 0.25F, 1F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static class TileEntityPlushie extends TileEntity {
|
||||
|
||||
public PlushieType type = PlushieType.NONE;
|
||||
public int squishTimer;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(squishTimer > 0) squishTimer--;
|
||||
}
|
||||
|
||||
@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);
|
||||
this.type = PlushieType.values()[Math.abs(nbt.getByte("type")) % PlushieType.values().length];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setByte("type", (byte) type.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public static enum PlushieType {
|
||||
NONE( "NONE", null),
|
||||
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
|
||||
NUMBERNINE( "Number Nine", "None of y'all deserve coal.");
|
||||
|
||||
public String label;
|
||||
public String inscription;
|
||||
|
||||
private PlushieType(String label, String inscription) {
|
||||
this.label = label;
|
||||
this.inscription = inscription;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return PlushieType.values().length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverrideDisplayName(ItemStack stack) {
|
||||
PlushieType type = PlushieType.values()[Math.abs(stack.getItemDamage()) % PlushieType.values().length];
|
||||
return StatCollector.translateToLocalFormatted(this.getUnlocalizedName() + ".name", type == PlushieType.NONE ? "" : type.label).trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
PlushieType type = PlushieType.values()[Math.abs(stack.getItemDamage()) % PlushieType.values().length];
|
||||
if(type.inscription != null) list.add(type.inscription);
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -535,6 +535,10 @@ public class MineralRecipes {
|
||||
addBillet(billet, ingot, nugget);
|
||||
}
|
||||
|
||||
public static void addBilletFragment(ItemStack billet, ItemStack nugget) {
|
||||
GameRegistry.addRecipe(billet.copy(), new Object[] { "###", "###", '#', nugget });
|
||||
}
|
||||
|
||||
public static void addBillet(Item billet, Item nugget) {
|
||||
GameRegistry.addRecipe(new ItemStack(billet), new Object[] { "###", "###", '#', nugget });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(nugget, 6), new Object[] { billet });
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -35,6 +35,7 @@ public class EntityMovingItem extends EntityMovingConveyorObject implements ICon
|
||||
public boolean interactFirst(EntityPlayer player) {
|
||||
|
||||
if(!worldObj.isRemote && player.inventory.addItemStackToInventory(this.getItemStack().copy())) {
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -11,7 +11,6 @@ import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockMutatorFire;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorCross;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.items.weapon.ItemMissile;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -355,14 +354,12 @@ public abstract class EntityMissileBaseNT extends EntityThrowableInterp implemen
|
||||
}
|
||||
}
|
||||
|
||||
public void explodeStandard(float strength, int resolution, boolean fire, boolean largeSmoke) {
|
||||
public void explodeStandard(float strength, int resolution, boolean fire) {
|
||||
ExplosionVNT xnt = new ExplosionVNT(worldObj, posX, posY, posZ, strength);
|
||||
xnt.setBlockAllocator(new BlockAllocatorStandard(resolution));
|
||||
xnt.setBlockProcessor(new BlockProcessorStandard().setNoDrop().withBlockEffect(fire ? new BlockMutatorFire() : null));
|
||||
xnt.setEntityProcessor(new EntityProcessorCross(7.5D).withRangeMod(2));
|
||||
xnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
xnt.setSFX(new ExplosionEffectStandard());
|
||||
if(largeSmoke) ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ, ExplosionLarge.cloudFunction((int) strength));
|
||||
xnt.explode();
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -26,7 +27,7 @@ public class EntityMissileStealth extends EntityMissileBaseNT {
|
||||
@Override public ItemStack getMissileItemForInfo() { return new ItemStack(ModItems.missile_stealth); }
|
||||
@Override public boolean canBeSeenBy(Object radar) { return false; }
|
||||
|
||||
@Override public void onImpact() { this.explodeStandard(20F, 24, false, true); }
|
||||
@Override public void onImpact() { this.explodeStandard(20F, 24, false); ExplosionCreator.composeEffectStandard(worldObj, posX, posY, posZ); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return DictFrame.fromOne(ModItems.powder_ash, EnumAshType.MISC); }
|
||||
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -32,7 +33,7 @@ public abstract class EntityMissileTier1 extends EntityMissileBaseNT {
|
||||
public static class EntityMissileGeneric extends EntityMissileTier1 {
|
||||
public EntityMissileGeneric(World world) { super(world); }
|
||||
public EntityMissileGeneric(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { this.explodeStandard(15F, 24, false, true); }
|
||||
@Override public void onImpact() { this.explodeStandard(15F, 24, false); ExplosionCreator.composeEffectSmall(worldObj, posX, posY, posZ); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_small); }
|
||||
@Override public ItemStack getMissileItemForInfo() { return new ItemStack(ModItems.missile_generic); }
|
||||
}
|
||||
@ -50,7 +51,7 @@ public abstract class EntityMissileTier1 extends EntityMissileBaseNT {
|
||||
public static class EntityMissileIncendiary extends EntityMissileTier1 {
|
||||
public EntityMissileIncendiary(World world) { super(world); }
|
||||
public EntityMissileIncendiary(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { this.explodeStandard(15F, 24, true, true); }
|
||||
@Override public void onImpact() { this.explodeStandard(15F, 24, true); ExplosionCreator.composeEffectSmall(worldObj, posX, posY, posZ); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_incendiary_small); }
|
||||
@Override public ItemStack getMissileItemForInfo() { return new ItemStack(ModItems.missile_incendiary); }
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.entity.logic.EntityEMP;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -41,7 +42,7 @@ public abstract class EntityMissileTier2 extends EntityMissileBaseNT {
|
||||
public static class EntityMissileStrong extends EntityMissileTier2 {
|
||||
public EntityMissileStrong(World world) { super(world); }
|
||||
public EntityMissileStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { this.explodeStandard(30F, 32, false, true); }
|
||||
@Override public void onImpact() { this.explodeStandard(30F, 32, false); ExplosionCreator.composeEffectStandard(worldObj, posX, posY, posZ); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_medium); }
|
||||
@Override public ItemStack getMissileItemForInfo() { return new ItemStack(ModItems.missile_strong); }
|
||||
}
|
||||
@ -50,7 +51,8 @@ public abstract class EntityMissileTier2 extends EntityMissileBaseNT {
|
||||
public EntityMissileIncendiaryStrong(World world) { super(world); }
|
||||
public EntityMissileIncendiaryStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.explodeStandard(30F, 32, true, true);
|
||||
this.explodeStandard(30F, 32, true);
|
||||
ExplosionCreator.composeEffectStandard(worldObj, posX, posY, posZ);
|
||||
ExplosionChaos.flameDeath(this.worldObj, (int)((float)this.posX + 0.5F), (int)((float)this.posY + 0.5F), (int)((float)this.posZ + 0.5F), 25);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_incendiary_medium); }
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -58,7 +59,8 @@ public abstract class EntityMissileTier3 extends EntityMissileBaseNT {
|
||||
public EntityMissileBurst(World world) { super(world); }
|
||||
public EntityMissileBurst(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.explodeStandard(50F, 48, false, true);
|
||||
this.explodeStandard(50F, 48, false);
|
||||
ExplosionCreator.composeEffectLarge(worldObj, posX, posY, posZ);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_large); }
|
||||
@Override public ItemStack getMissileItemForInfo() { return new ItemStack(ModItems.missile_burst); }
|
||||
@ -68,7 +70,8 @@ public abstract class EntityMissileTier3 extends EntityMissileBaseNT {
|
||||
public EntityMissileInferno(World world) { super(world); }
|
||||
public EntityMissileInferno(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.explodeStandard(50F, 48, true, true);
|
||||
this.explodeStandard(50F, 48, true);
|
||||
ExplosionCreator.composeEffectLarge(worldObj, posX, posY, posZ);
|
||||
ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10);
|
||||
ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -202,15 +202,17 @@ public class BossSpawnHandler {
|
||||
boolean repell = false;
|
||||
boolean strike = true;
|
||||
|
||||
if(p.getCurrentArmor(2) != null && ArmorModHandler.hasMods(p.getCurrentArmor(2))) {
|
||||
ItemStack mod = ArmorModHandler.pryMods(p.getCurrentArmor(2))[ArmorModHandler.helmet_only];
|
||||
|
||||
if(mod != null) {
|
||||
if(mod.getItem() == ModItems.protection_charm) {
|
||||
repell = true;
|
||||
}
|
||||
if(mod.getItem() == ModItems.meteor_charm) {
|
||||
strike = false;
|
||||
for(int i = 0; i < 4; i++) {
|
||||
ItemStack armor = p.getCurrentArmor(i);
|
||||
if(armor != null && ArmorModHandler.hasMods(armor)) {
|
||||
|
||||
for(int j = 0; j < 8; j++) {
|
||||
ItemStack mod = ArmorModHandler.pryMods(armor)[j];
|
||||
|
||||
if(mod != null) {
|
||||
if(mod.getItem() == ModItems.protection_charm) repell = true;
|
||||
if(mod.getItem() == ModItems.meteor_charm) strike = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ public class ConstructionHandler extends NEIUniversalHandler {
|
||||
ItemStack[] icf = new ItemStack[] {
|
||||
new ItemStack(ModBlocks.icf_component, 50, 0),
|
||||
ItemStackUtil.addTooltipToStack(new ItemStack(ModBlocks.icf_component, 240, 3), EnumChatFormatting.RED + "3x64 + 48"),
|
||||
ItemStackUtil.addTooltipToStack(Mats.MAT_DURA.make(ModItems.bolt, 960), EnumChatFormatting.RED + "9x64"),
|
||||
ItemStackUtil.addTooltipToStack(Mats.MAT_DURA.make(ModItems.bolt, 960), EnumChatFormatting.RED + "15x64"),
|
||||
ItemStackUtil.addTooltipToStack(Mats.MAT_STEEL.make(ModItems.plate_cast, 240), EnumChatFormatting.RED + "3x64 + 48"),
|
||||
ItemStackUtil.addTooltipToStack(new ItemStack(ModBlocks.icf_component, 117, 1), EnumChatFormatting.RED + "64 + 53"),
|
||||
ItemStackUtil.addTooltipToStack(Mats.MAT_BBRONZE.make(ModItems.plate_cast, 117), EnumChatFormatting.RED + "64 + 53"),
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.inventory.gui.GUIRadiolysis;
|
||||
import com.hbm.inventory.recipes.RadiolysisRecipes;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
@ -95,7 +94,7 @@ public class RadiolysisRecipeHandler extends TemplateRecipeHandler implements IC
|
||||
HashMap<Object, Object[]> recipes = (HashMap<Object, Object[]>) RadiolysisRecipes.getRecipesForNEI();
|
||||
|
||||
for(Entry<Object, Object[]> recipe : recipes.entrySet()) {
|
||||
if(NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[0], result) || NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[1], result))
|
||||
if(compareFluidStacks((ItemStack)recipe.getValue()[0], result) || compareFluidStacks((ItemStack)recipe.getValue()[1], result))
|
||||
this.arecipes.add(new RecipeSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()[0], (ItemStack)recipe.getValue()[1]));
|
||||
}
|
||||
}
|
||||
@ -115,10 +114,14 @@ public class RadiolysisRecipeHandler extends TemplateRecipeHandler implements IC
|
||||
HashMap<Object, Object[]> recipes = (HashMap<Object, Object[]>) RadiolysisRecipes.getRecipesForNEI();
|
||||
|
||||
for(Entry<Object, Object[]> recipe : recipes.entrySet()) {
|
||||
if(NEIServerUtils.areStacksSameType((ItemStack)recipe.getKey(), ingredient))
|
||||
if(compareFluidStacks((ItemStack)recipe.getKey(), ingredient))
|
||||
this.arecipes.add(new RecipeSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()[0], (ItemStack)recipe.getValue()[1]));
|
||||
}
|
||||
}
|
||||
|
||||
private boolean compareFluidStacks(ItemStack sta1, ItemStack sta2) {
|
||||
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
@ -15,6 +15,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockOreBasalt.EnumBasaltOreType;
|
||||
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.crafting.MineralRecipes;
|
||||
import com.hbm.hazard.HazardData;
|
||||
import com.hbm.hazard.HazardEntry;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
@ -27,6 +28,7 @@ import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.items.ItemEnums.EnumBriquetteType;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ItemEnums.EnumCokeType;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
|
||||
@ -257,6 +259,7 @@ public class OreDictManager {
|
||||
/*
|
||||
* RARE EARTHS
|
||||
*/
|
||||
public static final DictFrame RAREEARTH = new DictFrame("RareEarth");
|
||||
/** LANTHANUM */
|
||||
public static final DictFrame LA = new DictFrame("Lanthanum");
|
||||
/** ZIRCONIUM */
|
||||
@ -460,6 +463,7 @@ public class OreDictManager {
|
||||
/*
|
||||
* RARE EARTHS
|
||||
*/
|
||||
RAREEARTH.ingot(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE)).ore(ore_rare, ore_gneiss_rare);
|
||||
LA .nugget(fragment_lanthanium) .ingot(ingot_lanthanium) .dustSmall(powder_lanthanium_tiny) .dust(powder_lanthanium) .block(block_lanthanium);
|
||||
ZR .nugget(nugget_zirconium) .ingot(ingot_zirconium) .billet(billet_zirconium) .dust(powder_zirconium) .block(block_zirconium) .ore(ore_depth_zirconium);
|
||||
ND .nugget(fragment_neodymium) .dustSmall(powder_neodymium_tiny) .dust(powder_neodymium) .ore(ore_depth_nether_neodymium) .oreNether(ore_depth_nether_neodymium);
|
||||
@ -542,6 +546,7 @@ public class OreDictManager {
|
||||
if(mat.shapes.contains(MaterialShapes.SHELL)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.SHELL.name() + name, new ItemStack(ModItems.shell, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.PIPE)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.PIPE.name() + name, new ItemStack(ModItems.pipe, 1, mat.id));
|
||||
}
|
||||
if(mat.shapes.contains(MaterialShapes.FRAGMENT)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.FRAGMENT.name() + name, new ItemStack(ModItems.bedrock_ore_fragment, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.WIRE)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.WIRE.name() + name, new ItemStack(ModItems.wire_fine, 1, mat.id));
|
||||
}
|
||||
|
||||
@ -564,8 +569,6 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre("briquetteWood", fromOne(briquette, EnumBriquetteType.WOOD));
|
||||
|
||||
OreDictionary.registerOre(getReflector(), neutron_reflector);
|
||||
OreDictionary.registerOre("oreRareEarth", ore_rare);
|
||||
OreDictionary.registerOre("oreRareEarth", ore_gneiss_rare);
|
||||
|
||||
OreDictionary.registerOre("logWood", pink_log);
|
||||
OreDictionary.registerOre("logWoodPink", pink_log);
|
||||
@ -642,6 +645,18 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre(MAGTUNG.wireFine(), wire_magnetized_tungsten);
|
||||
OreDictionary.registerOre(SA326.wireFine(), wire_schrabidium);
|
||||
|
||||
for(NTMMaterial mat : Mats.orderedList) {
|
||||
if(mat.shapes.contains(MaterialShapes.FRAGMENT)) {
|
||||
String name = mat.names[0];
|
||||
if(!OreDictionary.getOres(MaterialShapes.DUST.name() + name).isEmpty()) MineralRecipes.add9To1(mat.make(ModItems.bedrock_ore_fragment), OreDictionary.getOres(MaterialShapes.DUST.name() + name).get(0));
|
||||
else if(!OreDictionary.getOres(MaterialShapes.GEM.name() + name).isEmpty()) MineralRecipes.add9To1(mat.make(ModItems.bedrock_ore_fragment), OreDictionary.getOres(MaterialShapes.GEM.name() + name).get(0));
|
||||
else if(!OreDictionary.getOres(MaterialShapes.CRYSTAL.name() + name).isEmpty()) MineralRecipes.add9To1(mat.make(ModItems.bedrock_ore_fragment), OreDictionary.getOres(MaterialShapes.CRYSTAL.name() + name).get(0));
|
||||
else if(!OreDictionary.getOres(MaterialShapes.INGOT.name() + name).isEmpty()) MineralRecipes.add9To1(mat.make(ModItems.bedrock_ore_fragment), OreDictionary.getOres(MaterialShapes.INGOT.name() + name).get(0));
|
||||
else if(!OreDictionary.getOres(MaterialShapes.BILLET.name() + name).isEmpty()) MineralRecipes.addBilletFragment(OreDictionary.getOres(MaterialShapes.BILLET.name() + name).get(0), mat.make(ModItems.bedrock_ore_fragment));
|
||||
else MineralRecipes.add9To1(mat.make(ModItems.bedrock_ore_fragment), new ItemStack(ModItems.nothing));
|
||||
}
|
||||
}
|
||||
|
||||
MaterialShapes.registerCompatShapes();
|
||||
compensateMojangSpaghettiBullshit();
|
||||
}
|
||||
@ -742,6 +757,7 @@ public class OreDictManager {
|
||||
public String billet() { return BILLET + mats[0]; }
|
||||
public String block() { return BLOCK + mats[0]; }
|
||||
public String ore() { return ORE + mats[0]; }
|
||||
public String fragment() { return FRAGMENT + mats[0]; }
|
||||
public String[] anys() { return appendToAll(ANY); }
|
||||
public String[] nuggets() { return appendToAll(NUGGET); }
|
||||
public String[] tinys() { return appendToAll(TINY); }
|
||||
@ -758,6 +774,7 @@ public class OreDictManager {
|
||||
public String[] billets() { return appendToAll(BILLET); }
|
||||
public String[] blocks() { return appendToAll(BLOCK); }
|
||||
public String[] ores() { return appendToAll(ORE); }
|
||||
public String[] fragments() { return appendToAll(FRAGMENT); }
|
||||
|
||||
/** Returns cast (triple) plates if 528 mode is enabled or normal plates if not */
|
||||
public String plate528() { return GeneralConfig.enable528 ? plateCast() : plate(); }
|
||||
|
||||
@ -8,6 +8,7 @@ public class OreNames {
|
||||
public static final String ANY = "any";
|
||||
public static final String NUGGET = "nugget";
|
||||
public static final String TINY = "tiny";
|
||||
public static final String FRAGMENT = "bedrockorefragment";
|
||||
public static final String BOLT = "bolt";
|
||||
public static final String INGOT = "ingot";
|
||||
public static final String DUSTTINY = "dustTiny";
|
||||
@ -28,6 +29,6 @@ public class OreNames {
|
||||
public static final String HEAVY_COMPONENT = "componentHeavy";
|
||||
|
||||
public static final String[] prefixes = new String[] {
|
||||
ANY, NUGGET, TINY, BOLT, INGOT, DUSTTINY, DUST, GEM, CRYSTAL, PLATE, PLATECAST, BILLET, BLOCK, ORE, ORENETHER, HEAVY_COMPONENT, WIRE, WIREDENSE
|
||||
ANY, NUGGET, TINY, FRAGMENT, BOLT, INGOT, DUSTTINY, DUST, GEM, CRYSTAL, PLATE, PLATECAST, BILLET, BLOCK, ORE, ORENETHER, HEAVY_COMPONENT, WIRE, WIREDENSE
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotPattern;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAutocrafter;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
@ -88,6 +90,33 @@ public class ContainerAutocrafter extends ContainerBase {
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
|
||||
if(index <= 20 && index >= 10) {
|
||||
if(!this.mergeItemStack(stack, 21, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(index > 20){
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 20, 21, false)) return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ public class MaterialShapes {
|
||||
|
||||
public static final MaterialShapes QUANTUM = new MaterialShapes(1); // 1/72 of an ingot, allows the ingot to be divisible through 2, 4, 6, 8, 9, 12, 24 and 36
|
||||
public static final MaterialShapes NUGGET = new MaterialShapes(8, "nugget");
|
||||
public static final MaterialShapes FRAGMENT = new MaterialShapes(8, "bedrockorefragment");
|
||||
public static final MaterialShapes DUSTTINY = new MaterialShapes(NUGGET.quantity, "dustTiny");
|
||||
public static final MaterialShapes WIRE = new MaterialShapes(9, "wireFine");
|
||||
public static final MaterialShapes BOLT = new MaterialShapes(9, "bolt");
|
||||
|
||||
@ -44,50 +44,51 @@ public class Mats {
|
||||
public static final int _VS = 0;
|
||||
/* Alloy Space, up to 70 materials. Use >20_000 as an extension.*/
|
||||
public static final int _AS = 30;
|
||||
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( 1499, CARBON, 0x363636, 0x030303, 0x404040).setShapes(WIRE, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_COAL = make( 1400, COAL) .setConversion(MAT_CARBON, 2, 1).n();
|
||||
public static final NTMMaterial MAT_LIGNITE = make( 1401, LIGNITE) .setConversion(MAT_CARBON, 3, 1).n();
|
||||
public static final NTMMaterial MAT_COALCOKE = make( 1410, COALCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_PETCOKE = make( 1411, PETCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_LIGCOKE = make( 1412, LIGCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_GRAPHITE = make( 1420, GRAPHITE) .setConversion(MAT_CARBON, 1, 1).n();
|
||||
public static final NTMMaterial MAT_DIAMOND = make( 1430, DIAMOND) .setConversion(MAT_CARBON, 1, 1).n();
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setShapes(INGOT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(WIRE, NUGGET, INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).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(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_URANIUM = makeSmeltable(9200, U, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U233 = makeSmeltable(9233, U233, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U235 = makeSmeltable(9235, U235, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U238 = makeSmeltable(9238, U238, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_THORIUM = makeSmeltable(9032, TH232, 0xBF825F, 0x1C0000, 0xBF825F).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U238 = makeSmeltable(9238, U238, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_THORIUM = makeSmeltable(9032, TH232, 0xBF825F, 0x1C0000, 0xBF825F).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PLUTONIUM = makeSmeltable(9400, PU, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGP = makeSmeltable(9401, PURG, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU238 = makeSmeltable(9438, PU238, 0xFFBC59, 0xFF8E2B, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
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_POLONIUM = makeSmeltable(8410, PO210, 0x563A26).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_TECHNIETIUM = makeSmeltable(4399, TC99, 0xFAFFFF, 0x576C6C, 0xCADFDF).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RADIUM = makeSmeltable(8826, RA226, 0xE9FAF6).setShapes(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_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, 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();
|
||||
@ -95,28 +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(INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xFDCA88, 0x601E0D, 0xC18336).setShapes(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(WIRE, BOLT, INGOT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(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(NUGGET, WIRE, INGOT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF).setShapes(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(NUGGET, DUSTTINY, INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setShapes(NUGGET, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BERYLLIUM = makeSmeltable(400, BE, 0xB2B2A6, 0x0F0F03, 0xAE9572).setShapes(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(NUGGET, DUSTTINY, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ZIRCONIUM = makeSmeltable(4000, ZR, 0xE3DCBE, 0x3E3719, 0xADA688).setShapes(NUGGET, WIRE, DUSTTINY, BILLET, INGOT, DUST, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SODIUM = makeSmeltable(1100, NA, 0xD3BF9E, 0x3A5A6B, 0x7E9493).setShapes(DUST).m();
|
||||
public static final NTMMaterial MAT_STRONTIUM = makeSmeltable(3800, SR, 0xF1E8BA, 0x271E00, 0xCAC193).setShapes(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(INGOT, DUST, BLOCK).m();
|
||||
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(NUGGET, BILLET, INGOT).m();
|
||||
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();
|
||||
@ -139,8 +151,10 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_SLAG = makeSmeltable(_AS + 11, SLAG, 0x554940, 0x34281F, 0x6C6562).setShapes(BLOCK).n();
|
||||
public static final NTMMaterial MAT_MUD = makeSmeltable(_AS + 14, MUD, 0xBCB5A9, 0x481213, 0x96783B).setShapes(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); }
|
||||
//Extension
|
||||
public static final NTMMaterial MAT_RAREEARTH = makeNonSmeltable(_ES + 00, RAREEARTH, 0xC1BDBD, 0x384646, 0x7B7F7F).setShapes(FRAGMENT, INGOT).n();
|
||||
|
||||
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);
|
||||
@ -154,6 +168,10 @@ public class Mats {
|
||||
return new NTMMaterial(id, dict).smeltable(SmeltingBehavior.ADDITIVE).setSolidColor(solidColorLight, solidColorDark).setMoltenColor(moltenColor);
|
||||
}
|
||||
|
||||
public static NTMMaterial makeNonSmeltable(int id, DictFrame dict, int solidColorLight, int solidColorDark, int moltenColor) {
|
||||
return new NTMMaterial(id, dict).smeltable(SmeltingBehavior.NOT_SMELTABLE).setSolidColor(solidColorLight, solidColorDark).setMoltenColor(moltenColor);
|
||||
}
|
||||
|
||||
public static DictFrame df(String string) {
|
||||
return new DictFrame(string);
|
||||
}
|
||||
@ -227,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 = "";
|
||||
|
||||
|
||||
@ -64,11 +64,11 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type, 2)));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type, 4)));
|
||||
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(5)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(2))));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(2)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(5))));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(1)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(1))));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, 5), ItemBedrockOreNew.toFluid(type.primary2, 2)));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, 2), ItemBedrockOreNew.toFluid(type.primary2, 5)));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, 1), ItemBedrockOreNew.toFluid(type.primary2, 1)));
|
||||
|
||||
int i3 = MaterialShapes.INGOT.q(3);
|
||||
int i3 = 3;
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.byproductAcid1, i3), ItemBedrockOreNew.toFluid(type.byproductAcid2, i3), ItemBedrockOreNew.toFluid(type.byproductAcid3, i3)));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.byproductSolvent1, i3), ItemBedrockOreNew.toFluid(type.byproductSolvent2, i3), ItemBedrockOreNew.toFluid(type.byproductSolvent3, i3)));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.byproductRad1, i3), ItemBedrockOreNew.toFluid(type.byproductRad2, i3), ItemBedrockOreNew.toFluid(type.byproductRad3, i3)));
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -522,13 +522,13 @@ public class CentrifugeRecipes extends SerializableRecipe {
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type, 2)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type, 2)});
|
||||
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1, 1), ItemBedrockOreNew.extract(type.primary2, 1), ItemBedrockOreNew.extract(type.primary2, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)});
|
||||
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1, 1), ItemBedrockOreNew.extract(type.byproductAcid2, 1), ItemBedrockOreNew.extract(type.byproductAcid3, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1, 1), ItemBedrockOreNew.extract(type.byproductSolvent2, 1), ItemBedrockOreNew.extract(type.byproductSolvent3, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
|
||||
|
||||
@ -89,7 +89,7 @@ public class CrucibleRecipes extends SerializableRecipe {
|
||||
.outputs(new MaterialStack(Mats.MAT_FERRO, n * 3)));
|
||||
|
||||
recipes.add(new CrucibleRecipe(5, "crucible.tcalloy", 9, new ItemStack(ModItems.ingot_tcalloy))
|
||||
.inputs(new MaterialStack(Mats.MAT_STEEL, n * 8), new MaterialStack(Mats.MAT_TECHNIETIUM, n))
|
||||
.inputs(new MaterialStack(Mats.MAT_STEEL, n * 8), new MaterialStack(Mats.MAT_TECHNETIUM, n))
|
||||
.outputs(new MaterialStack(Mats.MAT_TCALLOY, i)));
|
||||
|
||||
recipes.add(new CrucibleRecipe(12, "crucible.cdalloy", 9, new ItemStack(ModItems.ingot_cdalloy))
|
||||
@ -256,7 +256,7 @@ public class CrucibleRecipes extends SerializableRecipe {
|
||||
int in = material.convIn;
|
||||
int out = material.convOut;
|
||||
NTMMaterial convert = material.smeltsInto;
|
||||
for(MaterialShapes shape : MaterialShapes.allShapes) {
|
||||
if(convert.smeltable == SmeltingBehavior.SMELTABLE || convert.smeltable == SmeltingBehavior.ADDITIVE) for(MaterialShapes shape : MaterialShapes.allShapes) {
|
||||
//TODO: buffer these
|
||||
|
||||
String name = shape.name() + material.names[0];
|
||||
|
||||
@ -21,6 +21,7 @@ import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.items.machine.ItemScraps;
|
||||
import com.hbm.items.special.ItemBedrockOreNew;
|
||||
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade;
|
||||
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreOutput;
|
||||
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
|
||||
@ -133,42 +134,43 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
|
||||
|
||||
for(BedrockOreType type : BedrockOreType.values()) {
|
||||
ArrayList<Pair<Object, Integer>> productsF = new ArrayList<>();
|
||||
productsF.add(new Pair<>(type.primary1,12));
|
||||
productsF.add(new Pair<>(type.primary2,6));
|
||||
productsF.add(new Pair<>(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type), 3));
|
||||
productsF.add(new Pair(type.primary1, 8));
|
||||
productsF.add(new Pair(type.primary2, 4));
|
||||
productsF.add(new Pair(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type), 3));
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), makeBedrockOreProduct(productsF));
|
||||
|
||||
ArrayList<Pair<Object, Integer>> productsS = new ArrayList<>();
|
||||
productsS.add(new Pair<>(type.primary1,6));
|
||||
productsS.add(new Pair<>(type.primary2,12));
|
||||
productsS.add(new Pair<>(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type),3));
|
||||
productsS.add(new Pair(type.primary1, 4));
|
||||
productsS.add(new Pair(type.primary2, 8));
|
||||
productsS.add(new Pair(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type),3));
|
||||
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), makeBedrockOreProduct(productsS));
|
||||
|
||||
ArrayList<Pair<Object, Integer>> productsC = new ArrayList<>();
|
||||
productsC.add(new Pair<>(type.primary1,2));
|
||||
productsC.add(new Pair<>(type.primary2,2));
|
||||
productsC.add(new Pair(type.primary1, 2));
|
||||
productsC.add(new Pair(type.primary2, 2));
|
||||
|
||||
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), makeBedrockOreProduct(productsC));
|
||||
}
|
||||
}
|
||||
|
||||
public static ElectrolysisMetalRecipe makeBedrockOreProduct(ArrayList<Pair<Object, Integer>> products){
|
||||
ArrayList<MaterialStack> moltenProducts = new ArrayList<>();
|
||||
ArrayList<ItemStack> solidProducts = new ArrayList<>();
|
||||
ArrayList<MaterialStack> moltenProducts = new ArrayList();
|
||||
ArrayList<ItemStack> solidProducts = new ArrayList();
|
||||
|
||||
for(Pair<Object, Integer> product : products){
|
||||
if(moltenProducts.size() < 2) {
|
||||
MaterialStack melt = ItemBedrockOreNew.toFluid(product.getKey(), MaterialShapes.INGOT.q(product.getValue()));
|
||||
if(moltenProducts.size() < 2 && product.getKey() instanceof BedrockOreOutput) {
|
||||
MaterialStack melt = ItemBedrockOreNew.toFluid((BedrockOreOutput) product.getKey(), product.getValue());
|
||||
if (melt != null) {
|
||||
moltenProducts.add(melt);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
solidProducts.add(ItemBedrockOreNew.extract(product.getKey(), product.getValue()));
|
||||
|
||||
if(product.getKey() instanceof BedrockOreOutput) solidProducts.add(ItemBedrockOreNew.extract((BedrockOreOutput) product.getKey(), product.getValue()));
|
||||
if(product.getKey() instanceof ItemStack) solidProducts.add(((ItemStack) product.getKey()).copy());
|
||||
}
|
||||
if(moltenProducts.size() == 0)
|
||||
moltenProducts.add(new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(2)));
|
||||
if(moltenProducts.size() == 0) moltenProducts.add(new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(2)));
|
||||
|
||||
return new ElectrolysisMetalRecipe(
|
||||
moltenProducts.get(0),
|
||||
@ -178,9 +180,7 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
|
||||
}
|
||||
|
||||
public static ElectrolysisMetalRecipe getRecipe(ItemStack stack) {
|
||||
if(stack == null || stack.getItem() == null)
|
||||
return null;
|
||||
|
||||
if(stack == null || stack.getItem() == null) return null;
|
||||
ComparableStack comp = new ComparableStack(stack).makeSingular();
|
||||
|
||||
if(recipes.containsKey(comp)) return recipes.get(comp);
|
||||
|
||||
@ -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));
|
||||
@ -1098,18 +1095,6 @@ public class AnvilRecipes {
|
||||
new AnvilOutput(new ItemStack(Items.bone, 1), 0.75F),
|
||||
new AnvilOutput(new ItemStack(Items.experience_bottle, 1), 0.5F)
|
||||
}).setTier(1));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_aluminium), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.VACUUM_TUBE.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_copper), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.ANALOG.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_red_copper), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.BASIC.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_gold), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_schrabidium), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.BISMOID.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_targeting_tier1), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.BASIC.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_targeting_tier2), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 2, EnumCircuitType.BASIC.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_targeting_tier3), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.BASIC.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_targeting_tier4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_targeting_tier5), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED.ordinal()))}).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.circuit_targeting_tier6), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.circuit, 2, EnumCircuitType.BISMOID.ordinal()))}).setTier(1));
|
||||
}
|
||||
|
||||
public static void pullFromAssembler(ComparableStack result, int tier) {
|
||||
|
||||
@ -218,6 +218,7 @@ public class ModItems {
|
||||
public static Item ore_enriched; //final stage
|
||||
public static Item bedrock_ore_base;
|
||||
public static Item bedrock_ore;
|
||||
public static Item bedrock_ore_fragment;
|
||||
|
||||
public static Item billet_uranium;
|
||||
public static Item billet_u233;
|
||||
@ -501,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;
|
||||
@ -605,26 +605,6 @@ public class ModItems {
|
||||
|
||||
public static Item circuit;
|
||||
|
||||
public static Item circuit_raw;
|
||||
public static Item circuit_aluminium;
|
||||
public static Item circuit_copper;
|
||||
public static Item circuit_red_copper;
|
||||
public static Item circuit_gold;
|
||||
public static Item circuit_schrabidium;
|
||||
public static Item circuit_bismuth_raw;
|
||||
public static Item circuit_bismuth;
|
||||
public static Item circuit_arsenic_raw;
|
||||
public static Item circuit_arsenic;
|
||||
public static Item circuit_tantalium_raw;
|
||||
public static Item circuit_tantalium;
|
||||
|
||||
public static Item circuit_targeting_tier1;
|
||||
public static Item circuit_targeting_tier2;
|
||||
public static Item circuit_targeting_tier3;
|
||||
public static Item circuit_targeting_tier4;
|
||||
public static Item circuit_targeting_tier5;
|
||||
public static Item circuit_targeting_tier6;
|
||||
|
||||
public static Item crt_display;
|
||||
public static ItemEnumMulti circuit_star_piece;
|
||||
public static ItemEnumMulti circuit_star_component;
|
||||
@ -1249,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;
|
||||
@ -1819,8 +1797,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;
|
||||
@ -1891,7 +1867,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;
|
||||
@ -2383,14 +2358,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;
|
||||
@ -2399,14 +2366,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;
|
||||
@ -2463,9 +2422,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;
|
||||
@ -2487,7 +2443,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;
|
||||
@ -2726,10 +2681,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).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");
|
||||
@ -2922,7 +2877,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");
|
||||
@ -3098,28 +3052,10 @@ public class ModItems {
|
||||
entanglement_kit = new ItemCustomLore().setUnlocalizedName("entanglement_kit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":entanglement_kit");
|
||||
|
||||
circuit = new ItemCircuit().setUnlocalizedName("circuit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit");
|
||||
circuit_raw = new Item().setUnlocalizedName("circuit_raw").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_raw");
|
||||
circuit_aluminium = new Item().setUnlocalizedName("circuit_aluminium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_aluminium");
|
||||
circuit_copper = new Item().setUnlocalizedName("circuit_copper").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_copper");
|
||||
circuit_red_copper = new Item().setUnlocalizedName("circuit_red_copper").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_red_copper");
|
||||
circuit_gold = new Item().setUnlocalizedName("circuit_gold").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_gold");
|
||||
circuit_schrabidium = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("circuit_schrabidium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_schrabidium");
|
||||
circuit_bismuth_raw = new Item().setUnlocalizedName("circuit_bismuth_raw").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_bismuth_raw");
|
||||
circuit_bismuth = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_bismuth").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_bismuth");
|
||||
circuit_arsenic_raw = new Item().setUnlocalizedName("circuit_arsenic_raw").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_arsenic_raw");
|
||||
circuit_arsenic = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_arsenic").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_arsenic");
|
||||
circuit_tantalium_raw = new Item().setUnlocalizedName("circuit_tantalium_raw").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_tantalium_raw");
|
||||
circuit_tantalium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_tantalium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_tantalium");
|
||||
crt_display = new Item().setUnlocalizedName("crt_display").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crt_display");
|
||||
circuit_star_piece = (ItemEnumMulti) new ItemEnumMulti(ScrapType.class, true, true).setUnlocalizedName("circuit_star_piece").setCreativeTab(null);
|
||||
circuit_star_component = (ItemEnumMulti) new ItemCircuitStarComponent().setUnlocalizedName("circuit_star_component").setCreativeTab(null);
|
||||
circuit_star = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_star").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_star");
|
||||
circuit_targeting_tier1 = new Item().setUnlocalizedName("circuit_targeting_tier1").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_targeting_tier1");
|
||||
circuit_targeting_tier2 = new Item().setUnlocalizedName("circuit_targeting_tier2").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_targeting_tier2");
|
||||
circuit_targeting_tier3 = new Item().setUnlocalizedName("circuit_targeting_tier3").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_targeting_tier3");
|
||||
circuit_targeting_tier4 = new Item().setUnlocalizedName("circuit_targeting_tier4").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_targeting_tier4");
|
||||
circuit_targeting_tier5 = new Item().setUnlocalizedName("circuit_targeting_tier5").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_targeting_tier5");
|
||||
circuit_targeting_tier6 = new Item().setUnlocalizedName("circuit_targeting_tier6").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_targeting_tier6");
|
||||
mechanism_revolver_1 = new Item().setUnlocalizedName("mechanism_revolver_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_1");
|
||||
mechanism_revolver_2 = new Item().setUnlocalizedName("mechanism_revolver_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_3");
|
||||
mechanism_rifle_1 = new Item().setUnlocalizedName("mechanism_rifle_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_2");
|
||||
@ -3906,8 +3842,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");
|
||||
@ -4435,8 +4369,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");
|
||||
@ -5413,7 +5345,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");
|
||||
@ -5488,14 +5419,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");
|
||||
@ -5504,14 +5427,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");
|
||||
@ -5560,9 +5475,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");
|
||||
@ -5584,7 +5496,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");
|
||||
@ -5922,7 +5833,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());
|
||||
@ -5958,6 +5868,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ore_byproduct, ore_byproduct.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bedrock_ore_base, bedrock_ore_base.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bedrock_ore, bedrock_ore.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bedrock_ore_fragment, bedrock_ore_fragment.getUnlocalizedName());
|
||||
|
||||
//Crystals
|
||||
GameRegistry.registerItem(crystal_coal, crystal_coal.getUnlocalizedName());
|
||||
@ -6251,31 +6162,11 @@ public class ModItems {
|
||||
|
||||
//Circuits
|
||||
GameRegistry.registerItem(circuit, circuit.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_raw, circuit_raw.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_aluminium, circuit_aluminium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_copper, circuit_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_red_copper, circuit_red_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_gold, circuit_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_schrabidium, circuit_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_bismuth_raw, circuit_bismuth_raw.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_bismuth, circuit_bismuth.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_arsenic_raw, circuit_arsenic_raw.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_arsenic, circuit_arsenic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_tantalium_raw, circuit_tantalium_raw.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_tantalium, circuit_tantalium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crt_display, crt_display.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_star_piece, circuit_star_piece.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_star_component, circuit_star_component.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_star, circuit_star.getUnlocalizedName());
|
||||
|
||||
//Military Circuits
|
||||
GameRegistry.registerItem(circuit_targeting_tier1, circuit_targeting_tier1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_targeting_tier2, circuit_targeting_tier2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_targeting_tier3, circuit_targeting_tier3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_targeting_tier4, circuit_targeting_tier4.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_targeting_tier5, circuit_targeting_tier5.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_targeting_tier6, circuit_targeting_tier6.getUnlocalizedName());
|
||||
|
||||
//Gun Mechanisms
|
||||
GameRegistry.registerItem(mechanism_revolver_1, mechanism_revolver_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_revolver_2, mechanism_revolver_2.getUnlocalizedName());
|
||||
@ -6300,7 +6191,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(assembly_schrabidium, assembly_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_nightmare, assembly_nightmare.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_desh, assembly_desh.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(assembly_pip, assembly_pip.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_nopip, assembly_nopip.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_smg, assembly_smg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_556, assembly_556.getUnlocalizedName());
|
||||
@ -6346,8 +6236,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());
|
||||
@ -6469,8 +6357,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());
|
||||
@ -7876,9 +7762,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());
|
||||
@ -7946,14 +7829,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());
|
||||
@ -7962,14 +7837,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());
|
||||
@ -8018,9 +7885,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());
|
||||
@ -8042,7 +7906,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());
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockMulti;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
@ -18,6 +17,7 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ItemBlockBase extends ItemBlock {
|
||||
|
||||
@ -41,14 +41,25 @@ public class ItemBlockBase extends ItemBlock {
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
|
||||
if(field_150939_a instanceof BlockMulti) {
|
||||
return ((BlockMulti)field_150939_a).getUnlocalizedName(stack);
|
||||
if(field_150939_a instanceof IBlockMulti) {
|
||||
return ((IBlockMulti) field_150939_a).getUnlocalizedName(stack);
|
||||
} else if(field_150939_a instanceof BlockMetalFence) {
|
||||
return ((BlockMetalFence)field_150939_a).getUnlocalizedName(stack); // I considered reworking IBlockMulti instead but there are like a bajillion implementers
|
||||
return ((BlockMetalFence) field_150939_a).getUnlocalizedName(stack); // I considered reworking IBlockMulti instead but there are like a bajillion implementers
|
||||
} else {
|
||||
return super.getUnlocalizedName(stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
if(field_150939_a instanceof IBlockMulti) {
|
||||
String override = ((IBlockMulti) field_150939_a).getOverrideDisplayName(stack);
|
||||
if(override != null) {
|
||||
return override;
|
||||
}
|
||||
}
|
||||
return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import static com.hbm.inventory.material.Mats.*;
|
||||
import static com.hbm.items.special.ItemBedrockOreNew.ProcessingTrait.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -13,11 +13,10 @@ import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.inventory.material.NTMMaterial;
|
||||
import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.icon.RGBMutatorInterpolatedComponentRemap;
|
||||
import com.hbm.render.icon.TextureAtlasSpriteMutatable;
|
||||
@ -30,7 +29,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemBedrockOreNew extends Item {
|
||||
|
||||
@ -115,26 +113,39 @@ public class ItemBedrockOreNew extends Item {
|
||||
list.add(I18nUtil.resolveKey(this.getUnlocalizedNameInefficiently(stack) + ".trait." + trait.name().toLowerCase(Locale.US)));
|
||||
}
|
||||
}
|
||||
|
||||
public static class BedrockOreOutput {
|
||||
public NTMMaterial mat;
|
||||
public int amount;
|
||||
public BedrockOreOutput(NTMMaterial mat, int amount) {
|
||||
this.mat = mat;
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
||||
|
||||
public static BedrockOreOutput o(NTMMaterial mat, int amount) {
|
||||
return new BedrockOreOutput(mat, amount);
|
||||
}
|
||||
|
||||
public static enum BedrockOreType {
|
||||
// primary sulfuric solvent radsolvent
|
||||
LIGHT_METAL( 0xFFFFFF, 0x353535, "light", IRON, CU, TI, AL, AL, CHLOROCALCITE, LI, NA, CHLOROCALCITE, LI, NA),
|
||||
HEAVY_METAL( 0x868686, 0x000000, "heavy", W, PB, GOLD, GOLD, BE, W, PB, GOLD, BI, BI, GOLD),
|
||||
RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, EnumChunkType.RARE, B, LA, NB, ND, SR, ZR, NB, ND, SR),
|
||||
ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", U, TH232, RA226, RA226, PO210, RA226, RA226, PO210, TC99, TC99, U238),
|
||||
NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", COAL, S, LIGNITE, KNO, F, P_RED, F, S, CHLOROCALCITE, SI, SI),
|
||||
CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", REDSTONE, CINNABAR, SODALITE, ASBESTOS, DIAMOND, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE);
|
||||
// primary sulfuric solvent radsolvent
|
||||
LIGHT_METAL( 0xFFFFFF, 0x353535, "light", o(MAT_IRON, 9), o(MAT_COPPER, 9), o(MAT_TITANIUM, 9), o(MAT_ALUMINIUM, 5), o(MAT_ALUMINIUM, 4), o(MAT_CHLOROCALCITE, 5), o(MAT_LITHIUM, 5), o(MAT_SODIUM, 3), o(MAT_CHLOROCALCITE, 6), o(MAT_LITHIUM, 6), o(MAT_SODIUM, 6)),
|
||||
HEAVY_METAL( 0x868686, 0x000000, "heavy", o(MAT_TUNGSTEN, 9), o(MAT_LEAD, 9), o(MAT_GOLD, 2), o(MAT_GOLD, 2), o(MAT_BERYLLIUM, 3), o(MAT_TUNGSTEN, 9), o(MAT_LEAD, 9), o(MAT_GOLD, 5), o(MAT_BISMUTH, 1), o(MAT_BISMUTH, 1), o(MAT_GOLD, 6)),
|
||||
RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", o(MAT_COBALT, 5), o(MAT_RAREEARTH, 5),o(MAT_BORON, 5), o(MAT_LANTHANIUM, 3), o(MAT_NIOBIUM, 4), o(MAT_NEODYMIUM, 3), o(MAT_STRONTIUM, 3), o(MAT_ZIRCONIUM, 3), o(MAT_NIOBIUM, 5), o(MAT_NEODYMIUM, 5), o(MAT_STRONTIUM, 3)),
|
||||
ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", o(MAT_URANIUM, 4), o(MAT_THORIUM, 4), o(MAT_RADIUM, 2), o(MAT_RADIUM, 2), o(MAT_POLONIUM, 2), o(MAT_RADIUM, 2), o(MAT_RADIUM, 2), o(MAT_POLONIUM, 2), o(MAT_TECHNETIUM, 1), o(MAT_TECHNETIUM, 1), o(MAT_U238, 1)),
|
||||
NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", o(MAT_COAL, 9), o(MAT_SULFUR, 9), o(MAT_LIGNITE, 9), o(MAT_KNO, 6), o(MAT_FLUORITE, 6), o(MAT_PHOSPHORUS, 5), o(MAT_FLUORITE, 6), o(MAT_SULFUR, 6), o(MAT_CHLOROCALCITE, 6), o(MAT_SILICON, 2), o(MAT_SILICON, 2)),
|
||||
CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", o(MAT_REDSTONE, 9), o(MAT_CINNABAR, 4), o(MAT_SODALITE, 9), o(MAT_ASBESTOS, 6), o(MAT_DIAMOND, 3), o(MAT_CINNABAR, 3), o(MAT_ASBESTOS, 5), o(MAT_EMERALD, 3), o(MAT_BORAX, 3), o(MAT_MOLYSITE, 3), o(MAT_SODALITE, 9));
|
||||
//sediment
|
||||
|
||||
public int light;
|
||||
public int dark;
|
||||
public String suffix;
|
||||
public Object primary1, primary2;
|
||||
public Object byproductAcid1, byproductAcid2, byproductAcid3;
|
||||
public Object byproductSolvent1, byproductSolvent2, byproductSolvent3;
|
||||
public Object byproductRad1, byproductRad2, byproductRad3;
|
||||
public BedrockOreOutput primary1, primary2;
|
||||
public BedrockOreOutput byproductAcid1, byproductAcid2, byproductAcid3;
|
||||
public BedrockOreOutput byproductSolvent1, byproductSolvent2, byproductSolvent3;
|
||||
public BedrockOreOutput byproductRad1, byproductRad2, byproductRad3;
|
||||
|
||||
private BedrockOreType(int light, int dark, String suffix, Object p1, Object p2, Object bA1, Object bA2, Object bA3, Object bS1, Object bS2, Object bS3, Object bR1, Object bR2, Object bR3) {
|
||||
private BedrockOreType(int light, int dark, String suffix, BedrockOreOutput p1, BedrockOreOutput p2, BedrockOreOutput bA1, BedrockOreOutput bA2, BedrockOreOutput bA3, BedrockOreOutput bS1, BedrockOreOutput bS2, BedrockOreOutput bS3, BedrockOreOutput bR1, BedrockOreOutput bR2, BedrockOreOutput bR3) {
|
||||
this.light = light;
|
||||
this.dark = dark;
|
||||
this.suffix = suffix;
|
||||
@ -145,43 +156,15 @@ public class ItemBedrockOreNew extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
public static MaterialStack toFluid(Object o, int amount) {
|
||||
if(o instanceof DictFrame) {
|
||||
NTMMaterial mat = Mats.matByName.get(((DictFrame) o).mats[0]);
|
||||
if(mat != null && mat.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
return new MaterialStack(mat, amount);
|
||||
}
|
||||
public static MaterialStack toFluid(BedrockOreOutput o, double amount) {
|
||||
if(o.mat != null && o.mat.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
return new MaterialStack(o.mat, (int) Math.ceil(MaterialShapes.FRAGMENT.q(o.amount) * amount));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ItemStack extract(Object o) {
|
||||
return extract(o, 1);
|
||||
}
|
||||
|
||||
public static ItemStack extract(Object o, int amount) {
|
||||
if(o instanceof EnumChunkType) return new ItemStack(ModItems.chunk_ore, amount, ((EnumChunkType) o).ordinal());
|
||||
if(o instanceof DictFrame) {
|
||||
DictFrame frame = (DictFrame) o;
|
||||
List<ItemStack> gems = OreDictionary.getOres(frame.gem(), false); if(!gems.isEmpty()) return fromList(gems, amount);
|
||||
List<ItemStack> dusts = OreDictionary.getOres(frame.dust(), false); if(!dusts.isEmpty()) return fromList(dusts, amount);
|
||||
List<ItemStack> crystals = OreDictionary.getOres(frame.crystal(), false); if(!crystals.isEmpty()) return fromList(crystals, amount);
|
||||
List<ItemStack> billets = OreDictionary.getOres(frame.billet(), false); if(!billets.isEmpty()) return fromList(billets, amount);
|
||||
List<ItemStack> ingots = OreDictionary.getOres(frame.ingot(), false); if(!ingots.isEmpty()) return fromList(ingots, amount);
|
||||
}
|
||||
//Solely for recipe handling, to make the code more compact
|
||||
if(o instanceof ItemStack){
|
||||
ItemStack stack = (ItemStack) o;
|
||||
stack.stackSize = amount;
|
||||
return stack;
|
||||
}
|
||||
return new ItemStack(ModItems.nothing);
|
||||
}
|
||||
|
||||
private static ItemStack fromList(List<ItemStack> list, int amount) {
|
||||
ItemStack first = list.get(0).copy();
|
||||
first.stackSize = amount;
|
||||
return first;
|
||||
public static ItemStack extract(BedrockOreOutput o, double amount) {
|
||||
return new ItemStack(ModItems.bedrock_ore_fragment, Math.min((int) Math.ceil(o.amount * amount), 64), o.mat.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -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,5 +1,6 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -12,6 +13,7 @@ import net.minecraft.client.renderer.texture.TextureCompass;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -24,6 +26,14 @@ public class ItemColtanCompass extends Item {
|
||||
public int lastZ = 0;
|
||||
public long lease = 0;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add("Points towards the coltan deposit.");
|
||||
list.add("The deposit is a large area where coltan ore spawns like standard ore,");
|
||||
list.add("it's not one large blob of ore on that exact location, dipshit.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean inhand) {
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockMutatorDebris;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorCross;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
@ -28,6 +27,7 @@ import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -201,7 +201,6 @@ public class ItemAmmoArty extends Item {
|
||||
}
|
||||
|
||||
public static void standardExplosion(EntityArtilleryShell shell, MovingObjectPosition mop, float size, float rangeMod, boolean breaksBlocks) {
|
||||
shell.worldObj.playSoundEffect(shell.posX, shell.posY, shell.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
Vec3 vec = Vec3.createVectorHelper(shell.motionX, shell.motionY, shell.motionZ).normalize();
|
||||
ExplosionVNT xnt = new ExplosionVNT(shell.worldObj, mop.hitVec.xCoord - vec.xCoord, mop.hitVec.yCoord - vec.yCoord, mop.hitVec.zCoord - vec.zCoord, size);
|
||||
if(breaksBlocks) {
|
||||
@ -210,7 +209,7 @@ public class ItemAmmoArty extends Item {
|
||||
}
|
||||
xnt.setEntityProcessor(new EntityProcessorCross(7.5D).withRangeMod(rangeMod));
|
||||
xnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
xnt.setSFX(new ExplosionEffectStandard());
|
||||
//xnt.setSFX(new ExplosionEffectStandard());
|
||||
xnt.explode();
|
||||
shell.killAndClear();
|
||||
}
|
||||
@ -246,9 +245,9 @@ public class ItemAmmoArty extends Item {
|
||||
|
||||
private void init() {
|
||||
/* STANDARD SHELLS */
|
||||
this.itemTypes[NORMAL] = new ArtilleryShell("ammo_arty", SpentCasing.COLOR_CASE_16INCH) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 10F, 3F, false); }};
|
||||
this.itemTypes[CLASSIC] = new ArtilleryShell("ammo_arty_classic", SpentCasing.COLOR_CASE_16INCH) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 5F, false); }};
|
||||
this.itemTypes[EXPLOSIVE] = new ArtilleryShell("ammo_arty_he", SpentCasing.COLOR_CASE_16INCH) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 3F, true); }};
|
||||
this.itemTypes[NORMAL] = new ArtilleryShell("ammo_arty", SpentCasing.COLOR_CASE_16INCH) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 10F, 3F, false); ExplosionCreator.composeEffect(shell.worldObj, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 10, 2F, 0.5F, 25F, 5, 0, 20, 0.75F, 1F, -2F, 150); }};
|
||||
this.itemTypes[CLASSIC] = new ArtilleryShell("ammo_arty_classic", SpentCasing.COLOR_CASE_16INCH) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 5F, false); ExplosionCreator.composeEffect(shell.worldObj, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 15, 5F, 1F, 45F, 10, 0, 50, 1F, 3F, -2F, 200); }};
|
||||
this.itemTypes[EXPLOSIVE] = new ArtilleryShell("ammo_arty_he", SpentCasing.COLOR_CASE_16INCH) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 3F, true); ExplosionCreator.composeEffect(shell.worldObj, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 15, 5F, 1F, 45F, 10, 16, 50, 1F, 3F, -2F, 200); }};
|
||||
|
||||
/* MINI NUKE */
|
||||
this.itemTypes[MINI_NUKE] = new ArtilleryShell("ammo_arty_mini_nuke", SpentCasing.COLOR_CASE_16INCH_NUKE) {
|
||||
@ -271,6 +270,7 @@ public class ItemAmmoArty extends Item {
|
||||
/* PHOSPHORUS */
|
||||
this.itemTypes[PHOSPHORUS] = new ArtilleryShell("ammo_arty_phosphorus", SpentCasing.COLOR_CASE_16INCH_PHOS) {
|
||||
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) {
|
||||
shell.worldObj.playSoundEffect(shell.posX, shell.posY, shell.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
standardExplosion(shell, mop, 10F, 3F, false);
|
||||
//shell.worldObj.playSoundEffect(shell.posX, shell.posY, shell.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + shell.worldObj.rand.nextFloat() * 0.2F);
|
||||
ExplosionLarge.spawnShrapnels(shell.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 15);
|
||||
|
||||
@ -12,12 +12,12 @@ import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockMutatorDebris;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorCross;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -148,7 +148,6 @@ public class ItemAmmoHIMARS extends Item {
|
||||
}
|
||||
|
||||
public static void standardExplosion(EntityArtilleryRocket rocket, MovingObjectPosition mop, float size, float rangeMod, boolean breaksBlocks, Block slag, int slagMeta) {
|
||||
rocket.worldObj.playSoundEffect(rocket.posX, rocket.posY, rocket.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + rocket.worldObj.rand.nextFloat() * 0.2F);
|
||||
Vec3 vec = Vec3.createVectorHelper(rocket.motionX, rocket.motionY, rocket.motionZ).normalize();
|
||||
ExplosionVNT xnt = new ExplosionVNT(rocket.worldObj, mop.hitVec.xCoord - vec.xCoord, mop.hitVec.yCoord - vec.yCoord, mop.hitVec.zCoord - vec.zCoord, size);
|
||||
if(breaksBlocks) {
|
||||
@ -157,7 +156,6 @@ public class ItemAmmoHIMARS extends Item {
|
||||
}
|
||||
xnt.setEntityProcessor(new EntityProcessorCross(7.5).withRangeMod(rangeMod));
|
||||
xnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
xnt.setSFX(new ExplosionEffectStandard());
|
||||
xnt.explode();
|
||||
rocket.killAndClear();
|
||||
}
|
||||
@ -171,10 +169,10 @@ public class ItemAmmoHIMARS extends Item {
|
||||
|
||||
private void init() {
|
||||
/* STANDARD ROCKETS */
|
||||
this.itemTypes[SMALL] = new HIMARSRocket("standard", "himars_standard", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, false, ModBlocks.block_slag, 1); }};
|
||||
this.itemTypes[SMALL_HE] = new HIMARSRocket("standard_he", "himars_standard_he", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, true, ModBlocks.block_slag, 1); }};
|
||||
this.itemTypes[SMALL] = new HIMARSRocket("standard", "himars_standard", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, false, ModBlocks.block_slag, 1); ExplosionCreator.composeEffect(rocket.worldObj, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 15, 5F, 1F, 45F, 10, 0, 50, 1F, 3F, -2F, 200); }};
|
||||
this.itemTypes[SMALL_HE] = new HIMARSRocket("standard_he", "himars_standard_he", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, true, ModBlocks.block_slag, 1); ExplosionCreator.composeEffect(rocket.worldObj, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 15, 5F, 1F, 45F, 10, 16, 50, 1F, 3F, -2F, 200); }};
|
||||
this.itemTypes[SMALL_LAVA] = new HIMARSRocket("standard_lava", "himars_standard_lava", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, true, ModBlocks.volcanic_lava_block, 0); }};
|
||||
this.itemTypes[LARGE] = new HIMARSRocket("single", "himars_single", 1) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 50F, 5F, true, ModBlocks.block_slag, 1); }};
|
||||
this.itemTypes[LARGE] = new HIMARSRocket("single", "himars_single", 1) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 50F, 5F, true, ModBlocks.block_slag, 1); ExplosionCreator.composeEffect(rocket.worldObj, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 30, 6.5F, 2F, 65F, 25, 16, 50, 1.25F, 3F, -2F, 350); }};
|
||||
|
||||
this.itemTypes[SMALL_MINI_NUKE] = new HIMARSRocket("standard_mini_nuke", "himars_standard_mini_nuke", 0) {
|
||||
public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) {
|
||||
@ -186,6 +184,7 @@ public class ItemAmmoHIMARS extends Item {
|
||||
|
||||
this.itemTypes[SMALL_WP] = new HIMARSRocket("standard_wp", "himars_standard_wp", 0) {
|
||||
public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) {
|
||||
rocket.worldObj.playSoundEffect(rocket.posX, rocket.posY, rocket.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + rocket.worldObj.rand.nextFloat() * 0.2F);
|
||||
standardExplosion(rocket, mop, 20F, 3F, false, ModBlocks.block_slag, 1);
|
||||
ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30);
|
||||
ExplosionChaos.burn(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 20);
|
||||
@ -209,6 +208,7 @@ public class ItemAmmoHIMARS extends Item {
|
||||
|
||||
this.itemTypes[SMALL_TB] = new HIMARSRocket("standard_tb", "himars_standard_tb", 0) {
|
||||
public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) {
|
||||
rocket.worldObj.playSoundEffect(rocket.posX, rocket.posY, rocket.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + rocket.worldObj.rand.nextFloat() * 0.2F);
|
||||
standardExplosion(rocket, mop, 20F, 10F, true, ModBlocks.block_slag, 1);
|
||||
ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30);
|
||||
standardMush(rocket, mop, 20);
|
||||
@ -216,6 +216,7 @@ public class ItemAmmoHIMARS extends Item {
|
||||
|
||||
this.itemTypes[LARGE_TB] = new HIMARSRocket("single_tb", "himars_single_tb", 1) {
|
||||
public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) {
|
||||
rocket.worldObj.playSoundEffect(rocket.posX, rocket.posY, rocket.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + rocket.worldObj.rand.nextFloat() * 0.2F);
|
||||
standardExplosion(rocket, mop, 50F, 12F, true, ModBlocks.block_slag, 1);
|
||||
ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30);
|
||||
standardMush(rocket, mop, 35);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -53,6 +53,7 @@ import com.hbm.blocks.generic.BlockBobble.TileEntityBobble;
|
||||
import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
|
||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||
@ -115,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.*;
|
||||
@ -192,6 +192,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPedestal.class, new RenderPedestalTile());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBobble.class, new RenderBobble());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySnowglobe.class, new RenderSnowglobe());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPlushie.class, new RenderPlushie());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEmitter.class, new RenderEmitter());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLantern.class, new RenderLantern());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLanternBehemoth.class, new RenderLanternBehemoth());
|
||||
@ -347,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());
|
||||
@ -627,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());
|
||||
@ -635,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());
|
||||
@ -818,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
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType;
|
||||
import com.hbm.blocks.generic.BlockGenericStairs;
|
||||
import com.hbm.blocks.generic.BlockMultiSlab;
|
||||
import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
|
||||
import com.hbm.blocks.generic.BlockPlushie.PlushieType;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.crafting.*;
|
||||
import com.hbm.crafting.handlers.*;
|
||||
@ -446,9 +447,9 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModBlocks.lamp_tritium_green_off, 1), new Object[] { KEY_ANYGLASS, P_RED.dust(), Fluids.TRITIUM.getDict(1_000), S.dust() });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.lamp_tritium_blue_off, 1), new Object[] { KEY_ANYGLASS, P_RED.dust(), Fluids.TRITIUM.getDict(1_000), AL.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.lantern, 1), new Object[] { "PGP", " S ", " S ", 'P', KEY_ANYPANE, 'G', Items.glowstone_dust, 'S', ModBlocks.steel_beam });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spotlight_incandescent, 8), new Object[] { " G ", " T ", " I ", 'G', KEY_ANYPANE, 'T', W.wireFine(), 'I', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spotlight_fluoro, 8), new Object[] { " G ", " M ", " A ", 'G', KEY_ANYPANE, 'M', ModItems.ingot_mercury, 'A', ModItems.plate_aluminium });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spotlight_halogen, 8), new Object[] { " G ", " B ", " S ", 'G', KEY_ANYPANE, 'B', ModItems.powder_bromine, 'S', STEEL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spotlight_incandescent, 8), new Object[] { "G", "T", "I", 'G', KEY_ANYPANE, 'T', W.wireFine(), 'I', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spotlight_fluoro, 8), new Object[] { "G", "M", "A", 'G', KEY_ANYPANE, 'M', ModItems.ingot_mercury, 'A', ModItems.plate_aluminium });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spotlight_halogen, 8), new Object[] { "G", "B", "S", 'G', KEY_ANYPANE, 'B', ModItems.powder_bromine, 'S', STEEL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.floodlight, 2), new Object[] { "CSC", "TST", "G G", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), 'S', STEEL.plate(), 'T', ModItems.coil_tungsten, 'G', KEY_ANYPANE });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.barbed_wire, 16), new Object[] { "AIA", "I I", "AIA", 'A', STEEL.wireFine(), 'I', IRON.ingot() });
|
||||
@ -580,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() });
|
||||
|
||||
@ -631,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" });
|
||||
@ -723,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 });
|
||||
|
||||
@ -1174,6 +1162,9 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cm_heat, 1, 0), "PCP", "PCP", "PCP", 'P', ModItems.plate_polymer, 'C', CU.ingot());
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.missile_soyuz), new ItemStack(ModItems.missile_carrier));
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.plushie, 1, PlushieType.YOMI.ordinal()), "LCR", 'L', "cropCarrot", 'C', ModItems.rag, 'R', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE));
|
||||
addRecipeAuto(new ItemStack(ModBlocks.plushie, 1, PlushieType.NUMBERNINE.ordinal()), " C ", "LCR", " C ", 'L', ModItems.cigarette, 'C', ModItems.rag, 'R', COAL.gem());
|
||||
}
|
||||
|
||||
public static void crumple() {
|
||||
@ -1214,13 +1205,11 @@ public class CraftingManager {
|
||||
|
||||
if(Loader.isModLoaded("Mekanism")) {
|
||||
Item disassembler = (Item) Item.itemRegistry.getObject("Mekanism:AtomicDisassembler");
|
||||
|
||||
if(disassembler != null) addRecipeAuto(new ItemStack(disassembler, 1), "GAG", "EIE", " I ", 'G', GOLD.plateCast(), 'A', "alloyUltimate", 'E', "battery", 'I', "ingotRefinedObsidian");
|
||||
}
|
||||
|
||||
if(Loader.isModLoaded("MekanismGenerators")) {
|
||||
Block generator = (Block) Block.blockRegistry.getObject("MekanismGenerators:Generator");
|
||||
|
||||
if(generator != null) addRecipeAuto(new ItemStack(generator, 1, 6), " T ", "TAT", "BCB", 'T', TI.plateCast(), 'A', "alloyAdvanced", 'B', "battery", 'C', ANY_PLASTIC.ingot());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1346,6 +1346,52 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.machine_boiler_electric_off");
|
||||
ignoreMappings.add("hbm:tile.machine_boiler_electric_on");
|
||||
ignoreMappings.add("hbm:tile.watz_control");
|
||||
ignoreMappings.add("hbm:item.circuit_raw");
|
||||
ignoreMappings.add("hbm:item.circuit_aluminium");
|
||||
ignoreMappings.add("hbm:item.circuit_copper");
|
||||
ignoreMappings.add("hbm:item.circuit_red_copper");
|
||||
ignoreMappings.add("hbm:item.circuit_gold");
|
||||
ignoreMappings.add("hbm:item.circuit_schrabidium");
|
||||
ignoreMappings.add("hbm:item.circuit_bismuth_raw");
|
||||
ignoreMappings.add("hbm:item.circuit_bismuth");
|
||||
ignoreMappings.add("hbm:item.circuit_arsenic_raw");
|
||||
ignoreMappings.add("hbm:item.circuit_arsenic");
|
||||
ignoreMappings.add("hbm:item.circuit_tantalium_raw");
|
||||
ignoreMappings.add("hbm:item.circuit_tantalium");
|
||||
ignoreMappings.add("hbm:item.circuit_targeting_tier1");
|
||||
ignoreMappings.add("hbm:item.circuit_targeting_tier2");
|
||||
ignoreMappings.add("hbm:item.circuit_targeting_tier3");
|
||||
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);
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import codechicken.nei.recipe.*;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||
import com.hbm.config.CustomMachineConfigJSON;
|
||||
import com.hbm.handler.nei.CustomMachineHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -104,6 +105,21 @@ public class NEIConfig implements IConfigureNEI {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
||||
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
int x = mop.blockX;
|
||||
int y = mop.blockY;
|
||||
int z = mop.blockZ;
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileEntityPlushie) {
|
||||
TileEntityPlushie plush = (TileEntityPlushie) te;
|
||||
return new ItemStack(ModBlocks.plushie, 1, plush.type.ordinal());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override public List<String> handleTextData(ItemStack itemStack, World world, EntityPlayer player, MovingObjectPosition mop, List<String> currenttip, Layout layout) { return currenttip; }
|
||||
});
|
||||
}
|
||||
|
||||
public static void registerHandler(Object o) {
|
||||
|
||||
@ -16,6 +16,8 @@ public class NEIRegistry {
|
||||
|
||||
if(!handlers.isEmpty()) return handlers;
|
||||
|
||||
handlers.add(new AnvilRecipeHandler());
|
||||
handlers.add(new SmithingRecipeHandler());
|
||||
handlers.add(new AlloyFurnaceRecipeHandler());
|
||||
handlers.add(new ShredderRecipeHandler());
|
||||
handlers.add(new PressRecipeHandler());
|
||||
@ -27,6 +29,7 @@ public class NEIRegistry {
|
||||
handlers.add(new RefineryRecipeHandler());
|
||||
handlers.add(new VacuumRecipeHandler());
|
||||
handlers.add(new CrackingHandler());
|
||||
handlers.add(new RadiolysisRecipeHandler());
|
||||
handlers.add(new ReformingHandler());
|
||||
handlers.add(new HydrotreatingHandler());
|
||||
handlers.add(new ChemplantRecipeHandler());
|
||||
@ -35,11 +38,7 @@ public class NEIRegistry {
|
||||
handlers.add(new FusionRecipeHandler());
|
||||
handlers.add(new HadronRecipeHandler());
|
||||
handlers.add(new SILEXRecipeHandler());
|
||||
handlers.add(new SmithingRecipeHandler());
|
||||
handlers.add(new AnvilRecipeHandler());
|
||||
handlers.add(new FuelPoolHandler());
|
||||
handlers.add(new FluidRecipeHandler());
|
||||
handlers.add(new RadiolysisRecipeHandler());
|
||||
handlers.add(new CrucibleSmeltingHandler());
|
||||
handlers.add(new CrucibleAlloyingHandler());
|
||||
handlers.add(new CrucibleCastingHandler());
|
||||
@ -66,6 +65,9 @@ public class NEIRegistry {
|
||||
handlers.add(new ExposureChamberHandler());
|
||||
handlers.add(new ArcFurnaceSolidHandler());
|
||||
handlers.add(new ArcFurnaceFluidHandler());
|
||||
|
||||
//this shit comes last
|
||||
handlers.add(new FluidRecipeHandler());
|
||||
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public class ParticleDebris extends EntityFX {
|
||||
|
||||
if(this.getEntityId() % 3 == 0) {
|
||||
TextureManager man = Minecraft.getMinecraft().renderEngine;
|
||||
ParticleRocketFlame fx = new ParticleRocketFlame(man, worldObj, posX, posY, posZ).setScale(1F * world.sizeY / 16F);
|
||||
ParticleRocketFlame fx = new ParticleRocketFlame(man, worldObj, posX, posY, posZ).setScale(1F * Math.max(world.sizeY, 6) / 16F);
|
||||
fx.prevPosX = fx.posX;
|
||||
fx.prevPosY = fx.posY;
|
||||
fx.prevPosZ = fx.posZ;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
138
src/main/java/com/hbm/render/tileentity/RenderPlushie.java
Normal file
138
src/main/java/com/hbm/render/tileentity/RenderPlushie.java
Normal file
@ -0,0 +1,138 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockPlushie.PlushieType;
|
||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.loader.HFRWavefrontObject;
|
||||
import com.hbm.render.util.HorsePronter;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
public class RenderPlushie extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
public static final IModelCustom yomiModel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/trinkets/yomi.obj"), false).asVBO();
|
||||
public static final ResourceLocation yomiTex = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/yomi.png");
|
||||
public static final ResourceLocation numbernineTex = new ResourceLocation(RefStrings.MODID, "textures/models/horse/numbernine.png");
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glRotated(22.5D * tile.getBlockMetadata() + 90, 0, -1, 0);
|
||||
TileEntityPlushie te = (TileEntityPlushie) tile;
|
||||
|
||||
if(te.squishTimer > 0) {
|
||||
double squish = te.squishTimer - interp;
|
||||
GL11.glScaled(1, 1 + (-(Math.sin(squish)) * squish) * 0.025, 1);
|
||||
}
|
||||
|
||||
switch(te.type) {
|
||||
case NONE: break;
|
||||
case YOMI: GL11.glScaled(0.5, 0.5, 0.5); break;
|
||||
case NUMBERNINE: GL11.glScaled(0.75, 0.75, 0.75); break;
|
||||
}
|
||||
renderPlushie(te.type);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static void renderPlushie(PlushieType type) {
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
switch(type) {
|
||||
case NONE: break;
|
||||
case YOMI:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(yomiTex);
|
||||
yomiModel.renderAll();
|
||||
break;
|
||||
case NUMBERNINE:
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(15, -1, 0, 0);
|
||||
GL11.glTranslated(0, -0.25, 0.75);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(numbernineTex);
|
||||
HorsePronter.reset();
|
||||
double r = 45;
|
||||
HorsePronter.pose(HorsePronter.id_body, 0, -r, 0);
|
||||
HorsePronter.pose(HorsePronter.id_tail, 0, 60, 90);
|
||||
HorsePronter.pose(HorsePronter.id_lbl, 0, -75 + r, 35);
|
||||
HorsePronter.pose(HorsePronter.id_rbl, 0, -75 + r, -35);
|
||||
HorsePronter.pose(HorsePronter.id_lfl, 0, r - 25, 5);
|
||||
HorsePronter.pose(HorsePronter.id_rfl, 0, r - 25, -5);
|
||||
HorsePronter.pose(HorsePronter.id_head, 0, r + 15, 0);
|
||||
HorsePronter.pront();
|
||||
GL11.glRotated(15, 1, 0, 0);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glTranslated(0, 1, -0.6875);
|
||||
double s = 1.125D;
|
||||
GL11.glScaled(0.0625 * s, 0.0625 * s, 0.0625 * s);
|
||||
GL11.glRotated(180, 1, 0, 0);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.no9);
|
||||
ResourceManager.armor_no9.renderPart("Helmet");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.no9_insignia);
|
||||
ResourceManager.armor_no9.renderPart("Insignia");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
ItemStack stack = new ItemStack(ModItems.cigarette);
|
||||
double scale = 0.25;
|
||||
GL11.glTranslated(-0.06, 1.13, -0.42);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(90, 0, -1, 0);
|
||||
GL11.glRotated(60, 0, 0, -1);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationItemsTexture);
|
||||
IIcon icon = stack.getIconIndex();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.plushie);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -6, 0);
|
||||
GL11.glScaled(6, 6, 6);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
PlushieType type = EnumUtil.grabEnumSafely(PlushieType.class, item.getItemDamage());
|
||||
|
||||
switch(type) {
|
||||
case NONE: break;
|
||||
case YOMI: GL11.glScaled(1.25, 1.25, 1.25); break;
|
||||
case NUMBERNINE: GL11.glTranslated(0, 0.25, 0.25); GL11.glScaled(1.25, 1.25, 1.25); break;
|
||||
}
|
||||
renderPlushie(type);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,6 @@ import com.hbm.util.EnumUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -28,7 +27,6 @@ public class RenderSnowglobe extends TileEntitySpecialRenderer implements IItemR
|
||||
public static final ResourceLocation socket = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/snowglobe.png");
|
||||
public static final ResourceLocation glass = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/snowglobe_glass.png");
|
||||
public static final ResourceLocation features = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/snowglobe_features.png");
|
||||
public static RenderBlocks renderer = new RenderBlocks();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner;
|
||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||
import com.hbm.blocks.generic.PartEmitter.TileEntityPartEmitter;
|
||||
import com.hbm.blocks.machine.BlockICF.TileEntityBlockICF;
|
||||
@ -30,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.*;
|
||||
@ -42,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 {
|
||||
@ -95,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");
|
||||
@ -206,6 +200,7 @@ public class TileMappings {
|
||||
put(TileEntityPedestal.class, "tileentity_ntm_pedestal");
|
||||
put(TileEntityBobble.class, "tileentity_ntm_bobblehead");
|
||||
put(TileEntitySnowglobe.class, "tileentity_ntm_snowglobe");
|
||||
put(TileEntityPlushie.class, "tileentity_ntm_plushie");
|
||||
put(TileEntityEmitter.class, "tileentity_ntm_emitter");
|
||||
|
||||
put(TileEntityDoorGeneric.class, "tileentity_ntm_door");
|
||||
@ -422,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();
|
||||
|
||||
@ -197,9 +197,8 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
|
||||
//automatically prohibit any stacked item, items can only be added one by one
|
||||
if(stack.stackSize > 1)
|
||||
return false;
|
||||
//automatically prohibit stacked container items
|
||||
if(stack.stackSize > 1 && stack.getItem().hasContainerItem(stack)) return false;
|
||||
|
||||
//only allow insertion for the nine recipe slots
|
||||
if(slot < 10 || slot > 18)
|
||||
@ -209,6 +208,10 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
if(slots[slot - 10] == null)
|
||||
return false;
|
||||
|
||||
//do not permit total stacking beyond 4 items
|
||||
if(slots[slot] != null && slots[slot].stackSize + stack.stackSize > 4) return false;
|
||||
if(stack.stackSize > 4) return false;
|
||||
|
||||
//let's find all slots that this item could potentially go in
|
||||
List<Integer> validSlots = new ArrayList();
|
||||
for(int i = 0; i < 9; i++) {
|
||||
@ -357,6 +360,7 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
updateTemplateGrid();
|
||||
nextMode(slot);
|
||||
tile.getWorldObj().markTileEntityChunkModified(tile.xCoord, tile.yCoord, tile.zCoord, tile);
|
||||
updateTemplateGrid();
|
||||
}
|
||||
@Override
|
||||
public int[] getFilterSlots() {
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.container.ContainerCentrifuge;
|
||||
@ -11,6 +14,7 @@ import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
@ -34,17 +38,37 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyReceiverMK2, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyReceiverMK2, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC, IConfigurableMachine{
|
||||
|
||||
public int progress;
|
||||
public long power;
|
||||
public boolean isProgressing;
|
||||
public static final int maxPower = 100000;
|
||||
public static final int processingSpeed = 200;
|
||||
private int audioDuration = 0;
|
||||
|
||||
private AudioWrapper audio;
|
||||
|
||||
//configurable values
|
||||
public static int maxPower = 100000;
|
||||
public static int processingSpeed = 200;
|
||||
public static int baseConsumption = 200;
|
||||
|
||||
public String getConfigName() {
|
||||
return "centrifuge";
|
||||
}
|
||||
/* reads the JSON object and sets the machine's parameters, use defaults and ignore if a value is not yet present */
|
||||
public void readIfPresent(JsonObject obj) {
|
||||
maxPower = IConfigurableMachine.grab(obj, "I:powerCap", maxPower);
|
||||
processingSpeed = IConfigurableMachine.grab(obj, "I:timeToProcess", processingSpeed);
|
||||
baseConsumption = IConfigurableMachine.grab(obj, "I:consumption", baseConsumption);
|
||||
}
|
||||
/* writes the entire config for this machine using the relevant values */
|
||||
public void writeConfig(JsonWriter writer) throws IOException {
|
||||
writer.name("I:powerCap").value(maxPower);
|
||||
writer.name("I:timeToProcess").value(processingSpeed);
|
||||
writer.name("I:consumption").value(baseConsumption);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* So why do we do this now? You have a funny mekanism/thermal/whatever pipe and you want to output stuff from a side
|
||||
* that isn't the bottom, what do? Answer: make all slots accessible from all sides and regulate in/output in the
|
||||
@ -162,15 +186,15 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 1, power, maxPower);
|
||||
|
||||
int consumption = 200;
|
||||
int consumption = baseConsumption;
|
||||
int speed = 1;
|
||||
|
||||
UpgradeManager.eval(slots, 6, 7);
|
||||
speed += Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3);
|
||||
consumption += Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3) * 200;
|
||||
consumption += Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3) * baseConsumption;
|
||||
|
||||
speed *= (1 + Math.min(UpgradeManager.getLevel(UpgradeType.OVERDRIVE), 3) * 5);
|
||||
consumption += Math.min(UpgradeManager.getLevel(UpgradeType.OVERDRIVE), 3) * 10000;
|
||||
consumption += Math.min(UpgradeManager.getLevel(UpgradeType.OVERDRIVE), 3) * baseConsumption * 50;
|
||||
|
||||
consumption /= (1 + Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 3));
|
||||
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -263,7 +263,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements
|
||||
Block b = worldObj.getBlock(x, y, z);
|
||||
|
||||
if(b == ModBlocks.ore_bedrock) {
|
||||
combinedHardness = 60 * 20;
|
||||
combinedHardness = 5 * 60 * 20;
|
||||
bedrockOre = new BlockPos(x, y, z);
|
||||
bedrockDrilling = true;
|
||||
enableCrusher = false;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -118,7 +118,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
|
||||
if(canSlop()) {
|
||||
this.power -= this.consumption;
|
||||
this.progress += 1F / (200 - speed * 50);
|
||||
this.progress += 1F / (600 - speed * 150);
|
||||
this.processing = true;
|
||||
boolean markDirty = false;
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user