killed unused trash, added deadly gear of destruction
@ -7,12 +7,12 @@ import java.util.Random;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.handler.ThreeInts;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -20,6 +20,7 @@ import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -50,18 +51,6 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
* other solution feels like putting in way too much effort to achieve the same thing, really.
|
||||
*/
|
||||
public static int overrideTileMeta = 0;
|
||||
/*
|
||||
* Set as the meta for the core is decided, before any of the dummies are placed. This way we can somewhat easily add variation
|
||||
* to our tile entities in createNewTileEntity using the relative position to the core, as well as pull information from the core
|
||||
* block itself, if required.
|
||||
*/
|
||||
public static BlockPos lastCore = new BlockPos(0, 0, 0);
|
||||
/*
|
||||
* Because createNewTileEntity has no knowledge of where the tile ends up being beforehand, we just set a reference beforehand when
|
||||
* the block was initially placed. Why does this have to be such a pain in the ass.
|
||||
* BEWARE: This information is server-side only! Keep that in mind when expecting any of this affecting the client as well.
|
||||
*/
|
||||
public static BlockPos lastBlockSet = new BlockPos(0, 0, 0);
|
||||
|
||||
public static boolean safeRem = false;
|
||||
|
||||
@ -209,7 +198,7 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
if(!world.isRemote) {
|
||||
//this is separate because the multiblock rotation and the final meta might not be the same
|
||||
int meta = getMetaForCore(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, (EntityPlayer) player, dir.ordinal() + offset);
|
||||
lastCore = new BlockPos(x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o);
|
||||
//lastCore = new BlockPos(x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o);
|
||||
world.setBlock(x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, this, meta, 3);
|
||||
fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
@ -220,11 +209,10 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemStack);
|
||||
}
|
||||
|
||||
// this fucking sucks, why are you making me do this
|
||||
@Override
|
||||
/*@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
lastBlockSet = new BlockPos(x, y, z);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* A bit more advanced than the dir modifier, but it is important that the resulting direction meta is in the core range.
|
||||
@ -404,4 +392,23 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
||||
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
harvesters.set(player);
|
||||
this.dropBlockAsItem(world, x, y, z, meta, 0);
|
||||
harvesters.set(null);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Called after the block and TE are already gone, so this method is of no use to us.
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFalling;
|
||||
import net.minecraft.block.material.*;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
@ -625,11 +624,13 @@ public class ModBlocks {
|
||||
public static Block cel_prime_battery;
|
||||
public static Block cel_prime_port;
|
||||
public static Block cel_prime_tanks;
|
||||
|
||||
|
||||
public static Block heater_firebox;
|
||||
public static Block heater_oilburner;
|
||||
|
||||
public static Block furnace_iron;
|
||||
public static Block furnace_steel;
|
||||
public static Block machine_stirling;
|
||||
|
||||
public static Block machine_difurnace_off;
|
||||
public static Block machine_difurnace_on;
|
||||
@ -1025,8 +1026,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_satlinker;
|
||||
public static final int guiID_satlinker = 64;
|
||||
public static Block machine_telelinker;
|
||||
public static final int guiID_telelinker = 68;
|
||||
public static Block machine_keyforge;
|
||||
public static final int guiID_keyforge = 67;
|
||||
|
||||
@ -1795,9 +1794,11 @@ public class ModBlocks {
|
||||
c4 = new BlockC4().setBlockName("c4").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":c4");
|
||||
|
||||
heater_firebox = new HeaterFirebox().setBlockName("heater_firebox").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
heater_oilburner = new HeaterOilburner().setBlockName("heater_oilburner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
furnace_iron = new FurnaceIron().setBlockName("furnace_iron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
furnace_steel = new FurnaceSteel().setBlockName("furnace_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_stirling = new MachineStirling().setBlockName("machine_stirling").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
machine_difurnace_off = new MachineDiFurnace(false).setBlockName("machine_difurnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
@ -1950,7 +1951,6 @@ public class ModBlocks {
|
||||
machine_transformer_dnt_20 = new MachineTransformer(Material.iron, 1000000000000000L, 20).setBlockName("machine_transformer_dnt_20").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
||||
|
||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||
machine_telelinker = new MachineTeleLinker(Material.iron).setBlockName("machine_telelinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":machine_telelinker_side");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
machine_armor_table = new BlockArmorTable(Material.iron).setBlockName("machine_armor_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab);
|
||||
|
||||
@ -2973,8 +2973,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
|
||||
register(heater_firebox);
|
||||
register(heater_oilburner);
|
||||
register(furnace_iron);
|
||||
register(furnace_steel);
|
||||
register(machine_stirling);
|
||||
GameRegistry.registerBlock(machine_difurnace_off, machine_difurnace_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_difurnace_rtg_off, machine_difurnace_rtg_off.getUnlocalizedName());
|
||||
@ -3174,7 +3176,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_satlinker, machine_satlinker.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_telelinker, machine_telelinker.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_keyforge, machine_keyforge.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_armor_table, machine_armor_table.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_forcefield, machine_forcefield.getUnlocalizedName());
|
||||
@ -3406,7 +3407,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(b, ItemBlockBase.class, b.getUnlocalizedName());
|
||||
}
|
||||
|
||||
private static void register(Block b, Class<? extends ItemBlock> clazz) {
|
||||
/*private static void register(Block b, Class<? extends ItemBlock> clazz) {
|
||||
GameRegistry.registerBlock(b, clazz, b.getUnlocalizedName());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@ -151,7 +151,10 @@ public class Guide extends Block implements ILookOverlay {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(world.isRemote && !player.isSneaking()) {
|
||||
MainRegistry.proxy.openLink("https://ntm.fandom.com/wiki/HBM%27s_Nuclear_Tech_Wiki");
|
||||
for(int i = 0; i < 10; i++) {
|
||||
MainRegistry.proxy.openLink(/*"https://ntm.fandom.com/wiki/HBM%27s_Nuclear_Tech_Wiki"*/ "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
||||
MainRegistry.proxy.openLink("https://gist.githubusercontent.com/HbmMods/ce11ffd908e98d4159f89011aca5c0b1/raw/5cbb1afdca06648319ee4293516f3c5f7cc448ca/go%2520fuck%2520yourself");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
71
src/main/java/com/hbm/blocks/machine/HeaterOilburner.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityHeaterOilburner;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class HeaterOilburner extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public HeaterOilburner() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityHeaterOilburner();
|
||||
|
||||
if(hasExtra(meta) && meta - extra > 1)
|
||||
return new TileEntityProxyCombo().fluid();
|
||||
|
||||
if(hasExtra(meta))
|
||||
return new TileEntityProxyCombo().heatSource();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 1, 1, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x = x + dir.offsetX * o;
|
||||
z = z + dir.offsetZ * o;
|
||||
|
||||
this.makeExtra(world, x + 1, y, z);
|
||||
this.makeExtra(world, x - 1, y, z);
|
||||
this.makeExtra(world, x, y, z + 1);
|
||||
this.makeExtra(world, x, y, z - 1);
|
||||
this.makeExtra(world, x, y + 1, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
}
|
||||
185
src/main/java/com/hbm/blocks/machine/MachineStirling.java
Normal file
@ -0,0 +1,185 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityStirling;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
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.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineStirling extends BlockDummyable implements ILookOverlay, ITooltipProvider {
|
||||
|
||||
public MachineStirling() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityStirling();
|
||||
|
||||
if(meta >= extra)
|
||||
return new TileEntityProxyCombo().power();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 1, 1, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x = x + dir.offsetX * o;
|
||||
z = z + dir.offsetZ * o;
|
||||
|
||||
this.makeExtra(world, x + 1, y, z);
|
||||
this.makeExtra(world, x - 1, y, z);
|
||||
this.makeExtra(world, x, y, z + 1);
|
||||
this.makeExtra(world, x, y, z - 1);
|
||||
}
|
||||
|
||||
@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) {
|
||||
return true;
|
||||
|
||||
} else if(!player.isSneaking()) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
TileEntityStirling stirling = (TileEntityStirling)world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(!stirling.hasCog && player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gear_large) {
|
||||
player.getHeldItem().stackSize--;
|
||||
stirling.hasCog = true;
|
||||
stirling.markDirty();
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.5F, 0.75F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemStack);
|
||||
|
||||
if(itemStack.getItemDamage() == 1) {
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
int o = -getOffset();
|
||||
|
||||
ForgeDirection dir = ForgeDirection.NORTH;
|
||||
if(i == 0) dir = ForgeDirection.getOrientation(2);
|
||||
if(i == 1) dir = ForgeDirection.getOrientation(5);
|
||||
if(i == 2) dir = ForgeDirection.getOrientation(3);
|
||||
if(i == 3) dir = ForgeDirection.getOrientation(4);
|
||||
|
||||
dir = getDirModified(dir);
|
||||
|
||||
TileEntity te = world.getTileEntity(x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o);
|
||||
|
||||
if(te instanceof TileEntityStirling) {
|
||||
((TileEntityStirling) te).hasCog = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
int count = quantityDropped(metadata, fortune, world.rand);
|
||||
int dmg = 0;
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos != null) {
|
||||
TileEntityStirling stirling = (TileEntityStirling)world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!stirling.hasCog) {
|
||||
dmg = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
Item item = getItemDropped(metadata, world.rand, fortune);
|
||||
if(item != null) {
|
||||
ret.add(new ItemStack(item, 1, dmg));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(!(te instanceof TileEntityStirling))
|
||||
return;
|
||||
|
||||
TileEntityStirling stirling = (TileEntityStirling) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(stirling.heat + "TU/t");
|
||||
text.add((stirling.hasCog ? stirling.powerBuffer : 0) + "HE/t");
|
||||
|
||||
double percent = (double) stirling.heat / 300D;
|
||||
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||
|
||||
if(percent > 1D)
|
||||
color = 0xff0000;
|
||||
|
||||
text.add("&[" + color + "&]" + ((stirling.heat * 1000 / 300) / 10D) + "%");
|
||||
|
||||
if(stirling.heat > 300) {
|
||||
text.add("&[" + (BobMathUtil.getBlink() ? 0xff0000 : 0xffff00) + "&]! ! ! OVERSPEED ! ! !");
|
||||
}
|
||||
|
||||
if(!stirling.hasCog) {
|
||||
text.add("&[" + 0xff0000 + "&]Gear missing!");
|
||||
}
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
}
|
||||
@ -1,128 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTeleLinker;
|
||||
|
||||
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.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
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;
|
||||
|
||||
public class MachineTeleLinker extends BlockContainer {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private Random rand;
|
||||
private static boolean keepInventory;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public MachineTeleLinker(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineTeleLinker();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_telelinker_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_telelinker_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
|
||||
}
|
||||
|
||||
@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)
|
||||
{
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
TileEntityMachineTeleLinker entity = (TileEntityMachineTeleLinker) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_telelinker, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,13 +1,16 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -20,8 +23,10 @@ import net.minecraft.item.ItemStack;
|
||||
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 FluidDuctBox extends FluidDuctBase implements IBlockMulti {
|
||||
public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOverlay {
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon[] iconStraight;
|
||||
@SideOnly(Side.CLIENT) protected IIcon[] iconEnd;
|
||||
@ -151,4 +156,19 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti {
|
||||
public int getSubCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityPipeBaseNT))
|
||||
return;
|
||||
|
||||
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.test.TestPipe;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -13,9 +17,12 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti {
|
||||
public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti, ILookOverlay {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon[] icon;
|
||||
@ -77,4 +84,19 @@ public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti {
|
||||
public int getSubCount() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityPipeBaseNT))
|
||||
return;
|
||||
|
||||
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,197 +3,18 @@ package com.hbm.entity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.cart.EntityMinecartBogie;
|
||||
import com.hbm.entity.cart.EntityMinecartCrate;
|
||||
import com.hbm.entity.cart.EntityMinecartDestroyer;
|
||||
import com.hbm.entity.cart.EntityMinecartOre;
|
||||
import com.hbm.entity.cart.EntityMinecartPowder;
|
||||
import com.hbm.entity.cart.EntityMinecartSemtex;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
|
||||
import com.hbm.entity.effect.EntityCloudSolinium;
|
||||
import com.hbm.entity.effect.EntityCloudTom;
|
||||
import com.hbm.entity.effect.EntityEMPBlast;
|
||||
import com.hbm.entity.effect.EntityFalloutRain;
|
||||
import com.hbm.entity.effect.EntityNukeCloudBig;
|
||||
import com.hbm.entity.effect.EntityNukeCloudNoShroom;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.effect.EntityQuasar;
|
||||
import com.hbm.entity.effect.EntityRagingVortex;
|
||||
import com.hbm.entity.effect.EntitySpear;
|
||||
import com.hbm.entity.effect.EntityVortex;
|
||||
import com.hbm.entity.grenade.EntityGrenadeASchrab;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBlackHole;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBouncyGeneric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBreach;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBurst;
|
||||
import com.hbm.entity.grenade.EntityGrenadeCloud;
|
||||
import com.hbm.entity.grenade.EntityGrenadeCluster;
|
||||
import com.hbm.entity.grenade.EntityGrenadeDynamite;
|
||||
import com.hbm.entity.grenade.EntityGrenadeElectric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeFire;
|
||||
import com.hbm.entity.grenade.EntityGrenadeFlare;
|
||||
import com.hbm.entity.grenade.EntityGrenadeFrag;
|
||||
import com.hbm.entity.grenade.EntityGrenadeGas;
|
||||
import com.hbm.entity.grenade.EntityGrenadeGascan;
|
||||
import com.hbm.entity.grenade.EntityGrenadeGeneric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFBouncy;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFBrimstone;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFConcussion;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFGeneric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFHE;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFHopwire;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFImpact;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFIncendiary;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFMystery;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFNull;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFSpark;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFSticky;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFToxic;
|
||||
import com.hbm.entity.grenade.EntityGrenadeImpactGeneric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeLemon;
|
||||
import com.hbm.entity.grenade.EntityGrenadeMIRV;
|
||||
import com.hbm.entity.grenade.EntityGrenadeMk2;
|
||||
import com.hbm.entity.grenade.EntityGrenadeNuclear;
|
||||
import com.hbm.entity.grenade.EntityGrenadeNuke;
|
||||
import com.hbm.entity.grenade.EntityGrenadePC;
|
||||
import com.hbm.entity.grenade.EntityGrenadePlasma;
|
||||
import com.hbm.entity.grenade.EntityGrenadePoison;
|
||||
import com.hbm.entity.grenade.EntityGrenadePulse;
|
||||
import com.hbm.entity.grenade.EntityGrenadeSchrabidium;
|
||||
import com.hbm.entity.grenade.EntityGrenadeShrapnel;
|
||||
import com.hbm.entity.grenade.EntityGrenadeSmart;
|
||||
import com.hbm.entity.grenade.EntityGrenadeStrong;
|
||||
import com.hbm.entity.grenade.EntityGrenadeTau;
|
||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
import com.hbm.entity.grenade.EntityWastePearl;
|
||||
import com.hbm.entity.item.EntityFireworks;
|
||||
import com.hbm.entity.item.EntityMagnusCartus;
|
||||
import com.hbm.entity.item.EntityMinecartTest;
|
||||
import com.hbm.entity.item.EntityMovingItem;
|
||||
import com.hbm.entity.item.EntityTNTPrimedBase;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.entity.logic.EntityBomber;
|
||||
import com.hbm.entity.logic.EntityDeathBlast;
|
||||
import com.hbm.entity.logic.EntityEMP;
|
||||
import com.hbm.entity.logic.EntityNukeExplosion;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionAdvanced;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionNT;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionPlus;
|
||||
import com.hbm.entity.logic.EntityTomBlast;
|
||||
import com.hbm.entity.missile.EntityBobmazon;
|
||||
import com.hbm.entity.missile.EntityBombletSelena;
|
||||
import com.hbm.entity.missile.EntityBombletTheta;
|
||||
import com.hbm.entity.missile.EntityBooster;
|
||||
import com.hbm.entity.missile.EntityCarrier;
|
||||
import com.hbm.entity.missile.EntityMIRV;
|
||||
import com.hbm.entity.missile.EntityMinerRocket;
|
||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileBHole;
|
||||
import com.hbm.entity.missile.EntityMissileBunkerBuster;
|
||||
import com.hbm.entity.missile.EntityMissileBurst;
|
||||
import com.hbm.entity.missile.EntityMissileBusterStrong;
|
||||
import com.hbm.entity.missile.EntityMissileCluster;
|
||||
import com.hbm.entity.missile.EntityMissileClusterStrong;
|
||||
import com.hbm.entity.missile.EntityMissileCustom;
|
||||
import com.hbm.entity.missile.EntityMissileDoomsday;
|
||||
import com.hbm.entity.missile.EntityMissileDrill;
|
||||
import com.hbm.entity.missile.EntityMissileEMP;
|
||||
import com.hbm.entity.missile.EntityMissileEMPStrong;
|
||||
import com.hbm.entity.missile.EntityMissileEndo;
|
||||
import com.hbm.entity.missile.EntityMissileExo;
|
||||
import com.hbm.entity.missile.EntityMissileGeneric;
|
||||
import com.hbm.entity.missile.EntityMissileIncendiary;
|
||||
import com.hbm.entity.missile.EntityMissileIncendiaryStrong;
|
||||
import com.hbm.entity.missile.EntityMissileInferno;
|
||||
import com.hbm.entity.missile.EntityMissileMicro;
|
||||
import com.hbm.entity.missile.EntityMissileMirv;
|
||||
import com.hbm.entity.missile.EntityMissileNuclear;
|
||||
import com.hbm.entity.missile.EntityMissileRain;
|
||||
import com.hbm.entity.missile.EntityMissileSchrabidium;
|
||||
import com.hbm.entity.missile.EntityMissileShuttle;
|
||||
import com.hbm.entity.missile.EntityMissileStrong;
|
||||
import com.hbm.entity.missile.EntityMissileTaint;
|
||||
import com.hbm.entity.missile.EntityMissileVolcano;
|
||||
import com.hbm.entity.missile.EntitySiegeDropship;
|
||||
import com.hbm.entity.missile.EntitySoyuz;
|
||||
import com.hbm.entity.missile.EntitySoyuzCapsule;
|
||||
import com.hbm.entity.missile.EntityTestMissile;
|
||||
import com.hbm.entity.mob.EntityBlockSpider;
|
||||
import com.hbm.entity.mob.EntityCyberCrab;
|
||||
import com.hbm.entity.mob.EntityDuck;
|
||||
import com.hbm.entity.mob.EntityFBI;
|
||||
import com.hbm.entity.mob.EntityGhost;
|
||||
import com.hbm.entity.mob.EntityHunterChopper;
|
||||
import com.hbm.entity.mob.EntityMaskMan;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.mob.EntityQuackos;
|
||||
import com.hbm.entity.mob.EntityRADBeast;
|
||||
import com.hbm.entity.mob.EntityTaintCrab;
|
||||
import com.hbm.entity.mob.EntityTaintedCreeper;
|
||||
import com.hbm.entity.mob.EntityTeslaCrab;
|
||||
import com.hbm.entity.mob.EntityUFO;
|
||||
import com.hbm.entity.mob.botprime.EntityBOTPrimeBody;
|
||||
import com.hbm.entity.mob.botprime.EntityBOTPrimeHead;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeCraft;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeSkeleton;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeTunneler;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeUFO;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeZombie;
|
||||
import com.hbm.entity.particle.EntityBSmokeFX;
|
||||
import com.hbm.entity.particle.EntityChlorineFX;
|
||||
import com.hbm.entity.particle.EntityCloudFX;
|
||||
import com.hbm.entity.particle.EntityDSmokeFX;
|
||||
import com.hbm.entity.particle.EntityFogFX;
|
||||
import com.hbm.entity.particle.EntityGasFX;
|
||||
import com.hbm.entity.particle.EntityOilSpillFX;
|
||||
import com.hbm.entity.particle.EntityOrangeFX;
|
||||
import com.hbm.entity.particle.EntityPinkCloudFX;
|
||||
import com.hbm.entity.particle.EntitySSmokeFX;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.entity.particle.EntityTSmokeFX;
|
||||
import com.hbm.entity.projectile.EntityAAShell;
|
||||
import com.hbm.entity.projectile.EntityArtilleryShell;
|
||||
import com.hbm.entity.projectile.EntityBeamVortex;
|
||||
import com.hbm.entity.projectile.EntityBombletZeta;
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityBuilding;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.entity.projectile.EntityBurningFOEQ;
|
||||
import com.hbm.entity.projectile.EntityChopperMine;
|
||||
import com.hbm.entity.projectile.EntityCombineBall;
|
||||
import com.hbm.entity.projectile.EntityDischarge;
|
||||
import com.hbm.entity.projectile.EntityDuchessGambit;
|
||||
import com.hbm.entity.projectile.EntityExplosiveBeam;
|
||||
import com.hbm.entity.projectile.EntityFallingNuke;
|
||||
import com.hbm.entity.projectile.EntityFire;
|
||||
import com.hbm.entity.projectile.EntityLN2;
|
||||
import com.hbm.entity.projectile.EntityLaser;
|
||||
import com.hbm.entity.projectile.EntityLaserBeam;
|
||||
import com.hbm.entity.projectile.EntityMeteor;
|
||||
import com.hbm.entity.projectile.EntityMinerBeam;
|
||||
import com.hbm.entity.projectile.EntityModBeam;
|
||||
import com.hbm.entity.projectile.EntityNightmareBlast;
|
||||
import com.hbm.entity.projectile.EntityOilSpill;
|
||||
import com.hbm.entity.projectile.EntityPlasmaBeam;
|
||||
import com.hbm.entity.projectile.EntityRBMKDebris;
|
||||
import com.hbm.entity.projectile.EntityRainbow;
|
||||
import com.hbm.entity.projectile.EntityRocket;
|
||||
import com.hbm.entity.projectile.EntityRocketHoming;
|
||||
import com.hbm.entity.projectile.EntityRubble;
|
||||
import com.hbm.entity.projectile.EntitySchrab;
|
||||
import com.hbm.entity.projectile.EntityShrapnel;
|
||||
import com.hbm.entity.projectile.EntitySiegeLaser;
|
||||
import com.hbm.entity.projectile.EntitySparkBeam;
|
||||
import com.hbm.entity.projectile.EntityTom;
|
||||
import com.hbm.entity.projectile.EntityWaterSplash;
|
||||
import com.hbm.entity.projectile.EntityZirnoxDebris;
|
||||
import com.hbm.entity.qic.EntitySPV;
|
||||
import com.hbm.entity.cart.*;
|
||||
import com.hbm.entity.effect.*;
|
||||
import com.hbm.entity.grenade.*;
|
||||
import com.hbm.entity.item.*;
|
||||
import com.hbm.entity.logic.*;
|
||||
import com.hbm.entity.missile.*;
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.botprime.*;
|
||||
import com.hbm.entity.mob.siege.*;
|
||||
import com.hbm.entity.particle.*;
|
||||
import com.hbm.entity.projectile.*;
|
||||
import com.hbm.entity.qic.*;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
|
||||
@ -383,6 +204,7 @@ public class EntityMappings {
|
||||
addEntity(EntityArtilleryShell.class, "entity_artillery_shell", 1000);
|
||||
addEntity(EntitySiegeTunneler.class, "entity_meme_tunneler", 1000);
|
||||
addEntity(EntitySPV.class, "entity_self_propelled_vehicle_mark_1", 1000);
|
||||
addEntity(EntityCog.class, "entity_stray_cog", 1000);
|
||||
|
||||
addMob(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", 0x204131, 0x75CE00);
|
||||
addMob(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", 0x813b9b, 0xd71fdd);
|
||||
|
||||
190
src/main/java/com/hbm/entity/projectile/EntityCog.java
Normal file
@ -0,0 +1,190 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class EntityCog extends EntityThrowableNT {
|
||||
|
||||
private int turnProgress;
|
||||
private double syncPosX;
|
||||
private double syncPosY;
|
||||
private double syncPosZ;
|
||||
private double syncYaw;
|
||||
private double syncPitch;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double velocityX;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double velocityY;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double velocityZ;
|
||||
|
||||
public EntityCog(World world) {
|
||||
super(world);
|
||||
this.setSize(1F, 1F);
|
||||
}
|
||||
|
||||
public EntityCog(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
this.setSize(1F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(10, new Integer(0));
|
||||
}
|
||||
|
||||
public EntityCog setOrientation(int rot) {
|
||||
this.dataWatcher.updateObject(10, rot);
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getOrientation() {
|
||||
return this.dataWatcher.getWatchableObjectInt(10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean interactFirst(EntityPlayer player) {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.gear_large)))
|
||||
this.setDead();
|
||||
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop) {
|
||||
|
||||
if(worldObj != null && mop != null && mop.typeOfHit == MovingObjectType.ENTITY && mop.entityHit.isEntityAlive()) {
|
||||
Entity e = mop.entityHit;
|
||||
e.attackEntityFrom(ModDamageSource.rubble, 1000);
|
||||
if(!e.isEntityAlive() && e instanceof EntityLivingBase) {
|
||||
NBTTagCompound vdat = new NBTTagCompound();
|
||||
vdat.setString("type", "giblets");
|
||||
vdat.setInteger("ent", e.getEntityId());
|
||||
vdat.setInteger("cDiv", 5);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(vdat, e.posX, e.posY + e.height * 0.5, e.posZ), new TargetPoint(e.dimension, e.posX, e.posY + e.height * 0.5, e.posZ, 150));
|
||||
|
||||
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
|
||||
if(this.ticksExisted > 1 && worldObj != null && mop != null && mop.typeOfHit == MovingObjectType.BLOCK) {
|
||||
|
||||
int orientation = this.dataWatcher.getWatchableObjectInt(10);
|
||||
|
||||
if(orientation < 6) {
|
||||
|
||||
if(Vec3.createVectorHelper(motionX, motionY, motionZ).lengthVector() < 0.75) {
|
||||
this.dataWatcher.updateObject(10, orientation + 6);
|
||||
orientation += 6;
|
||||
} else {
|
||||
ForgeDirection side = ForgeDirection.getOrientation(mop.sideHit);
|
||||
this.motionX *= 1 - (Math.abs(side.offsetX) * 2);
|
||||
this.motionY *= 1 - (Math.abs(side.offsetY) * 2);
|
||||
this.motionZ *= 1 - (Math.abs(side.offsetZ) * 2);
|
||||
worldObj.createExplosion(this, posX, posY, posZ, 3F, false);
|
||||
|
||||
if(worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ).getExplosionResistance(this) < 50) {
|
||||
worldObj.func_147480_a(mop.blockX, mop.blockY, mop.blockZ, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(orientation >= 6) {
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.inGround = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
int orientation = this.dataWatcher.getWatchableObjectInt(10);
|
||||
if(orientation >= 6 && !this.inGround) {
|
||||
this.dataWatcher.updateObject(10, orientation - 6);
|
||||
}
|
||||
super.onUpdate();
|
||||
} else {
|
||||
if(this.turnProgress > 0) {
|
||||
double interpX = this.posX + (this.syncPosX - this.posX) / (double) this.turnProgress;
|
||||
double interpY = this.posY + (this.syncPosY - this.posY) / (double) this.turnProgress;
|
||||
double interpZ = this.posZ + (this.syncPosZ - this.posZ) / (double) this.turnProgress;
|
||||
double d = MathHelper.wrapAngleTo180_double(this.syncYaw - (double) this.rotationYaw);
|
||||
this.rotationYaw = (float) ((double) this.rotationYaw + d / (double) this.turnProgress);
|
||||
this.rotationPitch = (float)((double)this.rotationPitch + (this.syncPitch - (double)this.rotationPitch) / (double)this.turnProgress);
|
||||
--this.turnProgress;
|
||||
this.setPosition(interpX, interpY, interpZ);
|
||||
} else {
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) {
|
||||
this.velocityX = this.motionX = p_70016_1_;
|
||||
this.velocityY = this.motionY = p_70016_3_;
|
||||
this.velocityZ = this.motionZ = p_70016_5_;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotation2(double x, double y, double z, float yaw, float pitch, int theNumberThree) {
|
||||
this.syncPosX = x;
|
||||
this.syncPosY = y;
|
||||
this.syncPosZ = z;
|
||||
this.syncYaw = yaw;
|
||||
this.syncPitch = pitch;
|
||||
this.turnProgress = theNumberThree;
|
||||
this.motionX = this.velocityX;
|
||||
this.motionY = this.velocityY;
|
||||
this.motionZ = this.velocityZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getGravityVelocity() {
|
||||
return inGround ? 0 : 0.03D;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int groundDespawn() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -31,18 +31,21 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
public static final int plinkCooldownLength = 10;
|
||||
public int plinkCooldown = 0;
|
||||
|
||||
public float shield = 0;
|
||||
public float maxShield = 0;
|
||||
public int lastDamage = 0;
|
||||
public static final float shieldCap = 100;
|
||||
|
||||
public HbmPlayerProps(EntityPlayer player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public static HbmPlayerProps registerData(EntityPlayer player) {
|
||||
|
||||
player.registerExtendedProperties(key, new HbmPlayerProps(player));
|
||||
return (HbmPlayerProps) player.getExtendedProperties(key);
|
||||
}
|
||||
|
||||
public static HbmPlayerProps getData(EntityPlayer player) {
|
||||
|
||||
HbmPlayerProps props = (HbmPlayerProps) player.getExtendedProperties(key);
|
||||
return props != null ? props : registerData(player);
|
||||
}
|
||||
@ -115,13 +118,33 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
props.plinkCooldown = props.plinkCooldownLength;
|
||||
}
|
||||
}
|
||||
|
||||
public float getMaxShield() {
|
||||
return this.maxShield;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Entity entity, World world) { }
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound compound) { }
|
||||
public void saveNBTData(NBTTagCompound nbt) {
|
||||
|
||||
NBTTagCompound props = new NBTTagCompound();
|
||||
|
||||
props.setFloat("shield", shield);
|
||||
props.setFloat("maxShield", maxShield);
|
||||
|
||||
nbt.setTag("HbmPlayerProps", props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound compound) { }
|
||||
public void loadNBTData(NBTTagCompound nbt) {
|
||||
|
||||
NBTTagCompound props = (NBTTagCompound) nbt.getTag("HbmPlayerProps");
|
||||
|
||||
if(props != null) {
|
||||
this.shield = props.getFloat("shield");
|
||||
this.maxShield = props.getFloat("maxShield");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,7 +147,6 @@ public class BobmazonOfferFactory {
|
||||
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.crate_can, 1), Requirement.STEEL, 20 * inflation));
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.machine_keyforge), Requirement.STEEL, 10 * inflation));
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.machine_telelinker), Requirement.CHEMICS, 35 * inflation));
|
||||
tools.add(new Offer(new ItemStack(ModBlocks.machine_satlinker), Requirement.CHEMICS, 50 * inflation));
|
||||
tools.add(new Offer(new ItemStack(ModItems.oil_detector), Requirement.CHEMICS, 45 * inflation));
|
||||
tools.add(new Offer(new ItemStack(ModItems.geiger_counter), Requirement.CHEMICS, 10 * inflation));
|
||||
|
||||
@ -59,8 +59,16 @@ public class EntityEffectHandler {
|
||||
|
||||
if(entity instanceof EntityPlayerMP) {
|
||||
HbmLivingProps props = HbmLivingProps.getData(entity);
|
||||
HbmPlayerProps pprps = HbmPlayerProps.getData((EntityPlayerMP) entity);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
if(pprps.shield < pprps.maxShield && entity.ticksExisted > pprps.lastDamage + 60) {
|
||||
int tsd = entity.ticksExisted - (pprps.lastDamage + 60);
|
||||
pprps.shield += Math.min(pprps.maxShield - pprps.shield, 0.005F * tsd);
|
||||
}
|
||||
|
||||
props.saveNBTData(data);
|
||||
pprps.saveNBTData(data);
|
||||
PacketDispatcher.wrapper.sendTo(new ExtPropPacket(data), (EntityPlayerMP) entity);
|
||||
}
|
||||
|
||||
|
||||
@ -14,10 +14,13 @@ public class FuelHandler implements IFuelHandler {
|
||||
|
||||
int single = 200;
|
||||
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel)) return single * 16;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto)) return single * 40;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto_triplet)) return single * 200;
|
||||
if(fuel.getItem().equals(ModItems.rocket_fuel)) return single * 32;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel)) return single * 16;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto)) return single * 40;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto_triplet)) return single * 200;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_bf)) return single * 160;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto_bf)) return single * 400;
|
||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto_triplet_bf)) return single * 2000;
|
||||
if(fuel.getItem().equals(ModItems.rocket_fuel)) return single * 32;
|
||||
|
||||
if(fuel.getItem().equals(ModItems.biomass))
|
||||
return 800;
|
||||
|
||||
@ -456,13 +456,6 @@ public class GUIHandler implements IGuiHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_telelinker: {
|
||||
if(entity instanceof TileEntityMachineTeleLinker) {
|
||||
return new ContainerMachineTeleLinker(player.inventory, (TileEntityMachineTeleLinker) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_keyforge: {
|
||||
if(entity instanceof TileEntityMachineKeyForge) {
|
||||
return new ContainerMachineKeyForge(player.inventory, (TileEntityMachineKeyForge) entity);
|
||||
@ -1268,13 +1261,6 @@ public class GUIHandler implements IGuiHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_telelinker: {
|
||||
if(entity instanceof TileEntityMachineTeleLinker) {
|
||||
return new GUIMachineTeleLinker(player.inventory, (TileEntityMachineTeleLinker) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_keyforge: {
|
||||
if(entity instanceof TileEntityMachineKeyForge) {
|
||||
return new GUIMachineKeyForge(player.inventory, (TileEntityMachineKeyForge) entity);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -26,6 +27,7 @@ import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -509,7 +511,16 @@ public class Gun4GaugeFactory {
|
||||
|
||||
if(creature.getClass().getCanonicalName().startsWith("net.minecraft.entity.titan")) {
|
||||
ExplosionNukeSmall.explode(bullet.worldObj, creature.posX, creature.posY, creature.posZ, ExplosionNukeSmall.medium);
|
||||
creature.isDead = true;
|
||||
|
||||
bullet.worldObj.removeEntity(creature);
|
||||
bullet.worldObj.unloadEntities(new ArrayList() {{ add(creature); }});
|
||||
//creature.isDead = true;
|
||||
|
||||
/*try {
|
||||
Method m = Class.forName("net.minecraft.entity.deity.EntityDeity").getDeclaredMethod("setTitanHealth", double.class);
|
||||
m.setAccessible(true);
|
||||
m.invoke(creature, 0.0D);
|
||||
} catch (Exception ex) { }*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +86,14 @@ public class AnvilRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
for(int i = 0; i < in.size(); i++) {
|
||||
|
||||
if(in.get(i) instanceof List) {
|
||||
List<ItemStack> array = (List<ItemStack>) in.get(i);
|
||||
|
||||
for(ItemStack stack : array)
|
||||
System.out.println(stack);
|
||||
}
|
||||
|
||||
this.input.add(new PositionedStack(in.get(i), inOX + 18 * (i % inLine), inOY + 18 * (i / inLine)));
|
||||
}
|
||||
|
||||
|
||||
@ -486,10 +486,8 @@ public class HazardRegistry {
|
||||
|
||||
public static void registerTrafos() {
|
||||
HazardSystem.trafos.add(new HazardTransformerRadiationNBT());
|
||||
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSafeMEDrives)
|
||||
{
|
||||
return;
|
||||
} else {
|
||||
|
||||
if(!(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSafeMEDrives)) {
|
||||
HazardSystem.trafos.add(new HazardTransformerRadiationME());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -393,10 +394,20 @@ public class RecipesCommon {
|
||||
@Override
|
||||
public List<ItemStack> extractForNEI() {
|
||||
|
||||
List<ItemStack> ores = OreDictionary.getOres(name);
|
||||
List<ItemStack> fromDict = OreDictionary.getOres(name);
|
||||
List<ItemStack> ores = new ArrayList();
|
||||
|
||||
for(ItemStack stack : ores)
|
||||
stack.stackSize = this.stacksize;
|
||||
for(ItemStack stack : fromDict) {
|
||||
|
||||
ItemStack copy = stack.copy();
|
||||
copy.stackSize = this.stacksize;
|
||||
|
||||
if(stack.getItemDamage() != OreDictionary.WILDCARD_VALUE) {
|
||||
ores.add(copy);
|
||||
} else {
|
||||
ores.addAll(MainRegistry.proxy.getSubItems(copy));
|
||||
}
|
||||
}
|
||||
|
||||
return ores;
|
||||
}
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTeleLinker;
|
||||
|
||||
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 ContainerMachineTeleLinker extends Container {
|
||||
|
||||
private TileEntityMachineTeleLinker diFurnace;
|
||||
|
||||
public ContainerMachineTeleLinker(InventoryPlayer invPlayer, TileEntityMachineTeleLinker tedf) {
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 35));
|
||||
|
||||
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 <= 0) {
|
||||
if (!this.mergeItemStack(var5, 1, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return diFurnace.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityHeaterOilburner;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
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 ContainerOilburner extends Container {
|
||||
|
||||
private TileEntityHeaterOilburner testNuke;
|
||||
|
||||
public ContainerOilburner(InventoryPlayer invPlayer, TileEntityHeaterOilburner tedf) {
|
||||
|
||||
testNuke = tedf;
|
||||
|
||||
//In
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 26, 17));
|
||||
//Out
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 26, 53));
|
||||
//Fluid ID
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 44, 71));
|
||||
|
||||
int offset = 37;
|
||||
|
||||
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 + offset));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + offset));
|
||||
}
|
||||
}
|
||||
|
||||
@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 <= 2) {
|
||||
if(!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof IItemFluidIdentifier) {
|
||||
if(!this.mergeItemStack(var5, 2, 3, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(var5, 0, 1, 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);
|
||||
}
|
||||
}
|
||||
@ -17,11 +17,11 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class GUIFirebox extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_firebox.png");
|
||||
private TileEntityHeaterFirebox diFurnace;
|
||||
private TileEntityHeaterFirebox firebox;
|
||||
|
||||
public GUIFirebox(InventoryPlayer invPlayer, TileEntityHeaterFirebox tedf) {
|
||||
super(new ContainerFirebox(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
firebox = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 168;
|
||||
@ -38,7 +38,7 @@ public class GUIFirebox extends GuiInfoContainer {
|
||||
|
||||
if(this.isMouseOverSlot(slot, x, y) && !slot.getHasStack()) {
|
||||
|
||||
List<String> bonuses = this.diFurnace.burnModule.getDesc();
|
||||
List<String> bonuses = this.firebox.burnModule.getDesc();
|
||||
|
||||
if(!bonuses.isEmpty()) {
|
||||
this.func_146283_a(bonuses, x, y);
|
||||
@ -47,13 +47,13 @@ public class GUIFirebox extends GuiInfoContainer {
|
||||
}
|
||||
}
|
||||
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 80, guiTop + 27, 71, 7, x, y, new String[] { String.format("%,d", diFurnace.heatEnergy) + " / " + String.format("%,d", diFurnace.maxHeatEnergy) + "TU" });
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 80, guiTop + 36, 71, 7, x, y, new String[] { diFurnace.burnHeat + "TU/s", (diFurnace.burnTime / 20) + "s" });
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 80, guiTop + 27, 71, 7, x, y, new String[] { String.format("%,d", firebox.heatEnergy) + " / " + String.format("%,d", firebox.maxHeatEnergy) + "TU" });
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 80, guiTop + 36, 71, 7, x, y, new String[] { firebox.burnHeat + "TU/s", (firebox.burnTime / 20) + "s" });
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||
String name = this.firebox.hasCustomInventoryName() ? this.firebox.getInventoryName() : I18n.format(this.firebox.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);
|
||||
@ -65,13 +65,13 @@ public class GUIFirebox extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = diFurnace.heatEnergy * 69 / diFurnace.maxHeatEnergy;
|
||||
int i = firebox.heatEnergy * 69 / firebox.maxHeatEnergy;
|
||||
drawTexturedModalRect(guiLeft + 81, guiTop + 28, 176, 0, i, 5);
|
||||
|
||||
int j = diFurnace.burnTime * 70 / Math.max(diFurnace.maxBurnTime, 1);
|
||||
int j = firebox.burnTime * 70 / Math.max(firebox.maxBurnTime, 1);
|
||||
drawTexturedModalRect(guiLeft + 81, guiTop + 37, 176, 5, j, 5);
|
||||
|
||||
if(diFurnace.wasOn) {
|
||||
if(firebox.wasOn) {
|
||||
drawTexturedModalRect(guiLeft + 25, guiTop + 26, 176, 10, 18, 18);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineTeleLinker;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTeleLinker;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineTeleLinker extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_telelinker.png");
|
||||
private TileEntityMachineTeleLinker siren;
|
||||
|
||||
public GUIMachineTeleLinker(InventoryPlayer invPlayer, TileEntityMachineTeleLinker tedf) {
|
||||
super(new ContainerMachineTeleLinker(invPlayer, tedf));
|
||||
siren = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
String[] text = new String[] { "The first slot will copy the turret chip's",
|
||||
"UUIDs and add them to the second slot." };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "The third slot will clear the",
|
||||
"turret chip's UUID list."};
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.siren.hasCustomInventoryName() ? this.siren.getInventoryName() : I18n.format(this.siren.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);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
85
src/main/java/com/hbm/inventory/gui/GUIOilburner.java
Normal file
@ -0,0 +1,85 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerOilburner;
|
||||
import com.hbm.inventory.fluid.types.FluidTypeFlammable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityHeaterOilburner;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIOilburner extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_oilburner.png");
|
||||
private TileEntityHeaterOilburner diFurnace;
|
||||
|
||||
public GUIOilburner(InventoryPlayer invPlayer, TileEntityHeaterOilburner tedf) {
|
||||
super(new ContainerOilburner(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 203;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float interp) {
|
||||
super.drawScreen(x, y, interp);
|
||||
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 116, guiTop + 17, 16, 52, x, y, new String[] { String.format("%,d", Math.min(diFurnace.heatEnergy, diFurnace.maxHeatEnergy)) + " / " + String.format("%,d", diFurnace.maxHeatEnergy) + "TU" });
|
||||
|
||||
if(diFurnace.tank.getTankType() instanceof FluidTypeFlammable) {
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 79, guiTop + 34, 18, 18, x, y, new String[] { "10mB/t", (int)(((FluidTypeFlammable)diFurnace.tank.getTankType()).getHeatEnergy() / 1000) * 10 + "TU/t" });
|
||||
}
|
||||
|
||||
diFurnace.tank.renderTankInfo(this, x, y, guiLeft + 44, guiTop + 17, 16, 52);
|
||||
}
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 80 <= x && guiLeft + 80 + 16 > x && guiTop + 54 < y && guiTop + 54 + 14 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setBoolean("toggle", true);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.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);
|
||||
|
||||
int i = diFurnace.heatEnergy * 52 / diFurnace.maxHeatEnergy;
|
||||
drawTexturedModalRect(guiLeft + 116, guiTop + 69 - i, 194, 52 - i, 16, i);
|
||||
|
||||
if(diFurnace.isOn) {
|
||||
drawTexturedModalRect(guiLeft + 70, guiTop + 54, 210, 0, 35, 14);
|
||||
|
||||
if(diFurnace.tank.getFill() > 0 && diFurnace.tank.getTankType() instanceof FluidTypeFlammable) {
|
||||
drawTexturedModalRect(guiLeft + 79, guiTop + 34, 176, 0, 18, 18);
|
||||
}
|
||||
}
|
||||
|
||||
diFurnace.tank.renderTank(guiLeft + 44, guiTop + 69, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -1346,7 +1346,7 @@ public class AssemblerRecipes {
|
||||
|
||||
} else if(o instanceof OreDictStack) {
|
||||
|
||||
List<ItemStack> list = new ArrayList();
|
||||
/*List<ItemStack> list = new ArrayList();
|
||||
OreDictStack oreStack = (OreDictStack)o;
|
||||
List<ItemStack> ores = OreDictionary.getOres(oreStack.name);
|
||||
|
||||
@ -1354,9 +1354,9 @@ public class AssemblerRecipes {
|
||||
ItemStack copy = ore.copy();
|
||||
copy.stackSize = oreStack.stacksize;
|
||||
list.add(copy);
|
||||
}
|
||||
}*/
|
||||
|
||||
value.add(list);
|
||||
value.add(((OreDictStack)o).extractForNEI());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,25 +24,29 @@ public class LiquefactionRecipes {
|
||||
public static void register() {
|
||||
|
||||
//oil processing
|
||||
recipes.put(COAL.gem(), new FluidStack(100, Fluids.COALOIL));
|
||||
recipes.put(COAL.dust(), new FluidStack(100, Fluids.COALOIL));
|
||||
recipes.put(KEY_OIL_TAR, new FluidStack(75, Fluids.BITUMEN));
|
||||
recipes.put(KEY_CRACK_TAR, new FluidStack(100, Fluids.BITUMEN));
|
||||
recipes.put(KEY_COAL_TAR, new FluidStack(50, Fluids.BITUMEN));
|
||||
recipes.put(KEY_LOG, new FluidStack(100, Fluids.MUG));
|
||||
recipes.put(COAL.gem(), new FluidStack(100, Fluids.COALOIL));
|
||||
recipes.put(COAL.dust(), new FluidStack(100, Fluids.COALOIL));
|
||||
recipes.put(LIGNITE.gem(), new FluidStack(50, Fluids.COALOIL));
|
||||
recipes.put(LIGNITE.dust(), new FluidStack(50, Fluids.COALOIL));
|
||||
recipes.put(KEY_OIL_TAR, new FluidStack(75, Fluids.BITUMEN));
|
||||
recipes.put(KEY_CRACK_TAR, new FluidStack(100, Fluids.BITUMEN));
|
||||
recipes.put(KEY_COAL_TAR, new FluidStack(50, Fluids.BITUMEN));
|
||||
recipes.put(KEY_LOG, new FluidStack(100, Fluids.MUG));
|
||||
//general utility recipes because why not
|
||||
recipes.put(new ComparableStack(Blocks.netherrack), new FluidStack(250, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Blocks.cobblestone), new FluidStack(250, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Blocks.stone), new FluidStack(250, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Blocks.obsidian), new FluidStack(500, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Items.snowball), new FluidStack(125, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.snow), new FluidStack(500, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.ice), new FluidStack(1000, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.packed_ice), new FluidStack(1000, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Items.ender_pearl), new FluidStack(100, Fluids.ENDERJUICE));
|
||||
recipes.put(new ComparableStack(Blocks.netherrack), new FluidStack(250, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Blocks.cobblestone), new FluidStack(250, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Blocks.stone), new FluidStack(250, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Blocks.obsidian), new FluidStack(500, Fluids.LAVA));
|
||||
recipes.put(new ComparableStack(Items.snowball), new FluidStack(125, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.snow), new FluidStack(500, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.ice), new FluidStack(1000, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.packed_ice), new FluidStack(1000, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Items.ender_pearl), new FluidStack(100, Fluids.ENDERJUICE));
|
||||
|
||||
recipes.put(new ComparableStack(Items.sugar), new FluidStack(150, Fluids.ETHANOL));
|
||||
recipes.put(new ComparableStack(ModItems.biomass), new FluidStack(250, Fluids.BIOGAS));
|
||||
recipes.put(new ComparableStack(Items.sugar), new FluidStack(150, Fluids.ETHANOL));
|
||||
recipes.put(new ComparableStack(ModItems.biomass), new FluidStack(250, Fluids.BIOGAS));
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.solid_fuel_bf), new FluidStack(250, Fluids.BALEFIRE));
|
||||
|
||||
//TODO: more recipes as the crack oil derivatives are added
|
||||
}
|
||||
|
||||
@ -126,6 +126,11 @@ public class MachineRecipes {
|
||||
return new ItemStack(ModItems.ingot_meteorite);
|
||||
}
|
||||
|
||||
if (mODE(item, "ingotUranium238") && mODE(item2, new String[] {"ingotSteel", "dustSteel"})
|
||||
|| mODE(item, new String[] {"ingotSteel", "dustSteel"}) && mODE(item2, "ingotUranium238")) {
|
||||
return new ItemStack(ModItems.ingot_ferrouranium, 2);
|
||||
}
|
||||
|
||||
if (item.getItem() == ModItems.meteorite_sword_hardened && mODE(item2, new String[] {"ingotCobalt", "dustCobalt"})
|
||||
|| mODE(item, new String[] {"ingotCobalt", "dustCobalt"}) && item2.getItem() == ModItems.meteorite_sword_hardened) {
|
||||
return new ItemStack(ModItems.meteorite_sword_alloyed, 1);
|
||||
@ -429,6 +434,8 @@ public class MachineRecipes {
|
||||
getFurnaceOutput(new ItemStack(ModItems.ingot_steel), new ItemStack(ModItems.nugget_technetium)).copy());
|
||||
recipes.put(new ItemStack[] { new ItemStack(ModItems.ingot_cobalt), new ItemStack(ModBlocks.block_meteor) },
|
||||
getFurnaceOutput(new ItemStack(ModItems.ingot_cobalt), new ItemStack(ModBlocks.block_meteor)).copy());
|
||||
recipes.put(new ItemStack[] { new ItemStack(ModItems.ingot_steel), new ItemStack(ModItems.ingot_u238) },
|
||||
getFurnaceOutput(new ItemStack(ModItems.ingot_steel), new ItemStack(ModItems.ingot_u238)).copy());
|
||||
|
||||
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleAlloy) {
|
||||
recipes.put(new ItemStack[] { new ItemStack(ModItems.canister_empty), new ItemStack(Items.coal) },
|
||||
|
||||
@ -82,6 +82,7 @@ public class SolidificationRecipes {
|
||||
registerRecipe(BIOFUEL, SF_BIOFUEL, ModItems.solid_fuel);
|
||||
registerRecipe(AROMATICS, SF_AROMA, ModItems.solid_fuel);
|
||||
registerRecipe(UNSATURATEDS, SF_UNSAT, ModItems.solid_fuel);
|
||||
registerRecipe(BALEFIRE, 250, ModItems.solid_fuel_bf);
|
||||
}
|
||||
|
||||
private static void registerRecipe(FluidType type, int quantity, Item output) { registerRecipe(type, quantity, new ItemStack(output)); }
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.food.ItemFlask.EnumInfusion;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -44,7 +45,7 @@ public class AnvilRecipes {
|
||||
for(Block anvil : anvils) {
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_bismuth, 1), new ComparableStack(anvil), new ComparableStack(ModItems.ingot_bismuth, 10)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_dnt, 1), new ComparableStack(anvil), new OreDictStack(DNT.ingot(), 10)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_ferrouranium, 1), new ComparableStack(anvil), new OreDictStack(U238.ingot(), 10)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_ferrouranium, 1), new ComparableStack(anvil), new ComparableStack(ModItems.ingot_ferrouranium, 10)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_meteorite, 1), new ComparableStack(anvil), new ComparableStack(ModItems.ingot_meteorite, 10)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_schrabidate, 1), new ComparableStack(anvil), new OreDictStack(SBD.ingot(), 10)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_starmetal, 1), new ComparableStack(anvil), new OreDictStack(STAR.ingot(), 10)));
|
||||
@ -64,6 +65,7 @@ public class AnvilRecipes {
|
||||
smithingRecipes.add(new AnvilSmithingHotRecipe(3, new ItemStack(ModItems.meteorite_sword_reforged, 1), new ComparableStack(ModItems.meteorite_sword_seared), new ComparableStack(ModItems.ingot_meteorite_forged)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModItems.gun_ar15, 1), new ComparableStack(ModItems.gun_thompson), new ComparableStack(ModItems.pipe_lead)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(1916169, new ItemStack(ModItems.wings_murk, 1), new ComparableStack(ModItems.wings_limp), new ComparableStack(ModItems.particle_tachyon)));
|
||||
smithingRecipes.add(new AnvilSmithingRecipe(4, new ItemStack(ModItems.flask_infusion, EnumInfusion.SHIELD.ordinal()), new ComparableStack(ModItems.gem_alexandrite), new ComparableStack(ModItems.bottle_nuka)));
|
||||
|
||||
smithingRecipes.add(new AnvilSmithingCyanideRecipe());
|
||||
smithingRecipes.add(new AnvilSmithingRenameRecipe());
|
||||
@ -177,6 +179,14 @@ public class AnvilRecipes {
|
||||
new OreDictStack(CU.ingot(), 8)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.heater_firebox))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new ComparableStack(ModItems.tank_steel, 4),
|
||||
new ComparableStack(ModItems.pipes_steel, 1),
|
||||
new OreDictStack(TI.ingot(), 12),
|
||||
new OreDictStack(CU.ingot(), 8)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.heater_oilburner))).setTier(3));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new ComparableStack(Blocks.stonebrick, 16),
|
||||
@ -186,6 +196,15 @@ public class AnvilRecipes {
|
||||
new ComparableStack(ModBlocks.steel_grate, 16)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.furnace_steel))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(KEY_PLANKS, 16),
|
||||
new OreDictStack(STEEL.plate(), 6),
|
||||
new OreDictStack(CU.ingot(), 8),
|
||||
new ComparableStack(ModItems.coil_copper, 4),
|
||||
new ComparableStack(ModItems.gear_large, 1)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.machine_stirling))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 6),
|
||||
|
||||
@ -178,6 +178,7 @@ public class ModItems {
|
||||
public static Item ingot_starmetal;
|
||||
public static Item ingot_saturnite;
|
||||
public static Item plate_saturnite;
|
||||
public static Item ingot_ferrouranium;
|
||||
public static Item ingot_electronium;
|
||||
public static Item nugget_zirconium;
|
||||
public static Item nugget_mercury;
|
||||
@ -348,6 +349,9 @@ public class ModItems {
|
||||
public static Item solid_fuel;
|
||||
public static Item solid_fuel_presto;
|
||||
public static Item solid_fuel_presto_triplet;
|
||||
public static Item solid_fuel_bf;
|
||||
public static Item solid_fuel_presto_bf;
|
||||
public static Item solid_fuel_presto_triplet_bf;
|
||||
public static Item rocket_fuel;
|
||||
|
||||
public static Item crystal_coal;
|
||||
@ -632,6 +636,8 @@ public class ModItems {
|
||||
public static Item pellet_coal;
|
||||
public static Item ring_starmetal;
|
||||
public static Item flywheel_beryllium;
|
||||
|
||||
public static Item gear_large;
|
||||
|
||||
public static Item toothpicks;
|
||||
public static Item ducttape;
|
||||
@ -960,6 +966,8 @@ public class ModItems {
|
||||
public static Item bottle2_korl_special;
|
||||
public static Item bottle2_fritz_special;
|
||||
public static Item bottle2_sunset;
|
||||
public static Item flask_empty;
|
||||
public static Item flask_infusion;
|
||||
public static Item chocolate_milk;
|
||||
public static Item coffee;
|
||||
public static Item coffee_radium;
|
||||
@ -2761,6 +2769,7 @@ public class ModItems {
|
||||
ingot_starmetal = new ItemStarmetal().setUnlocalizedName("ingot_starmetal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_starmetal");
|
||||
ingot_saturnite = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("ingot_saturnite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_saturnite");
|
||||
plate_saturnite = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("plate_saturnite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_saturnite");
|
||||
ingot_ferrouranium = new ItemCustomLore().setUnlocalizedName("ingot_ferrouranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_ferrouranium");
|
||||
ingot_fiberglass = new ItemCustomLore().setUnlocalizedName("ingot_fiberglass").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_fiberglass");
|
||||
ingot_asbestos = new ItemCustomLore().setUnlocalizedName("ingot_asbestos").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_asbestos");
|
||||
powder_asbestos = new ItemCustomLore().setUnlocalizedName("powder_asbestos").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_asbestos");
|
||||
@ -2790,6 +2799,9 @@ public class ModItems {
|
||||
solid_fuel = new Item().setUnlocalizedName("solid_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel");
|
||||
solid_fuel_presto = new Item().setUnlocalizedName("solid_fuel_presto").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel_presto");
|
||||
solid_fuel_presto_triplet = new Item().setUnlocalizedName("solid_fuel_presto_triplet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel_presto_triplet");
|
||||
solid_fuel_bf = new Item().setUnlocalizedName("solid_fuel_bf").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel_bf");
|
||||
solid_fuel_presto_bf = new Item().setUnlocalizedName("solid_fuel_presto_bf").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel_presto_bf");
|
||||
solid_fuel_presto_triplet_bf = new Item().setUnlocalizedName("solid_fuel_presto_triplet_bf").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel_presto_triplet_bf");
|
||||
rocket_fuel = new Item().setUnlocalizedName("rocket_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rocket_fuel");
|
||||
coke = new ItemEnumMulti(EnumCokeType.class, true, true).setUnlocalizedName("coke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coke");
|
||||
lignite = new Item().setUnlocalizedName("lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":lignite");
|
||||
@ -3052,6 +3064,8 @@ public class ModItems {
|
||||
deuterium_filter = new Item().setUnlocalizedName("deuterium_filter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":deuterium_filter");
|
||||
parts_legendary = new ItemEnumMulti(EnumLegendaryType.class, false, true).setUnlocalizedName("parts_legendary").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":parts_legendary");
|
||||
|
||||
gear_large = new Item().setUnlocalizedName("gear_large").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gear_large");
|
||||
|
||||
cap_aluminium = new Item().setUnlocalizedName("cap_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cap_aluminium");
|
||||
hull_small_steel = new Item().setUnlocalizedName("hull_small_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_small_steel");
|
||||
hull_small_aluminium = new ItemCustomLore().setUnlocalizedName("hull_small_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_small_aluminium");
|
||||
@ -3525,6 +3539,7 @@ public class ModItems {
|
||||
bottle2_korl_special = new ItemEnergy().makeBottle(bottle2_empty, cap_korl).setUnlocalizedName("bottle2_korl_special").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_korl");
|
||||
bottle2_fritz_special = new ItemEnergy().makeBottle(bottle2_empty, cap_fritz).setUnlocalizedName("bottle2_fritz_special").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_fritz");
|
||||
bottle2_sunset = new ItemEnergy().makeBottle(bottle2_empty, cap_sunset).setUnlocalizedName("bottle2_sunset").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_sunset");
|
||||
flask_infusion = new ItemFlask().setUnlocalizedName("flask_infusion").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":flask");
|
||||
chocolate_milk = new ItemEnergy().setUnlocalizedName("chocolate_milk").setTextureName(RefStrings.MODID + ":chocolate_milk");
|
||||
coffee = new ItemEnergy().setUnlocalizedName("coffee").setTextureName(RefStrings.MODID + ":coffee");
|
||||
coffee_radium = new ItemEnergy().setUnlocalizedName("coffee_radium").setTextureName(RefStrings.MODID + ":coffee_radium");
|
||||
@ -5811,6 +5826,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ingot_lanthanium, ingot_lanthanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_actinium, ingot_actinium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_desh, ingot_desh.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_ferrouranium, ingot_ferrouranium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_starmetal, ingot_starmetal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_saturnite, ingot_saturnite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_euphemium, ingot_euphemium.getUnlocalizedName());
|
||||
@ -5836,6 +5852,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(solid_fuel_presto, solid_fuel_presto.getUnlocalizedName());
|
||||
GameRegistry.registerItem(solid_fuel_presto_triplet, solid_fuel_presto_triplet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(solid_fuel_bf, solid_fuel_bf.getUnlocalizedName());
|
||||
GameRegistry.registerItem(solid_fuel_presto_bf, solid_fuel_presto_bf.getUnlocalizedName());
|
||||
GameRegistry.registerItem(solid_fuel_presto_triplet_bf, solid_fuel_presto_triplet_bf.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rocket_fuel, rocket_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_fiberglass, ingot_fiberglass.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_asbestos, ingot_asbestos.getUnlocalizedName());
|
||||
@ -6216,6 +6235,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(deuterium_filter, deuterium_filter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(part_generic, part_generic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(parts_legendary, parts_legendary.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gear_large, gear_large.getUnlocalizedName());
|
||||
|
||||
//Plant Products
|
||||
GameRegistry.registerItem(plant_item, plant_item.getUnlocalizedName());
|
||||
@ -7744,6 +7764,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(bottle2_sunset, bottle2_sunset.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bottle_opener, bottle_opener.getUnlocalizedName());
|
||||
|
||||
//Flasks
|
||||
GameRegistry.registerItem(flask_infusion, flask_infusion.getUnlocalizedName());
|
||||
|
||||
//Canned Food
|
||||
GameRegistry.registerItem(canned_beef, canned_beef.getUnlocalizedName());
|
||||
GameRegistry.registerItem(canned_tuna, canned_tuna.getUnlocalizedName());
|
||||
|
||||
76
src/main/java/com/hbm/items/food/ItemFlask.java
Normal file
@ -0,0 +1,76 @@
|
||||
package com.hbm.items.food;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemFlask extends ItemEnumMulti {
|
||||
|
||||
public static enum EnumInfusion {
|
||||
SHIELD
|
||||
}
|
||||
|
||||
public ItemFlask() {
|
||||
super(EnumInfusion.class, true, true);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
|
||||
Enum[] enums = theEnum.getEnumConstants();
|
||||
this.icons = new IIcon[enums.length];
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
if(world.isRemote)
|
||||
return stack;
|
||||
|
||||
if(stack.getItemDamage() == EnumInfusion.SHIELD.ordinal()) {
|
||||
float infusion = 5F;
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
props.maxShield = Math.min(props.shieldCap, props.shield + infusion);
|
||||
props.shield += infusion;
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
return EnumAction.drink;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(stack.getItemDamage() == EnumInfusion.SHIELD.ordinal() && HbmPlayerProps.getData(player).maxShield >= HbmPlayerProps.shieldCap)
|
||||
return stack;
|
||||
|
||||
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4291)";
|
||||
public static final String VERSION = "1.0.27 BETA (4312)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -20,6 +20,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@ -33,8 +34,10 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import java.awt.Color;
|
||||
import java.awt.Desktop;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
@ -257,6 +260,8 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceIron.class, new RenderFurnaceIron());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceSteel.class, new RenderFurnaceSteel());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterFirebox.class, new RenderFirebox());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterOilburner.class, new RenderOilburner());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStirling.class, new RenderStirling());
|
||||
//AMS
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
||||
@ -546,6 +551,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRBMKDebris.class, new RenderRBMKDebris());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityZirnoxDebris.class, new RenderZirnoxDebris());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityArtilleryShell.class, new RenderArtilleryShell());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityCog.class, new RenderCog());
|
||||
//grenades
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeGeneric.class, new RenderSnowball(ModItems.grenade_generic));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeStrong.class, new RenderSnowball(ModItems.grenade_strong));
|
||||
@ -1789,5 +1795,16 @@ public class ClientProxy extends ServerProxy {
|
||||
Desktop.getDesktop().browse(new URI(url));
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getSubItems(ItemStack stack) {
|
||||
|
||||
List<ItemStack> list = new ArrayList();
|
||||
stack.getItem().getSubItems(stack.getItem(), stack.getItem().getCreativeTab(), list);
|
||||
for(ItemStack sta : list) {
|
||||
sta.stackSize = stack.stackSize;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -476,9 +476,10 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.flame_politics, 1), new Object[] { " I ", "IPI", " I ", 'P', Items.paper, 'I', KEY_BLACK });
|
||||
addRecipeAuto(new ItemStack(ModItems.flame_opinion, 1), new Object[] { " R ", "RPR", " R ", 'P', Items.paper, 'R', KEY_RED });
|
||||
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.solid_fuel_presto, 1), new Object[] { " P ", "SRS", " P ", 'P', Items.paper, 'S', ModItems.solid_fuel, 'R', REDSTONE.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel_presto_triplet, 1), new Object[] { ModItems.solid_fuel_presto, ModItems.solid_fuel_presto, ModItems.solid_fuel_presto, ModItems.ball_dynamite });
|
||||
addRecipeAuto(new ItemStack(ModItems.solid_fuel_presto_bf, 1), new Object[] { " P ", "SRS", " P ", 'P', Items.paper, 'S', ModItems.solid_fuel_bf, 'R', REDSTONE.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel_presto_triplet_bf, 1), new Object[] { ModItems.solid_fuel_presto_bf, ModItems.solid_fuel_presto_bf, ModItems.solid_fuel_presto_bf, ModItems.ingot_c4 });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.flame_war), 1), new Object[] { "WHW", "CTP", "WOW", 'W', Item.getItemFromBlock(Blocks.planks), 'T', Item.getItemFromBlock(Blocks.tnt), 'H', ModItems.flame_pony, 'C', ModItems.flame_conspiracy, 'P', ModItems.flame_politics, 'O', ModItems.flame_opinion });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.det_cord, 4), new Object[] { " P ", "PGP", " P ", 'P', Items.paper, 'G', Items.gunpowder });
|
||||
@ -561,7 +562,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.watch, 1), new Object[] { "LEL", "EWE", "LEL", 'E', EUPH.ingot(), 'L', KEY_BLUE, 'W', Items.clock });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.key, 1), new Object[] { " B", " B ", "P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModItems.key_kit, 1), new Object[] { "PKP", "DTD", "PKP", 'P', GOLD.plate(), 'K', ModItems.key, 'D', DESH.dust(), 'T', ModItems.screwdriver });
|
||||
addRecipeAuto(new ItemStack(ModItems.key_kit, 1), new Object[] { "PKP", "DTD", "PKP", 'P', GOLD.plate(), 'K', ModItems.key, 'D', DESH.dust(), 'T', KEY_TOOL_SCREWDRIVER });
|
||||
addRecipeAuto(new ItemStack(ModItems.key_red, 1), new Object[] { "DSC", "SMS", "KSD", 'C', ModItems.circuit_targeting_tier4, 'M', Items.nether_star, 'K', ModItems.key, 'D', DESH.dust(), 'S', BIGMT.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.pin, 1), new Object[] { "W ", " W", " W", 'W', ModItems.wire_copper });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_rusty, 1), new Object[] { "I", "B", "I", 'I', IRON.ingot(), 'B', ModItems.bolt_tungsten });
|
||||
@ -582,9 +583,7 @@ public class CraftingManager {
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct, 8), new Object[] { "SAS", " ", "SAS", 'S', STEEL.plate(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_solid, 8), new Object[] { "SAS", "A A", "SAS", 'S', STEEL.ingot(), 'A', AL.plate() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.machine_assembler, 1), new Object[] { "WWW", "MCM", "ISI", 'W', KEY_ANYPANE, 'M', ModItems.motor, 'C', ModItems.circuit_aluminium, 'I', "blockCopper", 'S', STEEL.block() });
|
||||
addRecipeAuto(new ItemStack(ModItems.template_folder, 1), new Object[] { "LPL", "BPB", "LPL", 'P', Items.paper, 'L', KEY_BLUE, 'B', KEY_WHITE });
|
||||
//addRecipeAuto(new ItemStack(ModItems.turret_control, 1), new Object[] { "R12", "PPI", " I", 'R', REDSTONE.dust(), '1', ModItems.circuit_aluminium, '2', ModItems.circuit_red_copper, 'P', STEEL.plate(), 'I', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.pellet_antimatter, 1), new Object[] { "###", "###", "###", '#', ModItems.cell_antimatter });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_tank_empty, 8), new Object[] { "121", "1G1", "121", '1', AL.plate(), '2', IRON.plate(), 'G', KEY_ANYPANE });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_tank_lead_empty, 4), new Object[] { "LUL", "LTL", "LUL", 'L', PB.plate(), 'U', U238.billet(), 'T', ModItems.fluid_tank_empty });
|
||||
@ -610,7 +609,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.ams_core_thingy), new Object[] { "NSN", "NGN", "G G", 'N', GOLD.nugget(), 'G', GOLD.ingot(), 'S', ModItems.battery_spark_cell_10000 });
|
||||
addRecipeAuto(new ItemStack(ModItems.photo_panel), new Object[] { " G ", "IPI", " C ", 'G', KEY_ANYPANE, 'I', ModItems.plate_polymer, 'P', NETHERQUARTZ.dust(), 'C', ModItems.circuit_aluminium });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_satlinker), new Object[] { "PSP", "SCS", "PSP", 'P', STEEL.plate(), 'S', STAR.ingot(), 'C', ModItems.sat_chip });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_telelinker), new Object[] { "PSP", "SCS", "PSP", 'P', STEEL.plate(), 'S', ALLOY.ingot(), 'C', ModItems.circuit_red_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_keyforge), new Object[] { "PCP", "WSW", "WSW", 'P', STEEL.plate(), 'S', W.ingot(), 'C', ModItems.padlock, 'W', KEY_PLANKS });
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_chip), new Object[] { "WWW", "CIC", "WWW", 'W', ModItems.wire_red_copper, 'C', ModItems.circuit_red_copper, 'I', ANY_PLASTIC.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_mapper), new Object[] { "H", "B", 'H', ModItems.sat_head_mapper, 'B', ModItems.sat_base });
|
||||
@ -945,6 +943,8 @@ public class CraftingManager {
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2), new Object[] { ModItems.ingot_chainsteel, ModItems.ingot_bismuth, ModItems.gem_alexandrite, ModItems.gem_alexandrite });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2, 3), new Object[] { DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER3) });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER3), new Object[] { ModItems.ingot_chainsteel, ModItems.ingot_smore, ModItems.gem_alexandrite, ModItems.gem_alexandrite, ModItems.gem_alexandrite });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.gear_large, 1), new Object[] { "III", "ICI", "III", 'I', IRON.plate(), 'C', CU.ingot()});
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.upgrade_5g), new Object[] { ModItems.upgrade_template, ModItems.gem_alexandrite });
|
||||
|
||||
|
||||
@ -914,6 +914,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.sellafield_4");
|
||||
ignoreMappings.add("hbm:tile.sellafield_core");
|
||||
ignoreMappings.add("hbm:tile.fusion_core");
|
||||
ignoreMappings.add("hbm:tile.machine_telelinker");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -930,6 +930,19 @@ public class ModEventHandler {
|
||||
|
||||
EntityLivingBase e = event.entityLiving;
|
||||
|
||||
if(e instanceof EntityPlayer) {
|
||||
|
||||
EntityPlayer player = (EntityPlayer) e;
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
if(props.shield > 0) {
|
||||
float reduce = Math.min(props.shield, event.ammount);
|
||||
props.shield -= reduce;
|
||||
event.ammount -= reduce;
|
||||
}
|
||||
props.lastDamage = player.ticksExisted;
|
||||
}
|
||||
|
||||
if(HbmLivingProps.getContagion(e) > 0 && event.ammount < 100)
|
||||
event.ammount *= 2F;
|
||||
|
||||
|
||||
@ -110,6 +110,7 @@ import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.client.event.sound.PlaySoundEvent17;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
|
||||
public class ModEventHandlerClient {
|
||||
@ -119,30 +120,6 @@ public class ModEventHandlerClient {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
/*if(event.type == ElementType.CROSSHAIRS) {
|
||||
int width = event.resolution.getScaledWidth();
|
||||
int height = event.resolution.getScaledHeight();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.0F);
|
||||
GL11.glDepthMask(false);
|
||||
tess.startDrawingQuads();
|
||||
float brightness = (int)(System.currentTimeMillis() % 10000) / 10000F;
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (1 - brightness) * 0.8F);
|
||||
tess.addVertex(width, 0, 0);
|
||||
tess.addVertex(0, 0, 0);
|
||||
tess.addVertex(0, height, 0);
|
||||
tess.addVertex(width, height, 0);
|
||||
tess.draw();
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDepthMask(true);
|
||||
return;
|
||||
}*/
|
||||
|
||||
/// HANDLE GUN OVERLAYS ///
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemHUD) {
|
||||
((IItemHUD)player.getHeldItem().getItem()).renderHUD(event, event.type, player, player.getHeldItem());
|
||||
@ -212,80 +189,6 @@ public class ModEventHandlerClient {
|
||||
if(helmet != null && helmet.getItem() instanceof ArmorFSB) {
|
||||
((ArmorFSB)helmet.getItem()).handleOverlay(event, player);
|
||||
}
|
||||
|
||||
/// HANDLE ELECTRIC FSB HUD ///
|
||||
|
||||
if(!event.isCanceled() && event.type == event.type.ARMOR) {
|
||||
|
||||
int width = event.resolution.getScaledWidth();
|
||||
int height = event.resolution.getScaledHeight();
|
||||
int left = width / 2 - 91;
|
||||
int top = height - GuiIngameForge.left_height - 3;
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
if(ArmorFSB.hasFSBArmorIgnoreCharge(player)) {
|
||||
ArmorFSB chestplate = (ArmorFSB)player.inventory.armorInventory[2].getItem();
|
||||
boolean noHelmet = chestplate.noHelmet;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
|
||||
for(int i = 0; i < (noHelmet ? 3 : 4); i++) {
|
||||
|
||||
ItemStack stack = player.inventory.armorInventory[i];
|
||||
|
||||
if(!(stack != null && stack.getItem() instanceof ArmorFSBPowered))
|
||||
break;
|
||||
|
||||
float tot = 1F - (float) ((ArmorFSBPowered)stack.getItem()).getDurabilityForDisplay(stack);
|
||||
|
||||
tess.setColorOpaque_F(0.25F, 0.25F, 0.25F);
|
||||
tess.addVertex(left - 0.5, top - 0.5, 0);
|
||||
tess.addVertex(left - 0.5, top + 1.5, 0);
|
||||
tess.addVertex(left + 81.5, top + 1.5, 0);
|
||||
tess.addVertex(left + 81.5, top - 0.5, 0);
|
||||
|
||||
tess.setColorOpaque_F(1F - tot, tot, 0F);
|
||||
tess.addVertex(left, top, 0);
|
||||
tess.addVertex(left, top + 1, 0);
|
||||
tess.addVertex(left + 81 * tot, top + 1, 0);
|
||||
tess.addVertex(left + 81 * tot, top, 0);
|
||||
|
||||
top -= 2.5;
|
||||
}
|
||||
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
} else if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() instanceof JetpackBase) {
|
||||
|
||||
ItemStack stack = player.inventory.armorInventory[2];
|
||||
|
||||
float tot = (float) ((JetpackBase)stack.getItem()).getFuel(stack) / (float) ((JetpackBase)stack.getItem()).getMaxFill(stack);
|
||||
top -= 3;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorOpaque_F(0.25F, 0.25F, 0.25F);
|
||||
tess.addVertex(left - 0.5, top - 0.5, 0);
|
||||
tess.addVertex(left - 0.5, top + 4.5, 0);
|
||||
tess.addVertex(left + 81.5, top + 4.5, 0);
|
||||
tess.addVertex(left + 81.5, top - 0.5, 0);
|
||||
|
||||
tess.setColorOpaque_F(1F - tot, tot, 0F);
|
||||
tess.addVertex(left, top, 0);
|
||||
tess.addVertex(left, top + 4, 0);
|
||||
tess.addVertex(left + 81 * tot, top + 4, 0);
|
||||
tess.addVertex(left + 81 * tot, top, 0);
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if(!event.isCanceled() && event.type == event.type.HOTBAR) {
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
@ -296,6 +199,98 @@ public class ModEventHandlerClient {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onOverlayRender(RenderGameOverlayEvent.Post event) {
|
||||
|
||||
/// HANDLE ELECTRIC FSB HUD ///
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
if(!event.isCanceled() && event.type == event.type.HEALTH) {
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
if(props.maxShield > 0) {
|
||||
RenderScreenOverlay.renderShieldBar(event.resolution, Minecraft.getMinecraft().ingameGUI);
|
||||
}
|
||||
}
|
||||
|
||||
if(!event.isCanceled() && event.type == event.type.ARMOR) {
|
||||
|
||||
if(ForgeHooks.getTotalArmorValue(player) == 0/* && GuiIngameForge.left_height == 59*/) {
|
||||
GuiIngameForge.left_height -= 10;
|
||||
}
|
||||
|
||||
int width = event.resolution.getScaledWidth();
|
||||
int height = event.resolution.getScaledHeight();
|
||||
int left = width / 2 - 91;
|
||||
|
||||
if(ArmorFSB.hasFSBArmorIgnoreCharge(player)) {
|
||||
ArmorFSB chestplate = (ArmorFSB) player.inventory.armorInventory[2].getItem();
|
||||
boolean noHelmet = chestplate.noHelmet;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
|
||||
for(int i = 0; i < (noHelmet ? 3 : 4); i++) {
|
||||
|
||||
int top = height - GuiIngameForge.left_height + 6;
|
||||
|
||||
ItemStack stack = player.inventory.armorInventory[i];
|
||||
|
||||
if(!(stack != null && stack.getItem() instanceof ArmorFSBPowered))
|
||||
break;
|
||||
|
||||
float tot = 1F - (float) ((ArmorFSBPowered) stack.getItem()).getDurabilityForDisplay(stack);
|
||||
|
||||
tess.setColorOpaque_F(0.25F, 0.25F, 0.25F);
|
||||
tess.addVertex(left - 0.5, top - 0.5, 0);
|
||||
tess.addVertex(left - 0.5, top + 1.5, 0);
|
||||
tess.addVertex(left + 81.5, top + 1.5, 0);
|
||||
tess.addVertex(left + 81.5, top - 0.5, 0);
|
||||
|
||||
tess.setColorOpaque_F(1F - tot, tot, 0F);
|
||||
tess.addVertex(left, top, 0);
|
||||
tess.addVertex(left, top + 1, 0);
|
||||
tess.addVertex(left + 81 * tot, top + 1, 0);
|
||||
tess.addVertex(left + 81 * tot, top, 0);
|
||||
|
||||
GuiIngameForge.left_height += 3;
|
||||
}
|
||||
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
} else if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() instanceof JetpackBase) {
|
||||
|
||||
ItemStack stack = player.inventory.armorInventory[2];
|
||||
|
||||
float tot = (float) ((JetpackBase) stack.getItem()).getFuel(stack) / (float) ((JetpackBase) stack.getItem()).getMaxFill(stack);
|
||||
|
||||
int top = height - GuiIngameForge.left_height + 3;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorOpaque_F(0.25F, 0.25F, 0.25F);
|
||||
tess.addVertex(left - 0.5, top - 0.5, 0);
|
||||
tess.addVertex(left - 0.5, top + 4.5, 0);
|
||||
tess.addVertex(left + 81.5, top + 4.5, 0);
|
||||
tess.addVertex(left + 81.5, top - 0.5, 0);
|
||||
|
||||
tess.setColorOpaque_F(1F - tot, tot, 0F);
|
||||
tess.addVertex(left, top, 0);
|
||||
tess.addVertex(left, top + 4, 0);
|
||||
tess.addVertex(left + 81 * tot, top + 4, 0);
|
||||
tess.addVertex(left + 81 * tot, top, 0);
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean ducked = false;
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@ -58,6 +58,10 @@ public class ResourceManager {
|
||||
|
||||
//Heaters
|
||||
public static final IModelCustom heater_firebox = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/firebox.obj"));
|
||||
public static final IModelCustom heater_oilburner = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/oilburner.obj"));
|
||||
|
||||
//Heat Engines
|
||||
public static final IModelCustom stirling = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/stirling.obj"));
|
||||
|
||||
//Furnaces
|
||||
public static final IModelCustom furnace_iron = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/furnace_iron.obj"));
|
||||
@ -370,6 +374,10 @@ public class ResourceManager {
|
||||
|
||||
//Heaters
|
||||
public static final ResourceLocation heater_firebox_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/firebox.png");
|
||||
public static final ResourceLocation heater_oilburner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/oilburner.png");
|
||||
|
||||
//Heat Engines
|
||||
public static final ResourceLocation stirling_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/stirling.png");
|
||||
|
||||
//Furnaces
|
||||
public static final ResourceLocation furnace_iron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/furnace_iron.png");
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.sound.nt.ISoundSourceTE;
|
||||
@ -7,6 +10,7 @@ import com.hbm.sound.nt.SoundWrapper;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -57,10 +61,17 @@ public class ServerProxy {
|
||||
public boolean isVanished(Entity e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void openLink(String url) { }
|
||||
|
||||
public SoundWrapper getTileSound(String sound, ISoundSourceTE source) {
|
||||
return new SoundWrapper();
|
||||
}
|
||||
|
||||
public List<ItemStack> getSubItems(ItemStack stack) {
|
||||
|
||||
List<ItemStack> list = new ArrayList();
|
||||
list.add(stack);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -24,9 +24,10 @@ public class ModuleBurnTime {
|
||||
private static final int modCoke = 4;
|
||||
private static final int modSolid = 5;
|
||||
private static final int modRocket = 6;
|
||||
private static final int modBalefire = 7;
|
||||
|
||||
private double[] modTime = new double[7];
|
||||
private double[] modHeat = new double[7];
|
||||
private double[] modTime = new double[8];
|
||||
private double[] modHeat = new double[8];
|
||||
|
||||
public ModuleBurnTime() {
|
||||
for(int i = 0; i < modTime.length; i++) {
|
||||
@ -53,11 +54,15 @@ public class ModuleBurnTime {
|
||||
if(stack == null)
|
||||
return 0;
|
||||
|
||||
if(stack.getItem() == ModItems.solid_fuel) return mod[modSolid];
|
||||
if(stack.getItem() == ModItems.solid_fuel_presto) return mod[modSolid];
|
||||
if(stack.getItem() == ModItems.solid_fuel_presto_triplet) return mod[modSolid];
|
||||
if(stack.getItem() == ModItems.solid_fuel) return mod[modSolid];
|
||||
if(stack.getItem() == ModItems.solid_fuel_presto) return mod[modSolid];
|
||||
if(stack.getItem() == ModItems.solid_fuel_presto_triplet) return mod[modSolid];
|
||||
|
||||
if(stack.getItem() == ModItems.solid_fuel_bf) return mod[modBalefire];
|
||||
if(stack.getItem() == ModItems.solid_fuel_presto_bf) return mod[modBalefire];
|
||||
if(stack.getItem() == ModItems.solid_fuel_presto_triplet_bf) return mod[modBalefire];
|
||||
|
||||
if(stack.getItem() == ModItems.rocket_fuel) return mod[modRocket];
|
||||
if(stack.getItem() == ModItems.rocket_fuel) return mod[modRocket];
|
||||
|
||||
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||
|
||||
@ -91,6 +96,7 @@ public class ModuleBurnTime {
|
||||
addIf(list, "Coke", modTime[modCoke]);
|
||||
addIf(list, "Solid Fuel", modTime[modSolid]);
|
||||
addIf(list, "Rocket Fuel", modTime[modRocket]);
|
||||
addIf(list, "Balefire", modTime[modBalefire]);
|
||||
|
||||
if(list.size() == 1)
|
||||
list.clear();
|
||||
@ -110,6 +116,7 @@ public class ModuleBurnTime {
|
||||
addIf(list, "Coke", modHeat[modCoke]);
|
||||
addIf(list, "Solid Fuel", modHeat[modSolid]);
|
||||
addIf(list, "Rocket Fuel", modHeat[modRocket]);
|
||||
addIf(list, "Balefire", modHeat[modBalefire]);
|
||||
|
||||
if(list.size() == 1)
|
||||
list.clear();
|
||||
@ -128,7 +135,7 @@ public class ModuleBurnTime {
|
||||
String num = ((int) (mod * 100)) + "%";
|
||||
|
||||
if(mod < 0)
|
||||
num = EnumChatFormatting.RED + "-" + num;
|
||||
num = EnumChatFormatting.RED + num;
|
||||
else
|
||||
num = EnumChatFormatting.GREEN + "+" + num;
|
||||
|
||||
@ -142,6 +149,7 @@ public class ModuleBurnTime {
|
||||
public ModuleBurnTime setCokeTimeMod(double mod) { this.modTime[modCoke] = mod; return this; }
|
||||
public ModuleBurnTime setSolidTimeMod(double mod) { this.modTime[modSolid] = mod; return this; }
|
||||
public ModuleBurnTime setRocketTimeMod(double mod) { this.modTime[modRocket] = mod; return this; }
|
||||
public ModuleBurnTime setBalefireTimeMod(double mod) { this.modTime[modBalefire] = mod; return this; }
|
||||
|
||||
public ModuleBurnTime setLogHeatMod(double mod) { this.modHeat[modLog] = mod; return this; }
|
||||
public ModuleBurnTime setWoodHeatMod(double mod) { this.modHeat[modWood] = mod; return this; }
|
||||
@ -150,4 +158,5 @@ public class ModuleBurnTime {
|
||||
public ModuleBurnTime setCokeHeatMod(double mod) { this.modHeat[modCoke] = mod; return this; }
|
||||
public ModuleBurnTime setSolidHeatMod(double mod) { this.modHeat[modSolid] = mod; return this; }
|
||||
public ModuleBurnTime setRocketHeatMod(double mod) { this.modHeat[modRocket] = mod; return this; }
|
||||
public ModuleBurnTime setBalefireHeatMod(double mod) { this.modHeat[modBalefire] = mod; return this; }
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.packet;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@ -64,7 +65,9 @@ public class ExtPropPacket implements IMessage {
|
||||
|
||||
NBTTagCompound nbt = m.buffer.readNBTTagCompoundFromBuffer();
|
||||
HbmLivingProps props = HbmLivingProps.getData(Minecraft.getMinecraft().thePlayer);
|
||||
HbmPlayerProps pprps = HbmPlayerProps.getData(Minecraft.getMinecraft().thePlayer);
|
||||
props.loadNBTData(nbt);
|
||||
pprps.loadNBTData(nbt);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package com.hbm.render.entity.projectile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderCog extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity cog, double x, double y, double z, float f0, float f1) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
|
||||
int orientation = cog.getDataWatcher().getWatchableObjectInt(10);
|
||||
switch(orientation % 6) {
|
||||
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(0, 0, -1);
|
||||
|
||||
|
||||
if(orientation < 6) {
|
||||
GL11.glRotated(System.currentTimeMillis() % (360 * 3) / 3D, 0.0D, 0.0D, -1.0D);
|
||||
}
|
||||
|
||||
GL11.glTranslated(0, -1.375, 0);
|
||||
|
||||
this.bindEntityTexture(cog);
|
||||
ResourceManager.stirling.renderPart("Cog");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
return ResourceManager.stirling_tex;
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockBobble.BobbleType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.tileentity.RenderBobble;
|
||||
import com.hbm.render.tileentity.RenderDemonLamp;
|
||||
@ -1339,6 +1340,22 @@ public class ItemRenderLibrary {
|
||||
ResourceManager.heater_firebox.renderPart("Door");
|
||||
}});
|
||||
|
||||
renderers.put(ModItems.gear_large, new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -7, 0);
|
||||
GL11.glScaled(6, 6, 6);
|
||||
GL11.glRotated(-45, 0, 1, 0);
|
||||
GL11.glRotated(30, 1, 0, 0);
|
||||
GL11.glTranslated(0, 1.375, 0);
|
||||
GL11.glRotated(System.currentTimeMillis() % 3600 * 0.1F, 0, 0, 1);
|
||||
GL11.glTranslated(0, -1.375, 0);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glTranslated(0, 0, -0.875);
|
||||
bindTexture(ResourceManager.stirling_tex);
|
||||
ResourceManager.stirling.renderPart("Cog");
|
||||
}});
|
||||
|
||||
//hi there! it seems you are trying to register a new item renderer, most likely for a tile entity.
|
||||
//please refer to the comment at the start of the file on how to do this without adding to this gigantic pile of feces.
|
||||
}
|
||||
|
||||
50
src/main/java/com/hbm/render/tileentity/RenderOilburner.java
Normal file
@ -0,0 +1,50 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderOilburner extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.heater_oilburner_tex);
|
||||
ResourceManager.heater_oilburner.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.heater_oilburner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -1.5, 0);
|
||||
GL11.glScaled(3.25, 3.25, 3.25);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.heater_oilburner_tex);
|
||||
ResourceManager.heater_oilburner.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
84
src/main/java/com/hbm/render/tileentity/RenderStirling.java
Normal file
@ -0,0 +1,84 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.machine.TileEntityStirling;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderStirling extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
TileEntityStirling stirling = (TileEntityStirling) tile;
|
||||
|
||||
float rot = stirling.lastSpin + (stirling.spin - stirling.lastSpin) * interp;
|
||||
renderCommon(rot, stirling.hasCog);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderCommon(float rot, boolean hasCog) {
|
||||
|
||||
bindTexture(ResourceManager.stirling_tex);
|
||||
ResourceManager.stirling.renderPart("Base");
|
||||
|
||||
if(hasCog) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.375, 0);
|
||||
GL11.glRotatef(-rot, 0, 0, 1);
|
||||
GL11.glTranslated(0, -1.375, 0);
|
||||
ResourceManager.stirling.renderPart("Cog");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.375, 0.25);
|
||||
GL11.glRotatef(rot * 2 + 3, 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.375, -0.25);
|
||||
ResourceManager.stirling.renderPart("CogSmall");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslated(Math.sin(rot * Math.PI / 90D) * 0.25 + 0.125, 0, 0);
|
||||
ResourceManager.stirling.renderPart("Piston");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_stirling);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -1.5, 0);
|
||||
GL11.glScaled(3.25, 3.25, 3.25);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
boolean cog = item.getItemDamage() != 1;
|
||||
RenderStirling.this.renderCommon(cog ? System.currentTimeMillis() % 3600 * 0.1F : 0, cog);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -8,14 +8,17 @@ import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.GuiIngameForge;
|
||||
|
||||
public class RenderScreenOverlay {
|
||||
|
||||
@ -282,6 +285,35 @@ public class RenderScreenOverlay {
|
||||
mc.renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
//call in post health bar rendering event
|
||||
public static void renderShieldBar(ScaledResolution resolution, Gui gui) {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
|
||||
int width = resolution.getScaledWidth();
|
||||
int height = resolution.getScaledHeight();
|
||||
int left = width / 2 - 91;
|
||||
int top = height - GuiIngameForge.left_height;
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
|
||||
gui.drawTexturedModalRect(left, top, 146, 0, 81, 9);
|
||||
int i = (int) Math.ceil(props.shield * 79 / props.maxShield);
|
||||
gui.drawTexturedModalRect(left + 1, top, 147, 9, i, 9);
|
||||
|
||||
String label = "" + ((int) (props.shield * 10F)) / 10D;
|
||||
font.drawString(label, left + 41 - font.getStringWidth(label) / 2, top + 1, 0x0000);
|
||||
font.drawString(label, left + 39 - font.getStringWidth(label) / 2, top + 1, 0x0000);
|
||||
font.drawString(label, left + 40 - font.getStringWidth(label) / 2, top, 0x0000);
|
||||
font.drawString(label, left + 40 - font.getStringWidth(label) / 2, top + 2, 0x0000);
|
||||
font.drawString(label, left + 40 - font.getStringWidth(label) / 2, top + 1, 0xFFFF80);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GuiIngameForge.left_height += 10;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
public enum Crosshair {
|
||||
|
||||
NONE(0, 0, 0),
|
||||
|
||||
@ -24,6 +24,10 @@ public abstract class TileEntityMachineBase extends TileEntityLoadedBase impleme
|
||||
public TileEntityMachineBase(int scount) {
|
||||
slots = new ItemStack[scount];
|
||||
}
|
||||
|
||||
public void markChanged() {
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
|
||||
@ -413,6 +413,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
this.inventory = nbt.getBoolean("inv");
|
||||
this.power = nbt.getBoolean("power");
|
||||
this.fluid = nbt.getBoolean("fluid");
|
||||
this.heat = nbt.getBoolean("heat");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -422,6 +423,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
nbt.setBoolean("inv", inventory);
|
||||
nbt.setBoolean("power", power);
|
||||
nbt.setBoolean("fluid", fluid);
|
||||
nbt.setBoolean("heat", heat);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -122,7 +122,6 @@ public class TileMappings {
|
||||
put(TileEntityVent.class, "tileentity_vent");
|
||||
put(TileEntityLandmine.class, "tileentity_landmine");
|
||||
put(TileEntityBomber.class, "tileentity_bomber");
|
||||
put(TileEntityMachineTeleLinker.class, "tileentity_telemetry_linker");
|
||||
put(TileEntityMachineKeyForge.class, "tileentity_key_forge");
|
||||
put(TileEntitySellafield.class, "tileentity_sellafield_core");
|
||||
put(TileEntityNukeN45.class, "tileentity_n45");
|
||||
@ -247,8 +246,10 @@ public class TileMappings {
|
||||
|
||||
private static void putMachines() {
|
||||
put(TileEntityHeaterFirebox.class, "tileentity_firebox");
|
||||
put(TileEntityHeaterOilburner.class, "tileentity_oilburner");
|
||||
put(TileEntityFurnaceIron.class, "tileentity_furnace_iron");
|
||||
put(TileEntityFurnaceSteel.class, "tileentity_furnace_steel");
|
||||
put(TileEntityStirling.class, "tileentity_stirling");
|
||||
put(TileEntityMachineAutocrafter.class, "tileentity_autocrafter");
|
||||
put(TileEntityDiFurnaceRTG.class, "tileentity_rtg_difurnace");
|
||||
put(TileEntityMachineRadiolysis.class, "tileentity_radiolysis");
|
||||
|
||||
@ -40,7 +40,8 @@ public class TileEntityFurnaceIron extends TileEntityMachineBase implements IGUI
|
||||
.setCoalTimeMod(1.25)
|
||||
.setCokeTimeMod(1.5)
|
||||
.setSolidTimeMod(2)
|
||||
.setRocketTimeMod(2);
|
||||
.setRocketTimeMod(2)
|
||||
.setBalefireTimeMod(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -45,12 +45,14 @@ public class TileEntityHeaterFirebox extends TileEntityMachineBase implements IG
|
||||
.setCokeTimeMod(1.25)
|
||||
.setSolidTimeMod(1.5)
|
||||
.setRocketTimeMod(1.5)
|
||||
.setBalefireTimeMod(0.5)
|
||||
|
||||
.setLigniteHeatMod(2)
|
||||
.setCoalHeatMod(2)
|
||||
.setCokeHeatMod(2)
|
||||
.setSolidHeatMod(3)
|
||||
.setRocketHeatMod(5);
|
||||
.setRocketHeatMod(5)
|
||||
.setBalefireHeatMod(15);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -90,7 +92,8 @@ public class TileEntityHeaterFirebox extends TileEntityMachineBase implements IG
|
||||
if(slots[i].stackSize == 0) {
|
||||
slots[i] = slots[i].getItem().getContainerItem(slots[i]);
|
||||
}
|
||||
|
||||
|
||||
this.wasOn = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -107,7 +110,7 @@ public class TileEntityHeaterFirebox extends TileEntityMachineBase implements IG
|
||||
}
|
||||
}
|
||||
|
||||
if(burnTime > 0) {
|
||||
if(wasOn) {
|
||||
this.heatEnergy = Math.min(this.heatEnergy + this.burnHeat, maxHeatEnergy);
|
||||
} else {
|
||||
this.heatEnergy = Math.max(this.heatEnergy - Math.max(this.heatEnergy / 1000, 1), 0);
|
||||
|
||||
@ -0,0 +1,193 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerOilburner;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.types.FluidTypeFlammable;
|
||||
import com.hbm.inventory.gui.GUIOilburner;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import api.hbm.tile.IHeatSource;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityHeaterOilburner extends TileEntityMachineBase implements IGUIProvider, IFluidStandardReceiver, IHeatSource, IControlReceiver, IFluidAcceptor {
|
||||
|
||||
public boolean isOn = false;
|
||||
public FluidTank tank;
|
||||
|
||||
public int heatEnergy;
|
||||
public static final int maxHeatEnergy = 100_000;
|
||||
|
||||
public TileEntityHeaterOilburner() {
|
||||
super(3);
|
||||
tank = new FluidTank(Fluids.HEATINGOIL, 16000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.heaterOilburner";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
tank.loadTank(0, 1, slots);
|
||||
tank.setType(2, slots);
|
||||
|
||||
boolean shouldCool = true;
|
||||
|
||||
if(this.isOn && this.heatEnergy < maxHeatEnergy) {
|
||||
|
||||
if(tank.getTankType() instanceof FluidTypeFlammable) {
|
||||
FluidTypeFlammable type = (FluidTypeFlammable) tank.getTankType();
|
||||
|
||||
int burnRate = 10;
|
||||
int toBurn = Math.min(burnRate, tank.getFill());
|
||||
|
||||
tank.setFill(tank.getFill() - toBurn);
|
||||
|
||||
int heat = (int)(type.getHeatEnergy() / 1000);
|
||||
|
||||
this.heatEnergy += heat * toBurn;
|
||||
|
||||
shouldCool = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.heatEnergy >= maxHeatEnergy)
|
||||
shouldCool = false;
|
||||
|
||||
if(shouldCool)
|
||||
this.heatEnergy = Math.max(this.heatEnergy - Math.max(this.heatEnergy / 1000, 1), 0);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
tank.writeToNBT(data, "tank");
|
||||
data.setBoolean("isOn", isOn);
|
||||
data.setInteger("heatEnergy", heatEnergy);
|
||||
this.networkPack(data, 25);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
tank.readFromNBT(nbt, "tank");
|
||||
isOn = nbt.getBoolean("isOn");
|
||||
heatEnergy = nbt.getInteger("heatEnergy");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
tank.readFromNBT(nbt, "tank");
|
||||
isOn = nbt.getBoolean("isOn");
|
||||
heatEnergy = nbt.getInteger("heatEnergy");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
tank.writeToNBT(nbt, "tank");
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
nbt.setInteger("heatEnergy", heatEnergy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { tank };
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerOilburner(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIOilburner(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeatStored() {
|
||||
return heatEnergy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useUpHeat(int heat) {
|
||||
this.heatEnergy = Math.max(0, this.heatEnergy - heat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) { }
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) { }
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type == tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type == tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(EntityPlayer player) {
|
||||
return player.getDistanceSq(xCoord, yCoord, zCoord) <= 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
if(data.hasKey("toggle")) {
|
||||
this.isOn = !this.isOn;
|
||||
}
|
||||
this.markChanged();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 1,
|
||||
yCoord,
|
||||
zCoord - 1,
|
||||
xCoord + 2,
|
||||
yCoord + 2,
|
||||
zCoord + 2
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -1,191 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.items.machine.ItemTurretBiometry;
|
||||
|
||||
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;
|
||||
|
||||
public class TileEntityMachineTeleLinker extends TileEntity implements ISidedInventory {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
//public static final int maxFill = 64 * 3;
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {1};
|
||||
private static final int[] slots_side = new int[] {2};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineTeleLinker() {
|
||||
slots = new ItemStack[3];
|
||||
}
|
||||
|
||||
@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.teleLinker";
|
||||
}
|
||||
|
||||
@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()];
|
||||
|
||||
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();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(slots[0] != null && slots[1] != null && slots[0].getItem() instanceof ItemTurretBiometry && slots[1].getItem() instanceof ItemTurretBiometry) {
|
||||
|
||||
String[] names = ItemTurretBiometry.getNames(slots[0]);
|
||||
|
||||
if(names != null)
|
||||
for(int i = 0; i < names.length; i++)
|
||||
ItemTurretBiometry.addName(slots[1], names[i]);
|
||||
}
|
||||
|
||||
if(slots[2] != null && slots[2].getItem() instanceof ItemTurretBiometry) {
|
||||
ItemTurretBiometry.clearNames(slots[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -147,6 +147,22 @@ public class TileEntityMachineTurbofan extends TileEntityMachineBase implements
|
||||
data.setFloat("scale", 8F);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, this.xCoord + 0.5F - dir.offsetX * (3 - i), this.yCoord + 1.5F, this.zCoord + 0.5F - dir.offsetZ * (3 - i)), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
|
||||
/*if(this.afterburner > 90 && worldObj.rand.nextInt(30) == 0) {
|
||||
worldObj.newExplosion(null, xCoord + 0.5 + dir.offsetX * 3.5, yCoord + 0.5, zCoord + 0.5 + dir.offsetZ * 3.5, 3F, false, false);
|
||||
}*/
|
||||
|
||||
if(this.afterburner > 90) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "gasfire");
|
||||
data.setDouble("mY", 0.1 * worldObj.rand.nextDouble());
|
||||
data.setFloat("scale", 4F);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data,
|
||||
this.xCoord + 0.5F + dir.offsetX * (worldObj.rand.nextDouble() * 4 - 2) + rot.offsetX * (worldObj.rand.nextDouble() * 2 - 1),
|
||||
this.yCoord + 1F + worldObj.rand.nextDouble() * 2,
|
||||
this.zCoord + 0.5F - dir.offsetZ * (worldObj.rand.nextDouble() * 4 - 2) + rot.offsetZ * (worldObj.rand.nextDouble() * 2 - 1)
|
||||
), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
}
|
||||
}
|
||||
|
||||
double minX = this.xCoord + 0.5 - dir.offsetX * 3.5 - rot.offsetX * 1.5;
|
||||
@ -251,7 +267,7 @@ public class TileEntityMachineTurbofan extends TileEntityMachineBase implements
|
||||
* All movement related stuff has to be repeated on the client, but only for the client's player
|
||||
* Otherwise this could lead to desync since the motion is never sent form the server
|
||||
*/
|
||||
if(!MainRegistry.proxy.me().capabilities.isCreativeMode) {
|
||||
if(tank.getFill() > 0 && !MainRegistry.proxy.me().capabilities.isCreativeMode) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
||||
this.trySubscribe(water.getTankType(), worldObj, xCoord, yCoord + 3, zCoord, Library.POS_Y);
|
||||
this.trySubscribe(water.getTankType(), worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||
|
||||
int process = heat / 10;
|
||||
int process = heat / 20;
|
||||
process = Math.min(process, water.getFill());
|
||||
process = Math.min(process, (steam.getMaxFill() - steam.getFill()) / 100);
|
||||
|
||||
|
||||
199
src/main/java/com/hbm/tileentity/machine/TileEntityStirling.java
Normal file
@ -0,0 +1,199 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.entity.projectile.EntityCog;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.tile.IHeatSource;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityStirling extends TileEntityLoadedBase implements INBTPacketReceiver, IEnergyGenerator {
|
||||
|
||||
public long powerBuffer;
|
||||
public int heat;
|
||||
public static final double diffusion = 0.1D;
|
||||
public static final double efficiency = 0.5D;
|
||||
private int warnCooldown = 0;
|
||||
private int overspeed = 0;
|
||||
public boolean hasCog = true;
|
||||
|
||||
public float spin;
|
||||
public float lastSpin;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(hasCog) {
|
||||
tryPullHeat();
|
||||
|
||||
this.powerBuffer = (long) (this.heat * this.efficiency);
|
||||
|
||||
if(warnCooldown > 0)
|
||||
warnCooldown--;
|
||||
|
||||
if(heat > 300) {
|
||||
|
||||
this.overspeed++;
|
||||
|
||||
if(overspeed > 60 && warnCooldown == 0) {
|
||||
warnCooldown = 100;
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 1, zCoord + 0.5, "hbm:block.warnOverspeed", 2.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(overspeed > 300) {
|
||||
this.hasCog = false;
|
||||
this.worldObj.newExplosion(null, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 5F, false, false);
|
||||
|
||||
int orientation = this.getBlockMetadata() - BlockDummyable.offset;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(orientation);
|
||||
EntityCog cog = new EntityCog(worldObj, xCoord + 0.5 + dir.offsetX, yCoord + 1, zCoord + 0.5 + dir.offsetZ).setOrientation(orientation);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
cog.motionX = rot.offsetX;
|
||||
cog.motionY = 1;
|
||||
cog.motionZ = rot.offsetZ;
|
||||
worldObj.spawnEntityInWorld(cog);
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.overspeed = 0;
|
||||
}
|
||||
} else {
|
||||
this.overspeed = 0;
|
||||
this.warnCooldown = 0;
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", powerBuffer);
|
||||
data.setInteger("heat", heat);
|
||||
data.setBoolean("hasCog", hasCog);
|
||||
INBTPacketReceiver.networkPack(this, data, 150);
|
||||
|
||||
if(hasCog) {
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.sendPower(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
this.powerBuffer = 0;
|
||||
} else {
|
||||
|
||||
if(this.powerBuffer > 0)
|
||||
this.powerBuffer--;
|
||||
}
|
||||
|
||||
this.heat = 0;
|
||||
} else {
|
||||
|
||||
float momentum = powerBuffer * 50F / 300F;
|
||||
|
||||
this.lastSpin = this.spin;
|
||||
this.spin += momentum;
|
||||
|
||||
if(this.spin >= 360F) {
|
||||
this.spin -= 360F;
|
||||
this.lastSpin -= 360F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DirPos[] getConPos() {
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + 2, yCoord, zCoord, Library.POS_X),
|
||||
new DirPos(xCoord - 2, yCoord, zCoord, Library.NEG_X),
|
||||
new DirPos(xCoord, yCoord, zCoord + 2, Library.POS_Z),
|
||||
new DirPos(xCoord, yCoord, zCoord - 2, Library.NEG_Z)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.powerBuffer = nbt.getLong("power");
|
||||
this.heat = nbt.getInteger("heat");
|
||||
this.hasCog = nbt.getBoolean("hasCog");
|
||||
}
|
||||
|
||||
protected void tryPullHeat() {
|
||||
TileEntity con = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
|
||||
if(con instanceof IHeatSource) {
|
||||
IHeatSource source = (IHeatSource) con;
|
||||
int heatSrc = (int) (source.getHeatStored() * diffusion);
|
||||
|
||||
if(heatSrc > 0) {
|
||||
source.useUpHeat(heatSrc);
|
||||
this.heat += heatSrc;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.heat = Math.max(this.heat - Math.max(this.heat / 1000, 1), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.powerBuffer = nbt.getLong("powerBuffer");
|
||||
this.hasCog = nbt.getBoolean("hasCog");
|
||||
this.overspeed = nbt.getInteger("overspeed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setLong("powerBuffer", powerBuffer);
|
||||
nbt.setBoolean("hasCog", hasCog);
|
||||
nbt.setInteger("overspeed", overspeed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) { }
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return powerBuffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return powerBuffer;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 1,
|
||||
yCoord,
|
||||
zCoord - 1,
|
||||
xCoord + 2,
|
||||
yCoord + 2,
|
||||
zCoord + 2
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -392,7 +392,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseNT implements IGUI
|
||||
|
||||
timer++;
|
||||
|
||||
int delay = mode == MODE_ARTILLERY ? 200 : 40;
|
||||
int delay = mode == MODE_ARTILLERY ? 300 : 40;
|
||||
|
||||
if(timer % delay == 0) {
|
||||
|
||||
|
||||
@ -264,6 +264,7 @@ container.gasFlare=Abfackelturm
|
||||
container.generator=Atomreaktor
|
||||
container.hadron=Teilchenbeschleuniger
|
||||
container.heaterFirebox=Feuerbüchse
|
||||
container.heaterOilburner=Brenner
|
||||
container.iGenerator=Industrieller Generator
|
||||
container.keyForge=Schlossertisch
|
||||
container.launchPad=Raketenabschussrampe
|
||||
@ -1385,6 +1386,7 @@ item.flame_conspiracy.name=Verschwörungstheorie
|
||||
item.flame_opinion.name=Eigene Meinung
|
||||
item.flame_politics.name=Politisches Thema
|
||||
item.flame_pony.name=Bild eines Cartoon Ponys
|
||||
item.flask_infusion.shield.name=Schildinfusion
|
||||
item.fleija_core.name=F.L.E.I.J.A. Uran-235-Ladung
|
||||
item.fleija_igniter.name=Impulszünder
|
||||
item.fleija_kit.name=F.L.E.I.J.A. Kit
|
||||
@ -1451,6 +1453,7 @@ item.gas_mask_m65.name=M65-Z Gasmaske
|
||||
item.gas_mask_mono.name=Halbmaske
|
||||
item.gas_mask_olde.name=Ledergasmaske
|
||||
item.gas_petroleum.name=Petroleumgastank
|
||||
item.gear_large.name=Großes Zahnrad
|
||||
item.geiger_counter.name=Mobiler Geigerzähler
|
||||
item.gem_alexandrite.name=Alexandrit
|
||||
item.gem_tantalium.name=Tantal-Polykristall
|
||||
@ -1696,6 +1699,7 @@ item.ingot_dineutronium.name=Dineutroniumbarren
|
||||
item.ingot_dura_steel.name=Schnellarbeitsstahlbarren
|
||||
item.ingot_electronium.name=Elektroniumbarren
|
||||
item.ingot_euphemium.name=Euphemiumbarren
|
||||
item.ingot_ferrouranium.name=Ferrouranbarren
|
||||
item.ingot_fiberglass.name=Fiberglasstafel
|
||||
item.ingot_gh336.name=Ghiorsium-336-Barren
|
||||
item.ingot_gh336.desc=Seaborgiums Kollege.
|
||||
@ -2641,8 +2645,11 @@ item.siox.name=SiOX-Krebsmedikament
|
||||
item.siren_track.name=Sirenentrack
|
||||
item.smashing_hammer.name=Zerschmetterungshammer
|
||||
item.solid_fuel.name=Festbrennstoff
|
||||
item.solid_fuel_bf.name=Festbrennstoff (Balefire)
|
||||
item.solid_fuel_presto.name=Superzündi
|
||||
item.solid_fuel_presto_bf.name=Superzündi (Balefire)
|
||||
item.solid_fuel_presto_triplet.name=Verbesserte Superzündis
|
||||
item.solid_fuel_presto_triplet_bf.name=Verbesserte Superzündis (Balefire)
|
||||
item.solinium_core.name=Semistabiler Soliniumkern
|
||||
item.solinium_igniter.name=SOL-Impulszünder
|
||||
item.solinium_kit.name=Solinium Kit
|
||||
@ -3266,7 +3273,9 @@ tile.frozen_grass.name=Gefrorenes Gras
|
||||
tile.frozen_log.name=Gefrorener Baumstamm
|
||||
tile.frozen_planks.name=Gefrorene Holzbretter
|
||||
tile.furnace_iron.name=Eiserner Ofen
|
||||
tile.furnace_iron.desc=Größerer und effizienterer Ofen,$verschwended keinen Brennstoff im Leerlauf.
|
||||
tile.furnace_steel.name=Stahlofen
|
||||
tile.furnace_steel.desc=Sehr großer Ofen mit Produktionsboni.$Benötigt externe Hitzequelle.$Wärmetransferrate: ΔT*0.05 TU/t$(Δ heißt Differenz, T heißt Temparatur)
|
||||
tile.fusion_center.name=Zentralmagnetstück
|
||||
tile.fusion_conductor.name=Supraleiter-Magnet
|
||||
tile.fusion_core.name=Fusionsreaktorsteuerung
|
||||
@ -3333,6 +3342,9 @@ tile.hadron_power_1g.name=Teilchenbeschleuniger-Stromanschluss (1GHE)
|
||||
tile.hadron_power_10g.name=Teilchenbeschleuniger-Stromanschluss (10GHE)
|
||||
tile.hazmat.name=Strahlenschutzstoff-Block
|
||||
tile.heater_firebox.name=Feuerbüchse
|
||||
tile.heater_firebox.desc=Erzeugt Wärme aus Festbrennstoff.
|
||||
tile.heater_oilburner.name=Brenner
|
||||
tile.heater_oilburner.desc=Erzäuft Wärme aus fluiden Brennstoffen.
|
||||
tile.hev_battery.name=Anzugs-Batterie
|
||||
tile.iter.name=Kernfusionsreaktor
|
||||
tile.ladder_aluminium.name=Aluminiumleiter
|
||||
@ -3448,6 +3460,8 @@ tile.machine_solar_boiler.name=Solarturmboiler
|
||||
tile.machine_solidifier.name=Industrielle Verfestigungsmaschine
|
||||
tile.machine_spp_bottom.name=NPE-Potentialgenerator (Unterteil)
|
||||
tile.machine_spp_top.name=NPE-Potentialgenerator (Oberteil)
|
||||
tile.machine_stirling.name=Stirlingmotor
|
||||
tile.machine_stirling.desc=Erzeugt Energie aus Wärme. Benötigt externe Hitzequelle.$Wärmestransferrate: T*0.1 TU/t$Maximalaufnahme: 300 TU/t$Effizienz: 50%%
|
||||
tile.machine_storage_drum.name=Atommüll-Lagertrommel
|
||||
tile.machine_telelinker.name=Geschütz-Telemetrie-Manager
|
||||
tile.machine_teleporter.name=Teleporter
|
||||
@ -3697,6 +3711,7 @@ tile.struct_plasma_core.name=Plasmaerhitzer-Kernkomponente
|
||||
tile.struct_scaffold.name=Startrampe-Gerüstblock
|
||||
tile.struct_soyuz_core.name=Soyuz-Startrampe-Kernkomponente
|
||||
tile.substation.name=Umspannwerk
|
||||
tile.sulfuric_acid_block.name=Schwefelsäure
|
||||
tile.taint.name=Korrupter Schmutz
|
||||
tile.taint_barrel.name=IMP-Rückstandsfass
|
||||
tile.tape_recorder.name=Tonbandgerät
|
||||
|
||||
@ -454,6 +454,7 @@ container.gasFlare=Flare Stack
|
||||
container.generator=Nuclear Reactor
|
||||
container.hadron=Particle Accelerator
|
||||
container.heaterFirebox=Firebox
|
||||
container.heaterOilburner=Fluid Burner
|
||||
container.iGenerator=Industrial Generator
|
||||
container.keyForge=Locksmith Table
|
||||
container.launchPad=Missile Launch Pad
|
||||
@ -1650,6 +1651,7 @@ item.flame_politics.name=Political Topic
|
||||
item.flame_politics.desc=Donald Duck will build the wall!
|
||||
item.flame_pony.name=Painting of a Cartoon Pony
|
||||
item.flame_pony.desc=Yellow horse beats blue horse, that's a proven fact!
|
||||
item.flask_infusion.shield.name=Shield Infusion
|
||||
item.fleija_core.name=F.L.E.I.J.A. Uranium 235 Charge
|
||||
item.fleija_igniter.name=Pulse Igniter
|
||||
item.fleija_kit.name=F.L.E.I.J.A. Kit
|
||||
@ -1715,6 +1717,7 @@ item.gas_mask_m65.name=M65-Z Gas Mask
|
||||
item.gas_mask_mono.name=Half Mask
|
||||
item.gas_mask_olde.name=Leather Gas Mask
|
||||
item.gas_petroleum.name=Petroleum Gas Tank
|
||||
item.gear_large.name=Large Gear
|
||||
item.geiger_counter.name=Handheld Geiger Counter
|
||||
item.gem_alexandrite.name=Alexandrite
|
||||
item.gem_tantalium.name=Tantalium Polycrystal
|
||||
@ -1970,6 +1973,7 @@ item.ingot_dura_steel.name=High-Speed Steel Ingot
|
||||
item.ingot_electronium.name=Electronium Ingot
|
||||
item.ingot_euphemium.name=Euphemium Ingot
|
||||
item.ingot_euphemium.desc=A very special and yet strange element.
|
||||
item.ingot_ferrouranium.name=Ferrouranium Ingot
|
||||
item.ingot_fiberglass.name=Fiberglass Bar
|
||||
item.ingot_fiberglass.desc=High in fiber, high in glass. Everything the body needs.
|
||||
item.ingot_gh336.name=Ghiorsium-336 Ingot
|
||||
@ -3053,8 +3057,11 @@ item.siox.name=SiOX Cancer Medication
|
||||
item.siren_track.name=Siren Track
|
||||
item.smashing_hammer.name=Smashing Hammer
|
||||
item.solid_fuel.name=Solid Fuel
|
||||
item.solid_fuel_bf.name=Solid Fuel (Balefire)
|
||||
item.solid_fuel_presto.name=Presto Log
|
||||
item.solid_fuel_presto_bf.name=Presto Log (Balefire)
|
||||
item.solid_fuel_presto_triplet.name=Boosted Presto Logs
|
||||
item.solid_fuel_presto_triplet_bf.name=Boosted Presto Logs (Balefire)
|
||||
item.solinium_core.name=Semi-Stable Solinium Core
|
||||
item.solinium_igniter.name=SOL Pulse Igniter
|
||||
item.solinium_kit.name=Solinium Kit
|
||||
@ -3695,7 +3702,7 @@ tile.frozen_planks.name=Frozen Planks
|
||||
tile.furnace_iron.name=Iron Furnace
|
||||
tile.furnace_iron.desc=Larger and more efficient furnace,$does not waste fuel when idle.
|
||||
tile.furnace_steel.name=Steel Furnace
|
||||
tile.furnace_steel.desc=Very large furnace that can provide bonus items$when smelting ores. Requires external heat source.
|
||||
tile.furnace_steel.desc=Very large furnace that can provide bonus items$when smelting ores. Requires external heat source.$Heat transfer rate: ΔT*0.05 TU/t$(Δ means difference and T means temperature)
|
||||
tile.fusion_center.name=Central Magnet Piece
|
||||
tile.fusion_conductor.name=Superconducting Magnet
|
||||
tile.fusion_core.name=Fusion Reactor Control
|
||||
@ -3763,6 +3770,8 @@ tile.hadron_power_10g.name=Particle Accelerator Power Plug (10GHE)
|
||||
tile.hazmat.name=Hazmat Cloth Block
|
||||
tile.heater_firebox.name=Firebox
|
||||
tile.heater_firebox.desc=Burns solid fuel to produce heat.
|
||||
tile.heater_oilburner.name=Fluid Burner
|
||||
tile.heater_oilburner.desc=Burns fluids to produce heat.
|
||||
tile.hev_battery.name=Suit Battery
|
||||
tile.iter.name=Fusion Reactor
|
||||
tile.ladder_aluminium.name=Aluminium Ladder
|
||||
@ -3881,6 +3890,8 @@ tile.machine_solidifier.name=Industrial Solidification Machine
|
||||
tile.machine_solidifier.desc=A universal machine fitted with cooling systems and other$versatile tools for turning fluids solid using various$processes such as freezing and petrochemical polymerization.
|
||||
tile.machine_spp_bottom.name=ZPE Potential Generator (Bottom)
|
||||
tile.machine_spp_top.name=ZPE Potential Generator (Top)
|
||||
tile.machine_stirling.name=Stirling Engine
|
||||
tile.machine_stirling.desc=Turns heat into energy. Requires external heat source.$Heat transfer rate: T*0.1 TU/t$Max intake: 300 TU/t$Efficiency: 50%%
|
||||
tile.machine_storage_drum.name=Nuclear Waste Disposal Drum
|
||||
tile.machine_telelinker.name=Turret Telemetry Linker
|
||||
tile.machine_teleporter.name=Teleporter
|
||||
@ -4130,6 +4141,7 @@ tile.struct_plasma_core.name=Plasma Heater Core Component
|
||||
tile.struct_scaffold.name=Launch Pad Scaffold Block
|
||||
tile.struct_soyuz_core.name=Soyuz Launcher Core Component
|
||||
tile.substation.name=Substation
|
||||
tile.sulfuric_acid_block.name=Sulfuric Acid
|
||||
tile.taint.name=Taint
|
||||
tile.taint_barrel.name=IMP Residue Barrel
|
||||
tile.tape_recorder.name=Tape Recorder
|
||||
|
||||
2595
src/main/resources/assets/hbm/models/machines/oilburner.obj
Normal file
2697
src/main/resources/assets/hbm/models/machines/stirling.obj
Normal file
@ -44,6 +44,7 @@
|
||||
"block.storageClose": {"category": "block", "sounds": [{"name": "block/storageClose", "stream": false}]},
|
||||
"block.openC": {"category": "block", "sounds": ["block/openC1", "block/openC2", "block/openCSqueaky"]},
|
||||
"block.closeC": {"category": "block", "sounds": ["block/closeC1", "block/closeC2", "block/closeC3"]},
|
||||
"block.warnOverspeed": {"category": "block", "sounds": [{"name": "block/warnOverspeed", "stream": false}]},
|
||||
|
||||
"door.TransitionSealOpen": {"category": "block", "sounds": [{"name": "block/door/transition_seal_open", "stream": true}]},
|
||||
"door.wghStart": {"category": "block", "sounds": [{"name": "block/door/wgh_start", "stream": true}]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/block/warnOverspeed.ogg
Normal file
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 480 B |
|
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 615 B |
|
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/assets/hbm/textures/items/flask_empty.png
Normal file
|
After Width: | Height: | Size: 274 B |
BIN
src/main/resources/assets/hbm/textures/items/flask_radpot.png
Normal file
|
After Width: | Height: | Size: 378 B |
BIN
src/main/resources/assets/hbm/textures/items/flask_shield.png
Normal file
|
After Width: | Height: | Size: 358 B |
BIN
src/main/resources/assets/hbm/textures/items/gear_large.png
Normal file
|
After Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 362 B |
BIN
src/main/resources/assets/hbm/textures/items/solid_fuel_bf.png
Normal file
|
After Width: | Height: | Size: 343 B |
|
After Width: | Height: | Size: 445 B |
|
After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
@ -3,11 +3,11 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4291",
|
||||
"version":"1.0.27_X4312",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
"credits": "HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms), Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting), UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines), Vær (fibrosis, gas centrifuges), Adam29 (liquid petroleum, ethanol), Pashtet (russian localization), Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), impbk2002 (project settings), OvermindDL1 (project settings), TehTemmie (reacher radiation function)",
|
||||
"credits": "HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms), Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting), UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines, weapons), Vær (fibrosis, gas centrifuges, ZIRNOX, CP-1 parts, starter guide), Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), impbk2002 (project settings), OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (improved satellite loot system), Silly541 (config for safe ME drives), Voxelstice (OpenComputers integration), Pvndols (thorium fuel recipe)",
|
||||
"logoFile": "",
|
||||
"screenshots": [],
|
||||
"dependencies": []
|
||||
|
||||