mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-12 04:35:36 +00:00
Merge branch 'master' into GC-Rework-Pt2
This commit is contained in:
commit
eb565f1b2f
@ -1,8 +1,6 @@
|
|||||||
package com.hbm.blocks;
|
package com.hbm.blocks;
|
||||||
|
|
||||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
|
|
||||||
public interface IBlockMultiPass {
|
public interface IBlockMultiPass {
|
||||||
|
|
||||||
|
|||||||
14
src/main/java/com/hbm/blocks/IBlockSideRotation.java
Normal file
14
src/main/java/com/hbm/blocks/IBlockSideRotation.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package com.hbm.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
public interface IBlockSideRotation {
|
||||||
|
|
||||||
|
public int getRotationFromSide(IBlockAccess world, int x, int y, int z, int side);
|
||||||
|
|
||||||
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
public static int getRenderType() {
|
||||||
|
return renderID;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -623,6 +623,8 @@ public class ModBlocks {
|
|||||||
public static Block cel_prime_port;
|
public static Block cel_prime_port;
|
||||||
public static Block cel_prime_tanks;
|
public static Block cel_prime_tanks;
|
||||||
|
|
||||||
|
public static Block furnace_iron;
|
||||||
|
|
||||||
public static Block machine_difurnace_off;
|
public static Block machine_difurnace_off;
|
||||||
public static Block machine_difurnace_on;
|
public static Block machine_difurnace_on;
|
||||||
public static Block machine_difurnace_rtg_off;
|
public static Block machine_difurnace_rtg_off;
|
||||||
@ -746,6 +748,10 @@ public class ModBlocks {
|
|||||||
public static Block fluid_duct_neo;
|
public static Block fluid_duct_neo;
|
||||||
|
|
||||||
public static Block conveyor;
|
public static Block conveyor;
|
||||||
|
public static Block conveyor_double;
|
||||||
|
public static Block conveyor_triple;
|
||||||
|
public static Block conveyor_chute;
|
||||||
|
public static Block conveyor_lift;
|
||||||
public static Block crane_extractor;
|
public static Block crane_extractor;
|
||||||
public static Block crane_inserter;
|
public static Block crane_inserter;
|
||||||
|
|
||||||
@ -1092,6 +1098,7 @@ public class ModBlocks {
|
|||||||
public static final int guiID_fritz = 122;
|
public static final int guiID_fritz = 122;
|
||||||
public static Block turret_brandon;
|
public static Block turret_brandon;
|
||||||
public static final int guiID_brandon = 122;
|
public static final int guiID_brandon = 122;
|
||||||
|
public static Block turret_arty;
|
||||||
|
|
||||||
public static Block rbmk_rod;
|
public static Block rbmk_rod;
|
||||||
public static Block rbmk_rod_mod;
|
public static Block rbmk_rod_mod;
|
||||||
@ -1781,6 +1788,8 @@ public class ModBlocks {
|
|||||||
semtex = new BlockSemtex().setBlockName("semtex").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":semtex");
|
semtex = new BlockSemtex().setBlockName("semtex").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":semtex");
|
||||||
c4 = new BlockC4().setBlockName("c4").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":c4");
|
c4 = new BlockC4().setBlockName("c4").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":c4");
|
||||||
|
|
||||||
|
furnace_iron = new FurnaceIron().setBlockName("furnace_iron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||||
|
|
||||||
machine_difurnace_off = new MachineDiFurnace(false).setBlockName("machine_difurnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
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);
|
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||||
machine_difurnace_rtg_off = new MachineDiFurnaceRTG(false).setBlockName("machine_difurnace_rtg_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_difurnace_rtg_off = new MachineDiFurnaceRTG(false).setBlockName("machine_difurnace_rtg_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
@ -1897,7 +1906,11 @@ public class ModBlocks {
|
|||||||
fluid_duct_solid = new BlockFluidDuctSolid(Material.iron).setBlockName("fluid_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_solid");
|
fluid_duct_solid = new BlockFluidDuctSolid(Material.iron).setBlockName("fluid_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_solid");
|
||||||
fluid_duct_neo = new FluidDuctStandard(Material.iron).setBlockName("fluid_duct_neo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pipe_neo");
|
fluid_duct_neo = new FluidDuctStandard(Material.iron).setBlockName("fluid_duct_neo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pipe_neo");
|
||||||
|
|
||||||
conveyor = new BlockConveyor().setBlockName("conveyor").setHardness(0.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
conveyor = new BlockConveyor().setBlockName("conveyor").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||||
|
conveyor_double = new BlockConveyorDouble().setBlockName("conveyor_double").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor_double");
|
||||||
|
conveyor_triple = new BlockConveyorTriple().setBlockName("conveyor_triple").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor_triple");
|
||||||
|
conveyor_chute = new BlockConveyorChute().setBlockName("conveyor_chute").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||||
|
conveyor_lift = new BlockConveyorLift().setBlockName("conveyor_lift").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||||
crane_extractor = new CraneExtractor().setBlockName("crane_extractor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
crane_extractor = new CraneExtractor().setBlockName("crane_extractor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
crane_inserter = new CraneInserter().setBlockName("crane_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
crane_inserter = new CraneInserter().setBlockName("crane_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
|
||||||
@ -2069,6 +2082,7 @@ public class ModBlocks {
|
|||||||
turret_maxwell = new TurretMaxwell(Material.iron).setBlockName("turret_maxwell").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
turret_maxwell = new TurretMaxwell(Material.iron).setBlockName("turret_maxwell").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
turret_fritz = new TurretFritz(Material.iron).setBlockName("turret_fritz").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
turret_fritz = new TurretFritz(Material.iron).setBlockName("turret_fritz").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
turret_brandon = new TurretBrandon(Material.iron).setBlockName("turret_brandon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
turret_brandon = new TurretBrandon(Material.iron).setBlockName("turret_brandon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
turret_arty = new TurretArty(Material.iron).setBlockName("turret_arty").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
rbmk_rod = new RBMKRod(false).setBlockName("rbmk_rod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_element");
|
rbmk_rod = new RBMKRod(false).setBlockName("rbmk_rod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_element");
|
||||||
rbmk_rod_mod = new RBMKRod(true).setBlockName("rbmk_rod_mod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_element_mod");
|
rbmk_rod_mod = new RBMKRod(true).setBlockName("rbmk_rod_mod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_element_mod");
|
||||||
@ -2824,6 +2838,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(turret_maxwell, turret_maxwell.getUnlocalizedName());
|
GameRegistry.registerBlock(turret_maxwell, turret_maxwell.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(turret_fritz, turret_fritz.getUnlocalizedName());
|
GameRegistry.registerBlock(turret_fritz, turret_fritz.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(turret_brandon, turret_brandon.getUnlocalizedName());
|
GameRegistry.registerBlock(turret_brandon, turret_brandon.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(turret_arty, turret_arty.getUnlocalizedName());
|
||||||
|
|
||||||
//Wall-mounted Explosives
|
//Wall-mounted Explosives
|
||||||
GameRegistry.registerBlock(charge_dynamite, ItemBlockBase.class, charge_dynamite.getUnlocalizedName());
|
GameRegistry.registerBlock(charge_dynamite, ItemBlockBase.class, charge_dynamite.getUnlocalizedName());
|
||||||
@ -2943,6 +2958,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(press_preheater, press_preheater.getUnlocalizedName());
|
GameRegistry.registerBlock(press_preheater, press_preheater.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(furnace_iron, furnace_iron.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_difurnace_off, machine_difurnace_off.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_difurnace_off, machine_difurnace_off.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_difurnace_rtg_off, machine_difurnace_rtg_off.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_difurnace_rtg_off, machine_difurnace_rtg_off.getUnlocalizedName());
|
||||||
@ -3057,6 +3073,10 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(crane_extractor, crane_extractor.getUnlocalizedName());
|
GameRegistry.registerBlock(crane_extractor, crane_extractor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(crane_inserter, crane_inserter.getUnlocalizedName());
|
GameRegistry.registerBlock(crane_inserter, crane_inserter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(conveyor, conveyor.getUnlocalizedName());
|
GameRegistry.registerBlock(conveyor, conveyor.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(conveyor_double, conveyor_double.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(conveyor_triple, conveyor_triple.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(conveyor_chute, conveyor_chute.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(conveyor_lift, conveyor_lift.getUnlocalizedName());
|
||||||
|
|
||||||
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ladder_sturdy, ladder_sturdy.getUnlocalizedName());
|
GameRegistry.registerBlock(ladder_sturdy, ladder_sturdy.getUnlocalizedName());
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.blocks.generic;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.machine.ZirnoxDestroyed;
|
||||||
import com.hbm.blocks.machine.rbmk.RBMKDebris;
|
import com.hbm.blocks.machine.rbmk.RBMKDebris;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -55,7 +56,7 @@ public class BlockLayering extends Block {
|
|||||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||||
Block block = world.getBlock(x, y - 1, z);
|
Block block = world.getBlock(x, y - 1, z);
|
||||||
|
|
||||||
if(block instanceof RBMKDebris)
|
if(block instanceof RBMKDebris || block instanceof ZirnoxDestroyed)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(world, x, y - 1, z) ? true : (block == this && (world.getBlockMetadata(x, y - 1, z) & 7) == 7 ? true : block.isOpaqueCube() && block.getMaterial().blocksMovement())) : false;
|
return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(world, x, y - 1, z) ? true : (block == this && (world.getBlockMetadata(x, y - 1, z) & 7) == 7 ? true : block.isOpaqueCube() && block.getMaterial().blocksMovement())) : false;
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
package com.hbm.blocks.generic;
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockEnumMulti;
|
import com.hbm.blocks.BlockEnumMulti;
|
||||||
import com.hbm.blocks.ITooltipProvider;
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.IGrowable;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -17,7 +19,7 @@ import net.minecraftforge.common.EnumPlantType;
|
|||||||
import net.minecraftforge.common.IPlantable;
|
import net.minecraftforge.common.IPlantable;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class BlockNTMFlower extends BlockEnumMulti implements IPlantable, ITooltipProvider {
|
public class BlockNTMFlower extends BlockEnumMulti implements IPlantable, IGrowable, ITooltipProvider {
|
||||||
|
|
||||||
public BlockNTMFlower() {
|
public BlockNTMFlower() {
|
||||||
super(Material.plants, EnumFlowerType.class, true, true);
|
super(Material.plants, EnumFlowerType.class, true, true);
|
||||||
@ -97,6 +99,24 @@ public class BlockNTMFlower extends BlockEnumMulti implements IPlantable, IToolt
|
|||||||
return meta;
|
return meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* grow condition */
|
||||||
|
@Override
|
||||||
|
public boolean func_149851_a(World world, int x, int y, int z, boolean b) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* chance */
|
||||||
|
@Override
|
||||||
|
public boolean func_149852_a(World p_149852_1_, Random p_149852_2_, int p_149852_3_, int p_149852_4_, int p_149852_5_) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* grow */
|
||||||
|
@Override
|
||||||
|
public void func_149853_b(World world, Random rand, int x, int y, int z) {
|
||||||
|
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,7 +143,7 @@ public class BlockOre extends Block {
|
|||||||
case 31:
|
case 31:
|
||||||
return ModItems.ammo_nuke_low;
|
return ModItems.ammo_nuke_low;
|
||||||
case 32:
|
case 32:
|
||||||
return ModItems.gun_mirv_ammo;
|
return ModItems.ammo_mirv;
|
||||||
case 33:
|
case 33:
|
||||||
return ModItems.gun_defabricator_ammo;
|
return ModItems.gun_defabricator_ammo;
|
||||||
case 34:
|
case 34:
|
||||||
|
|||||||
38
src/main/java/com/hbm/blocks/machine/FurnaceIron.java
Normal file
38
src/main/java/com/hbm/blocks/machine/FurnaceIron.java
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityFurnaceIron;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class FurnaceIron extends BlockDummyable {
|
||||||
|
|
||||||
|
public FurnaceIron() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFurnaceIron();
|
||||||
|
return new TileEntityProxyCombo(true, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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, 0, 1, 0};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ import com.hbm.tileentity.TileEntityProxyCombo;
|
|||||||
import com.hbm.tileentity.machine.TileEntityZirnoxDestroyed;
|
import com.hbm.tileentity.machine.TileEntityZirnoxDestroyed;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -48,11 +49,27 @@ public class ZirnoxDestroyed extends BlockDummyable {
|
|||||||
@Override
|
@Override
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
Block block = world.getBlock(x, y + 1, z);
|
||||||
|
|
||||||
if(rand.nextInt(4) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY + 1, z + dir.offsetZ) == Blocks.air) {
|
if(block == Blocks.air) {
|
||||||
world.setBlock(x + dir.offsetX, y + dir.offsetY + 1, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
if(rand.nextInt(10) == 0)
|
||||||
|
world.setBlock(x, y + 1, z, ModBlocks.gas_meltdown);
|
||||||
|
|
||||||
|
} else if(block == ModBlocks.foam_layer || block == ModBlocks.block_foam) {
|
||||||
|
if(rand.nextInt(25) == 0) {
|
||||||
|
int pos[] = this.findCore(world, x, y, z);
|
||||||
|
|
||||||
|
if(pos != null) {
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
|
||||||
|
if(te instanceof TileEntityZirnoxDestroyed)
|
||||||
|
((TileEntityZirnoxDestroyed)te).onFire = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(rand.nextInt(10) == 0 && world.getBlock(x, y + 1, z) == Blocks.air)
|
||||||
|
world.setBlock(x, y + 1, z, ModBlocks.gas_meltdown);
|
||||||
|
|
||||||
super.updateTick(world, x, y, z, rand);
|
super.updateTick(world, x, y, z, rand);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.packet.AuxParticlePacketNT;
|
|||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -36,12 +37,17 @@ public class RBMKDebrisBurning extends RBMKDebris {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||||
|
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
|
||||||
if(rand.nextInt(7) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
if(rand.nextInt(10) == 0 && block == Blocks.air) {
|
||||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rand.nextInt(100) == 0) {
|
//Foam helps stop the fire; Boron smothers it. 1.66% chance every 100-120 seconds for one side
|
||||||
|
int chance = block == ModBlocks.foam_layer || block == ModBlocks.block_foam ||
|
||||||
|
block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 10 : 100;
|
||||||
|
|
||||||
|
if(rand.nextInt(chance) == 0) {
|
||||||
world.setBlock(x, y, z, ModBlocks.pribris);
|
world.setBlock(x, y, z, ModBlocks.pribris);
|
||||||
} else {
|
} else {
|
||||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.hbm.util.ContaminationUtil.ContaminationType;
|
|||||||
import com.hbm.util.ContaminationUtil.HazardType;
|
import com.hbm.util.ContaminationUtil.HazardType;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -49,12 +50,16 @@ public class RBMKDebrisRadiating extends RBMKDebrisBurning {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||||
|
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
|
||||||
if(rand.nextInt(5) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
if(rand.nextInt(10) == 0 && block == Blocks.air) {
|
||||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rand.nextInt(1000) == 0) {
|
//Boron sand helps stop the fission reaction; 0.66% chance every 20-40 ticks for one side
|
||||||
|
int chance = block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 25 : 1000;
|
||||||
|
|
||||||
|
if(rand.nextInt(chance) == 0) {
|
||||||
|
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
|||||||
@ -53,35 +53,11 @@ public class BlockConveyor extends Block implements IConveyorBelt {
|
|||||||
@Override
|
@Override
|
||||||
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
|
|
||||||
/*Vec3 snap = this.getClosestSnappingPosition(world, x, y, z, itemPos);
|
ForgeDirection dir = getTravelDirection(world, x, y, z, itemPos, speed);
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
|
||||||
return Vec3.createVectorHelper(snap.xCoord + dir.offsetX * speed, snap.yCoord, snap.zCoord + dir.offsetZ * speed);*/
|
|
||||||
|
|
||||||
/*double dist = snap.distanceTo(itemPos);
|
|
||||||
|
|
||||||
if(dist > speed) {
|
|
||||||
|
|
||||||
return Vec3.createVectorHelper(
|
|
||||||
itemPos.xCoord + (snap.xCoord - itemPos.xCoord) / dist * speed,
|
|
||||||
snap.yCoord,
|
|
||||||
itemPos.zCoord + (snap.zCoord - itemPos.zCoord) / dist * speed
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
|
||||||
return Vec3.createVectorHelper(snap.xCoord + dir.offsetX * speed, snap.yCoord, snap.zCoord + dir.offsetZ * speed);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/// ATTEMT 2 ///
|
|
||||||
/*Vec3 snap = this.getClosestSnappingPosition(world, x, y, z, itemPos);
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
|
||||||
return Vec3.createVectorHelper(snap.xCoord - dir.offsetX * speed, snap.yCoord, snap.zCoord - dir.offsetZ * speed);*/
|
|
||||||
/// ///
|
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
|
||||||
//snapping point
|
//snapping point
|
||||||
Vec3 snap = this.getClosestSnappingPosition(world, x, y, z, itemPos);
|
Vec3 snap = this.getClosestSnappingPosition(world, x, y, z, itemPos);
|
||||||
//snapping point + speed
|
//snapping point + speed
|
||||||
Vec3 dest = Vec3.createVectorHelper(snap.xCoord - dir.offsetX * speed, snap.yCoord, snap.zCoord - dir.offsetZ * speed);
|
Vec3 dest = Vec3.createVectorHelper(snap.xCoord - dir.offsetX * speed, snap.yCoord - dir.offsetY * speed, snap.zCoord - dir.offsetZ * speed);
|
||||||
//delta to get to that point
|
//delta to get to that point
|
||||||
Vec3 motion = Vec3.createVectorHelper((dest.xCoord - itemPos.xCoord), (dest.yCoord - itemPos.yCoord), (dest.zCoord - itemPos.zCoord));
|
Vec3 motion = Vec3.createVectorHelper((dest.xCoord - itemPos.xCoord), (dest.yCoord - itemPos.yCoord), (dest.zCoord - itemPos.zCoord));
|
||||||
double len = motion.lengthVector();
|
double len = motion.lengthVector();
|
||||||
@ -90,6 +66,10 @@ public class BlockConveyor extends Block implements IConveyorBelt {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
@ -120,7 +100,9 @@ public class BlockConveyor extends Block implements IConveyorBelt {
|
|||||||
|
|
||||||
EntityMovingItem item = new EntityMovingItem(world);
|
EntityMovingItem item = new EntityMovingItem(world);
|
||||||
item.setItemStack(((EntityItem) entity).getEntityItem().copy());
|
item.setItemStack(((EntityItem) entity).getEntityItem().copy());
|
||||||
item.setPositionAndRotation(x + 0.5, y + 0.25, z + 0.5, 0, 0);
|
Vec3 pos = Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ);
|
||||||
|
Vec3 snap = this.getClosestSnappingPosition(world, x, y, z, pos);
|
||||||
|
item.setPositionAndRotation(snap.xCoord, snap.yCoord, snap.zCoord, 0, 0);
|
||||||
world.spawnEntityInWorld(item);
|
world.spawnEntityInWorld(item);
|
||||||
|
|
||||||
entity.setDead();
|
entity.setDead();
|
||||||
|
|||||||
67
src/main/java/com/hbm/blocks/network/BlockConveyorChute.java
Normal file
67
src/main/java/com/hbm/blocks/network/BlockConveyorChute.java
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockConveyorChute extends BlockConveyor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
|
|
||||||
|
if(world.getBlock(x, y - 1, z) instanceof IConveyorBelt) {
|
||||||
|
speed *= 5;
|
||||||
|
} else if(itemPos.yCoord > y + 0.25) {
|
||||||
|
speed *= 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.getTravelLocation(world, x, y, z, itemPos, speed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
|
|
||||||
|
if(world.getBlock(x, y - 1, z) instanceof IConveyorBelt || itemPos.yCoord > y + 0.25) {
|
||||||
|
return ForgeDirection.UP;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
|
if(world.getBlock(x, y - 1, z) instanceof IConveyorBelt || itemPos.yCoord > y + 0.25) {
|
||||||
|
return Vec3.createVectorHelper(x + 0.5, itemPos.yCoord, z + 0.5);
|
||||||
|
} else {
|
||||||
|
return super.getClosestSnappingPosition(world, x, y, z, itemPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType() {
|
||||||
|
return renderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
|
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockConveyorDouble extends BlockConveyor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
|
|
||||||
|
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
|
||||||
|
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
|
||||||
|
|
||||||
|
double posX = x + 0.5;
|
||||||
|
double posZ = z + 0.5;
|
||||||
|
|
||||||
|
if(dir.offsetX != 0) {
|
||||||
|
posX = itemPos.xCoord;
|
||||||
|
posZ += itemPos.zCoord > posZ ? 0.25 : -0.25;
|
||||||
|
}
|
||||||
|
if(dir.offsetZ != 0) {
|
||||||
|
posZ = itemPos.zCoord;
|
||||||
|
posX += itemPos.xCoord > posX ? 0.25 : -0.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
77
src/main/java/com/hbm/blocks/network/BlockConveyorLift.java
Normal file
77
src/main/java/com/hbm/blocks/network/BlockConveyorLift.java
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockConveyorLift extends BlockConveyor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
|
|
||||||
|
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||||
|
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||||
|
|
||||||
|
if(!top) {
|
||||||
|
return ForgeDirection.DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
|
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||||
|
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||||
|
|
||||||
|
if(!top) {
|
||||||
|
return Vec3.createVectorHelper(x + 0.5, itemPos.yCoord, z + 0.5);
|
||||||
|
} else {
|
||||||
|
return super.getClosestSnappingPosition(world, x, y, z, itemPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||||
|
|
||||||
|
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||||
|
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||||
|
|
||||||
|
if(top)
|
||||||
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||||
|
else
|
||||||
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
|
|
||||||
|
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||||
|
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||||
|
|
||||||
|
if(top)
|
||||||
|
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 0.5, z + 1);
|
||||||
|
else
|
||||||
|
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType() {
|
||||||
|
return renderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockConveyorTriple extends BlockConveyor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
|
|
||||||
|
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
|
||||||
|
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
|
||||||
|
|
||||||
|
double posX = x + 0.5;
|
||||||
|
double posZ = z + 0.5;
|
||||||
|
|
||||||
|
if(dir.offsetX != 0) {
|
||||||
|
posX = itemPos.xCoord;
|
||||||
|
posZ += (itemPos.zCoord > posZ + 0.15 ? 0.3125 : itemPos.zCoord < posZ - 0.15 ? -0.3125 : 0);
|
||||||
|
}
|
||||||
|
if(dir.offsetZ != 0) {
|
||||||
|
posZ = itemPos.zCoord;
|
||||||
|
posX += (itemPos.xCoord > posX + 0.15 ? 0.3125 : itemPos.xCoord < posX - 0.15 ? -0.3125 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,20 +1,33 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
import com.hbm.lib.RefStrings;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.IBlockSideRotation;
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.test.TestConductor;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.main.MainRegistry;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.BlockPistonBase;
|
import net.minecraft.block.BlockPistonBase;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
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.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public abstract class BlockCraneBase extends BlockContainer {
|
public abstract class BlockCraneBase extends BlockContainer implements IBlockSideRotation {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT) protected IIcon iconSide;
|
@SideOnly(Side.CLIENT) protected IIcon iconSide;
|
||||||
@SideOnly(Side.CLIENT) protected IIcon iconIn;
|
@SideOnly(Side.CLIENT) protected IIcon iconIn;
|
||||||
@ -41,6 +54,18 @@ public abstract class BlockCraneBase extends BlockContainer {
|
|||||||
this.iconSideOut = iconRegister.registerIcon(RefStrings.MODID + ":crane_side_out");
|
this.iconSideOut = iconRegister.registerIcon(RefStrings.MODID + ":crane_side_out");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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()) {
|
||||||
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||||
@ -76,4 +101,54 @@ public abstract class BlockCraneBase extends BlockContainer {
|
|||||||
|
|
||||||
return this.iconSide;
|
return this.iconSide;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int renderIDClassic = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType() {
|
||||||
|
return IBlockSideRotation.getRenderType();
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Random rand = new Random();
|
||||||
|
public void dropContents(World world, int x, int y, int z, Block block, int meta, int start, int end) {
|
||||||
|
ISidedInventory tileentityfurnace = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(tileentityfurnace != null) {
|
||||||
|
|
||||||
|
for(int i1 = start; i1 < end; ++i1) {
|
||||||
|
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||||
|
|
||||||
|
if(itemstack != null) {
|
||||||
|
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
|
||||||
|
while(itemstack.stackSize > 0) {
|
||||||
|
int j1 = this.rand.nextInt(21) + 10;
|
||||||
|
|
||||||
|
if(j1 > itemstack.stackSize) {
|
||||||
|
j1 = itemstack.stackSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
itemstack.stackSize -= j1;
|
||||||
|
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + 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.rand.nextGaussian() * f3;
|
||||||
|
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||||
|
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||||
|
world.spawnEntityInWorld(entityitem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
world.func_147453_f(x, y, z, block);
|
||||||
|
}
|
||||||
|
|
||||||
|
super.breakBlock(world, x, y, z, block, meta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,9 +5,11 @@ import com.hbm.tileentity.network.TileEntityCraneExtractor;
|
|||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class CraneExtractor extends BlockCraneBase {
|
public class CraneExtractor extends BlockCraneBase {
|
||||||
@ -26,7 +28,32 @@ public class CraneExtractor extends BlockCraneBase {
|
|||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
super.registerBlockIcons(iconRegister);
|
super.registerBlockIcons(iconRegister);
|
||||||
this.iconDirectional = iconRegister.registerIcon(RefStrings.MODID + ":crane_out_top");
|
this.iconDirectional = iconRegister.registerIcon(RefStrings.MODID + ":crane_out_top");
|
||||||
this.iconDirectionalUp = iconRegister.registerIcon(RefStrings.MODID + ":crane_out_side_up");
|
this.iconDirectionalUp = iconRegister.registerIcon(RefStrings.MODID + ":crane_out_side_down");
|
||||||
this.iconDirectionalDown = iconRegister.registerIcon(RefStrings.MODID + ":crane_out_side_down");
|
this.iconDirectionalDown = iconRegister.registerIcon(RefStrings.MODID + ":crane_out_side_up");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRotationFromSide(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
if(meta > 1 && side == 1) {
|
||||||
|
if(meta == 2) return 0;
|
||||||
|
if(meta == 3) return 3;
|
||||||
|
if(meta == 4) return 2;
|
||||||
|
if(meta == 5) return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||||
|
this.dropContents(world, x, y, z, block, meta, 9, 20);
|
||||||
|
super.breakBlock(world, x, y, z, block, meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.network.TileEntityCraneInserter;
|
import com.hbm.tileentity.network.TileEntityCraneInserter;
|
||||||
|
|
||||||
import api.hbm.conveyor.IConveyorItem;
|
import api.hbm.conveyor.IConveyorItem;
|
||||||
import api.hbm.conveyor.IEnterableBlock;
|
import api.hbm.conveyor.IEnterableBlock;
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
@ -39,18 +40,6 @@ public class CraneInserter extends BlockCraneBase implements IEnterableBlock {
|
|||||||
this.iconDirectionalDown = iconRegister.registerIcon(RefStrings.MODID + ":crane_in_side_down");
|
this.iconDirectionalDown = iconRegister.registerIcon(RefStrings.MODID + ":crane_in_side_down");
|
||||||
}
|
}
|
||||||
|
|
||||||
@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()) {
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
|
public boolean canEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
|
||||||
ForgeDirection orientation = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
ForgeDirection orientation = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
@ -76,7 +65,10 @@ public class CraneInserter extends BlockCraneBase implements IEnterableBlock {
|
|||||||
|
|
||||||
if(te instanceof IInventory) {
|
if(te instanceof IInventory) {
|
||||||
IInventory inv = (IInventory) te;
|
IInventory inv = (IInventory) te;
|
||||||
int limit = inv.getInventoryStackLimit();
|
|
||||||
|
addToInventory(inv, access, toAdd, dir.ordinal());
|
||||||
|
|
||||||
|
/*int limit = inv.getInventoryStackLimit();
|
||||||
|
|
||||||
int size = access == null ? inv.getSizeInventory() : access.length;
|
int size = access == null ? inv.getSizeInventory() : access.length;
|
||||||
|
|
||||||
@ -115,7 +107,94 @@ public class CraneInserter extends BlockCraneBase implements IEnterableBlock {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
if(toAdd != null && toAdd.stackSize > 0) {
|
||||||
|
addToInventory((TileEntityCraneInserter) world.getTileEntity(x, y, z), null, toAdd, dir.ordinal());
|
||||||
|
}
|
||||||
|
if(toAdd != null && toAdd.stackSize > 0) {
|
||||||
|
EntityItem drop = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, toAdd.copy());
|
||||||
|
world.spawnEntityInWorld(drop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack addToInventory(IInventory inv, int[] access, ItemStack toAdd, int side) {
|
||||||
|
|
||||||
|
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||||
|
int limit = inv.getInventoryStackLimit();
|
||||||
|
|
||||||
|
int size = access == null ? inv.getSizeInventory() : access.length;
|
||||||
|
|
||||||
|
for(int i = 0; i < size; i++) {
|
||||||
|
int index = access == null ? i : access[i];
|
||||||
|
ItemStack stack = inv.getStackInSlot(index);
|
||||||
|
|
||||||
|
if(stack != null && toAdd.isItemEqual(stack) && ItemStack.areItemStackTagsEqual(toAdd, stack) && stack.stackSize < Math.min(stack.getMaxStackSize(), limit)) {
|
||||||
|
|
||||||
|
int stackLimit = Math.min(stack.getMaxStackSize(), limit);
|
||||||
|
int amount = Math.min(toAdd.stackSize, stackLimit - stack.stackSize);
|
||||||
|
|
||||||
|
stack.stackSize += amount;
|
||||||
|
toAdd.stackSize -= amount;
|
||||||
|
inv.markDirty();
|
||||||
|
|
||||||
|
if(toAdd.stackSize == 0) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < size; i++) {
|
||||||
|
int index = access == null ? i : access[i];
|
||||||
|
ItemStack stack = inv.getStackInSlot(index);
|
||||||
|
|
||||||
|
if(stack == null && (sided != null ? sided.canInsertItem(index, toAdd, side) : inv.isItemValidForSlot(index, toAdd))) {
|
||||||
|
|
||||||
|
int amount = Math.min(toAdd.stackSize, limit);
|
||||||
|
|
||||||
|
ItemStack newStack = toAdd.copy();
|
||||||
|
newStack.stackSize = amount;
|
||||||
|
inv.setInventorySlotContents(index, newStack);
|
||||||
|
toAdd.stackSize -= amount;
|
||||||
|
inv.markDirty();
|
||||||
|
|
||||||
|
if(toAdd.stackSize == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAdd;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRotationFromSide(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
if(meta > 1 && side == 1) {
|
||||||
|
if(meta == 2) return 3;
|
||||||
|
if(meta == 3) return 0;
|
||||||
|
if(meta == 4) return 1;
|
||||||
|
if(meta == 5) return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasComparatorInputOverride() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||||
|
return Container.calcRedstoneFromInventory((TileEntityCraneInserter)world.getTileEntity(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||||
|
this.dropContents(world, x, y, z, block, meta, 0, 21);
|
||||||
|
super.breakBlock(world, x, y, z, block, meta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
41
src/main/java/com/hbm/blocks/turret/TurretArty.java
Normal file
41
src/main/java/com/hbm/blocks/turret/TurretArty.java
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
package com.hbm.blocks.turret;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.turret.TileEntityTurretArty;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class TurretArty extends BlockDummyable {
|
||||||
|
|
||||||
|
public TurretArty(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
|
||||||
|
if(meta >= 12)
|
||||||
|
return new TileEntityTurretArty();
|
||||||
|
|
||||||
|
return new TileEntityProxyCombo(true, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 1, 0, 2, 1, 2, 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -25,7 +25,11 @@ public class TurretChekhov extends BlockDummyable {
|
|||||||
|
|
||||||
if(meta >= 12)
|
if(meta >= 12)
|
||||||
return new TileEntityTurretChekhov();
|
return new TileEntityTurretChekhov();
|
||||||
|
|
||||||
|
if(meta >= 6)
|
||||||
return new TileEntityProxyCombo(true, true, false);
|
return new TileEntityProxyCombo(true, true, false);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -117,7 +117,6 @@ public class ToolRecipes {
|
|||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.linker, 1), new Object[] { "I I", "ICI", "GGG", 'I', IRON.plate(), 'G', GOLD.plate(), 'C', ModItems.circuit_gold });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.linker, 1), new Object[] { "I I", "ICI", "GGG", 'I', IRON.plate(), 'G', GOLD.plate(), 'C', ModItems.circuit_gold });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', ModItems.wire_gold, 'I', CU.ingot(), 'C', ModItems.circuit_red_copper, 'P', STEEL.plate() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', ModItems.wire_gold, 'I', CU.ingot(), 'C', ModItems.circuit_red_copper, 'P', STEEL.plate() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.turret_chip, 1), new Object[] { "WWW", "CPC", "WWW", 'W', ModItems.wire_gold, 'P', POLYMER.ingot(), 'C', ModItems.circuit_gold, });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.turret_chip, 1), new Object[] { "WWW", "CPC", "WWW", 'W', ModItems.wire_gold, 'P', POLYMER.ingot(), 'C', ModItems.circuit_gold, });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.turret_biometry, 1), new Object[] { "CC ", "GGS", "SSS", 'C', ModItems.circuit_copper, 'S', STEEL.plate(), 'G', GOLD.plate(), 'I', PB.plate() });
|
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', ModItems.wire_gold, 'P', POLYMER.ingot(), 'C', ModItems.circuit_gold, 'S', STEEL.plate(), 'G', GOLD.ingot() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', ModItems.wire_gold, 'P', POLYMER.ingot(), 'C', ModItems.circuit_gold, 'S', STEEL.plate(), 'G', GOLD.ingot() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', ModItems.wire_gold, 'P', ModItems.plate_polymer, 'C', ModItems.circuit_red_copper, 'G', GOLD.ingot(), 'S', STEEL.plate(), 'B', ModItems.ingot_beryllium });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', ModItems.wire_gold, 'P', ModItems.plate_polymer, 'C', ModItems.circuit_red_copper, 'G', GOLD.ingot(), 'S', STEEL.plate(), 'B', ModItems.ingot_beryllium });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dosimeter, 1), new Object[] { "WGW", "WCW", "WBW", 'W', KEY_PLANKS, 'G', KEY_ANYPANE, 'C', ModItems.circuit_aluminium, 'B', BE.ingot() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dosimeter, 1), new Object[] { "WGW", "WCW", "WBW", 'W', KEY_PLANKS, 'G', KEY_ANYPANE, 'C', ModItems.circuit_aluminium, 'B', BE.ingot() });
|
||||||
|
|||||||
@ -150,21 +150,6 @@ public class WeaponRecipes {
|
|||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fireext, 1), new Object[] { "HB", " T", 'H', ModItems.hull_small_steel, 'B', ModItems.bolt_tungsten, 'T', ModItems.tank_steel });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fireext, 1), new Object[] { "HB", " T", 'H', ModItems.hull_small_steel, 'B', ModItems.bolt_tungsten, 'T', ModItems.tank_steel });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', ModItems.bolt_tungsten, 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', ModItems.bolt_tungsten, 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
||||||
|
|
||||||
//Legacy ammo recycling
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_44, 1), new Object[] { ModItems.gun_revolver_nopip_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_44_pip, 1), new Object[] { ModItems.gun_revolver_pip_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_50bmg, 1), new Object[] { ModItems.gun_calamity_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_5mm, 1), new Object[] { ModItems.gun_lacunae_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { ModItems.gun_rpg_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_9mm, 1), new Object[] { ModItems.gun_mp40_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_22lr, 1), new Object[] { ModItems.gun_uzi_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_12gauge, 1), new Object[] { ModItems.gun_uboinik_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_20gauge, 1), new Object[] { ModItems.gun_lever_action_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_20gauge_slug, 1), new Object[] { ModItems.gun_bolt_action_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke_high, 1), new Object[] { ModItems.gun_fatman_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_mirv_high, 1), new Object[] { ModItems.gun_mirv_ammo });
|
|
||||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_stinger_rocket, 1), new Object[] { ModItems.gun_stinger_ammo });
|
|
||||||
|
|
||||||
//Ammo assemblies
|
//Ammo assemblies
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', PB.nugget() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', PB.nugget() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_claws, 1), new Object[] { " X ", "X X", " XX", 'X', STEEL.plate() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_claws, 1), new Object[] { " X ", "X X", " XX", 'X', STEEL.plate() });
|
||||||
|
|||||||
261
src/main/java/com/hbm/entity/effect/EntityNukeTorex.java
Normal file
261
src/main/java/com/hbm/entity/effect/EntityNukeTorex.java
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
package com.hbm.entity.effect;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Toroidial Convection Simulation Explosion Effect
|
||||||
|
* Tor Ex
|
||||||
|
*/
|
||||||
|
public class EntityNukeTorex extends Entity {
|
||||||
|
|
||||||
|
public double coreHeight = 3;
|
||||||
|
public double convectionHeight = 3;
|
||||||
|
public double torusWidth = 3;
|
||||||
|
public double rollerSize = 1;
|
||||||
|
public double heat = 1;
|
||||||
|
public ArrayList<Cloudlet> cloudlets = new ArrayList();
|
||||||
|
public static int cloudletLife = 200;
|
||||||
|
|
||||||
|
public EntityNukeTorex(World world) {
|
||||||
|
super(world);
|
||||||
|
this.ignoreFrustumCheck = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void entityInit() { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate() {
|
||||||
|
this.ticksExisted++;
|
||||||
|
|
||||||
|
int maxAge = 90 * 20;
|
||||||
|
|
||||||
|
if(worldObj.isRemote) {
|
||||||
|
|
||||||
|
double range = (torusWidth - rollerSize) * 0.25;
|
||||||
|
|
||||||
|
if(this.ticksExisted + cloudletLife * 2 < maxAge) {
|
||||||
|
for(int i = 0; i < 20; i++) {
|
||||||
|
double y = posY + rand.nextGaussian() - 3; //this.ticksExisted < 60 ? this.posY + this.coreHeight : posY + rand.nextGaussian() - 3;
|
||||||
|
Cloudlet cloud = new Cloudlet(posX + rand.nextGaussian() * range, y, posZ + rand.nextGaussian() * range, (float)(rand.nextDouble() * 2D * Math.PI), 0);
|
||||||
|
cloudlets.add(cloud);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int cloudCount = ticksExisted * 3;
|
||||||
|
if(ticksExisted < 200) {
|
||||||
|
for(int i = 0; i < cloudCount; i++) {
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(ticksExisted + rand.nextDouble(), 0, 0);
|
||||||
|
float rot = (float) (Math.PI * 2 * rand.nextDouble());
|
||||||
|
vec.rotateAroundY(rot);
|
||||||
|
this.cloudlets.add(new Cloudlet(vec.xCoord + posX, worldObj.getHeightValue((int) (vec.xCoord + posX) + 2, (int) (vec.zCoord + posZ)), vec.zCoord + posZ, rot, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(Cloudlet cloud : cloudlets) {
|
||||||
|
cloud.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
coreHeight += 0.15;
|
||||||
|
torusWidth += 0.05;
|
||||||
|
rollerSize = torusWidth * 0.35;
|
||||||
|
convectionHeight = coreHeight + rollerSize;
|
||||||
|
|
||||||
|
int maxHeat = 50;
|
||||||
|
heat = maxHeat - Math.pow((maxHeat * this.ticksExisted) / maxAge, 1);
|
||||||
|
|
||||||
|
cloudlets.removeIf(x -> x.isDead);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!worldObj.isRemote && this.ticksExisted > maxAge) {
|
||||||
|
this.setDead();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Cloudlet {
|
||||||
|
|
||||||
|
public double posX;
|
||||||
|
public double posY;
|
||||||
|
public double posZ;
|
||||||
|
public double prevPosX;
|
||||||
|
public double prevPosY;
|
||||||
|
public double prevPosZ;
|
||||||
|
public double motionX;
|
||||||
|
public double motionY;
|
||||||
|
public double motionZ;
|
||||||
|
public int age;
|
||||||
|
public float angle;
|
||||||
|
public boolean isDead = false;
|
||||||
|
float rangeMod = 1.0F;
|
||||||
|
public float colorMod = 1.0F;
|
||||||
|
public Vec3 color;
|
||||||
|
public Vec3 prevColor;
|
||||||
|
|
||||||
|
public Cloudlet(double posX, double posY, double posZ, float angle, int age) {
|
||||||
|
this.posX = posX;
|
||||||
|
this.posY = posY;
|
||||||
|
this.posZ = posZ;
|
||||||
|
this.age = age;
|
||||||
|
this.angle = angle;
|
||||||
|
this.rangeMod = 0.3F + rand.nextFloat() * 0.7F;
|
||||||
|
this.colorMod = 0.8F + rand.nextFloat() * 0.2F;
|
||||||
|
|
||||||
|
this.updateColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void update() {
|
||||||
|
|
||||||
|
age++;
|
||||||
|
|
||||||
|
if(age > cloudletLife) {
|
||||||
|
this.isDead = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.prevPosX = this.posX;
|
||||||
|
this.prevPosY = this.posY;
|
||||||
|
this.prevPosZ = this.posZ;
|
||||||
|
|
||||||
|
Vec3 simPos = Vec3.createVectorHelper(EntityNukeTorex.this.posX - this.posX, 0, EntityNukeTorex.this.posZ - this.posZ);
|
||||||
|
double simPosX = EntityNukeTorex.this.posX + simPos.lengthVector();
|
||||||
|
double simPosZ = EntityNukeTorex.this.posZ + 0D;
|
||||||
|
|
||||||
|
Vec3 convection = getConvectionMotion(simPosX, simPosZ);
|
||||||
|
Vec3 lift = getLiftMotion(simPosX, simPosZ);
|
||||||
|
|
||||||
|
double factor = MathHelper.clamp_double((this.posY - EntityNukeTorex.this.posY) / EntityNukeTorex.this.coreHeight, 0, 1);
|
||||||
|
this.motionX = convection.xCoord * factor + lift.xCoord * (1D - factor);
|
||||||
|
this.motionY = convection.yCoord * factor + lift.yCoord * (1D - factor);
|
||||||
|
this.motionZ = convection.zCoord * factor + lift.zCoord * (1D - factor);
|
||||||
|
|
||||||
|
if(EntityNukeTorex.this.ticksExisted > 45 * 20) {
|
||||||
|
int timeLeft = 1600 - EntityNukeTorex.this.ticksExisted;
|
||||||
|
double scaled = Math.max((double) timeLeft / 900D, 0);
|
||||||
|
this.motionX *= scaled;
|
||||||
|
this.motionY *= scaled;
|
||||||
|
this.motionZ *= scaled;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.posX += this.motionX;
|
||||||
|
this.posY += this.motionY;
|
||||||
|
this.posZ += this.motionZ;
|
||||||
|
|
||||||
|
this.updateColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* simulated on a 2D-plane along the X/Y axis */
|
||||||
|
private Vec3 getConvectionMotion(double simPosX, double simPosZ) {
|
||||||
|
|
||||||
|
if(simPosX > EntityNukeTorex.this.posX + torusWidth * 2)
|
||||||
|
return Vec3.createVectorHelper(0, 0, 0);
|
||||||
|
|
||||||
|
/* the position of the torus' outer ring center */
|
||||||
|
Vec3 torusPos = Vec3.createVectorHelper(
|
||||||
|
(EntityNukeTorex.this.posX + torusWidth),
|
||||||
|
(EntityNukeTorex.this.posY + coreHeight),
|
||||||
|
EntityNukeTorex.this.posZ);
|
||||||
|
|
||||||
|
/* the difference between the cloudlet and the torus' ring center */
|
||||||
|
Vec3 delta = Vec3.createVectorHelper(torusPos.xCoord - simPosX, torusPos.yCoord - this.posY, torusPos.zCoord - simPosZ);
|
||||||
|
|
||||||
|
|
||||||
|
/* the distance this cloudlet wants to achieve to the torus' ring center */
|
||||||
|
double roller = EntityNukeTorex.this.rollerSize * this.rangeMod;
|
||||||
|
/* the distance between this cloudlet and the torus' outer ring perimeter */
|
||||||
|
double dist = delta.lengthVector() / roller - 1D;
|
||||||
|
|
||||||
|
/* euler function based on how far the cloudlet is away from the perimeter */
|
||||||
|
double func = 1D - Math.pow(Math.E, -dist); // [0;1]
|
||||||
|
/* just an approximation, but it's good enough */
|
||||||
|
float angle = (float) (func * Math.PI * 0.5D); // [0;90°]
|
||||||
|
|
||||||
|
/* vector going from the ring center in the direction of the cloudlet, stopping at the perimeter */
|
||||||
|
Vec3 rot = Vec3.createVectorHelper(-delta.xCoord / dist, -delta.yCoord / dist, -delta.zCoord / dist);
|
||||||
|
/* rotate by the approximate angle */
|
||||||
|
rot.rotateAroundZ(angle);
|
||||||
|
|
||||||
|
/* the direction from the cloudlet to the target position on the perimeter */
|
||||||
|
Vec3 motion = Vec3.createVectorHelper(
|
||||||
|
torusPos.xCoord + rot.xCoord - simPosX,
|
||||||
|
torusPos.yCoord + rot.yCoord - this.posY,
|
||||||
|
torusPos.zCoord + rot.zCoord - simPosZ);
|
||||||
|
|
||||||
|
motion = motion.normalize();
|
||||||
|
motion.rotateAroundY(this.angle);
|
||||||
|
|
||||||
|
return motion;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vec3 getLiftMotion(double simPosX, double simPosZ) {
|
||||||
|
double scale = MathHelper.clamp_double(1D - (simPosX - (EntityNukeTorex.this.posX + torusWidth)), 0, 1);
|
||||||
|
|
||||||
|
Vec3 motion = Vec3.createVectorHelper(EntityNukeTorex.this.posX - this.posX, (EntityNukeTorex.this.posY + convectionHeight) - this.posY, EntityNukeTorex.this.posZ - this.posZ);
|
||||||
|
|
||||||
|
motion = motion.normalize();
|
||||||
|
motion.xCoord *= scale;
|
||||||
|
motion.yCoord *= scale;
|
||||||
|
motion.zCoord *= scale;
|
||||||
|
|
||||||
|
return motion;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateColor() {
|
||||||
|
this.prevColor = this.color;
|
||||||
|
|
||||||
|
double exX = EntityNukeTorex.this.posX;
|
||||||
|
double exY = EntityNukeTorex.this.posY + EntityNukeTorex.this.coreHeight;
|
||||||
|
double exZ = EntityNukeTorex.this.posZ;
|
||||||
|
|
||||||
|
double distX = exX - posX;
|
||||||
|
double distY = exY - posY;
|
||||||
|
double distZ = exZ - posZ;
|
||||||
|
|
||||||
|
double distSq = distX * distX + distY * distY + distZ * distZ;
|
||||||
|
distSq /= EntityNukeTorex.this.heat;
|
||||||
|
double dist = Math.sqrt(distSq);
|
||||||
|
|
||||||
|
dist = Math.max(dist, 1);
|
||||||
|
double col = 2D / dist;
|
||||||
|
//col *= col;
|
||||||
|
|
||||||
|
this.color = Vec3.createVectorHelper(
|
||||||
|
Math.max(col * 2, 0.25),
|
||||||
|
Math.max(col * 1.5, 0.25),
|
||||||
|
Math.max(col * 0.5, 0.25)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec3 getInterpPos(float interp) {
|
||||||
|
return Vec3.createVectorHelper(
|
||||||
|
prevPosX + (posX - prevPosX) * interp,
|
||||||
|
prevPosY + (posY - prevPosY) * interp,
|
||||||
|
prevPosZ + (posZ - prevPosZ) * interp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec3 getInterpColor(float interp) {
|
||||||
|
return Vec3.createVectorHelper(
|
||||||
|
prevColor.xCoord + (color.xCoord - prevColor.xCoord) * interp,
|
||||||
|
prevColor.yCoord + (color.yCoord - prevColor.yCoord) * interp,
|
||||||
|
prevColor.zCoord + (color.zCoord - prevColor.zCoord) * interp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void readEntityFromNBT(NBTTagCompound nbt) { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean isInRangeToRenderDist(double distance) {
|
||||||
|
return distance < 25000;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,17 +5,17 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class EntitytemWaste extends EntityItem {
|
public class EntityItemWaste extends EntityItem {
|
||||||
|
|
||||||
public EntitytemWaste(World world) {
|
public EntityItemWaste(World world) {
|
||||||
super(world);
|
super(world);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntitytemWaste(World world, double x, double y, double z) {
|
public EntityItemWaste(World world, double x, double y, double z) {
|
||||||
super(world, x, y, z);
|
super(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntitytemWaste(World world, double x, double y, double z, ItemStack stack) {
|
public EntityItemWaste(World world, double x, double y, double z, ItemStack stack) {
|
||||||
super(world, x, y, z, stack);
|
super(world, x, y, z, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ public class EntityMovingItem extends Entity implements IConveyorItem {
|
|||||||
|
|
||||||
public EntityMovingItem(World p_i1582_1_) {
|
public EntityMovingItem(World p_i1582_1_) {
|
||||||
super(p_i1582_1_);
|
super(p_i1582_1_);
|
||||||
this.setSize(0.5F, 0.5F);
|
this.setSize(0.375F, 0.375F);
|
||||||
this.noClip = true;
|
this.noClip = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,10 +116,10 @@ public class EntityMovingItem extends Entity implements IConveyorItem {
|
|||||||
|
|
||||||
if(!(b instanceof IConveyorBelt)) {
|
if(!(b instanceof IConveyorBelt)) {
|
||||||
this.setDead();
|
this.setDead();
|
||||||
EntityItem item = new EntityItem(worldObj, posX, posY, posZ, this.getItemStack());
|
EntityItem item = new EntityItem(worldObj, posX + motionX * 2, posY + motionY * 2, posZ + motionZ * 2, this.getItemStack());
|
||||||
item.motionX = this.motionX * 3;
|
item.motionX = this.motionX * 2;
|
||||||
item.motionY = 0.1;
|
item.motionY = 0.1;
|
||||||
item.motionZ = this.motionZ * 3;
|
item.motionZ = this.motionZ * 2;
|
||||||
item.velocityChanged = true;
|
item.velocityChanged = true;
|
||||||
worldObj.spawnEntityInWorld(item);
|
worldObj.spawnEntityInWorld(item);
|
||||||
return;
|
return;
|
||||||
@ -184,6 +184,21 @@ public class EntityMovingItem extends Entity implements IConveyorItem {
|
|||||||
enterable.onEnter(worldObj, newPos.getX(), newPos.getY(), newPos.getZ(), dir, this);
|
enterable.onEnter(worldObj, newPos.getX(), newPos.getY(), newPos.getZ(), dir, this);
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(!newBlock.getMaterial().isSolid()) {
|
||||||
|
|
||||||
|
newBlock = worldObj.getBlock(newPos.getX(), newPos.getY() - 1, newPos.getZ());
|
||||||
|
|
||||||
|
if(newBlock instanceof IEnterableBlock) {
|
||||||
|
|
||||||
|
IEnterableBlock enterable = (IEnterableBlock) newBlock;
|
||||||
|
if(enterable.canEnter(worldObj, newPos.getX(), newPos.getY() - 1, newPos.getZ(), ForgeDirection.UP, this)) {
|
||||||
|
enterable.onEnter(worldObj, newPos.getX(), newPos.getY() - 1, newPos.getZ(), ForgeDirection.UP, this);
|
||||||
|
this.setDead();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,12 +66,9 @@ public class EntityMinerRocket extends Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataWatcher.getWatchableObjectInt(16) != 1) {
|
if(dataWatcher.getWatchableObjectInt(16) != 1 && !worldObj.isRemote && ticksExisted % 2 == 0) {
|
||||||
|
|
||||||
if(ticksExisted % 2 == 0) {
|
|
||||||
ParticleUtil.spawnGasFlame(worldObj, posX, posY - 0.5, posZ, 0.0, -1.0, 0.0);
|
ParticleUtil.spawnGasFlame(worldObj, posX, posY - 0.5, posZ, 0.0, -1.0, 0.0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(dataWatcher.getWatchableObjectInt(16) == 2 && posY > 300)
|
if(dataWatcher.getWatchableObjectInt(16) == 2 && posY > 300)
|
||||||
this.setDead();
|
this.setDead();
|
||||||
|
|||||||
@ -762,11 +762,6 @@ public class EntityBullet extends Entity implements IProjectile {
|
|||||||
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
|
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1
|
|
||||||
&& !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) {
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
this.setDead();
|
this.setDead();
|
||||||
|
|||||||
@ -483,11 +483,6 @@ public class EntityCombineBall extends Entity implements IProjectile
|
|||||||
{
|
{
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1)))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
|
|||||||
@ -507,11 +507,6 @@ public class EntityDischarge extends Entity implements IProjectile
|
|||||||
{
|
{
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1)))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
|
|||||||
@ -484,11 +484,6 @@ public class EntityFire extends Entity implements IProjectile
|
|||||||
{
|
{
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1)))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
|
|||||||
@ -481,11 +481,6 @@ public class EntityLN2 extends Entity implements IProjectile
|
|||||||
{
|
{
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1)))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
|
|||||||
@ -121,11 +121,12 @@ public class EntityRBMKDebris extends EntityDebrisBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.getType() == DebrisType.FUEL) {
|
if(this.getType() == DebrisType.FUEL || this.getType() == DebrisType.GRAPHITE) {
|
||||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(10, 10, 10));
|
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(2.5, 2.5, 2.5));
|
||||||
|
|
||||||
|
int level = this.getType() == DebrisType.FUEL ? 9 : 4;
|
||||||
for(EntityLivingBase e : entities) {
|
for(EntityLivingBase e : entities) {
|
||||||
e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 9));
|
e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, level));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -559,11 +559,6 @@ public class EntityRocket extends Entity implements IProjectile
|
|||||||
{
|
{
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1)))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
|
|||||||
@ -557,11 +557,6 @@ public class EntitySchrab extends Entity implements IProjectile
|
|||||||
{
|
{
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||||
|
|
||||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1)))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
||||||
|
|||||||
@ -116,10 +116,11 @@ public class EntityZirnoxDebris extends EntityDebrisBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.getType() == DebrisType.ELEMENT || this.getType() == DebrisType.GRAPHITE) {
|
if(this.getType() == DebrisType.ELEMENT || this.getType() == DebrisType.GRAPHITE) {
|
||||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(10, 10, 10));
|
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(2.5, 2.5, 2.5));
|
||||||
|
|
||||||
|
int level = this.getType() == DebrisType.ELEMENT ? 7 : 4;
|
||||||
for(EntityLivingBase e : entities) {
|
for(EntityLivingBase e : entities) {
|
||||||
e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 4));
|
e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, level));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
|||||||
public int totalDashCount = 0;
|
public int totalDashCount = 0;
|
||||||
public int stamina = 0;
|
public int stamina = 0;
|
||||||
|
|
||||||
|
public static final int plinkCooldownLength = 10;
|
||||||
|
public int plinkCooldown = 0;
|
||||||
|
|
||||||
public HbmPlayerProps(EntityPlayer player) {
|
public HbmPlayerProps(EntityPlayer player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
@ -104,6 +107,15 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
|||||||
return this.totalDashCount;
|
return this.totalDashCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void plink(EntityPlayer player, String sound, float volume, float pitch) {
|
||||||
|
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||||
|
|
||||||
|
if(props.plinkCooldown <= 0) {
|
||||||
|
player.worldObj.playSoundAtEntity(player, sound, volume, pitch);
|
||||||
|
props.plinkCooldown = props.plinkCooldownLength;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Entity entity, World world) { }
|
public void init(Entity entity, World world) { }
|
||||||
|
|
||||||
|
|||||||
@ -110,7 +110,6 @@ public class BobmazonOfferFactory {
|
|||||||
weapons.add(new Offer(new ItemStack(ModItems.turret_cheapo_ammo), Requirement.ASSEMBLY, 20 * inflation));
|
weapons.add(new Offer(new ItemStack(ModItems.turret_cheapo_ammo), Requirement.ASSEMBLY, 20 * inflation));
|
||||||
weapons.add(new Offer(new ItemStack(ModItems.turret_control), Requirement.CHEMICS, 35 * inflation));
|
weapons.add(new Offer(new ItemStack(ModItems.turret_control), Requirement.CHEMICS, 35 * inflation));
|
||||||
weapons.add(new Offer(new ItemStack(ModItems.turret_chip), Requirement.CHEMICS, 80 * inflation));
|
weapons.add(new Offer(new ItemStack(ModItems.turret_chip), Requirement.CHEMICS, 80 * inflation));
|
||||||
weapons.add(new Offer(new ItemStack(ModItems.turret_biometry), Requirement.CHEMICS, 15 * inflation));
|
|
||||||
weapons.add(new Offer(new ItemStack(ModBlocks.mine_ap, 4), Requirement.ASSEMBLY, 25 * inflation));
|
weapons.add(new Offer(new ItemStack(ModBlocks.mine_ap, 4), Requirement.ASSEMBLY, 25 * inflation));
|
||||||
weapons.add(new Offer(new ItemStack(ModBlocks.emp_bomb), Requirement.CHEMICS, 90 * inflation));
|
weapons.add(new Offer(new ItemStack(ModBlocks.emp_bomb), Requirement.CHEMICS, 90 * inflation));
|
||||||
weapons.add(new Offer(new ItemStack(ModBlocks.det_cord, 16), Requirement.ASSEMBLY, 50 * inflation));
|
weapons.add(new Offer(new ItemStack(ModBlocks.det_cord, 16), Requirement.ASSEMBLY, 50 * inflation));
|
||||||
@ -247,7 +246,7 @@ public class BobmazonOfferFactory {
|
|||||||
new ItemStack(Items.dye, 64)
|
new ItemStack(Items.dye, 64)
|
||||||
), Requirement.HIDDEN, 64));
|
), Requirement.HIDDEN, 64));
|
||||||
|
|
||||||
special.add(new Offer(ItemKitCustom.create("Maid's Cleaning Utensils", "For the heard to reach spots", 0x00ff00, 0x008000,
|
special.add(new Offer(ItemKitCustom.create("Maid's Cleaning Utensils", "For the hard to reach spots", 0x00ff00, 0x008000,
|
||||||
new ItemStack(ModItems.gun_calamity),
|
new ItemStack(ModItems.gun_calamity),
|
||||||
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
||||||
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
||||||
|
|||||||
@ -85,6 +85,7 @@ public class EntityEffectHandler {
|
|||||||
handleLungDisease(entity);
|
handleLungDisease(entity);
|
||||||
|
|
||||||
handleDashing(entity);
|
handleDashing(entity);
|
||||||
|
handlePlinking(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void handleContamination(EntityLivingBase entity) {
|
private static void handleContamination(EntityLivingBase entity) {
|
||||||
@ -517,4 +518,15 @@ public class EntityEffectHandler {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void handlePlinking(Entity entity) {
|
||||||
|
|
||||||
|
if(entity instanceof EntityPlayer) {
|
||||||
|
EntityPlayer player = (EntityPlayer)entity;
|
||||||
|
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||||
|
|
||||||
|
if(props.plinkCooldown > 0)
|
||||||
|
props.plinkCooldown--;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,12 +14,11 @@ public class FuelHandler implements IFuelHandler {
|
|||||||
|
|
||||||
int single = 200;
|
int single = 200;
|
||||||
|
|
||||||
if(fuel.getItem().equals(ModItems.solid_fuel))
|
if(fuel.getItem().equals(ModItems.solid_fuel)) return single * 16;
|
||||||
return single * 16;
|
if(fuel.getItem().equals(ModItems.solid_fuel_presto)) return single * 40;
|
||||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto))
|
if(fuel.getItem().equals(ModItems.solid_fuel_presto_triplet)) return single * 200;
|
||||||
return single * 40;
|
if(fuel.getItem().equals(ModItems.rocket_fuel)) return single * 32;
|
||||||
if(fuel.getItem().equals(ModItems.solid_fuel_presto_triplet))
|
|
||||||
return single * 200;
|
|
||||||
if(fuel.getItem().equals(ModItems.biomass))
|
if(fuel.getItem().equals(ModItems.biomass))
|
||||||
return 800;
|
return 800;
|
||||||
if(fuel.getItem().equals(ModItems.biomass_compressed))
|
if(fuel.getItem().equals(ModItems.biomass_compressed))
|
||||||
|
|||||||
@ -523,7 +523,6 @@ public class GunFatmanFactory {
|
|||||||
.addAttrib(ExAttrib.NOPARTICLE)
|
.addAttrib(ExAttrib.NOPARTICLE)
|
||||||
.addAttrib(ExAttrib.NOSOUND)
|
.addAttrib(ExAttrib.NOSOUND)
|
||||||
.addAttrib(ExAttrib.NODROP)
|
.addAttrib(ExAttrib.NODROP)
|
||||||
.addAttrib(ExAttrib.NOHURT)
|
|
||||||
.overrideResolution(64);
|
.overrideResolution(64);
|
||||||
exp.doExplosionA();
|
exp.doExplosionA();
|
||||||
exp.doExplosionB(false);
|
exp.doExplosionB(false);
|
||||||
|
|||||||
@ -0,0 +1,137 @@
|
|||||||
|
package com.hbm.inventory.container;
|
||||||
|
|
||||||
|
import com.hbm.inventory.SlotUpgrade;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.tileentity.network.TileEntityCraneExtractor;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ContainerCraneExtractor extends Container {
|
||||||
|
|
||||||
|
protected TileEntityCraneExtractor extractor;
|
||||||
|
|
||||||
|
public ContainerCraneExtractor(InventoryPlayer invPlayer, TileEntityCraneExtractor inserter) {
|
||||||
|
this.extractor = inserter;
|
||||||
|
|
||||||
|
//filter
|
||||||
|
for(int i = 0; i < 3; i++) {
|
||||||
|
for(int j = 0; j < 3; j++) {
|
||||||
|
this.addSlotToContainer(new Slot(inserter, j + i * 3, 71 + j * 18, 17 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//buffer
|
||||||
|
for(int i = 0; i < 3; i++) {
|
||||||
|
for(int j = 0; j < 3; j++) {
|
||||||
|
this.addSlotToContainer(new Slot(inserter, 9 + j + i * 3, 8 + j * 18, 17 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//upgrades
|
||||||
|
this.addSlotToContainer(new SlotUpgrade(inserter, 18, 152, 23));
|
||||||
|
this.addSlotToContainer(new SlotUpgrade(inserter, 19, 152, 47));
|
||||||
|
|
||||||
|
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, 103 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < 9; i++) {
|
||||||
|
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 161));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
|
||||||
|
ItemStack var3 = null;
|
||||||
|
Slot var4 = (Slot) this.inventorySlots.get(slot);
|
||||||
|
|
||||||
|
if(var4 != null && var4.getHasStack()) {
|
||||||
|
ItemStack var5 = var4.getStack();
|
||||||
|
var3 = var5.copy();
|
||||||
|
|
||||||
|
if(slot < 9) { //filters
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(slot <= extractor.getSizeInventory() - 1) {
|
||||||
|
if(!this.mergeItemStack(var5, extractor.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(var3.getItem() == ModItems.upgrade_5g) {
|
||||||
|
if(!this.mergeItemStack(var5, 18, 19, false))
|
||||||
|
return null;
|
||||||
|
} else if(var3.getItem() == ModItems.upgrade_crystallizer) {
|
||||||
|
if(!this.mergeItemStack(var5, 19, 20, false))
|
||||||
|
return null;
|
||||||
|
} else if(!this.mergeItemStack(var5, 9, extractor.getSizeInventory(), false)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(var5.stackSize == 0) {
|
||||||
|
var4.putStack((ItemStack) null);
|
||||||
|
} else {
|
||||||
|
var4.onSlotChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
var4.onPickupFromSlot(player, var5);
|
||||||
|
}
|
||||||
|
|
||||||
|
return var3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
|
return extractor.isUseableByPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||||
|
|
||||||
|
//L/R: 0
|
||||||
|
//M3: 3
|
||||||
|
//SHIFT: 1
|
||||||
|
//DRAG: 5
|
||||||
|
//System.out.println("Mode " + mode);
|
||||||
|
//System.out.println("Slot " + index);
|
||||||
|
|
||||||
|
if(index < 0 || index > 8) {
|
||||||
|
return super.slotClick(index, button, mode, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
Slot slot = this.getSlot(index);
|
||||||
|
|
||||||
|
ItemStack ret = null;
|
||||||
|
ItemStack held = player.inventory.getItemStack();
|
||||||
|
|
||||||
|
if(slot.getHasStack())
|
||||||
|
ret = slot.getStack().copy();
|
||||||
|
|
||||||
|
if(button == 1 && mode == 0 && slot.getHasStack()) {
|
||||||
|
extractor.nextMode(index);
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
slot.putStack(held != null ? held.copy() : null);
|
||||||
|
|
||||||
|
if(slot.getHasStack()) {
|
||||||
|
slot.getStack().stackSize = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
slot.onSlotChanged();
|
||||||
|
extractor.matcher.initPatternStandard(extractor.getWorldObj(), slot.getStack(), index);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -23,12 +23,12 @@ public class ContainerCraneInserter extends Container {
|
|||||||
|
|
||||||
for(int i = 0; i < 3; i++) {
|
for(int i = 0; i < 3; i++) {
|
||||||
for(int j = 0; j < 9; j++) {
|
for(int j = 0; j < 9; j++) {
|
||||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 20));
|
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 103 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 9; i++) {
|
for(int i = 0; i < 9; i++) {
|
||||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 20));
|
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 161));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,75 @@
|
|||||||
|
package com.hbm.inventory.container;
|
||||||
|
|
||||||
|
import com.hbm.inventory.SlotSmelting;
|
||||||
|
import com.hbm.inventory.SlotUpgrade;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityFurnaceIron;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ContainerFurnaceIron extends Container {
|
||||||
|
|
||||||
|
protected TileEntityFurnaceIron furnace;
|
||||||
|
|
||||||
|
public ContainerFurnaceIron(InventoryPlayer invPlayer, TileEntityFurnaceIron furnace) {
|
||||||
|
this.furnace = furnace;
|
||||||
|
|
||||||
|
//input
|
||||||
|
this.addSlotToContainer(new Slot(furnace, 0, 53, 17));
|
||||||
|
//fuel
|
||||||
|
this.addSlotToContainer(new Slot(furnace, 1, 53, 53));
|
||||||
|
this.addSlotToContainer(new Slot(furnace, 2, 71, 53));
|
||||||
|
//output
|
||||||
|
this.addSlotToContainer(new SlotSmelting(invPlayer.player, furnace, 3, 125, 35));
|
||||||
|
//upgrade
|
||||||
|
this.addSlotToContainer(new SlotUpgrade(furnace, 4, 17, 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 ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||||
|
ItemStack stack = null;
|
||||||
|
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||||
|
|
||||||
|
if(slot != null && slot.getHasStack()) {
|
||||||
|
ItemStack originalStack = slot.getStack();
|
||||||
|
stack = originalStack.copy();
|
||||||
|
|
||||||
|
if(index <= 4) {
|
||||||
|
if(!this.mergeItemStack(originalStack, 5, this.inventorySlots.size(), true)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
slot.onSlotChange(originalStack, stack);
|
||||||
|
|
||||||
|
} else if(!this.mergeItemStack(originalStack, 0, 5, false)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(originalStack.stackSize == 0) {
|
||||||
|
slot.putStack((ItemStack) null);
|
||||||
|
} else {
|
||||||
|
slot.onSlotChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
|
return furnace.isUseableByPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -158,7 +158,7 @@ public class Fluids {
|
|||||||
WASTEFLUID = new RadioactiveLiquid( "WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).setRadiation(0.5F).addTraits(FluidTrait.NO_CONTAINER);
|
WASTEFLUID = new RadioactiveLiquid( "WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).setRadiation(0.5F).addTraits(FluidTrait.NO_CONTAINER);
|
||||||
WASTEGAS = new RadioactiveGas( "WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).setRadiation(0.5F).addTraits(FluidTrait.NO_CONTAINER);
|
WASTEGAS = new RadioactiveGas( "WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).setRadiation(0.5F).addTraits(FluidTrait.NO_CONTAINER);
|
||||||
GASOLINE = new Fuel( "GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_000_000).setHeatEnergy(400_000).addContainers(0x2F7747, ExtContainer.CANISTER);
|
GASOLINE = new Fuel( "GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_000_000).setHeatEnergy(400_000).addContainers(0x2F7747, ExtContainer.CANISTER);
|
||||||
COALGAS = new Fuel( "COALGAS", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 150_000).setHeatEnergy(75_000);
|
COALGAS = new Fuel( "COALGAS", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 150_000).setHeatEnergy(75_000).addContainers(0x2F7759, ExtContainer.CANISTER);
|
||||||
SPENTSTEAM = new Gas( "SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).addTraits(FluidTrait.NO_CONTAINER).setCompression(1D);
|
SPENTSTEAM = new Gas( "SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).addTraits(FluidTrait.NO_CONTAINER).setCompression(1D);
|
||||||
FRACKSOL = new Petrochemical( "FRACKSOL", 0x798A6B, 1, 3, 3, EnumSymbol.ACID).addTraits(FluidTrait.CORROSIVE).addContainers(0x4F887F, ExtContainer.CANISTER);
|
FRACKSOL = new Petrochemical( "FRACKSOL", 0x798A6B, 1, 3, 3, EnumSymbol.ACID).addTraits(FluidTrait.CORROSIVE).addContainers(0x4F887F, ExtContainer.CANISTER);
|
||||||
PLASMA_DT = new FluidType( "PLASMA_DT", 0xF7AFDE, 0, 4, 0, EnumSymbol.RADIATION).setTemp(3250).addTraits(FluidTrait.NO_CONTAINER, FluidTrait.NO_ID);
|
PLASMA_DT = new FluidType( "PLASMA_DT", 0xF7AFDE, 0, 4, 0, EnumSymbol.RADIATION).setTemp(3250).addTraits(FluidTrait.NO_CONTAINER, FluidTrait.NO_ID);
|
||||||
@ -183,9 +183,9 @@ public class Fluids {
|
|||||||
SALIENT = new FluidType( "SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE);
|
SALIENT = new FluidType( "SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE);
|
||||||
XPJUICE = new FluidType( "XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE);
|
XPJUICE = new FluidType( "XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE);
|
||||||
ENDERJUICE = new FluidType( "ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE);
|
ENDERJUICE = new FluidType( "ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE);
|
||||||
PETROIL_LEADED = new Fuel( "PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 450_000).setHeatEnergy(((FluidTypeFlammable)PETROIL).getHeatEnergy());
|
PETROIL_LEADED = new Fuel( "PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 450_000).setHeatEnergy(((FluidTypeFlammable)PETROIL).getHeatEnergy()).addContainers(0x2331F6, ExtContainer.CANISTER);
|
||||||
GASOLINE_LEADED = new Fuel( "GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_500_000).setHeatEnergy(((FluidTypeFlammable)GASOLINE).getHeatEnergy());
|
GASOLINE_LEADED = new Fuel( "GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_500_000).setHeatEnergy(((FluidTypeFlammable)GASOLINE).getHeatEnergy()).addContainers(0xD4F4ED, ExtContainer.CANISTER);
|
||||||
COALGAS_LEADED = new Fuel( "COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 250_000).setHeatEnergy(((FluidTypeFlammable)COALGAS).getHeatEnergy());
|
COALGAS_LEADED = new Fuel( "COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 250_000).setHeatEnergy(((FluidTypeFlammable)COALGAS).getHeatEnergy()).addContainers(0x1E155F, ExtContainer.CANISTER);
|
||||||
SULFURIC_ACID = new FluidType( "SULFURIC_ACID", 0xB0AA64, 3, 0, 2, EnumSymbol.ACID).addTraits(FluidTrait.CORROSIVE);
|
SULFURIC_ACID = new FluidType( "SULFURIC_ACID", 0xB0AA64, 3, 0, 2, EnumSymbol.ACID).addTraits(FluidTrait.CORROSIVE);
|
||||||
COOLANT_HOT = new FluidType( "COOLANT_HOT", 0x99525E, 1, 0, 0, EnumSymbol.NONE).setTemp(600).setHeatCap(COOLANT.heatCap);
|
COOLANT_HOT = new FluidType( "COOLANT_HOT", 0x99525E, 1, 0, 0, EnumSymbol.NONE).setTemp(600).setHeatCap(COOLANT.heatCap);
|
||||||
MUG = new FluidType( "MUG", 0x4B2D28, 0, 0, 0, EnumSymbol.NONE).setHeatCap(1D);
|
MUG = new FluidType( "MUG", 0x4B2D28, 0, 0, 0, EnumSymbol.NONE).setHeatCap(1D);
|
||||||
|
|||||||
91
src/main/java/com/hbm/inventory/gui/GUICraneExtractor.java
Normal file
91
src/main/java/com/hbm/inventory/gui/GUICraneExtractor.java
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.inventory.container.ContainerCraneExtractor;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.packet.NBTControlPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
import com.hbm.tileentity.network.TileEntityCraneExtractor;
|
||||||
|
|
||||||
|
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.inventory.Slot;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
public class GUICraneExtractor extends GuiInfoContainer {
|
||||||
|
|
||||||
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crane_ejector.png");
|
||||||
|
private TileEntityCraneExtractor inserter;
|
||||||
|
|
||||||
|
public GUICraneExtractor(InventoryPlayer invPlayer, TileEntityCraneExtractor tedf) {
|
||||||
|
super(new ContainerCraneExtractor(invPlayer, tedf));
|
||||||
|
inserter = tedf;
|
||||||
|
|
||||||
|
this.xSize = 176;
|
||||||
|
this.ySize = 185;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int x, int y, float interp) {
|
||||||
|
super.drawScreen(x, y, interp);
|
||||||
|
|
||||||
|
if(this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||||
|
for(int i = 0; i < 9; ++i) {
|
||||||
|
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i);
|
||||||
|
|
||||||
|
if(this.isMouseOverSlot(slot, x, y) && inserter.matcher.modes[i] != null) {
|
||||||
|
|
||||||
|
String label = EnumChatFormatting.YELLOW + "";
|
||||||
|
|
||||||
|
switch(inserter.matcher.modes[i]) {
|
||||||
|
case "exact": label += "Item and meta match"; break;
|
||||||
|
case "wildcard": label += "Item matches"; break;
|
||||||
|
default: label += "Ore dict key matches: " + inserter.matcher.modes[i]; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.func_146283_a(Arrays.asList(new String[] { EnumChatFormatting.RED + "Right click to change", label }), x, y - 30);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int x, int y, int i) {
|
||||||
|
super.mouseClicked(x, y, i);
|
||||||
|
|
||||||
|
if(guiLeft + 128 <= x && guiLeft + 128 + 14 > x && guiTop + 30 < y && guiTop + 30 + 26 >= y) {
|
||||||
|
|
||||||
|
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setBoolean("whitelist", true);
|
||||||
|
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, inserter.xCoord, inserter.yCoord, inserter.zCoord));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
|
String name = this.inserter.hasCustomInventoryName() ? this.inserter.getInventoryName() : I18n.format(this.inserter.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);
|
||||||
|
|
||||||
|
if(inserter.isWhitelist) {
|
||||||
|
drawTexturedModalRect(guiLeft + 139, guiTop + 33, 176, 0, 3, 6);
|
||||||
|
} else {
|
||||||
|
drawTexturedModalRect(guiLeft + 139, guiTop + 47, 176, 0, 3, 6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
77
src/main/java/com/hbm/inventory/gui/GUIFurnaceIron.java
Normal file
77
src/main/java/com/hbm/inventory/gui/GUIFurnaceIron.java
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.inventory.container.ContainerFurnaceIron;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityFurnaceIron;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
public class GUIFurnaceIron extends GuiInfoContainer {
|
||||||
|
|
||||||
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_furnace_iron.png");
|
||||||
|
private TileEntityFurnaceIron diFurnace;
|
||||||
|
|
||||||
|
public GUIFurnaceIron(InventoryPlayer invPlayer, TileEntityFurnaceIron tedf) {
|
||||||
|
super(new ContainerFurnaceIron(invPlayer, tedf));
|
||||||
|
diFurnace = tedf;
|
||||||
|
|
||||||
|
this.xSize = 176;
|
||||||
|
this.ySize = 166;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int x, int y, float interp) {
|
||||||
|
super.drawScreen(x, y, interp);
|
||||||
|
|
||||||
|
if(this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||||
|
|
||||||
|
for(int i = 1; i < 3; ++i) {
|
||||||
|
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i);
|
||||||
|
|
||||||
|
if(this.isMouseOverSlot(slot, x, y) && !slot.getHasStack()) {
|
||||||
|
|
||||||
|
List<String> bonuses = this.diFurnace.burnModule.getDesc();
|
||||||
|
|
||||||
|
if(!bonuses.isEmpty()) {
|
||||||
|
this.func_146283_a(bonuses, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.drawCustomInfoStat(x, y, guiLeft + 52, guiTop + 35, 71, 7, x, y, new String[] { (diFurnace.progress * 100 / Math.max(diFurnace.processingTime, 1)) + "%" });
|
||||||
|
this.drawCustomInfoStat(x, y, guiLeft + 52, guiTop + 44, 71, 7, x, y, new String[] { (diFurnace.burnTime / 20) + "s" });
|
||||||
|
}
|
||||||
|
|
||||||
|
@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.progress * 70 / Math.max(diFurnace.processingTime, 1);
|
||||||
|
drawTexturedModalRect(guiLeft + 53, guiTop + 36, 176, 18, i, 5);
|
||||||
|
|
||||||
|
int j = diFurnace.burnTime * 70 / Math.max(diFurnace.maxBurnTime, 1);
|
||||||
|
drawTexturedModalRect(guiLeft + 53, guiTop + 45, 176, 23, j, 5);
|
||||||
|
|
||||||
|
if(diFurnace.canSmelt())
|
||||||
|
drawTexturedModalRect(guiLeft + 70, guiTop + 16, 176, 0, 18, 18);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -239,7 +239,7 @@ public class GUIRBMKConsole extends GuiScreen {
|
|||||||
|
|
||||||
drawTexturedModalRect(guiLeft + x, guiTop + y, tX, tY, size, size);
|
drawTexturedModalRect(guiLeft + x, guiTop + y, tX, tY, size, size);
|
||||||
|
|
||||||
int h = (int)Math.ceil((col.data.getDouble("heat") - 20) * 10 / col.data.getDouble("maxHeat"));
|
int h = Math.min((int)Math.ceil((col.data.getDouble("heat") - 20) * 10 / col.data.getDouble("maxHeat")), 10);
|
||||||
drawTexturedModalRect(guiLeft + x, guiTop + y + size - h, 0, 192 - h, 10, h);
|
drawTexturedModalRect(guiLeft + x, guiTop + y + size - h, 0, 192 - h, 10, h);
|
||||||
|
|
||||||
switch(col.type) {
|
switch(col.type) {
|
||||||
|
|||||||
45
src/main/java/com/hbm/inventory/gui/GUITurretArty.java
Normal file
45
src/main/java/com/hbm/inventory/gui/GUITurretArty.java
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.packet.AuxButtonPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
import com.hbm.tileentity.turret.TileEntityTurretArty;
|
||||||
|
import com.hbm.tileentity.turret.TileEntityTurretBaseNT;
|
||||||
|
|
||||||
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
public class GUITurretArty extends GUITurretBase {
|
||||||
|
|
||||||
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_turret_arty.png");
|
||||||
|
|
||||||
|
public GUITurretArty(InventoryPlayer invPlayer, TileEntityTurretBaseNT tedf) {
|
||||||
|
super(invPlayer, tedf);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int x, int y, int i) {
|
||||||
|
super.mouseClicked(x, y, i);
|
||||||
|
|
||||||
|
if(guiLeft + 151 <= x && guiLeft + 151 + 18 > x && guiTop + 16 < y && guiTop + 16 + 18 >= y) {
|
||||||
|
|
||||||
|
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||||
|
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(turret.xCoord, turret.yCoord, turret.zCoord, 0, 5));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int mX, int mY) {
|
||||||
|
super.drawGuiContainerBackgroundLayer(p_146976_1_, mX, mY);
|
||||||
|
|
||||||
|
if(((TileEntityTurretArty)turret).directMode)
|
||||||
|
drawTexturedModalRect(guiLeft + 151, guiTop + 16, 210, 0, 18, 18);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ResourceLocation getTexture() {
|
||||||
|
return texture;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,6 +16,7 @@ import net.minecraft.client.Minecraft;
|
|||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
@ -92,6 +93,10 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isMouseOverSlot(Slot slot, int x, int y) {
|
||||||
|
return this.func_146978_c(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seven segment style displays for GUIs, tried to be as adaptable as possible. Still has some bugs that need to be ironed out but it works for the most part.
|
* Seven segment style displays for GUIs, tried to be as adaptable as possible. Still has some bugs that need to be ironed out but it works for the most part.
|
||||||
* @author UFFR
|
* @author UFFR
|
||||||
|
|||||||
@ -167,12 +167,11 @@ public class AssemblerRecipes {
|
|||||||
makeRecipe(new ComparableStack(ModItems.hazmat_cloth, 4), new AStack[] {new OreDictStack(PB.dust(), 4), new ComparableStack(Items.string, 8), },50);
|
makeRecipe(new ComparableStack(ModItems.hazmat_cloth, 4), new AStack[] {new OreDictStack(PB.dust(), 4), new ComparableStack(Items.string, 8), },50);
|
||||||
makeRecipe(new ComparableStack(ModItems.asbestos_cloth, 4), new AStack[] {new OreDictStack(ASBESTOS.ingot(), 2), new ComparableStack(Items.string, 6), new ComparableStack(Blocks.wool, 1), },50);
|
makeRecipe(new ComparableStack(ModItems.asbestos_cloth, 4), new AStack[] {new OreDictStack(ASBESTOS.ingot(), 2), new ComparableStack(Items.string, 6), new ComparableStack(Blocks.wool, 1), },50);
|
||||||
makeRecipe(new ComparableStack(ModItems.filter_coal, 1), new AStack[] {new OreDictStack(COAL.dust(), 4), new ComparableStack(Items.string, 6), new ComparableStack(Items.paper, 1), },50);
|
makeRecipe(new ComparableStack(ModItems.filter_coal, 1), new AStack[] {new OreDictStack(COAL.dust(), 4), new ComparableStack(Items.string, 6), new ComparableStack(Items.paper, 1), },50);
|
||||||
makeRecipe(new ComparableStack(ModItems.centrifuge_element, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 1), new ComparableStack(ModItems.coil_tungsten, 1), new ComparableStack(ModItems.wire_red_copper, 4), new ComparableStack(ModItems.motor, 1), },200);
|
makeRecipe(new ComparableStack(ModItems.centrifuge_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new OreDictStack(TI.plate(), 4), new ComparableStack(ModItems.motor, 1), }, 100);
|
||||||
makeRecipe(new ComparableStack(ModItems.centrifuge_tower, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(STEEL.plate(), 4), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), },150);
|
//makeRecipe(new ComparableStack(ModItems.centrifuge_tower, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(STEEL.plate(), 4), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), },150);
|
||||||
makeRecipe(new ComparableStack(ModItems.magnet_circular, 1), new AStack[] {new ComparableStack(ModBlocks.fusion_conductor, 5), new OreDictStack(STEEL.ingot(), 4), new OreDictStack(ALLOY.plate(), 6), },150);
|
makeRecipe(new ComparableStack(ModItems.magnet_circular, 1), new AStack[] {new ComparableStack(ModBlocks.fusion_conductor, 5), new OreDictStack(STEEL.ingot(), 4), new OreDictStack(ALLOY.plate(), 6), },150);
|
||||||
makeRecipe(new ComparableStack(ModItems.reactor_core, 1), new AStack[] {new OreDictStack(PB.ingot(), 8), new OreDictStack(BE.ingot(), 6), new OreDictStack(STEEL.plate(), 16), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(FIBER.ingot(), 2) },100);
|
makeRecipe(new ComparableStack(ModItems.reactor_core, 1), new AStack[] {new OreDictStack(PB.ingot(), 8), new OreDictStack(BE.ingot(), 6), new OreDictStack(STEEL.plate(), 16), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(FIBER.ingot(), 2) },100);
|
||||||
makeRecipe(new ComparableStack(ModItems.rtg_unit, 1), new AStack[] {new ComparableStack(ModItems.thermo_element, 2), new ComparableStack(ModItems.board_copper, 1), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.circuit_copper, 1), },100);
|
makeRecipe(new ComparableStack(ModItems.rtg_unit, 1), new AStack[] {new ComparableStack(ModItems.thermo_element, 2), new ComparableStack(ModItems.board_copper, 1), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.circuit_copper, 1), },100);
|
||||||
makeRecipe(new ComparableStack(ModItems.thermo_unit_empty, 1), new AStack[] {new ComparableStack(ModItems.coil_copper_torus, 3), new OreDictStack(STEEL.ingot(), 3), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.plate_polymer, 12), },100);
|
|
||||||
makeRecipe(new ComparableStack(ModItems.levitation_unit, 1), new AStack[] {new ComparableStack(ModItems.coil_copper, 4), new ComparableStack(ModItems.coil_tungsten, 2), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.nugget_schrabidium, 2), },100);
|
makeRecipe(new ComparableStack(ModItems.levitation_unit, 1), new AStack[] {new ComparableStack(ModItems.coil_copper, 4), new ComparableStack(ModItems.coil_tungsten, 2), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.nugget_schrabidium, 2), },100);
|
||||||
makeRecipe(new ComparableStack(ModItems.drill_titanium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(DURA.ingot(), 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new OreDictStack(TI.plate(), 6), },100);
|
makeRecipe(new ComparableStack(ModItems.drill_titanium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(DURA.ingot(), 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new OreDictStack(TI.plate(), 6), },100);
|
||||||
makeRecipe(new ComparableStack(ModItems.telepad, 1), new AStack[] {new OreDictStack(ANY_PLASTIC.ingot(), 12), new OreDictStack(SA326.plate(), 2), new OreDictStack(CMB.plate(), 4), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.wire_gold, 6), new ComparableStack(ModItems.circuit_schrabidium, 1), },300);
|
makeRecipe(new ComparableStack(ModItems.telepad, 1), new AStack[] {new OreDictStack(ANY_PLASTIC.ingot(), 12), new OreDictStack(SA326.plate(), 2), new OreDictStack(CMB.plate(), 4), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.wire_gold, 6), new ComparableStack(ModItems.circuit_schrabidium, 1), },300);
|
||||||
@ -266,15 +265,14 @@ public class AssemblerRecipes {
|
|||||||
makeRecipe(new ComparableStack(ModItems.part_copper, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(CU.dust(), 1), },50);
|
makeRecipe(new ComparableStack(ModItems.part_copper, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(CU.dust(), 1), },50);
|
||||||
makeRecipe(new ComparableStack(ModItems.part_plutonium, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new ComparableStack(ModItems.powder_plutonium, 1), },50);
|
makeRecipe(new ComparableStack(ModItems.part_plutonium, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new ComparableStack(ModItems.powder_plutonium, 1), },50);
|
||||||
makeRecipe(new ComparableStack(ModItems.thermo_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 1), new ComparableStack(ModItems.wire_red_copper, 2), new ComparableStack(ModItems.wire_aluminium, 2), new OreDictStack(NETHERQUARTZ.dust(), 2), },150);
|
makeRecipe(new ComparableStack(ModItems.thermo_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 1), new ComparableStack(ModItems.wire_red_copper, 2), new ComparableStack(ModItems.wire_aluminium, 2), new OreDictStack(NETHERQUARTZ.dust(), 2), },150);
|
||||||
makeRecipe(new ComparableStack(ModItems.limiter, 1), new AStack[] {new OreDictStack(STEEL.plate(), 3), new OreDictStack(IRON.plate(), 1), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.wire_copper, 4), },150);
|
|
||||||
makeRecipe(new ComparableStack(ModItems.plate_dalekanium, 1), new AStack[] {new ComparableStack(ModBlocks.block_meteor, 1), },50);
|
makeRecipe(new ComparableStack(ModItems.plate_dalekanium, 1), new AStack[] {new ComparableStack(ModBlocks.block_meteor, 1), },50);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.block_meteor, 1), new AStack[] {new ComparableStack(ModItems.fragment_meteorite, 100), },500);
|
makeRecipe(new ComparableStack(ModBlocks.block_meteor, 1), new AStack[] {new ComparableStack(ModItems.fragment_meteorite, 100), },500);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.cmb_brick, 8), new AStack[] {new OreDictStack(CMB.ingot(), 1), new OreDictStack(CMB.plate(), 8), },100);
|
makeRecipe(new ComparableStack(ModBlocks.cmb_brick, 8), new AStack[] {new OreDictStack(CMB.ingot(), 1), new OreDictStack(CMB.plate(), 8), },100);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.cmb_brick_reinforced, 8), new AStack[] {new ComparableStack(ModBlocks.block_magnetized_tungsten, 4), new ComparableStack(ModBlocks.brick_concrete, 4), new ComparableStack(ModBlocks.cmb_brick, 1), new OreDictStack(STEEL.plate(), 4), },200);
|
makeRecipe(new ComparableStack(ModBlocks.cmb_brick_reinforced, 8), new AStack[] {new ComparableStack(ModBlocks.block_magnetized_tungsten, 4), new ComparableStack(ModBlocks.brick_concrete, 4), new ComparableStack(ModBlocks.cmb_brick, 1), new OreDictStack(STEEL.plate(), 4), },200);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.seal_frame, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new ComparableStack(ModItems.wire_aluminium, 4), new OreDictStack(REDSTONE.dust(), 2), new ComparableStack(ModBlocks.steel_roof, 5), },50);
|
makeRecipe(new ComparableStack(ModBlocks.seal_frame, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new ComparableStack(ModItems.wire_aluminium, 4), new OreDictStack(REDSTONE.dust(), 2), new ComparableStack(ModBlocks.steel_roof, 5), },50);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.seal_controller, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(MINGRADE.ingot(), 1), new OreDictStack(REDSTONE.dust(), 4), new ComparableStack(ModBlocks.steel_roof, 5), },100);
|
makeRecipe(new ComparableStack(ModBlocks.seal_controller, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(MINGRADE.ingot(), 1), new OreDictStack(REDSTONE.dust(), 4), new ComparableStack(ModBlocks.steel_roof, 5), },100);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_tower, 1), new OreDictStack(STEEL.ingot(), 4), new OreDictStack(IRON.ingot(), 4), new OreDictStack(STEEL.plate(), 2), new OreDictStack(CU.plate(), 2), new ComparableStack(ModItems.wire_red_copper, 8), },250);
|
makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate(), 8), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.circuit_copper, 1), }, 200);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_tower, 1), new OreDictStack(STEEL.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.wire_red_copper, 16) },300);
|
makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.circuit_red_copper, 1) }, 300);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_rtg_furnace_off, 1), new AStack[] {new ComparableStack(Blocks.furnace, 1), new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(PB.plate(), 6), new OreDictStack(OreDictManager.getReflector(), 4), new OreDictStack(CU.plate(), 2), },150);
|
makeRecipe(new ComparableStack(ModBlocks.machine_rtg_furnace_off, 1), new AStack[] {new ComparableStack(Blocks.furnace, 1), new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(PB.plate(), 6), new OreDictStack(OreDictManager.getReflector(), 4), new OreDictStack(CU.plate(), 2), },150);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(Blocks.piston, 4), new OreDictStack(STEEL.ingot(), 6), new OreDictStack(MINGRADE.ingot(), 2), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.wire_red_copper, 6), },200);
|
makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(Blocks.piston, 4), new OreDictStack(STEEL.ingot(), 6), new OreDictStack(MINGRADE.ingot(), 2), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.wire_red_copper, 6), },200);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_selenium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 6), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.hull_small_steel, 9), new ComparableStack(ModItems.pedestal_steel, 1), new ComparableStack(ModItems.coil_copper, 4), },250);
|
makeRecipe(new ComparableStack(ModBlocks.machine_selenium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 6), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.hull_small_steel, 9), new ComparableStack(ModItems.pedestal_steel, 1), new ComparableStack(ModItems.coil_copper, 4), },250);
|
||||||
@ -331,8 +329,8 @@ public class AssemblerRecipes {
|
|||||||
makeRecipe(new ComparableStack(ModBlocks.nuke_fstbmb, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.hull_big_titanium, 6), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.wire_gold, 12), new ComparableStack(ModItems.circuit_targeting_tier4, 4), new OreDictStack("dyeGray", 6), },600);
|
makeRecipe(new ComparableStack(ModBlocks.nuke_fstbmb, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.hull_big_titanium, 6), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.wire_gold, 12), new ComparableStack(ModItems.circuit_targeting_tier4, 4), new OreDictStack("dyeGray", 6), },600);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.nuke_custom, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit_gold, 1), new ComparableStack(ModItems.wire_gold, 12), new OreDictStack("dyeGray", 4), },300);
|
makeRecipe(new ComparableStack(ModBlocks.nuke_custom, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit_gold, 1), new ComparableStack(ModItems.wire_gold, 12), new OreDictStack("dyeGray", 4), },300);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.float_bomb, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.levitation_unit, 1), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.wire_gold, 6), },250);
|
makeRecipe(new ComparableStack(ModBlocks.float_bomb, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.levitation_unit, 1), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.wire_gold, 6), },250);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.therm_endo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.thermo_unit_endo, 1), new ComparableStack(ModItems.circuit_gold, 2), new ComparableStack(ModItems.wire_gold, 6), },250);
|
makeRecipe(new ComparableStack(ModBlocks.therm_endo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.powder_ice, 32), new ComparableStack(ModItems.circuit_gold, 1), new ComparableStack(ModItems.coil_gold, 4), },250);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.therm_exo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.thermo_unit_exo, 1), new ComparableStack(ModItems.circuit_gold, 2), new ComparableStack(ModItems.wire_gold, 6), },250);
|
makeRecipe(new ComparableStack(ModBlocks.therm_exo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new OreDictStack(P_RED.dust(), 32), new ComparableStack(ModItems.circuit_gold, 1), new ComparableStack(ModItems.coil_gold, 4), },250);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.launch_pad, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.machine_battery, 1), new ComparableStack(ModItems.circuit_gold, 2), },250);
|
makeRecipe(new ComparableStack(ModBlocks.launch_pad, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.machine_battery, 1), new ComparableStack(ModItems.circuit_gold, 2), },250);
|
||||||
makeRecipe(new ComparableStack(ModItems.spawn_chopper, 1), new AStack[] {new ComparableStack(ModItems.chopper_blades, 5), new ComparableStack(ModItems.chopper_gun, 1), new ComparableStack(ModItems.chopper_head, 1), new ComparableStack(ModItems.chopper_tail, 1), new ComparableStack(ModItems.chopper_torso, 1), new ComparableStack(ModItems.chopper_wing, 2), },300);
|
makeRecipe(new ComparableStack(ModItems.spawn_chopper, 1), new AStack[] {new ComparableStack(ModItems.chopper_blades, 5), new ComparableStack(ModItems.chopper_gun, 1), new ComparableStack(ModItems.chopper_head, 1), new ComparableStack(ModItems.chopper_tail, 1), new ComparableStack(ModItems.chopper_torso, 1), new ComparableStack(ModItems.chopper_wing, 2), },300);
|
||||||
//makeRecipe(new ComparableStack(ModBlocks.turret_light, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 6), new ComparableStack(ModItems.pipes_steel, 2), new OreDictStack(MINGRADE.ingot(), 2), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier2, 2), },200);
|
//makeRecipe(new ComparableStack(ModBlocks.turret_light, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 6), new ComparableStack(ModItems.pipes_steel, 2), new OreDictStack(MINGRADE.ingot(), 2), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier2, 2), },200);
|
||||||
|
|||||||
@ -277,8 +277,8 @@ public class SILEXRecipes {
|
|||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_les), 90 - i * 20)) //Just bullshit something about "not enough np237 for extractable amounts of xe135"
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_les), 90 - i * 20)) //Just bullshit something about "not enough np237 for extractable amounts of xe135"
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 2 + 3 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 2 + 3 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 2 + 5 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 2 + 5 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.SCHRABIDIUM.ordinal()), 1 + 1 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.SCHRABIDIUM.ordinal()), 1 + 2 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 1 + 3 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 1 + 2 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 8 * i)) );
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 8 * i)) );
|
||||||
|
|
||||||
// MES //
|
// MES //
|
||||||
@ -286,18 +286,18 @@ public class SILEXRecipes {
|
|||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium_fuel), 90 - i * 20))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium_fuel), 90 - i * 20))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 1 + 3 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 1 + 3 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 2 + 4 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 2 + 4 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.SCHRABIDIUM.ordinal()), 1 + 2 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.SCHRABIDIUM.ordinal()), 1 + 3 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 2 + 4 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 2 + 4 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 7 * i)) );
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 6 * i)) );
|
||||||
|
|
||||||
//TODO: Readd xenon processing if/when the NEI handler can display more than 6 outputs properly
|
//TODO: Readd xenon processing if/when the NEI handler can display more than 6 outputs properly
|
||||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_mes, 1, i + 5), new SILEXRecipe(600, 100, 2)
|
recipes.put(new ComparableStack(ModItems.rbmk_pellet_mes, 1, i + 5), new SILEXRecipe(600, 100, 2)
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium_fuel), 90 - i * 20)) //ditto
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium_fuel), 90 - i * 20)) //ditto
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 1 + 2 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 1 + 3 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 2 + 4 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 2 + 4 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.SCHRABIDIUM.ordinal()), 1 + 3 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.SCHRABIDIUM.ordinal()), 1 + 3 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 2 + 4 * i))
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.SCHRABIDIUM.ordinal()), 2 + 4 * i))
|
||||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 7 * i)) );
|
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 4 + 6 * i)) );
|
||||||
|
|
||||||
// HES //
|
// HES //
|
||||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_hes, 1, i), new SILEXRecipe(600, 100, 2)
|
recipes.put(new ComparableStack(ModItems.rbmk_pellet_hes, 1, i), new SILEXRecipe(600, 100, 2)
|
||||||
|
|||||||
@ -339,6 +339,7 @@ public class ShredderRecipes {
|
|||||||
ShredderRecipes.setRecipe(ModItems.debris_exchanger, new ItemStack(ModItems.powder_steel, 3));
|
ShredderRecipes.setRecipe(ModItems.debris_exchanger, new ItemStack(ModItems.powder_steel, 3));
|
||||||
ShredderRecipes.setRecipe(ModItems.debris_element, new ItemStack(ModItems.scrap_nuclear, 4));
|
ShredderRecipes.setRecipe(ModItems.debris_element, new ItemStack(ModItems.scrap_nuclear, 4));
|
||||||
ShredderRecipes.setRecipe(ModItems.debris_metal, new ItemStack(ModItems.powder_steel_tiny, 3));
|
ShredderRecipes.setRecipe(ModItems.debris_metal, new ItemStack(ModItems.powder_steel_tiny, 3));
|
||||||
|
ShredderRecipes.setRecipe(ModItems.debris_graphite, new ItemStack(ModItems.powder_coal, 1));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GC COMPAT
|
* GC COMPAT
|
||||||
|
|||||||
@ -696,10 +696,9 @@ public class AnvilRecipes {
|
|||||||
|
|
||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
new ComparableStack(ModBlocks.machine_turbine), new AnvilOutput[] {
|
new ComparableStack(ModBlocks.machine_turbine), new AnvilOutput[] {
|
||||||
new AnvilOutput(new ItemStack(ModItems.turbine_titanium, 2)),
|
new AnvilOutput(new ItemStack(ModItems.turbine_titanium, 1)),
|
||||||
new AnvilOutput(new ItemStack(ModItems.motor, 1)),
|
new AnvilOutput(new ItemStack(ModItems.coil_copper, 2)),
|
||||||
new AnvilOutput(new ItemStack(ModItems.tank_steel, 2)),
|
new AnvilOutput(new ItemStack(ModItems.ingot_steel, 6))
|
||||||
new AnvilOutput(new ItemStack(ModItems.plate_titanium, 4))
|
|
||||||
}).setTier(3));
|
}).setTier(3));
|
||||||
|
|
||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
|||||||
@ -17,8 +17,8 @@ public class ItemEnumMulti extends Item {
|
|||||||
|
|
||||||
//hell yes, now we're thinking with enums!
|
//hell yes, now we're thinking with enums!
|
||||||
protected Class<? extends Enum> theEnum;
|
protected Class<? extends Enum> theEnum;
|
||||||
private boolean multiName;
|
protected boolean multiName;
|
||||||
private boolean multiTexture;
|
protected boolean multiTexture;
|
||||||
|
|
||||||
public ItemEnumMulti(Class<? extends Enum> theEnum, boolean multiName, boolean multiTexture) {
|
public ItemEnumMulti(Class<? extends Enum> theEnum, boolean multiName, boolean multiTexture) {
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
@ -42,7 +42,7 @@ public class ItemEnumMulti extends Item {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IIcon[] icons;
|
protected IIcon[] icons;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister reg) {
|
public void registerIcons(IIconRegister reg) {
|
||||||
|
|||||||
39
src/main/java/com/hbm/items/ItemGenericPart.java
Normal file
39
src/main/java/com/hbm/items/ItemGenericPart.java
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package com.hbm.items;
|
||||||
|
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
|
public class ItemGenericPart extends ItemEnumMulti {
|
||||||
|
|
||||||
|
public static enum EnumPartType {
|
||||||
|
PISTON_PNEUMATIC("piston_pneumatic"),
|
||||||
|
PISTON_HYDRAULIC("piston_hydraulic"),
|
||||||
|
PISTON_ELECTRIC("piston_electric");
|
||||||
|
|
||||||
|
private String texName;
|
||||||
|
|
||||||
|
private EnumPartType(String texName) {
|
||||||
|
this.texName = texName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemGenericPart() {
|
||||||
|
super(EnumPartType.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++) {
|
||||||
|
EnumPartType num = (EnumPartType)enums[i];
|
||||||
|
this.icons[i] = reg.registerIcon(RefStrings.MODID + ":" + num.texName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -314,6 +314,7 @@ public class ModItems {
|
|||||||
public static Item sat_base;
|
public static Item sat_base;
|
||||||
public static Item thruster_nuclear;
|
public static Item thruster_nuclear;
|
||||||
public static Item safety_fuse;
|
public static Item safety_fuse;
|
||||||
|
public static Item part_generic;
|
||||||
|
|
||||||
public static Item undefined;
|
public static Item undefined;
|
||||||
|
|
||||||
@ -512,12 +513,12 @@ public class ModItems {
|
|||||||
public static Item motor;
|
public static Item motor;
|
||||||
public static Item motor_desh;
|
public static Item motor_desh;
|
||||||
public static Item centrifuge_element;
|
public static Item centrifuge_element;
|
||||||
public static Item centrifuge_tower;
|
//public static Item centrifuge_tower;
|
||||||
public static Item reactor_core;
|
public static Item reactor_core;
|
||||||
public static Item rtg_unit;
|
public static Item rtg_unit;
|
||||||
public static Item thermo_unit_empty;
|
//public static Item thermo_unit_empty;
|
||||||
public static Item thermo_unit_endo;
|
//public static Item thermo_unit_endo;
|
||||||
public static Item thermo_unit_exo;
|
//public static Item thermo_unit_exo;
|
||||||
public static Item levitation_unit;
|
public static Item levitation_unit;
|
||||||
public static Item wire_aluminium;
|
public static Item wire_aluminium;
|
||||||
public static Item wire_copper;
|
public static Item wire_copper;
|
||||||
@ -530,9 +531,9 @@ public class ModItems {
|
|||||||
public static Item coil_magnetized_tungsten;
|
public static Item coil_magnetized_tungsten;
|
||||||
public static Item coil_gold;
|
public static Item coil_gold;
|
||||||
public static Item coil_gold_torus;
|
public static Item coil_gold_torus;
|
||||||
public static Item magnet_dee;
|
//public static Item magnet_dee;
|
||||||
public static Item magnet_circular;
|
public static Item magnet_circular;
|
||||||
public static Item cyclotron_tower;
|
//public static Item cyclotron_tower;
|
||||||
public static Item component_limiter;
|
public static Item component_limiter;
|
||||||
public static Item component_emitter;
|
public static Item component_emitter;
|
||||||
public static Item chlorine_pinwheel;
|
public static Item chlorine_pinwheel;
|
||||||
@ -744,7 +745,7 @@ public class ModItems {
|
|||||||
public static Item laser_crystal_digamma;
|
public static Item laser_crystal_digamma;
|
||||||
|
|
||||||
public static Item thermo_element;
|
public static Item thermo_element;
|
||||||
public static Item limiter;
|
//public static Item limiter;
|
||||||
|
|
||||||
public static Item pellet_rtg_depleted;
|
public static Item pellet_rtg_depleted;
|
||||||
|
|
||||||
@ -1593,14 +1594,14 @@ public class ModItems {
|
|||||||
public static Item ammo_stinger_rocket_bones;
|
public static Item ammo_stinger_rocket_bones;
|
||||||
|
|
||||||
public static Item gun_rpg;
|
public static Item gun_rpg;
|
||||||
public static Item gun_rpg_ammo;
|
//public static Item gun_rpg_ammo;
|
||||||
public static Item gun_karl;
|
public static Item gun_karl;
|
||||||
public static Item gun_panzerschreck;
|
public static Item gun_panzerschreck;
|
||||||
public static Item gun_quadro;
|
public static Item gun_quadro;
|
||||||
public static Item gun_hk69;
|
public static Item gun_hk69;
|
||||||
public static Item gun_stinger;
|
public static Item gun_stinger;
|
||||||
public static Item gun_skystinger;
|
public static Item gun_skystinger;
|
||||||
public static Item gun_stinger_ammo;
|
//public static Item gun_stinger_ammo;
|
||||||
public static Item gun_revolver;
|
public static Item gun_revolver;
|
||||||
public static Item gun_revolver_saturnite;
|
public static Item gun_revolver_saturnite;
|
||||||
public static Item gun_revolver_ammo;
|
public static Item gun_revolver_ammo;
|
||||||
@ -1619,40 +1620,40 @@ public class ModItems {
|
|||||||
public static Item gun_revolver_nightmare2;
|
public static Item gun_revolver_nightmare2;
|
||||||
public static Item gun_revolver_nightmare2_ammo;
|
public static Item gun_revolver_nightmare2_ammo;
|
||||||
public static Item gun_revolver_pip;
|
public static Item gun_revolver_pip;
|
||||||
public static Item gun_revolver_pip_ammo;
|
//public static Item gun_revolver_pip_ammo;
|
||||||
public static Item gun_revolver_nopip;
|
public static Item gun_revolver_nopip;
|
||||||
public static Item gun_revolver_blackjack;
|
public static Item gun_revolver_blackjack;
|
||||||
public static Item gun_revolver_silver;
|
public static Item gun_revolver_silver;
|
||||||
public static Item gun_revolver_red;
|
public static Item gun_revolver_red;
|
||||||
public static Item gun_revolver_nopip_ammo;
|
//public static Item gun_revolver_nopip_ammo;
|
||||||
public static Item gun_deagle;
|
public static Item gun_deagle;
|
||||||
public static Item gun_flechette;
|
public static Item gun_flechette;
|
||||||
public static Item gun_ar15;
|
public static Item gun_ar15;
|
||||||
public static Item gun_calamity;
|
public static Item gun_calamity;
|
||||||
public static Item gun_calamity_dual;
|
public static Item gun_calamity_dual;
|
||||||
public static Item gun_calamity_ammo;
|
//public static Item gun_calamity_ammo;
|
||||||
public static Item gun_minigun;
|
public static Item gun_minigun;
|
||||||
public static Item gun_avenger;
|
public static Item gun_avenger;
|
||||||
public static Item gun_lacunae;
|
public static Item gun_lacunae;
|
||||||
public static Item gun_lacunae_ammo;
|
//public static Item gun_lacunae_ammo;
|
||||||
public static Item gun_folly;
|
public static Item gun_folly;
|
||||||
public static Item gun_fatman;
|
public static Item gun_fatman;
|
||||||
public static Item gun_proto;
|
public static Item gun_proto;
|
||||||
public static Item gun_fatman_ammo;
|
//public static Item gun_fatman_ammo;
|
||||||
public static Item gun_mirv;
|
public static Item gun_mirv;
|
||||||
public static Item gun_mirv_ammo;
|
//public static Item gun_mirv_ammo;
|
||||||
public static Item gun_bf;
|
public static Item gun_bf;
|
||||||
public static Item gun_bf_ammo;
|
public static Item gun_bf_ammo;
|
||||||
public static Item gun_mp40;
|
public static Item gun_mp40;
|
||||||
public static Item gun_mp40_ammo;
|
//public static Item gun_mp40_ammo;
|
||||||
public static Item gun_thompson;
|
public static Item gun_thompson;
|
||||||
public static Item gun_uzi;
|
public static Item gun_uzi;
|
||||||
public static Item gun_uzi_silencer;
|
public static Item gun_uzi_silencer;
|
||||||
public static Item gun_uzi_saturnite;
|
public static Item gun_uzi_saturnite;
|
||||||
public static Item gun_uzi_saturnite_silencer;
|
public static Item gun_uzi_saturnite_silencer;
|
||||||
public static Item gun_uzi_ammo;
|
//public static Item gun_uzi_ammo;
|
||||||
public static Item gun_uboinik;
|
public static Item gun_uboinik;
|
||||||
public static Item gun_uboinik_ammo;
|
//public static Item gun_uboinik_ammo;
|
||||||
public static Item gun_spas12;
|
public static Item gun_spas12;
|
||||||
public static Item gun_supershotgun;
|
public static Item gun_supershotgun;
|
||||||
public static Item gun_ks23;
|
public static Item gun_ks23;
|
||||||
@ -1660,11 +1661,11 @@ public class ModItems {
|
|||||||
public static Item gun_lever_action;
|
public static Item gun_lever_action;
|
||||||
public static Item gun_lever_action_dark;
|
public static Item gun_lever_action_dark;
|
||||||
public static Item gun_lever_action_sonata;
|
public static Item gun_lever_action_sonata;
|
||||||
public static Item gun_lever_action_ammo;
|
//public static Item gun_lever_action_ammo;
|
||||||
public static Item gun_bolt_action;
|
public static Item gun_bolt_action;
|
||||||
public static Item gun_bolt_action_green;
|
public static Item gun_bolt_action_green;
|
||||||
public static Item gun_bolt_action_saturnite;
|
public static Item gun_bolt_action_saturnite;
|
||||||
public static Item gun_bolt_action_ammo;
|
//public static Item gun_bolt_action_ammo;
|
||||||
public static Item gun_mymy;
|
public static Item gun_mymy;
|
||||||
public static Item gun_b92;
|
public static Item gun_b92;
|
||||||
public static Item gun_b92_ammo;
|
public static Item gun_b92_ammo;
|
||||||
@ -1950,6 +1951,8 @@ public class ModItems {
|
|||||||
public static Item upgrade_screm;
|
public static Item upgrade_screm;
|
||||||
public static Item upgrade_gc_speed;
|
public static Item upgrade_gc_speed;
|
||||||
public static Item upgrade_5g;
|
public static Item upgrade_5g;
|
||||||
|
public static Item upgrade_stack;
|
||||||
|
public static Item upgrade_ejector;
|
||||||
|
|
||||||
public static Item ingot_euphemium;
|
public static Item ingot_euphemium;
|
||||||
public static Item nugget_euphemium;
|
public static Item nugget_euphemium;
|
||||||
@ -2375,7 +2378,7 @@ public class ModItems {
|
|||||||
public static Item remote;
|
public static Item remote;
|
||||||
public static Item turret_control;
|
public static Item turret_control;
|
||||||
public static Item turret_chip;
|
public static Item turret_chip;
|
||||||
public static Item turret_biometry;
|
//public static Item turret_biometry;
|
||||||
|
|
||||||
public static Item spawn_chopper;
|
public static Item spawn_chopper;
|
||||||
public static Item spawn_worm;
|
public static Item spawn_worm;
|
||||||
@ -2681,6 +2684,7 @@ public class ModItems {
|
|||||||
sat_base = new Item().setUnlocalizedName("sat_base").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":sat_base");
|
sat_base = new Item().setUnlocalizedName("sat_base").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":sat_base");
|
||||||
thruster_nuclear = new Item().setUnlocalizedName("thruster_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thruster_nuclear");
|
thruster_nuclear = new Item().setUnlocalizedName("thruster_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thruster_nuclear");
|
||||||
safety_fuse = new Item().setUnlocalizedName("safety_fuse").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":safety_fuse");
|
safety_fuse = new Item().setUnlocalizedName("safety_fuse").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":safety_fuse");
|
||||||
|
part_generic = new ItemGenericPart().setUnlocalizedName("part_generic").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":part_generic");
|
||||||
|
|
||||||
undefined = new ItemCustomLore().setUnlocalizedName("undefined").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":undefined");
|
undefined = new ItemCustomLore().setUnlocalizedName("undefined").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":undefined");
|
||||||
|
|
||||||
@ -3013,12 +3017,12 @@ public class ModItems {
|
|||||||
motor = new Item().setUnlocalizedName("motor").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor");
|
motor = new Item().setUnlocalizedName("motor").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor");
|
||||||
motor_desh = new Item().setUnlocalizedName("motor_desh").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor_desh");
|
motor_desh = new Item().setUnlocalizedName("motor_desh").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor_desh");
|
||||||
centrifuge_element = new Item().setUnlocalizedName("centrifuge_element").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":centrifuge_element");
|
centrifuge_element = new Item().setUnlocalizedName("centrifuge_element").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":centrifuge_element");
|
||||||
centrifuge_tower = new Item().setUnlocalizedName("centrifuge_tower").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":centrifuge_tower");
|
//centrifuge_tower = new Item().setUnlocalizedName("centrifuge_tower").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":centrifuge_tower");
|
||||||
reactor_core = new Item().setUnlocalizedName("reactor_core").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":reactor_core");
|
reactor_core = new Item().setUnlocalizedName("reactor_core").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":reactor_core");
|
||||||
rtg_unit = new Item().setUnlocalizedName("rtg_unit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rtg_unit");
|
rtg_unit = new Item().setUnlocalizedName("rtg_unit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rtg_unit");
|
||||||
thermo_unit_empty = new Item().setUnlocalizedName("thermo_unit_empty").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thermo_unit_empty");
|
//thermo_unit_empty = new Item().setUnlocalizedName("thermo_unit_empty").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thermo_unit_empty");
|
||||||
thermo_unit_endo= new Item().setUnlocalizedName("thermo_unit_endo").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thermo_unit_endo");
|
//thermo_unit_endo= new Item().setUnlocalizedName("thermo_unit_endo").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thermo_unit_endo");
|
||||||
thermo_unit_exo = new Item().setUnlocalizedName("thermo_unit_exo").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thermo_unit_exo");
|
//thermo_unit_exo = new Item().setUnlocalizedName("thermo_unit_exo").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thermo_unit_exo");
|
||||||
levitation_unit = new Item().setUnlocalizedName("levitation_unit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":levitation_unit");
|
levitation_unit = new Item().setUnlocalizedName("levitation_unit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":levitation_unit");
|
||||||
wire_aluminium = new Item().setUnlocalizedName("wire_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_aluminium");
|
wire_aluminium = new Item().setUnlocalizedName("wire_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_aluminium");
|
||||||
wire_copper = new Item().setUnlocalizedName("wire_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_copper");
|
wire_copper = new Item().setUnlocalizedName("wire_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_copper");
|
||||||
@ -3028,9 +3032,9 @@ public class ModItems {
|
|||||||
coil_magnetized_tungsten = new Item().setUnlocalizedName("coil_magnetized_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_magnetized_tungsten");
|
coil_magnetized_tungsten = new Item().setUnlocalizedName("coil_magnetized_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_magnetized_tungsten");
|
||||||
coil_gold = new Item().setUnlocalizedName("coil_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold");
|
coil_gold = new Item().setUnlocalizedName("coil_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold");
|
||||||
coil_gold_torus = new Item().setUnlocalizedName("coil_gold_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold_torus");
|
coil_gold_torus = new Item().setUnlocalizedName("coil_gold_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold_torus");
|
||||||
magnet_dee = new Item().setUnlocalizedName("magnet_dee").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":magnet_dee");
|
//magnet_dee = new Item().setUnlocalizedName("magnet_dee").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":magnet_dee");
|
||||||
magnet_circular = new Item().setUnlocalizedName("magnet_circular").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":magnet_circular");
|
magnet_circular = new Item().setUnlocalizedName("magnet_circular").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":magnet_circular");
|
||||||
cyclotron_tower = new Item().setUnlocalizedName("cyclotron_tower").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cyclotron_tower");
|
//cyclotron_tower = new Item().setUnlocalizedName("cyclotron_tower").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cyclotron_tower");
|
||||||
pellet_coal = new Item().setUnlocalizedName("pellet_coal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellet_coal");
|
pellet_coal = new Item().setUnlocalizedName("pellet_coal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellet_coal");
|
||||||
component_limiter = new Item().setUnlocalizedName("component_limiter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":component_limiter");
|
component_limiter = new Item().setUnlocalizedName("component_limiter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":component_limiter");
|
||||||
component_emitter = new Item().setUnlocalizedName("component_emitter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":component_emitter");
|
component_emitter = new Item().setUnlocalizedName("component_emitter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":component_emitter");
|
||||||
@ -3321,7 +3325,7 @@ public class ModItems {
|
|||||||
laser_crystal_digamma = new ItemFELCrystal(EnumWavelengths.DRX).setUnlocalizedName("laser_crystal_digamma").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_digamma");
|
laser_crystal_digamma = new ItemFELCrystal(EnumWavelengths.DRX).setUnlocalizedName("laser_crystal_digamma").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_digamma");
|
||||||
|
|
||||||
thermo_element = new Item().setUnlocalizedName("thermo_element").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":thermo_element");
|
thermo_element = new Item().setUnlocalizedName("thermo_element").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":thermo_element");
|
||||||
limiter = new Item().setUnlocalizedName("limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":limiter");
|
//limiter = new Item().setUnlocalizedName("limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":limiter");
|
||||||
|
|
||||||
antiknock = new Item().setUnlocalizedName("antiknock").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":antiknock");
|
antiknock = new Item().setUnlocalizedName("antiknock").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":antiknock");
|
||||||
|
|
||||||
@ -3671,7 +3675,7 @@ public class ModItems {
|
|||||||
.setStats(15)
|
.setStats(15)
|
||||||
.setFunction(EnumBurnFunc.LOG_TEN)
|
.setFunction(EnumBurnFunc.LOG_TEN)
|
||||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||||
.setHeat(0.5)
|
.setHeat(0.65) //0.5 is too much of a nerf in heat; pu239 buildup justifies it being on par with MEU ig
|
||||||
.setMeltingPoint(2865)
|
.setMeltingPoint(2865)
|
||||||
.setUnlocalizedName("rbmk_fuel_ueu").setTextureName(RefStrings.MODID + ":rbmk_fuel_ueu");
|
.setUnlocalizedName("rbmk_fuel_ueu").setTextureName(RefStrings.MODID + ":rbmk_fuel_ueu");
|
||||||
rbmk_fuel_meu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_meu)
|
rbmk_fuel_meu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_meu)
|
||||||
@ -3679,19 +3683,19 @@ public class ModItems {
|
|||||||
.setStats(20)
|
.setStats(20)
|
||||||
.setFunction(EnumBurnFunc.LOG_TEN)
|
.setFunction(EnumBurnFunc.LOG_TEN)
|
||||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||||
.setHeat(0.65) //0.75 was a bit too much
|
.setHeat(0.65) //0.75 was a bit too much...
|
||||||
.setMeltingPoint(2865)
|
.setMeltingPoint(2865)
|
||||||
.setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu");
|
.setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu");
|
||||||
rbmk_fuel_heu233 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu233)
|
rbmk_fuel_heu233 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu233)
|
||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
.setStats(50)
|
.setStats(27.5D)
|
||||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
.setFunction(EnumBurnFunc.LINEAR)
|
||||||
.setHeat(1.25D)
|
.setHeat(1.25D)
|
||||||
.setMeltingPoint(2865)
|
.setMeltingPoint(2865)
|
||||||
.setUnlocalizedName("rbmk_fuel_heu233").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu233");
|
.setUnlocalizedName("rbmk_fuel_heu233").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu233");
|
||||||
rbmk_fuel_heu235 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu235)
|
rbmk_fuel_heu235 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu235)
|
||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
.setStats(40)
|
.setStats(50) //Consistency with HEN; its critical mass is too high to justify a linear function
|
||||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||||
.setMeltingPoint(2865)
|
.setMeltingPoint(2865)
|
||||||
.setUnlocalizedName("rbmk_fuel_heu235").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu235");
|
.setUnlocalizedName("rbmk_fuel_heu235").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu235");
|
||||||
@ -3768,7 +3772,7 @@ public class ModItems {
|
|||||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
||||||
.setHeat(0.75)
|
.setHeat(0.75)
|
||||||
.setMeltingPoint(2800)
|
.setMeltingPoint(2800)
|
||||||
.setNeutronTypes(NType.FAST, NType.FAST)
|
.setNeutronTypes(NType.ANY, NType.FAST) //Build-up of Pu-239 leads to both speeds of neutrons grooving
|
||||||
.setUnlocalizedName("rbmk_fuel_men").setTextureName(RefStrings.MODID + ":rbmk_fuel_men");
|
.setUnlocalizedName("rbmk_fuel_men").setTextureName(RefStrings.MODID + ":rbmk_fuel_men");
|
||||||
rbmk_fuel_hen = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hen)
|
rbmk_fuel_hen = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hen)
|
||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
@ -3788,9 +3792,9 @@ public class ModItems {
|
|||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
.setStats(50)
|
.setStats(50)
|
||||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||||
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
|
|
||||||
.setHeat(1.25D)
|
.setHeat(1.25D)
|
||||||
.setMeltingPoint(2500)
|
.setMeltingPoint(2500)
|
||||||
|
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
|
||||||
.setUnlocalizedName("rbmk_fuel_les").setTextureName(RefStrings.MODID + ":rbmk_fuel_les");
|
.setUnlocalizedName("rbmk_fuel_les").setTextureName(RefStrings.MODID + ":rbmk_fuel_les");
|
||||||
rbmk_fuel_mes = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mes)
|
rbmk_fuel_mes = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mes)
|
||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
@ -3824,13 +3828,14 @@ public class ModItems {
|
|||||||
.setMeltingPoint(5211).setUnlocalizedName("rbmk_fuel_heaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_heaus");
|
.setMeltingPoint(5211).setUnlocalizedName("rbmk_fuel_heaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_heaus");
|
||||||
rbmk_fuel_po210be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_po210be)
|
rbmk_fuel_po210be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_po210be)
|
||||||
.setYield(25000000D)
|
.setYield(25000000D)
|
||||||
.setStats(15, 40)
|
.setStats(0D, 50)
|
||||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
.setFunction(EnumBurnFunc.PASSIVE)
|
||||||
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
.setDepletionFunction(EnumDepleteFunc.LINEAR)
|
||||||
.setXenon(0.0D, 50D)
|
.setXenon(0.0D, 50D)
|
||||||
.setHeat(0.1D)
|
.setHeat(0.1D)
|
||||||
.setDiffusion(0.05D)
|
.setDiffusion(0.05D)
|
||||||
.setMeltingPoint(1287)
|
.setMeltingPoint(1287)
|
||||||
|
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
|
||||||
.setUnlocalizedName("rbmk_fuel_po210be").setTextureName(RefStrings.MODID + ":rbmk_fuel_po210be");
|
.setUnlocalizedName("rbmk_fuel_po210be").setTextureName(RefStrings.MODID + ":rbmk_fuel_po210be");
|
||||||
rbmk_fuel_ra226be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_ra226be)
|
rbmk_fuel_ra226be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_ra226be)
|
||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
@ -3841,14 +3846,16 @@ public class ModItems {
|
|||||||
.setHeat(0.035D)
|
.setHeat(0.035D)
|
||||||
.setDiffusion(0.5D)
|
.setDiffusion(0.5D)
|
||||||
.setMeltingPoint(700)
|
.setMeltingPoint(700)
|
||||||
|
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
|
||||||
.setUnlocalizedName("rbmk_fuel_ra226be").setTextureName(RefStrings.MODID + ":rbmk_fuel_ra226be");
|
.setUnlocalizedName("rbmk_fuel_ra226be").setTextureName(RefStrings.MODID + ":rbmk_fuel_ra226be");
|
||||||
rbmk_fuel_pu238be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_pu238be)
|
rbmk_fuel_pu238be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_pu238be)
|
||||||
.setYield(50000000D)
|
.setYield(50000000D)
|
||||||
.setStats(10, 50)
|
.setStats(40, 40)
|
||||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||||
.setHeat(0.1D)
|
.setHeat(0.1D)
|
||||||
.setDiffusion(0.05D)
|
.setDiffusion(0.05D)
|
||||||
.setMeltingPoint(1287)
|
.setMeltingPoint(1287)
|
||||||
|
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
|
||||||
.setUnlocalizedName("rbmk_fuel_pu238be").setTextureName(RefStrings.MODID + ":rbmk_fuel_pu238be");
|
.setUnlocalizedName("rbmk_fuel_pu238be").setTextureName(RefStrings.MODID + ":rbmk_fuel_pu238be");
|
||||||
rbmk_fuel_balefire_gold = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire_gold)
|
rbmk_fuel_balefire_gold = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire_gold)
|
||||||
.setYield(100000000D)
|
.setYield(100000000D)
|
||||||
@ -4319,11 +4326,11 @@ public class ModItems {
|
|||||||
gun_karl = new ItemGunBase(GunRocketFactory.getKarlConfig()).setUnlocalizedName("gun_karl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_karl");
|
gun_karl = new ItemGunBase(GunRocketFactory.getKarlConfig()).setUnlocalizedName("gun_karl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_karl");
|
||||||
gun_panzerschreck = new ItemGunBase(GunRocketFactory.getPanzConfig()).setUnlocalizedName("gun_panzerschreck").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_panzerschreck");
|
gun_panzerschreck = new ItemGunBase(GunRocketFactory.getPanzConfig()).setUnlocalizedName("gun_panzerschreck").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_panzerschreck");
|
||||||
gun_quadro = new ItemGunBase(GunRocketFactory.getQuadroConfig()).setUnlocalizedName("gun_quadro").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_quadro");
|
gun_quadro = new ItemGunBase(GunRocketFactory.getQuadroConfig()).setUnlocalizedName("gun_quadro").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_quadro");
|
||||||
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
|
//gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
|
||||||
gun_hk69 = new ItemGunBase(GunGrenadeFactory.getHK69Config()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
|
gun_hk69 = new ItemGunBase(GunGrenadeFactory.getHK69Config()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
|
||||||
gun_stinger = new ItemGunBase(GunRocketHomingFactory.getStingerConfig()).setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
|
gun_stinger = new ItemGunBase(GunRocketHomingFactory.getStingerConfig()).setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
|
||||||
gun_skystinger = new ItemGunBase(GunRocketHomingFactory.getSkyStingerConfig()).setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
|
gun_skystinger = new ItemGunBase(GunRocketHomingFactory.getSkyStingerConfig()).setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
|
||||||
gun_stinger_ammo = new Item().setUnlocalizedName("gun_stinger_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_stinger_ammo");
|
//gun_stinger_ammo = new Item().setUnlocalizedName("gun_stinger_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_stinger_ammo");
|
||||||
gun_revolver_ammo = new Item().setUnlocalizedName("gun_revolver_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_ammo");
|
gun_revolver_ammo = new Item().setUnlocalizedName("gun_revolver_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_ammo");
|
||||||
gun_revolver = new ItemGunBase(Gun357MagnumFactory.getRevolverConfig()).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
|
gun_revolver = new ItemGunBase(Gun357MagnumFactory.getRevolverConfig()).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
|
||||||
gun_revolver_saturnite = new ItemGunBase(Gun357MagnumFactory.getRevolverSaturniteConfig()).setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite");
|
gun_revolver_saturnite = new ItemGunBase(Gun357MagnumFactory.getRevolverSaturniteConfig()).setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite");
|
||||||
@ -4341,9 +4348,9 @@ public class ModItems {
|
|||||||
gun_revolver_nightmare = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmareConfig()).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
|
gun_revolver_nightmare = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmareConfig()).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
|
||||||
gun_revolver_nightmare2_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare2_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2_ammo");
|
gun_revolver_nightmare2_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare2_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2_ammo");
|
||||||
gun_revolver_nightmare2 = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmare2Config()).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
|
gun_revolver_nightmare2 = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmare2Config()).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
|
||||||
gun_revolver_pip_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_pip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_pip_ammo");
|
//gun_revolver_pip_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_pip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_pip_ammo");
|
||||||
gun_revolver_pip = new ItemGunBase(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
gun_revolver_pip = new ItemGunBase(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
||||||
gun_revolver_nopip_ammo = new Item().setUnlocalizedName("gun_revolver_nopip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_nopip_ammo");
|
//gun_revolver_nopip_ammo = new Item().setUnlocalizedName("gun_revolver_nopip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_nopip_ammo");
|
||||||
gun_revolver_nopip = new ItemGunBase(Gun44MagnumFactory.getNovacConfig()).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
|
gun_revolver_nopip = new ItemGunBase(Gun44MagnumFactory.getNovacConfig()).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
|
||||||
gun_revolver_blackjack = new ItemGunBase(Gun44MagnumFactory.getBlackjackConfig()).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
|
gun_revolver_blackjack = new ItemGunBase(Gun44MagnumFactory.getBlackjackConfig()).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
|
||||||
gun_revolver_silver = new ItemGunBase(Gun44MagnumFactory.getSilverConfig()).setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
|
gun_revolver_silver = new ItemGunBase(Gun44MagnumFactory.getSilverConfig()).setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
|
||||||
@ -4351,40 +4358,40 @@ public class ModItems {
|
|||||||
gun_deagle = new ItemGunBase(Gun50AEFactory.getDeagleConfig()).setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_deagle");
|
gun_deagle = new ItemGunBase(Gun50AEFactory.getDeagleConfig()).setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_deagle");
|
||||||
gun_flechette = new ItemGunBase(Gun556mmFactory.getSPIWConfig(), Gun556mmFactory.getGLauncherConfig()).setUnlocalizedName("gun_flechette").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flechette");
|
gun_flechette = new ItemGunBase(Gun556mmFactory.getSPIWConfig(), Gun556mmFactory.getGLauncherConfig()).setUnlocalizedName("gun_flechette").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flechette");
|
||||||
gun_ar15 = new ItemGunBase(Gun50BMGFactory.getAR15Config()).setUnlocalizedName("gun_ar15").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_ar15");
|
gun_ar15 = new ItemGunBase(Gun50BMGFactory.getAR15Config()).setUnlocalizedName("gun_ar15").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_ar15");
|
||||||
gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
|
//gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
|
||||||
gun_calamity = new ItemGunBase(Gun50BMGFactory.getCalamityConfig()).setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
|
gun_calamity = new ItemGunBase(Gun50BMGFactory.getCalamityConfig()).setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
|
||||||
gun_calamity_dual = new ItemGunBase(Gun50BMGFactory.getSaddleConfig()).setUnlocalizedName("gun_calamity_dual").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity_dual");
|
gun_calamity_dual = new ItemGunBase(Gun50BMGFactory.getSaddleConfig()).setUnlocalizedName("gun_calamity_dual").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity_dual");
|
||||||
gun_lacunae_ammo = new ItemCustomLore().setUnlocalizedName("gun_lacunae_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lacunae_ammo");
|
//gun_lacunae_ammo = new ItemCustomLore().setUnlocalizedName("gun_lacunae_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lacunae_ammo");
|
||||||
gun_minigun = new ItemGunLacunae(Gun5mmFactory.get53Config()).setUnlocalizedName("gun_minigun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_minigun");
|
gun_minigun = new ItemGunLacunae(Gun5mmFactory.get53Config()).setUnlocalizedName("gun_minigun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_minigun");
|
||||||
gun_avenger = new ItemGunLacunae(Gun5mmFactory.get57Config()).setUnlocalizedName("gun_avenger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_avenger");
|
gun_avenger = new ItemGunLacunae(Gun5mmFactory.get57Config()).setUnlocalizedName("gun_avenger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_avenger");
|
||||||
gun_lacunae = new ItemGunLacunae(Gun5mmFactory.getLacunaeConfig()).setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
|
gun_lacunae = new ItemGunLacunae(Gun5mmFactory.getLacunaeConfig()).setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
|
||||||
gun_folly = new GunFolly().setUnlocalizedName("gun_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly");
|
gun_folly = new GunFolly().setUnlocalizedName("gun_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly");
|
||||||
gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_fatman_ammo");
|
//gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_fatman_ammo");
|
||||||
gun_fatman = new ItemGunBase(GunFatmanFactory.getFatmanConfig()).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
gun_fatman = new ItemGunBase(GunFatmanFactory.getFatmanConfig()).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||||
gun_proto = new ItemGunBase(GunFatmanFactory.getProtoConfig()).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
gun_proto = new ItemGunBase(GunFatmanFactory.getProtoConfig()).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||||
gun_mirv_ammo = new Item().setUnlocalizedName("gun_mirv_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mirv_ammo");
|
//gun_mirv_ammo = new Item().setUnlocalizedName("gun_mirv_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mirv_ammo");
|
||||||
gun_mirv = new ItemGunBase(GunFatmanFactory.getMIRVConfig()).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
|
gun_mirv = new ItemGunBase(GunFatmanFactory.getMIRVConfig()).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
|
||||||
gun_bf_ammo = new Item().setUnlocalizedName("gun_bf_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf_ammo");
|
gun_bf_ammo = new Item().setUnlocalizedName("gun_bf_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf_ammo");
|
||||||
gun_bf = new ItemGunBase(GunFatmanFactory.getBELConfig()).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
|
gun_bf = new ItemGunBase(GunFatmanFactory.getBELConfig()).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
|
||||||
gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mp40_ammo");
|
//gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mp40_ammo");
|
||||||
gun_mp40 = new ItemGunBase(Gun9mmFactory.getMP40Config()).setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
|
gun_mp40 = new ItemGunBase(Gun9mmFactory.getMP40Config()).setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
|
||||||
gun_thompson = new ItemGunBase(Gun9mmFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
|
gun_thompson = new ItemGunBase(Gun9mmFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
|
||||||
gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_ammo");
|
//gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_ammo");
|
||||||
gun_uzi = new ItemGunBase(Gun22LRFactory.getUziConfig()).setUnlocalizedName("gun_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi");
|
gun_uzi = new ItemGunBase(Gun22LRFactory.getUziConfig()).setUnlocalizedName("gun_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi");
|
||||||
gun_uzi_silencer = new ItemGunBase(Gun22LRFactory.getUziConfig().silenced()).setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
|
gun_uzi_silencer = new ItemGunBase(Gun22LRFactory.getUziConfig().silenced()).setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
|
||||||
gun_uzi_saturnite = new ItemGunBase(Gun22LRFactory.getSaturniteConfig()).setUnlocalizedName("gun_uzi_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite");
|
gun_uzi_saturnite = new ItemGunBase(Gun22LRFactory.getSaturniteConfig()).setUnlocalizedName("gun_uzi_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite");
|
||||||
gun_uzi_saturnite_silencer = new ItemGunBase(Gun22LRFactory.getSaturniteConfig().silenced()).setUnlocalizedName("gun_uzi_saturnite_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite_silencer");
|
gun_uzi_saturnite_silencer = new ItemGunBase(Gun22LRFactory.getSaturniteConfig().silenced()).setUnlocalizedName("gun_uzi_saturnite_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite_silencer");
|
||||||
gun_uboinik_ammo = new Item().setUnlocalizedName("gun_uboinik_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik_ammo");
|
//gun_uboinik_ammo = new Item().setUnlocalizedName("gun_uboinik_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik_ammo");
|
||||||
gun_uboinik = new ItemGunBase(Gun12GaugeFactory.getUboinikConfig()).setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
gun_uboinik = new ItemGunBase(Gun12GaugeFactory.getUboinikConfig()).setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||||
gun_spas12 = new ItemGunBase(Gun12GaugeFactory.getSpas12Config(), Gun12GaugeFactory.getSpas12AltConfig()).setUnlocalizedName("gun_spas12").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
|
gun_spas12 = new ItemGunBase(Gun12GaugeFactory.getSpas12Config(), Gun12GaugeFactory.getSpas12AltConfig()).setUnlocalizedName("gun_spas12").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
|
||||||
gun_supershotgun = new ItemGunShotty(Gun12GaugeFactory.getShottyConfig()).setUnlocalizedName("gun_supershotgun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
gun_supershotgun = new ItemGunShotty(Gun12GaugeFactory.getShottyConfig()).setUnlocalizedName("gun_supershotgun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||||
gun_ks23 = new ItemGunBase(Gun4GaugeFactory.getKS23Config()).setUnlocalizedName("gun_ks23").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
gun_ks23 = new ItemGunBase(Gun4GaugeFactory.getKS23Config()).setUnlocalizedName("gun_ks23").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||||
gun_sauer = new ItemGunBase(Gun4GaugeFactory.getSauerConfig()).setUnlocalizedName("gun_sauer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
gun_sauer = new ItemGunBase(Gun4GaugeFactory.getSauerConfig()).setUnlocalizedName("gun_sauer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||||
gun_lever_action_ammo = new Item().setUnlocalizedName("gun_lever_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action_ammo");
|
//gun_lever_action_ammo = new Item().setUnlocalizedName("gun_lever_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action_ammo");
|
||||||
gun_lever_action = new ItemGunBase(Gun20GaugeFactory.getMareConfig()).setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
|
gun_lever_action = new ItemGunBase(Gun20GaugeFactory.getMareConfig()).setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
|
||||||
gun_lever_action_dark = new ItemGunBase(Gun20GaugeFactory.getMareDarkConfig()).setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
|
gun_lever_action_dark = new ItemGunBase(Gun20GaugeFactory.getMareDarkConfig()).setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
|
||||||
gun_lever_action_sonata = new GunLeverActionS().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
|
gun_lever_action_sonata = new GunLeverActionS().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
|
||||||
gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
|
//gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
|
||||||
gun_bolt_action = new ItemGunBase(Gun20GaugeFactory.getBoltConfig()).setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
|
gun_bolt_action = new ItemGunBase(Gun20GaugeFactory.getBoltConfig()).setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
|
||||||
gun_bolt_action_green = new ItemGunBase(Gun20GaugeFactory.getBoltGreenConfig()).setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
|
gun_bolt_action_green = new ItemGunBase(Gun20GaugeFactory.getBoltGreenConfig()).setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
|
||||||
gun_bolt_action_saturnite = new ItemGunBase(Gun20GaugeFactory.getBoltSaturniteConfig()).setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
|
gun_bolt_action_saturnite = new ItemGunBase(Gun20GaugeFactory.getBoltSaturniteConfig()).setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
|
||||||
@ -4692,6 +4699,8 @@ public class ModItems {
|
|||||||
upgrade_screm = new ItemMachineUpgrade().setUnlocalizedName("upgrade_screm").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_screm");
|
upgrade_screm = new ItemMachineUpgrade().setUnlocalizedName("upgrade_screm").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_screm");
|
||||||
upgrade_gc_speed = new ItemMachineUpgrade().setUnlocalizedName("upgrade_gc_speed").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_gc_speed");
|
upgrade_gc_speed = new ItemMachineUpgrade().setUnlocalizedName("upgrade_gc_speed").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_gc_speed");
|
||||||
upgrade_5g = new ItemMachineUpgrade().setUnlocalizedName("upgrade_5g").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_5g");
|
upgrade_5g = new ItemMachineUpgrade().setUnlocalizedName("upgrade_5g").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_5g");
|
||||||
|
upgrade_stack = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_stack").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_stack");
|
||||||
|
upgrade_ejector = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_ejector").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_ejector");
|
||||||
|
|
||||||
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
|
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
|
||||||
wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
|
wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
|
||||||
@ -4785,7 +4794,7 @@ public class ModItems {
|
|||||||
oil_detector = new ItemOilDetector().setUnlocalizedName("oil_detector").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":oil_detector");
|
oil_detector = new ItemOilDetector().setUnlocalizedName("oil_detector").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":oil_detector");
|
||||||
turret_control = new ItemTurretControl().setUnlocalizedName("turret_control").setFull3D().setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_control");
|
turret_control = new ItemTurretControl().setUnlocalizedName("turret_control").setFull3D().setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_control");
|
||||||
turret_chip = new ItemTurretChip().setUnlocalizedName("turret_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_chip");
|
turret_chip = new ItemTurretChip().setUnlocalizedName("turret_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_chip");
|
||||||
turret_biometry = new ItemTurretBiometry().setUnlocalizedName("turret_biometry").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":rei_scanner");
|
//turret_biometry = new ItemTurretBiometry().setUnlocalizedName("turret_biometry").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":rei_scanner");
|
||||||
dosimeter = new ItemDosimeter().setUnlocalizedName("dosimeter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":dosimeter");
|
dosimeter = new ItemDosimeter().setUnlocalizedName("dosimeter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":dosimeter");
|
||||||
geiger_counter = new ItemGeigerCounter().setUnlocalizedName("geiger_counter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":geiger_counter");
|
geiger_counter = new ItemGeigerCounter().setUnlocalizedName("geiger_counter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":geiger_counter");
|
||||||
digamma_diagnostic = new ItemDigammaDiagnostic().setUnlocalizedName("digamma_diagnostic").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":digamma_diagnostic");
|
digamma_diagnostic = new ItemDigammaDiagnostic().setUnlocalizedName("digamma_diagnostic").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":digamma_diagnostic");
|
||||||
@ -6174,15 +6183,15 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(motor, motor.getUnlocalizedName());
|
GameRegistry.registerItem(motor, motor.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(motor_desh, motor_desh.getUnlocalizedName());
|
GameRegistry.registerItem(motor_desh, motor_desh.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(centrifuge_element, centrifuge_element.getUnlocalizedName());
|
GameRegistry.registerItem(centrifuge_element, centrifuge_element.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(centrifuge_tower, centrifuge_tower.getUnlocalizedName());
|
//GameRegistry.registerItem(centrifuge_tower, centrifuge_tower.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(magnet_dee, magnet_dee.getUnlocalizedName());
|
//GameRegistry.registerItem(magnet_dee, magnet_dee.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(magnet_circular, magnet_circular.getUnlocalizedName());
|
GameRegistry.registerItem(magnet_circular, magnet_circular.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(cyclotron_tower, cyclotron_tower.getUnlocalizedName());
|
//GameRegistry.registerItem(cyclotron_tower, cyclotron_tower.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(reactor_core, reactor_core.getUnlocalizedName());
|
GameRegistry.registerItem(reactor_core, reactor_core.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(rtg_unit, rtg_unit.getUnlocalizedName());
|
GameRegistry.registerItem(rtg_unit, rtg_unit.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(thermo_unit_empty, thermo_unit_empty.getUnlocalizedName());
|
//GameRegistry.registerItem(thermo_unit_empty, thermo_unit_empty.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(thermo_unit_endo, thermo_unit_endo.getUnlocalizedName());
|
//GameRegistry.registerItem(thermo_unit_endo, thermo_unit_endo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(thermo_unit_exo, thermo_unit_exo.getUnlocalizedName());
|
//GameRegistry.registerItem(thermo_unit_exo, thermo_unit_exo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(levitation_unit, levitation_unit.getUnlocalizedName());
|
GameRegistry.registerItem(levitation_unit, levitation_unit.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(pipes_steel, pipes_steel.getUnlocalizedName());
|
GameRegistry.registerItem(pipes_steel, pipes_steel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(drill_titanium, drill_titanium.getUnlocalizedName());
|
GameRegistry.registerItem(drill_titanium, drill_titanium.getUnlocalizedName());
|
||||||
@ -6190,6 +6199,7 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(chlorine_pinwheel, chlorine_pinwheel.getUnlocalizedName());
|
GameRegistry.registerItem(chlorine_pinwheel, chlorine_pinwheel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ring_starmetal, ring_starmetal.getUnlocalizedName());
|
GameRegistry.registerItem(ring_starmetal, ring_starmetal.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(deuterium_filter, deuterium_filter.getUnlocalizedName());
|
GameRegistry.registerItem(deuterium_filter, deuterium_filter.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(part_generic, part_generic.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(parts_legendary, parts_legendary.getUnlocalizedName());
|
GameRegistry.registerItem(parts_legendary, parts_legendary.getUnlocalizedName());
|
||||||
|
|
||||||
//Plant Products
|
//Plant Products
|
||||||
@ -6625,6 +6635,8 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(upgrade_screm, upgrade_screm.getUnlocalizedName());
|
GameRegistry.registerItem(upgrade_screm, upgrade_screm.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(upgrade_gc_speed, upgrade_gc_speed.getUnlocalizedName());
|
GameRegistry.registerItem(upgrade_gc_speed, upgrade_gc_speed.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(upgrade_5g, upgrade_5g.getUnlocalizedName());
|
GameRegistry.registerItem(upgrade_5g, upgrade_5g.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(upgrade_stack, upgrade_stack.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(upgrade_ejector, upgrade_ejector.getUnlocalizedName());
|
||||||
|
|
||||||
//Machine Templates
|
//Machine Templates
|
||||||
GameRegistry.registerItem(siren_track, siren_track.getUnlocalizedName());
|
GameRegistry.registerItem(siren_track, siren_track.getUnlocalizedName());
|
||||||
@ -6720,7 +6732,7 @@ public class ModItems {
|
|||||||
|
|
||||||
//Generator Stuff
|
//Generator Stuff
|
||||||
GameRegistry.registerItem(thermo_element, thermo_element.getUnlocalizedName());
|
GameRegistry.registerItem(thermo_element, thermo_element.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(limiter, limiter.getUnlocalizedName());
|
//GameRegistry.registerItem(limiter, limiter.getUnlocalizedName());
|
||||||
|
|
||||||
//AMS Components
|
//AMS Components
|
||||||
GameRegistry.registerItem(ams_focus_blank, ams_focus_blank.getUnlocalizedName());
|
GameRegistry.registerItem(ams_focus_blank, ams_focus_blank.getUnlocalizedName());
|
||||||
@ -6914,7 +6926,7 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(designator_manual, designator_manual.getUnlocalizedName());
|
GameRegistry.registerItem(designator_manual, designator_manual.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(turret_control, turret_control.getUnlocalizedName());
|
GameRegistry.registerItem(turret_control, turret_control.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(turret_chip, turret_chip.getUnlocalizedName());
|
GameRegistry.registerItem(turret_chip, turret_chip.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(turret_biometry, turret_biometry.getUnlocalizedName());
|
//GameRegistry.registerItem(turret_biometry, turret_biometry.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(linker, linker.getUnlocalizedName());
|
GameRegistry.registerItem(linker, linker.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(reactor_sensor, reactor_sensor.getUnlocalizedName());
|
GameRegistry.registerItem(reactor_sensor, reactor_sensor.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(oil_detector, oil_detector.getUnlocalizedName());
|
GameRegistry.registerItem(oil_detector, oil_detector.getUnlocalizedName());
|
||||||
@ -7216,21 +7228,21 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(gun_revolver_nightmare_ammo, gun_revolver_nightmare_ammo.getUnlocalizedName());
|
GameRegistry.registerItem(gun_revolver_nightmare_ammo, gun_revolver_nightmare_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ammo_357_desh, ammo_357_desh.getUnlocalizedName());
|
GameRegistry.registerItem(ammo_357_desh, ammo_357_desh.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_revolver_nightmare2_ammo, gun_revolver_nightmare2_ammo.getUnlocalizedName());
|
GameRegistry.registerItem(gun_revolver_nightmare2_ammo, gun_revolver_nightmare2_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_revolver_pip_ammo, gun_revolver_pip_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_revolver_pip_ammo, gun_revolver_pip_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_revolver_nopip_ammo, gun_revolver_nopip_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_revolver_nopip_ammo, gun_revolver_nopip_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_calamity_ammo, gun_calamity_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_calamity_ammo, gun_calamity_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_lacunae_ammo, gun_lacunae_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_lacunae_ammo, gun_lacunae_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName());
|
GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_rpg_ammo, gun_rpg_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_rpg_ammo, gun_rpg_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_stinger_ammo, gun_stinger_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_stinger_ammo, gun_stinger_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_fatman_ammo, gun_fatman_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_fatman_ammo, gun_fatman_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_mirv_ammo, gun_mirv_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_mirv_ammo, gun_mirv_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_bf_ammo, gun_bf_ammo.getUnlocalizedName());
|
GameRegistry.registerItem(gun_bf_ammo, gun_bf_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_mp40_ammo, gun_mp40_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_mp40_ammo, gun_mp40_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_uzi_ammo, gun_uzi_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_uzi_ammo, gun_uzi_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_uboinik_ammo, gun_uboinik_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_uboinik_ammo, gun_uboinik_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_lever_action_ammo, gun_lever_action_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_lever_action_ammo, gun_lever_action_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_bolt_action_ammo, gun_bolt_action_ammo.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_bolt_action_ammo, gun_bolt_action_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_xvl1456_ammo, gun_xvl1456_ammo.getUnlocalizedName());
|
GameRegistry.registerItem(gun_xvl1456_ammo, gun_xvl1456_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_osipr_ammo, gun_osipr_ammo.getUnlocalizedName());
|
GameRegistry.registerItem(gun_osipr_ammo, gun_osipr_ammo.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_osipr_ammo2, gun_osipr_ammo2.getUnlocalizedName());
|
GameRegistry.registerItem(gun_osipr_ammo2, gun_osipr_ammo2.getUnlocalizedName());
|
||||||
|
|||||||
@ -141,7 +141,9 @@ public class ArmorDNT extends ArmorFSBPowered {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.worldObj.playSoundAtEntity(e, "random.break", 5F, 1.0F + e.getRNG().nextFloat() * 0.5F);
|
//e.worldObj.playSoundAtEntity(e, "random.break", 5F, 1.0F + e.getRNG().nextFloat() * 0.5F);
|
||||||
|
HbmPlayerProps.plink(player, "random.break", 0.5F, 1.0F + e.getRNG().nextFloat() * 0.5F);
|
||||||
|
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,8 +3,6 @@ package com.hbm.items.machine;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.items.special.ItemNuclearWaste;
|
import com.hbm.items.special.ItemNuclearWaste;
|
||||||
import com.hbm.lib.Library;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -14,7 +12,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
public class ItemDepletedFuel extends ItemNuclearWaste {
|
public class ItemDepletedFuel extends ItemNuclearWaste {
|
||||||
|
|
||||||
|
|||||||
67
src/main/java/com/hbm/items/machine/ItemMetaUpgrade.java
Normal file
67
src/main/java/com/hbm/items/machine/ItemMetaUpgrade.java
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
package com.hbm.items.machine;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
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.util.IIcon;
|
||||||
|
|
||||||
|
public class ItemMetaUpgrade extends ItemMachineUpgrade {
|
||||||
|
|
||||||
|
protected int levels;
|
||||||
|
|
||||||
|
public ItemMetaUpgrade(int levels) {
|
||||||
|
super();
|
||||||
|
this.setMaxDamage(0);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
|
this.levels = levels;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemMetaUpgrade(UpgradeType type, int levels) {
|
||||||
|
super(type);
|
||||||
|
this.setMaxDamage(0);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
|
this.levels = levels;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||||
|
|
||||||
|
for(int i = 0; i < this.levels; i++) {
|
||||||
|
list.add(new ItemStack(item, 1, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IIcon[] icons;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister reg) {
|
||||||
|
|
||||||
|
this.icons = new IIcon[levels];
|
||||||
|
|
||||||
|
for(int i = 0; i < levels; i++) {
|
||||||
|
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + (i + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIconFromDamage(int meta) {
|
||||||
|
if(meta >= 0 && meta < levels) {
|
||||||
|
return this.icons[meta];
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.icons[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
|
return super.getUnlocalizedName() + "_" + (stack.getItemDamage() + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -219,7 +219,7 @@ public class ItemRBMKRod extends Item {
|
|||||||
PASSIVE(EnumChatFormatting.DARK_GREEN + "SAFE / PASSIVE"), //const, no reactivity
|
PASSIVE(EnumChatFormatting.DARK_GREEN + "SAFE / PASSIVE"), //const, no reactivity
|
||||||
LOG_TEN(EnumChatFormatting.YELLOW + "MEDIUM / LOGARITHMIC"), //log10(x + 1) * reactivity * 50
|
LOG_TEN(EnumChatFormatting.YELLOW + "MEDIUM / LOGARITHMIC"), //log10(x + 1) * reactivity * 50
|
||||||
PLATEU(EnumChatFormatting.GREEN + "SAFE / EULER"), //(1 - e^(-x/25)) * reactivity * 100
|
PLATEU(EnumChatFormatting.GREEN + "SAFE / EULER"), //(1 - e^(-x/25)) * reactivity * 100
|
||||||
ARCH(EnumChatFormatting.YELLOW + "MEDIUM / NEGATIVE-QUADRATIC"), //x-(x²/1000) * reactivity
|
ARCH(EnumChatFormatting.RED + "DANGEROUS / NEGATIVE-QUADRATIC"), //x-(x²/1000) * reactivity
|
||||||
SIGMOID(EnumChatFormatting.GREEN + "SAFE / SIGMOID"), //100 / (1 + e^(-(x - 50) / 10)) <- tiny amount of reactivity at x=0 !
|
SIGMOID(EnumChatFormatting.GREEN + "SAFE / SIGMOID"), //100 / (1 + e^(-(x - 50) / 10)) <- tiny amount of reactivity at x=0 !
|
||||||
SQUARE_ROOT(EnumChatFormatting.YELLOW + "MEDIUM / SQUARE ROOT"), //sqrt(x) * 10 * reactivity
|
SQUARE_ROOT(EnumChatFormatting.YELLOW + "MEDIUM / SQUARE ROOT"), //sqrt(x) * 10 * reactivity
|
||||||
LINEAR(EnumChatFormatting.RED + "DANGEROUS / LINEAR"), //x * reactivity
|
LINEAR(EnumChatFormatting.RED + "DANGEROUS / LINEAR"), //x * reactivity
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.hbm.items.special;
|
package com.hbm.items.special;
|
||||||
|
|
||||||
import com.hbm.entity.item.EntitytemWaste;
|
import com.hbm.entity.item.EntityItemWaste;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -22,12 +22,14 @@ public class ItemNuclearWaste extends Item {
|
|||||||
@Override
|
@Override
|
||||||
public Entity createEntity(World world, Entity entityItem, ItemStack itemstack) {
|
public Entity createEntity(World world, Entity entityItem, ItemStack itemstack) {
|
||||||
|
|
||||||
EntitytemWaste entity = new EntitytemWaste(world, entityItem.posX, entityItem.posY, entityItem.posZ, itemstack);
|
EntityItemWaste entity = new EntityItemWaste(world, entityItem.posX, entityItem.posY, entityItem.posZ, itemstack);
|
||||||
entity.motionX = entityItem.motionX;
|
entity.motionX = entityItem.motionX;
|
||||||
entity.motionY = entityItem.motionY;
|
entity.motionY = entityItem.motionY;
|
||||||
entity.motionZ = entityItem.motionZ;
|
entity.motionZ = entityItem.motionZ;
|
||||||
entity.delayBeforeCanPickup = 10;
|
entity.delayBeforeCanPickup = 10;
|
||||||
|
|
||||||
|
entityItem.setDead();
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -214,7 +214,6 @@ public class ItemStarterKit extends Item {
|
|||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.limiter, 1));
|
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_coal_off, 3));
|
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_coal_off, 3));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_diesel, 2));
|
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_diesel, 2));
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
package com.hbm.items.tool;
|
package com.hbm.items.tool;
|
||||||
|
|
||||||
|
import com.hbm.blocks.machine.ReactorZirnox;
|
||||||
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKBase;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKBase;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -15,9 +18,11 @@ public class ItemDyatlov extends Item {
|
|||||||
|
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
|
|
||||||
if(world.getBlock(x, y, z) instanceof RBMKBase) {
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
RBMKBase rbmk = (RBMKBase)world.getBlock(x, y, z);
|
if(block instanceof RBMKBase) {
|
||||||
|
|
||||||
|
RBMKBase rbmk = (RBMKBase)block;
|
||||||
|
|
||||||
int[] pos = rbmk.findCore(world, x, y, z);
|
int[] pos = rbmk.findCore(world, x, y, z);
|
||||||
|
|
||||||
@ -32,6 +37,22 @@ public class ItemDyatlov extends Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(block instanceof ReactorZirnox) {
|
||||||
|
|
||||||
|
ReactorZirnox zirnox = (ReactorZirnox)block;
|
||||||
|
|
||||||
|
int[] pos = zirnox.findCore(world, x, y, z);
|
||||||
|
|
||||||
|
if(pos != null) {
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
|
||||||
|
if(te instanceof TileEntityReactorZirnox) {
|
||||||
|
((TileEntityReactorZirnox)te).heat = 200000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.items.tool;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.entity.effect.EntityNukeTorex;
|
||||||
import com.hbm.entity.mob.siege.EntitySiegeTunneler;
|
import com.hbm.entity.mob.siege.EntitySiegeTunneler;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemKitCustom;
|
import com.hbm.items.special.ItemKitCustom;
|
||||||
@ -30,6 +31,10 @@ public class ItemWandD extends Item {
|
|||||||
|
|
||||||
if(pos != null) {
|
if(pos != null) {
|
||||||
|
|
||||||
|
EntityNukeTorex torex = new EntityNukeTorex(world);
|
||||||
|
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
|
||||||
|
world.spawnEntityInWorld(torex);
|
||||||
|
|
||||||
/*EntitySiegeTunneler tunneler = new EntitySiegeTunneler(world);
|
/*EntitySiegeTunneler tunneler = new EntitySiegeTunneler(world);
|
||||||
tunneler.setPosition(pos.blockX, pos.blockY + 1, pos.blockZ);
|
tunneler.setPosition(pos.blockX, pos.blockY + 1, pos.blockZ);
|
||||||
tunneler.onSpawnWithEgg(null);
|
tunneler.onSpawnWithEgg(null);
|
||||||
@ -37,7 +42,7 @@ public class ItemWandD extends Item {
|
|||||||
|
|
||||||
//CellularDungeonFactory.meteor.generate(world, x, y, z, world.rand);
|
//CellularDungeonFactory.meteor.generate(world, x, y, z, world.rand);
|
||||||
|
|
||||||
int r = 5;
|
/*int r = 5;
|
||||||
|
|
||||||
int x = pos.blockX;
|
int x = pos.blockX;
|
||||||
int y = pos.blockY;
|
int y = pos.blockY;
|
||||||
@ -49,7 +54,7 @@ public class ItemWandD extends Item {
|
|||||||
world.getBlock(i, j, k).updateTick(world, i, j, k, world.rand);
|
world.getBlock(i, j, k).updateTick(world, i, j, k, world.rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//new Bunker().generate(world, world.rand, x, y, z);
|
//new Bunker().generate(world, world.rand, x, y, z);
|
||||||
|
|
||||||
|
|||||||
@ -1,128 +0,0 @@
|
|||||||
package com.hbm.items.weapon;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import com.hbm.entity.projectile.EntityBullet;
|
|
||||||
import com.hbm.items.ModItems;
|
|
||||||
|
|
||||||
import net.minecraft.enchantment.Enchantment;
|
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.EnumAction;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
|
||||||
|
|
||||||
public class GunCalamity extends Item {
|
|
||||||
|
|
||||||
Random rand = new Random();
|
|
||||||
|
|
||||||
public GunCalamity()
|
|
||||||
{
|
|
||||||
this.maxStackSize = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
|
||||||
return EnumAction.bow;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
|
||||||
return 72000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
|
|
||||||
new ArrowNockEvent(p_77659_3_, p_77659_1_);
|
|
||||||
{
|
|
||||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
|
||||||
}
|
|
||||||
|
|
||||||
return p_77659_1_;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
|
|
||||||
{
|
|
||||||
World world = player.worldObj;
|
|
||||||
|
|
||||||
boolean flag = player.capabilities.isCreativeMode
|
|
||||||
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
|
||||||
|
|
||||||
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_calamity_ammo)) && count % 6 == 0) {
|
|
||||||
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 15, 25, false, false);
|
|
||||||
entityarrow.setDamage(15 + rand.nextInt(25));
|
|
||||||
|
|
||||||
world.playSoundAtEntity(player, "hbm:weapon.calShoot", 1.0F, 1.0F);
|
|
||||||
|
|
||||||
if (flag) {
|
|
||||||
entityarrow.canBePickedUp = 2;
|
|
||||||
} else {
|
|
||||||
player.inventory.consumeInventoryItem(ModItems.ammo_50bmg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!world.isRemote) {
|
|
||||||
world.spawnEntityInWorld(entityarrow);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this == ModItems.gun_calamity_dual && (player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_calamity_ammo)) && count % 6 == 3) {
|
|
||||||
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 15, 25, false, false);
|
|
||||||
entityarrow.setDamage(15 + rand.nextInt(25));
|
|
||||||
|
|
||||||
world.playSoundAtEntity(player, "hbm:weapon.calShoot", 1.0F, 0.7F);
|
|
||||||
|
|
||||||
if (flag) {
|
|
||||||
entityarrow.canBePickedUp = 2;
|
|
||||||
} else {
|
|
||||||
player.inventory.consumeInventoryItem(ModItems.ammo_50bmg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!world.isRemote) {
|
|
||||||
world.spawnEntityInWorld(entityarrow);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemEnchantability() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
|
||||||
|
|
||||||
if(this == ModItems.gun_calamity) {
|
|
||||||
list.add("Handheld Maxim");
|
|
||||||
}
|
|
||||||
if(this == ModItems.gun_calamity_dual) {
|
|
||||||
list.add("You may be thinking, 'This gun makes no");
|
|
||||||
list.add("sense, why is there only one receiver for");
|
|
||||||
list.add("two barrels, and how do the bullets even");
|
|
||||||
list.add("come out of this thing? The barrels are");
|
|
||||||
list.add("just taped onto a plate with no connection");
|
|
||||||
list.add("to the rest of the gun!' Well my boy, this");
|
|
||||||
list.add("question has a simple, easy to understand");
|
|
||||||
list.add("answer, it's because " + EnumChatFormatting.OBFUSCATED + "gkjin soi unsi");
|
|
||||||
list.add("and " + EnumChatFormatting.OBFUSCATED + "aslfnu isnfi uo fnafaoin fsj afakjkk abk");
|
|
||||||
}
|
|
||||||
list.add("");
|
|
||||||
list.add("Ammo: .50 BMG Round");
|
|
||||||
list.add("Damage: 15 - 25");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap getItemAttributeModifiers() {
|
|
||||||
Multimap multimap = super.getItemAttributeModifiers();
|
|
||||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
|
|
||||||
new AttributeModifier(field_111210_e, "Weapon modifier", 3, 0));
|
|
||||||
return multimap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -330,7 +330,7 @@ public class ItemClip extends Item {
|
|||||||
if(player.inventory.hasItem(ModItems.gun_proto))
|
if(player.inventory.hasItem(ModItems.gun_proto))
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_nuke, 8));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_nuke, 8));
|
||||||
if(player.inventory.hasItem(ModItems.gun_mirv))
|
if(player.inventory.hasItem(ModItems.gun_mirv))
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mirv_ammo, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_mirv, 1));
|
||||||
if(player.inventory.hasItem(ModItems.gun_bf))
|
if(player.inventory.hasItem(ModItems.gun_bf))
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_bf_ammo, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_bf_ammo, 1));
|
||||||
if(player.inventory.hasItem(ModItems.gun_mp40))
|
if(player.inventory.hasItem(ModItems.gun_mp40))
|
||||||
|
|||||||
@ -322,7 +322,7 @@ public class HbmChestContents {
|
|||||||
public static WeightedRandomChestContent[] vault4 = new WeightedRandomChestContent[] {
|
public static WeightedRandomChestContent[] vault4 = new WeightedRandomChestContent[] {
|
||||||
new WeightedRandomChestContent(ModItems.ammo_container, 0, 3, 6, 1),
|
new WeightedRandomChestContent(ModItems.ammo_container, 0, 3, 6, 1),
|
||||||
new WeightedRandomChestContent(ModItems.clip_fatman, 0, 2, 3, 1),
|
new WeightedRandomChestContent(ModItems.clip_fatman, 0, 2, 3, 1),
|
||||||
new WeightedRandomChestContent(ModItems.gun_mirv_ammo, 0, 2, 3, 1),
|
new WeightedRandomChestContent(ModItems.ammo_mirv, 0, 2, 3, 1),
|
||||||
new WeightedRandomChestContent(ModItems.gun_mirv, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.gun_mirv, 0, 1, 1, 1),
|
||||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||||
new WeightedRandomChestContent(ModItems.gun_proto, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.gun_proto, 0, 1, 1, 1),
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
|||||||
public class RefStrings {
|
public class RefStrings {
|
||||||
public static final String MODID = "hbm";
|
public static final String MODID = "hbm";
|
||||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||||
public static final String VERSION = "1.0.27 BETA (4251)";
|
public static final String VERSION = "1.0.27 BETA (4263H1)";
|
||||||
//HBM's Beta Naming Convention:
|
//HBM's Beta Naming Convention:
|
||||||
//V T (X)
|
//V T (X)
|
||||||
//V -> next release version
|
//V -> next release version
|
||||||
|
|||||||
@ -189,6 +189,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretMaxwell.class, new RenderTurretMaxwell());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretMaxwell.class, new RenderTurretMaxwell());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretFritz.class, new RenderTurretFritz());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretFritz.class, new RenderTurretFritz());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretBrandon.class, new RenderTurretBrandon());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretBrandon.class, new RenderTurretBrandon());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretArty.class, new RenderTurretArty());
|
||||||
//mines
|
//mines
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLandmine.class, new RenderLandmine());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLandmine.class, new RenderLandmine());
|
||||||
//cel prime
|
//cel prime
|
||||||
@ -252,6 +253,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSolidifier.class, new RenderSolidifier());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSolidifier.class, new RenderSolidifier());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadiolysis.class, new RenderRadiolysis());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadiolysis.class, new RenderRadiolysis());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectrolyser.class, new RenderElectrolyser());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectrolyser.class, new RenderElectrolyser());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceIron.class, new RenderFurnaceIron());
|
||||||
//AMS
|
//AMS
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
||||||
@ -624,6 +626,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
RenderingRegistry.registerEntityRenderingHandler(EntityDeathBlast.class, new RenderDeathBlast());
|
RenderingRegistry.registerEntityRenderingHandler(EntityDeathBlast.class, new RenderDeathBlast());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityNukeExplosionAdvanced.class, new RenderSnowball(ModItems.energy_ball));
|
RenderingRegistry.registerEntityRenderingHandler(EntityNukeExplosionAdvanced.class, new RenderSnowball(ModItems.energy_ball));
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntitySpear.class, new RenderSpear());
|
RenderingRegistry.registerEntityRenderingHandler(EntitySpear.class, new RenderSpear());
|
||||||
|
RenderingRegistry.registerEntityRenderingHandler(EntityNukeTorex.class, new RenderTorex());
|
||||||
//minecarts
|
//minecarts
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMinecartTest.class, new RenderMinecartTest());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMinecartTest.class, new RenderMinecartTest());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMinecartCrate.class, new RenderMinecart());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMinecartCrate.class, new RenderMinecart());
|
||||||
@ -685,6 +688,8 @@ public class ClientProxy extends ServerProxy {
|
|||||||
RenderingRegistry.registerBlockHandler(new RenderAntennaTop());
|
RenderingRegistry.registerBlockHandler(new RenderAntennaTop());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderConserve());
|
RenderingRegistry.registerBlockHandler(new RenderConserve());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderConveyor());
|
RenderingRegistry.registerBlockHandler(new RenderConveyor());
|
||||||
|
RenderingRegistry.registerBlockHandler(new RenderConveyorChute());
|
||||||
|
RenderingRegistry.registerBlockHandler(new RenderConveyorLift());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderRTGBlock());
|
RenderingRegistry.registerBlockHandler(new RenderRTGBlock());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderSpikeBlock());
|
RenderingRegistry.registerBlockHandler(new RenderSpikeBlock());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderChain());
|
RenderingRegistry.registerBlockHandler(new RenderChain());
|
||||||
@ -700,6 +705,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
RenderingRegistry.registerBlockHandler(new RenderBlockCT());
|
RenderingRegistry.registerBlockHandler(new RenderBlockCT());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderDetCord());
|
RenderingRegistry.registerBlockHandler(new RenderDetCord());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderBlockMultipass());
|
RenderingRegistry.registerBlockHandler(new RenderBlockMultipass());
|
||||||
|
RenderingRegistry.registerBlockHandler(new RenderBlockSideRotation());
|
||||||
RenderingRegistry.registerBlockHandler(new RenderDiode());
|
RenderingRegistry.registerBlockHandler(new RenderDiode());
|
||||||
|
|
||||||
RenderingRegistry.registerBlockHandler(new RenderBlockRotated(ModBlocks.charge_dynamite.getRenderType(), ResourceManager.charge_dynamite));
|
RenderingRegistry.registerBlockHandler(new RenderBlockRotated(ModBlocks.charge_dynamite.getRenderType(), ResourceManager.charge_dynamite));
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import static com.hbm.inventory.OreDictManager.*;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.ItemEnums.EnumLegendaryType;
|
import com.hbm.items.ItemEnums.EnumLegendaryType;
|
||||||
import com.hbm.items.ItemEnums.EnumPlantType;
|
import com.hbm.items.ItemEnums.EnumPlantType;
|
||||||
|
import com.hbm.items.ItemGenericPart.EnumPartType;
|
||||||
import com.hbm.items.machine.ItemBattery;
|
import com.hbm.items.machine.ItemBattery;
|
||||||
import com.hbm.items.special.ItemCircuitStarComponent.CircuitComponentType;
|
import com.hbm.items.special.ItemCircuitStarComponent.CircuitComponentType;
|
||||||
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
||||||
@ -181,8 +182,6 @@ public class CraftingManager {
|
|||||||
//addRecipeAuto(new ItemStack(ModItems.reactor_core, 1), new Object[] { "LNL", "N N", "LNL", 'N', getReflector(), 'L', PB.plate() });
|
//addRecipeAuto(new ItemStack(ModItems.reactor_core, 1), new Object[] { "LNL", "N N", "LNL", 'N', getReflector(), 'L', PB.plate() });
|
||||||
//addRecipeAuto(new ItemStack(ModItems.rtg_unit, 1), new Object[] { "TIT", "PCP", "TIT", 'T', ModItems.thermo_element, 'I', PB.ingot(), 'P', ModItems.board_copper, 'C', ModItems.circuit_copper });
|
//addRecipeAuto(new ItemStack(ModItems.rtg_unit, 1), new Object[] { "TIT", "PCP", "TIT", 'T', ModItems.thermo_element, 'I', PB.ingot(), 'P', ModItems.board_copper, 'C', ModItems.circuit_copper });
|
||||||
//addRecipeAuto(new ItemStack(ModItems.thermo_unit_empty, 1), new Object[] { "TTT", " S ", "P P", 'S', STEEL.ingot(), 'P', TI.plate(), 'T', ModItems.coil_copper_torus });
|
//addRecipeAuto(new ItemStack(ModItems.thermo_unit_empty, 1), new Object[] { "TTT", " S ", "P P", 'S', STEEL.ingot(), 'P', TI.plate(), 'T', ModItems.coil_copper_torus });
|
||||||
addRecipeAuto(new ItemStack(ModItems.thermo_unit_endo, 1), new Object[] { "EEE", "ETE", "EEE", 'E', Item.getItemFromBlock(Blocks.ice), 'T', ModItems.thermo_unit_empty });
|
|
||||||
addRecipeAuto(new ItemStack(ModItems.thermo_unit_exo, 1), new Object[] { "LLL", "LTL", "LLL", 'L', Items.lava_bucket, 'T', ModItems.thermo_unit_empty });
|
|
||||||
//addRecipeAuto(new ItemStack(ModItems.levitation_unit, 1), new Object[] { "CSC", "TAT", "PSP", 'C', ModItems.coil_copper, 'S', ModItems.nugget_schrabidium, 'T', ModItems.coil_tungsten, 'P', TI.plate(), 'A', STEEL.ingot() });
|
//addRecipeAuto(new ItemStack(ModItems.levitation_unit, 1), new Object[] { "CSC", "TAT", "PSP", 'C', ModItems.coil_copper, 'S', ModItems.nugget_schrabidium, 'T', ModItems.coil_tungsten, 'P', TI.plate(), 'A', STEEL.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModItems.deuterium_filter, 1), new Object[] { "TST", "SCS", "TST", 'T', TCALLOY.ingot(), 'S', S.dust(), 'C', ModItems.catalyst_clay });
|
addRecipeAuto(new ItemStack(ModItems.deuterium_filter, 1), new Object[] { "TST", "SCS", "TST", 'T', TCALLOY.ingot(), 'S', S.dust(), 'C', ModItems.catalyst_clay });
|
||||||
|
|
||||||
@ -238,7 +237,12 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModItems.ducttape, 6), new Object[] { "FSF", "SPS", "FSF", 'F', Items.string, 'S', KEY_SLIME, 'P', Items.paper });
|
addRecipeAuto(new ItemStack(ModItems.ducttape, 6), new Object[] { "FSF", "SPS", "FSF", 'F', Items.string, 'S', KEY_SLIME, 'P', Items.paper });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 16), new Object[] { "LLL", "I I", "LLL", 'L', Items.leather, 'I', IRON.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 16), new Object[] { "LLL", "I I", "LLL", 'L', Items.leather, 'I', IRON.ingot() });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 16), new Object[] { "RSR", "I I", "RSR", 'I', IRON.ingot(), 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE), 'S', IRON.plate() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 64), new Object[] { "LLL", "I I", "LLL", 'L', RUBBER.ingot(), 'I', IRON.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 64), new Object[] { "LLL", "I I", "LLL", 'L', RUBBER.ingot(), 'I', IRON.ingot() });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor_double, 3), new Object[] { "CPC", "CPC", "CPC", 'C', ModBlocks.conveyor, 'P', IRON.plate() });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor_triple, 3), new Object[] { "CPC", "CPC", "CPC", 'C', ModBlocks.conveyor_double, 'P', STEEL.plate() });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor_chute, 3), new Object[] { "IGI", "IGI", "ICI" , 'I', IRON.ingot(), 'G', ModBlocks.steel_grate, 'C', ModBlocks.conveyor });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.conveyor_lift, 3), new Object[] { "IGI", "IGI", "ICI" , 'I', IRON.ingot(), 'G', ModBlocks.chain, 'C', ModBlocks.conveyor });
|
||||||
|
|
||||||
//addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 1), new Object[] { "T T", "PHP", "TFT", 'T', W.ingot(), 'P', ModItems.board_copper, 'H', Blocks.hopper, 'F', Blocks.furnace });
|
//addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 1), new Object[] { "T T", "PHP", "TFT", 'T', W.ingot(), 'P', ModItems.board_copper, 'H', Blocks.hopper, 'F', Blocks.furnace });
|
||||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_uf6_tank), 1), new Object[] { "WTW", "WTW", "SRS", 'S', IRON.plate(), 'W', ModItems.coil_tungsten, 'T', ModItems.tank_steel, 'W', ModItems.coil_tungsten,'R', MINGRADE.ingot() });
|
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_uf6_tank), 1), new Object[] { "WTW", "WTW", "SRS", 'S', IRON.plate(), 'W', ModItems.coil_tungsten, 'T', ModItems.tank_steel, 'W', ModItems.coil_tungsten,'R', MINGRADE.ingot() });
|
||||||
@ -285,6 +289,7 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModBlocks.anvil_murky, 1), new Object[] { "UUU", "UAU", "UUU", 'U', ModItems.undefined, 'A', ModBlocks.anvil_steel });
|
addRecipeAuto(new ItemStack(ModBlocks.anvil_murky, 1), new Object[] { "UUU", "UAU", "UUU", 'U', ModItems.undefined, 'A', ModBlocks.anvil_steel });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.machine_fraction_tower), new Object[] { "SHS", "SGS", "SHS", 'S', STEEL.plate(), 'H', ModItems.hull_big_steel, 'G', ModBlocks.steel_grate });
|
addRecipeAuto(new ItemStack(ModBlocks.machine_fraction_tower), new Object[] { "SHS", "SGS", "SHS", 'S', STEEL.plate(), 'H', ModItems.hull_big_steel, 'G', ModBlocks.steel_grate });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.fraction_spacer), new Object[] { "BHB", 'H', ModItems.hull_big_steel, 'B', Blocks.iron_bars });
|
addRecipeAuto(new ItemStack(ModBlocks.fraction_spacer), new Object[] { "BHB", 'H', ModItems.hull_big_steel, 'B', Blocks.iron_bars });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.furnace_iron), new Object[] { "III", "IFI", "BBB", 'I', IRON.ingot(), 'F', Blocks.furnace, 'B', Blocks.stonebrick });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ModItems.plate_polymer, 'W', Blocks.wool });
|
addRecipeAuto(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ModItems.plate_polymer, 'W', Blocks.wool });
|
||||||
|
|
||||||
@ -608,7 +613,7 @@ 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.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(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_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.turret_biometry });
|
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(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_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 });
|
addRecipeAuto(new ItemStack(ModItems.sat_mapper), new Object[] { "H", "B", 'H', ModItems.sat_head_mapper, 'B', ModItems.sat_base });
|
||||||
@ -769,6 +774,13 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModItems.upgrade_screm, 1), new Object[] { "SUS", "SCS", "SUS", 'S', STEEL.plate(), 'U', ModItems.upgrade_template, 'C', ModItems.crystal_xen });
|
addRecipeAuto(new ItemStack(ModItems.upgrade_screm, 1), new Object[] { "SUS", "SCS", "SUS", 'S', STEEL.plate(), 'U', ModItems.upgrade_template, 'C', ModItems.crystal_xen });
|
||||||
addRecipeAuto(new ItemStack(ModItems.upgrade_gc_speed, 1), new Object[] {"GNG", "RUR", "GMG", 'R', RUBBER.ingot(), 'M', ModItems.motor, 'G', ModItems.coil_gold, 'N', TCALLOY.ingot(), 'U', ModItems.upgrade_template}); //TODO: gate this behind the upwards gate of the oil chain when it exists
|
addRecipeAuto(new ItemStack(ModItems.upgrade_gc_speed, 1), new Object[] {"GNG", "RUR", "GMG", 'R', RUBBER.ingot(), 'M', ModItems.motor, 'G', ModItems.coil_gold, 'N', TCALLOY.ingot(), 'U', ModItems.upgrade_template}); //TODO: gate this behind the upwards gate of the oil chain when it exists
|
||||||
|
|
||||||
|
addRecipeAuto(new ItemStack(ModItems.upgrade_stack, 1, 0), new Object[] { " C ", "PUP", " C ", 'C', ModItems.circuit_aluminium, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'U', ModItems.upgrade_template });
|
||||||
|
addRecipeAuto(new ItemStack(ModItems.upgrade_stack, 1, 1), new Object[] { " C ", "PUP", " C ", 'C', ModItems.circuit_copper, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_HYDRAULIC), 'U', new ItemStack(ModItems.upgrade_stack, 1, 0) });
|
||||||
|
addRecipeAuto(new ItemStack(ModItems.upgrade_stack, 1, 2), new Object[] { " C ", "PUP", " C ", 'C', ModItems.circuit_red_copper, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_ELECTRIC), 'U', new ItemStack(ModItems.upgrade_stack, 1, 1) });
|
||||||
|
addRecipeAuto(new ItemStack(ModItems.upgrade_ejector, 1, 0), new Object[] { " C ", "PUP", " C ", 'C', ModItems.plate_copper, 'P', ModItems.motor, 'U', ModItems.upgrade_template });
|
||||||
|
addRecipeAuto(new ItemStack(ModItems.upgrade_ejector, 1, 1), new Object[] { " C ", "PUP", " C ", 'C', ModItems.plate_gold, 'P', ModItems.motor, 'U', new ItemStack(ModItems.upgrade_ejector, 1, 0) });
|
||||||
|
addRecipeAuto(new ItemStack(ModItems.upgrade_ejector, 1, 2), new Object[] { " C ", "PUP", " C ", 'C', ModItems.plate_saturnite, 'P', ModItems.motor, 'U', new ItemStack(ModItems.upgrade_ejector, 1, 1) });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModItems.mech_key, 1), new Object[] { "MCM", "MKM", "MMM", 'M', ModItems.ingot_meteorite_forged, 'C', ModItems.coin_maskman, 'K', ModItems.key });
|
addRecipeAuto(new ItemStack(ModItems.mech_key, 1), new Object[] { "MCM", "MKM", "MMM", 'M', ModItems.ingot_meteorite_forged, 'C', ModItems.coin_maskman, 'K', ModItems.key });
|
||||||
addRecipeAuto(new ItemStack(ModItems.spawn_ufo, 1), new Object[] { "MMM", "DCD", "MMM", 'M', ModItems.ingot_meteorite, 'D', DNT.ingot(), 'C', ModItems.coin_worm });
|
addRecipeAuto(new ItemStack(ModItems.spawn_ufo, 1), new Object[] { "MMM", "DCD", "MMM", 'M', ModItems.ingot_meteorite, 'D', DNT.ingot(), 'C', ModItems.coin_worm });
|
||||||
|
|
||||||
@ -915,6 +927,23 @@ public class CraftingManager {
|
|||||||
addShapelessAuto(new ItemStack(ModItems.canister_full, 1, Fluids.BIOFUEL.getID()), new Object[] { ModItems.canister_biofuel });
|
addShapelessAuto(new ItemStack(ModItems.canister_full, 1, Fluids.BIOFUEL.getID()), new Object[] { ModItems.canister_biofuel });
|
||||||
addShapelessAuto(new ItemStack(ModItems.canister_full, 1, Fluids.ETHANOL.getID()), new Object[] { ModItems.canister_ethanol });
|
addShapelessAuto(new ItemStack(ModItems.canister_full, 1, Fluids.ETHANOL.getID()), new Object[] { ModItems.canister_ethanol });
|
||||||
|
|
||||||
|
addRecipeAuto(DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC, 4), new Object[] { " I ", "CPC", " I ", 'I', IRON.ingot(), 'C', CU.ingot(), 'P', IRON.plate() });
|
||||||
|
addRecipeAuto(DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_HYDRAULIC, 4), new Object[] { " I ", "CPC", " I ", 'I', STEEL.ingot(), 'C', TI.ingot(), 'P', Fluids.LUBRICANT.getDict(1000) });
|
||||||
|
addRecipeAuto(DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_ELECTRIC, 4), new Object[] { " I ", "CPC", " I ", 'I', TCALLOY.ingot(), 'C', ANY_PLASTIC.ingot(), 'P', ModItems.motor });
|
||||||
|
|
||||||
|
Object[] craneCasing = new Object[] {
|
||||||
|
Blocks.stonebrick, 1,
|
||||||
|
IRON.ingot(), 2,
|
||||||
|
STEEL.ingot(), 4
|
||||||
|
};
|
||||||
|
|
||||||
|
for(int i = 0; i < craneCasing.length / 2; i++) {
|
||||||
|
Object casing = craneCasing[i * 2];
|
||||||
|
int amount = (int) craneCasing[i * 2 + 1];
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.crane_inserter, amount), new Object[] { "CCC", "C C", "CBC", 'C', casing, 'B', ModBlocks.conveyor });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.crane_extractor, amount), new Object[] { "CCC", "CPC", "CBC", 'C', casing, 'B', ModBlocks.conveyor, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC) });
|
||||||
|
}
|
||||||
|
|
||||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER1), new Object[] { ModItems.ingot_chainsteel, ASBESTOS.ingot(), ModItems.gem_alexandrite });
|
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER1), new Object[] { ModItems.ingot_chainsteel, ASBESTOS.ingot(), ModItems.gem_alexandrite });
|
||||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER1, 3), new Object[] { DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2) });
|
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER1, 3), new Object[] { DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2) });
|
||||||
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), new Object[] { ModItems.ingot_chainsteel, ModItems.ingot_bismuth, ModItems.gem_alexandrite, ModItems.gem_alexandrite });
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import cpw.mods.fml.common.Mod.Metadata;
|
|||||||
import cpw.mods.fml.common.ModMetadata;
|
import cpw.mods.fml.common.ModMetadata;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
@ -500,6 +501,7 @@ public class MainRegistry {
|
|||||||
EntityRegistry.registerModEntity(EntityMagnusCartus.class, "entity_ntm_cart_chungoid", 174, this, 250, 1, false);
|
EntityRegistry.registerModEntity(EntityMagnusCartus.class, "entity_ntm_cart_chungoid", 174, this, 250, 1, false);
|
||||||
EntityRegistry.registerModEntity(EntityMinecartPowder.class, "entity_ntm_cart_powder", 175, this, 250, 1, false);
|
EntityRegistry.registerModEntity(EntityMinecartPowder.class, "entity_ntm_cart_powder", 175, this, 250, 1, false);
|
||||||
EntityRegistry.registerModEntity(EntityMinecartSemtex.class, "entity_ntm_cart_semtex", 176, this, 250, 1, false);
|
EntityRegistry.registerModEntity(EntityMinecartSemtex.class, "entity_ntm_cart_semtex", 176, this, 250, 1, false);
|
||||||
|
EntityRegistry.registerModEntity(EntityNukeTorex.class, "entity_effect_torex", 177, this, 250, 1, false);
|
||||||
|
|
||||||
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
||||||
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
|
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
|
||||||
@ -1069,19 +1071,51 @@ public class MainRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static HashSet<String> ignoreMappings = new HashSet();
|
private static HashSet<String> ignoreMappings = new HashSet();
|
||||||
|
private static HashMap<String, Item> remapItems = new HashMap();
|
||||||
|
|
||||||
static {
|
|
||||||
for(int i = 1; i <= 8; i++)
|
|
||||||
ignoreMappings.add("hbm:item.gasflame" + i);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void handleMissingMappings(FMLMissingMappingsEvent event) {
|
public void handleMissingMappings(FMLMissingMappingsEvent event) {
|
||||||
|
|
||||||
|
ignoreMappings.clear();
|
||||||
|
remapItems.clear();
|
||||||
|
|
||||||
|
/// IGNORE ///
|
||||||
|
for(int i = 1; i <= 8; i++) ignoreMappings.add("hbm:item.gasflame" + i);
|
||||||
|
ignoreMappings.add("hbm:item.cyclotron_tower");
|
||||||
|
ignoreMappings.add("hbm:item.magnet_dee");
|
||||||
|
ignoreMappings.add("hbm:item.centrifuge_tower");
|
||||||
|
ignoreMappings.add("hbm:item.gun_revolver_nopip_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_revolver_pip_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_calamity_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_lacunae_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_rpg_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_mp40_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_uzi_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_uboinik_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_lever_action_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_bolt_action_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_fatman_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_mirv_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.gun_stinger_ammo");
|
||||||
|
ignoreMappings.add("hbm:item.limiter");
|
||||||
|
ignoreMappings.add("hbm:item.turret_biometry");
|
||||||
|
ignoreMappings.add("hbm:item.thermo_unit_empty");
|
||||||
|
ignoreMappings.add("hbm:item.thermo_unit_endo");
|
||||||
|
ignoreMappings.add("hbm:item.thermo_unit_exo");
|
||||||
|
|
||||||
for(MissingMapping mapping : event.get()) {
|
for(MissingMapping mapping : event.get()) {
|
||||||
if(mapping.type == GameRegistry.Type.ITEM) {
|
|
||||||
if(ignoreMappings.contains(mapping.name)) {
|
if(ignoreMappings.contains(mapping.name)) {
|
||||||
mapping.ignore();
|
mapping.ignore();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mapping.type == GameRegistry.Type.ITEM) {
|
||||||
|
|
||||||
|
if(remapItems.get(mapping.name) != null) {
|
||||||
|
mapping.remap(remapItems.get(mapping.name));
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import java.lang.reflect.Field;
|
|||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -46,6 +45,7 @@ import com.hbm.items.armor.IDamageHandler;
|
|||||||
import com.hbm.items.armor.ItemArmorMod;
|
import com.hbm.items.armor.ItemArmorMod;
|
||||||
import com.hbm.items.armor.ItemModRevive;
|
import com.hbm.items.armor.ItemModRevive;
|
||||||
import com.hbm.items.armor.ItemModShackles;
|
import com.hbm.items.armor.ItemModShackles;
|
||||||
|
import com.hbm.items.tool.ItemGuideBook.BookType;
|
||||||
import com.hbm.items.weapon.ItemGunBase;
|
import com.hbm.items.weapon.ItemGunBase;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.lib.ModDamageSource;
|
import com.hbm.lib.ModDamageSource;
|
||||||
@ -63,8 +63,6 @@ import com.hbm.util.EntityDamageUtil;
|
|||||||
import com.hbm.world.WorldProviderNTM;
|
import com.hbm.world.WorldProviderNTM;
|
||||||
import com.hbm.world.generator.TimedGenerator;
|
import com.hbm.world.generator.TimedGenerator;
|
||||||
|
|
||||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping;
|
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
@ -73,7 +71,6 @@ import cpw.mods.fml.common.gameevent.TickEvent;
|
|||||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||||
import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
|
import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockBush;
|
import net.minecraft.block.BlockBush;
|
||||||
@ -183,6 +180,12 @@ public class ModEventHandler {
|
|||||||
|
|
||||||
if(MobConfig.enableDucks && event.player instanceof EntityPlayerMP && !event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasDucked"))
|
if(MobConfig.enableDucks && event.player instanceof EntityPlayerMP && !event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasDucked"))
|
||||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket("Press O to Duck!", MainRegistry.proxy.ID_DUCK, 30_000), (EntityPlayerMP) event.player);
|
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket("Press O to Duck!", MainRegistry.proxy.ID_DUCK, 30_000), (EntityPlayerMP) event.player);
|
||||||
|
|
||||||
|
if(event.player instanceof EntityPlayerMP && !event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasGuide")) {
|
||||||
|
event.player.inventory.addItemStackToInventory(new ItemStack(ModItems.book_guide, 1, BookType.STARTER.ordinal()));
|
||||||
|
event.player.inventoryContainer.detectAndSendChanges();
|
||||||
|
event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).setBoolean("hasGuide", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -907,7 +910,7 @@ public class ModEventHandler {
|
|||||||
EntityPlayer player = (EntityPlayer) e;
|
EntityPlayer player = (EntityPlayer) e;
|
||||||
|
|
||||||
if(ArmorUtil.checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) {
|
if(ArmorUtil.checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) {
|
||||||
e.worldObj.playSoundAtEntity(e, "random.break", 5F, 1.0F + e.getRNG().nextFloat() * 0.5F);
|
HbmPlayerProps.plink(player, "random.break", 0.5F, 1.0F + e.getRNG().nextFloat() * 0.5F);
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1512,4 +1515,24 @@ public class ModEventHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void filterBrokenEntity(EntityJoinWorldEvent event) {
|
||||||
|
|
||||||
|
Entity entity = event.entity;
|
||||||
|
Entity[] parts = entity.getParts();
|
||||||
|
|
||||||
|
//MainRegistry.logger.error("Trying to spawn entity " + entity.getClass().getCanonicalName());
|
||||||
|
|
||||||
|
if(parts != null) {
|
||||||
|
|
||||||
|
for(int i = 0; i < parts.length; i++) {
|
||||||
|
if(parts[i] == null) {
|
||||||
|
MainRegistry.logger.error("Prevented spawning of multipart entity " + entity.getClass().getCanonicalName() + " due to parts being null!");
|
||||||
|
event.setCanceled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,7 +60,6 @@ import com.hbm.util.ArmorUtil;
|
|||||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
|
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
|
||||||
|
|
||||||
import api.hbm.energy.IEnergyConductor;
|
|
||||||
import api.hbm.item.IButtonReceiver;
|
import api.hbm.item.IButtonReceiver;
|
||||||
import api.hbm.item.IClickReceiver;
|
import api.hbm.item.IClickReceiver;
|
||||||
|
|
||||||
@ -84,6 +83,7 @@ import net.minecraft.client.renderer.RenderHelper;
|
|||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemArmor;
|
import net.minecraft.item.ItemArmor;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -110,7 +110,6 @@ import net.minecraftforge.client.event.RenderWorldLastEvent;
|
|||||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||||
import net.minecraftforge.client.event.sound.PlaySoundEvent17;
|
import net.minecraftforge.client.event.sound.PlaySoundEvent17;
|
||||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
public class ModEventHandlerClient {
|
public class ModEventHandlerClient {
|
||||||
|
|
||||||
@ -882,6 +881,7 @@ public class ModEventHandlerClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final ResourceLocation poster = new ResourceLocation(RefStrings.MODID + ":textures/models/misc/poster.png");
|
private static final ResourceLocation poster = new ResourceLocation(RefStrings.MODID + ":textures/models/misc/poster.png");
|
||||||
|
private static final ResourceLocation poster_cat = new ResourceLocation(RefStrings.MODID + ":textures/models/misc/poster_cat.png");
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void renderFrame(RenderItemInFrameEvent event) {
|
public void renderFrame(RenderItemInFrameEvent event) {
|
||||||
@ -903,5 +903,23 @@ public class ModEventHandlerClient {
|
|||||||
tess.draw();
|
tess.draw();
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(event.item != null && event.item.getItem() == Items.paper) {
|
||||||
|
event.setCanceled(true);
|
||||||
|
|
||||||
|
double p = 0.0625D;
|
||||||
|
double o = p * 2.75D;
|
||||||
|
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(poster_cat);
|
||||||
|
Tessellator tess = Tessellator.instance;
|
||||||
|
tess.startDrawingQuads();
|
||||||
|
tess.addVertexWithUV(0.5, 0.5 + o, p * 0.5, 1, 0);
|
||||||
|
tess.addVertexWithUV(-0.5, 0.5 + o, p * 0.5, 0, 0);
|
||||||
|
tess.addVertexWithUV(-0.5, -0.5 + o, p * 0.5, 0, 1);
|
||||||
|
tess.addVertexWithUV(0.5, -0.5 + o, p * 0.5, 1, 1);
|
||||||
|
tess.draw();
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,9 +51,13 @@ public class ResourceManager {
|
|||||||
public static final IModelCustom turret_maxwell = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_microwave.obj"));
|
public static final IModelCustom turret_maxwell = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_microwave.obj"));
|
||||||
public static final IModelCustom turret_fritz = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_fritz.obj"));
|
public static final IModelCustom turret_fritz = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_fritz.obj"));
|
||||||
public static final IModelCustom turret_brandon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_brandon.obj"));
|
public static final IModelCustom turret_brandon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_brandon.obj"));
|
||||||
|
public static final IModelCustom turret_arty = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_arty.obj"));
|
||||||
|
|
||||||
public static final IModelCustom turret_howard_damaged = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_howard_damaged.obj"));
|
public static final IModelCustom turret_howard_damaged = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_howard_damaged.obj"));
|
||||||
|
|
||||||
|
//Furnaces
|
||||||
|
public static final IModelCustom furnace_iron = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/furnace_iron.obj"));
|
||||||
|
|
||||||
//Landmines
|
//Landmines
|
||||||
public static final IModelCustom mine_ap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_ap.obj"));
|
public static final IModelCustom mine_ap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_ap.obj"));
|
||||||
public static final IModelCustom mine_he = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_he.obj"));
|
public static final IModelCustom mine_he = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_he.obj"));
|
||||||
@ -341,6 +345,7 @@ public class ResourceManager {
|
|||||||
public static final ResourceLocation turret_maxwell_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/maxwell.png");
|
public static final ResourceLocation turret_maxwell_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/maxwell.png");
|
||||||
public static final ResourceLocation turret_fritz_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/fritz.png");
|
public static final ResourceLocation turret_fritz_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/fritz.png");
|
||||||
public static final ResourceLocation turret_brandon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/brandon.png");
|
public static final ResourceLocation turret_brandon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/brandon.png");
|
||||||
|
public static final ResourceLocation turret_arty_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/arty.png");
|
||||||
|
|
||||||
|
|
||||||
public static final ResourceLocation turret_base_rusted= new ResourceLocation(RefStrings.MODID, "textures/models/turrets/rusted/base.png");
|
public static final ResourceLocation turret_base_rusted= new ResourceLocation(RefStrings.MODID, "textures/models/turrets/rusted/base.png");
|
||||||
@ -357,6 +362,9 @@ public class ResourceManager {
|
|||||||
public static final ResourceLocation mine_shrap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_shrap.png");
|
public static final ResourceLocation mine_shrap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_shrap.png");
|
||||||
public static final ResourceLocation mine_fat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_fat.png");
|
public static final ResourceLocation mine_fat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_fat.png");
|
||||||
|
|
||||||
|
//Furnaces
|
||||||
|
public static final ResourceLocation furnace_iron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/furnace_iron.png");
|
||||||
|
|
||||||
//Oil Pumps
|
//Oil Pumps
|
||||||
public static final ResourceLocation derrick_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/derrick.png");
|
public static final ResourceLocation derrick_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/derrick.png");
|
||||||
public static final ResourceLocation pumpjack_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/pumpjack.png");
|
public static final ResourceLocation pumpjack_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/pumpjack.png");
|
||||||
|
|||||||
97
src/main/java/com/hbm/module/ModuleBurnTime.java
Normal file
97
src/main/java/com/hbm/module/ModuleBurnTime.java
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
package com.hbm.module;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.util.ItemStackUtil;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntityFurnace;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple module for determining the burn time of a stack with added options to define bonuses
|
||||||
|
* @author hbm
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModuleBurnTime {
|
||||||
|
|
||||||
|
private double modLog = 1.0D;
|
||||||
|
private double modWood = 1.0D;
|
||||||
|
private double modCoal = 1.0D;
|
||||||
|
private double modLignite = 1.0D;
|
||||||
|
private double modCoke = 1.0D;
|
||||||
|
private double modSolid = 1.0D;
|
||||||
|
private double modRocket = 1.0D;
|
||||||
|
|
||||||
|
public int getBurnTime(ItemStack stack) {
|
||||||
|
int fuel = TileEntityFurnace.getItemBurnTime(stack);
|
||||||
|
|
||||||
|
if(fuel == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if(stack.getItem() == ModItems.solid_fuel) return (int) (fuel * modSolid);
|
||||||
|
if(stack.getItem() == ModItems.solid_fuel_presto) return (int) (fuel * modSolid);
|
||||||
|
if(stack.getItem() == ModItems.solid_fuel_presto_triplet) return (int) (fuel * modSolid);
|
||||||
|
|
||||||
|
if(stack.getItem() == ModItems.rocket_fuel) return (int) (fuel * modRocket);
|
||||||
|
|
||||||
|
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||||
|
|
||||||
|
for(String name : names) {
|
||||||
|
if(name.contains("Coke")) return (int) (fuel * modCoke);
|
||||||
|
if(name.contains("Coal")) return (int) (fuel * modCoal);
|
||||||
|
if(name.contains("Lignite")) return (int) (fuel * modLignite);
|
||||||
|
if(name.startsWith("log")) return (int) (fuel * modLog);
|
||||||
|
if(name.contains("Wood")) return (int) (fuel * modWood);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fuel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getDesc() {
|
||||||
|
List<String> list = new ArrayList();
|
||||||
|
|
||||||
|
list.add(EnumChatFormatting.GOLD + "Burn time bonuses:");
|
||||||
|
|
||||||
|
addIf(list, "Logs", modLog);
|
||||||
|
addIf(list, "Wood", modWood);
|
||||||
|
addIf(list, "Coal", modCoal);
|
||||||
|
addIf(list, "Lignite", modLignite);
|
||||||
|
addIf(list, "Coke", modCoke);
|
||||||
|
addIf(list, "Solid Fuel", modSolid);
|
||||||
|
addIf(list, "Rocket Fuel", modRocket);
|
||||||
|
|
||||||
|
if(list.size() == 1)
|
||||||
|
list.clear();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addIf(List<String> list, String name, double mod) {
|
||||||
|
|
||||||
|
if(mod != 1.0D)
|
||||||
|
list.add(EnumChatFormatting.YELLOW + "- " + name + ": " + getPercent(mod));
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getPercent(double mod) {
|
||||||
|
mod -= 1D;
|
||||||
|
String num = ((int) (mod * 100)) + "%";
|
||||||
|
|
||||||
|
if(mod < 0)
|
||||||
|
num = EnumChatFormatting.RED + "-" + num;
|
||||||
|
else
|
||||||
|
num = EnumChatFormatting.GREEN + "+" + num;
|
||||||
|
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModuleBurnTime setLogMod(double mod) { this.modLog = mod; return this; }
|
||||||
|
public ModuleBurnTime setWoodMod(double mod) { this.modWood = mod; return this; }
|
||||||
|
public ModuleBurnTime setCoalMod(double mod) { this.modCoal = mod; return this; }
|
||||||
|
public ModuleBurnTime setLigniteMod(double mod) { this.modLignite = mod; return this; }
|
||||||
|
public ModuleBurnTime setCokeMod(double mod) { this.modCoke = mod; return this; }
|
||||||
|
public ModuleBurnTime setSolidMod(double mod) { this.modSolid = mod; return this; }
|
||||||
|
public ModuleBurnTime setRocketMod(double mod) { this.modRocket = mod; return this; }
|
||||||
|
}
|
||||||
148
src/main/java/com/hbm/module/ModulePatternMatcher.java
Normal file
148
src/main/java/com/hbm/module/ModulePatternMatcher.java
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
package com.hbm.module;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.util.ItemStackUtil;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class ModulePatternMatcher {
|
||||||
|
|
||||||
|
public static final String MODE_EXACT = "exact";
|
||||||
|
public static final String MODE_WILDCARD = "wildcard";
|
||||||
|
public String[] modes;
|
||||||
|
|
||||||
|
public ModulePatternMatcher() {
|
||||||
|
this.modes = new String[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModulePatternMatcher(int count) {
|
||||||
|
this.modes = new String[count];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initPatternSmart(World world, ItemStack stack, int i) {
|
||||||
|
|
||||||
|
if(world.isRemote) return;
|
||||||
|
|
||||||
|
if(stack == null) {
|
||||||
|
modes[i] = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||||
|
|
||||||
|
if(iterateAndCheck(names, i ,"ingot")) return;
|
||||||
|
if(iterateAndCheck(names, i ,"block")) return;
|
||||||
|
if(iterateAndCheck(names, i ,"dust")) return;
|
||||||
|
if(iterateAndCheck(names, i ,"nugget")) return;
|
||||||
|
if(iterateAndCheck(names, i ,"plate")) return;
|
||||||
|
|
||||||
|
if(stack.getHasSubtypes()) {
|
||||||
|
modes[i] = MODE_EXACT;
|
||||||
|
} else {
|
||||||
|
modes[i] = MODE_WILDCARD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean iterateAndCheck(List<String> names, int i, String prefix) {
|
||||||
|
|
||||||
|
for(String s : names) {
|
||||||
|
if(s.startsWith(prefix)) {
|
||||||
|
modes[i] = s;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initPatternStandard(World world, ItemStack stack, int i) {
|
||||||
|
|
||||||
|
if(world.isRemote) return;
|
||||||
|
|
||||||
|
if(stack == null) {
|
||||||
|
modes[i] = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(stack.getHasSubtypes()) {
|
||||||
|
modes[i] = MODE_EXACT;
|
||||||
|
} else {
|
||||||
|
modes[i] = MODE_WILDCARD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void nextMode(World world, ItemStack pattern, int i) {
|
||||||
|
|
||||||
|
if(world.isRemote) return;
|
||||||
|
|
||||||
|
if(pattern == null) {
|
||||||
|
modes[i] = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(modes[i] == null) {
|
||||||
|
modes[i] = MODE_EXACT;
|
||||||
|
} else if(MODE_EXACT.equals(modes[i])) {
|
||||||
|
modes[i] = MODE_WILDCARD;
|
||||||
|
} else if(MODE_WILDCARD.equals(modes[i])) {
|
||||||
|
|
||||||
|
List<String> names = ItemStackUtil.getOreDictNames(pattern);
|
||||||
|
|
||||||
|
if(names.isEmpty()) {
|
||||||
|
modes[i] = MODE_EXACT;
|
||||||
|
} else {
|
||||||
|
modes[i] = names.get(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
List<String> names = ItemStackUtil.getOreDictNames(pattern);
|
||||||
|
|
||||||
|
if(names.size() < 2 || modes[i].equals(names.get(names.size() - 1))) {
|
||||||
|
modes[i] = MODE_EXACT;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for(int j = 0; j < names.size() - 1; j++) {
|
||||||
|
|
||||||
|
if(modes[i].equals(names.get(j))) {
|
||||||
|
modes[i] = names.get(j + 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValidForFilter(ItemStack filter, int index, ItemStack input) {
|
||||||
|
|
||||||
|
String mode = modes[index];
|
||||||
|
|
||||||
|
switch(mode) {
|
||||||
|
case MODE_EXACT: return input.isItemEqual(filter) && ItemStack.areItemStackTagsEqual(input, filter);
|
||||||
|
case MODE_WILDCARD: return input.getItem() == filter.getItem() && ItemStack.areItemStackTagsEqual(input, filter);
|
||||||
|
default:
|
||||||
|
List<String> keys = ItemStackUtil.getOreDictNames(input);
|
||||||
|
return keys.contains(mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
|
||||||
|
for(int i = 0; i < modes.length; i++) {
|
||||||
|
if(nbt.hasKey("mode" + i)) {
|
||||||
|
modes[i] = nbt.getString("mode" + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
|
||||||
|
for(int i = 0; i < modes.length; i++) {
|
||||||
|
if(modes[i] != null) {
|
||||||
|
nbt.setString("mode" + i, modes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
package com.hbm.render.block;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.blocks.IBlockSideRotation;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
public class RenderBlockSideRotation implements ISimpleBlockRenderingHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||||
|
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
block.setBlockBoundsForItemRender();
|
||||||
|
renderer.setRenderBoundsFromBlock(block);
|
||||||
|
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||||
|
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
|
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
|
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
|
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
|
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
||||||
|
tessellator.draw();
|
||||||
|
|
||||||
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||||
|
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
|
||||||
|
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||||
|
|
||||||
|
if(!(block instanceof IBlockSideRotation)) {
|
||||||
|
renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
IBlockSideRotation rot = (IBlockSideRotation) block;
|
||||||
|
|
||||||
|
renderer.uvRotateTop = rot.getRotationFromSide(world, x, y, z, 1);
|
||||||
|
|
||||||
|
renderer.setRenderBounds(0.0, 0.0, 0.0, 1.0, 1.0, 1.0);
|
||||||
|
renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRender3DInInventory(int modelId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderId() {
|
||||||
|
return IBlockSideRotation.getRenderType();
|
||||||
|
}
|
||||||
|
}
|
||||||
230
src/main/java/com/hbm/render/block/RenderConveyorChute.java
Normal file
230
src/main/java/com/hbm/render/block/RenderConveyorChute.java
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
package com.hbm.render.block;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.network.BlockConveyorChute;
|
||||||
|
|
||||||
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
|
import api.hbm.conveyor.IEnterableBlock;
|
||||||
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
public class RenderConveyorChute implements ISimpleBlockRenderingHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderInventoryBlock(Block block, int meta, int modelId, RenderBlocks renderer) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
tessellator.setColorOpaque_F(1, 1, 1);
|
||||||
|
|
||||||
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||||
|
|
||||||
|
meta = 2;
|
||||||
|
|
||||||
|
if(meta == 2) {
|
||||||
|
renderer.uvRotateTop = 3;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
renderer.uvRotateWest = 3;
|
||||||
|
}
|
||||||
|
if(meta == 3) {
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 3;
|
||||||
|
renderer.uvRotateEast = 3;
|
||||||
|
}
|
||||||
|
if(meta == 4) {
|
||||||
|
renderer.uvRotateTop = 1;
|
||||||
|
renderer.uvRotateBottom = 1;
|
||||||
|
renderer.uvRotateSouth = 3;
|
||||||
|
}
|
||||||
|
if(meta == 5) {
|
||||||
|
renderer.uvRotateTop = 2;
|
||||||
|
renderer.uvRotateBottom = 2;
|
||||||
|
renderer.uvRotateNorth = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
renderer.setRenderBounds(0.25D, 0.0D, 0D, 0.75D, 0.25D, 1D); standardBundle(tessellator, block, meta, renderer);
|
||||||
|
renderer.setRenderBounds(0.0D, 0.0D, 0.25D, 0.25D, 0.25D, 0.75D); standardBundle(tessellator, block, meta, renderer);
|
||||||
|
renderer.setRenderBounds(0.75D, 0.0D, 0.25D, 1.0D, 0.25D, 0.75D); standardBundle(tessellator, block, meta, renderer);
|
||||||
|
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
renderer.uvRotateNorth = 0;
|
||||||
|
renderer.uvRotateSouth = 0;
|
||||||
|
renderer.uvRotateEast = 0;
|
||||||
|
renderer.uvRotateWest = 0;
|
||||||
|
|
||||||
|
double minOuter = 0.0;
|
||||||
|
double maxOuter = 1.0;
|
||||||
|
double minInner = 0.25;
|
||||||
|
double maxInner = 0.75;
|
||||||
|
double glassMin = 0.125;
|
||||||
|
double glassMax = 0.875;
|
||||||
|
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, minInner, 1.0, minInner); standardBundle(tessellator, ModBlocks.concrete_smooth, 0, renderer);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, minOuter, maxOuter, 1.0, minInner); standardBundle(tessellator, ModBlocks.concrete_smooth, 0, renderer);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, maxInner, minInner, 1.0, maxOuter); standardBundle(tessellator, ModBlocks.concrete_smooth, 0, renderer);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, maxInner, maxOuter, 1.0, maxOuter); standardBundle(tessellator, ModBlocks.concrete_smooth, 0, renderer);
|
||||||
|
|
||||||
|
IIcon iconGlass = ModBlocks.steel_grate.getIcon(0, 0);
|
||||||
|
renderer.setOverrideBlockTexture(iconGlass);
|
||||||
|
|
||||||
|
renderer.setRenderBounds(glassMin, 0.25, minInner, glassMin, 1.0, maxInner); standardBundle(tessellator, ModBlocks.steel_grate, 2, renderer);
|
||||||
|
renderer.setRenderBounds(glassMax, 0.25, minInner, glassMax, 1.0, maxInner); standardBundle(tessellator, ModBlocks.steel_grate, 2, renderer);
|
||||||
|
renderer.setRenderBounds(minInner, 0.25, glassMin, maxInner, 1.0, glassMin); standardBundle(tessellator, ModBlocks.steel_grate, 2, renderer);
|
||||||
|
|
||||||
|
tessellator.draw();
|
||||||
|
|
||||||
|
renderer.clearOverrideBlockTexture();
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void standardBundle(Tessellator tessellator, Block block, int meta, RenderBlocks renderer) {
|
||||||
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
|
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
|
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
|
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
|
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
|
||||||
|
tessellator.draw();
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||||
|
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||||
|
tessellator.setColorOpaque_F(1, 1, 1);
|
||||||
|
|
||||||
|
boolean belt = false;
|
||||||
|
|
||||||
|
boolean nX = world.getBlock(x - 1, y, z) instanceof IConveyorBelt;
|
||||||
|
boolean pX = world.getBlock(x + 1, y, z) instanceof IConveyorBelt;
|
||||||
|
boolean nZ = world.getBlock(x, y, z - 1) instanceof IConveyorBelt;
|
||||||
|
boolean pZ = world.getBlock(x, y, z + 1) instanceof IConveyorBelt;
|
||||||
|
|
||||||
|
|
||||||
|
if(y > 0) {
|
||||||
|
Block below = world.getBlock(x, y - 1, z);
|
||||||
|
if(!(below instanceof IConveyorBelt || below instanceof IEnterableBlock)) {
|
||||||
|
|
||||||
|
if(meta == 2) {
|
||||||
|
renderer.uvRotateTop = 3;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
renderer.uvRotateWest = 3;
|
||||||
|
}
|
||||||
|
if(meta == 3) {
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 3;
|
||||||
|
renderer.uvRotateEast = 3;
|
||||||
|
}
|
||||||
|
if(meta == 4) {
|
||||||
|
renderer.uvRotateTop = 1;
|
||||||
|
renderer.uvRotateBottom = 1;
|
||||||
|
renderer.uvRotateSouth = 3;
|
||||||
|
}
|
||||||
|
if(meta == 5) {
|
||||||
|
renderer.uvRotateTop = 2;
|
||||||
|
renderer.uvRotateBottom = 2;
|
||||||
|
renderer.uvRotateNorth = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.setRenderBounds(0.25D, 0.0D, 0D, 0.75D, 0.25D, 1D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(0.0D, 0.0D, 0.25D, 0.25D, 0.25D, 0.75D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(0.75D, 0.0D, 0.25D, 1.0D, 0.25D, 0.75D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
renderer.uvRotateNorth = 0;
|
||||||
|
renderer.uvRotateSouth = 0;
|
||||||
|
renderer.uvRotateEast = 0;
|
||||||
|
renderer.uvRotateWest = 0;
|
||||||
|
|
||||||
|
belt = true;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(nX) {
|
||||||
|
renderer.uvRotateTop = 1;
|
||||||
|
renderer.setRenderBounds(0.0D, 0.0D, 0.25D, 0.125D, 0.25D, 0.75D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pX) {
|
||||||
|
renderer.uvRotateTop = 2;
|
||||||
|
renderer.setRenderBounds(0.875D, 0.0D, 0.25D, 1.0D, 0.25D, 0.75D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nZ) {
|
||||||
|
renderer.uvRotateTop = 3;
|
||||||
|
renderer.setRenderBounds(0.25D, 0.0D, 0.0D, 0.75D, 0.25D, 0.125D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pZ) {
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.setRenderBounds(0.25D, 0.0D, 0.875D, 0.75D, 0.25D, 1.0D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IIcon iconSteel = ModBlocks.concrete_smooth.getIcon(0, 0);
|
||||||
|
IIcon iconGlass = ModBlocks.steel_grate.getIcon(0, 0);
|
||||||
|
renderer.setOverrideBlockTexture(iconSteel);
|
||||||
|
|
||||||
|
double minOuter = 0.0;
|
||||||
|
double maxOuter = 1.0;
|
||||||
|
double minInner = 0.25;
|
||||||
|
double maxInner = 0.75;
|
||||||
|
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, minInner, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, minOuter, maxOuter, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, maxInner, minInner, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, maxInner, maxOuter, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
|
double glassMin = 0.125;
|
||||||
|
double glassMax = 0.875;
|
||||||
|
|
||||||
|
renderer.setOverrideBlockTexture(iconGlass);
|
||||||
|
if(!nX && (!belt || meta != 5)) { renderer.setRenderBounds(glassMin, belt ? 0.25 : 0.0, minInner, glassMin, 1.0, maxInner); renderer.renderStandardBlock(block, x, y, z); }
|
||||||
|
if(!pX && (!belt || meta != 4)) { renderer.setRenderBounds(glassMax, belt ? 0.25 : 0.0, minInner, glassMax, 1.0, maxInner); renderer.renderStandardBlock(block, x, y, z); }
|
||||||
|
if(!nZ && (!belt || meta != 3)) { renderer.setRenderBounds(minInner, belt ? 0.25 : 0.0, glassMin, maxInner, 1.0, glassMin); renderer.renderStandardBlock(block, x, y, z); }
|
||||||
|
if(!pZ && (!belt || meta != 2)) { renderer.setRenderBounds(minInner, belt ? 0.25 : 0.0, glassMax, maxInner, 1.0, glassMax); renderer.renderStandardBlock(block, x, y, z); }
|
||||||
|
|
||||||
|
renderer.clearOverrideBlockTexture();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRender3DInInventory(int modelId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderId() {
|
||||||
|
return BlockConveyorChute.renderID;
|
||||||
|
}
|
||||||
|
}
|
||||||
180
src/main/java/com/hbm/render/block/RenderConveyorLift.java
Normal file
180
src/main/java/com/hbm/render/block/RenderConveyorLift.java
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
package com.hbm.render.block;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.network.BlockConveyorLift;
|
||||||
|
|
||||||
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
public class RenderConveyorLift implements ISimpleBlockRenderingHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||||
|
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||||
|
tessellator.setColorOpaque_F(1, 1, 1);
|
||||||
|
|
||||||
|
boolean isBottom = false;
|
||||||
|
boolean isTop = false;
|
||||||
|
|
||||||
|
IIcon iconConcrete = ModBlocks.concrete_smooth.getIcon(0, 0);
|
||||||
|
IIcon iconIron = Blocks.iron_block.getIcon(0, 0);
|
||||||
|
IIcon iconBelt = block.getIcon(0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
if(y > 0) {
|
||||||
|
Block below = world.getBlock(x, y - 1, z);
|
||||||
|
if(!(below instanceof IConveyorBelt)) {
|
||||||
|
|
||||||
|
renderer.setOverrideBlockTexture(iconBelt);
|
||||||
|
|
||||||
|
if(meta != 5) {
|
||||||
|
renderer.uvRotateTop = 1;
|
||||||
|
renderer.uvRotateBottom = 1;
|
||||||
|
renderer.setRenderBounds(0.0D, 0.0D, 0.25D, 0.25D, 0.25D, 0.75D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
if(meta != 4) {
|
||||||
|
renderer.uvRotateTop = 2;
|
||||||
|
renderer.uvRotateBottom = 2;
|
||||||
|
renderer.setRenderBounds(0.75D, 0.0D, 0.25D, 1.0D, 0.25D, 0.75D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
if(meta != 3) {
|
||||||
|
renderer.uvRotateTop = 3;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
renderer.setRenderBounds(0.25D, 0.0D, 0.0D, 0.75D, 0.25D, 0.25D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
if(meta != 2) {
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 3;
|
||||||
|
renderer.setRenderBounds(0.25D, 0.0D, 0.75D, 0.75D, 0.25D, 1.0D); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
|
||||||
|
renderer.clearOverrideBlockTexture();
|
||||||
|
|
||||||
|
isBottom = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(y < 255) {
|
||||||
|
Block above = world.getBlock(x, y + 1, z);
|
||||||
|
isTop = !(above instanceof IConveyorBelt) && !isBottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
double minOuter = 0.0;
|
||||||
|
double maxOuter = 1.0;
|
||||||
|
double minInner = 0.25;
|
||||||
|
double maxInner = 0.75;
|
||||||
|
|
||||||
|
renderer.setOverrideBlockTexture(iconConcrete);
|
||||||
|
|
||||||
|
if(!isTop) {
|
||||||
|
if(meta == 2) {
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, minInner, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, minOuter, maxOuter, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, maxInner, maxOuter, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setOverrideBlockTexture(iconBelt);
|
||||||
|
renderer.uvRotateTop = 3;
|
||||||
|
renderer.setRenderBounds(minInner, 0.0, maxInner - 0.125, maxInner, 1.0, maxInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
if(meta == 3) {
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, maxOuter, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, maxInner, minInner, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, maxInner, maxOuter, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setOverrideBlockTexture(iconBelt);
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.setRenderBounds(minInner, 0.0, minInner, maxInner, 1.0, minInner + 0.125); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
if(meta == 4) {
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, minInner, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, maxInner, minInner, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, minOuter, maxOuter, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setOverrideBlockTexture(iconBelt);
|
||||||
|
renderer.uvRotateTop = 1;
|
||||||
|
renderer.setRenderBounds(maxInner - 0.125, 0.0, minInner, maxInner, 1.0, maxInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
if(meta == 5) {
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, minOuter, maxOuter, 1.0, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, maxInner, maxOuter, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, minInner, 1.0, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setOverrideBlockTexture(iconBelt);
|
||||||
|
renderer.uvRotateTop = 2;
|
||||||
|
renderer.setRenderBounds(minInner, 0.0, minInner, minInner + 0.125, 1.0, maxInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(meta == 2 || meta == 3) {
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, minInner, 0.5, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(maxInner, 0.0, minOuter, maxOuter, 0.5, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.clearOverrideBlockTexture();
|
||||||
|
|
||||||
|
if(meta == 2) {
|
||||||
|
renderer.uvRotateTop = 3;
|
||||||
|
renderer.uvRotateWest = 3;
|
||||||
|
renderer.setRenderBounds(minInner, 0.0, maxInner - 0.125, maxInner, 0.25, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
} else {
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateEast = 3;
|
||||||
|
renderer.setRenderBounds(minInner, 0.0, minOuter, maxInner, 0.25, minInner + 0.125); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(meta == 4 || meta == 5) {
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minOuter, maxOuter, 0.5, minInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, maxInner, maxOuter, 0.5, maxOuter); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
renderer.clearOverrideBlockTexture();
|
||||||
|
|
||||||
|
if(meta == 4) {
|
||||||
|
renderer.uvRotateTop = 1;
|
||||||
|
renderer.uvRotateSouth = 3;
|
||||||
|
renderer.setRenderBounds(maxInner - 0.125, 0.0, minInner, maxOuter, 0.25, maxInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
} else {
|
||||||
|
renderer.uvRotateTop = 2;
|
||||||
|
renderer.uvRotateNorth = 3;
|
||||||
|
renderer.setRenderBounds(minOuter, 0.0, minInner, minInner + 0.125, 0.25, maxInner); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.uvRotateTop = 0;
|
||||||
|
renderer.uvRotateBottom = 0;
|
||||||
|
renderer.uvRotateNorth = 0;
|
||||||
|
renderer.uvRotateSouth = 0;
|
||||||
|
renderer.uvRotateEast = 0;
|
||||||
|
renderer.uvRotateWest = 0;
|
||||||
|
|
||||||
|
if(isBottom) {
|
||||||
|
renderer.setOverrideBlockTexture(iconIron);
|
||||||
|
renderer.setRenderBounds(0.25 + (meta == 5 ? 0.125 : 0), 0, 0.25 + (meta == 3 ? 0.125 : 0), 0.75 - (meta == 4 ? 0.125 : 0), 0.25, 0.75 - (meta == 2 ? 0.125 : 0)); renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
renderer.clearOverrideBlockTexture();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRender3DInInventory(int modelId) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderId() {
|
||||||
|
return BlockConveyorLift.renderID;
|
||||||
|
}
|
||||||
|
}
|
||||||
113
src/main/java/com/hbm/render/entity/effect/RenderTorex.java
Normal file
113
src/main/java/com/hbm/render/entity/effect/RenderTorex.java
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
package com.hbm.render.entity.effect;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.entity.effect.EntityNukeTorex;
|
||||||
|
import com.hbm.entity.effect.EntityNukeTorex.Cloudlet;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.main.MainRegistry;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.client.renderer.entity.Render;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
|
||||||
|
public class RenderTorex extends Render {
|
||||||
|
|
||||||
|
private static final ResourceLocation cloudlet = new ResourceLocation(RefStrings.MODID + ":textures/particle/particle_base.png");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doRender(Entity entity, double x, double y, double z, float f0, float interp) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x, y, z);
|
||||||
|
EntityNukeTorex cloud = (EntityNukeTorex)entity;
|
||||||
|
cloudletWrapper(cloud, interp);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Comparator cloudSorter = new Comparator() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compare(Object arg0, Object arg1) {
|
||||||
|
Cloudlet first = (Cloudlet) arg0;
|
||||||
|
Cloudlet second = (Cloudlet) arg1;
|
||||||
|
EntityPlayer player = MainRegistry.proxy.me();
|
||||||
|
double dist1 = player.getDistanceSq(first.posX, first.posY, first.posZ);
|
||||||
|
double dist2 = player.getDistanceSq(second.posX, second.posY, second.posZ);
|
||||||
|
|
||||||
|
return dist1 > dist2 ? -1 : dist1 == dist2 ? 0 : 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private void cloudletWrapper(EntityNukeTorex cloud, float interp) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||||
|
// To prevent particles cutting off before fully fading out
|
||||||
|
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
|
||||||
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
|
GL11.glDepthMask(false);
|
||||||
|
RenderHelper.disableStandardItemLighting();
|
||||||
|
|
||||||
|
bindTexture(cloudlet);
|
||||||
|
|
||||||
|
Tessellator tess = Tessellator.instance;
|
||||||
|
tess.startDrawingQuads();
|
||||||
|
|
||||||
|
ArrayList<Cloudlet> cloudlets = new ArrayList(cloud.cloudlets);
|
||||||
|
cloudlets.sort(cloudSorter);
|
||||||
|
|
||||||
|
for(Cloudlet cloudlet : cloudlets) {
|
||||||
|
Vec3 vec = cloudlet.getInterpPos(interp);
|
||||||
|
tessellateCloudlet(tess, vec.xCoord - cloud.posX, vec.yCoord - cloud.posY, vec.zCoord - cloud.posZ, cloudlet, interp);
|
||||||
|
}
|
||||||
|
|
||||||
|
tess.draw();
|
||||||
|
|
||||||
|
GL11.glDepthMask(true);
|
||||||
|
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||||
|
RenderHelper.enableStandardItemLighting();
|
||||||
|
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tessellateCloudlet(Tessellator tess, double posX, double posY, double posZ, Cloudlet cloud, float interp) {
|
||||||
|
|
||||||
|
float alpha = 1F - ((float)cloud.age / (float)EntityNukeTorex.cloudletLife);
|
||||||
|
float scale = 1F + ((float)cloud.age / (float)EntityNukeTorex.cloudletLife) * 5;
|
||||||
|
|
||||||
|
float f1 = ActiveRenderInfo.rotationX;
|
||||||
|
float f2 = ActiveRenderInfo.rotationZ;
|
||||||
|
float f3 = ActiveRenderInfo.rotationYZ;
|
||||||
|
float f4 = ActiveRenderInfo.rotationXY;
|
||||||
|
float f5 = ActiveRenderInfo.rotationXZ;
|
||||||
|
|
||||||
|
//Random rand = new Random((long) ((posX * 5 + posY * 25 + posZ * 125) * 1000D));
|
||||||
|
|
||||||
|
float brightness = 0.75F * cloud.colorMod;
|
||||||
|
Vec3 color = cloud.getInterpColor(interp);
|
||||||
|
tess.setColorRGBA_F((float)color.xCoord * brightness, (float)color.yCoord * brightness, (float)color.zCoord * brightness, alpha);
|
||||||
|
|
||||||
|
tess.addVertexWithUV((double) (posX - f1 * scale - f3 * scale), (double) (posY - f5 * scale), (double) (posZ - f2 * scale - f4 * scale), 1, 1);
|
||||||
|
tess.addVertexWithUV((double) (posX - f1 * scale + f3 * scale), (double) (posY + f5 * scale), (double) (posZ - f2 * scale + f4 * scale), 1, 0);
|
||||||
|
tess.addVertexWithUV((double) (posX + f1 * scale + f3 * scale), (double) (posY + f5 * scale), (double) (posZ + f2 * scale + f4 * scale), 0, 0);
|
||||||
|
tess.addVertexWithUV((double) (posX + f1 * scale - f3 * scale), (double) (posY - f5 * scale), (double) (posZ + f2 * scale - f4 * scale), 0, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
package com.hbm.render.entity.item;
|
package com.hbm.render.entity.item;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.entity.item.EntityMovingItem;
|
import com.hbm.entity.item.EntityMovingItem;
|
||||||
@ -21,6 +23,9 @@ public class RenderMovingItem extends Render {
|
|||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslated(x, y, z);
|
GL11.glTranslated(x, y, z);
|
||||||
|
|
||||||
|
Random rand = new Random(entity.getEntityId());
|
||||||
|
GL11.glTranslated(0, rand.nextDouble() * 0.0625, 0);
|
||||||
|
|
||||||
EntityMovingItem item = (EntityMovingItem) entity;
|
EntityMovingItem item = (EntityMovingItem) entity;
|
||||||
ItemStack stack = item.getItemStack().copy();
|
ItemStack stack = item.getItemStack().copy();
|
||||||
|
|
||||||
|
|||||||
@ -1307,6 +1307,18 @@ public class ItemRenderLibrary {
|
|||||||
}
|
}
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
renderers.put(Item.getItemFromBlock(ModBlocks.furnace_iron), new ItemRenderBase( ) {
|
||||||
|
public void renderInventory() {
|
||||||
|
GL11.glTranslated(0, -2, 0);
|
||||||
|
GL11.glScaled(5, 5, 5);
|
||||||
|
}
|
||||||
|
public void renderCommon() {
|
||||||
|
GL11.glRotated(90, 0, 1, 0);
|
||||||
|
bindTexture(ResourceManager.furnace_iron_tex);
|
||||||
|
ResourceManager.furnace_iron.renderPart("Main");
|
||||||
|
ResourceManager.furnace_iron.renderPart("Off");
|
||||||
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void bindTexture(ResourceLocation res) {
|
private static void bindTexture(ResourceLocation res) {
|
||||||
|
|||||||
@ -0,0 +1,54 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityFurnaceIron;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class RenderFurnaceIron extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
|
|
||||||
|
switch(tileEntity.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glTranslated(-0.5D, 0, -0.5D);
|
||||||
|
|
||||||
|
TileEntityFurnaceIron furnace = (TileEntityFurnaceIron) tileEntity;
|
||||||
|
|
||||||
|
bindTexture(ResourceManager.furnace_iron_tex);
|
||||||
|
ResourceManager.furnace_iron.renderPart("Main");
|
||||||
|
|
||||||
|
if(furnace.wasOn) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||||
|
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||||
|
ResourceManager.furnace_iron.renderPart("On");
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
|
||||||
|
GL11.glPopAttrib();
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
} else {
|
||||||
|
ResourceManager.furnace_iron.renderPart("Off");
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
|
import com.hbm.tileentity.turret.TileEntityTurretArty;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
|
||||||
|
public class RenderTurretArty extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
|
||||||
|
|
||||||
|
TileEntityTurretArty turret = (TileEntityTurretArty)te;
|
||||||
|
Vec3 pos = turret.getHorizontalOffset();
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x + pos.xCoord, y, z + pos.zCoord);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
|
||||||
|
bindTexture(ResourceManager.turret_arty_tex);
|
||||||
|
ResourceManager.turret_arty.renderPart("Base");
|
||||||
|
double yaw = -Math.toDegrees(turret.lastRotationYaw + (turret.rotationYaw - turret.lastRotationYaw) * interp) - 90D;
|
||||||
|
double pitch = Math.toDegrees(turret.lastRotationPitch + (turret.rotationPitch - turret.lastRotationPitch) * interp);
|
||||||
|
|
||||||
|
GL11.glRotated(yaw - 90, 0, 1, 0);
|
||||||
|
ResourceManager.turret_arty.renderPart("Carriage");
|
||||||
|
|
||||||
|
GL11.glTranslated(0, 3, 0);
|
||||||
|
GL11.glRotated(pitch, 1, 0, 0);
|
||||||
|
GL11.glTranslated(0, -3, 0);
|
||||||
|
ResourceManager.turret_arty.renderPart("Cannon");
|
||||||
|
ResourceManager.turret_arty.renderPart("Barrel");
|
||||||
|
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -243,9 +243,11 @@ public class TileMappings {
|
|||||||
put(TileEntityTurretMaxwell.class, "tileentity_turret_maxwell");
|
put(TileEntityTurretMaxwell.class, "tileentity_turret_maxwell");
|
||||||
put(TileEntityTurretFritz.class, "tileentity_turret_fritz");
|
put(TileEntityTurretFritz.class, "tileentity_turret_fritz");
|
||||||
put(TileEntityTurretBrandon.class, "tileentity_turret_brandon");
|
put(TileEntityTurretBrandon.class, "tileentity_turret_brandon");
|
||||||
|
put(TileEntityTurretArty.class, "tileentity_turret_arty");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void putMachines() {
|
private static void putMachines() {
|
||||||
|
put(TileEntityFurnaceIron.class, "tileentity_furnace_iron");
|
||||||
put(TileEntityMachineAutocrafter.class, "tileentity_autocrafter");
|
put(TileEntityMachineAutocrafter.class, "tileentity_autocrafter");
|
||||||
put(TileEntityDiFurnaceRTG.class, "tileentity_rtg_difurnace");
|
put(TileEntityDiFurnaceRTG.class, "tileentity_rtg_difurnace");
|
||||||
put(TileEntityMachineRadiolysis.class, "tileentity_radiolysis");
|
put(TileEntityMachineRadiolysis.class, "tileentity_radiolysis");
|
||||||
@ -315,6 +317,9 @@ public class TileMappings {
|
|||||||
put(TileEntityPylon.class, "tileentity_pylon_redwire");
|
put(TileEntityPylon.class, "tileentity_pylon_redwire");
|
||||||
put(TileEntityPylonLarge.class, "tileentity_pylon_large");
|
put(TileEntityPylonLarge.class, "tileentity_pylon_large");
|
||||||
put(TileEntitySubstation.class, "tileentity_substation");
|
put(TileEntitySubstation.class, "tileentity_substation");
|
||||||
|
|
||||||
|
put(TileEntityCraneInserter.class, "tileentity_inserter");
|
||||||
|
put(TileEntityCraneExtractor.class, "tileentity_extractor");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void put(Class<? extends TileEntity> clazz, String... names) {
|
private static void put(Class<? extends TileEntity> clazz, String... names) {
|
||||||
|
|||||||
@ -35,6 +35,7 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
|||||||
private int turnTimer;
|
private int turnTimer;
|
||||||
public float rotor;
|
public float rotor;
|
||||||
public float lastRotor;
|
public float lastRotor;
|
||||||
|
public float fanAcceleration = 0F;
|
||||||
|
|
||||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||||
|
|
||||||
@ -101,16 +102,17 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.lastRotor = this.rotor;
|
this.lastRotor = this.rotor;
|
||||||
|
this.rotor += this.fanAcceleration;
|
||||||
if(turnTimer > 0) {
|
|
||||||
|
|
||||||
this.rotor += 25F;
|
|
||||||
|
|
||||||
if(this.rotor >= 360) {
|
if(this.rotor >= 360) {
|
||||||
this.rotor -= 360;
|
this.rotor -= 360;
|
||||||
this.lastRotor -= 360;
|
this.lastRotor -= 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(turnTimer > 0) {
|
||||||
|
|
||||||
|
this.fanAcceleration = Math.max(0F, Math.min(25F, this.fanAcceleration += 0.1F));
|
||||||
|
|
||||||
Random rand = worldObj.rand;
|
Random rand = worldObj.rand;
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||||
ForgeDirection side = dir.getRotation(ForgeDirection.UP);
|
ForgeDirection side = dir.getRotation(ForgeDirection.UP);
|
||||||
@ -123,6 +125,9 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
|||||||
-dir.offsetX * 0.2, 0, -dir.offsetZ * 0.2);
|
-dir.offsetX * 0.2, 0, -dir.offsetZ * 0.2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(turnTimer < 0) {
|
||||||
|
this.fanAcceleration = Math.max(0F, Math.min(25F, this.fanAcceleration -= 0.1F));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,218 @@
|
|||||||
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import com.hbm.inventory.UpgradeManager;
|
||||||
|
import com.hbm.inventory.container.ContainerFurnaceIron;
|
||||||
|
import com.hbm.inventory.gui.GUIFurnaceIron;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||||
|
import com.hbm.module.ModuleBurnTime;
|
||||||
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
|
import api.hbm.energy.IBatteryItem;
|
||||||
|
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.item.ItemStack;
|
||||||
|
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntityFurnace;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class TileEntityFurnaceIron extends TileEntityMachineBase implements IGUIProvider {
|
||||||
|
|
||||||
|
public int maxBurnTime;
|
||||||
|
public int burnTime;
|
||||||
|
public boolean wasOn = false;
|
||||||
|
|
||||||
|
public int progress;
|
||||||
|
public int processingTime;
|
||||||
|
public static final int baseTime = 200;
|
||||||
|
|
||||||
|
public ModuleBurnTime burnModule;
|
||||||
|
|
||||||
|
public TileEntityFurnaceIron() {
|
||||||
|
super(5);
|
||||||
|
|
||||||
|
burnModule = new ModuleBurnTime()
|
||||||
|
.setLigniteMod(1.25)
|
||||||
|
.setCoalMod(1.25)
|
||||||
|
.setCokeMod(1.5)
|
||||||
|
.setSolidMod(2)
|
||||||
|
.setRocketMod(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "container.furnaceIron";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity() {
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
UpgradeManager.eval(slots, 4, 4);
|
||||||
|
this.processingTime = baseTime - (100 * Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3) / 3);
|
||||||
|
|
||||||
|
wasOn = false;
|
||||||
|
|
||||||
|
if(burnTime <= 0) {
|
||||||
|
|
||||||
|
for(int i = 1; i < 3; i++) {
|
||||||
|
if(slots[i] != null) {
|
||||||
|
|
||||||
|
int fuel = burnModule.getBurnTime(slots[i]);
|
||||||
|
//int fuel = TileEntityFurnace.getItemBurnTime(slots[i]);
|
||||||
|
|
||||||
|
if(fuel > 0) {
|
||||||
|
this.maxBurnTime = this.burnTime = fuel;
|
||||||
|
slots[i].stackSize--;
|
||||||
|
|
||||||
|
if(slots[i].stackSize == 0) {
|
||||||
|
slots[i] = slots[i].getItem().getContainerItem(slots[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(canSmelt()) {
|
||||||
|
wasOn = true;
|
||||||
|
this.progress++;
|
||||||
|
this.burnTime--;
|
||||||
|
|
||||||
|
if(this.progress % 15 == 0) {
|
||||||
|
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "fire.fire", 1.0F, 0.5F + worldObj.rand.nextFloat() * 0.5F);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.progress >= this.processingTime) {
|
||||||
|
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(slots[0]);
|
||||||
|
|
||||||
|
if(slots[3] == null) {
|
||||||
|
slots[3] = result.copy();
|
||||||
|
} else {
|
||||||
|
slots[3].stackSize += result.stackSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.decrStackSize(0, 1);
|
||||||
|
|
||||||
|
this.progress = 0;
|
||||||
|
this.markDirty();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.progress = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setInteger("maxBurnTime", this.maxBurnTime);
|
||||||
|
data.setInteger("burnTime", this.burnTime);
|
||||||
|
data.setInteger("progress", this.progress);
|
||||||
|
data.setInteger("processingTime", this.processingTime);
|
||||||
|
data.setBoolean("wasOn", this.wasOn);
|
||||||
|
this.networkPack(data, 50);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(this.progress > 0) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
double offset = this.progress % 2 == 0 ? 1 : 0.5;
|
||||||
|
worldObj.spawnParticle("smoke", xCoord + 0.5 - dir.offsetX * offset - rot.offsetX * 0.1875, yCoord + 2, zCoord + 0.5 - dir.offsetZ * offset - rot.offsetZ * 0.1875, 0.0, 0.01, 0.0);
|
||||||
|
|
||||||
|
if(this.progress % 5 == 0) {
|
||||||
|
double rand = worldObj.rand.nextDouble();
|
||||||
|
worldObj.spawnParticle("flame", xCoord + 0.5 + dir.offsetX * 0.25 + rot.offsetX * rand, yCoord + 0.25 + worldObj.rand.nextDouble() * 0.25, zCoord + 0.5 + dir.offsetZ * 0.25 + rot.offsetZ * rand, 0.0, 0.0, 0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void networkUnpack(NBTTagCompound nbt) {
|
||||||
|
this.maxBurnTime = nbt.getInteger("maxBurnTime");
|
||||||
|
this.burnTime = nbt.getInteger("burnTime");
|
||||||
|
this.progress = nbt.getInteger("progress");
|
||||||
|
this.processingTime = nbt.getInteger("processingTime");
|
||||||
|
this.wasOn = nbt.getBoolean("wasOn");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canSmelt() {
|
||||||
|
|
||||||
|
if(this.burnTime <= 0) return false;
|
||||||
|
if(slots[0] == null) return false;
|
||||||
|
|
||||||
|
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(slots[0]);
|
||||||
|
|
||||||
|
if(result == null) return false;
|
||||||
|
if(slots[3] == null) return true;
|
||||||
|
|
||||||
|
if(!result.isItemEqual(slots[3])) return false;
|
||||||
|
if(result.stackSize + slots[3].stackSize > slots[3].getMaxStackSize()) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getAccessibleSlotsFromSide(int meta) {
|
||||||
|
return new int[] { 0, 1, 2, 3 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||||
|
|
||||||
|
if(i == 0)
|
||||||
|
return FurnaceRecipes.smelting().getSmeltingResult(itemStack) != null;
|
||||||
|
|
||||||
|
if(i < 3)
|
||||||
|
return burnModule.getBurnTime(itemStack) > 0;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||||
|
return i == 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new ContainerFurnaceIron(player.inventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new GUIFurnaceIron(player.inventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
|
||||||
|
if(bb == null) {
|
||||||
|
bb = AxisAlignedBB.getBoundingBox(
|
||||||
|
xCoord - 1,
|
||||||
|
yCoord,
|
||||||
|
zCoord - 1,
|
||||||
|
xCoord + 2,
|
||||||
|
yCoord + 3,
|
||||||
|
zCoord + 2
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public double getMaxRenderDistanceSquared() {
|
||||||
|
return 65536.0D;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,6 +5,9 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.machine.MachineITER;
|
import com.hbm.blocks.machine.MachineITER;
|
||||||
|
import com.hbm.explosion.ExplosionLarge;
|
||||||
|
import com.hbm.explosion.ExplosionNT;
|
||||||
|
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.interfaces.IFluidSource;
|
import com.hbm.interfaces.IFluidSource;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
@ -17,10 +20,13 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.special.ItemFusionShield;
|
import com.hbm.items.special.ItemFusionShield;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.packet.AuxParticlePacketNT;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
import api.hbm.energy.IEnergyUser;
|
import api.hbm.energy.IEnergyUser;
|
||||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||||
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@ -86,11 +92,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
|
|
||||||
//explode either if there's plasma that is too hot or if the reactor is turned on but the magnets have no power
|
//explode either if there's plasma that is too hot or if the reactor is turned on but the magnets have no power
|
||||||
if(plasma.getFill() > 0 && (this.plasma.getTankType().temperature >= this.getShield() || (this.isOn && this.power < this.powerReq))) {
|
if(plasma.getFill() > 0 && (this.plasma.getTankType().temperature >= this.getShield() || (this.isOn && this.power < this.powerReq))) {
|
||||||
this.disassemble();
|
this.explode();
|
||||||
Vec3 vec = Vec3.createVectorHelper(5.5, 0, 0);
|
|
||||||
vec.rotateAroundY(worldObj.rand.nextFloat() * (float)Math.PI * 2F);
|
|
||||||
|
|
||||||
worldObj.newExplosion(null, xCoord + 0.5 + vec.xCoord, yCoord + 0.5 + worldObj.rand.nextGaussian() * 1.5D, zCoord + 0.5 + vec.zCoord, 2.5F, true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isOn && power >= powerReq) {
|
if(isOn && power >= powerReq) {
|
||||||
@ -183,6 +185,37 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void explode() {
|
||||||
|
this.disassemble();
|
||||||
|
|
||||||
|
if(this.plasma.getTankType() == Fluids.PLASMA_BF) {
|
||||||
|
|
||||||
|
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
|
||||||
|
ExplosionLarge.spawnShrapnels(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 50);
|
||||||
|
|
||||||
|
ExplosionNT exp = new ExplosionNT(worldObj, null, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 20F)
|
||||||
|
.addAttrib(ExAttrib.BALEFIRE)
|
||||||
|
.addAttrib(ExAttrib.NOPARTICLE)
|
||||||
|
.addAttrib(ExAttrib.NOSOUND)
|
||||||
|
.addAttrib(ExAttrib.NODROP)
|
||||||
|
.overrideResolution(64);
|
||||||
|
exp.doExplosionA();
|
||||||
|
exp.doExplosionB(false);
|
||||||
|
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setString("type", "muke");
|
||||||
|
data.setBoolean("balefire", true);
|
||||||
|
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(5.5, 0, 0);
|
||||||
|
vec.rotateAroundY(worldObj.rand.nextFloat() * (float)Math.PI * 2F);
|
||||||
|
|
||||||
|
worldObj.newExplosion(null, xCoord + 0.5 + vec.xCoord, yCoord + 0.5 + worldObj.rand.nextGaussian() * 1.5D, zCoord + 0.5 + vec.zCoord, 2.5F, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void doBreederStuff() {
|
private void doBreederStuff() {
|
||||||
|
|
||||||
if(plasma.getFill() == 0) {
|
if(plasma.getFill() == 0) {
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
@ -11,7 +7,6 @@ import com.hbm.inventory.fluid.FluidType;
|
|||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.types.FluidTypeFlammable;
|
import com.hbm.inventory.fluid.types.FluidTypeFlammable;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemRTGPellet;
|
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.util.RTGUtil;
|
import com.hbm.util.RTGUtil;
|
||||||
|
|||||||
@ -33,6 +33,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
private boolean shouldTurn;
|
private boolean shouldTurn;
|
||||||
public float rotor;
|
public float rotor;
|
||||||
public float lastRotor;
|
public float lastRotor;
|
||||||
|
public float fanAcceleration = 0F;
|
||||||
|
|
||||||
public TileEntityMachineLargeTurbine() {
|
public TileEntityMachineLargeTurbine() {
|
||||||
super(7);
|
super(7);
|
||||||
@ -104,17 +105,20 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
|||||||
data.setBoolean("operational", operational);
|
data.setBoolean("operational", operational);
|
||||||
this.networkPack(data, 50);
|
this.networkPack(data, 50);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.lastRotor = this.rotor;
|
this.lastRotor = this.rotor;
|
||||||
|
this.rotor += this.fanAcceleration;
|
||||||
if(shouldTurn) {
|
|
||||||
|
|
||||||
this.rotor += 15F;
|
|
||||||
|
|
||||||
if(this.rotor >= 360) {
|
if(this.rotor >= 360) {
|
||||||
this.rotor -= 360;
|
this.rotor -= 360;
|
||||||
this.lastRotor -= 360;
|
this.lastRotor -= 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(shouldTurn) {
|
||||||
|
|
||||||
|
this.fanAcceleration = Math.max(0F, Math.min(15F, this.fanAcceleration += 0.1F));
|
||||||
|
}
|
||||||
|
if(!shouldTurn) {
|
||||||
|
this.fanAcceleration = Math.max(0F, Math.min(15F, this.fanAcceleration -= 0.1F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,12 +22,29 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
public class TileEntityZirnoxDestroyed extends TileEntity {
|
public class TileEntityZirnoxDestroyed extends TileEntity {
|
||||||
|
|
||||||
|
public boolean onFire = true;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
onFire = nbt.getBoolean("fire");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
nbt.setBoolean("onFire", onFire);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
radiate(worldObj, this.xCoord, this.yCoord, this.zCoord);
|
radiate(worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||||
|
|
||||||
if(this.worldObj.getTotalWorldTime() % 50 == 0) {
|
if(this.worldObj.rand.nextInt(5000) == 0)
|
||||||
|
onFire = false;
|
||||||
|
|
||||||
|
if(onFire && this.worldObj.getTotalWorldTime() % 50 == 0) {
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
data.setString("type", "rbmkflame");
|
data.setString("type", "rbmkflame");
|
||||||
data.setInteger("maxAge", 90);
|
data.setInteger("maxAge", 90);
|
||||||
@ -40,7 +57,7 @@ public class TileEntityZirnoxDestroyed extends TileEntity {
|
|||||||
|
|
||||||
private void radiate(World world, int x, int y, int z) {
|
private void radiate(World world, int x, int y, int z) {
|
||||||
|
|
||||||
float rads = 500000F;
|
float rads = onFire ? 500000F : 75000F;
|
||||||
double range = 100D;
|
double range = 100D;
|
||||||
|
|
||||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5).expand(range, range, range));
|
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5).expand(range, range, range));
|
||||||
@ -71,7 +88,7 @@ public class TileEntityZirnoxDestroyed extends TileEntity {
|
|||||||
|
|
||||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads);
|
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads);
|
||||||
|
|
||||||
if(len < 5) {
|
if(onFire && len < 5) {
|
||||||
e.attackEntityFrom(DamageSource.onFire, 2);
|
e.attackEntityFrom(DamageSource.onFire, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,17 +64,17 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
|||||||
rod.updateHeat(worldObj, slots[0], 1.0D);
|
rod.updateHeat(worldObj, slots[0], 1.0D);
|
||||||
this.heat += rod.provideHeat(worldObj, slots[0], heat, 1.0D);
|
this.heat += rod.provideHeat(worldObj, slots[0], heat, 1.0D);
|
||||||
|
|
||||||
if(this.heat > this.maxHeat() && !RBMKDials.getMeltdownsDisabled(worldObj)) {
|
|
||||||
this.meltdown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!this.hasLid()) {
|
if(!this.hasLid()) {
|
||||||
ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, (float) ((this.fluxFast + this.fluxSlow) * 0.05F));
|
ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, (float) ((this.fluxFast + this.fluxSlow) * 0.05F));
|
||||||
}
|
}
|
||||||
|
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|
||||||
|
if(this.heat > this.maxHeat() && !RBMKDials.getMeltdownsDisabled(worldObj)) {
|
||||||
|
this.meltdown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//for spreading, we want the buffered flux to be 0 because we want to know exactly how much gets reflected back
|
//for spreading, we want the buffered flux to be 0 because we want to know exactly how much gets reflected back
|
||||||
this.fluxFast = 0;
|
this.fluxFast = 0;
|
||||||
this.fluxSlow = 0;
|
this.fluxSlow = 0;
|
||||||
|
|||||||
@ -143,4 +143,19 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements INBTPa
|
|||||||
this.output = !output;
|
this.output = !output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||||
|
return !this.isLocked() && i == 0 && (this.getType() == null || (getType().isItemEqual(itemStack) && ItemStack.areItemStackTagsEqual(itemStack, getType())));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||||
|
return !this.isLocked() && i == 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getAccessibleSlotsFromSide(int side) {
|
||||||
|
return new int[] { 0, 2 };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,38 @@
|
|||||||
package com.hbm.tileentity.network;
|
package com.hbm.tileentity.network;
|
||||||
|
|
||||||
|
import com.hbm.entity.item.EntityMovingItem;
|
||||||
|
import com.hbm.interfaces.IControlReceiver;
|
||||||
|
import com.hbm.inventory.container.ContainerCraneExtractor;
|
||||||
|
import com.hbm.inventory.gui.GUICraneExtractor;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.module.ModulePatternMatcher;
|
||||||
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
public class TileEntityCraneExtractor extends TileEntityMachineBase {
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class TileEntityCraneExtractor extends TileEntityMachineBase implements IGUIProvider, IControlReceiver {
|
||||||
|
|
||||||
|
public boolean isWhitelist = false;
|
||||||
|
public ModulePatternMatcher matcher;
|
||||||
|
|
||||||
public TileEntityCraneExtractor() {
|
public TileEntityCraneExtractor() {
|
||||||
super(20);
|
super(20);
|
||||||
|
this.matcher = new ModulePatternMatcher(9);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -16,5 +43,188 @@ public class TileEntityCraneExtractor extends TileEntityMachineBase {
|
|||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
int delay = 20;
|
||||||
|
|
||||||
|
if(slots[19] != null && slots[19].getItem() == ModItems.upgrade_ejector) {
|
||||||
|
switch(slots[19].getItemDamage()) {
|
||||||
|
case 0: delay = 10; break;
|
||||||
|
case 1: delay = 5; break;
|
||||||
|
case 2: delay = 2; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean powered = false;
|
||||||
|
|
||||||
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
if(this.worldObj.isBlockIndirectlyGettingPowered(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ)) {
|
||||||
|
powered = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(worldObj.getTotalWorldTime() % delay == 0 && !powered) {
|
||||||
|
int amount = 1;
|
||||||
|
|
||||||
|
if(slots[18] != null && slots[18].getItem() == ModItems.upgrade_stack) {
|
||||||
|
switch(slots[18].getItemDamage()) {
|
||||||
|
case 0: amount = 4; break;
|
||||||
|
case 1: amount = 16; break;
|
||||||
|
case 2: amount = 64; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||||
|
TileEntity te = worldObj.getTileEntity(xCoord - dir.offsetX, yCoord - dir.offsetY, zCoord - dir.offsetZ);
|
||||||
|
Block b = worldObj.getBlock(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ);
|
||||||
|
|
||||||
|
int[] access = null;
|
||||||
|
ISidedInventory sided = null;
|
||||||
|
|
||||||
|
if(te instanceof ISidedInventory) {
|
||||||
|
sided = (ISidedInventory) te;
|
||||||
|
access = sided.getAccessibleSlotsFromSide(dir.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean hasSent = false;
|
||||||
|
|
||||||
|
if(b instanceof IConveyorBelt) {
|
||||||
|
|
||||||
|
IConveyorBelt belt = (IConveyorBelt) b;
|
||||||
|
|
||||||
|
/* try to send items from a connected inv, if present */
|
||||||
|
if(te instanceof IInventory) {
|
||||||
|
|
||||||
|
IInventory inv = (IInventory) te;
|
||||||
|
int size = access == null ? inv.getSizeInventory() : access.length;
|
||||||
|
|
||||||
|
for(int i = 0; i < size; i++) {
|
||||||
|
int index = access == null ? i : access[i];
|
||||||
|
ItemStack stack = inv.getStackInSlot(index);
|
||||||
|
|
||||||
|
if(stack != null && (sided == null || sided.canExtractItem(index, stack, dir.ordinal()))){
|
||||||
|
|
||||||
|
boolean match = this.matchesFilter(stack);
|
||||||
|
|
||||||
|
if((isWhitelist && match) || (!isWhitelist && !match)) {
|
||||||
|
stack = stack.copy();
|
||||||
|
int toSend = Math.min(amount, stack.stackSize);
|
||||||
|
inv.decrStackSize(index, toSend);
|
||||||
|
stack.stackSize = toSend;
|
||||||
|
|
||||||
|
EntityMovingItem moving = new EntityMovingItem(worldObj);
|
||||||
|
Vec3 pos = Vec3.createVectorHelper(xCoord + 0.5 + dir.offsetX * 0.55, yCoord + 0.5 + dir.offsetY * 0.55, zCoord + 0.5 + dir.offsetZ * 0.55);
|
||||||
|
Vec3 snap = belt.getClosestSnappingPosition(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, pos);
|
||||||
|
moving.setPosition(snap.xCoord, snap.yCoord, snap.zCoord);
|
||||||
|
moving.setItemStack(stack);
|
||||||
|
worldObj.spawnEntityInWorld(moving);
|
||||||
|
hasSent = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if no item has been sent, send buffered items while ignoring the filter */
|
||||||
|
if(!hasSent) {
|
||||||
|
|
||||||
|
for(int i = 9; i < 18; i++) {
|
||||||
|
ItemStack stack = slots[i];
|
||||||
|
|
||||||
|
if(stack != null){
|
||||||
|
stack = stack.copy();
|
||||||
|
int toSend = Math.min(amount, stack.stackSize);
|
||||||
|
decrStackSize(i, toSend);
|
||||||
|
stack.stackSize = toSend;
|
||||||
|
|
||||||
|
EntityMovingItem moving = new EntityMovingItem(worldObj);
|
||||||
|
Vec3 pos = Vec3.createVectorHelper(xCoord + 0.5 + dir.offsetX * 0.55, yCoord + 0.5 + dir.offsetY * 0.55, zCoord + 0.5 + dir.offsetZ * 0.55);
|
||||||
|
Vec3 snap = belt.getClosestSnappingPosition(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, pos);
|
||||||
|
moving.setPosition(snap.xCoord, snap.yCoord, snap.zCoord);
|
||||||
|
moving.setItemStack(stack);
|
||||||
|
worldObj.spawnEntityInWorld(moving);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setBoolean("isWhitelist", isWhitelist);
|
||||||
|
this.matcher.writeToNBT(data);
|
||||||
|
this.networkPack(data, 15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void networkUnpack(NBTTagCompound nbt) {
|
||||||
|
this.isWhitelist = nbt.getBoolean("isWhitelist");
|
||||||
|
this.matcher.modes = new String[this.matcher.modes.length];
|
||||||
|
this.matcher.readFromNBT(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean matchesFilter(ItemStack stack) {
|
||||||
|
|
||||||
|
for(int i = 0; i < 9; i++) {
|
||||||
|
ItemStack filter = slots[i];
|
||||||
|
|
||||||
|
if(filter != null && this.matcher.isValidForFilter(filter, i, stack)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void nextMode(int i) {
|
||||||
|
this.matcher.nextMode(worldObj, slots[i], i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||||
|
return i > 8 && i < 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||||
|
return i > 8 && i < 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new ContainerCraneExtractor(player.inventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new GUICraneExtractor(player.inventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
this.isWhitelist = nbt.getBoolean("isWhitelist");
|
||||||
|
this.matcher.readFromNBT(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
nbt.setBoolean("isWhitelist", this.isWhitelist);
|
||||||
|
this.matcher.writeToNBT(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPermission(EntityPlayer player) {
|
||||||
|
return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void receiveControl(NBTTagCompound data) {
|
||||||
|
if(data.hasKey("whitelist")) {
|
||||||
|
this.isWhitelist = !this.isWhitelist;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.hbm.tileentity.network;
|
package com.hbm.tileentity.network;
|
||||||
|
|
||||||
|
import com.hbm.blocks.network.CraneInserter;
|
||||||
import com.hbm.inventory.container.ContainerCraneInserter;
|
import com.hbm.inventory.container.ContainerCraneInserter;
|
||||||
import com.hbm.inventory.gui.GUICraneInserter;
|
import com.hbm.inventory.gui.GUICraneInserter;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
@ -10,10 +11,17 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class TileEntityCraneInserter extends TileEntityMachineBase implements IGUIProvider {
|
public class TileEntityCraneInserter extends TileEntityMachineBase implements IGUIProvider {
|
||||||
|
|
||||||
|
public static final int[] access = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
|
||||||
|
|
||||||
public TileEntityCraneInserter() {
|
public TileEntityCraneInserter() {
|
||||||
super(21);
|
super(21);
|
||||||
}
|
}
|
||||||
@ -26,6 +34,45 @@ public class TileEntityCraneInserter extends TileEntityMachineBase implements IG
|
|||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||||
|
TileEntity te = worldObj.getTileEntity(xCoord - dir.offsetX, yCoord - dir.offsetY, zCoord - dir.offsetZ);
|
||||||
|
|
||||||
|
int[] access = null;
|
||||||
|
|
||||||
|
if(te instanceof ISidedInventory) {
|
||||||
|
ISidedInventory sided = (ISidedInventory) te;
|
||||||
|
access = sided.getAccessibleSlotsFromSide(dir.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof IInventory) {
|
||||||
|
for(int i = 0; i < slots.length; i++) {
|
||||||
|
|
||||||
|
ItemStack stack = slots[i];
|
||||||
|
|
||||||
|
if(stack != null) {
|
||||||
|
ItemStack ret = CraneInserter.addToInventory((IInventory) te, access, stack.copy(), dir.ordinal());
|
||||||
|
|
||||||
|
if(ret == null || ret.stackSize != stack.stackSize) {
|
||||||
|
slots[i] = ret;
|
||||||
|
this.markDirty();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getAccessibleSlotsFromSide(int side) {
|
||||||
|
return access;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -0,0 +1,107 @@
|
|||||||
|
package com.hbm.tileentity.turret;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||||
|
import com.hbm.handler.BulletConfiguration;
|
||||||
|
import com.hbm.inventory.container.ContainerTurretBase;
|
||||||
|
import com.hbm.inventory.gui.GUITurretArty;
|
||||||
|
import com.hbm.packet.AuxParticlePacketNT;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
|
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.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class TileEntityTurretArty extends TileEntityTurretBaseNT implements IGUIProvider {
|
||||||
|
|
||||||
|
public boolean directMode = false;
|
||||||
|
|
||||||
|
static List<Integer> configs = new ArrayList();
|
||||||
|
|
||||||
|
static {
|
||||||
|
configs.add(BulletConfigSyncingUtil.SHELL_NORMAL);
|
||||||
|
configs.add(BulletConfigSyncingUtil.SHELL_EXPLOSIVE);
|
||||||
|
configs.add(BulletConfigSyncingUtil.SHELL_AP);
|
||||||
|
configs.add(BulletConfigSyncingUtil.SHELL_DU);
|
||||||
|
configs.add(BulletConfigSyncingUtil.SHELL_W9);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<Integer> getAmmoList() {
|
||||||
|
return configs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "container.turretArty";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getMaxPower() {
|
||||||
|
return 100000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getBarrelLength() {
|
||||||
|
return 9D;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getAcceptableInaccuracy() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getHeightOffset() {
|
||||||
|
return 3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateFiringTick() {
|
||||||
|
|
||||||
|
BulletConfiguration conf = this.getFirstConfigLoaded();
|
||||||
|
|
||||||
|
if(conf != null) {
|
||||||
|
this.spawnBullet(conf);
|
||||||
|
this.conusmeAmmo(conf.ammo);
|
||||||
|
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.jeremy_fire", 4.0F, 1.0F);
|
||||||
|
Vec3 pos = this.getTurretPos();
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
|
||||||
|
vec.rotateAroundZ((float) -this.rotationPitch);
|
||||||
|
vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5));
|
||||||
|
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
data.setString("type", "vanillaExt");
|
||||||
|
data.setString("mode", "largeexplode");
|
||||||
|
data.setFloat("size", 0F);
|
||||||
|
data.setByte("count", (byte)5);
|
||||||
|
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleButtonPacket(int value, int meta) {
|
||||||
|
if(meta == 5) {
|
||||||
|
this.directMode = !this.directMode;
|
||||||
|
} else{
|
||||||
|
super.handleButtonPacket(value, meta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new ContainerTurretBase(player.inventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new GUITurretArty(player.inventory, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.hbm.util;
|
package com.hbm.util;
|
||||||
|
|
||||||
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.packet.AuxParticlePacketNT;
|
import com.hbm.packet.AuxParticlePacketNT;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
@ -16,6 +17,14 @@ public class ParticleUtil {
|
|||||||
data.setDouble("mX", mX);
|
data.setDouble("mX", mX);
|
||||||
data.setDouble("mY", mY);
|
data.setDouble("mY", mY);
|
||||||
data.setDouble("mZ", mZ);
|
data.setDouble("mZ", mZ);
|
||||||
|
|
||||||
|
if(world.isRemote) {
|
||||||
|
data.setDouble("posX", x);
|
||||||
|
data.setDouble("posY", y);
|
||||||
|
data.setDouble("posZ", z);
|
||||||
|
MainRegistry.proxy.effectNT(data);
|
||||||
|
} else {
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 150));
|
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 150));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1024,7 +1024,7 @@ public class ComponentNTMFeatures {
|
|||||||
this.fillWithBlocks(world, box, featureSizeX, 0, 5, featureSizeX, 1, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 2
|
this.fillWithBlocks(world, box, featureSizeX, 0, 5, featureSizeX, 1, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 2
|
||||||
this.fillWithRandomizedBlocks(world, box, 6, 0, 5, featureSizeX - 1, 0, 5, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, 6, 0, 5, featureSizeX - 1, 0, 5, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithRandomizedBlocks(world, box, 6, 1, 5, 6, 1, 5, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, 6, 1, 5, 6, 1, 5, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithRandomizedBlocks(world, box, featureSizeX - 1, 1, 5, featureSizeX + 1, 1, 5, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, featureSizeX - 1, 1, 5, featureSizeX - 1, 1, 5, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithBlocks(world, box, featureSizeX, 0, featureSizeZ, featureSizeX, 1, featureSizeZ, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 2
|
this.fillWithBlocks(world, box, featureSizeX, 0, featureSizeZ, featureSizeX, 1, featureSizeZ, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 2
|
||||||
this.fillWithRandomizedBlocks(world, box, featureSizeX, 0, 6, featureSizeX, 0, featureSizeZ - 1, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, featureSizeX, 0, 6, featureSizeX, 0, featureSizeZ - 1, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithRandomizedBlocks(world, box, featureSizeX, 1, 6, featureSizeX, 1, featureSizeZ - 3, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, featureSizeX, 1, 6, featureSizeX, 1, featureSizeZ - 3, false, rand, RandomConcreteBricks);
|
||||||
|
|||||||
@ -216,6 +216,8 @@ container.bombMulti=Mehrzweckbombe
|
|||||||
container.centrifuge=Zentrifuge
|
container.centrifuge=Zentrifuge
|
||||||
container.chemplant=Chemiewerk
|
container.chemplant=Chemiewerk
|
||||||
container.compactLauncher=Kompakt-Startrampe
|
container.compactLauncher=Kompakt-Startrampe
|
||||||
|
container.craneExtractor=Förderband-Auswerfer
|
||||||
|
container.craneInserter=Förderband-Einsetzer
|
||||||
container.crateDesh=Deshkiste
|
container.crateDesh=Deshkiste
|
||||||
container.crateIron=Eisenkiste
|
container.crateIron=Eisenkiste
|
||||||
container.crateSteel=Stahlkiste
|
container.crateSteel=Stahlkiste
|
||||||
@ -236,6 +238,7 @@ container.factoryTitanium=Einfache Fabrik
|
|||||||
container.fluidtank=Tank
|
container.fluidtank=Tank
|
||||||
container.forceField=Kraftfeldgenerator
|
container.forceField=Kraftfeldgenerator
|
||||||
container.frackingTower=Hydraulischer Frackingturm
|
container.frackingTower=Hydraulischer Frackingturm
|
||||||
|
container.furnaceIron=Eiserner Ofen
|
||||||
container.fusionMultiblock=Großer Fusionsreaktor
|
container.fusionMultiblock=Großer Fusionsreaktor
|
||||||
container.fusionaryWatzPlant=Fusionares Watzwerk
|
container.fusionaryWatzPlant=Fusionares Watzwerk
|
||||||
container.gasCentrifuge=Gaszentrifuge
|
container.gasCentrifuge=Gaszentrifuge
|
||||||
@ -2111,6 +2114,9 @@ item.pancake.name=Pfannkuchen aus Altmetall, Nägeln und Edelsteinpulver
|
|||||||
item.part_beryllium.name=Berylliumstaubkiste
|
item.part_beryllium.name=Berylliumstaubkiste
|
||||||
item.part_carbon.name=Kohlenstoffstaubkiste
|
item.part_carbon.name=Kohlenstoffstaubkiste
|
||||||
item.part_copper.name=Kupferstaubkiste
|
item.part_copper.name=Kupferstaubkiste
|
||||||
|
item.part_generic.piston_electric.name=Electrischer Kolben
|
||||||
|
item.part_generic.piston_hydraulic.name=Hydraulischer Kolben
|
||||||
|
item.part_generic.piston_pneumatic.name=Pneumatischer Kolben
|
||||||
item.part_lithium.name=Lithiumstaubkiste
|
item.part_lithium.name=Lithiumstaubkiste
|
||||||
item.part_plutonium.name=Plutoniumstaubkiste
|
item.part_plutonium.name=Plutoniumstaubkiste
|
||||||
item.particle_aelectron.name=Positronenkapsel
|
item.particle_aelectron.name=Positronenkapsel
|
||||||
@ -2765,6 +2771,9 @@ item.upgrade_crystallizer.name=Kristallisiererupgrade
|
|||||||
item.upgrade_effect_1.name=Effektupgrade Mk.I
|
item.upgrade_effect_1.name=Effektupgrade Mk.I
|
||||||
item.upgrade_effect_2.name=Effektupgrade Mk.II
|
item.upgrade_effect_2.name=Effektupgrade Mk.II
|
||||||
item.upgrade_effect_3.name=Effektupgrade Mk.III
|
item.upgrade_effect_3.name=Effektupgrade Mk.III
|
||||||
|
item.upgrade_ejector_1.name=Auswurfupgrade Mk.I
|
||||||
|
item.upgrade_ejector_2.name=Auswurfupgrade Mk.II
|
||||||
|
item.upgrade_ejector_3.name=Auswurfupgrade Mk.III
|
||||||
item.upgrade_fortune_1.name=Glückupgrade Mk.I
|
item.upgrade_fortune_1.name=Glückupgrade Mk.I
|
||||||
item.upgrade_fortune_2.name=Glückupgrade Mk.II
|
item.upgrade_fortune_2.name=Glückupgrade Mk.II
|
||||||
item.upgrade_fortune_3.name=Glückupgrade Mk.III
|
item.upgrade_fortune_3.name=Glückupgrade Mk.III
|
||||||
@ -2783,6 +2792,9 @@ item.upgrade_smelter.name=Ofenupgrade
|
|||||||
item.upgrade_speed_1.name=Geschwindigkeitsupgrade Mk.I
|
item.upgrade_speed_1.name=Geschwindigkeitsupgrade Mk.I
|
||||||
item.upgrade_speed_2.name=Geschwindigkeitsupgrade Mk.II
|
item.upgrade_speed_2.name=Geschwindigkeitsupgrade Mk.II
|
||||||
item.upgrade_speed_3.name=Geschwindigkeitsupgrade Mk.III
|
item.upgrade_speed_3.name=Geschwindigkeitsupgrade Mk.III
|
||||||
|
item.upgrade_stack_1.name=Stapelupgrade Mk.I
|
||||||
|
item.upgrade_stack_2.name=Stapelupgrade Mk.II
|
||||||
|
item.upgrade_stack_3.name=Stapelupgrade Mk.III
|
||||||
item.upgrade_template.name=Maschinenupgrade-Vorlage
|
item.upgrade_template.name=Maschinenupgrade-Vorlage
|
||||||
item.v1.name=V1
|
item.v1.name=V1
|
||||||
item.volcanic_pickaxe.name=Geschmolzene Spitzhacke
|
item.volcanic_pickaxe.name=Geschmolzene Spitzhacke
|
||||||
@ -3111,7 +3123,14 @@ tile.concrete_pillar.name=Stahlbetonsäule
|
|||||||
tile.concrete_smooth.name=Beton
|
tile.concrete_smooth.name=Beton
|
||||||
tile.concrete_super.name=Super Beton
|
tile.concrete_super.name=Super Beton
|
||||||
tile.concrete_super_broken.name=Schimmliger Schutt
|
tile.concrete_super_broken.name=Schimmliger Schutt
|
||||||
|
tile.conveyor.name=Förderband
|
||||||
|
tile.conveyor_chute.name=Förderschütte
|
||||||
|
tile.conveyor_double.name=Zweispuriges Förderband
|
||||||
|
tile.conveyor_lift.name=Kettenaufzug
|
||||||
|
tile.conveyor_triple.name=Dreispuriges Förderband
|
||||||
tile.corium_block.name=Corium
|
tile.corium_block.name=Corium
|
||||||
|
tile.crane_extractor.name=Förderband-Auswerfer
|
||||||
|
tile.crane_inserter.name=Förderband-Einsetzer
|
||||||
tile.crashed_bomb.name=Blindgänger
|
tile.crashed_bomb.name=Blindgänger
|
||||||
tile.crate.name=Vorratskiste
|
tile.crate.name=Vorratskiste
|
||||||
tile.crate_ammo.name=Sternenmetallkiste
|
tile.crate_ammo.name=Sternenmetallkiste
|
||||||
@ -3213,6 +3232,7 @@ tile.frozen_dirt.name=Gefrorene Erde
|
|||||||
tile.frozen_grass.name=Gefrorenes Gras
|
tile.frozen_grass.name=Gefrorenes Gras
|
||||||
tile.frozen_log.name=Gefrorener Baumstamm
|
tile.frozen_log.name=Gefrorener Baumstamm
|
||||||
tile.frozen_planks.name=Gefrorene Holzbretter
|
tile.frozen_planks.name=Gefrorene Holzbretter
|
||||||
|
tile.furnace_iron.name=Eiserner Ofen
|
||||||
tile.fusion_center.name=Zentralmagnetstück
|
tile.fusion_center.name=Zentralmagnetstück
|
||||||
tile.fusion_conductor.name=Supraleiter-Magnet
|
tile.fusion_conductor.name=Supraleiter-Magnet
|
||||||
tile.fusion_core.name=Fusionsreaktorsteuerung
|
tile.fusion_core.name=Fusionsreaktorsteuerung
|
||||||
|
|||||||
@ -392,6 +392,8 @@ container.bombMulti=Multi Purpose Bomb
|
|||||||
container.centrifuge=Centrifuge
|
container.centrifuge=Centrifuge
|
||||||
container.chemplant=Chemical Plant
|
container.chemplant=Chemical Plant
|
||||||
container.compactLauncher=Compact Launch Pad
|
container.compactLauncher=Compact Launch Pad
|
||||||
|
container.craneExtractor=Conveyor Extractor
|
||||||
|
container.craneInserter=Conveyor Inserter
|
||||||
container.crateDesh=Desh Crate
|
container.crateDesh=Desh Crate
|
||||||
container.crateIron=Iron Crate
|
container.crateIron=Iron Crate
|
||||||
container.crateSteel=Steel Crate
|
container.crateSteel=Steel Crate
|
||||||
@ -412,6 +414,7 @@ container.factoryTitanium=Basic Factory
|
|||||||
container.fluidtank=Tank
|
container.fluidtank=Tank
|
||||||
container.forceField=Forcefield Emitter
|
container.forceField=Forcefield Emitter
|
||||||
container.frackingTower=Hydraulic Fracking Tower
|
container.frackingTower=Hydraulic Fracking Tower
|
||||||
|
container.furnaceIron=Iron Furnace
|
||||||
container.fusionMultiblock=Big Fusion Reactor
|
container.fusionMultiblock=Big Fusion Reactor
|
||||||
container.fusionaryWatzPlant=Fusionary Watz Plant
|
container.fusionaryWatzPlant=Fusionary Watz Plant
|
||||||
container.gasCentrifuge=Gas Centrifuge
|
container.gasCentrifuge=Gas Centrifuge
|
||||||
@ -2393,6 +2396,9 @@ item.pancake.name=Pancake made from Scrap Metal, Nails and Gem Dust
|
|||||||
item.part_beryllium.name=Box of Beryllium Dust
|
item.part_beryllium.name=Box of Beryllium Dust
|
||||||
item.part_carbon.name=Box of Carbon Dust
|
item.part_carbon.name=Box of Carbon Dust
|
||||||
item.part_copper.name=Box of Copper Dust
|
item.part_copper.name=Box of Copper Dust
|
||||||
|
item.part_generic.piston_electric.name=Electric Piston
|
||||||
|
item.part_generic.piston_hydraulic.name=Hydraulic Piston
|
||||||
|
item.part_generic.piston_pneumatic.name=Pneumatic Piston
|
||||||
item.part_lithium.name=Box of Lithium Dust
|
item.part_lithium.name=Box of Lithium Dust
|
||||||
item.part_plutonium.name=Box of Plutonium Dust
|
item.part_plutonium.name=Box of Plutonium Dust
|
||||||
item.particle_aelectron.name=Positron Capsule
|
item.particle_aelectron.name=Positron Capsule
|
||||||
@ -3152,6 +3158,9 @@ item.upgrade_crystallizer.name=Crystallizer Upgrade
|
|||||||
item.upgrade_effect_1.name=Effectiveness Upgrade Mk.I
|
item.upgrade_effect_1.name=Effectiveness Upgrade Mk.I
|
||||||
item.upgrade_effect_2.name=Effectiveness Upgrade Mk.II
|
item.upgrade_effect_2.name=Effectiveness Upgrade Mk.II
|
||||||
item.upgrade_effect_3.name=Effectiveness Upgrade Mk.III
|
item.upgrade_effect_3.name=Effectiveness Upgrade Mk.III
|
||||||
|
item.upgrade_ejector_1.name=Ejection Speed Upgrade Mk.I
|
||||||
|
item.upgrade_ejector_2.name=Ejection Speed Upgrade Mk.II
|
||||||
|
item.upgrade_ejector_3.name=Ejection Speed Upgrade Mk.III
|
||||||
item.upgrade_fortune_1.name=Fortune Upgrade Mk.I
|
item.upgrade_fortune_1.name=Fortune Upgrade Mk.I
|
||||||
item.upgrade_fortune_2.name=Fortune Upgrade Mk.II
|
item.upgrade_fortune_2.name=Fortune Upgrade Mk.II
|
||||||
item.upgrade_fortune_3.name=Fortune Upgrade Mk.III
|
item.upgrade_fortune_3.name=Fortune Upgrade Mk.III
|
||||||
@ -3171,6 +3180,9 @@ item.upgrade_smelter.name=Smelter Upgrade
|
|||||||
item.upgrade_speed_1.name=Speed Upgrade Mk.I
|
item.upgrade_speed_1.name=Speed Upgrade Mk.I
|
||||||
item.upgrade_speed_2.name=Speed Upgrade Mk.II
|
item.upgrade_speed_2.name=Speed Upgrade Mk.II
|
||||||
item.upgrade_speed_3.name=Speed Upgrade Mk.III
|
item.upgrade_speed_3.name=Speed Upgrade Mk.III
|
||||||
|
item.upgrade_stack_1.name=Stack Ejection Upgrade Mk.I
|
||||||
|
item.upgrade_stack_2.name=Stack Ejection Upgrade Mk.II
|
||||||
|
item.upgrade_stack_3.name=Stack Ejection Upgrade Mk.III
|
||||||
item.upgrade_template.name=Machine Upgrade Template
|
item.upgrade_template.name=Machine Upgrade Template
|
||||||
item.v1.name=V1
|
item.v1.name=V1
|
||||||
item.volcanic_pickaxe.name=Molten Pickaxe
|
item.volcanic_pickaxe.name=Molten Pickaxe
|
||||||
@ -3511,7 +3523,14 @@ tile.concrete_pillar.name=Rebar Reinforced Concrete Pillar
|
|||||||
tile.concrete_smooth.name=Concrete
|
tile.concrete_smooth.name=Concrete
|
||||||
tile.concrete_super.name=Über Concrete
|
tile.concrete_super.name=Über Concrete
|
||||||
tile.concrete_super_broken.name=Moldy Debris
|
tile.concrete_super_broken.name=Moldy Debris
|
||||||
|
tile.conveyor.name=Conveyor Belt
|
||||||
|
tile.conveyor_chute.name=Conveyor Chute
|
||||||
|
tile.conveyor_double.name=Double-Lane Conveyor Belt
|
||||||
|
tile.conveyor_lift.name=Conveyor Chain Lift
|
||||||
|
tile.conveyor_triple.name=Triple-Lane Conveyor Belt
|
||||||
tile.corium_block.name=Corium
|
tile.corium_block.name=Corium
|
||||||
|
tile.crane_extractor.name=Conveyor Ejector
|
||||||
|
tile.crane_inserter.name=Conveyor Inserter
|
||||||
tile.crashed_bomb.name=Dud
|
tile.crashed_bomb.name=Dud
|
||||||
tile.crate.name=Supply Crate
|
tile.crate.name=Supply Crate
|
||||||
tile.crate_ammo.name=Starmetal Crate
|
tile.crate_ammo.name=Starmetal Crate
|
||||||
@ -3613,6 +3632,7 @@ tile.frozen_dirt.name=Frozen Dirt
|
|||||||
tile.frozen_grass.name=Frozen Grass
|
tile.frozen_grass.name=Frozen Grass
|
||||||
tile.frozen_log.name=Frozen Log
|
tile.frozen_log.name=Frozen Log
|
||||||
tile.frozen_planks.name=Frozen Planks
|
tile.frozen_planks.name=Frozen Planks
|
||||||
|
tile.furnace_iron.name=Iron Furnace
|
||||||
tile.fusion_center.name=Central Magnet Piece
|
tile.fusion_center.name=Central Magnet Piece
|
||||||
tile.fusion_conductor.name=Superconducting Magnet
|
tile.fusion_conductor.name=Superconducting Magnet
|
||||||
tile.fusion_core.name=Fusion Reactor Control
|
tile.fusion_core.name=Fusion Reactor Control
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user