murdering legacy featues by the boatload
18
changelog
@ -1,10 +1,14 @@
|
||||
## Changed
|
||||
* Updated russian localization
|
||||
* Removed T45 protections entirely
|
||||
* The ICF laser controller max output can now be adjusted in the config, both stats for the capacitors and turbochargers can be changed separately
|
||||
* Removed the legacy assemblers and chemical plants
|
||||
* Removed all legacy templates
|
||||
* Removed legacy particle collider blocks with the exception of the coils
|
||||
* Removed the unused anti proton and positron capsules
|
||||
* Removed some ancient test blocks
|
||||
* Removed the T-45 power armor completely
|
||||
* Removed the old redcoil items
|
||||
* Nuclear creepers now have an innate resistance to explosion damage (5/35%)
|
||||
* Reduced the resistance stats on the ballistic jackets
|
||||
* U233 and Pu241 are now custom nuke usable
|
||||
|
||||
## Fixed
|
||||
* Fixed NCRPA and taurun armor not having working gas masks
|
||||
* Refactored the armor system, stats like radiation and particle protection are no longer scattered over various registries, making future sets less likely to miss them
|
||||
* Fixed crucible smeling one too many items with no template installed, causing the gauge to exceed the boundaries
|
||||
* Potentially fixed another issue with artillery rocket targeting
|
||||
* Fixed size 15 boxcar not being craftable
|
||||
@ -57,8 +57,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block event_tester;
|
||||
public static Block obj_tester;
|
||||
public static Block test_core;
|
||||
public static Block test_charge;
|
||||
public static Block structure_anchor;
|
||||
|
||||
public static Block ore_uranium;
|
||||
@ -703,14 +701,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_cyclotron;
|
||||
public static Block machine_exposure_chamber;
|
||||
|
||||
public static Block hadron_plating;
|
||||
public static Block hadron_plating_blue;
|
||||
public static Block hadron_plating_black;
|
||||
public static Block hadron_plating_yellow;
|
||||
public static Block hadron_plating_striped;
|
||||
public static Block hadron_plating_voltz;
|
||||
public static Block hadron_plating_glass;
|
||||
public static Block hadron_coil_alloy;
|
||||
public static Block hadron_coil_gold;
|
||||
public static Block hadron_coil_neodymium;
|
||||
@ -720,12 +710,6 @@ public class ModBlocks {
|
||||
public static Block hadron_coil_starmetal;
|
||||
public static Block hadron_coil_chlorophyte;
|
||||
public static Block hadron_coil_mese;
|
||||
public static Block hadron_power;
|
||||
public static Block hadron_diode;
|
||||
public static Block hadron_analysis;
|
||||
public static Block hadron_analysis_glass;
|
||||
public static Block hadron_access;
|
||||
public static Block hadron_core;
|
||||
|
||||
public static Block pa_source;
|
||||
public static Block pa_beamline;
|
||||
@ -997,18 +981,14 @@ public class ModBlocks {
|
||||
public static Block machine_mining_laser;
|
||||
public static Block barricade; // a sand bag that drops nothing, for automated walling purposes
|
||||
|
||||
@Deprecated public static Block machine_assembler;
|
||||
public static Block machine_assembly_machine;
|
||||
@Deprecated public static Block machine_assemfac;
|
||||
public static Block machine_assembly_factory;
|
||||
public static Block machine_precass;
|
||||
public static Block machine_arc_welder;
|
||||
public static Block machine_soldering_station;
|
||||
public static Block machine_arc_furnace;
|
||||
|
||||
@Deprecated public static Block machine_chemplant;
|
||||
public static Block machine_chemical_plant;
|
||||
@Deprecated public static Block machine_chemfac;
|
||||
public static Block machine_chemical_factory;
|
||||
public static Block machine_purex;
|
||||
public static Block machine_mixer;
|
||||
@ -1242,8 +1222,6 @@ public class ModBlocks {
|
||||
|
||||
event_tester = new TestEventTester(Material.iron).setBlockName("event_tester").setCreativeTab(null).setHardness(2.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":event_tester");
|
||||
obj_tester = new TestObjTester(Material.iron).setBlockName("obj_tester").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F);
|
||||
test_core = new TestCore(Material.iron).setBlockName("test_core").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_core");
|
||||
test_charge = new TestCharge(Material.iron).setBlockName("test_charge").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F);
|
||||
structure_anchor = new BlockGeneric(Material.iron).setBlockName("structure_anchor").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":structure_anchor");
|
||||
|
||||
ore_uranium = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium");
|
||||
@ -1347,6 +1325,7 @@ public class ModBlocks {
|
||||
|
||||
ore_tikite = new BlockDragonProof(Material.rock).setBlockName("ore_tikite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_tikite_alt");
|
||||
|
||||
// the block ID limit is weeping
|
||||
block_uranium = new BlockHazard().makeBeaconable().setBlockName("block_uranium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(50.0F).setBlockTextureName(RefStrings.MODID + ":block_uranium");
|
||||
block_u233 = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_u233").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(50.0F).setBlockTextureName(RefStrings.MODID + ":block_u233");
|
||||
block_u235 = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_u235").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(50.0F).setBlockTextureName(RefStrings.MODID + ":block_u235");
|
||||
@ -1388,7 +1367,7 @@ public class ModBlocks {
|
||||
block_corium = new BlockHazard(Material.iron).setBlockName("block_corium").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium");
|
||||
block_corium_cobble = new BlockOutgas(Material.iron, true, 1, true, true).setBlockName("block_corium_cobble").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium_cobble");
|
||||
block_scrap = new BlockFalling(Material.sand).setBlockName("block_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeGravel).setBlockTextureName(RefStrings.MODID + ":block_scrap");
|
||||
block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap_alt2");
|
||||
block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap");
|
||||
block_beryllium = new BlockBeaconable(Material.iron).setBlockName("block_beryllium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":block_beryllium");
|
||||
block_schraranium = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.SCHRAB).setBlockName("block_schraranium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(250.0F).setBlockTextureName(RefStrings.MODID + ":block_schraranium");
|
||||
block_schrabidium = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.SCHRAB).setBlockName("block_schrabidium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_schrabidium");
|
||||
@ -1724,7 +1703,7 @@ public class ModBlocks {
|
||||
nuke_n2 = new NukeN2(Material.iron).setBlockName("nuke_n2").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_n2");
|
||||
nuke_fstbmb = new NukeBalefire(Material.iron).setBlockName("nuke_fstbmb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_fstbmb");
|
||||
|
||||
bomb_multi = new BombMulti(Material.iron).setBlockName("bomb_multi").setCreativeTab(MainRegistry.nukeTab).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":bomb_multi1");
|
||||
bomb_multi = new BombMulti(Material.iron).setBlockName("bomb_multi").setCreativeTab(MainRegistry.nukeTab).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
flame_war = new BombFlameWar(Material.iron).setBlockName("flame_war").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":flame_war");
|
||||
float_bomb = new BombFloat(Material.iron).setBlockName("float_bomb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F);
|
||||
@ -1816,13 +1795,6 @@ public class ModBlocks {
|
||||
machine_exposure_chamber = new MachineExposureChamber(Material.iron).setBlockName("machine_exposure_chamber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_radgen");
|
||||
|
||||
hadron_plating = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating");
|
||||
hadron_plating_blue = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_blue").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_blue");
|
||||
hadron_plating_black = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_black").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_black");
|
||||
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_yellow");
|
||||
hadron_plating_striped = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_striped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_striped");
|
||||
hadron_plating_voltz = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_voltz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
||||
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
||||
hadron_coil_alloy = new BlockHadronCoil(Material.iron, 10).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_alloy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_alloy");
|
||||
hadron_coil_gold = new BlockHadronCoil(Material.iron, 25).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_gold");
|
||||
hadron_coil_neodymium = new BlockHadronCoil(Material.iron, 50).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_neodymium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_neodymium");
|
||||
@ -1832,12 +1804,6 @@ public class ModBlocks {
|
||||
hadron_coil_starmetal = new BlockHadronCoil(Material.iron, 1000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_starmetal").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_starmetal");
|
||||
hadron_coil_chlorophyte = new BlockHadronCoil(Material.iron, 2500).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_chlorophyte").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_chlorophyte");
|
||||
hadron_coil_mese = new BlockHadronCoil(Material.iron, 10000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_mese").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_mese");
|
||||
hadron_power = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
||||
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
||||
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
||||
hadron_access = new BlockHadronAccess(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_access").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
||||
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
||||
|
||||
pa_source = new BlockPASource().setStepSound(Block.soundTypeMetal).setBlockName("pa_source").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_beamline = new BlockPABeamline().setStepSound(Block.soundTypeMetal).setBlockName("pa_beamline").setHardness(5.0F).setResistance(10.0F);
|
||||
@ -2063,7 +2029,7 @@ public class ModBlocks {
|
||||
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
||||
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door");
|
||||
|
||||
sliding_blast_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDE_DOOR).setBlockName("sliding_blast_door").setHardness(10.0F).setResistance(750.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":sliding_blast_door");
|
||||
@ -2191,8 +2157,8 @@ public class ModBlocks {
|
||||
boxcar = new DecoBlock(Material.iron).setBlockName("boxcar").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":boxcar");
|
||||
boat = new DecoBlock(Material.iron).setBlockName("boat").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":asphalt");
|
||||
|
||||
machine_well = new MachineOilWell().setBlockName("machine_well").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_well");
|
||||
machine_pumpjack = new MachinePumpjack().setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_pumpjack");
|
||||
machine_well = new MachineOilWell().setBlockName("machine_well").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_pumpjack = new MachinePumpjack().setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_fracking_tower = new MachineFrackingTower().setBlockName("machine_fracking_tower").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
oil_pipe = new BlockNoDrop(Material.iron).setBlockName("oil_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":oil_pipe");
|
||||
machine_flare = new MachineGasFlare(Material.iron).setBlockName("machine_flare").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2213,23 +2179,19 @@ public class ModBlocks {
|
||||
machine_annihilator = new MachineAnnihilator().setBlockName("machine_annihilator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
||||
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||
machine_assembly_machine = new MachineAssemblyMachine(Material.iron).setBlockName("machine_assembly_machine").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_assembly_factory = new MachineAssemblyFactory(Material.iron).setBlockName("machine_assembly_factory").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_precass = new MachinePrecAss(Material.iron).setBlockName("machine_precass").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null /* the world isn't ready for your beauty yet */).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_arc_welder = new MachineArcWelder(Material.iron).setBlockName("machine_arc_welder").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_soldering_station = new MachineSolderingStation(Material.iron).setBlockName("machine_soldering_station").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemical_plant = new MachineChemicalPlant(Material.iron).setBlockName("machine_chemical_plant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemfac = new MachineChemfac(Material.iron).setBlockName("machine_chemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemical_factory = new MachineChemicalFactory(Material.iron).setBlockName("machine_chemical_factory").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_purex = new MachinePUREX(Material.iron).setBlockName("machine_purex").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_mixer = new MachineMixer(Material.iron).setBlockName("machine_mixer").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank");
|
||||
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_bat9000 = new MachineBigAssTank9000(Material.iron).setBlockName("machine_bat9000").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbofan");
|
||||
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbinegas = new MachineTurbineGas(Material.iron).setBlockName("machine_turbinegas").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_lpw2 = new MachineLPW2().setBlockName("machine_lpw2").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
press_preheater = new BlockBase(Material.iron).setBlockName("press_preheater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":press_preheater");
|
||||
@ -2397,8 +2359,6 @@ public class ModBlocks {
|
||||
//Test
|
||||
GameRegistry.registerBlock(event_tester, event_tester.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(obj_tester, obj_tester.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_core, test_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_charge, test_charge.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(structure_anchor, structure_anchor.getUnlocalizedName());
|
||||
|
||||
//Ores
|
||||
@ -3105,13 +3065,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_hephaestus, machine_hephaestus.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_black, hadron_plating_black.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_yellow, hadron_plating_yellow.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_striped, hadron_plating_striped.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_glass, hadron_plating_glass.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_voltz, hadron_plating_voltz.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_alloy, ItemBlockBase.class, hadron_coil_alloy.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_gold, ItemBlockBase.class, hadron_coil_gold.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_neodymium, ItemBlockBase.class, hadron_coil_neodymium.getUnlocalizedName());
|
||||
@ -3121,12 +3074,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(hadron_coil_starmetal, ItemBlockBase.class, hadron_coil_starmetal.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemBlockBase.class, hadron_coil_chlorophyte.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_mese, ItemBlockBase.class, hadron_coil_mese.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_power, hadron_power.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_diode, hadron_diode.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_analysis, hadron_analysis.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_analysis_glass, hadron_analysis_glass.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_access, hadron_access.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_core, hadron_core.getUnlocalizedName());
|
||||
|
||||
register(pa_source);
|
||||
register(pa_beamline);
|
||||
@ -3266,14 +3213,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_electric_furnace_on, machine_electric_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_microwave, machine_microwave.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_assembler, machine_assembler.getUnlocalizedName());
|
||||
register(machine_assembly_machine);
|
||||
GameRegistry.registerBlock(machine_assemfac, machine_assemfac.getUnlocalizedName());
|
||||
register(machine_assembly_factory);
|
||||
register(machine_precass);
|
||||
GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName());
|
||||
register(machine_chemical_plant);
|
||||
register(machine_chemfac);
|
||||
register(machine_chemical_factory);
|
||||
register(machine_purex);
|
||||
register(machine_arc_welder);
|
||||
@ -3453,10 +3396,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
|
||||
|
||||
//Rails
|
||||
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_highspeed, ItemBlockBase.class, rail_highspeed.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_booster, ItemBlockBase.class, rail_booster.getUnlocalizedName());
|
||||
register(rail_wood);
|
||||
register(rail_narrow);
|
||||
register(rail_highspeed);
|
||||
register(rail_booster);
|
||||
register(rail_narrow_straight);
|
||||
register(rail_narrow_curve);
|
||||
register(rail_large_straight);
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.IProxyController;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockHadronAccess extends BlockContainer implements IProxyController {
|
||||
|
||||
public BlockHadronAccess(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityProxyInventory();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta).getOpposite();
|
||||
|
||||
if(side != dir.ordinal())
|
||||
return ModBlocks.hadron_plating_blue.getIcon(side, meta);
|
||||
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(l).getOpposite();
|
||||
world.setBlockMetadataWithNotify(x, y, z, dir.ordinal(), 2);
|
||||
}
|
||||
|
||||
@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()) {
|
||||
|
||||
BossSpawnHandler.markFBI(player);
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||
|
||||
for(int i = 1; i < 3; i++) {
|
||||
|
||||
if(world.getBlock(x + dir.offsetX * i, y + dir.offsetY * i, z + dir.offsetZ * i) == ModBlocks.hadron_core) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x + dir.offsetX * i, y + dir.offsetY * i, z + dir.offsetZ * i);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getCore(World world, int x, int y, int z) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||
|
||||
for(int i = 1; i < 3; i++) {
|
||||
TileEntity te = Compat.getTileStandard(world, x + dir.offsetX * i, y + dir.offsetY * i, z + dir.offsetZ * i);
|
||||
|
||||
if(te instanceof TileEntityHadron) {
|
||||
return te;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.hbm.blocks.BlockMulti;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockHadronCooler extends BlockMulti implements ITooltipProvider {
|
||||
|
||||
private IIcon[] icons = new IIcon[getSubCount()];
|
||||
|
||||
public BlockHadronCooler(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
icons[0] = reg.registerIcon(RefStrings.MODID + ":hadron_cooler");
|
||||
icons[1] = reg.registerIcon(RefStrings.MODID + ":hadron_cooler_mk2");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return icons[this.rectify(metadata)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int meta = this.rectify(stack.getItemDamage());
|
||||
|
||||
if(meta == 1) return this.getUnlocalizedName() + "_mk2";
|
||||
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray(this.getUnlocalizedName(stack) + ".desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,85 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockHadronCore extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconIn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconOut;
|
||||
|
||||
public BlockHadronCore(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityHadron();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
this.iconIn = iconRegister.registerIcon(RefStrings.MODID + ":hadron_core_in");
|
||||
this.iconOut = iconRegister.registerIcon(RefStrings.MODID + ":hadron_core_out");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(side == meta)
|
||||
return this.iconOut;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
|
||||
if(side == dir.getOpposite().ordinal())
|
||||
return this.iconIn;
|
||||
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public 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()) {
|
||||
|
||||
BossSpawnHandler.markFBI(player);
|
||||
|
||||
TileEntityHadron entity = (TileEntityHadron) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,79 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronDiode;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronDiode.DiodeConfig;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockHadronDiode extends BlockContainer implements IToolable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconIn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconOut;
|
||||
|
||||
public BlockHadronDiode(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityHadronDiode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconIn = iconRegister.registerIcon(RefStrings.MODID + ":hadron_diode_in");
|
||||
this.iconOut = iconRegister.registerIcon(RefStrings.MODID + ":hadron_diode_out");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":hadron_diode");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
|
||||
TileEntityHadronDiode diode = (TileEntityHadronDiode) world.getTileEntity(x, y, z);
|
||||
|
||||
DiodeConfig conf = diode.getConfig(side);
|
||||
|
||||
switch(conf) {
|
||||
case NONE:
|
||||
return blockIcon;
|
||||
case IN:
|
||||
return iconIn;
|
||||
case OUT:
|
||||
default:
|
||||
return iconOut;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
if(tool != ToolType.SCREWDRIVER)
|
||||
return false;
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntityHadronDiode diode = (TileEntityHadronDiode) world.getTileEntity(x, y, z);
|
||||
int config = diode.getConfig(side).ordinal();
|
||||
config += 1;
|
||||
config %= DiodeConfig.values().length;
|
||||
diode.setConfig(side, config);
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockHadronPlating extends Block {
|
||||
|
||||
public BlockHadronPlating(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronPower;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class BlockHadronPower extends BlockContainer implements ILookOverlay {
|
||||
|
||||
public long power;
|
||||
|
||||
public BlockHadronPower(Material mat, long power) {
|
||||
super(mat);
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityHadronPower();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityHadronPower))
|
||||
return;
|
||||
|
||||
TileEntityHadronPower battery = (TileEntityHadronPower) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(BobMathUtil.getShortNumber(battery.getPower()) + " / " + BobMathUtil.getShortNumber(battery.getMaxPower()) + "HE");
|
||||
|
||||
double percent = (double) battery.getPower() / (double) battery.getMaxPower();
|
||||
int charge = (int) Math.floor(percent * 10_000D);
|
||||
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||
|
||||
text.add("&[" + color + "&]" + (charge / 100D) + "%");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineAssembler extends BlockDummyable {
|
||||
|
||||
public MachineAssembler(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.0, 0.0, -2.0, 2.0, 2.0, 1.0));
|
||||
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.14375, 0.34375, -2.5, 0.15625, 0.65625, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(0.85625, 0.34375, -2.5, 1.15625, 0.65625, 1.5));
|
||||
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.5, 0.0, -0.5, 0.0, 1.0, 0.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(1.0, 0.0, -1.5, 2.5, 1.0, -0.5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineAssembler();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power();
|
||||
return null;
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x -= dir.offsetX;
|
||||
z -= dir.offsetZ;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 2, y, z + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 1, y, z - rot.offsetZ * 1);
|
||||
this.makeExtra(world, x + rot.offsetX * 2 - dir.offsetX, y, z + rot.offsetZ * 2 - dir.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX * 1 - dir.offsetX, y, z - rot.offsetZ * 1 - dir.offsetZ);
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineAssemfac extends BlockDummyable {
|
||||
|
||||
public MachineAssemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineAssemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@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 getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX * 2, y, z + dir.offsetZ * 3 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX * 3, y, z + dir.offsetZ * 3 - rot.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 4 + rot.offsetX * 2, y, z - dir.offsetZ * 4 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - dir.offsetX * 4 - rot.offsetX * 3, y, z - dir.offsetZ * 4 - rot.offsetZ * 3);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * 2, y, z + rot.offsetZ * 3 + dir.offsetZ * 2);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 - dir.offsetX * 3, y, z + rot.offsetZ * 3 - dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * 2, y, z - rot.offsetZ * 4 + dir.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 - dir.offsetX * 3, y, z - rot.offsetZ * 4 - dir.offsetZ * 3);
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
@ -1,65 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineChemfac extends BlockDummyable {
|
||||
|
||||
public MachineChemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@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 getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
for(int i = -3; i < 3; i++) {
|
||||
this.makeExtra(world, x + rot.offsetX * 2 + dir.offsetX * i, y + 3, z + rot.offsetZ * 2 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 3 + dir.offsetX * i, y + 3, z - rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 1, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 2, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 1, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 2, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
}
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineChemplant extends BlockDummyable {
|
||||
|
||||
public MachineChemplant(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.0, 0.0, -2.0, 2.0, 3.0, 1.0));
|
||||
|
||||
// some guy once told me not to use magic numbers
|
||||
// so I turned him into a newt
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.14375, 0.34375, -2.5, 0.15625, 0.65625, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(0.85625, 0.34375, -2.5, 1.15625, 0.65625, 1.5));
|
||||
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.5, 0.0, -0.5, 0.0, 1.0, 0.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(1.0, 0.0, -1.5, 2.5, 1.0, -0.5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemplant();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {2, 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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x -= dir.offsetX;
|
||||
z -= dir.offsetZ;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 2, y, z + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 1, y, z - rot.offsetZ * 1);
|
||||
this.makeExtra(world, x + rot.offsetX * 2 - dir.offsetX, y, z + rot.offsetZ * 2 - dir.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX * 1 - dir.offsetX, y, z - rot.offsetZ * 1 - dir.offsetZ);
|
||||
}
|
||||
}
|
||||
@ -1,118 +0,0 @@
|
||||
package com.hbm.blocks.test;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Facing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TestCharge extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public TestCharge(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
int l = determineOrientation(p_149689_1_, p_149689_2_, p_149689_3_, p_149689_4_, p_149689_5_);
|
||||
p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, l, 2);
|
||||
}
|
||||
|
||||
public static int determineOrientation(World p_150071_0_, int p_150071_1_, int p_150071_2_, int p_150071_3_, EntityLivingBase p_150071_4_) {
|
||||
|
||||
//instead of mirrored piston behavior, we could just scan for nearby cores and adjust it accordingly
|
||||
|
||||
if(MathHelper.abs((float) p_150071_4_.posX - (float) p_150071_1_) < 2.0F && MathHelper.abs((float) p_150071_4_.posZ - (float) p_150071_3_) < 2.0F) {
|
||||
double d0 = p_150071_4_.posY + 1.82D - (double) p_150071_4_.yOffset;
|
||||
|
||||
if(d0 - (double) p_150071_2_ > 2.0D) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((double) p_150071_2_ - d0 > 0.0D) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int l = MathHelper.floor_double((double) (p_150071_4_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
|
||||
return l == 0 ? 3 : (l == 1 ? 4 : (l == 2 ? 2 : (l == 3 ? 5 : 1)));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
this.blockIcon = p_149651_1_.registerIcon(RefStrings.MODID + ":test_charge_side");
|
||||
this.topIcon = p_149651_1_.registerIcon(RefStrings.MODID + ":test_charge_top");
|
||||
this.bottomIcon = p_149651_1_.registerIcon(RefStrings.MODID + ":test_charge_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
int k = getPistonOrientation(p_149691_2_);
|
||||
return k > 5 ? this.topIcon : (p_149691_1_ == k ? this.topIcon : (p_149691_1_ == Facing.oppositeSide[k] ? this.bottomIcon : this.blockIcon));
|
||||
}
|
||||
|
||||
public static int getPistonOrientation(int p_150076_0_) {
|
||||
return p_150076_0_ & 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
|
||||
//instead of exploding outright, we schedule an update. this will let redstone lines transmit signals
|
||||
//even if they are on top of the charge which would get destroyed, allowing for more compact designs
|
||||
if(!world.isRemote && world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||
world.scheduledUpdatesAreImmediate = false;
|
||||
world.scheduleBlockUpdate(x, y, z, this, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(getPistonOrientation(world.getBlockMetadata(x, y, z)));
|
||||
|
||||
//is our target a core?
|
||||
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == ModBlocks.test_core) {
|
||||
|
||||
//increment meta, schedule an update and set to air
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
int core = world.getBlockMetadata(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
//this should be false by default and only true for special world gen, but some mods tend to leak immediate updates
|
||||
world.scheduledUpdatesAreImmediate = false;
|
||||
world.setBlockMetadataWithNotify(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, core + 1, 4); //flag 4 causes no block update and no re-render on clients
|
||||
world.scheduleBlockUpdate(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.test_core, 1); //set delay to 2 if 1 isn't enough
|
||||
|
||||
//if not, just explode, who cares
|
||||
} else {
|
||||
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 5.0F, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package com.hbm.blocks.test;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestCore extends Block {
|
||||
|
||||
public TestCore(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(meta >= 6) {
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
EntityNukeTorex.statFacStandard(world, x + 0.5, y + 0.5, z + 0.5, BombConfig.missileRadius);
|
||||
|
||||
} else if(meta > 0) {
|
||||
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 5.0F, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -195,7 +195,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_kerosene_metal, 1), new Object[] { "ICI", "CTC", "ICI", 'C', STEEL.plate(), 'I', IRON.plate(), 'T', ModItems.mp_fuselage_15_kerosene });
|
||||
|
||||
//Missile warheads
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_warhead_15_boxcar, 1), new Object[] { "SNS", "CBC", "SFS", 'S', STAR.ingot(), 'N', ModBlocks.det_nuke, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'B', ModBlocks.boxcar, 'F', ModItems.tritium_deuterium_cake });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_warhead_15_boxcar, 1), new Object[] { "SNS", "CBC", "SFS", 'S', STAR.ingot(), 'N', ModBlocks.det_nuke, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'B', ModBlocks.boxcar, 'F', Fluids.TRITIUM.getDict(16_000) });
|
||||
|
||||
//Missile chips
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_1, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'S', ModBlocks.steel_scaffold });
|
||||
|
||||
@ -16,9 +16,8 @@ public class TemplateTab extends CreativeTabs {
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
|
||||
if(ModItems.assembly_template != null)
|
||||
{
|
||||
return ModItems.assembly_template;
|
||||
if(ModItems.crucible_template != null) {
|
||||
return ModItems.crucible_template;
|
||||
}
|
||||
|
||||
return Items.iron_pickaxe;
|
||||
|
||||
@ -108,25 +108,23 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModItems.euphemium_kit, 1), Requirement.HIDDEN, 64));
|
||||
|
||||
special.add(new Offer(ItemKitCustom.create("Fusion Man", "For the nuclear physicist on the go", 0xff00ff, 0x800080,
|
||||
new ItemStack(ModBlocks.iter),
|
||||
new ItemStack(ModBlocks.plasma_heater),
|
||||
new ItemStack(ModItems.fusion_shield_vaporwave),
|
||||
new ItemStack(ModBlocks.fusion_klystron),
|
||||
new ItemStack(ModBlocks.fusion_torus),
|
||||
new ItemStack(ModBlocks.fusion_mhdt),
|
||||
new ItemStack(ModBlocks.machine_intake, 3),
|
||||
ItemBattery.getFullBattery(ModItems.battery_spark),
|
||||
new ItemStack(ModBlocks.machine_chemplant, 10),
|
||||
new ItemStack(ModBlocks.machine_chemical_factory, 4),
|
||||
new ItemStack(ModBlocks.machine_fluidtank, 8),
|
||||
new ItemStack(ModBlocks.red_wire_coated, 64),
|
||||
new ItemStack(ModBlocks.red_cable, 64),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.DEUTERIUM.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.TRITIUM.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.XENON.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.MERCURY.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.PERFLUOROMETHYL.getID()),
|
||||
new ItemStack(ModBlocks.red_pylon_large, 8),
|
||||
new ItemStack(ModBlocks.substation, 4),
|
||||
new ItemStack(ModBlocks.red_pylon, 16),
|
||||
new ItemStack(ModBlocks.red_connector, 64),
|
||||
new ItemStack(ModItems.wiring_red_copper, 1),
|
||||
new ItemStack(ModBlocks.machine_chungus, 1),
|
||||
new ItemStack(ModBlocks.machine_large_turbine, 3),
|
||||
new ItemStack(ModBlocks.machine_chungus, 3),
|
||||
new ItemStack(ModItems.template_folder, 1),
|
||||
new ItemStack(Items.paper, 64),
|
||||
new ItemStack(Items.dye, 64)
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
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;
|
||||
|
||||
@Deprecated
|
||||
public class ContainerAssemfac extends Container {
|
||||
|
||||
private TileEntityMachineAssemfac assemfac;
|
||||
|
||||
public ContainerAssemfac(InventoryPlayer playerInv, TileEntityMachineAssemfac tile) {
|
||||
assemfac = tile;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tile, 0, 234, 218));
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
this.addSlotToContainer(new SlotUpgrade(tile, 1 + i, 5, 172 + i * 18));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
int offX = 7 + j * 118;
|
||||
int offY = 14 + i * 38;
|
||||
int startIndex = 5 + (i * 2 + j) * 14;
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 6; l++) {
|
||||
this.addSlotToContainer(new Slot(tile, startIndex + k * 6 + l, offX + l * 16, offY + k * 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
this.addSlotToContainer(new Slot(tile, 17 + i * 14, 106, 13 + i * 19 - (i % 2 == 1 ? 1 : 0)));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(playerInv.player, tile, 18 + i * 14, 234, 13 + i * 16));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 34 + j * 18, 174 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 34 + i * 18, 232));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return assemfac.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
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;
|
||||
|
||||
@Deprecated
|
||||
public class ContainerChemfac extends Container {
|
||||
|
||||
private TileEntityMachineChemfac chemfac;
|
||||
|
||||
public ContainerChemfac(InventoryPlayer playerInv, TileEntityMachineChemfac tile) {
|
||||
chemfac = tile;
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 0, 234, 79));
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
this.addSlotToContainer(new SlotUpgrade(tile, 1 + i * 2 + j, 217 + j * 18, 172 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 2; l++) {
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 7 + j * 110 + l * 16, 14 + i * 38 + k * 16));
|
||||
}
|
||||
}
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 2; l++) {
|
||||
this.addSlotToContainer(new SlotCraftingOutput(playerInv.player, tile, this.inventorySlots.size(), 69 + j * 110 + l * 16, 14 + i * 38 + k * 16));
|
||||
}
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 51 + j * 110, 30 + i * 38));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 34 + j * 18, 174 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 34 + i * 18, 232));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return chemfac.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,86 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerHadron extends Container {
|
||||
|
||||
private TileEntityHadron hadron;
|
||||
|
||||
public ContainerHadron(InventoryPlayer invPlayer, TileEntityHadron tedf) {
|
||||
|
||||
hadron = tedf;
|
||||
|
||||
//Inputs
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 17, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 35, 36));
|
||||
//Outputs
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 2, 125, 36));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 3, 143, 36));
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 44, 108));
|
||||
|
||||
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 + (18 * 3) + 2));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + (18 * 3) + 2));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 4) {
|
||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else if (!this.mergeItemStack(var5, 0, 2, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return hadron.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -1,109 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
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;
|
||||
|
||||
@Deprecated
|
||||
public class ContainerMachineAssembler extends Container {
|
||||
|
||||
private TileEntityMachineAssembler assembler;
|
||||
|
||||
public ContainerMachineAssembler(InventoryPlayer invPlayer, TileEntityMachineAssembler te) {
|
||||
assembler = te;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(te, 0, 80, 18));
|
||||
//Upgrades
|
||||
this.addSlotToContainer(new Slot(te, 1, 152, 18));
|
||||
this.addSlotToContainer(new Slot(te, 2, 152, 36));
|
||||
this.addSlotToContainer(new Slot(te, 3, 152, 54));
|
||||
//Schematic
|
||||
this.addSlotToContainer(new Slot(te, 4, 80, 54));
|
||||
//Output
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, te, 5, 134, 90));
|
||||
//Input
|
||||
this.addSlotToContainer(new Slot(te, 6, 8, 18));
|
||||
this.addSlotToContainer(new Slot(te, 7, 26, 18));
|
||||
this.addSlotToContainer(new Slot(te, 8, 8, 36));
|
||||
this.addSlotToContainer(new Slot(te, 9, 26, 36));
|
||||
this.addSlotToContainer(new Slot(te, 10, 8, 54));
|
||||
this.addSlotToContainer(new Slot(te, 11, 26, 54));
|
||||
this.addSlotToContainer(new Slot(te, 12, 8, 72));
|
||||
this.addSlotToContainer(new Slot(te, 13, 26, 72));
|
||||
this.addSlotToContainer(new Slot(te, 14, 8, 90));
|
||||
this.addSlotToContainer(new Slot(te, 15, 26, 90));
|
||||
this.addSlotToContainer(new Slot(te, 16, 8, 108));
|
||||
this.addSlotToContainer(new Slot(te, 17, 26, 108));
|
||||
|
||||
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 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if (slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
SlotCraftingOutput.checkAchievements(player, stack);
|
||||
|
||||
if (index <= 17) {
|
||||
if (!this.mergeItemStack(stack, 18, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemMachineUpgrade) {
|
||||
if(!this.mergeItemStack(stack, 1, 4, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemAssemblyTemplate) {
|
||||
if(!this.mergeItemStack(stack, 4, 5, false)) return null;
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 6, 18, false)) return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(stack.stackSize == rStack.stackSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(player, rStack);
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return assembler.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -1,112 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotTakeOnly;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
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;
|
||||
|
||||
@Deprecated
|
||||
@NotableComments
|
||||
public class ContainerMachineChemplant extends Container {
|
||||
|
||||
private TileEntityMachineChemplant nukeBoy; // still uses ancient copy pasted field names - lmfao
|
||||
|
||||
public ContainerMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
nukeBoy = tedf;
|
||||
|
||||
// Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 80, 18));
|
||||
// Upgrades
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 116, 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 116, 54));
|
||||
// Schematic
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 80, 54));
|
||||
// Outputs
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 5, 134, 90));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 6, 152, 90));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 7, 134, 108));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 8, 152, 108));
|
||||
// Fluid Output In
|
||||
this.addSlotToContainer(new Slot(tedf, 9, 134, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 10, 152, 54));
|
||||
// Fluid Outputs Out
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 11, 134, 72));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 12, 152, 72));
|
||||
// Input
|
||||
this.addSlotToContainer(new Slot(tedf, 13, 8, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 14, 26, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 15, 8, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 16, 26, 108));
|
||||
// Fluid Input In
|
||||
this.addSlotToContainer(new Slot(tedf, 17, 8, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 18, 26, 54));
|
||||
// Fluid Input Out
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 19, 8, 72));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 20, 26, 72));
|
||||
|
||||
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 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
SlotCraftingOutput.checkAchievements(player, stack);
|
||||
|
||||
if(index <= 20) {
|
||||
if(!this.mergeItemStack(stack, 21, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemMachineUpgrade ) {
|
||||
if(!this.mergeItemStack(stack, 1, 4, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemChemistryTemplate) {
|
||||
if(!this.mergeItemStack(stack, 4, 5, false)) return null;
|
||||
} else { //proper shift-clicking filled/empty fluid tanks is an exercise in futility
|
||||
if(!this.mergeItemStack(stack, 13, 19, false))
|
||||
if(!this.mergeItemStack(stack, 9, 11, false))
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return nukeBoy.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerAssemfac;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIAssemfac extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_assemfac.png");
|
||||
private static ResourceLocation chemfac = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_chemfac.png");
|
||||
private TileEntityMachineAssemfac assemfac;
|
||||
|
||||
public GUIAssemfac(InventoryPlayer invPlayer, TileEntityMachineAssemfac tedf) {
|
||||
super(new ContainerAssemfac(invPlayer, tedf));
|
||||
assemfac = tedf;
|
||||
|
||||
this.xSize = 256;
|
||||
this.ySize = 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 234, guiTop + 164, 16, 52, assemfac.power, assemfac.getMaxPower());
|
||||
|
||||
assemfac.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 209, guiTop + 181, 9, 54);
|
||||
assemfac.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 218, guiTop + 181, 9, 54);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
|
||||
if(assemfac.maxProgress[i] > 0) {
|
||||
int progress = assemfac.progress[i] * 16 / assemfac.maxProgress[i];
|
||||
|
||||
if(progress > 0) {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
int x = guiLeft + 234;
|
||||
int y = guiTop + 13 + 16 * i;
|
||||
GL11.glColorMask(true, true, true, false);
|
||||
this.drawGradientRect(x, y, x + progress + 1, y + 16, -2130706433, -2130706433);
|
||||
GL11.glColorMask(true, true, true, true);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) { }
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int mX, int mY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(chemfac);
|
||||
|
||||
int p = (int) (assemfac.power * 52 / assemfac.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 234, guiTop + 216 - p, 0, 219 - p, 16, p);
|
||||
|
||||
if(assemfac.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 238, guiTop + 150, 0, 219, 9, 12);
|
||||
|
||||
assemfac.water.renderTank(guiLeft + 210, guiTop + 234, this.zLevel, 7, 52);
|
||||
assemfac.steam.renderTank(guiLeft + 219, guiTop + 234, this.zLevel, 7, 52);
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LMENU))
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
Slot s = this.inventorySlots.getSlot(i);
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow(i + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition, 0xffffff);
|
||||
this.fontRendererObj.drawStringWithShadow(s.getSlotIndex() + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition + 8, 0xff8080);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerChemfac;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIChemfac extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_chemfac.png");
|
||||
private TileEntityMachineChemfac chemfac;
|
||||
|
||||
public GUIChemfac(InventoryPlayer invPlayer, TileEntityMachineChemfac tedf) {
|
||||
super(new ContainerChemfac(invPlayer, tedf));
|
||||
chemfac = tedf;
|
||||
|
||||
this.xSize = 256;
|
||||
this.ySize = 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 234, guiTop + 25, 16, 52, chemfac.power, chemfac.getMaxPower());
|
||||
|
||||
for(int i = 0; i < 8; i ++) {
|
||||
|
||||
int offX = guiLeft + 110 * (i % 2);
|
||||
int offY = guiTop + 38 * (i / 2);
|
||||
chemfac.tanks[i * 4 + 0].renderTankInfo(this, mouseX, mouseY, offX + 40, offY + 45 - 32, 5, 34);
|
||||
chemfac.tanks[i * 4 + 1].renderTankInfo(this, mouseX, mouseY, offX + 45, offY + 45 - 32, 5, 34);
|
||||
chemfac.tanks[i * 4 + 2].renderTankInfo(this, mouseX, mouseY, offX + 102, offY + 45 - 32, 5, 34);
|
||||
chemfac.tanks[i * 4 + 3].renderTankInfo(this, mouseX, mouseY, offX + 107, offY + 45 - 32, 5, 34);
|
||||
}
|
||||
|
||||
chemfac.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 233, guiTop + 108, 9, 54);
|
||||
chemfac.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 242, guiTop + 108, 9, 54);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) { }
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int mX, int mY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, 167);
|
||||
drawTexturedModalRect(guiLeft + 26, guiTop + 167, 26, 167, 230, 44);
|
||||
drawTexturedModalRect(guiLeft + 26, guiTop + 211, 26, 211, 176, 45);
|
||||
|
||||
int p = (int) (chemfac.power * 52 / chemfac.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 234, guiTop + 77 - p, 0, 219 - p, 16, p);
|
||||
|
||||
if(chemfac.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 238, guiTop + 11, 0, 219, 9, 12);
|
||||
|
||||
for(int i = 0; i < 8; i ++) {
|
||||
|
||||
int offX = guiLeft + 110 * (i % 2);
|
||||
int offY = guiTop + 38 * (i / 2);
|
||||
|
||||
int prog = chemfac.progress[i];
|
||||
int j = prog * 17 / Math.max(chemfac.maxProgress[i], 1);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(offX + 51, offY + 16, 202, 247, j, 11);
|
||||
|
||||
chemfac.tanks[i * 4 + 0].renderTank(offX + 41, offY + 46, this.zLevel, 3, 32);
|
||||
chemfac.tanks[i * 4 + 1].renderTank(offX + 46, offY + 46, this.zLevel, 3, 32);
|
||||
chemfac.tanks[i * 4 + 2].renderTank(offX + 103, offY + 46, this.zLevel, 3, 32);
|
||||
chemfac.tanks[i * 4 + 3].renderTank(offX + 108, offY + 46, this.zLevel, 3, 32);
|
||||
}
|
||||
|
||||
chemfac.water.renderTank(guiLeft + 234, guiTop + 161, this.zLevel, 7, 52);
|
||||
chemfac.steam.renderTank(guiLeft + 243, guiTop + 161, this.zLevel, 7, 52);
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LMENU))
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
Slot s = this.inventorySlots.getSlot(i);
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow(i + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition, 0xffffff);
|
||||
this.fontRendererObj.drawStringWithShadow(s.getSlotIndex() + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition + 8, 0xff8080);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,138 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerHadron;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toserver.AuxButtonPacket;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron.EnumHadronState;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
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.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIHadron extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_hadron.png");
|
||||
private TileEntityHadron hadron;
|
||||
|
||||
public GUIHadron(InventoryPlayer invPlayer, TileEntityHadron laser) {
|
||||
super(new ContainerHadron(invPlayer, laser));
|
||||
this.hadron = laser;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 108, 70, 16, hadron.power, hadron.maxPower);
|
||||
|
||||
if(hadron.ioMode == 1)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 89, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.hopper1"));
|
||||
else if(hadron.ioMode == 2)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 89, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.hopper2"));
|
||||
else
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 89, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.hopper0"));
|
||||
|
||||
if(hadron.analysisOnly)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 107, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.modeLine"));
|
||||
else
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 107, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.modeCircular"));
|
||||
|
||||
List<String> stats = new ArrayList();
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hadron.stats"));
|
||||
stats.add((hadron.stat_success ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + I18n.format("hadron." + this.hadron.stat_state.name().toLowerCase(Locale.US)));
|
||||
if(this.hadron.state.showCoord) stats.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hadron.stats_coord", hadron.stat_x, hadron.stat_y, hadron.stat_z));
|
||||
stats.add(EnumChatFormatting.GRAY + I18nUtil.resolveKey("hadron.stats_momentum", String.format(Locale.US, "%,d", hadron.stat_charge)));
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 41, guiTop + 92, 25, 11, mouseX, mouseY, stats.toArray(new String[0]));
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 4, guiTop + 36, 16, 16, guiLeft + 4, guiTop + 36 + 16, new String[] {"Initial particle momentum: 750"});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
// Toggle hadron
|
||||
if(guiLeft + 19 <= x && guiLeft + 19 + 18 > x && guiTop + 89 < y && guiTop + 89 + 18 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(hadron.xCoord, hadron.yCoord, hadron.zCoord, 0, 0));
|
||||
}
|
||||
|
||||
// Toggle analysis chamber
|
||||
if(guiLeft + 142 <= x && guiLeft + 142 + 18 > x && guiTop + 107 < y && guiTop + 107 + 18 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(hadron.xCoord, hadron.yCoord, hadron.zCoord, 0, 1));
|
||||
}
|
||||
|
||||
// Toggle hopper mode
|
||||
if(guiLeft + 142 <= x && guiLeft + 142 + 18 > x && guiTop + 89 < y && guiTop + 89 + 18 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(hadron.xCoord, hadron.yCoord, hadron.zCoord, 0, 2));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.hadron.hasCustomInventoryName() ? this.hadron.getInventoryName() : I18n.format(this.hadron.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);
|
||||
|
||||
String state = I18n.format("hadron." + this.hadron.state.name().toLowerCase(Locale.US));
|
||||
this.fontRendererObj.drawString(state, this.xSize / 2 - this.fontRendererObj.getStringWidth(state) / 2, 76, this.hadron.state.color);
|
||||
}
|
||||
|
||||
@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(hadron.isOn)
|
||||
drawTexturedModalRect(guiLeft + 16, guiTop + 89, 206, 0, 18, 18);
|
||||
|
||||
if(hadron.analysisOnly)
|
||||
drawTexturedModalRect(guiLeft + 142, guiTop + 107, 206, 18, 18, 18);
|
||||
|
||||
if(hadron.ioMode == hadron.MODE_HOPPER) drawTexturedModalRect(guiLeft + 142, guiTop + 89, 206, 36, 18, 18);
|
||||
if(hadron.ioMode == hadron.MODE_SINGLE) drawTexturedModalRect(guiLeft + 142, guiTop + 89, 224, 36, 18, 18);
|
||||
|
||||
if(hadron.state == EnumHadronState.SUCCESS) {
|
||||
drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 0, 30, 30);
|
||||
}
|
||||
if(hadron.state == EnumHadronState.NORESULT) {
|
||||
drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 30, 30, 30);
|
||||
}
|
||||
if(hadron.state == EnumHadronState.ERROR_GENERIC) {
|
||||
drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 106, 30, 30);
|
||||
}
|
||||
|
||||
int i = hadron.getPowerScaled(70);
|
||||
drawTexturedModalRect(guiLeft + 62, guiTop + 108, 176, 60, i, 16);
|
||||
|
||||
int color = hadron.state.color;
|
||||
float red = (color & 0xff0000) >> 16;
|
||||
float green = (color & 0x00ff00) >> 8;
|
||||
float blue = (color & 0x0000ff);
|
||||
|
||||
GL11.glColor4f(red, green, blue, 1.0F);
|
||||
drawTexturedModalRect(guiLeft + 45, guiTop + 73, 0, 222, 86, 14);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 4, guiTop + 36, 16, 16, 2);
|
||||
}
|
||||
}
|
||||
@ -1,77 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineAssembler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIMachineAssembler extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_assembler.png");
|
||||
private TileEntityMachineAssembler assembler;
|
||||
|
||||
public GUIMachineAssembler(InventoryPlayer invPlayer, TileEntityMachineAssembler tedf) {
|
||||
super(new ContainerMachineAssembler(invPlayer, tedf));
|
||||
assembler = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 70 - 52, 16, 52, assembler.power, assembler.getMaxPower());
|
||||
|
||||
if(assembler.getStackInSlot(4) == null || assembler.getStackInSlot(4).getItem()!= ModItems.assembly_template) {
|
||||
|
||||
String[] warnText = I18nUtil.resolveKeyArray("desc.gui.assembler.warning");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, warnText);
|
||||
}
|
||||
|
||||
String[] templateText = I18nUtil.resolveKeyArray("desc.gui.template");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16, 16, 16, guiLeft - 8, guiTop + 16 + 16, templateText);
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 141, guiTop + 40, 8, 8, guiLeft + 225, guiTop + 40 + 16 + 8, this.getUpgradeInfo(assembler));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.assembler.hasCustomInventoryName() ? this.assembler.getInventoryName() : I18n.format(this.assembler.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 = (int) (assembler.power * 52 / assembler.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 116, guiTop + 70 - i, 176, 52 - i, 16, i);
|
||||
|
||||
if(assembler.isProgressing) {
|
||||
int j = assembler.progress[0] * 83 / assembler.maxProgress[0];
|
||||
drawTexturedModalRect(guiLeft + 45, guiTop + 82, 2, 222, j, 32);
|
||||
}
|
||||
|
||||
if(assembler.getStackInSlot(4) == null || assembler.getStackInSlot(4).getItem()!= ModItems.assembly_template) {
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 6);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16, 16, 16, 11);
|
||||
this.drawInfoPanel(guiLeft + 141, guiTop + 40, 8, 8, 8);
|
||||
}
|
||||
}
|
||||
@ -1,91 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineChemplant;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIMachineChemplant extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_chemplant.png");
|
||||
private TileEntityMachineChemplant chemplant;
|
||||
|
||||
public GUIMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
super(new ContainerMachineChemplant(invPlayer, tedf));
|
||||
chemplant = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
chemplant.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 52 - 34, 16, 34);
|
||||
chemplant.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 52 - 34, 16, 34);
|
||||
chemplant.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 52 - 34, 16, 34);
|
||||
chemplant.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 52 - 34, 16, 34);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 70 - 52, 16, 52, chemplant.power, chemplant.maxPower);
|
||||
|
||||
if(chemplant.getStackInSlot(4) == null || chemplant.getStackInSlot(4).getItem()!= ModItems.chemistry_template) {
|
||||
|
||||
String[] warningText = I18nUtil.resolveKeyArray("desc.gui.chemplant.warning");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, warningText);
|
||||
}
|
||||
|
||||
String[] templateText = I18nUtil.resolveKeyArray("desc.gui.template");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16, 16, 16, guiLeft - 8, guiTop + 16 + 16, templateText);
|
||||
|
||||
String[] upgradeText = new String[3];
|
||||
upgradeText[0] = I18nUtil.resolveKey("desc.gui.upgrade");
|
||||
upgradeText[1] = I18nUtil.resolveKey("desc.gui.upgrade.speed");
|
||||
upgradeText[2] = I18nUtil.resolveKey("desc.gui.upgrade.power");
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 105, guiTop + 40, 8, 8, guiLeft + 105, guiTop + 40 + 16, upgradeText);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.chemplant.hasCustomInventoryName() ? this.chemplant.getInventoryName() : I18n.format(this.chemplant.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 = (int) (chemplant.power * 52 / chemplant.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 44, guiTop + 70 - i, 176, 52 - i, 16, i);
|
||||
|
||||
int j = chemplant.progress * 90 / chemplant.maxProgress;
|
||||
drawTexturedModalRect(guiLeft + 43, guiTop + 89, 0, 222, j, 18);
|
||||
|
||||
this.drawInfoPanel(guiLeft + 105, guiTop + 40, 8, 8, 8);
|
||||
|
||||
if(chemplant.getStackInSlot(4) == null || chemplant.getStackInSlot(4).getItem()!= ModItems.chemistry_template) {
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 6);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16, 16, 16, 11);
|
||||
|
||||
chemplant.tanks[0].renderTank(guiLeft + 8, guiTop + 52, this.zLevel, 16, 34);
|
||||
chemplant.tanks[1].renderTank(guiLeft + 26, guiTop + 52, this.zLevel, 16, 34);
|
||||
chemplant.tanks[2].renderTank(guiLeft + 134, guiTop + 52, this.zLevel, 16, 34);
|
||||
chemplant.tanks[3].renderTank(guiLeft + 152, guiTop + 52, this.zLevel, 16, 34);
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,6 @@ import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.inventory.recipes.CrucibleRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
@ -300,11 +299,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) 240 / 1.0F, (float) 240 / 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
if(stack != null) {
|
||||
if(stack.getItem() == ModItems.assembly_template)
|
||||
itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), AssemblerRecipes.getOutputFromTempate(stack), xPos + 1, yPos + 1);
|
||||
else if(stack.getItem() == ModItems.chemistry_template)
|
||||
itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), new ItemStack(ModItems.chemistry_icon, 1, stack.getItemDamage()), xPos + 1, yPos + 1);
|
||||
else if(stack.getItem() == ModItems.crucible_template)
|
||||
if(stack.getItem() == ModItems.crucible_template)
|
||||
itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), CrucibleRecipes.indexMapping.get(stack.getItemDamage()).icon, xPos + 1, yPos + 1);
|
||||
else
|
||||
itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), stack, xPos + 1, yPos + 1);
|
||||
|
||||
@ -1,468 +0,0 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class ChemplantRecipes extends SerializableRecipe {
|
||||
|
||||
public static HashMap<Integer, ChemRecipe> indexMapping = new HashMap();
|
||||
public static List<ChemRecipe> recipes = new ArrayList();
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
recipes.add(new ChemRecipe(36, "COOLANT", 50)
|
||||
.inputItems(new OreDictStack(KNO.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1800))
|
||||
.outputFluids(new FluidStack(Fluids.COOLANT, 2000)));
|
||||
recipes.add(new ChemRecipe(37, "CRYOGEL", 50)
|
||||
.inputItems(new ComparableStack(ModItems.powder_ice))
|
||||
.inputFluids(new FluidStack(Fluids.COOLANT, 1800))
|
||||
.outputFluids(new FluidStack(Fluids.CRYOGEL, 2000)));
|
||||
recipes.add(new ChemRecipe(38, "DESH", 300)
|
||||
.inputItems(new ComparableStack(ModItems.powder_desh_mix))
|
||||
.inputFluids(
|
||||
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
|
||||
new FluidStack[] {new FluidStack(Fluids.LIGHTOIL, 200)} :
|
||||
new FluidStack[] {new FluidStack(Fluids.MERCURY, 200), new FluidStack(Fluids.LIGHTOIL, 200)})
|
||||
.outputItems(new ItemStack(ModItems.ingot_desh)));
|
||||
recipes.add(new ChemRecipe(39, "NITAN", 50)
|
||||
.inputItems(new ComparableStack(ModItems.powder_nitan_mix))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.KEROSENE, 600),
|
||||
new FluidStack(Fluids.MERCURY, 200))
|
||||
.outputFluids(new FluidStack(Fluids.NITAN, 1000)));
|
||||
recipes.add(new ChemRecipe(40, "PEROXIDE", 50)
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.PEROXIDE, 800)));
|
||||
recipes.add(new ChemRecipe(90, "SULFURIC_ACID", 50)
|
||||
.inputItems(new OreDictStack(S.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PEROXIDE, 800),
|
||||
new FluidStack(Fluids.WATER, 1_000))
|
||||
.outputFluids(new FluidStack(Fluids.SULFURIC_ACID, 2_000)));
|
||||
recipes.add(new ChemRecipe(92, "NITRIC_ACID", 50)
|
||||
.inputItems(new OreDictStack(KNO.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.SULFURIC_ACID, 500))
|
||||
.outputFluids(new FluidStack(Fluids.NITRIC_ACID, 1_000)));
|
||||
recipes.add(new ChemRecipe(93, "SOLVENT", 50)
|
||||
.inputFluids(new FluidStack(Fluids.NAPHTHA, 500), new FluidStack(Fluids.AROMATICS, 500))
|
||||
.outputFluids(new FluidStack(Fluids.SOLVENT, 1000)));
|
||||
recipes.add(new ChemRecipe(43, "POLYMER", 100)
|
||||
.inputItems(
|
||||
new OreDictStack(COAL.dust(), 2),
|
||||
new OreDictStack(F.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ingot_polymer)));
|
||||
recipes.add(new ChemRecipe(81, "BAKELITE", 100)
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0),
|
||||
new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ingot_bakelite)));
|
||||
recipes.add(new ChemRecipe(82, "RUBBER", 100)
|
||||
.inputItems(new OreDictStack(S.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ingot_rubber)));
|
||||
recipes.add(new ChemRecipe(97, "LAMINATE", 100)
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.XYLENE, 250),
|
||||
new FluidStack(Fluids.PHOSGENE, 250))
|
||||
.inputItems(
|
||||
new ComparableStack(ModBlocks.reinforced_glass),
|
||||
new OreDictStack(STEEL.bolt(), 4))
|
||||
.outputItems(new ItemStack(com.hbm.blocks.ModBlocks.reinforced_laminate)));
|
||||
recipes.add(new ChemRecipe(94, "PC", 100)
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.XYLENE, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0),
|
||||
new FluidStack(Fluids.PHOSGENE, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ingot_pc)));
|
||||
recipes.add(new ChemRecipe(96, "PVC", 100)
|
||||
.inputItems(new OreDictStack(CD.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.UNSATURATEDS, 250, GeneralConfig.enable528PressurizedRecipes ? 2 : 0),
|
||||
new FluidStack(Fluids.CHLORINE, 250, GeneralConfig.enable528PressurizedRecipes ? 2 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ingot_pvc, 2)));
|
||||
recipes.add(new ChemRecipe(89, "DYNAMITE", 50)
|
||||
.inputItems(
|
||||
new ComparableStack(Items.sugar),
|
||||
new OreDictStack(KNO.dust()),
|
||||
new OreDictStack("sand"))
|
||||
.outputItems(new ItemStack(ModItems.ball_dynamite, 2)));
|
||||
recipes.add(new ChemRecipe(83, "TNT", 150)
|
||||
.inputItems(new OreDictStack(KNO.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ball_tnt, 4)));
|
||||
recipes.add(new ChemRecipe(95, "TATB", 50)
|
||||
.inputItems(new ComparableStack(ModItems.ball_tnt))
|
||||
.inputFluids(new FluidStack(Fluids.SOURGAS, 200, 1), new FluidStack(Fluids.NITRIC_ACID, 10))
|
||||
.outputItems(new ItemStack(ModItems.ball_tatb)));
|
||||
recipes.add(new ChemRecipe(84, "C4", 150)
|
||||
.inputItems(new OreDictStack(KNO.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0))
|
||||
.outputItems(new ItemStack(ModItems.ingot_c4, 4)));
|
||||
recipes.add(new ChemRecipe(46, "YELLOWCAKE", 250)
|
||||
.inputItems(
|
||||
new OreDictStack(U.billet(), 2), //12 nuggets: the numbers do match up :)
|
||||
new OreDictStack(S.dust(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.PEROXIDE, 500))
|
||||
.outputItems(new ItemStack(ModItems.powder_yellowcake)));
|
||||
recipes.add(new ChemRecipe(47, "UF6", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_yellowcake),
|
||||
new OreDictStack(F.dust(), 4))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputItems(new ItemStack(ModItems.sulfur, 2))
|
||||
.outputFluids(new FluidStack(Fluids.UF6, 1200)));
|
||||
recipes.add(new ChemRecipe(48, "PUF6", 150)
|
||||
.inputItems(
|
||||
new OreDictStack(PU.dust()),
|
||||
new OreDictStack(F.dust(), 3))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.PUF6, 900)));
|
||||
recipes.add(new ChemRecipe(49, "SAS3", 200)
|
||||
.inputItems(
|
||||
new OreDictStack(SA326.dust()),
|
||||
new OreDictStack(S.dust(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.PEROXIDE, 2000))
|
||||
.outputFluids(new FluidStack(Fluids.SAS3, 1000)));
|
||||
recipes.add(new ChemRecipe(53, "CORDITE", 40)
|
||||
.inputItems(
|
||||
new OreDictStack(KNO.dust(), 2),
|
||||
new OreDictStack(KEY_PLANKS),
|
||||
new ComparableStack(Items.sugar))
|
||||
.inputFluids(
|
||||
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
|
||||
new FluidStack(Fluids.HEATINGOIL, 200) :
|
||||
new FluidStack(Fluids.GAS, 200))
|
||||
.outputItems(new ItemStack(ModItems.cordite, 4)));
|
||||
recipes.add(new ChemRecipe(54, "KEVLAR", 40)
|
||||
.inputItems(
|
||||
new OreDictStack(KNO.dust(), 2),
|
||||
new ComparableStack(Items.brick),
|
||||
new OreDictStack(COAL.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.PETROLEUM, 100))
|
||||
.outputItems(new ItemStack(ModItems.plate_kevlar, 4)));
|
||||
recipes.add(new ChemRecipe(55, "CONCRETE", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_cement, 1),
|
||||
new ComparableStack(Blocks.gravel, 8),
|
||||
new OreDictStack(KEY_SAND, 8))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 2000))
|
||||
.outputItems(new ItemStack(ModBlocks.concrete_smooth, 16)));
|
||||
recipes.add(new ChemRecipe(56, "CONCRETE_ASBESTOS", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_cement, 1),
|
||||
new ComparableStack(Blocks.gravel, 2),
|
||||
new OreDictStack(KEY_SAND, 2),
|
||||
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
|
||||
new OreDictStack(ASBESTOS.ingot(), 1) :
|
||||
new OreDictStack(ASBESTOS.ingot(), 4))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 2000))
|
||||
.outputItems(new ItemStack(ModBlocks.concrete_asbestos, 16)));
|
||||
recipes.add(new ChemRecipe(79, "DUCRETE", 150)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_cement, 4),
|
||||
new ComparableStack(Blocks.gravel, 2),
|
||||
new OreDictStack(KEY_SAND, 8),
|
||||
new OreDictStack(U238.billet(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 2000))
|
||||
.outputItems(new ItemStack(ModBlocks.ducrete_smooth, 8)));
|
||||
recipes.add(new ChemRecipe(57, "SOLID_FUEL", 200)
|
||||
.inputItems(new ComparableStack(ModItems.solid_fuel, 2))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PETROLEUM, 200, GeneralConfig.enable528PressurizedRecipes ? 1 : 0),
|
||||
new FluidStack(Fluids.NITRIC_ACID, 100))
|
||||
.outputItems(new ItemStack(ModItems.rocket_fuel, 4)));
|
||||
recipes.add(new ChemRecipe(58, "ELECTROLYSIS", 150)
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 4000))
|
||||
.outputFluids(
|
||||
new FluidStack(Fluids.HYDROGEN, 400),
|
||||
new FluidStack(Fluids.OXYGEN, 400)));
|
||||
recipes.add(new ChemRecipe(59, "XENON", 300)
|
||||
.inputFluids(new FluidStack(Fluids.AIR, 16_000))
|
||||
.outputFluids(new FluidStack(Fluids.XENON, 50)));
|
||||
recipes.add(new ChemRecipe(60, "XENON_OXY", 20)
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.AIR, 8_000),
|
||||
new FluidStack(Fluids.OXYGEN, 250))
|
||||
.outputFluids(new FluidStack(Fluids.XENON, 50)));
|
||||
recipes.add(new ChemRecipe(62, "BALEFIRE", 100)
|
||||
.inputItems(new ComparableStack(ModItems.egg_balefire_shard))
|
||||
.inputFluids(new FluidStack(Fluids.KEROSENE, 6000))
|
||||
.outputItems(new ItemStack(ModItems.powder_balefire))
|
||||
.outputFluids(new FluidStack(Fluids.BALEFIRE, 8000)));
|
||||
recipes.add(new ChemRecipe(63, "SCHRABIDIC", 100)
|
||||
.inputItems(new ComparableStack(ModItems.pellet_charged))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.SAS3, 8000),
|
||||
new FluidStack(Fluids.PEROXIDE, 6000))
|
||||
.outputFluids(new FluidStack(Fluids.SCHRABIDIC, 16000)));
|
||||
recipes.add(new ChemRecipe(64, "SCHRABIDATE", 150)
|
||||
.inputItems(new OreDictStack(IRON.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.SCHRABIDIC, 250))
|
||||
.outputItems(new ItemStack(ModItems.powder_schrabidate)));
|
||||
recipes.add(new ChemRecipe(88, "LUBRICANT", 20)
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.HEATINGOIL, 500),
|
||||
new FluidStack(Fluids.UNSATURATEDS, 500))
|
||||
.outputFluids(new FluidStack(Fluids.LUBRICANT, 1000)));
|
||||
recipes.add(new ChemRecipe(70, "TEL", 40)
|
||||
.inputItems(
|
||||
new OreDictStack(ANY_TAR.any()),
|
||||
new OreDictStack(PB.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new FluidStack(Fluids.STEAM, 1000))
|
||||
.outputItems(new ItemStack(ModItems.fuel_additive)));
|
||||
recipes.add(new ChemRecipe(4, "FR_REOIL", 30)
|
||||
.inputFluids(new FluidStack(1000, Fluids.SMEAR))
|
||||
.outputFluids(new FluidStack(800, Fluids.RECLAIMED)));
|
||||
recipes.add(new ChemRecipe(5, "FR_PETROIL", 30)
|
||||
.inputFluids(
|
||||
new FluidStack(800, Fluids.RECLAIMED),
|
||||
new FluidStack(200, Fluids.LUBRICANT))
|
||||
.outputFluids(new FluidStack(1000, Fluids.PETROIL)));
|
||||
recipes.add(new ChemRecipe(86, "PETROIL_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.fuel_additive))
|
||||
.inputFluids(new FluidStack(Fluids.PETROIL, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.PETROIL_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(71, "GASOLINE", 40)
|
||||
.inputFluids(new FluidStack(Fluids.NAPHTHA, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.GASOLINE, 800)));
|
||||
recipes.add(new ChemRecipe(85, "GASOLINE_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.fuel_additive))
|
||||
.inputFluids(new FluidStack(Fluids.GASOLINE, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.GASOLINE_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(87, "COALGAS_LEADED", 40)
|
||||
.inputItems(new ComparableStack(ModItems.fuel_additive))
|
||||
.inputFluids(new FluidStack(Fluids.COALGAS, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.COALGAS_LEADED, 12_000)));
|
||||
recipes.add(new ChemRecipe(72, "FRACKSOL", 20)
|
||||
.inputItems(new OreDictStack(S.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new FluidStack(Fluids.WATER, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.FRACKSOL, 1000)));
|
||||
recipes.add(new ChemRecipe(73, "HELIUM3", 200)
|
||||
.inputItems(new ComparableStack(ModBlocks.moon_turf, 8))
|
||||
.outputFluids(new FluidStack(Fluids.HELIUM3, 1000)));
|
||||
recipes.add(new ChemRecipe(74, "OSMIRIDIUM_DEATH", 240)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_paleogenite),
|
||||
new OreDictStack(F.dust(), 8),
|
||||
new ComparableStack(ModItems.nugget_bismuth, 4))
|
||||
.inputFluids(new FluidStack(Fluids.PEROXIDE, 1000, 5))
|
||||
.outputFluids(new FluidStack(Fluids.DEATH, 1000, 0)));
|
||||
//one bucket of ethanol equals 275_000 TU using the diesel baseline
|
||||
//the coal baseline is 400_000 per piece
|
||||
//if we assume a burntime of 1.5 ops (300 ticks) for sugar at 100 TU/t that would equal a total of 30_000 TU
|
||||
recipes.add(new ChemRecipe(75, "ETHANOL", 50)
|
||||
.inputItems(new ComparableStack(Items.sugar, 10))
|
||||
.outputFluids(new FluidStack(Fluids.ETHANOL, 1000)));
|
||||
recipes.add(new ChemRecipe(76, "METH", 30)
|
||||
.inputItems(
|
||||
new ComparableStack(Items.wheat),
|
||||
new ComparableStack(Items.dye, 2, 3))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.LUBRICANT, 400),
|
||||
new FluidStack(Fluids.PEROXIDE, 400))
|
||||
.outputItems(new ItemStack(ModItems.chocolate, 4)));
|
||||
recipes.add(new ChemRecipe(77, "CO2", 60)
|
||||
.inputFluids(new FluidStack(Fluids.GAS, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.CARBONDIOXIDE, 1000)));
|
||||
recipes.add(new ChemRecipe(78, "HEAVY_ELECTROLYSIS", 150)
|
||||
.inputFluids(new FluidStack(Fluids.HEAVYWATER, 2000))
|
||||
.outputFluids(
|
||||
new FluidStack(Fluids.DEUTERIUM, 200),
|
||||
new FluidStack(Fluids.OXYGEN, 200)));
|
||||
recipes.add(new ChemRecipe(80, "EPEARL", 100)
|
||||
.inputItems(new OreDictStack(DIAMOND.dust(), 1))
|
||||
.inputFluids(new FluidStack(Fluids.XPJUICE, 500))
|
||||
.outputFluids(new FluidStack(Fluids.ENDERJUICE, 100)));
|
||||
recipes.add(new ChemRecipe(98, "SHELL_CHLORINE", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.ammo_arty, 1, 0),
|
||||
new OreDictStack(ANY_PLASTIC.ingot(), 1))
|
||||
.inputFluids(new FluidStack(Fluids.CHLORINE, 4000))
|
||||
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 9)));
|
||||
recipes.add(new ChemRecipe(99, "SHELL_PHOSGENE", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.ammo_arty, 1, 0),
|
||||
new OreDictStack(ANY_PLASTIC.ingot(), 1))
|
||||
.inputFluids(new FluidStack(Fluids.PHOSGENE, 4000))
|
||||
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 10)));
|
||||
recipes.add(new ChemRecipe(100, "SHELL_MUSTARD", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.ammo_arty, 1, 0),
|
||||
new OreDictStack(ANY_PLASTIC.ingot(), 1))
|
||||
.inputFluids(new FluidStack(Fluids.MUSTARDGAS, 4000))
|
||||
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 11)));
|
||||
|
||||
recipes.add(new ChemRecipe(102, "THORIUM_SALT", 60)
|
||||
.inputFluids(new FluidStack(Fluids.THORIUM_SALT_DEPLETED, 16_000))
|
||||
.inputItems(new OreDictStack(TH232.nugget(), 2))
|
||||
.outputFluids(new FluidStack(Fluids.THORIUM_SALT, 16_000))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.nugget_u233, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 1)));
|
||||
|
||||
recipes.add(new ChemRecipe(103, "MEAT_PROCESSING", 200)
|
||||
.inputItems(new OreDictStack(KEY_GLYPHID_MEAT, 3))
|
||||
.inputFluids(new FluidStack(Fluids.SULFURIC_ACID, 1000))
|
||||
.outputItems(new ItemStack(ModItems.sulfur, 4),
|
||||
new ItemStack(ModItems.niter, 3))
|
||||
.outputFluids(new FluidStack(Fluids.SALIENT, 250)));
|
||||
|
||||
recipes.add(new ChemRecipe(104, "RUSTY_DECO_STEEL", 100)
|
||||
.inputItems(new ComparableStack(ModBlocks.deco_steel, 8))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputItems(new ItemStack(ModBlocks.deco_rusty_steel, 8)));
|
||||
}
|
||||
|
||||
@Deprecated public static class ChemRecipe {
|
||||
|
||||
public int listing;
|
||||
private int id;
|
||||
public String name;
|
||||
public AStack[] inputs;
|
||||
public FluidStack[] inputFluids;
|
||||
public ItemStack[] outputs;
|
||||
public FluidStack[] outputFluids;
|
||||
private int duration;
|
||||
|
||||
public ChemRecipe(int index, String name, int duration) {
|
||||
this.id = index;
|
||||
this.name = name;
|
||||
this.duration = duration;
|
||||
this.listing = recipes.size();
|
||||
|
||||
this.inputs = new AStack[4];
|
||||
this.outputs = new ItemStack[4];
|
||||
this.inputFluids = new FluidStack[2];
|
||||
this.outputFluids = new FluidStack[2];
|
||||
|
||||
if(!indexMapping.containsKey(id)) {
|
||||
indexMapping.put(id, this);
|
||||
} else {
|
||||
throw new IllegalStateException("Chemical plant recipe " + name + " has been registered with duplicate id " + id + " used by " + indexMapping.get(id).name + "!");
|
||||
}
|
||||
}
|
||||
|
||||
public ChemRecipe inputItems(AStack... in) {
|
||||
for(int i = 0; i < in.length; i++) this.inputs[i] = in[i];
|
||||
return this;
|
||||
}
|
||||
|
||||
public ChemRecipe inputFluids(FluidStack... in) {
|
||||
for(int i = 0; i < in.length; i++) this.inputFluids[i] = in[i];
|
||||
return this;
|
||||
}
|
||||
|
||||
public ChemRecipe outputItems(ItemStack... out) {
|
||||
for(int i = 0; i < out.length; i++) this.outputs[i] = out[i];
|
||||
return this;
|
||||
}
|
||||
|
||||
public ChemRecipe outputFluids(FluidStack... out) {
|
||||
for(int i = 0; i < out.length; i++) this.outputFluids[i] = out[i];
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmChemplant.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeObject() {
|
||||
return this.recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) {
|
||||
JsonObject obj = (JsonObject) recipe;
|
||||
int id = obj.get("id").getAsInt();
|
||||
String name = obj.get("name").getAsString();
|
||||
int duration = obj.get("duration").getAsInt();
|
||||
|
||||
recipes.add(new ChemRecipe(id, name, duration)
|
||||
.inputFluids( this.readFluidArray( (JsonArray) obj.get("fluidInput")))
|
||||
.inputItems( this.readAStackArray( (JsonArray) obj.get("itemInput")))
|
||||
.outputFluids( this.readFluidArray( (JsonArray) obj.get("fluidOutput")))
|
||||
.outputItems( this.readItemStackArray( (JsonArray) obj.get("itemOutput"))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||
try {
|
||||
ChemRecipe chem = (ChemRecipe) recipe;
|
||||
writer.name("id").value(chem.id);
|
||||
writer.name("name").value(chem.name);
|
||||
writer.name("duration").value(chem.duration);
|
||||
//Fluid IN
|
||||
writer.name("fluidInput").beginArray();
|
||||
for(FluidStack input : chem.inputFluids) { if(input != null) this.writeFluidStack(input, writer); }
|
||||
writer.endArray();
|
||||
//Item IN
|
||||
writer.name("itemInput").beginArray();
|
||||
for(AStack input : chem.inputs) { if(input != null) this.writeAStack(input, writer); }
|
||||
writer.endArray();
|
||||
//Fluid OUT
|
||||
writer.name("fluidOutput").beginArray();
|
||||
for(FluidStack output : chem.outputFluids) { if(output != null) this.writeFluidStack(output, writer); }
|
||||
writer.endArray();
|
||||
//Item OUT
|
||||
writer.name("itemOutput").beginArray();
|
||||
for(ItemStack output : chem.outputs) { if(output != null) this.writeItemStack(output, writer); }
|
||||
writer.endArray();
|
||||
} catch(Exception ex) {
|
||||
MainRegistry.logger.error(ex);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return "Rules: All in- and output arrays need to be present, even if empty. IDs need to be unique, but not sequential. It's safe if you add your own"
|
||||
+ " recipes starting with ID 1000. Template order depends on the order of the recipes in this JSON file. The 'name' field is responsible for"
|
||||
+ " the texture being loaded for the template. Custom dynamic texture generation is not yet implemented, you will have to throw the texture into"
|
||||
+ " the JAR manually.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecipes() {
|
||||
this.indexMapping.clear();
|
||||
this.recipes.clear();
|
||||
}
|
||||
}
|
||||
@ -1,194 +0,0 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron.EnumHadronState;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated public class HadronRecipes extends SerializableRecipe {
|
||||
|
||||
/*
|
||||
* Since we're dealing with like 10 or so recipes, using a HashMap (or to combine two keys, a HashMap *in* a HashMap)
|
||||
* would be less performant than those few steps through a good old Array list, and it's much easier to implement too.
|
||||
*/
|
||||
private static final List<HadronRecipe> recipes = new ArrayList();
|
||||
|
||||
/*
|
||||
* We CAN actually implement recipes with the same input items but different momentum requirements.
|
||||
* Just be sure to register the higher requirement BEFORE the lower one since those need to be checked first.
|
||||
*
|
||||
* It's important to remember that, ok?
|
||||
*
|
||||
* Update, T+6 minutes: I went for coffee and already forgot what I was doing, good thing I keep these notes, hehe.
|
||||
* Having multiple recipes with different momentum requirements (at most I would expect 2) isn't exactly necessary
|
||||
* since the thing differentiates between ring and line accelerator mode, and line accelerators are by design always shorter anyway.
|
||||
*/
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_hydrogen),
|
||||
new ItemStack(ModItems.particle_copper),
|
||||
900,
|
||||
new ItemStack(ModItems.particle_aproton),
|
||||
new ItemStack(ModItems.particle_aelectron),
|
||||
true
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_amat),
|
||||
new ItemStack(ModItems.particle_amat),
|
||||
900,
|
||||
new ItemStack(ModItems.particle_aschrab),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
false
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_aschrab),
|
||||
new ItemStack(ModItems.particle_aschrab),
|
||||
100000,
|
||||
new ItemStack(ModItems.particle_dark),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
false
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_hydrogen),
|
||||
new ItemStack(ModItems.particle_amat),
|
||||
2000,
|
||||
new ItemStack(ModItems.particle_muon),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
true
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_hydrogen),
|
||||
new ItemStack(ModItems.particle_lead),
|
||||
5000,
|
||||
new ItemStack(ModItems.particle_higgs),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
false
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_muon),
|
||||
new ItemStack(ModItems.particle_higgs),
|
||||
2000,
|
||||
new ItemStack(ModItems.particle_tachyon),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
true
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_muon),
|
||||
new ItemStack(ModItems.particle_dark),
|
||||
100000,
|
||||
new ItemStack(ModItems.particle_strange),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
false
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_strange),
|
||||
new ItemStack(ModItems.powder_magic),
|
||||
500000,
|
||||
new ItemStack(ModItems.particle_sparkticle),
|
||||
new ItemStack(ModItems.dust),
|
||||
false
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(ModItems.particle_sparkticle),
|
||||
new ItemStack(ModItems.particle_higgs),
|
||||
1000000,
|
||||
new ItemStack(ModItems.particle_digamma),
|
||||
new ItemStack(ModItems.particle_empty),
|
||||
false
|
||||
));
|
||||
recipes.add(new HadronRecipe(
|
||||
new ItemStack(Items.chicken),
|
||||
new ItemStack(Items.chicken),
|
||||
100,
|
||||
new ItemStack(ModItems.nugget),
|
||||
new ItemStack(ModItems.nugget),
|
||||
false
|
||||
));
|
||||
}
|
||||
|
||||
public static EnumHadronState returnCode = EnumHadronState.NORESULT;
|
||||
|
||||
/**
|
||||
* Resolves recipes, simple enough.
|
||||
* @param in1
|
||||
* @param in2
|
||||
* @param momentum
|
||||
* @param analysisOnly true == line accelerator mode
|
||||
* @return either null (no recipe) or an ItemStack array with 2 non-null instances
|
||||
*/
|
||||
public static ItemStack[] getOutput(ItemStack in1, ItemStack in2, int momentum, boolean analysisOnly) {
|
||||
|
||||
returnCode = EnumHadronState.NORESULT_WRONG_INGREDIENT;
|
||||
|
||||
for(HadronRecipe r : recipes) {
|
||||
|
||||
if((r.in1.matchesRecipe(in1, false) && r.in2.matchesRecipe(in2, false)) ||
|
||||
(r.in1.matchesRecipe(in2, false) && r.in2.matchesRecipe(in1, false))) {
|
||||
|
||||
if(analysisOnly && !r.analysisOnly) returnCode = EnumHadronState.NORESULT_WRONG_MODE;
|
||||
if(momentum < r.momentum) returnCode = EnumHadronState.NORESULT_TOO_SLOW;
|
||||
|
||||
if(momentum >= r.momentum && analysisOnly == r.analysisOnly)
|
||||
return new ItemStack[] {r.out1, r.out2};
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<HadronRecipe> getRecipes() {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static class HadronRecipe {
|
||||
|
||||
public ComparableStack in1;
|
||||
public ComparableStack in2;
|
||||
public int momentum;
|
||||
public ItemStack out1;
|
||||
public ItemStack out2;
|
||||
public boolean analysisOnly;
|
||||
|
||||
public HadronRecipe(ItemStack in1, ItemStack in2, int momentum, ItemStack out1, ItemStack out2, boolean analysisOnly) {
|
||||
this.in1 = new ComparableStack(in1).makeSingular();
|
||||
this.in2 = new ComparableStack(in2).makeSingular();
|
||||
this.momentum = momentum;
|
||||
this.out1 = out1;
|
||||
this.out2 = out2;
|
||||
this.out1.stackSize = 1;
|
||||
this.out2.stackSize = 1;
|
||||
this.analysisOnly = analysisOnly;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmHadronCollider.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeObject() {
|
||||
return this.recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) { }
|
||||
|
||||
@Override
|
||||
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException { }
|
||||
|
||||
@Override
|
||||
public void deleteRecipes() {
|
||||
this.recipes.clear();
|
||||
}
|
||||
}
|
||||
@ -20,8 +20,6 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.material.NTMMaterial;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes.AssemblerRecipe;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -997,15 +995,6 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
}).setTier(1));
|
||||
}
|
||||
|
||||
public static void pullFromAssembler(ComparableStack result, int tier) {
|
||||
|
||||
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(result);
|
||||
|
||||
if(recipe != null) {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(recipe.ingredients, new AnvilOutput(result.toStack())).setTier(tier));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<AnvilSmithingRecipe> getSmithing() {
|
||||
return smithingRecipes;
|
||||
}
|
||||
|
||||
@ -55,7 +55,6 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new BlastFurnaceRecipes());
|
||||
recipeHandlers.add(new ShredderRecipes());
|
||||
recipeHandlers.add(new SolderingRecipes());
|
||||
recipeHandlers.add(new ChemplantRecipes());
|
||||
recipeHandlers.add(new CombinationRecipes());
|
||||
recipeHandlers.add(new CrucibleRecipes());
|
||||
recipeHandlers.add(new CentrifugeRecipes());
|
||||
@ -72,7 +71,6 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new PyroOvenRecipes());
|
||||
recipeHandlers.add(new BreederRecipes());
|
||||
recipeHandlers.add(new CyclotronRecipes());
|
||||
recipeHandlers.add(new HadronRecipes());
|
||||
recipeHandlers.add(new FuelPoolRecipes());
|
||||
recipeHandlers.add(new MixerRecipes());
|
||||
recipeHandlers.add(new OutgasserRecipes());
|
||||
@ -85,7 +83,6 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new ExposureChamberRecipes());
|
||||
recipeHandlers.add(new ParticleAcceleratorRecipes());
|
||||
recipeHandlers.add(new AmmoPressRecipes());
|
||||
recipeHandlers.add(new AssemblerRecipes());
|
||||
//AFTER Assembler
|
||||
recipeHandlers.add(new AnvilRecipes());
|
||||
recipeHandlers.add(new PedestalRecipes());
|
||||
|
||||
@ -740,8 +740,6 @@ public class ModItems {
|
||||
public static Item pellet_rtg_gold;
|
||||
public static Item pellet_rtg_lead;
|
||||
|
||||
@Deprecated public static Item tritium_deuterium_cake;
|
||||
|
||||
public static Item piston_selenium;
|
||||
public static Item piston_set;
|
||||
public static Item drillbit;
|
||||
@ -777,10 +775,10 @@ public class ModItems {
|
||||
public static Item ams_core_eyeofharmony;
|
||||
public static Item ams_core_thingy;
|
||||
|
||||
public static Item fusion_shield_tungsten;
|
||||
public static Item fusion_shield_desh;
|
||||
public static Item fusion_shield_chlorophyte;
|
||||
public static Item fusion_shield_vaporwave;
|
||||
@Deprecated public static Item fusion_shield_tungsten;
|
||||
@Deprecated public static Item fusion_shield_desh;
|
||||
@Deprecated public static Item fusion_shield_chlorophyte;
|
||||
@Deprecated public static Item fusion_shield_vaporwave;
|
||||
|
||||
public static Item cell_empty;
|
||||
public static Item cell_uf6;
|
||||
@ -801,8 +799,6 @@ public class ModItems {
|
||||
public static Item particle_hydrogen;
|
||||
public static Item particle_copper;
|
||||
public static Item particle_lead;
|
||||
public static Item particle_aproton;
|
||||
public static Item particle_aelectron;
|
||||
public static Item particle_amat;
|
||||
public static Item particle_aschrab;
|
||||
public static Item particle_higgs;
|
||||
@ -1154,9 +1150,6 @@ public class ModItems {
|
||||
public static Item blueprints;
|
||||
public static Item blueprint_folder;
|
||||
public static Item template_folder;
|
||||
@Deprecated public static Item assembly_template;
|
||||
@Deprecated public static Item chemistry_template;
|
||||
@Deprecated public static Item chemistry_icon;
|
||||
public static Item crucible_template;
|
||||
public static Item fluid_identifier_multi;
|
||||
public static Item fluid_icon;
|
||||
@ -1630,8 +1623,6 @@ public class ModItems {
|
||||
public static Item fusion_core;
|
||||
public static Item energy_core;
|
||||
public static Item fuse;
|
||||
public static Item redcoil_capacitor;
|
||||
public static Item euphemium_capacitor;
|
||||
//by using these in crafting table recipes, i'm running the risk of making my recipes too greg-ian (which i don't like)
|
||||
//in the event that i forget about the meaning of the word "sparingly", please throw a brick at my head
|
||||
public static Item screwdriver;
|
||||
@ -1703,10 +1694,6 @@ public class ModItems {
|
||||
public static Item beta;
|
||||
public static Item no9;
|
||||
|
||||
@Deprecated public static Item t45_helmet;
|
||||
@Deprecated public static Item t45_plate;
|
||||
@Deprecated public static Item t45_legs;
|
||||
@Deprecated public static Item t45_boots;
|
||||
public static Item t51_helmet;
|
||||
public static Item t51_plate;
|
||||
public static Item t51_legs;
|
||||
@ -2762,8 +2749,6 @@ public class ModItems {
|
||||
pellet_rtg_gold = new ItemRTGPellet(VersatileConfig.rtgDecay() ? 200 : 100).setDecays(DepletedRTGMaterial.MERCURY, (long) (RTGUtil.getLifespan(2.7F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_gold").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_gold");
|
||||
pellet_rtg_lead = new ItemRTGPellet(VersatileConfig.rtgDecay() ? 600 : 200).setDecays(DepletedRTGMaterial.BISMUTH, (long) (RTGUtil.getLifespan(0.3F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_lead").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_lead");
|
||||
|
||||
tritium_deuterium_cake = new ItemCustomLore().setUnlocalizedName("tritium_deuterium_cake").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":tritium_deuterium_cake");
|
||||
|
||||
piston_selenium = new Item().setUnlocalizedName("piston_selenium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":piston_selenium");
|
||||
piston_set = new ItemPistons().setUnlocalizedName("piston_set").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1);
|
||||
drillbit = new ItemDrillbit().setUnlocalizedName("drillbit").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1);
|
||||
@ -2811,8 +2796,6 @@ public class ModItems {
|
||||
particle_hydrogen = new Item().setUnlocalizedName("particle_hydrogen").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_hydrogen");
|
||||
particle_copper = new Item().setUnlocalizedName("particle_copper").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_copper");
|
||||
particle_lead = new Item().setUnlocalizedName("particle_lead").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_lead");
|
||||
particle_aproton = new Item().setUnlocalizedName("particle_aproton").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_aproton");
|
||||
particle_aelectron = new Item().setUnlocalizedName("particle_aelectron").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_aelectron");
|
||||
particle_amat = new Item().setUnlocalizedName("particle_amat").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_amat");
|
||||
particle_aschrab = new Item().setUnlocalizedName("particle_aschrab").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_aschrab");
|
||||
particle_higgs = new Item().setUnlocalizedName("particle_higgs").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_higgs");
|
||||
@ -3405,18 +3388,6 @@ public class ModItems {
|
||||
.setHeat(1.0D)
|
||||
.setMeltingPoint(100000)
|
||||
.setUnlocalizedName("rbmk_fuel_test").setTextureName(RefStrings.MODID + ":rbmk_fuel_test");
|
||||
/* Experimental flux curve shit
|
||||
rbmk_fuel_curve = (ItemRBMKRod) new ItemRBMKRod("3D Flux Curve Test")
|
||||
.setFluxCurve(true)
|
||||
.setOutputFluxCurve((fluxQuantity, fluxRatio) -> fluxQuantity * (1 - Math.pow(fluxRatio, 2)))
|
||||
.setDepletionOutputRatioCurve((ratioIn, depletion) -> Math.pow(ratioIn, 2) * depletion)
|
||||
.setYield(1000000D)
|
||||
.setStats(75)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setHeat(1.5D)
|
||||
.setMeltingPoint(100000)
|
||||
.setUnlocalizedName("rbmk_fuel_curve").setTextureName(RefStrings.MODID + ":rbmk_fuel_curve");
|
||||
*/
|
||||
|
||||
watz_pellet = new ItemWatzPellet().setUnlocalizedName("watz_pellet").setTextureName(RefStrings.MODID + ":watz_pellet");
|
||||
watz_pellet_depleted = new ItemWatzPellet().setUnlocalizedName("watz_pellet_depleted").setTextureName(RefStrings.MODID + ":watz_pellet");
|
||||
@ -3776,7 +3747,6 @@ public class ModItems {
|
||||
flame_politics = new ItemCustomLore().setUnlocalizedName("flame_politics").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":flame_politics");
|
||||
flame_opinion = new ItemCustomLore().setUnlocalizedName("flame_opinion").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":flame_opinion");
|
||||
|
||||
//gadget_explosive = new Item().setUnlocalizedName("gadget_explosive").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":gadget_explosive");
|
||||
early_explosive_lenses = new ItemCustomLore().setUnlocalizedName("early_explosive_lenses").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":gadget_explosive8");
|
||||
explosive_lenses = new ItemCustomLore().setUnlocalizedName("explosive_lenses").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":man_explosive8");
|
||||
gadget_wireing = new Item().setUnlocalizedName("gadget_wireing").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":gadget_wireing");
|
||||
@ -3788,7 +3758,6 @@ public class ModItems {
|
||||
boy_target = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("boy_target").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":boy_target");
|
||||
boy_shielding = new Item().setUnlocalizedName("boy_shielding").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":boy_shielding");
|
||||
|
||||
//man_explosive = new Item().setUnlocalizedName("man_explosive").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":man_explosive");
|
||||
man_igniter = new Item().setUnlocalizedName("man_igniter").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":man_igniter");
|
||||
man_core = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("man_core").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":man_core");
|
||||
|
||||
@ -3864,8 +3833,6 @@ public class ModItems {
|
||||
fusion_core = new ItemFusionCore(2500000).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core");
|
||||
energy_core = new ItemBattery(10000000, 0, 1000).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":energy_core");
|
||||
fuse = new ItemCustomLore().setUnlocalizedName("fuse").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fuse");
|
||||
redcoil_capacitor = new ItemCapacitor(10).setUnlocalizedName("redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":redcoil_capacitor");
|
||||
euphemium_capacitor = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("euphemium_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":redcoil_capacitor_euphemium");
|
||||
screwdriver = new ItemTooling(ToolType.SCREWDRIVER, 100).setUnlocalizedName("screwdriver");
|
||||
screwdriver_desh = new ItemTooling(ToolType.SCREWDRIVER, 0).setUnlocalizedName("screwdriver_desh");
|
||||
hand_drill = new ItemTooling(ToolType.HAND_DRILL, 100).setUnlocalizedName("hand_drill");
|
||||
@ -4023,9 +3990,6 @@ public class ModItems {
|
||||
blueprints = new ItemBlueprints().setUnlocalizedName("blueprints").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":blueprints");
|
||||
blueprint_folder = new ItemBlueprintFolder().setUnlocalizedName("blueprint_folder").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":blueprint_folder");
|
||||
template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":template_folder");
|
||||
assembly_template = new ItemAssemblyTemplate().setUnlocalizedName("assembly_template").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":assembly_template");
|
||||
chemistry_template = new ItemChemistryTemplate().setUnlocalizedName("chemistry_template").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":chemistry_template");
|
||||
chemistry_icon = new ItemChemistryIcon().setUnlocalizedName("chemistry_icon").setMaxStackSize(1).setCreativeTab(null);
|
||||
crucible_template = new ItemCrucibleTemplate().setUnlocalizedName("crucible_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":crucible_template");
|
||||
fluid_identifier_multi = new ItemFluidIDMulti().setUnlocalizedName("fluid_identifier_multi").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":fluid_identifier_multi");
|
||||
fluid_icon = new ItemFluidIcon().setUnlocalizedName("fluid_icon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":fluid_icon");
|
||||
@ -5230,7 +5194,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(pellet_rtg_gold, pellet_rtg_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_rtg_lead, pellet_rtg_lead.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_rtg_depleted, pellet_rtg_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(tritium_deuterium_cake, tritium_deuterium_cake.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_cluster, pellet_cluster.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_buckshot, pellet_buckshot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_charged, pellet_charged.getUnlocalizedName());
|
||||
@ -5265,8 +5228,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(particle_hydrogen, particle_hydrogen.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_copper, particle_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_lead, particle_lead.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_aproton, particle_aproton.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_aelectron, particle_aelectron.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_amat, particle_amat.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_aschrab, particle_aschrab.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_higgs, particle_higgs.getUnlocalizedName());
|
||||
@ -5454,15 +5415,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(fluid_identifier_multi, fluid_identifier_multi.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluid_icon, fluid_icon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluid_duct, fluid_duct.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_template, assembly_template.getUnlocalizedName());
|
||||
GameRegistry.registerItem(chemistry_template, chemistry_template.getUnlocalizedName());
|
||||
GameRegistry.registerItem(chemistry_icon, chemistry_icon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crucible_template, crucible_template.getUnlocalizedName());
|
||||
|
||||
//Machine Items
|
||||
GameRegistry.registerItem(fuse, fuse.getUnlocalizedName());
|
||||
GameRegistry.registerItem(redcoil_capacitor, redcoil_capacitor.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_capacitor, euphemium_capacitor.getUnlocalizedName());
|
||||
GameRegistry.registerItem(screwdriver, screwdriver.getUnlocalizedName());
|
||||
GameRegistry.registerItem(screwdriver_desh, screwdriver_desh.getUnlocalizedName());
|
||||
GameRegistry.registerItem(hand_drill, hand_drill.getUnlocalizedName());
|
||||
@ -6494,10 +6450,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(dieselsuit_plate, dieselsuit_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dieselsuit_legs, dieselsuit_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dieselsuit_boots, dieselsuit_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_helmet, t45_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_legs, t45_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_boots, t45_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_helmet, t51_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_plate, t51_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_legs, t51_legs.getUnlocalizedName());
|
||||
|
||||
@ -1,31 +1,7 @@
|
||||
package com.hbm.items;
|
||||
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.armor.ArmorAJR;
|
||||
import com.hbm.items.armor.ArmorAJRO;
|
||||
import com.hbm.items.armor.ArmorAshGlasses;
|
||||
import com.hbm.items.armor.ArmorBJ;
|
||||
import com.hbm.items.armor.ArmorBJJetpack;
|
||||
import com.hbm.items.armor.ArmorBismuth;
|
||||
import com.hbm.items.armor.ArmorDNT;
|
||||
import com.hbm.items.armor.ArmorDesh;
|
||||
import com.hbm.items.armor.ArmorDiesel;
|
||||
import com.hbm.items.armor.ArmorDigamma;
|
||||
import com.hbm.items.armor.ArmorEnvsuit;
|
||||
import com.hbm.items.armor.ArmorEuphemium;
|
||||
import com.hbm.items.armor.ArmorFSB;
|
||||
import com.hbm.items.armor.ArmorGasMask;
|
||||
import com.hbm.items.armor.ArmorHEV;
|
||||
import com.hbm.items.armor.ArmorHat;
|
||||
import com.hbm.items.armor.ArmorModel;
|
||||
import com.hbm.items.armor.ArmorNCRPA;
|
||||
import com.hbm.items.armor.ArmorNo9;
|
||||
import com.hbm.items.armor.ArmorRPA;
|
||||
import com.hbm.items.armor.ArmorT45;
|
||||
import com.hbm.items.armor.ArmorT51;
|
||||
import com.hbm.items.armor.ArmorTaurun;
|
||||
import com.hbm.items.armor.ArmorTrenchmaster;
|
||||
import com.hbm.items.armor.ModArmor;
|
||||
import com.hbm.items.armor.*;
|
||||
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
|
||||
import com.hbm.items.special.ItemDrop;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -143,19 +119,6 @@ public class ModItemsArmor {
|
||||
dnt_legs = new ArmorFSB(aMatDNT, 2, RefStrings.MODID + ":textures/armor/dnt_2.png").cloneStats((ArmorFSB) dnt_helmet).setUnlocalizedName("dnt_legs").setTextureName(RefStrings.MODID + ":dnt_legs");
|
||||
dnt_boots = new ArmorFSB(aMatDNT, 3, RefStrings.MODID + ":textures/armor/dnt_1.png").cloneStats((ArmorFSB) dnt_helmet).setUnlocalizedName("dnt_boots").setTextureName(RefStrings.MODID + ":dnt_boots");
|
||||
|
||||
ArmorMaterial aMatT45 = EnumHelper.addArmorMaterial("HBM_T45", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatT45.customCraftingMaterial = ModItems.plate_armor_titanium;
|
||||
t45_helmet = new ArmorT45(aMatT45, 0, 1000000, 10000, 1000, 5)
|
||||
.enableVATS(true)
|
||||
.setHasGeigerSound(true)
|
||||
.setHasHardLanding(true)
|
||||
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 0))
|
||||
.hides(EnumPlayerPart.HAT)
|
||||
.setUnlocalizedName("t45_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_helmet");
|
||||
t45_plate = new ArmorT45(aMatT45, 1, 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t45_helmet).setUnlocalizedName("t45_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_plate");
|
||||
t45_legs = new ArmorT45(aMatT45, 2, 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t45_helmet).setUnlocalizedName("t45_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_legs");
|
||||
t45_boots = new ArmorT45(aMatT45, 3, 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t45_helmet).setUnlocalizedName("t45_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_boots");
|
||||
|
||||
ArmorMaterial aMatT51 = EnumHelper.addArmorMaterial("HBM_T51", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatT51.customCraftingMaterial = ModItems.plate_armor_titanium;
|
||||
t51_helmet = new ArmorT51(aMatT51, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 1000, 5)
|
||||
|
||||
@ -1,99 +0,0 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelT45Boots;
|
||||
import com.hbm.render.model.ModelT45Chest;
|
||||
import com.hbm.render.model.ModelT45Helmet;
|
||||
import com.hbm.render.model.ModelT45Legs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArmorT45 extends ArmorFSBPowered {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelT45Helmet helmet;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelT45Chest plate;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelT45Legs legs;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelT45Boots boots;
|
||||
|
||||
public ArmorT45(ArmorMaterial material, int slot, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, "", maxPower, chargeRate, consumption, drain);
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
if (stack.getItem() == ModItems.t45_helmet)
|
||||
return armorType == 0;
|
||||
if (stack.getItem() == ModItems.t45_plate)
|
||||
return armorType == 1;
|
||||
if (stack.getItem() == ModItems.t45_legs)
|
||||
return armorType == 2;
|
||||
if (stack.getItem() == ModItems.t45_boots)
|
||||
return armorType == 3;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
if (this == ModItems.t45_helmet) {
|
||||
if (armorSlot == 0) {
|
||||
if (this.helmet == null) {
|
||||
this.helmet = new ModelT45Helmet();
|
||||
}
|
||||
return this.helmet;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.t45_plate) {
|
||||
if (armorSlot == 1) {
|
||||
if (this.plate == null) {
|
||||
this.plate = new ModelT45Chest();
|
||||
}
|
||||
return this.plate;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.t45_legs) {
|
||||
if (armorSlot == 2) {
|
||||
if (this.legs == null) {
|
||||
this.legs = new ModelT45Legs();
|
||||
}
|
||||
return this.legs;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.t45_boots) {
|
||||
if (armorSlot == 3) {
|
||||
if (this.boots == null) {
|
||||
this.boots = new ModelT45Boots();
|
||||
}
|
||||
return this.boots;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
if (stack.getItem() == ModItems.t45_helmet) {
|
||||
return "hbm:textures/models/T45Helmet.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.t45_plate) {
|
||||
return "hbm:textures/models/T45Chest.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.t45_legs) {
|
||||
return "hbm:textures/models/T45Legs.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.t45_boots) {
|
||||
return "hbm:textures/models/T45Boots.png";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,317 +0,0 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes.AssemblerRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
@Deprecated
|
||||
public class ItemAssemblyTemplate extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon hiddenIcon;
|
||||
|
||||
public ItemAssemblyTemplate() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
|
||||
ComparableStack stack = AssemblerRecipes.recipeList.get(meta);
|
||||
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(stack);
|
||||
|
||||
if(recipe != null && !recipe.folders.contains(ModItems.template_folder))
|
||||
return this.hiddenIcon;
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
|
||||
//NEW
|
||||
ComparableStack out = readType(stack);
|
||||
//LEGACY
|
||||
if(out == null) out = AssemblerRecipes.recipeList.get(stack.getItemDamage());
|
||||
|
||||
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(out);
|
||||
|
||||
if(recipe != null && !recipe.folders.contains(ModItems.template_folder))
|
||||
return this.hiddenIcon;
|
||||
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
super.registerIcons(reg);
|
||||
this.hiddenIcon = reg.registerIcon(this.iconString + "_secret");
|
||||
}
|
||||
|
||||
public static ItemStack writeType(ItemStack stack, ComparableStack comp) {
|
||||
if(!stack.hasTagCompound())
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
stack.stackTagCompound.setInteger("id", Item.getIdFromItem(comp.item));
|
||||
stack.stackTagCompound.setByte("count", (byte)comp.stacksize);
|
||||
stack.stackTagCompound.setShort("meta", (short)comp.meta);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public static ComparableStack readType(ItemStack stack) {
|
||||
if(!stack.hasTagCompound())
|
||||
return null;
|
||||
|
||||
if(!stack.stackTagCompound.hasKey("id"))
|
||||
return null;
|
||||
|
||||
int id = stack.stackTagCompound.getInteger("id");
|
||||
int count = stack.stackTagCompound.getByte("count");
|
||||
int meta = stack.stackTagCompound.getShort("meta");
|
||||
|
||||
return new ComparableStack(Item.getItemById(id), count, meta);
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
try {
|
||||
//NEW
|
||||
ComparableStack comp = readType(stack);
|
||||
//LEGACY
|
||||
if(comp == null) comp = AssemblerRecipes.recipeList.get(stack.getItemDamage());
|
||||
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
ItemStack out = comp != null ? comp.toStack() : null;
|
||||
if(out.getItem() == null) {
|
||||
out = null;
|
||||
}
|
||||
if(out == null) {
|
||||
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
String s1 = out.getDisplayName().trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
}
|
||||
|
||||
return s;
|
||||
} catch(Exception ex) {
|
||||
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
|
||||
int count = AssemblerRecipes.recipeList.size();
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
ComparableStack comp = AssemblerRecipes.recipeList.get(i);
|
||||
list.add(writeType(new ItemStack(item), comp));
|
||||
}
|
||||
}
|
||||
|
||||
public static int getProcessTime(ItemStack stack) {
|
||||
|
||||
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
|
||||
return 100;
|
||||
|
||||
int i = stack.getItemDamage();
|
||||
|
||||
if(i < 0 || i >= AssemblerRecipes.recipeList.size())
|
||||
return 100;
|
||||
|
||||
//NEW
|
||||
ComparableStack out = readType(stack);
|
||||
//LEGACY
|
||||
if(out == null) out = AssemblerRecipes.recipeList.get(i);
|
||||
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(out);
|
||||
|
||||
if(recipe != null) return recipe.time;
|
||||
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.RED + "Deprecated");
|
||||
|
||||
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
|
||||
return;
|
||||
|
||||
int i = stack.getItemDamage();
|
||||
|
||||
if(i < 0 || i >= AssemblerRecipes.recipeList.size()) {
|
||||
list.add("I AM ERROR");
|
||||
return;
|
||||
}
|
||||
|
||||
//NEW
|
||||
ComparableStack out = readType(stack);
|
||||
//LEGACY
|
||||
if(out == null) {
|
||||
out = AssemblerRecipes.recipeList.get(i);
|
||||
}
|
||||
|
||||
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(out);
|
||||
if(recipe == null) {
|
||||
list.add("I AM ERROR");
|
||||
return;
|
||||
}
|
||||
|
||||
HashSet<Item> folders = recipe.folders;
|
||||
|
||||
if(folders == null)
|
||||
folders = new HashSet() {
|
||||
{
|
||||
add(ModItems.template_folder);
|
||||
}
|
||||
};
|
||||
|
||||
String[] names = new String[folders.size()];
|
||||
|
||||
int a = 0;
|
||||
for(Item folder : folders) {
|
||||
names[a] = I18nUtil.resolveKey(folder.getUnlocalizedName() + ".name");
|
||||
a++;
|
||||
}
|
||||
|
||||
if(out == null) {
|
||||
list.add("I AM ERROR");
|
||||
return;
|
||||
}
|
||||
|
||||
Object[] in = recipe.ingredients;
|
||||
|
||||
if(in == null) {
|
||||
list.add("I AM ERROR");
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack output = out.toStack();
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out"));
|
||||
list.add(output.stackSize + "x " + output.getDisplayName());
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_in_p"));
|
||||
|
||||
for(Object o : in) {
|
||||
|
||||
if(o instanceof ComparableStack) {
|
||||
ItemStack input = ((ComparableStack) o).toStack();
|
||||
list.add(input.stackSize + "x " + input.getDisplayName());
|
||||
|
||||
} else if(o instanceof OreDictStack) {
|
||||
OreDictStack input = (OreDictStack) o;
|
||||
ArrayList<ItemStack> ores = OreDictionary.getOres(input.name);
|
||||
|
||||
if(ores.size() > 0) {
|
||||
ItemStack inStack = ores.get((int) (Math.abs(System.currentTimeMillis() / 1000) % ores.size()));
|
||||
list.add(input.stacksize + "x " + inStack.getDisplayName());
|
||||
} else {
|
||||
list.add("I AM ERROR");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
||||
list.add(Math.floor((float) (getProcessTime(stack)) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
||||
}
|
||||
|
||||
/*
|
||||
* @Override
|
||||
*
|
||||
* @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses() {
|
||||
* return true; }
|
||||
*
|
||||
* public int getRenderPasses(int metadata) { return 8; }
|
||||
*
|
||||
* IIcon[] overlays;
|
||||
*
|
||||
* @Override
|
||||
*
|
||||
* @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister
|
||||
* p_94581_1_) { super.registerIcons(p_94581_1_);
|
||||
*
|
||||
* this.overlays = new IIcon[7];
|
||||
*
|
||||
* for(int i = 0; i < 7; i++) overlays[i] =
|
||||
* p_94581_1_.registerIcon("hbm:assembly_template_" + i); }
|
||||
*
|
||||
* @Override
|
||||
*
|
||||
* @SideOnly(Side.CLIENT) public IIcon getIconFromDamageForRenderPass(int a,
|
||||
* int b) { return b < 7 ? overlays[b] :
|
||||
* super.getIconFromDamageForRenderPass(a, b); }
|
||||
*
|
||||
* @Override
|
||||
*
|
||||
* @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack stack,
|
||||
* int layer) { if (layer == 7) { return 0xFFFFFF; } else if(layer < 7) {
|
||||
* int j = colorFromSeed(getSeedFromMeta(stack.getItemDamage(), layer));
|
||||
*
|
||||
* if (j < 0) { j = 0xFFFFFF; }
|
||||
*
|
||||
* return j; }
|
||||
*
|
||||
* return 0; }
|
||||
*
|
||||
* private int getSeedFromMeta(int i, int count) { Random rand = new
|
||||
* Random(i);
|
||||
*
|
||||
* int cap = 11;
|
||||
*
|
||||
* for(int j = 0; j < count - 1; j++) rand.nextInt(cap);
|
||||
*
|
||||
* return rand.nextInt(cap); }
|
||||
*
|
||||
* private int colorFromSeed(int i) { switch(i) { case 0: return 0x334077;
|
||||
* case 1: return 0x6A298F; case 2: return 0xDF3795; case 3: return
|
||||
* 0xFF0000; case 4: return 0x00FF00; case 5: return 0x0000FF; case 6:
|
||||
* return 0xFFFF00; case 7: return 0x00FFFF; case 8: return 0x888888; case
|
||||
* 9: return 0xFFFFFF; case 10: return 0x000000; default: return 0xFFFFFF; }
|
||||
* }
|
||||
*/
|
||||
|
||||
/*
|
||||
* public Motif getColorMotifFromTemplate(EnumAssemblyTemplate temp) {
|
||||
*
|
||||
* //using deprecated value operator, will remove soon if(temp.getValue() >
|
||||
* 0) { Motif scheme = new Motif(temp.getValue, null);
|
||||
* scheme.setTextureSize(16, 16); //scheme.applyUniversalScheme();
|
||||
* scheme.colorCount = 4; //universal scheme configuration for testing
|
||||
* //todo: get textures properly baked, display color for shield
|
||||
* scheme.addColor(0x334077); scheme.addColor(0x6A298F);
|
||||
* scheme.addColor(0xDF3795); scheme.addColor(0x334077);
|
||||
*
|
||||
* //different test config; prpl, lprpl, cyn, prpl
|
||||
*
|
||||
* scheme.unify(); return scheme;
|
||||
*
|
||||
* } else { //return null; return Motif.defaultInstance; } }
|
||||
*/
|
||||
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCapacitor extends Item {
|
||||
|
||||
|
||||
public ItemCapacitor(int dura) {
|
||||
this.setMaxDamage(dura);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
if (this == ModItems.redcoil_capacitor) {
|
||||
list.add("Right-click a block to negate positive charge.");
|
||||
list.add("[Needed for Schrabidium Synthesis]");
|
||||
list.add((itemstack.getMaxDamage() - itemstack.getItemDamage()) + "/" + itemstack.getMaxDamage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
|
||||
|
||||
if (this == ModItems.redcoil_capacitor) {
|
||||
|
||||
if (!player.isSneaking()) {
|
||||
|
||||
if(stack.getItemDamage() > 0) {
|
||||
|
||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||
|
||||
if (!world.isRemote) {
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 2.5F, true);
|
||||
}
|
||||
world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
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;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
@Deprecated
|
||||
public class ItemChemistryIcon extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemChemistryIcon() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(stack.getItemDamage());
|
||||
|
||||
String s = ("" + StatCollector.translateToLocal(ModItems.chemistry_template.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal("chem." + recipe.name)).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 0; i < ChemplantRecipes.recipes.size(); i++) {
|
||||
list.add(new ItemStack(item, 1, ChemplantRecipes.recipes.get(i).getId()));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
this.icons = new IIcon[ChemplantRecipes.recipes.size()];
|
||||
|
||||
for(int i = 0; i < icons.length; ++i) {
|
||||
this.icons[i] = reg.registerIcon("hbm:chem_icon_" + ChemplantRecipes.recipes.get(i).name);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int i) {
|
||||
ChemRecipe rec = ChemplantRecipes.indexMapping.get(i);
|
||||
|
||||
if(rec != null) {
|
||||
return this.icons[rec.listing % this.icons.length];
|
||||
} else {
|
||||
return ModItems.nothing.getIconFromDamage(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,102 +0,0 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
@Deprecated
|
||||
public class ItemChemistryTemplate extends Item {
|
||||
|
||||
public ItemChemistryTemplate() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(stack.getItemDamage());
|
||||
|
||||
if(recipe == null) {
|
||||
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||
} else {
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal("chem." + recipe.name)).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 0; i < ChemplantRecipes.recipes.size(); i++) {
|
||||
list.add(new ItemStack(item, 1, ChemplantRecipes.recipes.get(i).getId()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.RED + "Deprecated");
|
||||
|
||||
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(stack.getItemDamage());
|
||||
|
||||
if(recipe == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out_p"));
|
||||
for(int i = 0; i < 4; i++) {
|
||||
if(recipe.outputs[i] != null) {
|
||||
list.add(recipe.outputs[i].stackSize + "x " + recipe.outputs[i].getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(recipe.outputFluids[i] != null) {
|
||||
int p = recipe.outputFluids[i].pressure;
|
||||
list.add(recipe.outputFluids[i].fill + "mB " + recipe.outputFluids[i].type.getLocalizedName() + (p != 0 ? (" at " + p + "PU") : ""));
|
||||
}
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_in_p"));
|
||||
|
||||
for(int i = 0; i < recipe.inputs.length; i++) {
|
||||
if(recipe.inputs[i] != null) {
|
||||
list.add(recipe.inputs[i].stacksize + "x " + recipe.inputs[i].extractForCyclingDisplay(20).getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(recipe.inputFluids[i] != null) {
|
||||
int p = recipe.inputFluids[i].pressure;
|
||||
list.add(recipe.inputFluids[i].fill + "mB " + recipe.inputFluids[i].type.getLocalizedName() + (p != 0 ? (" at " + p + "PU") : ""));
|
||||
}
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
||||
list.add(Math.floor((float) (recipe.getDuration()) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
||||
} catch(Exception e) {
|
||||
list.add("###INVALID###");
|
||||
list.add("0x334077-0x6A298F-0xDF3795-0x334077");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,15 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
|
||||
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.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -13,31 +17,29 @@ import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemKitCustom extends ItemKitNBT {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon overlay1;
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon overlay2;
|
||||
@SideOnly(Side.CLIENT) IIcon overlay1;
|
||||
@SideOnly(Side.CLIENT) IIcon overlay2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
// list.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderPasses(int metadata) {
|
||||
return 3;
|
||||
}
|
||||
public int getRenderPasses(int metadata) { return 3; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
super.registerIcons(reg);
|
||||
|
||||
this.overlay1 = reg.registerIcon(this.getIconString() + "_1");
|
||||
this.overlay2 = reg.registerIcon(this.getIconString() + "_2");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
public boolean requiresMultipleRenderPasses() { return true; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -48,10 +50,8 @@ public class ItemKitCustom extends ItemKitNBT {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
if(pass == 1)
|
||||
return getColor(stack, 1);
|
||||
if(pass == 2)
|
||||
return getColor(stack, 2);
|
||||
if(pass == 1) return getColor(stack, 1);
|
||||
if(pass == 2) return getColor(stack, 2);
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@ -71,18 +71,13 @@ public class ItemKitCustom extends ItemKitNBT {
|
||||
}
|
||||
|
||||
public static void setColor(ItemStack stack, int color, int index) {
|
||||
|
||||
if(!stack.hasTagCompound())
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
stack.stackTagCompound.setInteger("color" + index, color);
|
||||
}
|
||||
|
||||
public static int getColor(ItemStack stack, int index) {
|
||||
|
||||
if(!stack.hasTagCompound())
|
||||
return 0;
|
||||
|
||||
if(!stack.hasTagCompound()) return 0;
|
||||
return stack.stackTagCompound.getInteger("color" + index);
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,14 +269,10 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyIndustrial.class, new RenderChimneyIndustrial());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningLaser.class, new RenderLaserMiner());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAnnihilator.class, new RenderAnnihilator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssemblyMachine.class, new RenderAssemblyMachine());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssemfac.class, new RenderAssemfac());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssemblyFactory.class, new RenderAssemblyFactory());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePrecAss.class, new RenderPrecAss());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemplant.class, new RenderChemplant());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemicalPlant.class, new RenderChemicalPlant());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemfac.class, new RenderChemfac());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemicalFactory.class, new RenderChemicalFactory());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePUREX.class, new RenderPUREX());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFluidTank.class, new RenderFluidTank());
|
||||
@ -552,8 +548,6 @@ public class ClientProxy extends ServerProxy {
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.battery_pack, new ItemRenderBatteryPack());
|
||||
//templates
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.assembly_template, new ItemRenderTemplate());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.chemistry_template, new ItemRenderTemplate());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.crucible_template, new ItemRenderTemplate());
|
||||
//hot stuff
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.ingot_steel_dusted, new ItemRendererHot());
|
||||
|
||||
@ -137,8 +137,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.particle_empty, 2), new Object[] { "STS", "G G", "STS", 'S', PB.plateCast(), 'T', ModItems.coil_gold, 'G', KEY_ANYPANE });
|
||||
addShapelessAuto(new ItemStack(ModItems.particle_copper, 1), new Object[] { ModItems.particle_empty, CU.dust(), ModItems.pellet_charged });
|
||||
addShapelessAuto(new ItemStack(ModItems.particle_lead, 1), new Object[] { ModItems.particle_empty, PB.dust(), ModItems.pellet_charged });
|
||||
addShapelessAuto(new ItemStack(ModItems.cell_antimatter, 1), new Object[] { ModItems.particle_aproton, ModItems.particle_aelectron, ModItems.cell_empty });
|
||||
addShapelessAuto(new ItemStack(ModItems.particle_amat, 1), new Object[] { ModItems.particle_aproton, ModItems.particle_aelectron, ModItems.particle_empty });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.canister_empty, 2), new Object[] { "S ", "AA", "AA", 'S', STEEL.plate(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.gas_empty, 2), new Object[] { "S ", "AA", "AA", 'A', STEEL.plate(), 'S', CU.plate() });
|
||||
@ -652,8 +650,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.door_office, 1), new Object[] { "II", "SS", "II", 'I', KEY_PLANKS, 'S', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.door_bunker, 1), new Object[] { "II", "SS", "II", 'I', STEEL.plate(), 'S', PB.plate() });
|
||||
|
||||
addShapelessAuto(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
addShapelessAuto(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
addShapelessAuto(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.crucible_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
addShapelessAuto(new ItemStack(Items.slime_ball, 16), new Object[] { new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), Fluids.SULFURIC_ACID.getDict(1000) });
|
||||
|
||||
@ -767,15 +763,6 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 2, Mats.MAT_STAR.id), new Object[] { ModBlocks.hadron_coil_starmetal });
|
||||
addShapelessAuto(new ItemStack(ModItems.powder_chlorophyte, 2), new Object[] { ModBlocks.hadron_coil_chlorophyte });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 1, Mats.MAT_DNT.id), new Object[] { ModBlocks.hadron_coil_mese });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_blue });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_black });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_yellow });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_striped });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_glass });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_voltz });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), new Object[] { ModBlocks.hadron_analysis });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), new Object[] { ModBlocks.hadron_analysis_glass });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_alloy, 1), new Object[] { "WW", "WW", 'W', ALLOY.wireDense() });
|
||||
|
||||
|
||||
@ -1485,6 +1485,37 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.ams_focus_booster");
|
||||
ignoreMappings.add("hbm:item.ams_muzzle");
|
||||
ignoreMappings.add("hbm:tile.machine_transformer_dnt");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating_blue");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating_black");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating_yellow");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating_striped");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating_voltz");
|
||||
ignoreMappings.add("hbm:tile.hadron_plating_glass");
|
||||
ignoreMappings.add("hbm:tile.hadron_power");
|
||||
ignoreMappings.add("hbm:tile.hadron_diode");
|
||||
ignoreMappings.add("hbm:tile.hadron_analysis");
|
||||
ignoreMappings.add("hbm:tile.hadron_analysis_glass");
|
||||
ignoreMappings.add("hbm:tile.hadron_access");
|
||||
ignoreMappings.add("hbm:tile.hadron_core");
|
||||
ignoreMappings.add("hbm:tile.machine_assembler");
|
||||
ignoreMappings.add("hbm:tile.machine_assemfac");
|
||||
ignoreMappings.add("hbm:tile.machine_chemplant");
|
||||
ignoreMappings.add("hbm:tile.machine_chemfac");
|
||||
ignoreMappings.add("hbm:item.assembly_template");
|
||||
ignoreMappings.add("hbm:item.chemistry_template");
|
||||
ignoreMappings.add("hbm:item.chemistry_icon");
|
||||
ignoreMappings.add("hbm:item.particle_aproton");
|
||||
ignoreMappings.add("hbm:item.particle_aelectron");
|
||||
ignoreMappings.add("hbm:tile.test_core");
|
||||
ignoreMappings.add("hbm:tile.test_charge");
|
||||
ignoreMappings.add("hbm:item.t45_helmet");
|
||||
ignoreMappings.add("hbm:item.t45_plate");
|
||||
ignoreMappings.add("hbm:item.t45_legs");
|
||||
ignoreMappings.add("hbm:item.t45_boots");
|
||||
ignoreMappings.add("hbm:item.tritium_deuterium_cake");
|
||||
ignoreMappings.add("hbm:item.redcoil_capacitor");
|
||||
ignoreMappings.add("hbm:item.euphemium_capacitor");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -989,10 +989,7 @@ public class ModEventHandlerClient {
|
||||
MainRegistry.logger.info("Taking a screenshot of ALL items, if you did this by mistake: fucking lmao get rekt nerd");
|
||||
|
||||
List<Item> ignoredItems = Arrays.asList(
|
||||
ModItems.assembly_template,
|
||||
ModItems.crucible_template,
|
||||
ModItems.chemistry_template,
|
||||
ModItems.chemistry_icon,
|
||||
ModItems.achievement_icon,
|
||||
Items.spawn_egg,
|
||||
Item.getItemFromBlock(Blocks.mob_spawner)
|
||||
|
||||
@ -140,22 +140,11 @@ public class ResourceManager {
|
||||
public static final IModelCustom annihilator = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/annihilator.obj")).asVBO();
|
||||
|
||||
//Assembler
|
||||
public static final IModelCustom assembler_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_body.obj"));
|
||||
public static final IModelCustom assembler_cog = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_cog.obj"));
|
||||
public static final IModelCustom assembler_slider = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_slider.obj"));
|
||||
public static final IModelCustom assembler_arm = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_arm.obj"));
|
||||
public static final IModelCustom assembly_machine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/assembly_machine.obj")).asVBO();
|
||||
public static final IModelCustom assemfac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/assemfac.obj")).asVBO();
|
||||
public static final IModelCustom assembly_factory = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/assembly_factory.obj")).asVBO();
|
||||
|
||||
//Chemplant
|
||||
public static final IModelCustom chemplant_body = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_body.obj")).asVBO();
|
||||
public static final IModelCustom chemplant_spinner = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_spinner.obj"));
|
||||
public static final IModelCustom chemplant_piston = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_piston.obj"));
|
||||
public static final IModelCustom chemplant_fluid = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluid.hmf"));
|
||||
public static final IModelCustom chemplant_fluidcap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluidcap.hmf"));
|
||||
public static final IModelCustom chemical_plant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chemical_plant.obj")).asVBO();
|
||||
public static final IModelCustom chemfac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chemfac.obj")).asVBO();
|
||||
public static final IModelCustom chemical_factory = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chemical_factory.obj")).asVBO();
|
||||
public static final IModelCustom purex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/purex.obj")).asVBO();
|
||||
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
package com.hbm.packet.toserver;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemCrucibleTemplate;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
@ -59,28 +55,10 @@ public class ItemFolderPacket implements IMessage {
|
||||
ItemStack stack = new ItemStack(Item.getItemById(m.item), 1, m.meta);
|
||||
|
||||
if(p.capabilities.isCreativeMode) {
|
||||
|
||||
if(stack.getItem() == ModItems.assembly_template) {
|
||||
ComparableStack out = AssemblerRecipes.recipeList.get(stack.getItemDamage());
|
||||
|
||||
if(out != null) {
|
||||
stack.setItemDamage(0);
|
||||
ItemAssemblyTemplate.writeType(stack, out);
|
||||
}
|
||||
}
|
||||
|
||||
p.inventory.addItemStackToInventory(stack);
|
||||
return null;
|
||||
}
|
||||
|
||||
if(stack.getItem() instanceof ItemAssemblyTemplate) {
|
||||
tryMakeItem(p, stack, Items.paper, "dye");
|
||||
return null;
|
||||
}
|
||||
if(stack.getItem() instanceof ItemChemistryTemplate) {
|
||||
tryMakeItem(p, stack, Items.paper, "dye");
|
||||
return null;
|
||||
}
|
||||
if(stack.getItem() instanceof ItemCrucibleTemplate) {
|
||||
tryMakeItem(p, stack, Items.paper, "dye");
|
||||
return null;
|
||||
@ -158,15 +136,6 @@ public class ItemFolderPacket implements IMessage {
|
||||
}
|
||||
}
|
||||
|
||||
if(output.getItem() == ModItems.assembly_template) {
|
||||
ComparableStack out = AssemblerRecipes.recipeList.get(output.getItemDamage());
|
||||
|
||||
if(out != null) {
|
||||
output.setItemDamage(0);
|
||||
ItemAssemblyTemplate.writeType(output, out);
|
||||
}
|
||||
}
|
||||
|
||||
if(!player.inventory.addItemStackToInventory(output))
|
||||
player.dropPlayerItemWithRandomChoice(output, true);
|
||||
}
|
||||
|
||||
@ -191,52 +191,6 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_assembler), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.assembler_body_tex); ResourceManager.assembler_body.renderAll();
|
||||
bindTexture(ResourceManager.assembler_slider_tex); ResourceManager.assembler_slider.renderAll();
|
||||
bindTexture(ResourceManager.assembler_arm_tex); ResourceManager.assembler_arm.renderAll();
|
||||
bindTexture(ResourceManager.assembler_cog_tex);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.6, 0.75, 1.0625);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.6, 0.75, 1.0625);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.6, 0.75, -1.0625);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.6, 0.75, -1.0625);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_chemplant), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.chemplant_body_tex); ResourceManager.chemplant_body.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
bindTexture(ResourceManager.chemplant_piston_tex); ResourceManager.chemplant_piston.renderAll();
|
||||
bindTexture(ResourceManager.chemplant_spinner_tex);
|
||||
GL11.glTranslated(-0.625, 0, 0.625);
|
||||
ResourceManager.chemplant_spinner.renderAll();
|
||||
GL11.glTranslated(1.25, 0, 0);
|
||||
ResourceManager.chemplant_spinner.renderAll();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_well), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
@ -1025,17 +979,6 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_chemfac), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.chemfac_tex); ResourceManager.chemfac.renderPart("Main");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.red_pylon_large), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
@ -1073,23 +1016,6 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_assemfac), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.assemfac_tex); ResourceManager.assemfac.renderPart("Factory");
|
||||
for(int i = 1; i < 7; i++) {
|
||||
ResourceManager.assemfac.renderPart("Pivot" + i);
|
||||
ResourceManager.assemfac.renderPart("Arm" + i);
|
||||
ResourceManager.assemfac.renderPart("Piston" + i);
|
||||
ResourceManager.assemfac.renderPart("Striker" + i);
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.furnace_iron), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
|
||||
@ -3,11 +3,8 @@ package com.hbm.render.item;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.inventory.recipes.CrucibleRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.render.util.RenderItemStack;
|
||||
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
@ -22,13 +19,6 @@ public class ItemRenderTemplate implements IItemRenderer {
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && (type == IItemRenderer.ItemRenderType.INVENTORY)) {
|
||||
|
||||
if(stack.getItem() == ModItems.assembly_template) {
|
||||
ComparableStack st = ItemAssemblyTemplate.readType(stack);
|
||||
this.currentItem = st != null ? st.toStack() : AssemblerRecipes.recipeList.get(stack.getItemDamage()).toStack();
|
||||
}
|
||||
if(stack.getItem() == ModItems.chemistry_template)
|
||||
this.currentItem = new ItemStack(ModItems.chemistry_icon, 1, stack.getItemDamage());
|
||||
|
||||
if(stack.getItem() == ModItems.crucible_template)
|
||||
this.currentItem = CrucibleRecipes.indexMapping.get(stack.getItemDamage()).icon;
|
||||
|
||||
|
||||
@ -1,126 +0,0 @@
|
||||
// Date: 25.12.2015 00:50:09
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelT45Boots extends ModelBiped {
|
||||
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
|
||||
public ModelT45Boots() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 32;
|
||||
|
||||
this.leftleg = new ModelRenderer(this, 0, 0);
|
||||
this.rightleg = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1 = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1.addBox(0F, 0F, 0F, 4, 2, 6);
|
||||
this.Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
|
||||
this.Shape1.setTextureSize(64, 32);
|
||||
this.Shape1.mirror = true;
|
||||
setRotation(this.Shape1, 0F, 0F, 0F);
|
||||
convertToChild(this.leftleg, this.Shape1);
|
||||
this.Shape2 = new ModelRenderer(this, 0, 8);
|
||||
this.Shape2.addBox(0F, 0F, 0F, 4, 2, 6);
|
||||
this.Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
|
||||
this.Shape2.setTextureSize(64, 32);
|
||||
this.Shape2.mirror = true;
|
||||
setRotation(this.Shape2, 0F, 0F, 0F);
|
||||
convertToChild(this.rightleg, this.Shape2);
|
||||
this.Shape3 = new ModelRenderer(this, 0, 16);
|
||||
this.Shape3.addBox(0F, -1F, 0F, 4, 2, 4);
|
||||
this.Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
|
||||
this.Shape3.setTextureSize(64, 32);
|
||||
this.Shape3.mirror = true;
|
||||
setRotation(this.Shape3, 0.2617994F, 0F, 0F);
|
||||
convertToChild(this.leftleg, this.Shape3);
|
||||
this.Shape4 = new ModelRenderer(this, 0, 22);
|
||||
this.Shape4.addBox(0F, -1F, 0F, 4, 2, 4);
|
||||
this.Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
|
||||
this.Shape4.setTextureSize(64, 32);
|
||||
this.Shape4.mirror = true;
|
||||
setRotation(this.Shape4, 0.2617994F, 0F, 0F);
|
||||
convertToChild(this.rightleg, this.Shape4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) {
|
||||
|
||||
this.isSneak = entity.isSneaking();
|
||||
this.isRiding = entity.isRiding();
|
||||
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
|
||||
this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX;
|
||||
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
|
||||
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
|
||||
this.leftleg.rotateAngleX = this.bipedLeftLeg.rotateAngleX;
|
||||
this.leftleg.rotateAngleY = this.bipedLeftLeg.rotateAngleY;
|
||||
this.leftleg.rotateAngleZ = this.bipedLeftLeg.rotateAngleZ;
|
||||
this.rightleg.rotationPointX = this.bipedRightLeg.rotationPointX;
|
||||
this.rightleg.rotationPointY = this.bipedRightLeg.rotationPointY - 1.5F;
|
||||
this.rightleg.rotationPointZ = this.bipedRightLeg.rotationPointZ;
|
||||
this.rightleg.rotateAngleX = this.bipedRightLeg.rotateAngleX;
|
||||
this.rightleg.rotateAngleY = this.bipedRightLeg.rotateAngleY;
|
||||
this.rightleg.rotateAngleZ = this.bipedRightLeg.rotateAngleZ;
|
||||
|
||||
if (this.isSneak) {
|
||||
this.leftleg.rotationPointZ -= 0.5F;
|
||||
this.rightleg.rotationPointZ -= 0.5F;
|
||||
this.leftleg.rotationPointY += 0.5F;
|
||||
this.rightleg.rotationPointY += 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
// this.leftleg.addChild(Shape1);
|
||||
// this.leftleg.addChild(Shape3);
|
||||
this.leftleg.render(scaleFactor);
|
||||
|
||||
// this.rightleg.addChild(Shape2);
|
||||
// this.rightleg.addChild(Shape4);
|
||||
this.rightleg.render(scaleFactor);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected static void convertToChild(ModelRenderer parent, ModelRenderer child) {
|
||||
|
||||
// move child rotation point to be relative to parent
|
||||
child.rotationPointX -= parent.rotationPointX;
|
||||
child.rotationPointY -= parent.rotationPointY;
|
||||
child.rotationPointZ -= parent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
child.rotateAngleX -= parent.rotateAngleX;
|
||||
child.rotateAngleY -= parent.rotateAngleY;
|
||||
child.rotateAngleZ -= parent.rotateAngleZ;
|
||||
// create relationship
|
||||
parent.addChild(child);
|
||||
}
|
||||
|
||||
private static void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@ -1,297 +0,0 @@
|
||||
// Date: 25.12.2015 00:41:13
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.interfaces.IHoldableWeapon;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ModelT45Chest extends ModelBiped {
|
||||
|
||||
ModelRenderer chest;
|
||||
ModelRenderer leftarm;
|
||||
ModelRenderer rightarm;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
ModelRenderer Shape9;
|
||||
ModelRenderer Shape10;
|
||||
ModelRenderer Shape11;
|
||||
ModelRenderer Shape12;
|
||||
ModelRenderer Shape13;
|
||||
ModelRenderer Shape14;
|
||||
ModelRenderer Shape15;
|
||||
ModelRenderer Shape16;
|
||||
ModelRenderer Shape17;
|
||||
ModelRenderer Shape18;
|
||||
ModelRenderer Shape19;
|
||||
|
||||
public ModelT45Chest() {
|
||||
this.textureWidth = 128;
|
||||
this.textureHeight = 64;
|
||||
|
||||
this.chest = new ModelRenderer(this, 0, 0);
|
||||
this.leftarm = new ModelRenderer(this, 0, 0);
|
||||
this.rightarm = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1 = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1.addBox(0F, 0F, 0F, 8, 12, 4);
|
||||
this.Shape1.setRotationPoint(-4F, 0F - 0.0625F / 2, -2F);
|
||||
this.Shape1.setTextureSize(128, 64);
|
||||
this.Shape1.mirror = true;
|
||||
setRotation(this.Shape1, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape1);
|
||||
this.Shape2 = new ModelRenderer(this, 0, 16);
|
||||
this.Shape2.addBox(0F, 0F, 0F, 7, 5, 2);
|
||||
this.Shape2.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F);
|
||||
this.Shape2.setTextureSize(128, 64);
|
||||
this.Shape2.mirror = true;
|
||||
setRotation(this.Shape2, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape2);
|
||||
this.Shape3 = new ModelRenderer(this, 0, 23);
|
||||
this.Shape3.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
this.Shape3.setRotationPoint(-2.5F, 7F - 0.0625F / 2, -3F);
|
||||
this.Shape3.setTextureSize(128, 64);
|
||||
this.Shape3.mirror = true;
|
||||
setRotation(this.Shape3, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape3);
|
||||
this.Shape4 = new ModelRenderer(this, 0, 25);
|
||||
this.Shape4.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
this.Shape4.setRotationPoint(1.5F, 7F - 0.0625F / 2, -3F);
|
||||
this.Shape4.setTextureSize(128, 64);
|
||||
this.Shape4.mirror = true;
|
||||
setRotation(this.Shape4, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape4);
|
||||
this.Shape5 = new ModelRenderer(this, 0, 28);
|
||||
this.Shape5.addBox(0F, -2F, 0F, 7, 2, 2);
|
||||
this.Shape5.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F);
|
||||
this.Shape5.setTextureSize(128, 64);
|
||||
this.Shape5.mirror = true;
|
||||
setRotation(this.Shape5, -0.6108652F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape5);
|
||||
this.Shape6 = new ModelRenderer(this, 48, 0);
|
||||
this.Shape6.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
this.Shape6.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -2F);
|
||||
this.Shape6.setTextureSize(128, 64);
|
||||
this.Shape6.mirror = true;
|
||||
setRotation(this.Shape6, 0F, 0F, 0F);
|
||||
convertToChild(this.leftarm, this.Shape6);
|
||||
this.Shape7 = new ModelRenderer(this, 32, 0);
|
||||
this.Shape7.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
this.Shape7.setRotationPoint(-8F + 6 - 0.25F, 0F - 3, -2F);
|
||||
this.Shape7.setTextureSize(128, 64);
|
||||
this.Shape7.mirror = true;
|
||||
setRotation(this.Shape7, 0F, 0F, 0F);
|
||||
convertToChild(this.rightarm, this.Shape7);
|
||||
this.Shape8 = new ModelRenderer(this, 32, 16);
|
||||
this.Shape8.addBox(0F, 0F, 0F, 5, 6, 6);
|
||||
this.Shape8.setRotationPoint(4F - 6 + 0.25F, 4F - 3, -3F);
|
||||
this.Shape8.setTextureSize(128, 64);
|
||||
this.Shape8.mirror = true;
|
||||
setRotation(this.Shape8, 0F, 0F, 0F);
|
||||
convertToChild(this.leftarm, this.Shape8);
|
||||
this.Shape9 = new ModelRenderer(this, 0, 34);
|
||||
this.Shape9.addBox(0F, 0F, 0F, 5, 6, 6);
|
||||
this.Shape9.setRotationPoint(-9F + 6 - 0.25F, 4F - 3, -3F);
|
||||
this.Shape9.setTextureSize(128, 64);
|
||||
this.Shape9.mirror = true;
|
||||
setRotation(this.Shape9, 0F, 0F, 0F);
|
||||
convertToChild(this.rightarm, this.Shape9);
|
||||
this.Shape10 = new ModelRenderer(this, 32, 30);
|
||||
this.Shape10.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
this.Shape10.setRotationPoint(1F, 4F - 0.0625F / 2, 2F);
|
||||
this.Shape10.setTextureSize(128, 64);
|
||||
this.Shape10.mirror = true;
|
||||
setRotation(this.Shape10, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape10);
|
||||
this.Shape11 = new ModelRenderer(this, 42, 30);
|
||||
this.Shape11.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
this.Shape11.setRotationPoint(-3F, 4F - 0.0625F / 2, 2F);
|
||||
this.Shape11.setTextureSize(128, 64);
|
||||
this.Shape11.mirror = true;
|
||||
setRotation(this.Shape11, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape11);
|
||||
this.Shape12 = new ModelRenderer(this, 26, 9);
|
||||
this.Shape12.addBox(0F, 0F, 0F, 1, 6, 1);
|
||||
this.Shape12.setRotationPoint(1.5F, -2F - 0.0625F / 2, 2F);
|
||||
this.Shape12.setTextureSize(128, 64);
|
||||
this.Shape12.mirror = true;
|
||||
setRotation(this.Shape12, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape12);
|
||||
this.Shape13 = new ModelRenderer(this, 26, 0);
|
||||
this.Shape13.addBox(0F, 0F, 0F, 1, 6, 1);
|
||||
this.Shape13.setRotationPoint(-2.5F, -2F - 0.0625F / 2, 2F);
|
||||
this.Shape13.setTextureSize(128, 64);
|
||||
this.Shape13.mirror = true;
|
||||
setRotation(this.Shape13, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape13);
|
||||
this.Shape14 = new ModelRenderer(this, 20, 18);
|
||||
this.Shape14.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
this.Shape14.setRotationPoint(-1F, 1F - 0.0625F / 2, 2F);
|
||||
this.Shape14.setTextureSize(128, 64);
|
||||
this.Shape14.mirror = true;
|
||||
setRotation(this.Shape14, 0F, 0F, 0F);
|
||||
convertToChild(this.chest, this.Shape14);
|
||||
this.Shape15 = new ModelRenderer(this, 21, 23);
|
||||
this.Shape15.addBox(-1.5F, -1.5F, 0F, 3, 3, 1);
|
||||
this.Shape15.setRotationPoint(0F, 2F - 0.0625F / 2, 3F);
|
||||
this.Shape15.setTextureSize(128, 64);
|
||||
this.Shape15.mirror = true;
|
||||
setRotation(this.Shape15, 0F, 0F, 0.7853982F);
|
||||
convertToChild(this.chest, this.Shape15);
|
||||
this.Shape16 = new ModelRenderer(this, 0, 48);
|
||||
this.Shape16.addBox(0F, -1F, 0F, 3, 1, 4);
|
||||
this.Shape16.setRotationPoint(-8F + 6 - 0.25F, 12F - 3, -2F);
|
||||
this.Shape16.setTextureSize(128, 64);
|
||||
this.Shape16.mirror = true;
|
||||
setRotation(this.Shape16, 0F, 0F, 0.5235988F);
|
||||
convertToChild(this.rightarm, this.Shape16);
|
||||
this.Shape17 = new ModelRenderer(this, 0, 55);
|
||||
this.Shape17.addBox(-3F, -1F, 0F, 3, 1, 4);
|
||||
this.Shape17.setRotationPoint(8F - 6 + 0.25F, 12F - 3, -2F);
|
||||
this.Shape17.setTextureSize(128, 64);
|
||||
this.Shape17.mirror = true;
|
||||
setRotation(this.Shape17, 0F, 0F, -0.5235988F);
|
||||
convertToChild(this.leftarm, this.Shape17);
|
||||
this.Shape18 = new ModelRenderer(this, 90, 0);
|
||||
this.Shape18.addBox(0F, -3F, 0F, 5, 3, 6);
|
||||
this.Shape18.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -3F);
|
||||
this.Shape18.setTextureSize(128, 64);
|
||||
this.Shape18.mirror = true;
|
||||
setRotation(this.Shape18, 0F, 0F, 0.2617994F);
|
||||
convertToChild(this.leftarm, this.Shape18);
|
||||
this.Shape19 = new ModelRenderer(this, 66, 0);
|
||||
this.Shape19.addBox(-5F, -3F, 0F, 5, 3, 6);
|
||||
this.Shape19.setRotationPoint(-4F + 6 - 0.25F, 0F - 3, -3F);
|
||||
this.Shape19.setTextureSize(128, 64);
|
||||
this.Shape19.mirror = true;
|
||||
setRotation(this.Shape19, 0F, 0F, -0.2617994F);
|
||||
convertToChild(this.rightarm, this.Shape19);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
ItemStack itemstack = player.inventory.getCurrentItem();
|
||||
this.heldItemRight = itemstack != null ? 1 : 0;
|
||||
|
||||
if(itemstack != null && player.getItemInUseCount() > 0) {
|
||||
EnumAction enumaction = itemstack.getItemUseAction();
|
||||
|
||||
if(enumaction == EnumAction.block) {
|
||||
this.heldItemRight = 3;
|
||||
} else if(enumaction == EnumAction.bow) {
|
||||
this.aimedBow = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(itemstack != null && player.getHeldItem().getItem() instanceof IHoldableWeapon) this.aimedBow = true;
|
||||
if(itemstack != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT) this.aimedBow = true;
|
||||
}
|
||||
|
||||
this.isSneak = entity.isSneaking();
|
||||
this.isRiding = entity.isRiding();
|
||||
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
|
||||
this.chest.rotationPointX = this.bipedBody.rotationPointX;
|
||||
this.chest.rotationPointY = this.bipedBody.rotationPointY;
|
||||
this.chest.rotationPointZ = this.bipedBody.rotationPointZ;
|
||||
this.chest.rotateAngleX = this.bipedBody.rotateAngleX;
|
||||
this.chest.rotateAngleY = this.bipedBody.rotateAngleY;
|
||||
this.chest.rotateAngleZ = this.bipedBody.rotateAngleZ;
|
||||
this.leftarm.rotationPointX = this.bipedLeftArm.rotationPointX;
|
||||
this.leftarm.rotationPointY = this.bipedLeftArm.rotationPointY;
|
||||
this.leftarm.rotationPointZ = this.bipedLeftArm.rotationPointZ;
|
||||
this.leftarm.rotateAngleX = this.bipedLeftArm.rotateAngleX;
|
||||
this.leftarm.rotateAngleY = this.bipedLeftArm.rotateAngleY;
|
||||
this.leftarm.rotateAngleZ = this.bipedLeftArm.rotateAngleZ;
|
||||
this.rightarm.rotationPointX = this.bipedRightArm.rotationPointX;
|
||||
this.rightarm.rotationPointY = this.bipedRightArm.rotationPointY;
|
||||
this.rightarm.rotationPointZ = this.bipedRightArm.rotationPointZ;
|
||||
this.rightarm.rotateAngleX = this.bipedRightArm.rotateAngleX;
|
||||
this.rightarm.rotateAngleY = this.bipedRightArm.rotateAngleY;
|
||||
this.rightarm.rotateAngleZ = this.bipedRightArm.rotateAngleZ;
|
||||
|
||||
if(entity instanceof EntityZombie || entity instanceof EntitySkeleton) {
|
||||
this.leftarm.rotateAngleX -= (float) (90 * Math.PI / 180D);
|
||||
this.rightarm.rotateAngleX -= (float) (90 * Math.PI / 180D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
this.chest.render(scaleFactor);
|
||||
this.aimedBow = false;
|
||||
GL11.glPopMatrix();
|
||||
this.renderLeft(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
||||
this.renderRight(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
||||
}
|
||||
|
||||
public void renderLeft(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
this.leftarm.render(scaleFactor);
|
||||
this.aimedBow = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderRight(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
this.rightarm.render(scaleFactor);
|
||||
this.aimedBow = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
// Jabelar, you saved my time! I was about to redo all this crap if you can
|
||||
// simply use this method!!
|
||||
protected static void convertToChild(ModelRenderer parent, ModelRenderer child) {
|
||||
|
||||
// move child rotation point to be relative to parent
|
||||
child.rotationPointX -= parent.rotationPointX;
|
||||
child.rotationPointY -= parent.rotationPointY;
|
||||
child.rotationPointZ -= parent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
child.rotateAngleX -= parent.rotateAngleX;
|
||||
child.rotateAngleY -= parent.rotateAngleY;
|
||||
child.rotateAngleZ -= parent.rotateAngleZ;
|
||||
// create relationship
|
||||
parent.addChild(child);
|
||||
}
|
||||
|
||||
private static void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@ -1,135 +0,0 @@
|
||||
// Date: 25.12.2015 00:20:25
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelT45Helmet extends ModelBiped {
|
||||
|
||||
ModelRenderer helmet;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
|
||||
public ModelT45Helmet() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 32;
|
||||
|
||||
this.helmet = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1 = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
|
||||
this.Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F);
|
||||
this.Shape1.setTextureSize(64, 32);
|
||||
this.Shape1.mirror = true;
|
||||
setRotation(this.Shape1, 0F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape1);
|
||||
this.Shape2 = new ModelRenderer(this, 32, 0);
|
||||
this.Shape2.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
this.Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F);
|
||||
this.Shape2.setTextureSize(64, 32);
|
||||
this.Shape2.mirror = true;
|
||||
setRotation(this.Shape2, 0F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape2);
|
||||
this.Shape3 = new ModelRenderer(this, 40, 6);
|
||||
this.Shape3.addBox(0F, 0F, 0F, 1, 1, 4);
|
||||
this.Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F);
|
||||
this.Shape3.setTextureSize(64, 32);
|
||||
this.Shape3.mirror = true;
|
||||
setRotation(this.Shape3, 0F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape3);
|
||||
this.Shape4 = new ModelRenderer(this, 40, 0);
|
||||
this.Shape4.addBox(0F, 0F, 0F, 4, 2, 2);
|
||||
this.Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F);
|
||||
this.Shape4.setTextureSize(64, 32);
|
||||
this.Shape4.mirror = true;
|
||||
setRotation(this.Shape4, -0.7853982F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape4);
|
||||
this.Shape5 = new ModelRenderer(this, 54, 0);
|
||||
this.Shape5.addBox(0F, 2F, 0F, 2, 1, 2);
|
||||
this.Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F);
|
||||
this.Shape5.setTextureSize(64, 32);
|
||||
this.Shape5.mirror = true;
|
||||
setRotation(this.Shape5, -0.7853982F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape5);
|
||||
this.Shape6 = new ModelRenderer(this, 0, 16);
|
||||
this.Shape6.addBox(0F, 0F, 0F, 10, 1, 9);
|
||||
this.Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F);
|
||||
this.Shape6.setTextureSize(64, 32);
|
||||
this.Shape6.mirror = true;
|
||||
setRotation(this.Shape6, 0F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape6);
|
||||
this.Shape7 = new ModelRenderer(this, 32, 7);
|
||||
this.Shape7.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
this.Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F);
|
||||
this.Shape7.setTextureSize(64, 32);
|
||||
this.Shape7.mirror = true;
|
||||
setRotation(this.Shape7, -0.7853982F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape7);
|
||||
this.Shape8 = new ModelRenderer(this, 32, 5);
|
||||
this.Shape8.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
this.Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F);
|
||||
this.Shape8.setTextureSize(64, 32);
|
||||
this.Shape8.mirror = true;
|
||||
setRotation(this.Shape8, -0.7853982F, 0F, 0F);
|
||||
convertToChild(this.helmet, this.Shape8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) {
|
||||
|
||||
this.isSneak = entity.isSneaking();
|
||||
this.isRiding = entity.isRiding();
|
||||
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
|
||||
this.helmet.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.helmet.rotationPointY = this.bipedHead.rotationPointY;
|
||||
this.helmet.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.helmet.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
GL11.glScalef(1.0625F, 1.0625F, 1.0625F);
|
||||
this.helmet.render(scaleFactor);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected static void convertToChild(ModelRenderer parent, ModelRenderer child) {
|
||||
|
||||
// move child rotation point to be relative to parent
|
||||
child.rotationPointX -= parent.rotationPointX;
|
||||
child.rotationPointY -= parent.rotationPointY;
|
||||
child.rotationPointZ -= parent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
child.rotateAngleX -= parent.rotateAngleX;
|
||||
child.rotateAngleY -= parent.rotateAngleY;
|
||||
child.rotateAngleZ -= parent.rotateAngleZ;
|
||||
// create relationship
|
||||
parent.addChild(child);
|
||||
}
|
||||
|
||||
private static void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@ -1,137 +0,0 @@
|
||||
// Date: 25.12.2015 00:46:58
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelT45Legs extends ModelBiped {
|
||||
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
|
||||
public ModelT45Legs() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 32;
|
||||
|
||||
this.leftleg = new ModelRenderer(this, 0, 0);
|
||||
this.rightleg = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1 = new ModelRenderer(this, 0, 0);
|
||||
this.Shape1.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
this.Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F);
|
||||
this.Shape1.setTextureSize(64, 32);
|
||||
this.Shape1.mirror = true;
|
||||
setRotation(this.Shape1, 0F, 0F, 0F);
|
||||
convertToChild(this.rightleg, this.Shape1);
|
||||
this.Shape2 = new ModelRenderer(this, 16, 0);
|
||||
this.Shape2.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
this.Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F);
|
||||
this.Shape2.setTextureSize(64, 32);
|
||||
this.Shape2.mirror = true;
|
||||
setRotation(this.Shape2, 0F, 0F, 0F);
|
||||
convertToChild(this.leftleg, this.Shape2);
|
||||
this.Shape3 = new ModelRenderer(this, 0, 16);
|
||||
this.Shape3.addBox(0F, -6F, 0F, 5, 6, 4);
|
||||
this.Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F);
|
||||
this.Shape3.setTextureSize(64, 32);
|
||||
this.Shape3.mirror = true;
|
||||
setRotation(this.Shape3, 0.1745329F, 0F, 0F);
|
||||
convertToChild(this.rightleg, this.Shape3);
|
||||
this.Shape4 = new ModelRenderer(this, 18, 16);
|
||||
this.Shape4.addBox(0F, -6F, 0F, 5, 6, 4);
|
||||
this.Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F);
|
||||
this.Shape4.setTextureSize(64, 32);
|
||||
this.Shape4.mirror = true;
|
||||
setRotation(this.Shape4, 0.1745329F, 0F, 0F);
|
||||
convertToChild(this.leftleg, this.Shape4);
|
||||
this.Shape5 = new ModelRenderer(this, 34, 0);
|
||||
this.Shape5.addBox(0F, 0F, 0F, 5, 2, 4);
|
||||
this.Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F);
|
||||
this.Shape5.setTextureSize(64, 32);
|
||||
this.Shape5.mirror = true;
|
||||
setRotation(this.Shape5, 0F, 0F, 0F);
|
||||
convertToChild(this.rightleg, this.Shape5);
|
||||
this.Shape6 = new ModelRenderer(this, 34, 8);
|
||||
this.Shape6.addBox(0F, 0F, 0F, 5, 2, 4);
|
||||
this.Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F);
|
||||
this.Shape6.setTextureSize(64, 32);
|
||||
this.Shape6.mirror = true;
|
||||
setRotation(this.Shape6, 0F, 0F, 0F);
|
||||
convertToChild(this.leftleg, this.Shape6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) {
|
||||
|
||||
this.isSneak = entity.isSneaking();
|
||||
this.isRiding = entity.isRiding();
|
||||
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
|
||||
this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX;
|
||||
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
|
||||
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
|
||||
this.leftleg.rotateAngleX = this.bipedLeftLeg.rotateAngleX;
|
||||
this.leftleg.rotateAngleY = this.bipedLeftLeg.rotateAngleY;
|
||||
this.leftleg.rotateAngleZ = this.bipedLeftLeg.rotateAngleZ;
|
||||
this.rightleg.rotationPointX = this.bipedRightLeg.rotationPointX;
|
||||
this.rightleg.rotationPointY = this.bipedRightLeg.rotationPointY - 1.5F;
|
||||
this.rightleg.rotationPointZ = this.bipedRightLeg.rotationPointZ;
|
||||
this.rightleg.rotateAngleX = this.bipedRightLeg.rotateAngleX;
|
||||
this.rightleg.rotateAngleY = this.bipedRightLeg.rotateAngleY;
|
||||
this.rightleg.rotateAngleZ = this.bipedRightLeg.rotateAngleZ;
|
||||
|
||||
if (this.isSneak) {
|
||||
this.leftleg.rotationPointZ -= 0.5F;
|
||||
this.rightleg.rotationPointZ -= 0.5F;
|
||||
this.leftleg.rotationPointY += 0.5F;
|
||||
this.rightleg.rotationPointY += 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
this.leftleg.render(scaleFactor);
|
||||
|
||||
this.rightleg.render(scaleFactor);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected static void convertToChild(ModelRenderer parent, ModelRenderer child) {
|
||||
|
||||
// move child rotation point to be relative to parent
|
||||
child.rotationPointX -= parent.rotationPointX;
|
||||
child.rotationPointY -= parent.rotationPointY;
|
||||
child.rotationPointZ -= parent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
child.rotateAngleX -= parent.rotateAngleX;
|
||||
child.rotateAngleY -= parent.rotateAngleY;
|
||||
child.rotateAngleZ -= parent.rotateAngleZ;
|
||||
// create relationship
|
||||
parent.addChild(child);
|
||||
}
|
||||
|
||||
private static void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@ -1,203 +0,0 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.RenderDecoItem;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@Deprecated
|
||||
public class RenderAssembler extends TileEntitySpecialRenderer {
|
||||
|
||||
private RenderItem itemRenderer;
|
||||
private RenderManager renderManager = RenderManager.instance;
|
||||
|
||||
public RenderAssembler() { }
|
||||
|
||||
@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.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 14:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D); break;
|
||||
case 13:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D); break;
|
||||
case 15:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D); break;
|
||||
case 12:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.assembler_body_tex);
|
||||
ResourceManager.assembler_body.renderAll();
|
||||
|
||||
TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity;
|
||||
|
||||
if(assembler.recipe != -1) {
|
||||
itemRenderer = new RenderDecoItem(this);
|
||||
itemRenderer.setRenderManager(renderManager);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-1, 0.875, 0);
|
||||
|
||||
try {
|
||||
ItemStack stack = AssemblerRecipes.recipeList.get(assembler.recipe).toStack();
|
||||
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
GL11.glTranslated(1, 0, 1);
|
||||
if(!(stack.getItem() instanceof ItemBlock)) {
|
||||
GL11.glRotatef(-90, 1F, 0F, 0F);
|
||||
} else {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glTranslated(0, -0.875, -2);
|
||||
}
|
||||
|
||||
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
|
||||
item.getEntityItem().stackSize = 1;
|
||||
item.hoverStart = 0.0F;
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glTranslatef(0.0F, 1.0F - 0.0625F * 165/100, 0.0F);
|
||||
this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
|
||||
} catch(Exception ex) { }
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
|
||||
renderSlider(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderSlider(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 14:
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 13:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 15:
|
||||
GL11.glTranslated(0, 0, -1);
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 12:
|
||||
GL11.glTranslated(-1, 0, -1);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
|
||||
bindTexture(ResourceManager.assembler_slider_tex);
|
||||
|
||||
int offset = (int) (System.currentTimeMillis() % 5000) / 5;
|
||||
|
||||
if(offset > 500)
|
||||
offset = 500 - (offset - 500);
|
||||
|
||||
TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity;
|
||||
|
||||
if(assembler.isProgressing)
|
||||
GL11.glTranslated(offset * 0.003 - 0.75, 0, 0);
|
||||
|
||||
ResourceManager.assembler_slider.renderAll();
|
||||
|
||||
bindTexture(ResourceManager.assembler_arm_tex);
|
||||
|
||||
double sway = (System.currentTimeMillis() % 2000) / 2;
|
||||
|
||||
sway = Math.sin(sway / Math.PI / 50);
|
||||
|
||||
if(assembler.isProgressing)
|
||||
GL11.glTranslated(0, 0, sway * 0.3);
|
||||
ResourceManager.assembler_arm.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderCogs(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderCogs(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 14:
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 13:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 15:
|
||||
GL11.glTranslated(0, 0, -1);
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 12:
|
||||
GL11.glTranslated(-1, 0, -1);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
|
||||
bindTexture(ResourceManager.assembler_cog_tex);
|
||||
|
||||
int rotation = (int) (System.currentTimeMillis() % (360 * 5)) / 5;
|
||||
|
||||
TileEntityMachineAssembler assembler = (TileEntityMachineAssembler) tileEntity;
|
||||
|
||||
if(!assembler.isProgressing)
|
||||
rotation = 0;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.6, 0.75, 1.0625);
|
||||
GL11.glRotatef(-rotation, 0F, 0F, 1F);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.6, 0.75, 1.0625);
|
||||
GL11.glRotatef(rotation, 0F, 0F, 1F);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.6, 0.75, -1.0625);
|
||||
GL11.glRotatef(-rotation, 0F, 0F, 1F);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.6, 0.75, -1.0625);
|
||||
GL11.glRotatef(rotation, 0F, 0F, 1F);
|
||||
ResourceManager.assembler_cog.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1,155 +0,0 @@
|
||||
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.TileEntityMachineAssemfac;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac.AssemblerArm;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@Deprecated
|
||||
public class RenderAssemfac extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
TileEntityMachineAssemfac fac = (TileEntityMachineAssemfac) tileEntity;
|
||||
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.assemfac_tex);
|
||||
ResourceManager.assemfac.renderPart("Factory");
|
||||
|
||||
//double rot = Math.sin((double)(System.currentTimeMillis() / 500D)) * 25 - 20;
|
||||
//double rot2 = Math.sin((double)(System.currentTimeMillis() / 400D)) * 10;
|
||||
double hOff;
|
||||
double sOff;
|
||||
|
||||
for(int i = 0; i < fac.arms.length; i++) {
|
||||
|
||||
AssemblerArm arm = fac.arms[i];
|
||||
double pivotRot = arm.prevAngles[0] + (arm.angles[0] - arm.prevAngles[0]) * interp;
|
||||
double armRot = arm.prevAngles[1] + (arm.angles[1] - arm.prevAngles[1]) * interp;
|
||||
double pistonRot = arm.prevAngles[2] + (arm.angles[2] - arm.prevAngles[2]) * interp;
|
||||
double striker = arm.prevAngles[3] + (arm.angles[3] - arm.prevAngles[3]) * interp;
|
||||
|
||||
int side = i < 3 ? 1 : -1;
|
||||
int index = i + 1;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
hOff = 1.875D;
|
||||
sOff = 2D * side;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(pivotRot * side, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Pivot" + index);
|
||||
|
||||
hOff = 3.375D;
|
||||
sOff = 2D * side;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(armRot * side, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Arm" + index);
|
||||
|
||||
hOff = 3.375D;
|
||||
sOff = 0.625D * side;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(pistonRot * side, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Piston" + index);
|
||||
GL11.glTranslated(0, -striker, 0);
|
||||
ResourceManager.assemfac.renderPart("Striker" + index);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/*GL11.glPushMatrix();
|
||||
hOff = 1.875D;
|
||||
sOff = 2D;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(rot, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Pivot1");
|
||||
ResourceManager.assemfac.renderPart("Pivot2");
|
||||
ResourceManager.assemfac.renderPart("Pivot3");
|
||||
|
||||
hOff = 3.375D;
|
||||
sOff = 2D;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(rot * 1.2, -1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Arm1");
|
||||
ResourceManager.assemfac.renderPart("Arm2");
|
||||
ResourceManager.assemfac.renderPart("Arm3");
|
||||
|
||||
hOff = 3.375D;
|
||||
sOff = 0.625D;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(rot2, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Piston1");
|
||||
ResourceManager.assemfac.renderPart("Piston2");
|
||||
ResourceManager.assemfac.renderPart("Piston3");
|
||||
GL11.glTranslated(0, Math.sin((double)(System.currentTimeMillis() / 70D)) * 0.75 - 0.5, 0);
|
||||
ResourceManager.assemfac.renderPart("Striker1");
|
||||
ResourceManager.assemfac.renderPart("Striker2");
|
||||
ResourceManager.assemfac.renderPart("Striker3");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
rot = -Math.sin((double)((System.currentTimeMillis() + 500) / 500D)) * 25 + 20;
|
||||
rot2 = -Math.sin((double)((System.currentTimeMillis() + 150) / 400D)) * 10;
|
||||
GL11.glPushMatrix();
|
||||
hOff = 1.875D;
|
||||
sOff = -2D;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(rot, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Pivot4");
|
||||
ResourceManager.assemfac.renderPart("Pivot5");
|
||||
ResourceManager.assemfac.renderPart("Pivot6");
|
||||
|
||||
hOff = 3.375D;
|
||||
sOff = -2D;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(rot * 1.2, -1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Arm4");
|
||||
ResourceManager.assemfac.renderPart("Arm5");
|
||||
ResourceManager.assemfac.renderPart("Arm6");
|
||||
|
||||
hOff = 3.375D;
|
||||
sOff = -0.625D;
|
||||
GL11.glTranslated(sOff, hOff, sOff);
|
||||
GL11.glRotated(rot2, 1, 0, 0);
|
||||
GL11.glTranslated(-sOff, -hOff, -sOff);
|
||||
ResourceManager.assemfac.renderPart("Piston4");
|
||||
ResourceManager.assemfac.renderPart("Piston5");
|
||||
ResourceManager.assemfac.renderPart("Piston6");
|
||||
GL11.glTranslated(0, Math.sin((double)((System.currentTimeMillis() + 130) / 70D)) * 0.75 - 0.5, 0);
|
||||
ResourceManager.assemfac.renderPart("Striker4");
|
||||
ResourceManager.assemfac.renderPart("Striker5");
|
||||
ResourceManager.assemfac.renderPart("Striker6");
|
||||
GL11.glPopMatrix();*/
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
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.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@Deprecated
|
||||
public class RenderChemfac 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.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
TileEntityMachineChemfac chemfac = (TileEntityMachineChemfac) tileEntity;
|
||||
|
||||
switch(chemfac.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.chemfac_tex);
|
||||
ResourceManager.chemfac.renderPart("Main");
|
||||
|
||||
float rot = chemfac.prevRot + (chemfac.rot - chemfac.prevRot) * f;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(rot, 0, -1, 0);
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
ResourceManager.chemfac.renderPart("Fan1");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
GL11.glRotated(rot, 0, -1, 0);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
ResourceManager.chemfac.renderPart("Fan2");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,177 +0,0 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.util.Clock;
|
||||
import com.hbm.render.loader.HmfController;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@Deprecated
|
||||
public class RenderChemplant extends TileEntitySpecialRenderer {
|
||||
|
||||
public RenderChemplant() {
|
||||
}
|
||||
|
||||
@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.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
break;
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(-0.5D, 0.0D, 0.5D);
|
||||
|
||||
bindTexture(ResourceManager.chemplant_body_tex);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.chemplant_body.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderExtras(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderExtras(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.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
TileEntityMachineChemplant chem = (TileEntityMachineChemplant) tileEntity;
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
break;
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(-0.5D, 0.0D, 0.5D);
|
||||
|
||||
bindTexture(ResourceManager.chemplant_spinner_tex);
|
||||
|
||||
int rotation = (int) (Clock.get_ms() % (360 * 5)) / 5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.625, 0, 0.625);
|
||||
|
||||
if(chem.tanks[0].getTankType() != Fluids.NONE && chem.isProgressing)
|
||||
GL11.glRotatef(-rotation, 0F, 1F, 0F);
|
||||
else
|
||||
GL11.glRotatef(-45, 0F, 1F, 0F);
|
||||
|
||||
ResourceManager.chemplant_spinner.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.625, 0, 0.625);
|
||||
|
||||
if(chem.tanks[1].getTankType() != Fluids.NONE && chem.isProgressing)
|
||||
GL11.glRotatef(rotation, 0F, 1F, 0F);
|
||||
else
|
||||
GL11.glRotatef(45, 0F, 1F, 0F);
|
||||
|
||||
ResourceManager.chemplant_spinner.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double push = Math.sin((Clock.get_ms() % 2000) / 1000D * Math.PI) * 0.25 - 0.25;
|
||||
|
||||
bindTexture(ResourceManager.chemplant_piston_tex);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(chem.isProgressing)
|
||||
GL11.glTranslated(0, push, 0);
|
||||
else
|
||||
GL11.glTranslated(0, -0.25, 0);
|
||||
|
||||
ResourceManager.chemplant_piston.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
bindTexture(ResourceManager.chemplant_fluid_tex);
|
||||
int color = 0;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
if(chem.tanks[0].getTankType() != Fluids.NONE) {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(chem.isProgressing)
|
||||
HmfController.setMod(50000D, -250D);
|
||||
else
|
||||
HmfController.setMod(50000D, -50000D);
|
||||
|
||||
color = chem.tanks[0].getTankType().getColor();
|
||||
GL11.glColor3ub((byte) ((color & 0xFF0000) >> 16), (byte) ((color & 0x00FF00) >> 8), (byte) ((color & 0x0000FF) >> 0));
|
||||
GL11.glTranslated(-0.625, 0, 0.625);
|
||||
|
||||
int count = chem.tanks[0].getFill() * 16 / 24000;
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
if(i < count - 1)
|
||||
ResourceManager.chemplant_fluid.renderAll();
|
||||
else
|
||||
ResourceManager.chemplant_fluidcap.renderAll();
|
||||
GL11.glTranslated(0, 0.125, 0);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(chem.tanks[1].getTankType() != Fluids.NONE) {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(chem.isProgressing)
|
||||
HmfController.setMod(50000D, 250D);
|
||||
else
|
||||
HmfController.setMod(50000D, 50000D);
|
||||
|
||||
color = chem.tanks[1].getTankType().getColor();
|
||||
GL11.glColor3ub((byte) ((color & 0xFF0000) >> 16), (byte) ((color & 0x00FF00) >> 8), (byte) ((color & 0x0000FF) >> 0));
|
||||
GL11.glTranslated(0.625, 0, 0.625);
|
||||
|
||||
int count = chem.tanks[1].getFill() * 16 / 24000;
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
if(i < count - 1)
|
||||
ResourceManager.chemplant_fluid.renderAll();
|
||||
else
|
||||
ResourceManager.chemplant_fluidcap.renderAll();
|
||||
GL11.glTranslated(0, 0.125, 0);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
HmfController.resetMod();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -184,9 +184,6 @@ public class TileMappings {
|
||||
put(TileEntityTrappedBrick.class, "tileentity_trapped_brick");
|
||||
put(TileEntityWatzStruct.class, "tileentity_watz_struct");
|
||||
put(TileEntityICFStruct.class, "tileentity_icf_struct");
|
||||
put(TileEntityHadronDiode.class, "tileentity_hadron_diode");
|
||||
put(TileEntityHadronPower.class, "tileentity_hadron_power");
|
||||
put(TileEntityHadron.class, "tileentity_hadron");
|
||||
put(TileEntityPASource.class, "tileentity_pa_source");
|
||||
put(TileEntityPABeamline.class, "tileentity_pa_beamline");
|
||||
put(TileEntityPARFC.class, "tileentity_pa_rfc");
|
||||
@ -352,14 +349,10 @@ public class TileMappings {
|
||||
|
||||
put(TileEntityMachineCombustionEngine.class, "tileentity_combustion_engine");
|
||||
|
||||
put(TileEntityMachineAssembler.class, "tileentity_assembly_machine");
|
||||
put(TileEntityMachineAssemblyMachine.class, "tileentity_assemblymachine");
|
||||
put(TileEntityMachineAssemfac.class, "tileentity_assemfac");
|
||||
put(TileEntityMachineAssemblyFactory.class, "tileentity_assemblyfactory");
|
||||
put(TileEntityMachinePrecAss.class, "tileentity_precass");
|
||||
put(TileEntityMachineChemplant.class, "tileentity_chemical_plant");
|
||||
put(TileEntityMachineChemicalPlant.class, "tileentity_chemicalplant");
|
||||
put(TileEntityMachineChemfac.class, "tileentity_chemfac");
|
||||
put(TileEntityMachineChemicalFactory.class, "tileentity_chemicalfactory");
|
||||
put(TileEntityMachinePUREX.class, "tileentity_purex");
|
||||
|
||||
|
||||
@ -202,11 +202,15 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory,
|
||||
entries.put(new ComparableStack(ModBlocks.pink_barrel), new CustomNukeEntry(EnumBombType.TNT, 4F));
|
||||
entries.put(new ComparableStack(ModItems.custom_tnt), new CustomNukeEntry(EnumBombType.TNT, 10F));
|
||||
|
||||
entries.put(new ComparableStack(ModItems.ingot_u233), new CustomNukeEntry(EnumBombType.NUKE, 15F));
|
||||
entries.put(new ComparableStack(ModItems.ingot_u235), new CustomNukeEntry(EnumBombType.NUKE, 15F));
|
||||
entries.put(new ComparableStack(ModItems.ingot_pu239), new CustomNukeEntry(EnumBombType.NUKE, 25F));
|
||||
entries.put(new ComparableStack(ModItems.ingot_pu241), new CustomNukeEntry(EnumBombType.NUKE, 25F));
|
||||
entries.put(new ComparableStack(ModItems.ingot_neptunium), new CustomNukeEntry(EnumBombType.NUKE, 30F));
|
||||
entries.put(new ComparableStack(ModItems.nugget_u233), new CustomNukeEntry(EnumBombType.NUKE, 1.5F));
|
||||
entries.put(new ComparableStack(ModItems.nugget_u235), new CustomNukeEntry(EnumBombType.NUKE, 1.5F));
|
||||
entries.put(new ComparableStack(ModItems.nugget_pu239), new CustomNukeEntry(EnumBombType.NUKE, 2.5F));
|
||||
entries.put(new ComparableStack(ModItems.nugget_pu241), new CustomNukeEntry(EnumBombType.NUKE, 2.5F));
|
||||
entries.put(new ComparableStack(ModItems.nugget_neptunium), new CustomNukeEntry(EnumBombType.NUKE, 3.0F));
|
||||
entries.put(new ComparableStack(ModItems.powder_neptunium), new CustomNukeEntry(EnumBombType.NUKE, 30F));
|
||||
entries.put(new ComparableStack(ModItems.custom_nuke), new CustomNukeEntry(EnumBombType.NUKE, 30F));
|
||||
@ -214,7 +218,6 @@ public class TileEntityNukeCustom extends TileEntity implements ISidedInventory,
|
||||
entries.put(new ComparableStack(ModItems.cell_deuterium), new CustomNukeEntry(EnumBombType.HYDRO, 20F));
|
||||
entries.put(new ComparableStack(ModItems.cell_tritium), new CustomNukeEntry(EnumBombType.HYDRO, 30F));
|
||||
entries.put(new ComparableStack(ModItems.lithium), new CustomNukeEntry(EnumBombType.HYDRO, 20F));
|
||||
entries.put(new ComparableStack(ModItems.tritium_deuterium_cake), new CustomNukeEntry(EnumBombType.HYDRO, 200F));
|
||||
entries.put(new ComparableStack(ModItems.custom_hydro), new CustomNukeEntry(EnumBombType.HYDRO, 30F));
|
||||
|
||||
entries.put(new ComparableStack(ModItems.cell_antimatter), new CustomNukeEntry(EnumBombType.AMAT, 5F));
|
||||
|
||||
@ -1,886 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.BlockHadronCoil;
|
||||
import com.hbm.blocks.machine.BlockHadronPlating;
|
||||
import com.hbm.handler.threading.PacketThreading;
|
||||
import com.hbm.inventory.container.ContainerHadron;
|
||||
import com.hbm.inventory.gui.GUIHadron;
|
||||
import com.hbm.inventory.recipes.HadronRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronDiode.DiodeConfig;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityHadron extends TileEntityMachineBase implements IEnergyReceiverMK2, IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 10000000;
|
||||
|
||||
public boolean isOn = false;
|
||||
public boolean analysisOnly = false;
|
||||
public int ioMode = 0;
|
||||
public static final int MODE_DEFAULT = 0;
|
||||
public static final int MODE_HOPPER = 1;
|
||||
public static final int MODE_SINGLE = 2;
|
||||
|
||||
private int delay;
|
||||
public EnumHadronState state = EnumHadronState.IDLE;
|
||||
private static final int delaySuccess = 20;
|
||||
private static final int delayNoResult = 60;
|
||||
private static final int delayError = 100;
|
||||
|
||||
public boolean stat_success = false;
|
||||
public EnumHadronState stat_state = EnumHadronState.IDLE;
|
||||
public int stat_charge = 0;
|
||||
public int stat_x = 0;
|
||||
public int stat_y = 0;
|
||||
public int stat_z = 0;
|
||||
|
||||
public TileEntityHadron() {
|
||||
super(5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.hadron";
|
||||
}
|
||||
|
||||
private static final int[] access = new int[] {0, 1, 2, 3};
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return access;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return i == 2 || i == 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
if(i != 0 && i != 1) return false;
|
||||
|
||||
if(this.ioMode == MODE_SINGLE) {
|
||||
return slots[i] == null;
|
||||
}
|
||||
|
||||
//makes sure that equal items like the antimatter capsules are spread out evenly
|
||||
if(slots[0] != null && slots[1] != null && slots[0].getItem() == slots[1].getItem() && slots[0].getItemDamage() == slots[1].getItemDamage()) {
|
||||
if(i == 0) return slots[1].stackSize - slots[0].stackSize >= 0;
|
||||
if(i == 1) return slots[0].stackSize - slots[1].stackSize >= 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 4, power, maxPower);
|
||||
drawPower();
|
||||
|
||||
particles.addAll(particlesToAdd);
|
||||
particlesToAdd.clear();
|
||||
|
||||
if(delay <= 0 && this.isOn && particles.size() < maxParticles && slots[0] != null && slots[1] != null && power >= maxPower * 0.75) {
|
||||
|
||||
if(ioMode != MODE_HOPPER || (slots[0].stackSize > 1 && slots[1].stackSize > 1)) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
particles.add(new Particle(slots[0], slots[1], dir, xCoord, yCoord, zCoord));
|
||||
this.decrStackSize(0, 1);
|
||||
this.decrStackSize(1, 1);
|
||||
power -= maxPower * 0.75;
|
||||
this.state = EnumHadronState.PROGRESS;
|
||||
}
|
||||
}
|
||||
|
||||
if(delay > 0)
|
||||
delay--;
|
||||
else if(particles.isEmpty()) {
|
||||
this.state = EnumHadronState.IDLE;
|
||||
}
|
||||
|
||||
if(!particles.isEmpty())
|
||||
updateParticles();
|
||||
|
||||
for(Particle p : particlesToRemove) {
|
||||
particles.remove(p);
|
||||
}
|
||||
|
||||
particlesToRemove.clear();
|
||||
|
||||
//Sort the virtual particles by momentum, and run through them until we have enough momentum to complete the recipe
|
||||
//If we succeed, "collapse" the cheapest particle that had enough momentum
|
||||
//If we fail to make anything, "collapse" the most expensive particle
|
||||
if(particles.isEmpty() && !particlesCompleted.isEmpty()) {
|
||||
ItemStack[] result = null;
|
||||
Particle particle = null;
|
||||
|
||||
particlesCompleted.sort((p1, p2) -> { return p1.momentum - p2.momentum; });
|
||||
for(Particle p : particlesCompleted) {
|
||||
particle = p;
|
||||
result = HadronRecipes.getOutput(p.item1, p.item2, p.momentum, analysisOnly);
|
||||
if(result != null) break;
|
||||
}
|
||||
|
||||
process(particle, result);
|
||||
|
||||
particlesCompleted.clear();
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setBoolean("isOn", isOn);
|
||||
data.setLong("power", power);
|
||||
data.setBoolean("analysis", analysisOnly);
|
||||
data.setInteger("ioMode", ioMode);
|
||||
data.setByte("state", (byte) state.ordinal());
|
||||
|
||||
data.setBoolean("stat_success", stat_success);
|
||||
data.setByte("stat_state", (byte) stat_state.ordinal());
|
||||
data.setInteger("stat_charge", stat_charge);
|
||||
data.setInteger("stat_x", stat_x);
|
||||
data.setInteger("stat_y", stat_y);
|
||||
data.setInteger("stat_z", stat_z);
|
||||
this.networkPackNT(50);
|
||||
}
|
||||
}
|
||||
|
||||
private void process(Particle p, ItemStack[] result) {
|
||||
//Collapse this particle to real by consuming power
|
||||
p.consumePower();
|
||||
|
||||
if(result == null) {
|
||||
this.state = HadronRecipes.returnCode;
|
||||
this.setStats(this.state, p.momentum, false);
|
||||
this.delay = delayNoResult;
|
||||
worldObj.playSoundEffect(p.posX, p.posY, p.posZ, "random.orb", 2, 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
if((slots[2] == null || (slots[2].getItem() == result[0].getItem() && slots[2].stackSize < slots[2].getMaxStackSize())) &&
|
||||
(slots[3] == null || (slots[3].getItem() == result[1].getItem() && slots[3].stackSize < slots[3].getMaxStackSize()))) {
|
||||
|
||||
for(int i = 2; i <= 3; i++) {
|
||||
if(slots[i] == null)
|
||||
slots[i] = result[i - 2].copy();
|
||||
else
|
||||
slots[i].stackSize++;
|
||||
}
|
||||
|
||||
if(result[0].getItem() == ModItems.particle_digamma) {
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class,
|
||||
AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5)
|
||||
.expand(128, 50, 128));
|
||||
|
||||
for(EntityPlayer player : players)
|
||||
player.triggerAchievement(MainRegistry.achOmega12);
|
||||
}
|
||||
}
|
||||
|
||||
worldObj.playSoundEffect(p.posX, p.posY, p.posZ, "random.orb", 2, 1F);
|
||||
this.delay = delaySuccess;
|
||||
this.state = EnumHadronState.SUCCESS;
|
||||
this.setStats(this.state, p.momentum, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeBoolean(this.isOn);
|
||||
buf.writeLong(this.power);
|
||||
buf.writeBoolean(this.analysisOnly);
|
||||
buf.writeInt(this.ioMode);
|
||||
buf.writeByte((byte) this.state.ordinal());
|
||||
|
||||
buf.writeBoolean(this.stat_success);
|
||||
buf.writeByte((byte) this.stat_state.ordinal());
|
||||
buf.writeInt(this.stat_charge);
|
||||
buf.writeInt(this.stat_x);
|
||||
buf.writeInt(this.stat_y);
|
||||
buf.writeInt(this.stat_z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.isOn = buf.readBoolean();
|
||||
this.power = buf.readLong();
|
||||
this.analysisOnly = buf.readBoolean();
|
||||
this.ioMode = buf.readInt();
|
||||
this.state = EnumHadronState.values()[buf.readByte()];
|
||||
|
||||
this.stat_success = buf.readBoolean();
|
||||
this.stat_state = EnumHadronState.values()[buf.readByte()];
|
||||
this.stat_charge = buf.readInt();
|
||||
this.stat_x = buf.readInt();
|
||||
this.stat_y = buf.readInt();
|
||||
this.stat_z = buf.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleButtonPacket(int value, int meta) {
|
||||
|
||||
if(meta == 0)
|
||||
this.isOn = !this.isOn;
|
||||
if(meta == 1)
|
||||
this.analysisOnly = !this.analysisOnly;
|
||||
if(meta == 2) {
|
||||
this.ioMode++;
|
||||
if(ioMode > 2) ioMode = 0;
|
||||
}
|
||||
|
||||
this.markChanged();
|
||||
}
|
||||
|
||||
private void drawPower() {
|
||||
|
||||
for(ForgeDirection dir : getRandomDirs()) {
|
||||
|
||||
if(power == maxPower)
|
||||
return;
|
||||
|
||||
int x = xCoord + dir.offsetX * 2;
|
||||
int y = yCoord + dir.offsetY * 2;
|
||||
int z = zCoord + dir.offsetZ * 2;
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityHadronPower) {
|
||||
|
||||
TileEntityHadronPower plug = (TileEntityHadronPower)te;
|
||||
|
||||
long toDraw = Math.min(maxPower - power, plug.getPower());
|
||||
this.setPower(power + toDraw);
|
||||
plug.setPower(plug.getPower() - toDraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void finishParticle(Particle p) {
|
||||
particlesToRemove.add(p);
|
||||
|
||||
if(!p.isExpired())
|
||||
particlesCompleted.add(p);
|
||||
|
||||
p.expired = true;
|
||||
}
|
||||
|
||||
static final int maxParticles = 1;
|
||||
List<Particle> particles = new ArrayList<Particle>();
|
||||
List<Particle> particlesToRemove = new ArrayList<Particle>();
|
||||
List<Particle> particlesToAdd = new ArrayList<Particle>();
|
||||
List<Particle> particlesCompleted = new ArrayList<Particle>();
|
||||
|
||||
private void updateParticles() {
|
||||
for(Particle particle : particles) {
|
||||
particle.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
this.power = nbt.getLong("power");
|
||||
this.analysisOnly = nbt.getBoolean("analysis");
|
||||
this.ioMode = nbt.getInteger("ioMode");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setBoolean("analysis", analysisOnly);
|
||||
nbt.setInteger("ioMode", ioMode);
|
||||
}
|
||||
|
||||
public int getPowerScaled(int i) {
|
||||
return (int)(power * i / maxPower);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void setStats(EnumHadronState state, int count, boolean success) {
|
||||
this.stat_state = state;
|
||||
this.stat_charge = count;
|
||||
this.stat_success = success;
|
||||
}
|
||||
|
||||
private void setExpireStats(EnumHadronState state, int count, int x, int y, int z) {
|
||||
this.stat_state = state;
|
||||
this.stat_charge = count;
|
||||
this.stat_x = x;
|
||||
this.stat_y = y;
|
||||
this.stat_z = z;
|
||||
this.stat_success = false;
|
||||
}
|
||||
|
||||
public void expire(Particle particle, EnumHadronState reason) {
|
||||
if(particle.expired)
|
||||
return;
|
||||
|
||||
particle.consumePower();
|
||||
for(Particle p : particles) {
|
||||
p.expired = true;
|
||||
particlesToRemove.add(p);
|
||||
}
|
||||
worldObj.newExplosion(null, particle.posX + 0.5, particle.posY + 0.5, particle.posZ + 0.5, 10, false, false);
|
||||
|
||||
//If any particles expire, cancel any succeeding particles, since they'll confuse the player
|
||||
particlesCompleted.clear();
|
||||
|
||||
state = reason;
|
||||
delay = delayError;
|
||||
setExpireStats(reason, particle.momentum, particle.posX, particle.posY, particle.posZ);
|
||||
}
|
||||
|
||||
public class Particle {
|
||||
|
||||
//Starting values
|
||||
ItemStack item1;
|
||||
ItemStack item2;
|
||||
ForgeDirection dir;
|
||||
int posX;
|
||||
int posY;
|
||||
int posZ;
|
||||
|
||||
//Progressing values
|
||||
int momentum;
|
||||
int charge;
|
||||
int analysis;
|
||||
boolean isCheckExempt = false;
|
||||
|
||||
boolean expired = false;
|
||||
boolean cloned = false;
|
||||
|
||||
//Quantum mechanical ass particle
|
||||
//Virtual particles traverse the accelerator without consuming electrical power
|
||||
//The cheapest valid route to the analysis chamber is then turned into a real particle, consuming power
|
||||
List<TileEntityHadronPower> plugs = new ArrayList<TileEntityHadronPower>();
|
||||
|
||||
//Quantum particles should only traverse a schottky direction ONCE
|
||||
//Keep a list of traversed diodes and directions
|
||||
HashMap<TileEntityHadronDiode, List<ForgeDirection>> history = new HashMap<TileEntityHadronDiode, List<ForgeDirection>>();
|
||||
|
||||
public Particle(ItemStack item1, ItemStack item2, ForgeDirection dir, int posX, int posY, int posZ) {
|
||||
this.item1 = item1.copy();
|
||||
this.item2 = item2.copy();
|
||||
this.item1.stackSize = 1;
|
||||
this.item2.stackSize = 1;
|
||||
this.dir = dir;
|
||||
this.posX = posX;
|
||||
this.posY = posY;
|
||||
this.posZ = posZ;
|
||||
|
||||
this.charge = 750;
|
||||
this.momentum = 0;
|
||||
}
|
||||
|
||||
//Clones the particle and gives it a new direction
|
||||
public Particle clone(ForgeDirection dir) {
|
||||
Particle p = new Particle(item1, item2, dir, posX, posY, posZ);
|
||||
p.momentum = momentum;
|
||||
p.charge = charge;
|
||||
p.analysis = analysis;
|
||||
p.isCheckExempt = isCheckExempt;
|
||||
p.expired = expired;
|
||||
p.plugs = new ArrayList<TileEntityHadronPower>(plugs);
|
||||
p.cloned = true;
|
||||
|
||||
//Deep clone the history
|
||||
p.history = new HashMap<TileEntityHadronDiode, List<ForgeDirection>>(history);
|
||||
for(TileEntityHadronDiode diode : p.history.keySet()) {
|
||||
p.history.put(diode, new ArrayList<ForgeDirection>(p.history.get(diode)));
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
public boolean isExpired() {
|
||||
return this.expired;
|
||||
}
|
||||
|
||||
public void update() {
|
||||
|
||||
if(expired) //just in case
|
||||
return;
|
||||
|
||||
//Recently cloned particles have already a set direction, this prevents infinite recursion
|
||||
if(cloned) {
|
||||
cloned = false;
|
||||
} else {
|
||||
changeDirection(this);
|
||||
}
|
||||
|
||||
makeSteppy(this);
|
||||
|
||||
if(!this.isExpired()) //only important for when the current segment is the core
|
||||
checkSegment(this);
|
||||
|
||||
isCheckExempt = false; //clearing up the exemption we might have held from the previous turn, AFTER stepping
|
||||
|
||||
if(charge < 0)
|
||||
expire(this, EnumHadronState.ERROR_NO_CHARGE);
|
||||
}
|
||||
|
||||
public void incrementCharge(int coilVal) {
|
||||
this.momentum += coilVal;
|
||||
}
|
||||
|
||||
public void consumePower() {
|
||||
for(TileEntityHadronPower plug : plugs) {
|
||||
long bit = 10000;
|
||||
int times = (int) (plug.getPower() / bit);
|
||||
plug.setPower(plug.getPower() - times * bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves the particle and does all the checks required to do so
|
||||
* Handles diode entering behavior and whatnot
|
||||
* @param p
|
||||
*/
|
||||
public void makeSteppy(Particle p) {
|
||||
|
||||
ForgeDirection dir = p.dir;
|
||||
|
||||
p.posX += dir.offsetX;
|
||||
p.posY += dir.offsetY;
|
||||
p.posZ += dir.offsetZ;
|
||||
|
||||
int x = p.posX;
|
||||
int y = p.posY;
|
||||
int z = p.posZ;
|
||||
|
||||
Block block = worldObj.getBlock(x, y, z);
|
||||
TileEntity te = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityHadron) {
|
||||
|
||||
if(p.analysis != 3)
|
||||
expire(p, EnumHadronState.ERROR_NO_ANALYSIS);
|
||||
else
|
||||
this.finishParticle(p);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(block.getMaterial() != Material.air && block != ModBlocks.hadron_diode)
|
||||
expire(p, EnumHadronState.ERROR_OBSTRUCTED_CHANNEL);
|
||||
|
||||
if(block == ModBlocks.hadron_diode)
|
||||
p.isCheckExempt = true;
|
||||
|
||||
if(isValidCoil(worldObj.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ)))
|
||||
p.isCheckExempt = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* All the checks done *after* the particle moves one tile
|
||||
* @param p
|
||||
*/
|
||||
public void checkSegment(Particle p) {
|
||||
|
||||
ForgeDirection dir = p.dir;
|
||||
int x = p.posX;
|
||||
int y = p.posY;
|
||||
int z = p.posZ;
|
||||
|
||||
//we make a set of axis where the directional axis is 0 and the normals are 1
|
||||
//that allows us to easily iterate through a rectangle that is normal to our moving direction
|
||||
int dX = 1 - Math.abs(dir.offsetX);
|
||||
int dY = 1 - Math.abs(dir.offsetY);
|
||||
int dZ = 1 - Math.abs(dir.offsetZ);
|
||||
|
||||
//whether the particle has entered an analysis chamber
|
||||
//-> all coils have to be air
|
||||
//-> all platings have to be analysis chamber walls
|
||||
boolean analysis = true;
|
||||
//ensures coolers are useful throughout their initial segment
|
||||
int totalValue = 0;
|
||||
|
||||
for(int a = x - dX * 2; a <= x + dX * 2; a++) {
|
||||
for(int b = y - dY * 2; b <= y + dY * 2; b++) {
|
||||
for(int c = z - dZ * 2; c <= z + dZ * 2;c++) {
|
||||
|
||||
Block block = worldObj.getBlock(a, b, c);
|
||||
|
||||
/** ignore the center for now */
|
||||
if(a == x && b == y && c == z) {
|
||||
|
||||
//we are either in a diode or the core - no analysis for you now
|
||||
if(block.getMaterial() != Material.air)
|
||||
analysis = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
int ix = Math.abs(x - a);
|
||||
int iy = Math.abs(y - b);
|
||||
int iz = Math.abs(z - c);
|
||||
|
||||
/** check coils, all abs deltas are 1 or less */
|
||||
if(ix <= 1 && iy <= 1 && iz <= 1) {
|
||||
|
||||
//are we exempt from the coil examination? nice, skip checks only for inner magnets, not the corners!
|
||||
if(p.isCheckExempt && ix + iy + iz == 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//coil is air, analysis can remain true
|
||||
if(block.getMaterial() == Material.air && analysis) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//not air -> not an analysis chamber
|
||||
analysis = false;
|
||||
|
||||
int coilVal = coilValue(block);
|
||||
|
||||
//not a valid coil: kablam!
|
||||
if(!isValidCoil(block)) {
|
||||
expire(p, EnumHadronState.ERROR_EXPECTED_COIL);
|
||||
} else {
|
||||
p.charge -= coilVal;
|
||||
totalValue += coilVal;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/** now we check the plating, sum of all local positions being 3 or less gives us the outer plating without corners */
|
||||
if(ix + iy + iz <= 3) {
|
||||
|
||||
//if the plating is for the analysis chamber, continue no matter what
|
||||
if(isAnalysis(block))
|
||||
continue;
|
||||
|
||||
//no analysis chamber -> turn off analysis and proceed
|
||||
analysis = false;
|
||||
|
||||
//a plating? good, continue
|
||||
if(isPlating(block))
|
||||
continue;
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(a, b, c);
|
||||
|
||||
//power plugs are also ok, might as well succ some energy when passing
|
||||
if(te instanceof TileEntityHadronPower) {
|
||||
|
||||
TileEntityHadronPower plug = (TileEntityHadronPower)te;
|
||||
|
||||
long bit = 10000; //how much HE one "charge point" is
|
||||
int times = (int) (plug.getPower() / bit); //how many charges the plug has to offer
|
||||
|
||||
p.charge += times;
|
||||
p.plugs.add(plug);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
//Are we exempt from checking the plating? skip all the plating blocks where branches could be
|
||||
if(p.isCheckExempt && ix + iy + iz == 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
expire(p, EnumHadronState.ERROR_MALFORMED_SEGMENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//all errors prior to this point come from bad construction, where exact momentum is irrelevant
|
||||
p.incrementCharge(totalValue);
|
||||
|
||||
if(analysis) {
|
||||
|
||||
p.analysis++;
|
||||
|
||||
//if the analysis chamber is too big, destroy
|
||||
if(p.analysis > 3)
|
||||
expire(p, EnumHadronState.ERROR_ANALYSIS_TOO_LONG);
|
||||
|
||||
if(p.analysis == 2) {
|
||||
//Only pop for the first particle
|
||||
if(this.state != EnumHadronState.ANALYSIS) {
|
||||
this.worldObj.playSoundEffect(p.posX + 0.5, p.posY + 0.5, p.posZ + 0.5, "fireworks.blast", 2.0F, 2F);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "hadron");
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, p.posX + 0.5, p.posY + 0.5, p.posZ + 0.5), new TargetPoint(worldObj.provider.dimensionId, p.posX + 0.5, p.posY + 0.5, p.posZ + 0.5, 25));
|
||||
}
|
||||
this.state = EnumHadronState.ANALYSIS;
|
||||
}
|
||||
|
||||
//if operating in line accelerator mode, halt after 2 blocks and staart the reading
|
||||
if(this.analysisOnly && p.analysis == 2) {
|
||||
this.finishParticle(p);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
//if the analysis stops despite being short of 3 steps in the analysis chamber, destroy
|
||||
if(p.analysis > 0 && p.analysis < 3)
|
||||
expire(p, EnumHadronState.ERROR_ANALYSIS_TOO_SHORT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether we can go forward or if we might want to do a turn
|
||||
* Handles the better part of the diode behavior
|
||||
* @param p
|
||||
*/
|
||||
public void changeDirection(Particle p) {
|
||||
|
||||
ForgeDirection dir = p.dir;
|
||||
|
||||
int x = p.posX;
|
||||
int y = p.posY;
|
||||
int z = p.posZ;
|
||||
|
||||
int nx = x + dir.offsetX;
|
||||
int ny = y + dir.offsetY;
|
||||
int nz = z + dir.offsetZ;
|
||||
|
||||
Block next = worldObj.getBlock(nx, ny, nz);
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(nx, ny, nz);
|
||||
|
||||
//the next block appears to be a diode, let's see if we can enter
|
||||
if(te instanceof TileEntityHadronDiode) {
|
||||
TileEntityHadronDiode diode = (TileEntityHadronDiode)te;
|
||||
|
||||
if(diode.getConfig(p.dir.getOpposite().ordinal()) != DiodeConfig.IN) {
|
||||
//it appears as if we have slammed into the side of a diode, ouch
|
||||
expire(p, EnumHadronState.ERROR_DIODE_COLLISION);
|
||||
}
|
||||
|
||||
//there's a diode ahead, turn off checks so we can make the curve
|
||||
p.isCheckExempt = true;
|
||||
|
||||
//the *next* block is a diode, we are not in it yet, which means no turning and no check exemption. too bad kiddo.
|
||||
return;
|
||||
}
|
||||
|
||||
//instead of the next TE, we are looking at the current one - the diode (maybe)
|
||||
te = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
//if we are currently in a diode, we might want to consider changing dirs
|
||||
if(te instanceof TileEntityHadronDiode) {
|
||||
|
||||
//since we are *in* a diode, we might want to call the warrant officer for
|
||||
//an exemption for the coil check, because curves NEED holes to turn into, and
|
||||
//checking for coils in spaces where there cannot be coils is quite not-good
|
||||
p.isCheckExempt = true;
|
||||
|
||||
TileEntityHadronDiode diode = (TileEntityHadronDiode)te;
|
||||
|
||||
boolean hasTurnedCurrent = false;
|
||||
|
||||
if(!p.history.containsKey(diode))
|
||||
p.history.put(diode, new ArrayList<ForgeDirection>());
|
||||
|
||||
List<ForgeDirection> usedDirections = p.history.get(diode);
|
||||
|
||||
//Instance a new particle for each required fork
|
||||
for(ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if(!usedDirections.contains(d) && diode.getConfig(d.ordinal()) == DiodeConfig.OUT) {
|
||||
if(!hasTurnedCurrent) {
|
||||
p.dir = d;
|
||||
hasTurnedCurrent = true;
|
||||
} else {
|
||||
Particle clone = p.clone(d);
|
||||
clone.history.get(diode).add(d);
|
||||
particlesToAdd.add(clone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Add the used direction to the main particle AFTER cloning, so the clones don't get incorrect travel history
|
||||
usedDirections.add(p.dir);
|
||||
|
||||
//If we failed to exit, raise DIODE_COLLISION
|
||||
if(!hasTurnedCurrent)
|
||||
expire(p, EnumHadronState.ERROR_DIODE_COLLISION);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//next step is air or the core, proceed
|
||||
if(next.getMaterial() == Material.air || next == ModBlocks.hadron_core)
|
||||
return;
|
||||
|
||||
//so, the next block is most certainly a wall. not good. perhaps we could try turning?
|
||||
if(isValidCoil(next)) {
|
||||
|
||||
ForgeDirection validDir = ForgeDirection.UNKNOWN;
|
||||
|
||||
List<ForgeDirection> dirs = getRandomDirs();
|
||||
|
||||
//let's look at every direction we could go in
|
||||
for(ForgeDirection d : dirs) {
|
||||
|
||||
if(d == dir || d == dir.getOpposite())
|
||||
continue;
|
||||
|
||||
//there is air! we can pass!
|
||||
if(worldObj.getBlock(x + d.offsetX, y + d.offsetY, z + d.offsetZ).getMaterial() == Material.air) {
|
||||
|
||||
if(validDir == ForgeDirection.UNKNOWN) {
|
||||
validDir = d;
|
||||
|
||||
//it seems like there are two or more possible ways, which is not allowed without a diode
|
||||
//sorry kid, nothing personal
|
||||
} else {
|
||||
expire(p, EnumHadronState.ERROR_BRANCHING_TURN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//set the new direction
|
||||
p.dir = validDir;
|
||||
p.isCheckExempt = true;
|
||||
return;
|
||||
}
|
||||
|
||||
expire(p, EnumHadronState.ERROR_OBSTRUCTED_CHANNEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dear god please grant me the gift of death and end my eternal torment
|
||||
* @return
|
||||
*/
|
||||
private List<ForgeDirection> getRandomDirs() {
|
||||
|
||||
List<Integer> rands = Arrays.asList(new Integer[] {0, 1, 2, 3, 4, 5} );
|
||||
Collections.shuffle(rands);
|
||||
List<ForgeDirection> dirs = new ArrayList();
|
||||
for(Integer i : rands) {
|
||||
dirs.add(ForgeDirection.getOrientation(i));
|
||||
}
|
||||
return dirs;
|
||||
}
|
||||
|
||||
public boolean isValidCoil(Block b) {
|
||||
if(coilValue(b) > 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public int coilValue(Block b) {
|
||||
|
||||
if(b instanceof BlockHadronCoil)
|
||||
return ((BlockHadronCoil)b).factor;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isPlating(Block b) {
|
||||
|
||||
return b instanceof BlockHadronPlating ||
|
||||
b instanceof BlockHadronCoil ||
|
||||
b == ModBlocks.hadron_plating_glass ||
|
||||
b == ModBlocks.hadron_analysis_glass ||
|
||||
b == ModBlocks.hadron_access;
|
||||
}
|
||||
|
||||
public boolean isAnalysis(Block b) {
|
||||
|
||||
return b == ModBlocks.hadron_analysis ||
|
||||
b == ModBlocks.hadron_analysis_glass;
|
||||
}
|
||||
|
||||
public static enum EnumHadronState {
|
||||
IDLE(0x8080ff),
|
||||
PROGRESS(0xffff00),
|
||||
ANALYSIS(0xffff00),
|
||||
NORESULT(0xff8000),
|
||||
NORESULT_TOO_SLOW(0xff8000),
|
||||
NORESULT_WRONG_INGREDIENT(0xff8000),
|
||||
NORESULT_WRONG_MODE(0xff8000),
|
||||
SUCCESS(0x00ff00),
|
||||
ERROR_NO_CHARGE(0xff0000, true),
|
||||
ERROR_NO_ANALYSIS(0xff0000, true),
|
||||
ERROR_OBSTRUCTED_CHANNEL(0xff0000, true),
|
||||
ERROR_EXPECTED_COIL(0xff0000, true),
|
||||
ERROR_MALFORMED_SEGMENT(0xff0000, true),
|
||||
ERROR_ANALYSIS_TOO_LONG(0xff0000, true),
|
||||
ERROR_ANALYSIS_TOO_SHORT(0xff0000, true),
|
||||
ERROR_DIODE_COLLISION(0xff0000, true),
|
||||
ERROR_BRANCHING_TURN(0xff0000, true),
|
||||
ERROR_GENERIC(0xff0000, true);
|
||||
|
||||
public int color;
|
||||
public boolean showCoord;
|
||||
|
||||
private EnumHadronState(int color) {
|
||||
this(color, false);
|
||||
}
|
||||
|
||||
private EnumHadronState(int color, boolean showCoord) {
|
||||
this.color = color;
|
||||
this.showCoord = showCoord;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerHadron(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIHadron(player.inventory, this);
|
||||
}
|
||||
}
|
||||
@ -1,99 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityHadronDiode extends TileEntityTickingBase {
|
||||
|
||||
int age = 0;
|
||||
boolean fatherIAskOfYouToUpdateMe = false;
|
||||
|
||||
public DiodeConfig[] sides = new DiodeConfig[6];
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
age++;
|
||||
|
||||
if(age >= 20) {
|
||||
age = 0;
|
||||
this.networkPackNT(250);
|
||||
}
|
||||
} else {
|
||||
|
||||
if(fatherIAskOfYouToUpdateMe) {
|
||||
fatherIAskOfYouToUpdateMe = false;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void serialize(ByteBuf buf) {
|
||||
for(int i = 0; i < 6; i++) {
|
||||
buf.writeByte(sides[i].ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void deserialize(ByteBuf buf) {
|
||||
for(int i = 0; i < 6; i++) {
|
||||
sides[i] = DiodeConfig.values()[buf.readByte()];
|
||||
}
|
||||
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
public DiodeConfig getConfig(int side) {
|
||||
|
||||
if(ForgeDirection.getOrientation(side) == ForgeDirection.UNKNOWN)
|
||||
return DiodeConfig.NONE;
|
||||
|
||||
DiodeConfig conf = sides[side];
|
||||
|
||||
if(conf == null)
|
||||
return DiodeConfig.NONE;
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
public void setConfig(int side, int config) {
|
||||
sides[side] = DiodeConfig.values()[config];
|
||||
this.markDirty();
|
||||
this.networkPackNT(250);
|
||||
}
|
||||
|
||||
public static enum DiodeConfig {
|
||||
NONE,
|
||||
IN,
|
||||
OUT
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
sides[i] = DiodeConfig.values()[nbt.getInteger("side_" + i)];
|
||||
}
|
||||
|
||||
fatherIAskOfYouToUpdateMe = true;
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
if(sides[i] != null) {
|
||||
nbt.setInteger("side_" + i, sides[i].ordinal());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.machine.BlockHadronPower;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityHadronPower extends TileEntityLoadedBase implements IEnergyReceiverMK2, IBufPacketReceiver {
|
||||
|
||||
public long power;
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return true; //yeah idk wtf happened with the old behavior and honestly i'm not keen on figuring that one out
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
}
|
||||
|
||||
networkPackNT(15);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
buf.writeLong(power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
power = buf.readLong();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
|
||||
Block b = this.getBlockType();
|
||||
|
||||
if(b instanceof BlockHadronPower) {
|
||||
return ((BlockHadronPower)b).power;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.power = nbt.getLong("power");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
}
|
||||
}
|
||||
@ -1,303 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.UpgradeManagerNT;
|
||||
import com.hbm.inventory.container.ContainerMachineAssembler;
|
||||
import com.hbm.inventory.gui.GUIMachineAssembler;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class TileEntityMachineAssembler extends TileEntityMachineAssemblerBase implements IUpgradeInfoProvider {
|
||||
|
||||
public int recipe = -1;
|
||||
|
||||
public UpgradeManagerNT upgradeManager = new UpgradeManagerNT();
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
public TileEntityMachineAssembler() {
|
||||
super(18);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.assembler";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
if(i == 0)
|
||||
if(itemStack.getItem() instanceof IBatteryItem)
|
||||
return true;
|
||||
|
||||
if(i == 1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
//meta below 12 means that it's an old multiblock configuration
|
||||
if(this.getBlockMetadata() < 12) {
|
||||
int meta = this.getBlockMetadata();
|
||||
if(meta == 2 || meta == 14) meta = 4;
|
||||
else if(meta == 4 || meta == 13) meta = 3;
|
||||
else if(meta == 3 || meta == 15) meta = 5;
|
||||
else if(meta == 5 || meta == 12) meta = 2;
|
||||
//get old direction
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
//remove tile from the world to prevent inventory dropping
|
||||
worldObj.removeTileEntity(xCoord, yCoord, zCoord);
|
||||
//use fillspace to create a new multiblock configuration
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.machine_assembler, dir.ordinal() + 10, 3);
|
||||
MultiblockHandlerXR.fillSpace(worldObj, xCoord, yCoord, zCoord, ((BlockDummyable) ModBlocks.machine_assembler).getDimensions(), ModBlocks.machine_assembler, dir);
|
||||
//load the tile data to restore the old values
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
this.writeToNBT(data);
|
||||
worldObj.getTileEntity(xCoord, yCoord, zCoord).readFromNBT(data);
|
||||
return;
|
||||
}
|
||||
|
||||
this.updateConnections();
|
||||
|
||||
this.consumption = 100;
|
||||
this.speed = 100;
|
||||
|
||||
upgradeManager.checkSlots(this, slots, 1, 3);
|
||||
|
||||
int speedLevel = upgradeManager.getLevel(UpgradeType.SPEED);
|
||||
int powerLevel = upgradeManager.getLevel(UpgradeType.POWER);
|
||||
int overLevel = upgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
speed -= speedLevel * 25;
|
||||
consumption += speedLevel * 300;
|
||||
speed += powerLevel * 5;
|
||||
consumption -= powerLevel * 30;
|
||||
speed /= (overLevel + 1);
|
||||
consumption *= (overLevel + 1);
|
||||
|
||||
/*int rec = -1;
|
||||
if(AssemblerRecipes.getOutputFromTempate(slots[4]) != null) {
|
||||
ComparableStack comp = ItemAssemblyTemplate.readType(slots[4]);
|
||||
rec = AssemblerRecipes.recipeList.indexOf(comp);
|
||||
}*/
|
||||
|
||||
this.networkPackNT(150);
|
||||
} else {
|
||||
|
||||
float volume = this.getVolume(2F);
|
||||
|
||||
if(isProgressing && volume > 0) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = this.createAudioLoop();
|
||||
audio.updateVolume(volume);
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
audio.updateVolume(volume);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeLong(power);
|
||||
for(int i = 0; i < getRecipeCount(); i++) {
|
||||
buf.writeInt(progress[i]);
|
||||
buf.writeInt(maxProgress[i]);
|
||||
}
|
||||
|
||||
buf.writeBoolean(isProgressing);
|
||||
buf.writeInt(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
power = buf.readLong();
|
||||
for(int i = 0; i < getRecipeCount(); i++) {
|
||||
progress[i] = buf.readInt();
|
||||
maxProgress[i] = buf.readInt();
|
||||
}
|
||||
|
||||
isProgressing = buf.readBoolean();
|
||||
recipe = buf.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.assemblerOperate", xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F);
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + rot.offsetX * 3, yCoord, zCoord + rot.offsetZ * 3, rot),
|
||||
new DirPos(xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, rot.getOpposite()),
|
||||
new DirPos(xCoord + rot.offsetX * 3 + dir.offsetX, yCoord, zCoord + rot.offsetZ * 3 + dir.offsetZ, rot),
|
||||
new DirPos(xCoord - rot.offsetX * 2 + dir.offsetX, yCoord, zCoord - rot.offsetZ * 2 + dir.offsetZ, rot.getOpposite())
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
|
||||
super.invalidate();
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
||||
private AudioWrapper audio;
|
||||
|
||||
@Override
|
||||
public int getRecipeCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTemplateIndex(int index) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSlotIndicesFromIndex(int index) {
|
||||
return new int[] {6, 17, 5};
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getInputPositions() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
return new DirPos[] {new DirPos(xCoord - dir.offsetX * 3 + rot.offsetX, yCoord, zCoord - dir.offsetZ * 3 + rot.offsetZ, dir.getOpposite())};
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getOutputPositions() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
return new DirPos[] {new DirPos(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, dir)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPowerSlot() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 100_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1).expand(2, 1, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineAssembler(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineAssembler(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_assembler));
|
||||
if(type == UpgradeType.SPEED) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 25) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 300) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.POWER) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "-" + (level * 30) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_DELAY, "+" + (level * 5) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.OVERDRIVE) {
|
||||
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<UpgradeType, Integer> getValidUpgrades() {
|
||||
HashMap<UpgradeType, Integer> upgrades = new HashMap<>();
|
||||
upgrades.put(UpgradeType.SPEED, 3);
|
||||
upgrades.put(UpgradeType.POWER, 3);
|
||||
upgrades.put(UpgradeType.OVERDRIVE, 3);
|
||||
return upgrades;
|
||||
}
|
||||
}
|
||||
@ -1,346 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateTemplate;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
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;
|
||||
|
||||
@Deprecated
|
||||
public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public int[] progress;
|
||||
public int[] maxProgress;
|
||||
public boolean isProgressing;
|
||||
public boolean[] needsTemplateSwitch;
|
||||
|
||||
int consumption = 100;
|
||||
int speed = 100;
|
||||
|
||||
public TileEntityMachineAssemblerBase(int scount) {
|
||||
super(scount);
|
||||
|
||||
int count = this.getRecipeCount();
|
||||
|
||||
progress = new int[count];
|
||||
maxProgress = new int[count];
|
||||
needsTemplateSwitch = new boolean[count];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
int count = this.getRecipeCount();
|
||||
|
||||
this.isProgressing = false;
|
||||
this.power = Library.chargeTEFromItems(slots, getPowerSlot(), power, this.getMaxPower());
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
unloadItems(i);
|
||||
loadItems(i);
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
if(!canProcess(i)) {
|
||||
this.progress[i] = 0;
|
||||
} else {
|
||||
isProgressing = true;
|
||||
process(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canProcess(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
|
||||
if(slots[template] == null || slots[template].getItem() != ModItems.assembly_template)
|
||||
return false;
|
||||
|
||||
List<AStack> recipe = AssemblerRecipes.getRecipeFromTempate(slots[template]);
|
||||
ItemStack output = AssemblerRecipes.getOutputFromTempate(slots[template]);
|
||||
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
if(this.power < this.consumption) return false;
|
||||
if(!hasRequiredItems(recipe, index)) return false;
|
||||
if(!hasSpaceForItems(output, index)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public HashMap<ItemStack[], Boolean> cachedItems = new HashMap<>();
|
||||
|
||||
private boolean hasRequiredItems(List<AStack> recipe, int index) {
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
ItemStack[] copy = ItemStackUtil.carefulCopyArrayTruncate(slots, indices[0], indices[1]);
|
||||
if (cachedItems.get(copy) != null)
|
||||
return cachedItems.get(copy);
|
||||
else {
|
||||
boolean hasItems = InventoryUtil.doesArrayHaveIngredients(slots, indices[0], indices[1], recipe.toArray(new AStack[0]));
|
||||
cachedItems.put(copy, hasItems);
|
||||
return hasItems;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasSpaceForItems(ItemStack recipe, int index) {
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
return InventoryUtil.doesArrayHaveSpace(slots, indices[2], indices[2], new ItemStack[] { recipe });
|
||||
}
|
||||
|
||||
protected void process(int index) {
|
||||
|
||||
this.power -= this.consumption;
|
||||
this.progress[index]++;
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.meteorite_sword_alloyed)
|
||||
slots[0] = new ItemStack(ModItems.meteorite_sword_machined); //fisfndmoivndlmgindgifgjfdnblfm
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
|
||||
List<AStack> recipe = AssemblerRecipes.getRecipeFromTempate(slots[template]);
|
||||
ItemStack output = AssemblerRecipes.getOutputFromTempate(slots[template]);
|
||||
int time = ItemAssemblyTemplate.getProcessTime(slots[template]);
|
||||
|
||||
this.maxProgress[index] = time * this.speed / 100;
|
||||
|
||||
if(this.progress[index] >= this.maxProgress[index]) {
|
||||
consumeItems(recipe, index);
|
||||
produceItems(output, index);
|
||||
this.progress[index] = 0;
|
||||
this.needsTemplateSwitch[index] = true;
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void consumeItems(List<AStack> recipe, int index) {
|
||||
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(AStack in : recipe) {
|
||||
if(in != null)
|
||||
InventoryUtil.tryConsumeAStack(slots, indices[0], indices[1], in);
|
||||
}
|
||||
}
|
||||
|
||||
private void produceItems(ItemStack out, int index) {
|
||||
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
if(out != null) {
|
||||
InventoryUtil.tryAddItemToInventory(slots, indices[2], indices[2], out.copy());
|
||||
}
|
||||
}
|
||||
|
||||
private void loadItems(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
|
||||
DirPos[] positions = getInputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(DirPos coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ());
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null;
|
||||
boolean templateCrate = te instanceof TileEntityCrateTemplate;
|
||||
|
||||
if(templateCrate && slots[template] == null) {
|
||||
|
||||
for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) {
|
||||
int slot = access != null ? access[i] : i;
|
||||
ItemStack stack = inv.getStackInSlot(slot);
|
||||
|
||||
if(stack != null && stack.getItem() == ModItems.assembly_template && (sided == null || sided.canExtractItem(slot, stack, 0))) {
|
||||
slots[template] = stack.copy();
|
||||
sided.setInventorySlotContents(slot, null);
|
||||
this.needsTemplateSwitch[index] = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean noTemplate = slots[template] == null || slots[template].getItem() != ModItems.assembly_template;
|
||||
|
||||
if(!noTemplate) {
|
||||
|
||||
List<AStack> recipe = AssemblerRecipes.getRecipeFromTempate(slots[template]);
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
for(AStack ingredient : recipe) {
|
||||
|
||||
int tracker = 0;
|
||||
|
||||
outer: while(!InventoryUtil.doesArrayHaveIngredients(slots, indices[0], indices[1], ingredient)) {
|
||||
|
||||
if(tracker++ > 10) break;
|
||||
|
||||
boolean found = false;
|
||||
|
||||
for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) {
|
||||
|
||||
int slot = access != null ? access[i] : i;
|
||||
ItemStack stack = inv.getStackInSlot(slot);
|
||||
if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(slot, stack, 0))) {
|
||||
found = true;
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) {
|
||||
inv.decrStackSize(slot, 1);
|
||||
slots[j].stackSize++;
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] == null) {
|
||||
slots[j] = stack.copy();
|
||||
slots[j].stackSize = 1;
|
||||
inv.decrStackSize(slot, 1);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unloadItems(int index) {
|
||||
|
||||
DirPos[] positions = getOutputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(DirPos coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ());
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null;
|
||||
|
||||
int i = indices[2];
|
||||
ItemStack out = slots[i];
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
if(this.needsTemplateSwitch[index] && te instanceof TileEntityCrateTemplate && slots[template] != null) {
|
||||
out = slots[template];
|
||||
i = template;
|
||||
}
|
||||
|
||||
if(out != null) {
|
||||
|
||||
for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) {
|
||||
|
||||
int slot = access != null ? access[j] : j;
|
||||
|
||||
if(!(sided != null ? sided.canInsertItem(slot, out, coord.getDir().ordinal()) : inv.isItemValidForSlot(slot, out)))
|
||||
continue;
|
||||
|
||||
ItemStack target = inv.getStackInSlot(slot);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize() && target.stackSize < inv.getInventoryStackLimit()) {
|
||||
this.decrStackSize(i, 1);
|
||||
target.stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) {
|
||||
|
||||
int slot = access != null ? access[j] : j;
|
||||
|
||||
if(!inv.isItemValidForSlot(slot, out))
|
||||
continue;
|
||||
|
||||
if(inv.getStackInSlot(slot) == null && (sided != null ? sided.canInsertItem(slot, out, coord.getDir().ordinal()) : inv.isItemValidForSlot(slot, out))) {
|
||||
ItemStack copy = out.copy();
|
||||
copy.stackSize = 1;
|
||||
inv.setInventorySlotContents(slot, copy);
|
||||
this.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
if(nbt.hasKey("progress")) this.progress = nbt.getIntArray("progress");
|
||||
if(nbt.hasKey("maxProgress")) this.maxProgress = nbt.getIntArray("maxProgress");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setLong("power", power);
|
||||
nbt.setIntArray("progress", progress);
|
||||
nbt.setIntArray("maxProgress", maxProgress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public abstract int getRecipeCount();
|
||||
public abstract int getTemplateIndex(int index);
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return A size 3 int array containing min input, max input and output indices in that order.
|
||||
*/
|
||||
public abstract int[] getSlotIndicesFromIndex(int index);
|
||||
public abstract DirPos[] getInputPositions();
|
||||
public abstract DirPos[] getOutputPositions();
|
||||
public abstract int getPowerSlot();
|
||||
}
|
||||
@ -1,475 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.UpgradeManagerNT;
|
||||
import com.hbm.inventory.container.ContainerAssemfac;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIAssemfac;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase implements IFluidStandardTransceiver, IUpgradeInfoProvider, IFluidCopiable {
|
||||
|
||||
public AssemblerArm[] arms;
|
||||
|
||||
public FluidTank water;
|
||||
public FluidTank steam;
|
||||
|
||||
public UpgradeManagerNT upgradeManager = new UpgradeManagerNT();
|
||||
|
||||
public TileEntityMachineAssemfac() {
|
||||
super(14 * 8 + 4 + 1); //8 assembler groups with 14 slots, 4 upgrade slots, 1 battery slot
|
||||
|
||||
arms = new AssemblerArm[6];
|
||||
for(int i = 0; i < arms.length; i++) {
|
||||
arms[i] = new AssemblerArm(i % 3 == 1 ? 1 : 0); //the second of every group of three becomes a welder
|
||||
}
|
||||
|
||||
water = new FluidTank(Fluids.WATER, 64_000);
|
||||
steam = new FluidTank(Fluids.SPENTSTEAM, 64_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.assemfac";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack stack) {
|
||||
super.setInventorySlotContents(i, stack);
|
||||
|
||||
if(stack != null && i >= 1 && i <= 4 && stack.getItem() instanceof ItemMachineUpgrade) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
this.speed = 100;
|
||||
this.consumption = 100;
|
||||
|
||||
upgradeManager.checkSlots(this, slots, 1, 4);
|
||||
|
||||
int speedLevel = upgradeManager.getLevel(UpgradeType.SPEED);
|
||||
int powerLevel = upgradeManager.getLevel(UpgradeType.POWER);
|
||||
int overLevel = upgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
this.speed -= speedLevel * 15;
|
||||
this.consumption += speedLevel * 300;
|
||||
this.speed += powerLevel * 5;
|
||||
this.consumption -= powerLevel * 30;
|
||||
this.speed /= (overLevel + 1);
|
||||
this.consumption *= (overLevel + 1);
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
this.networkPackNT(150);
|
||||
|
||||
} else {
|
||||
|
||||
for(AssemblerArm arm : arms) {
|
||||
arm.updateInterp();
|
||||
if(isProgressing) {
|
||||
arm.updateArm();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeLong(power);
|
||||
for(int i = 0; i < getRecipeCount(); i++) {
|
||||
buf.writeInt(progress[i]);
|
||||
buf.writeInt(maxProgress[i]);
|
||||
}
|
||||
buf.writeBoolean(isProgressing);
|
||||
water.serialize(buf);
|
||||
steam.serialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
power = buf.readLong();
|
||||
for(int i = 0; i < getRecipeCount(); i++) {
|
||||
progress[i] = buf.readInt();
|
||||
maxProgress[i] = buf.readInt();
|
||||
}
|
||||
isProgressing = buf.readBoolean();
|
||||
water.deserialize(buf);
|
||||
steam.deserialize(buf);
|
||||
}
|
||||
|
||||
private int getWaterRequired() {
|
||||
return 1000 / this.speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canProcess(int index) {
|
||||
return super.canProcess(index) && this.water.getFill() >= getWaterRequired() && this.steam.getFill() + getWaterRequired() <= this.steam.getMaxFill();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void process(int index) {
|
||||
super.process(index);
|
||||
this.water.setFill(this.water.getFill() - getWaterRequired());
|
||||
this.steam.setFill(this.steam.getFill() + getWaterRequired());
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord - dir.offsetX * 3 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 3 + rot.offsetZ * 5, rot),
|
||||
new DirPos(xCoord + dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 5, rot),
|
||||
new DirPos(xCoord - dir.offsetX * 3 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 3 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 5 + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 3, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 5 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 4 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 3, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 4 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 2, dir)
|
||||
};
|
||||
}
|
||||
|
||||
public static class AssemblerArm {
|
||||
public double[] angles = new double[4];
|
||||
public double[] prevAngles = new double[4];
|
||||
public double[] targetAngles = new double[4];
|
||||
public double[] speed = new double[4];
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
int actionMode;
|
||||
ArmActionState state;
|
||||
int actionDelay = 0;
|
||||
|
||||
public AssemblerArm(int actionMode) {
|
||||
this.actionMode = actionMode;
|
||||
|
||||
if(this.actionMode == 0) {
|
||||
speed[0] = 15; //Pivot
|
||||
speed[1] = 15; //Arm
|
||||
speed[2] = 15; //Piston
|
||||
speed[3] = 0.5; //Striker
|
||||
} else if(this.actionMode == 1) {
|
||||
speed[0] = 3; //Pivot
|
||||
speed[1] = 3; //Arm
|
||||
speed[2] = 1; //Piston
|
||||
speed[3] = 0.125; //Striker
|
||||
}
|
||||
|
||||
state = ArmActionState.ASSUME_POSITION;
|
||||
chooseNewArmPoistion();
|
||||
actionDelay = rand.nextInt(20);
|
||||
}
|
||||
|
||||
public void updateArm() {
|
||||
|
||||
if(actionDelay > 0) {
|
||||
actionDelay--;
|
||||
return;
|
||||
}
|
||||
|
||||
switch(state) {
|
||||
//Move. If done moving, set a delay and progress to EXTEND
|
||||
case ASSUME_POSITION:
|
||||
if(move()) {
|
||||
if(this.actionMode == 0) {
|
||||
actionDelay = 2;
|
||||
} else if(this.actionMode == 1) {
|
||||
actionDelay = 10;
|
||||
}
|
||||
state = ArmActionState.EXTEND_STRIKER;
|
||||
targetAngles[3] = 1D;
|
||||
}
|
||||
break;
|
||||
case EXTEND_STRIKER:
|
||||
if(move()) {
|
||||
if(this.actionMode == 0) {
|
||||
state = ArmActionState.RETRACT_STRIKER;
|
||||
targetAngles[3] = 0D;
|
||||
} else if(this.actionMode == 1) {
|
||||
state = ArmActionState.WELD;
|
||||
targetAngles[2] -= 20;
|
||||
actionDelay = 5 + rand.nextInt(5);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WELD:
|
||||
if(move()) {
|
||||
state = ArmActionState.RETRACT_STRIKER;
|
||||
targetAngles[3] = 0D;
|
||||
actionDelay = 10 + rand.nextInt(5);
|
||||
}
|
||||
break;
|
||||
case RETRACT_STRIKER:
|
||||
if(move()) {
|
||||
if(this.actionMode == 0) {
|
||||
actionDelay = 2 + rand.nextInt(5);
|
||||
} else if(this.actionMode == 1) {
|
||||
actionDelay = 5 + rand.nextInt(3);
|
||||
}
|
||||
chooseNewArmPoistion();
|
||||
state = ArmActionState.ASSUME_POSITION;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void chooseNewArmPoistion() {
|
||||
|
||||
if(this.actionMode == 0) {
|
||||
targetAngles[0] = -rand.nextInt(50); //Pivot
|
||||
targetAngles[1] = -targetAngles[0]; //Arm
|
||||
targetAngles[2] = rand.nextInt(30) - 15; //Piston
|
||||
} else if(this.actionMode == 1) {
|
||||
targetAngles[0] = -rand.nextInt(30) + 10; //Pivot
|
||||
targetAngles[1] = -targetAngles[0]; //Arm
|
||||
targetAngles[2] = rand.nextInt(10) + 10; //Piston
|
||||
}
|
||||
}
|
||||
|
||||
private void updateInterp() {
|
||||
for(int i = 0; i < angles.length; i++) {
|
||||
prevAngles[i] = angles[i];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True when it has finished moving
|
||||
*/
|
||||
private boolean move() {
|
||||
boolean didMove = false;
|
||||
|
||||
for(int i = 0; i < angles.length; i++) {
|
||||
if(angles[i] == targetAngles[i])
|
||||
continue;
|
||||
|
||||
didMove = true;
|
||||
|
||||
double angle = angles[i];
|
||||
double target = targetAngles[i];
|
||||
double turn = speed[i];
|
||||
double delta = Math.abs(angle - target);
|
||||
|
||||
if(delta <= turn) {
|
||||
angles[i] = targetAngles[i];
|
||||
continue;
|
||||
}
|
||||
|
||||
if(angle < target) {
|
||||
angles[i] += turn;
|
||||
} else {
|
||||
angles[i] -= turn;
|
||||
}
|
||||
}
|
||||
|
||||
return !didMove;
|
||||
}
|
||||
|
||||
public static enum ArmActionState {
|
||||
ASSUME_POSITION,
|
||||
EXTEND_STRIKER,
|
||||
WELD,
|
||||
RETRACT_STRIKER
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 5,
|
||||
yCoord,
|
||||
zCoord - 5,
|
||||
xCoord + 5,
|
||||
yCoord + 4,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10_000_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeCount() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTemplateIndex(int index) {
|
||||
return 17 + index * 14;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSlotIndicesFromIndex(int index) {
|
||||
return new int[] { 5 + index * 14, 16 + index * 14, 18 + index * 14};
|
||||
}
|
||||
|
||||
DirPos[] inpos;
|
||||
DirPos[] outpos;
|
||||
|
||||
@Override
|
||||
public DirPos[] getInputPositions() {
|
||||
|
||||
if(inpos != null)
|
||||
return inpos;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
inpos = new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 4 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 1, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 1 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 5, rot)
|
||||
};
|
||||
|
||||
return inpos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getOutputPositions() {
|
||||
|
||||
if(outpos != null)
|
||||
return outpos;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
outpos = new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 4 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 2, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 5 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 1, dir.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 1 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 5, rot)
|
||||
};
|
||||
|
||||
return outpos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPowerSlot() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { steam };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { water };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[] { water, steam };
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerAssemfac(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIAssemfac(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_assemfac));
|
||||
if(type == UpgradeType.SPEED) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 15) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 300) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.POWER) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "-" + (level * 30) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_DELAY, "+" + (level * 5) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.OVERDRIVE) {
|
||||
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<UpgradeType, Integer> getValidUpgrades() {
|
||||
HashMap<UpgradeType, Integer> upgrades = new HashMap<>();
|
||||
upgrades.put(UpgradeType.SPEED, 6);
|
||||
upgrades.put(UpgradeType.POWER, 3);
|
||||
upgrades.put(UpgradeType.OVERDRIVE, 12);
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank getTankToPaste() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,402 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.UpgradeManagerNT;
|
||||
import com.hbm.inventory.container.ContainerChemfac;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIChemfac;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase implements IUpgradeInfoProvider, IFluidCopiable {
|
||||
|
||||
float rotSpeed;
|
||||
public float rot;
|
||||
public float prevRot;
|
||||
|
||||
public FluidTank water;
|
||||
public FluidTank steam;
|
||||
|
||||
public UpgradeManagerNT upgradeManager = new UpgradeManagerNT();
|
||||
|
||||
public TileEntityMachineChemfac() {
|
||||
super(77);
|
||||
|
||||
water = new FluidTank(Fluids.WATER, 64_000);
|
||||
steam = new FluidTank(Fluids.SPENTSTEAM, 64_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack stack) {
|
||||
super.setInventorySlotContents(i, stack);
|
||||
|
||||
if(stack != null && i >= 1 && i <= 4 && stack.getItem() instanceof ItemMachineUpgrade) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 60 == 0) {
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
|
||||
for(FluidTank tank : inTanks()) {
|
||||
if(tank.getTankType() != Fluids.NONE) {
|
||||
this.trySubscribe(tank.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(DirPos pos : getConPos()) for(FluidTank tank : outTanks()) {
|
||||
if(tank.getTankType() != Fluids.NONE && tank.getFill() > 0) {
|
||||
this.tryProvide(tank, worldObj, pos);
|
||||
}
|
||||
}
|
||||
|
||||
this.speed = 100;
|
||||
this.consumption = 100;
|
||||
|
||||
upgradeManager.checkSlots(this, slots, 1, 4);
|
||||
|
||||
int speedLevel = upgradeManager.getLevel(UpgradeType.SPEED);
|
||||
int powerLevel = upgradeManager.getLevel(UpgradeType.POWER);
|
||||
int overLevel = upgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
this.speed -= speedLevel * 15;
|
||||
this.consumption += speedLevel * 300;
|
||||
this.speed += powerLevel * 5;
|
||||
this.consumption -= powerLevel * 20;
|
||||
this.speed /= (overLevel + 1);
|
||||
this.consumption *= (overLevel + 1);
|
||||
|
||||
if(this.speed <= 0) {
|
||||
this.speed = 1;
|
||||
}
|
||||
|
||||
this.networkPackNT(150);
|
||||
} else {
|
||||
|
||||
float maxSpeed = 30F;
|
||||
|
||||
if(isProgressing) {
|
||||
|
||||
rotSpeed += 0.1;
|
||||
|
||||
if(rotSpeed > maxSpeed)
|
||||
rotSpeed = maxSpeed;
|
||||
|
||||
if(rotSpeed == maxSpeed && this.worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
Random rand = worldObj.rand;
|
||||
|
||||
double x = xCoord + 0.5 - rot.offsetX * 0.5;
|
||||
double y = yCoord + 3;
|
||||
double z = zCoord + 0.5 - rot.offsetZ * 0.5;
|
||||
|
||||
worldObj.spawnParticle("cloud", x + dir.offsetX * 1.5 + rand.nextGaussian() * 0.15, y, z + dir.offsetZ * 1.5 + rand.nextGaussian() * 0.15, 0.0, 0.15, 0.0);
|
||||
worldObj.spawnParticle("cloud", x - dir.offsetX * 0.5 + rand.nextGaussian() * 0.15, y, z - dir.offsetZ * 0.5 + rand.nextGaussian() * 0.15, 0.0, 0.15, 0.0);
|
||||
}
|
||||
} else {
|
||||
|
||||
rotSpeed -= 0.1;
|
||||
|
||||
if(rotSpeed < 0)
|
||||
rotSpeed = 0;
|
||||
}
|
||||
|
||||
prevRot = rot;
|
||||
|
||||
rot += rotSpeed;
|
||||
|
||||
if(rot >= 360) {
|
||||
rot -= 360;
|
||||
prevRot -= 360;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeLong(power);
|
||||
for(int i = 0; i < getRecipeCount(); i++) {
|
||||
buf.writeInt(progress[i]);
|
||||
buf.writeInt(maxProgress[i]);
|
||||
}
|
||||
|
||||
buf.writeBoolean(isProgressing);
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) tanks[i].serialize(buf);
|
||||
|
||||
water.serialize(buf);
|
||||
steam.serialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
power = buf.readLong();
|
||||
for(int i = 0; i < getRecipeCount(); i++) {
|
||||
progress[i] = buf.readInt();
|
||||
maxProgress[i] = buf.readInt();
|
||||
}
|
||||
|
||||
isProgressing = buf.readBoolean();
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) tanks[i].deserialize(buf);
|
||||
|
||||
water.deserialize(buf);
|
||||
steam.deserialize(buf);
|
||||
}
|
||||
|
||||
private int getWaterRequired() {
|
||||
return 1000 / this.speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canProcess(int index) {
|
||||
return super.canProcess(index) && this.water.getFill() >= getWaterRequired() && this.steam.getFill() + getWaterRequired() <= this.steam.getMaxFill();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void process(int index) {
|
||||
super.process(index);
|
||||
this.water.setFill(this.water.getFill() - getWaterRequired());
|
||||
this.steam.setFill(this.steam.getFill() + getWaterRequired());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10_000_000;
|
||||
}
|
||||
|
||||
protected List<DirPos> conPos;
|
||||
|
||||
protected List<DirPos> getConPos() {
|
||||
|
||||
if(conPos != null && !conPos.isEmpty())
|
||||
return conPos;
|
||||
|
||||
conPos = new ArrayList();
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
conPos.add(new DirPos(xCoord + dir.offsetX * (3 - i) + rot.offsetX * 3, yCoord + 4, zCoord + dir.offsetZ * (3 - i) + rot.offsetZ * 3, Library.POS_Y));
|
||||
conPos.add(new DirPos(xCoord + dir.offsetX * (3 - i) - rot.offsetX * 2, yCoord + 4, zCoord + dir.offsetZ * (3 - i) - rot.offsetZ * 2, Library.POS_Y));
|
||||
|
||||
for(int j = 0; j < 2; j++) {
|
||||
conPos.add(new DirPos(xCoord + dir.offsetX * (3 - i) + rot.offsetX * 5, yCoord + 1 + j, zCoord + dir.offsetZ * (3 - i) + rot.offsetZ * 5, rot));
|
||||
conPos.add(new DirPos(xCoord + dir.offsetX * (3 - i) - rot.offsetX * 4, yCoord + 1 + j, zCoord + dir.offsetZ * (3 - i) - rot.offsetZ * 4, rot.getOpposite()));
|
||||
}
|
||||
}
|
||||
|
||||
return conPos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeCount() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTankCapacity() {
|
||||
return 32_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTemplateIndex(int index) {
|
||||
return 13 + index * 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSlotIndicesFromIndex(int index) {
|
||||
return new int[] {5 + index * 9, 8 + index * 9, 9 + index * 9, 12 + index * 9};
|
||||
}
|
||||
|
||||
DirPos[] inpos;
|
||||
DirPos[] outpos;
|
||||
|
||||
@Override
|
||||
public DirPos[] getInputPositions() {
|
||||
|
||||
if(inpos != null)
|
||||
return inpos;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
inpos = new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 4 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 1, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 1 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 5, rot)
|
||||
};
|
||||
|
||||
return inpos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getOutputPositions() {
|
||||
|
||||
if(outpos != null)
|
||||
return outpos;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
outpos = new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 4 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 2, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 5 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 1, dir.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 1 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 5, rot)
|
||||
};
|
||||
|
||||
return outpos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
water.readFromNBT(nbt, "w");
|
||||
steam.readFromNBT(nbt, "s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
water.writeToNBT(nbt, "w");
|
||||
steam.writeToNBT(nbt, "s");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineChemFac";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<FluidTank> inTanks() {
|
||||
|
||||
List<FluidTank> inTanks = super.inTanks();
|
||||
inTanks.add(water);
|
||||
|
||||
return inTanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<FluidTank> outTanks() {
|
||||
|
||||
List<FluidTank> outTanks = super.outTanks();
|
||||
outTanks.add(steam);
|
||||
|
||||
return outTanks;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 5,
|
||||
yCoord,
|
||||
zCoord - 5,
|
||||
xCoord + 5,
|
||||
yCoord + 4,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerChemfac(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIChemfac(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_chemfac));
|
||||
if(type == UpgradeType.SPEED) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 15) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 300) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.POWER) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "-" + (level * 30) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_DELAY, "+" + (level * 5) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.OVERDRIVE) {
|
||||
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<UpgradeType, Integer> getValidUpgrades() {
|
||||
HashMap<UpgradeType, Integer> upgrades = new HashMap<>();
|
||||
upgrades.put(UpgradeType.SPEED, 6);
|
||||
upgrades.put(UpgradeType.POWER, 3);
|
||||
upgrades.put(UpgradeType.OVERDRIVE, 12);
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank getTankToPaste() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,615 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.UpgradeManagerNT;
|
||||
import com.hbm.inventory.container.ContainerMachineChemplant;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIMachineChemplant;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
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.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class TileEntityMachineChemplant extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver, IGUIProvider, IUpgradeInfoProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
public int progress;
|
||||
public int maxProgress = 100;
|
||||
public boolean isProgressing;
|
||||
|
||||
private AudioWrapper audio;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
//upgraded stats
|
||||
int consumption = 100;
|
||||
int speed = 100;
|
||||
|
||||
public UpgradeManagerNT upgradeManager = new UpgradeManagerNT();
|
||||
|
||||
public TileEntityMachineChemplant() {
|
||||
super(21);
|
||||
/*
|
||||
* 0 Battery
|
||||
* 1-3 Upgrades
|
||||
* 4 Schematic
|
||||
* 5-8 Output
|
||||
* 9-10 FOut In
|
||||
* 11-12 FOut Out
|
||||
* 13-16 Input
|
||||
* 17-18 FIn In
|
||||
* 19-20 FIn Out
|
||||
*/
|
||||
|
||||
tanks = new FluidTank[4];
|
||||
for(int i = 0; i < 4; i++) {
|
||||
tanks[i] = new FluidTank(Fluids.NONE, 24_000);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.chemplant";
|
||||
}
|
||||
|
||||
// last successful load
|
||||
int lsl0 = 0;
|
||||
int lsl1 = 0;
|
||||
int lsu0 = 0;
|
||||
int lsu1 = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.speed = 100;
|
||||
this.consumption = 100;
|
||||
|
||||
this.isProgressing = false;
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
int fluidDelay = 40;
|
||||
|
||||
if(lsu0 >= fluidDelay && tanks[0].loadTank(17, 19, slots)) lsl0 = 0;
|
||||
if(lsu1 >= fluidDelay && tanks[1].loadTank(18, 20, slots)) lsl1 = 0;
|
||||
|
||||
if(lsl0 >= fluidDelay && slots[17] != null && !FluidTank.noDualUnload.contains(slots[17].getItem())) if(tanks[0].unloadTank(17, 19, slots)) lsu0 = 0;
|
||||
if(lsl1 >= fluidDelay && slots[18] != null && !FluidTank.noDualUnload.contains(slots[18].getItem())) if(tanks[1].unloadTank(18, 20, slots)) lsu1 = 0;
|
||||
|
||||
tanks[2].unloadTank(9, 11, slots);
|
||||
tanks[3].unloadTank(10, 12, slots);
|
||||
|
||||
if(lsl0 < fluidDelay) lsl0++;
|
||||
if(lsl1 < fluidDelay) lsl1++;
|
||||
if(lsu0 < fluidDelay) lsu0++;
|
||||
if(lsu1 < fluidDelay) lsu1++;
|
||||
|
||||
loadItems();
|
||||
unloadItems();
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
if(tanks[2].getFill() > 0) this.sendFluid(tanks[2], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
if(tanks[3].getFill() > 0) this.sendFluid(tanks[3], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
upgradeManager.checkSlots(this, slots, 1, 3);
|
||||
|
||||
int speedLevel = upgradeManager.getLevel(UpgradeType.SPEED);
|
||||
int powerLevel = upgradeManager.getLevel(UpgradeType.POWER);
|
||||
int overLevel = upgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
this.speed -= speedLevel * 25;
|
||||
this.consumption += speedLevel * 300;
|
||||
this.speed += powerLevel * 5;
|
||||
this.consumption -= powerLevel * 20;
|
||||
this.speed /= (overLevel + 1);
|
||||
this.consumption *= (overLevel + 1);
|
||||
|
||||
if(this.speed <= 0) {
|
||||
this.speed = 1;
|
||||
}
|
||||
|
||||
if(!canProcess()) {
|
||||
this.progress = 0;
|
||||
} else {
|
||||
isProgressing = true;
|
||||
process();
|
||||
}
|
||||
|
||||
this.networkPackNT(150);
|
||||
} else {
|
||||
|
||||
if(isProgressing && this.worldObj.getTotalWorldTime() % 3 == 0) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
double x = xCoord + 0.5 + dir.offsetX * 1.125 + rot.offsetX * 0.125;
|
||||
double y = yCoord + 3;
|
||||
double z = zCoord + 0.5 + dir.offsetZ * 1.125 + rot.offsetZ * 0.125;
|
||||
worldObj.spawnParticle("cloud", x, y, z, 0.0, 0.1, 0.0);
|
||||
}
|
||||
|
||||
float volume = this.getVolume(1F);
|
||||
|
||||
if(isProgressing && volume > 0) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = createAudioLoop();
|
||||
audio.updateVolume(volume);
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
audio.updateVolume(volume);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeLong(power);
|
||||
buf.writeInt(progress);
|
||||
buf.writeInt(maxProgress);
|
||||
buf.writeBoolean(isProgressing);
|
||||
|
||||
for(int i = 0; i < tanks.length; i++)
|
||||
tanks[i].serialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
power = buf.readLong();
|
||||
progress = buf.readInt();
|
||||
maxProgress = buf.readInt();
|
||||
isProgressing = buf.readBoolean();
|
||||
|
||||
for(int i = 0; i < tanks.length; i++)
|
||||
tanks[i].deserialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.chemplantOperate", xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
|
||||
super.invalidate();
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tanks[1].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + rot.offsetX * 3, yCoord, zCoord + rot.offsetZ * 3, rot),
|
||||
new DirPos(xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, rot.getOpposite()),
|
||||
new DirPos(xCoord + rot.offsetX * 3 + dir.offsetX, yCoord, zCoord + rot.offsetZ * 3 + dir.offsetZ, rot),
|
||||
new DirPos(xCoord - rot.offsetX * 2 + dir.offsetX, yCoord, zCoord - rot.offsetZ * 2 + dir.offsetZ, rot.getOpposite())
|
||||
};
|
||||
}
|
||||
|
||||
private boolean canProcess() {
|
||||
|
||||
if(slots[4] == null || slots[4].getItem() != ModItems.chemistry_template)
|
||||
return false;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
setupTanks(recipe);
|
||||
|
||||
if(this.power < this.consumption) return false;
|
||||
if(!hasRequiredFluids(recipe)) return false;
|
||||
if(!hasSpaceForFluids(recipe)) return false;
|
||||
if(!hasRequiredItems(recipe)) return false;
|
||||
if(!hasSpaceForItems(recipe)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setupTanks(ChemRecipe recipe) {
|
||||
if(recipe.inputFluids[0] != null) tanks[0].withPressure(recipe.inputFluids[0].pressure).setTankType(recipe.inputFluids[0].type); else tanks[0].setTankType(Fluids.NONE);
|
||||
if(recipe.inputFluids[1] != null) tanks[1].withPressure(recipe.inputFluids[1].pressure).setTankType(recipe.inputFluids[1].type); else tanks[1].setTankType(Fluids.NONE);
|
||||
if(recipe.outputFluids[0] != null) tanks[2].withPressure(recipe.outputFluids[0].pressure).setTankType(recipe.outputFluids[0].type); else tanks[2].setTankType(Fluids.NONE);
|
||||
if(recipe.outputFluids[1] != null) tanks[3].withPressure(recipe.outputFluids[1].pressure).setTankType(recipe.outputFluids[1].type); else tanks[3].setTankType(Fluids.NONE);
|
||||
}
|
||||
|
||||
private boolean hasRequiredFluids(ChemRecipe recipe) {
|
||||
if(recipe.inputFluids[0] != null && tanks[0].getFill() < recipe.inputFluids[0].fill) return false;
|
||||
if(recipe.inputFluids[1] != null && tanks[1].getFill() < recipe.inputFluids[1].fill) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasSpaceForFluids(ChemRecipe recipe) {
|
||||
if(recipe.outputFluids[0] != null && tanks[2].getFill() + recipe.outputFluids[0].fill > tanks[2].getMaxFill()) return false;
|
||||
if(recipe.outputFluids[1] != null && tanks[3].getFill() + recipe.outputFluids[1].fill > tanks[3].getMaxFill()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasRequiredItems(ChemRecipe recipe) {
|
||||
return InventoryUtil.doesArrayHaveIngredients(slots, 13, 16, recipe.inputs);
|
||||
}
|
||||
|
||||
private boolean hasSpaceForItems(ChemRecipe recipe) {
|
||||
return InventoryUtil.doesArrayHaveSpace(slots, 5, 8, recipe.outputs);
|
||||
}
|
||||
|
||||
private void process() {
|
||||
|
||||
this.power -= this.consumption;
|
||||
this.progress++;
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.meteorite_sword_machined)
|
||||
slots[0] = new ItemStack(ModItems.meteorite_sword_treated); //fisfndmoivndlmgindgifgjfdnblfm
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
this.maxProgress = recipe.getDuration() * this.speed / 100;
|
||||
|
||||
if(maxProgress <= 0) maxProgress = 1;
|
||||
|
||||
if(this.progress >= this.maxProgress) {
|
||||
consumeFluids(recipe);
|
||||
produceFluids(recipe);
|
||||
consumeItems(recipe);
|
||||
produceItems(recipe);
|
||||
this.progress = 0;
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void consumeFluids(ChemRecipe recipe) {
|
||||
if(recipe.inputFluids[0] != null) tanks[0].setFill(tanks[0].getFill() - recipe.inputFluids[0].fill);
|
||||
if(recipe.inputFluids[1] != null) tanks[1].setFill(tanks[1].getFill() - recipe.inputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void produceFluids(ChemRecipe recipe) {
|
||||
if(recipe.outputFluids[0] != null) tanks[2].setFill(tanks[2].getFill() + recipe.outputFluids[0].fill);
|
||||
if(recipe.outputFluids[1] != null) tanks[3].setFill(tanks[3].getFill() + recipe.outputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void consumeItems(ChemRecipe recipe) {
|
||||
|
||||
for(AStack in : recipe.inputs) {
|
||||
if(in != null)
|
||||
InventoryUtil.tryConsumeAStack(slots, 13, 16, in);
|
||||
}
|
||||
}
|
||||
|
||||
private void produceItems(ChemRecipe recipe) {
|
||||
|
||||
for(ItemStack out : recipe.outputs) {
|
||||
if(out != null)
|
||||
InventoryUtil.tryAddItemToInventory(slots, 5, 8, out.copy());
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: move this into a util class
|
||||
private void loadItems() {
|
||||
|
||||
if(slots[4] == null || slots[4].getItem() != ModItems.chemistry_template)
|
||||
return;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
|
||||
int x = xCoord - dir.offsetX * 2;
|
||||
int z = zCoord - dir.offsetZ * 2;
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(x, yCoord, z);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(dir.ordinal()) : null;
|
||||
|
||||
for(AStack ingredient : recipe.inputs) {
|
||||
|
||||
outer:
|
||||
while(!InventoryUtil.doesArrayHaveIngredients(slots, 13, 16, ingredient)) {
|
||||
|
||||
boolean found = false;
|
||||
|
||||
for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) {
|
||||
|
||||
int slot = access != null ? access[i] : i;
|
||||
ItemStack stack = inv.getStackInSlot(slot);
|
||||
|
||||
if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(slot, stack, 0))) {
|
||||
|
||||
for(int j = 13; j <= 16; j++) {
|
||||
|
||||
if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) {
|
||||
inv.decrStackSize(slot, 1);
|
||||
slots[j].stackSize++;
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 13; j <= 16; j++) {
|
||||
|
||||
if(slots[j] == null) {
|
||||
slots[j] = stack.copy();
|
||||
slots[j].stackSize = 1;
|
||||
inv.decrStackSize(slot, 1);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unloadItems() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
int x = xCoord + dir.offsetX * 3 + rot.offsetX;
|
||||
int z = zCoord + dir.offsetZ * 3 + rot.offsetZ;
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(x, yCoord, z);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(dir.ordinal()) : null;
|
||||
|
||||
boolean shouldOutput = true;
|
||||
|
||||
while(shouldOutput) {
|
||||
shouldOutput = false;
|
||||
outer:
|
||||
for(int i = 5; i <= 8; i++) {
|
||||
|
||||
ItemStack out = slots[i];
|
||||
|
||||
if(out != null) {
|
||||
|
||||
for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) {
|
||||
|
||||
int slot = access != null ? access[j] : j;
|
||||
|
||||
if(!inv.isItemValidForSlot(slot, out))
|
||||
continue;
|
||||
|
||||
ItemStack target = inv.getStackInSlot(slot);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < Math.min(target.getMaxStackSize(), inv.getInventoryStackLimit())) {
|
||||
int toDec = Math.min(out.stackSize, Math.min(target.getMaxStackSize(), inv.getInventoryStackLimit()) - target.stackSize);
|
||||
this.decrStackSize(i, toDec);
|
||||
target.stackSize += toDec;
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) {
|
||||
|
||||
int slot = access != null ? access[j] : j;
|
||||
|
||||
if(!inv.isItemValidForSlot(slot, out))
|
||||
continue;
|
||||
|
||||
if(inv.getStackInSlot(slot) == null && (sided != null ? sided.canInsertItem(slot, out, dir.ordinal()) : inv.isItemValidForSlot(slot, out))) {
|
||||
ItemStack copy = out.copy();
|
||||
copy.stackSize = 1;
|
||||
inv.setInventorySlotContents(slot, copy);
|
||||
this.decrStackSize(i, 1);
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].readFromNBT(nbt, "t" + i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setLong("power", power);
|
||||
nbt.setInteger("progress", progress);
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].writeToNBT(nbt, "t" + i);
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 4,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] {tanks[2], tanks[3]};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] {tanks[0], tanks[1]};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineChemplant(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineChemplant(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_chemplant));
|
||||
if(type == UpgradeType.SPEED) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(KEY_DELAY, "-" + (level * 25) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(KEY_CONSUMPTION, "+" + (level * 300) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.POWER) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(KEY_CONSUMPTION, "-" + (level * 30) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(KEY_DELAY, "+" + (level * 5) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.OVERDRIVE) {
|
||||
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<UpgradeType, Integer> getValidUpgrades() {
|
||||
HashMap<UpgradeType, Integer> upgrades = new HashMap<>();
|
||||
upgrades.put(UpgradeType.SPEED, 3);
|
||||
upgrades.put(UpgradeType.POWER, 3);
|
||||
upgrades.put(UpgradeType.OVERDRIVE, 9);
|
||||
return upgrades;
|
||||
}
|
||||
}
|
||||
@ -1,427 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||
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;
|
||||
|
||||
/**
|
||||
* Base class for single and multi chemplants.
|
||||
* Most stuff should be handled by this class automatically, given the slots and indices are defined correctly
|
||||
* Does not sync automatically, nor handle upgrades
|
||||
* Slot indices are mostly free game, but battery has to be slot 0
|
||||
* Tanks follow the order R1(I1, I2, O1, O2), R2(I1, I2, O1, O2) ...
|
||||
* @author hbm
|
||||
*/
|
||||
public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public int[] progress;
|
||||
public int[] maxProgress;
|
||||
public boolean isProgressing;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
int consumption = 100;
|
||||
int speed = 100;
|
||||
|
||||
public TileEntityMachineChemplantBase(int scount) {
|
||||
super(scount);
|
||||
|
||||
int count = this.getRecipeCount();
|
||||
|
||||
progress = new int[count];
|
||||
maxProgress = new int[count];
|
||||
|
||||
tanks = new FluidTank[4 * count];
|
||||
for(int i = 0; i < 4 * count; i++) {
|
||||
tanks[i] = new FluidTank(Fluids.NONE, getTankCapacity());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
int count = this.getRecipeCount();
|
||||
|
||||
this.isProgressing = false;
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
loadItems(i);
|
||||
unloadItems(i);
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
if(!canProcess(i)) {
|
||||
this.progress[i] = 0;
|
||||
} else {
|
||||
isProgressing = true;
|
||||
process(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canProcess(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
|
||||
if(slots[template] == null || slots[template].getItem() != ModItems.chemistry_template)
|
||||
return false;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[template].getItemDamage());
|
||||
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
setupTanks(recipe, index);
|
||||
|
||||
if(this.power < this.consumption) return false;
|
||||
if(!hasRequiredFluids(recipe, index)) return false;
|
||||
if(!hasSpaceForFluids(recipe, index)) return false;
|
||||
if(!hasRequiredItems(recipe, index)) return false;
|
||||
if(!hasSpaceForItems(recipe, index)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setupTanks(ChemRecipe recipe, int index) {
|
||||
if(recipe.inputFluids[0] != null) tanks[index * 4].withPressure(recipe.inputFluids[0].pressure).setTankType(recipe.inputFluids[0].type); else tanks[index * 4].setTankType(Fluids.NONE);
|
||||
if(recipe.inputFluids[1] != null) tanks[index * 4 + 1].withPressure(recipe.inputFluids[1].pressure).setTankType(recipe.inputFluids[1].type); else tanks[index * 4 + 1].setTankType(Fluids.NONE);
|
||||
if(recipe.outputFluids[0] != null) tanks[index * 4 + 2].withPressure(recipe.outputFluids[0].pressure).setTankType(recipe.outputFluids[0].type); else tanks[index * 4 + 2].setTankType(Fluids.NONE);
|
||||
if(recipe.outputFluids[1] != null) tanks[index * 4 + 3].withPressure(recipe.outputFluids[1].pressure).setTankType(recipe.outputFluids[1].type); else tanks[index * 4 + 3].setTankType(Fluids.NONE);
|
||||
}
|
||||
|
||||
private boolean hasRequiredFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.inputFluids[0] != null && tanks[index * 4].getFill() < recipe.inputFluids[0].fill) return false;
|
||||
if(recipe.inputFluids[1] != null && tanks[index * 4 + 1].getFill() < recipe.inputFluids[1].fill) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasSpaceForFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.outputFluids[0] != null && tanks[index * 4 + 2].getFill() + recipe.outputFluids[0].fill > tanks[index * 4 + 2].getMaxFill()) return false;
|
||||
if(recipe.outputFluids[1] != null && tanks[index * 4 + 3].getFill() + recipe.outputFluids[1].fill > tanks[index * 4 + 3].getMaxFill()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public HashMap<ItemStack[], Boolean> cachedItems = new HashMap<>();
|
||||
|
||||
private boolean hasRequiredItems(ChemRecipe recipe, int index) {
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
ItemStack[] copy = ItemStackUtil.carefulCopyArrayTruncate(slots, indices[0], indices[1]);
|
||||
if (cachedItems.get(copy) != null)
|
||||
return cachedItems.get(copy);
|
||||
else {
|
||||
boolean hasItems = InventoryUtil.doesArrayHaveIngredients(slots, indices[0], indices[1], recipe.inputs);
|
||||
cachedItems.put(copy, hasItems);
|
||||
return hasItems;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasSpaceForItems(ChemRecipe recipe, int index) {
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
return InventoryUtil.doesArrayHaveSpace(slots, indices[2], indices[3], recipe.outputs);
|
||||
}
|
||||
|
||||
protected void process(int index) {
|
||||
|
||||
this.power -= this.consumption;
|
||||
this.progress[index]++;
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.meteorite_sword_machined)
|
||||
slots[0] = new ItemStack(ModItems.meteorite_sword_treated); //fisfndmoivndlmgindgifgjfdnblfm
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[template].getItemDamage());
|
||||
|
||||
this.maxProgress[index] = recipe.getDuration() * this.speed / 100;
|
||||
|
||||
if(maxProgress[index] <= 0) maxProgress[index] = 1;
|
||||
|
||||
if(this.progress[index] >= this.maxProgress[index]) {
|
||||
consumeFluids(recipe, index);
|
||||
produceFluids(recipe, index);
|
||||
consumeItems(recipe, index);
|
||||
produceItems(recipe, index);
|
||||
this.progress[index] = 0;
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void consumeFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.inputFluids[0] != null) tanks[index * 4].setFill(tanks[index * 4].getFill() - recipe.inputFluids[0].fill);
|
||||
if(recipe.inputFluids[1] != null) tanks[index * 4 + 1].setFill(tanks[index * 4 + 1].getFill() - recipe.inputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void produceFluids(ChemRecipe recipe, int index) {
|
||||
if(recipe.outputFluids[0] != null) tanks[index * 4 + 2].setFill(tanks[index * 4 + 2].getFill() + recipe.outputFluids[0].fill);
|
||||
if(recipe.outputFluids[1] != null) tanks[index * 4 + 3].setFill(tanks[index * 4 + 3].getFill() + recipe.outputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void consumeItems(ChemRecipe recipe, int index) {
|
||||
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(AStack in : recipe.inputs) {
|
||||
if(in != null)
|
||||
InventoryUtil.tryConsumeAStack(slots, indices[0], indices[1], in);
|
||||
}
|
||||
}
|
||||
|
||||
private void produceItems(ChemRecipe recipe, int index) {
|
||||
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(ItemStack out : recipe.outputs) {
|
||||
if(out != null)
|
||||
InventoryUtil.tryAddItemToInventory(slots, indices[2], indices[3], out.copy());
|
||||
}
|
||||
}
|
||||
|
||||
private void loadItems(int index) {
|
||||
|
||||
int template = getTemplateIndex(index);
|
||||
if(slots[template] == null || slots[template].getItem() != ModItems.chemistry_template)
|
||||
return;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[template].getItemDamage());
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
DirPos[] positions = getInputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(DirPos coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ());
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null;
|
||||
|
||||
for(AStack ingredient : recipe.inputs) {
|
||||
|
||||
outer:
|
||||
while(!InventoryUtil.doesArrayHaveIngredients(slots, indices[0], indices[1], ingredient)) {
|
||||
|
||||
boolean found = false;
|
||||
|
||||
for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) {
|
||||
|
||||
int slot = access != null ? access[i] : i;
|
||||
ItemStack stack = inv.getStackInSlot(slot);
|
||||
if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(slot, stack, 0))) {
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) {
|
||||
inv.decrStackSize(slot, 1);
|
||||
slots[j].stackSize++;
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = indices[0]; j <= indices[1]; j++) {
|
||||
|
||||
if(slots[j] == null) {
|
||||
slots[j] = stack.copy();
|
||||
slots[j].stackSize = 1;
|
||||
inv.decrStackSize(slot, 1);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unloadItems(int index) {
|
||||
|
||||
DirPos[] positions = getOutputPositions();
|
||||
int[] indices = getSlotIndicesFromIndex(index);
|
||||
|
||||
for(DirPos coord : positions) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ());
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null;
|
||||
|
||||
boolean shouldOutput = true;
|
||||
while(shouldOutput) {
|
||||
shouldOutput = false;
|
||||
outer:
|
||||
for(int i = indices[2]; i <= indices[3]; i++) {
|
||||
|
||||
ItemStack out = slots[i];
|
||||
|
||||
if(out != null) {
|
||||
|
||||
for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) {
|
||||
|
||||
int slot = access != null ? access[j] : j;
|
||||
|
||||
if(!inv.isItemValidForSlot(slot, out))
|
||||
continue;
|
||||
|
||||
ItemStack target = inv.getStackInSlot(slot);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize() && target.stackSize < inv.getInventoryStackLimit()) {
|
||||
int toDec = Math.min(out.stackSize, Math.min(target.getMaxStackSize(), inv.getInventoryStackLimit()) - target.stackSize);
|
||||
this.decrStackSize(i, toDec);
|
||||
target.stackSize += toDec;
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) {
|
||||
|
||||
int slot = access != null ? access[j] : j;
|
||||
|
||||
if(!inv.isItemValidForSlot(slot, out))
|
||||
continue;
|
||||
|
||||
if(inv.getStackInSlot(slot) == null && (sided != null ? sided.canInsertItem(slot, out, coord.getDir().ordinal()) : inv.isItemValidForSlot(slot, out))) {
|
||||
ItemStack copy = out.copy();
|
||||
copy.stackSize = 1;
|
||||
inv.setInventorySlotContents(slot, copy);
|
||||
this.decrStackSize(i, 1);
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
protected List<FluidTank> inTanks() {
|
||||
|
||||
List<FluidTank> inTanks = new ArrayList();
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
FluidTank tank = tanks[i];
|
||||
if(i % 4 < 2) {
|
||||
inTanks.add(tank);
|
||||
}
|
||||
}
|
||||
|
||||
return inTanks;
|
||||
}
|
||||
|
||||
protected List<FluidTank> outTanks() {
|
||||
|
||||
List<FluidTank> outTanks = new ArrayList();
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
FluidTank tank = tanks[i];
|
||||
if(i % 4 > 1) {
|
||||
outTanks.add(tank);
|
||||
}
|
||||
}
|
||||
|
||||
return outTanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return this.inTanks().toArray(new FluidTank[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return this.outTanks().toArray(new FluidTank[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getIntArray("progress");
|
||||
|
||||
if(progress.length == 0)
|
||||
progress = new int[this.getRecipeCount()];
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].readFromNBT(nbt, "t" + i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setLong("power", power);
|
||||
nbt.setIntArray("progress", progress);
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].writeToNBT(nbt, "t" + i);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract int getRecipeCount();
|
||||
public abstract int getTankCapacity();
|
||||
public abstract int getTemplateIndex(int index);
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @return A size 4 int array containing min input, max input, min output and max output indices in that order.
|
||||
*/
|
||||
public abstract int[] getSlotIndicesFromIndex(int index);
|
||||
public abstract DirPos[] getInputPositions();
|
||||
public abstract DirPos[] getOutputPositions();
|
||||
}
|
||||
@ -23,7 +23,6 @@ import com.hbm.inventory.recipes.PedestalRecipes.PedestalExtraCondition;
|
||||
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
||||
import com.hbm.inventory.recipes.PyroOvenRecipes.PyroOvenRecipe;
|
||||
import com.hbm.inventory.recipes.RotaryFurnaceRecipes.RotaryFurnaceRecipe;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.inventory.recipes.CompressorRecipes.CompressorRecipe;
|
||||
import com.hbm.inventory.recipes.SolderingRecipes.SolderingRecipe;
|
||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
||||
@ -72,14 +71,17 @@ public class CompatRecipeRegistry {
|
||||
public static void registerSoldering(ItemStack output, int time, long power, FluidStack fluid, AStack[] toppings, AStack[] pcb, AStack[] solder) {
|
||||
SolderingRecipes.recipes.add(new SolderingRecipe(output, time, power, fluid, copyFirst(toppings, 3), copyFirst(pcb, 2), copyFirst(solder, 1)));
|
||||
}
|
||||
|
||||
@Deprecated public static void registerChemplant(int id, String name, int duration, AStack[] inputItems, FluidStack[] inputFluids, ItemStack[] outputItems, FluidStack[] outputFluids) {
|
||||
ChemRecipe recipe = new ChemRecipe(id, name, duration);
|
||||
if(inputItems != null) recipe.inputItems(copyFirst(inputItems, 4));
|
||||
if(inputFluids != null) recipe.inputFluids(copyFirst(inputFluids, 2));
|
||||
if(outputItems != null) recipe.outputItems(copyFirst(outputItems, 4));
|
||||
if(outputFluids != null) recipe.outputFluids(copyFirst(outputFluids, 2));
|
||||
ChemplantRecipes.recipes.add(recipe);
|
||||
|
||||
/** Assembly machine recipe needs a unique name for the registry. Zero length arrays should stay null*/
|
||||
public static void registerAssembler(String name, boolean named, ItemStack icon, int duration, long power, AStack[] inputItems, FluidStack inputFluids, IOutput[] outputItems, FluidStack outputFluids) {
|
||||
GenericRecipe recipe = new GenericRecipe(name).setDuration(duration).setPower(power);
|
||||
if(named) recipe.setNamed();
|
||||
if(icon != null) recipe.setIcon(icon);
|
||||
if(inputItems != null && inputItems.length > 0) recipe.inputItems(inputItems);
|
||||
if(inputFluids != null) recipe.inputFluids(inputFluids);
|
||||
if(outputItems != null && outputItems.length > 0) recipe.outputItems(outputItems);
|
||||
if(outputFluids != null) recipe.outputFluids(outputFluids);
|
||||
AssemblyMachineRecipes.INSTANCE.register(recipe);
|
||||
}
|
||||
|
||||
/** Chemical plant recipe needs a unique name for the registry. Zero length arrays should stay null*/
|
||||
@ -251,16 +253,6 @@ public class CompatRecipeRegistry {
|
||||
AmmoPressRecipes.recipes.add(new AmmoPressRecipe(output, input));
|
||||
}
|
||||
|
||||
/** Assembler recipes are identified by the output as a ComparableStack, so no two recipes can share output. */
|
||||
public static void registerAssembler(ItemStack output, AStack[] input, int time) {
|
||||
AssemblerRecipes.makeRecipe(new ComparableStack(output), copyFirst(input, 12), time);
|
||||
}
|
||||
|
||||
/** Registers an assembler recipe but with the template only being obtainable via the specified folders */
|
||||
public static void registerAssembler(ItemStack output, AStack[] input, int time, Item... folder) {
|
||||
AssemblerRecipes.makeRecipe(new ComparableStack(output), copyFirst(input, 12), time, folder);
|
||||
}
|
||||
|
||||
public static void registerAnvilConstruction(AStack[] input, AnvilOutput[] output, int tier, int overlayIndex) {
|
||||
AnvilRecipes.constructionRecipes.add(new AnvilConstructionRecipe(input, output).setTier(tier).setOverlay(EnumUtil.grabEnumSafely(OverlayType.class, overlayIndex)));
|
||||
}
|
||||
@ -292,4 +284,11 @@ public class CompatRecipeRegistry {
|
||||
if(array.length <= amount) return array;
|
||||
return Arrays.copyOf(array, amount);
|
||||
}
|
||||
|
||||
/** NOP */
|
||||
@Deprecated public static void registerAssembler(ItemStack output, AStack[] input, int time) { }
|
||||
/** NOP */
|
||||
@Deprecated public static void registerAssembler(ItemStack output, AStack[] input, int time, Item... folder) { }
|
||||
/** NOP */
|
||||
@Deprecated public static void registerChemplant(int id, String name, int duration, AStack[] inputItems, FluidStack[] inputFluids, ItemStack[] outputItems, FluidStack[] outputFluids) { }
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.entity.mob.EntityCreeperNuclear;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
@ -118,13 +119,14 @@ public class DamageResistanceHandler {
|
||||
}
|
||||
|
||||
public static void initDefaults() {
|
||||
|
||||
|
||||
entityStats.put(EntityCreeper.class, new ResistanceStats().addCategory(CATEGORY_EXPLOSION, 2F, 0.25F));
|
||||
entityStats.put(EntityCreeperNuclear.class, new ResistanceStats().addCategory(CATEGORY_EXPLOSION, 5F, 0.35F));
|
||||
|
||||
itemStats.put(ModItems.jackt, new ResistanceStats()
|
||||
.addCategory(CATEGORY_PHYSICAL, 1F, 0.25F));
|
||||
.addCategory(CATEGORY_PHYSICAL, 1F, 0.20F));
|
||||
itemStats.put(ModItems.jackt2, new ResistanceStats()
|
||||
.addCategory(CATEGORY_PHYSICAL, 3F, 0.35F));
|
||||
.addCategory(CATEGORY_PHYSICAL, 2F, 0.25F));
|
||||
|
||||
registerSet(ModItems.steel_helmet, ModItems.steel_plate, ModItems.steel_legs, ModItems.steel_boots, new ResistanceStats());
|
||||
registerSet(ModItems.titanium_helmet, ModItems.titanium_plate, ModItems.titanium_legs, ModItems.titanium_boots, new ResistanceStats());
|
||||
@ -159,12 +161,6 @@ public class DamageResistanceHandler {
|
||||
.addCategory(CATEGORY_FIRE, 0.5F, 0.5F)
|
||||
.addCategory(CATEGORY_EXPLOSION, 2F, 0.15F)
|
||||
.setOther(0F, 0.1F));
|
||||
registerSet(ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots, new ResistanceStats()
|
||||
.addCategory(CATEGORY_PHYSICAL, 2F, 0.15F)
|
||||
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F)
|
||||
.addCategory(CATEGORY_EXPLOSION, 5F, 0.25F)
|
||||
.addExact(DamageSource.fall.damageType, 0F, 1F)
|
||||
.setOther(0F, 0.1F));
|
||||
registerSet(ModItems.t51_helmet, ModItems.t51_plate, ModItems.t51_legs, ModItems.t51_boots, new ResistanceStats()
|
||||
.addCategory(CATEGORY_PHYSICAL, 2F, 0.15F)
|
||||
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F)
|
||||
|
||||
@ -1,100 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'assembler_new_arm.blend'
|
||||
# www.blender.org
|
||||
o Cube.002
|
||||
v -0.125000 1.250000 0.062500
|
||||
v -0.125000 1.437500 0.062500
|
||||
v -0.125000 1.250000 -0.062500
|
||||
v -0.125000 1.437500 -0.062500
|
||||
v 0.125000 1.250000 0.062500
|
||||
v 0.125000 1.437500 0.062500
|
||||
v 0.125000 1.250000 -0.062500
|
||||
v 0.125000 1.437500 -0.062500
|
||||
v 0.062500 1.250000 0.031250
|
||||
v 0.062500 1.250000 -0.031250
|
||||
v -0.063500 1.250000 0.031250
|
||||
v -0.063500 1.250000 -0.031250
|
||||
v 0.062500 1.062500 0.031250
|
||||
v 0.062500 1.062500 -0.031250
|
||||
v -0.063500 1.062500 0.031250
|
||||
v -0.063500 1.062500 -0.031250
|
||||
v 0.031000 1.062500 0.031250
|
||||
v -0.032000 1.062500 0.031250
|
||||
v 0.031000 1.062500 -0.031250
|
||||
v -0.032000 1.062500 -0.031250
|
||||
v -0.032000 0.937500 0.031250
|
||||
v 0.031000 0.937500 0.031250
|
||||
v 0.031000 0.937500 -0.031250
|
||||
v -0.032000 0.937500 -0.031250
|
||||
vt 0.500000 0.750000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.333333 1.000000
|
||||
vt 0.833333 0.750000
|
||||
vt 0.833333 1.000000
|
||||
vt 1.000000 0.750000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.333333 0.750000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.333333 0.583333
|
||||
vt 0.666667 0.583333
|
||||
vt 0.666667 0.750000
|
||||
vt 0.000000 0.750000
|
||||
vt 0.000000 0.583333
|
||||
vt 0.500000 0.583333
|
||||
vt 0.500000 0.500000
|
||||
vt 0.500000 0.333333
|
||||
vt 0.416667 0.583333
|
||||
vt 0.250000 0.333333
|
||||
vt 0.250000 0.583333
|
||||
vt 0.166667 0.583333
|
||||
vt 0.166667 0.333333
|
||||
vt 0.083333 0.333333
|
||||
vt 0.083333 0.166667
|
||||
vt 0.166667 0.166667
|
||||
vt 0.416667 0.333333
|
||||
vt 0.333333 0.333333
|
||||
vt 0.333333 0.250000
|
||||
vt 0.250000 0.166667
|
||||
vt 0.333333 0.166667
|
||||
vt 0.000000 0.333333
|
||||
vt 0.000000 0.166667
|
||||
vt 0.666667 0.500000
|
||||
vt 0.416667 0.250000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
s off
|
||||
f 4/1/1 3/2/1 1/3/1
|
||||
f 8/4/2 7/5/2 3/2/2
|
||||
f 6/6/3 5/7/3 7/5/3
|
||||
f 2/8/4 1/3/4 5/9/4
|
||||
f 3/10/5 7/11/5 5/12/5
|
||||
f 8/8/6 4/13/6 2/14/6
|
||||
f 13/11/5 15/15/5 16/16/5
|
||||
f 9/17/3 13/15/3 14/18/3
|
||||
f 12/19/1 16/20/1 15/21/1
|
||||
f 11/22/4 15/21/4 13/14/4
|
||||
f 14/18/2 16/20/2 12/19/2
|
||||
f 19/23/2 23/24/2 24/25/2
|
||||
f 21/26/5 24/27/5 23/28/5
|
||||
f 18/19/4 21/29/4 22/30/4
|
||||
f 17/31/3 22/32/3 23/24/3
|
||||
f 20/22/1 24/25/1 21/29/1
|
||||
f 2/8/1 4/1/1 1/3/1
|
||||
f 4/1/2 8/4/2 3/2/2
|
||||
f 8/4/3 6/6/3 7/5/3
|
||||
f 6/13/4 2/8/4 5/9/4
|
||||
f 1/8/5 3/10/5 5/12/5
|
||||
f 6/10/6 8/8/6 2/14/6
|
||||
f 14/33/5 13/11/5 16/16/5
|
||||
f 10/26/3 9/17/3 14/18/3
|
||||
f 11/22/1 12/19/1 15/21/1
|
||||
f 9/31/4 11/22/4 13/14/4
|
||||
f 10/26/2 14/18/2 12/19/2
|
||||
f 20/22/2 19/23/2 24/25/2
|
||||
f 22/34/5 21/26/5 23/28/5
|
||||
f 17/27/4 18/19/4 22/30/4
|
||||
f 19/23/3 17/31/3 23/24/3
|
||||
f 18/19/1 20/22/1 21/29/1
|
||||
@ -1,590 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'assembler_new_body.blend'
|
||||
# www.blender.org
|
||||
o Cube_Cube.001
|
||||
v -1.500000 0.000000 1.500000
|
||||
v -1.500000 0.250000 1.500000
|
||||
v -1.500000 0.000000 -1.500000
|
||||
v -1.500000 0.250000 -1.500000
|
||||
v 1.500000 0.000000 1.500000
|
||||
v 1.500000 0.250000 1.500000
|
||||
v 1.500000 0.000000 -1.500000
|
||||
v 1.500000 0.250000 -1.500000
|
||||
v -1.250000 0.500000 1.250000
|
||||
v -1.250000 0.500000 -1.250000
|
||||
v 1.250000 0.500000 -1.250000
|
||||
v 1.250000 0.500000 1.250000
|
||||
v 1.250000 1.000000 -1.250000
|
||||
v -1.250000 1.000000 -1.250000
|
||||
v -1.250000 1.000000 1.250000
|
||||
v 1.250000 1.000000 1.250000
|
||||
v 1.000000 0.250000 -0.250000
|
||||
v 1.000000 0.750000 -0.250000
|
||||
v 1.000000 0.250000 -0.750000
|
||||
v 1.000000 0.750000 -0.750000
|
||||
v 2.000000 0.000000 0.000000
|
||||
v 2.000000 1.000000 0.000000
|
||||
v 2.000000 0.000000 -1.000000
|
||||
v 2.000000 1.000000 -1.000000
|
||||
v 1.500000 1.000000 -1.000000
|
||||
v 1.500000 0.000000 -1.000000
|
||||
v 1.500000 1.000000 0.000000
|
||||
v 1.500000 0.000000 0.000000
|
||||
v 2.000000 0.875000 -0.875000
|
||||
v 2.000000 0.125000 -0.875000
|
||||
v 2.000000 0.875000 -0.125000
|
||||
v 2.000000 0.125000 -0.125000
|
||||
v 1.500000 0.687500 -0.687500
|
||||
v 1.500000 0.312500 -0.687500
|
||||
v 1.500000 0.687500 -0.312500
|
||||
v 1.500000 0.312500 -0.312500
|
||||
v -1.000000 0.250000 0.750000
|
||||
v -1.000000 0.750000 0.750000
|
||||
v -1.000000 0.250000 0.250000
|
||||
v -1.000000 0.750000 0.250000
|
||||
v -2.000000 0.000000 1.000000
|
||||
v -2.000000 1.000000 1.000000
|
||||
v -2.000000 0.000000 0.000000
|
||||
v -2.000000 1.000000 0.000000
|
||||
v -1.500000 1.000000 0.000000
|
||||
v -1.500000 0.000000 0.000000
|
||||
v -1.500000 1.000000 1.000000
|
||||
v -1.500000 0.000000 1.000000
|
||||
v -2.000000 0.875000 0.125000
|
||||
v -2.000000 0.125000 0.125000
|
||||
v -2.000000 0.875000 0.875000
|
||||
v -2.000000 0.125000 0.875000
|
||||
v -1.500000 0.687500 0.312500
|
||||
v -1.500000 0.312500 0.312500
|
||||
v -1.500000 0.687500 0.687500
|
||||
v -1.500000 0.312500 0.687500
|
||||
v 0.656250 0.343750 -2.000000
|
||||
v 0.656250 0.656250 -2.000000
|
||||
v 0.343750 0.343750 -1.250000
|
||||
v 0.343750 0.656250 -1.250000
|
||||
v 0.343750 0.343750 -2.000000
|
||||
v 0.343750 0.656250 -2.000000
|
||||
v 0.656250 0.343750 -1.250000
|
||||
v 0.656250 0.656250 -1.250000
|
||||
v -0.343750 0.343750 -2.000000
|
||||
v -0.343750 0.656250 -2.000000
|
||||
v -0.656250 0.343750 -1.250000
|
||||
v -0.656250 0.656250 -1.250000
|
||||
v -0.656250 0.343750 -2.000000
|
||||
v -0.656250 0.656250 -2.000000
|
||||
v -0.343750 0.343750 -1.250000
|
||||
v -0.343750 0.656250 -1.250000
|
||||
v -0.343750 0.343750 2.000000
|
||||
v -0.343750 0.656250 2.000000
|
||||
v -0.656250 0.343750 1.250000
|
||||
v -0.656250 0.656250 1.250000
|
||||
v -0.656250 0.343750 2.000000
|
||||
v -0.656250 0.656250 2.000000
|
||||
v -0.343750 0.343750 1.250000
|
||||
v -0.343750 0.656250 1.250000
|
||||
v 0.656250 0.343750 2.000000
|
||||
v 0.656250 0.656250 2.000000
|
||||
v 0.343750 0.343750 1.250000
|
||||
v 0.343750 0.656250 1.250000
|
||||
v 0.343750 0.343750 2.000000
|
||||
v 0.343750 0.656250 2.000000
|
||||
v 0.656250 0.343750 1.250000
|
||||
v 0.656250 0.656250 1.250000
|
||||
v 1.916667 0.250000 -1.100000
|
||||
v 1.916667 0.750000 -1.100000
|
||||
v 1.666667 0.500000 -1.100000
|
||||
v 1.916667 0.250000 0.100000
|
||||
v 1.916667 0.750000 0.100000
|
||||
v 1.666667 0.500000 0.100000
|
||||
v -1.583333 0.250000 -0.100000
|
||||
v -1.583333 0.750000 -0.100000
|
||||
v -1.833333 0.500000 -0.100000
|
||||
v -1.583333 0.250000 1.100000
|
||||
v -1.583333 0.750000 1.100000
|
||||
v -1.833333 0.500000 1.100000
|
||||
v 1.250000 1.500000 1.250000
|
||||
v 1.250000 1.500000 -1.250000
|
||||
v -1.250000 1.500000 -1.250000
|
||||
v -1.250000 1.500000 1.250000
|
||||
v 0.750000 2.000000 0.750000
|
||||
v 0.750000 2.000000 -0.750000
|
||||
v -0.750000 2.000000 -0.750000
|
||||
v -0.750000 2.000000 0.750000
|
||||
v -1.125000 1.000000 1.125000
|
||||
v -1.125000 1.000000 -1.125000
|
||||
v 1.125000 1.000000 -1.125000
|
||||
v 1.125000 1.000000 1.125000
|
||||
v -0.812500 0.812500 0.375000
|
||||
v 0.812500 0.812500 0.375000
|
||||
v -0.812500 0.812500 -0.375000
|
||||
v 0.812500 0.812500 -0.375000
|
||||
v 0.600000 0.750000 -0.500000
|
||||
v 0.600000 1.500000 -0.500000
|
||||
v 0.600000 0.750000 -0.625000
|
||||
v 0.600000 1.500000 -0.625000
|
||||
v 0.725000 0.750000 -0.500000
|
||||
v 0.725000 1.500000 -0.500000
|
||||
v 0.725000 0.750000 -0.625000
|
||||
v 0.725000 1.500000 -0.625000
|
||||
v 1.125000 0.750000 1.125000
|
||||
v -1.125000 0.750000 1.125000
|
||||
v -1.125000 0.750000 -1.125000
|
||||
v 1.125000 0.750000 -1.125000
|
||||
v 0.600000 0.750000 0.625000
|
||||
v 0.600000 1.500000 0.625000
|
||||
v 0.600000 0.750000 0.500000
|
||||
v 0.600000 1.500000 0.500000
|
||||
v 0.725000 0.750000 0.625000
|
||||
v 0.725000 1.500000 0.625000
|
||||
v 0.725000 0.750000 0.500000
|
||||
v 0.725000 1.500000 0.500000
|
||||
v -0.725000 0.750000 -0.500000
|
||||
v -0.725000 1.500000 -0.500000
|
||||
v -0.725000 0.750000 -0.625000
|
||||
v -0.725000 1.500000 -0.625000
|
||||
v -0.600000 0.750000 -0.500000
|
||||
v -0.600000 1.500000 -0.500000
|
||||
v -0.600000 0.750000 -0.625000
|
||||
v -0.600000 1.500000 -0.625000
|
||||
v -0.725000 0.750000 0.625000
|
||||
v -0.725000 1.500000 0.625000
|
||||
v -0.725000 0.750000 0.500000
|
||||
v -0.725000 1.500000 0.500000
|
||||
v -0.600000 0.750000 0.625000
|
||||
v -0.600000 1.500000 0.625000
|
||||
v -0.600000 0.750000 0.500000
|
||||
v -0.600000 1.500000 0.500000
|
||||
v -0.875000 1.437500 -0.500000
|
||||
v 0.875000 1.437500 -0.500000
|
||||
v -0.875000 1.250000 -0.500000
|
||||
v 0.875000 1.250000 -0.500000
|
||||
v -0.875000 1.437500 -0.437500
|
||||
v 0.875000 1.437500 -0.437500
|
||||
v -0.875000 1.250000 -0.437500
|
||||
v 0.875000 1.250000 -0.437500
|
||||
v -0.875000 1.437500 0.437500
|
||||
v 0.875000 1.437500 0.437500
|
||||
v -0.875000 1.250000 0.437500
|
||||
v 0.875000 1.250000 0.437500
|
||||
v -0.875000 1.437500 0.500000
|
||||
v 0.875000 1.437500 0.500000
|
||||
v -0.875000 1.250000 0.500000
|
||||
v 0.875000 1.250000 0.500000
|
||||
v -0.812500 1.375000 -0.500000
|
||||
v 0.812500 1.375000 -0.500000
|
||||
v -0.812500 1.312500 -0.500000
|
||||
v 0.812500 1.312500 -0.500000
|
||||
v -0.812500 1.375000 -0.437500
|
||||
v 0.812500 1.375000 -0.437500
|
||||
v -0.812500 1.312500 -0.437500
|
||||
v 0.812500 1.312500 -0.437500
|
||||
v -0.812500 1.375000 0.437500
|
||||
v 0.812500 1.375000 0.437500
|
||||
v -0.812500 1.312500 0.437500
|
||||
v 0.812500 1.312500 0.437500
|
||||
v -0.812500 1.375000 0.500000
|
||||
v 0.812500 1.375000 0.500000
|
||||
v -0.812500 1.312500 0.500000
|
||||
v 0.812500 1.312500 0.500000
|
||||
vt 0.000000 0.472727
|
||||
vt 0.000000 0.436364
|
||||
vt 0.436364 0.436364
|
||||
vt -0.000000 0.000000
|
||||
vt 0.436364 -0.000000
|
||||
vt 0.036364 0.527273
|
||||
vt 0.436364 0.472727
|
||||
vt 0.400000 0.527273
|
||||
vt 0.400000 0.600000
|
||||
vt 0.036364 0.600000
|
||||
vt 0.618182 0.236364
|
||||
vt 0.763636 0.236364
|
||||
vt 0.763636 0.309091
|
||||
vt 0.763636 0.090909
|
||||
vt 0.745455 0.109091
|
||||
vt 0.636364 0.109091
|
||||
vt 0.727273 0.390909
|
||||
vt 0.654545 0.390909
|
||||
vt 0.618182 0.309091
|
||||
vt 0.663636 0.136364
|
||||
vt 0.663636 0.190909
|
||||
vt 0.636364 0.218182
|
||||
vt 0.745455 0.218182
|
||||
vt 0.618182 0.090909
|
||||
vt 0.718182 0.136364
|
||||
vt 0.718182 0.190909
|
||||
vt 0.945455 0.090909
|
||||
vt 0.945455 0.200000
|
||||
vt 0.900000 0.200000
|
||||
vt 0.854545 0.090909
|
||||
vt 0.854545 0.200000
|
||||
vt 0.809091 0.200000
|
||||
vt 0.900000 0.090909
|
||||
vt 0.809091 0.090909
|
||||
vt 0.763636 0.200000
|
||||
vt 0.763636 0.245455
|
||||
vt 0.809091 0.245455
|
||||
vt 0.618182 0.163636
|
||||
vt 0.581818 0.127273
|
||||
vt 0.581818 0.163636
|
||||
vt 0.581818 0.090909
|
||||
vt 0.545455 0.127273
|
||||
vt 0.381818 0.618182
|
||||
vt 0.054545 0.618182
|
||||
vt 0.054545 1.000000
|
||||
vt 0.054545 0.963636
|
||||
vt 0.381818 0.963636
|
||||
vt 0.036364 0.963636
|
||||
vt 0.054545 0.945455
|
||||
vt 0.381818 0.945455
|
||||
vt 0.400000 0.963636
|
||||
vt 0.545455 -0.000000
|
||||
vt 0.545455 0.236364
|
||||
vt 0.472727 0.309091
|
||||
vt 0.472727 0.236364
|
||||
vt 0.490909 0.236364
|
||||
vt 0.454545 0.309091
|
||||
vt 0.454545 0.236364
|
||||
vt 0.436364 0.309091
|
||||
vt 0.436364 0.236364
|
||||
vt 0.490909 0.309091
|
||||
vt 0.509091 0.236364
|
||||
vt 0.454545 0.327273
|
||||
vt 0.436364 0.327273
|
||||
vt 0.800000 0.072727
|
||||
vt 0.545455 0.072727
|
||||
vt 0.545455 0.063636
|
||||
vt 0.790909 0.081818
|
||||
vt 0.781818 0.081818
|
||||
vt 0.781818 0.072727
|
||||
vt 0.800000 0.054545
|
||||
vt 0.800000 0.063636
|
||||
vt 0.827273 0.063636
|
||||
vt 0.827273 0.072727
|
||||
vt 0.827273 0.054545
|
||||
vt 0.790909 0.090909
|
||||
vt 0.781818 0.090909
|
||||
vt 0.545455 0.090909
|
||||
vt 0.545455 0.081818
|
||||
vt 0.790909 0.009091
|
||||
vt 0.554545 0.009091
|
||||
vt 0.800000 0.027273
|
||||
vt 0.790909 0.018182
|
||||
vt 0.545455 0.027273
|
||||
vt 0.554545 0.018182
|
||||
vt 0.554545 0.045455
|
||||
vt 0.790909 0.045455
|
||||
vt 0.554545 0.036364
|
||||
vt 0.545455 0.054545
|
||||
vt 0.790909 0.036364
|
||||
vt 0.800000 0.000000
|
||||
vt 0.727273 0.781818
|
||||
vt 0.509091 0.781818
|
||||
vt 0.509091 0.563636
|
||||
vt 0.727273 0.563636
|
||||
vt 0.436364 0.463636
|
||||
vt 0.800000 0.463636
|
||||
vt 0.436364 0.390909
|
||||
vt 0.800000 0.390909
|
||||
vt 0.381818 1.000000
|
||||
vt 0.509091 0.309091
|
||||
vt 0.790909 0.072727
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.707100 0.707100 0.000000
|
||||
vn -0.707100 0.707100 0.000000
|
||||
vn 0.000000 0.707100 -0.707100
|
||||
vn 0.000000 0.707100 0.707100
|
||||
vn -0.447200 0.000000 0.894400
|
||||
vn -0.447200 0.894400 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -0.447200 0.000000 -0.894400
|
||||
vn 0.351100 0.000000 -0.936300
|
||||
vn 0.351100 0.000000 0.936300
|
||||
vn 0.351100 0.936300 0.000000
|
||||
vn 0.351100 -0.936300 0.000000
|
||||
vn 0.447200 0.000000 0.894400
|
||||
vn 0.447200 0.894400 0.000000
|
||||
vn 0.447200 0.000000 -0.894400
|
||||
vn -0.351100 0.000000 -0.936300
|
||||
vn -0.351100 0.000000 0.936300
|
||||
vn -0.351100 0.936300 0.000000
|
||||
vn -0.351100 -0.936300 0.000000
|
||||
s off
|
||||
f 4/1/1 3/2/1 1/3/1
|
||||
f 8/1/2 7/2/2 3/3/2
|
||||
f 6/1/3 5/2/3 7/3/3
|
||||
f 2/1/4 1/2/4 5/3/4
|
||||
f 3/2/5 7/4/5 5/5/5
|
||||
f 12/6/6 6/1/6 8/7/6
|
||||
f 4/1/7 2/7/7 9/8/7
|
||||
f 8/1/8 4/7/8 10/8/8
|
||||
f 6/7/9 12/8/9 9/6/9
|
||||
f 10/8/2 14/9/2 13/10/2
|
||||
f 24/11/2 23/12/2 26/13/2
|
||||
f 23/14/3 30/15/3 32/16/3
|
||||
f 18/17/10 17/18/10 28/19/10
|
||||
f 26/19/5 23/11/5 21/12/5
|
||||
f 25/13/11 20/17/11 18/18/11
|
||||
f 24/12/12 25/13/12 27/19/12
|
||||
f 27/13/4 28/19/4 21/11/4
|
||||
f 25/19/13 26/13/13 19/17/13
|
||||
f 32/16/14 36/20/14 35/21/14
|
||||
f 22/11/3 31/22/3 29/23/3
|
||||
f 24/12/3 29/23/3 30/15/3
|
||||
f 21/24/3 32/16/3 31/22/3
|
||||
f 35/21/3 36/20/3 34/25/3
|
||||
f 29/23/15 33/26/15 34/25/15
|
||||
f 30/15/16 34/25/16 36/20/16
|
||||
f 31/22/17 35/21/17 33/26/17
|
||||
f 46/19/2 43/11/2 44/12/2
|
||||
f 52/15/1 50/16/1 43/24/1
|
||||
f 48/13/18 37/17/18 38/18/18
|
||||
f 41/11/5 43/12/5 46/13/5
|
||||
f 38/17/19 40/18/19 45/19/19
|
||||
f 47/13/12 45/19/12 44/11/12
|
||||
f 41/12/4 48/13/4 47/19/4
|
||||
f 39/18/20 46/19/20 45/13/20
|
||||
f 55/26/21 56/25/21 52/15/21
|
||||
f 49/22/1 51/23/1 42/12/1
|
||||
f 50/16/1 49/22/1 44/11/1
|
||||
f 51/23/1 52/15/1 41/14/1
|
||||
f 54/20/1 56/25/1 55/26/1
|
||||
f 54/20/22 53/21/22 49/22/22
|
||||
f 56/25/23 54/20/23 50/16/23
|
||||
f 53/21/24 55/26/24 51/23/24
|
||||
f 63/27/3 57/28/3 58/29/3
|
||||
f 60/30/1 62/31/1 61/32/1
|
||||
f 64/33/12 58/29/12 62/31/12
|
||||
f 59/34/5 61/32/5 57/35/5
|
||||
f 58/36/2 57/35/2 61/32/2
|
||||
f 71/27/3 65/28/3 66/29/3
|
||||
f 68/30/1 70/31/1 69/32/1
|
||||
f 72/33/12 66/29/12 70/31/12
|
||||
f 67/34/5 69/32/5 65/35/5
|
||||
f 66/36/2 65/35/2 69/32/2
|
||||
f 74/31/3 73/32/3 79/34/3
|
||||
f 77/28/1 78/29/1 76/33/1
|
||||
f 78/29/12 74/31/12 80/30/12
|
||||
f 73/32/5 77/35/5 75/14/5
|
||||
f 77/35/4 73/32/4 74/37/4
|
||||
f 82/31/3 81/32/3 87/34/3
|
||||
f 85/28/1 86/29/1 84/33/1
|
||||
f 86/29/12 82/31/12 88/30/12
|
||||
f 81/32/5 85/35/5 83/14/5
|
||||
f 85/35/4 81/32/4 82/37/4
|
||||
f 12/8/4 16/9/4 15/10/4
|
||||
f 11/8/3 13/9/3 16/10/3
|
||||
f 9/8/1 15/9/1 14/10/1
|
||||
f 90/38/2 89/24/2 91/39/2
|
||||
f 93/38/4 94/39/4 92/24/4
|
||||
f 96/40/2 95/41/2 97/42/2
|
||||
f 99/40/4 100/42/4 98/41/4
|
||||
f 13/9/12 111/43/12 112/44/12
|
||||
f 111/45/1 128/46/1 125/47/1
|
||||
f 15/48/12 109/49/12 110/50/12
|
||||
f 14/51/12 110/50/12 111/43/12
|
||||
f 16/10/12 112/44/12 109/49/12
|
||||
f 114/5/12 116/52/12 115/53/12
|
||||
f 120/54/1 119/55/1 117/56/1
|
||||
f 124/57/2 123/58/2 119/55/2
|
||||
f 122/59/3 121/60/3 123/58/3
|
||||
f 118/61/4 117/56/4 121/62/4
|
||||
f 124/63/12 120/64/12 118/59/12
|
||||
f 127/50/12 126/49/12 125/44/12
|
||||
f 109/45/3 126/46/3 127/47/3
|
||||
f 110/45/4 127/46/4 128/47/4
|
||||
f 112/45/2 125/46/2 126/47/2
|
||||
f 132/54/1 131/55/1 129/56/1
|
||||
f 136/57/2 135/58/2 131/55/2
|
||||
f 134/59/3 133/60/3 135/58/3
|
||||
f 130/61/4 129/56/4 133/62/4
|
||||
f 136/63/12 132/64/12 130/59/12
|
||||
f 140/54/1 139/55/1 137/56/1
|
||||
f 144/57/2 143/58/2 139/55/2
|
||||
f 142/59/3 141/60/3 143/58/3
|
||||
f 138/61/4 137/56/4 141/62/4
|
||||
f 144/63/12 140/64/12 138/59/12
|
||||
f 148/54/1 147/55/1 145/56/1
|
||||
f 152/57/2 151/58/2 147/55/2
|
||||
f 150/59/3 149/60/3 151/58/3
|
||||
f 146/61/4 145/56/4 149/62/4
|
||||
f 152/63/12 148/64/12 146/59/12
|
||||
f 157/65/12 158/66/12 154/67/12
|
||||
f 170/68/1 172/69/1 176/70/1
|
||||
f 175/66/12 176/70/12 172/69/12
|
||||
f 156/71/5 160/72/5 159/67/5
|
||||
f 153/72/1 155/73/1 159/74/1
|
||||
f 160/72/3 156/71/3 154/75/3
|
||||
f 165/65/12 166/66/12 162/67/12
|
||||
f 175/68/3 171/76/3 169/77/3
|
||||
f 170/78/5 174/79/5 173/69/5
|
||||
f 164/71/5 168/72/5 167/67/5
|
||||
f 161/72/1 163/73/1 167/74/1
|
||||
f 168/72/3 164/71/3 162/75/3
|
||||
f 178/68/1 180/69/1 184/70/1
|
||||
f 183/66/12 184/70/12 180/69/12
|
||||
f 183/68/3 179/76/3 177/77/3
|
||||
f 178/78/5 182/79/5 181/69/5
|
||||
f 171/80/2 172/81/2 156/52/2
|
||||
f 153/82/2 169/83/2 171/80/2
|
||||
f 154/84/2 170/85/2 169/83/2
|
||||
f 173/86/4 174/87/4 158/71/4
|
||||
f 175/88/4 173/86/4 157/89/4
|
||||
f 160/82/4 176/90/4 175/88/4
|
||||
f 172/81/2 170/85/2 154/84/2
|
||||
f 158/71/4 174/87/4 176/90/4
|
||||
f 183/81/4 181/85/4 165/84/4
|
||||
f 168/91/4 184/80/4 183/81/4
|
||||
f 181/85/4 182/83/4 166/82/4
|
||||
f 162/89/2 178/86/2 177/87/2
|
||||
f 161/71/2 177/87/2 179/90/2
|
||||
f 179/90/2 180/88/2 164/84/2
|
||||
f 180/88/2 178/86/2 162/89/2
|
||||
f 166/82/4 182/83/4 184/80/4
|
||||
f 107/92/12 108/93/12 105/94/12
|
||||
f 106/95/6 105/94/6 101/96/6
|
||||
f 103/97/8 107/95/8 106/94/8
|
||||
f 104/97/7 108/95/7 107/94/7
|
||||
f 101/97/9 105/95/9 108/94/9
|
||||
f 104/96/4 15/98/4 16/99/4
|
||||
f 13/99/3 102/97/3 101/96/3
|
||||
f 102/96/2 13/98/2 14/99/2
|
||||
f 103/96/1 14/98/1 15/99/1
|
||||
f 2/7/1 4/1/1 1/3/1
|
||||
f 4/7/2 8/1/2 3/3/2
|
||||
f 8/7/3 6/1/3 7/3/3
|
||||
f 6/7/4 2/1/4 5/3/4
|
||||
f 1/3/5 3/2/5 5/5/5
|
||||
f 11/8/6 12/6/6 8/7/6
|
||||
f 10/6/7 4/1/7 9/8/7
|
||||
f 11/6/8 8/1/8 10/8/8
|
||||
f 2/1/9 6/7/9 9/6/9
|
||||
f 11/6/2 10/8/2 13/10/2
|
||||
f 25/19/2 24/11/2 26/13/2
|
||||
f 21/24/3 23/14/3 32/16/3
|
||||
f 27/13/10 18/17/10 28/19/10
|
||||
f 28/13/5 26/19/5 21/12/5
|
||||
f 27/19/11 25/13/11 18/18/11
|
||||
f 22/11/12 24/12/12 27/19/12
|
||||
f 22/12/4 27/13/4 21/11/4
|
||||
f 20/18/13 25/19/13 19/17/13
|
||||
f 31/22/14 32/16/14 35/21/14
|
||||
f 24/12/3 22/11/3 29/23/3
|
||||
f 23/14/3 24/12/3 30/15/3
|
||||
f 22/11/3 21/24/3 31/22/3
|
||||
f 33/26/3 35/21/3 34/25/3
|
||||
f 30/15/15 29/23/15 34/25/15
|
||||
f 32/16/16 30/15/16 36/20/16
|
||||
f 29/23/17 31/22/17 33/26/17
|
||||
f 45/13/2 46/19/2 44/12/2
|
||||
f 41/14/1 52/15/1 43/24/1
|
||||
f 47/19/18 48/13/18 38/18/18
|
||||
f 48/19/5 41/11/5 46/13/5
|
||||
f 47/13/19 38/17/19 45/19/19
|
||||
f 42/12/12 47/13/12 44/11/12
|
||||
f 42/11/4 41/12/4 47/19/4
|
||||
f 40/17/20 39/18/20 45/13/20
|
||||
f 51/23/21 55/26/21 52/15/21
|
||||
f 44/11/1 49/22/1 42/12/1
|
||||
f 43/24/1 50/16/1 44/11/1
|
||||
f 42/12/1 51/23/1 41/14/1
|
||||
f 53/21/1 54/20/1 55/26/1
|
||||
f 50/16/22 54/20/22 49/22/22
|
||||
f 52/15/23 56/25/23 50/16/23
|
||||
f 49/22/24 53/21/24 51/23/24
|
||||
f 64/33/3 63/27/3 58/29/3
|
||||
f 59/34/1 60/30/1 61/32/1
|
||||
f 60/30/12 64/33/12 62/31/12
|
||||
f 63/14/5 59/34/5 57/35/5
|
||||
f 62/37/2 58/36/2 61/32/2
|
||||
f 72/33/3 71/27/3 66/29/3
|
||||
f 67/34/1 68/30/1 69/32/1
|
||||
f 68/30/12 72/33/12 70/31/12
|
||||
f 71/14/5 67/34/5 65/35/5
|
||||
f 70/37/2 66/36/2 69/32/2
|
||||
f 80/30/3 74/31/3 79/34/3
|
||||
f 75/27/1 77/28/1 76/33/1
|
||||
f 76/33/12 78/29/12 80/30/12
|
||||
f 79/34/5 73/32/5 75/14/5
|
||||
f 78/36/4 77/35/4 74/37/4
|
||||
f 88/30/3 82/31/3 87/34/3
|
||||
f 83/27/1 85/28/1 84/33/1
|
||||
f 84/33/12 86/29/12 88/30/12
|
||||
f 87/34/5 81/32/5 83/14/5
|
||||
f 86/36/4 85/35/4 82/37/4
|
||||
f 9/6/4 12/8/4 15/10/4
|
||||
f 12/6/3 11/8/3 16/10/3
|
||||
f 10/6/1 9/8/1 14/10/1
|
||||
f 16/10/12 13/9/12 112/44/12
|
||||
f 112/100/1 111/45/1 125/47/1
|
||||
f 14/51/12 15/48/12 110/50/12
|
||||
f 13/9/12 14/51/12 111/43/12
|
||||
f 15/48/12 16/10/12 109/49/12
|
||||
f 113/60/12 114/5/12 115/53/12
|
||||
f 118/61/1 120/54/1 117/56/1
|
||||
f 120/54/2 124/57/2 119/55/2
|
||||
f 124/57/3 122/59/3 123/58/3
|
||||
f 122/101/4 118/61/4 121/62/4
|
||||
f 122/57/12 124/63/12 118/59/12
|
||||
f 128/43/12 127/50/12 125/44/12
|
||||
f 110/100/3 109/45/3 127/47/3
|
||||
f 111/100/4 110/45/4 128/47/4
|
||||
f 109/100/2 112/45/2 126/47/2
|
||||
f 130/61/1 132/54/1 129/56/1
|
||||
f 132/54/2 136/57/2 131/55/2
|
||||
f 136/57/3 134/59/3 135/58/3
|
||||
f 134/101/4 130/61/4 133/62/4
|
||||
f 134/57/12 136/63/12 130/59/12
|
||||
f 138/61/1 140/54/1 137/56/1
|
||||
f 140/54/2 144/57/2 139/55/2
|
||||
f 144/57/3 142/59/3 143/58/3
|
||||
f 142/101/4 138/61/4 141/62/4
|
||||
f 142/57/12 144/63/12 138/59/12
|
||||
f 146/61/1 148/54/1 145/56/1
|
||||
f 148/54/2 152/57/2 147/55/2
|
||||
f 152/57/3 150/59/3 151/58/3
|
||||
f 150/101/4 146/61/4 149/62/4
|
||||
f 150/57/12 152/63/12 146/59/12
|
||||
f 153/72/12 157/65/12 154/67/12
|
||||
f 174/102/1 170/68/1 176/70/1
|
||||
f 171/79/12 175/66/12 172/69/12
|
||||
f 155/89/5 156/71/5 159/67/5
|
||||
f 157/65/1 153/72/1 159/74/1
|
||||
f 158/73/3 160/72/3 154/75/3
|
||||
f 161/72/12 165/65/12 162/67/12
|
||||
f 173/69/3 175/68/3 169/77/3
|
||||
f 169/77/5 170/78/5 173/69/5
|
||||
f 163/89/5 164/71/5 167/67/5
|
||||
f 165/65/1 161/72/1 167/74/1
|
||||
f 166/73/3 168/72/3 162/75/3
|
||||
f 182/102/1 178/68/1 184/70/1
|
||||
f 179/79/12 183/66/12 180/69/12
|
||||
f 181/69/3 183/68/3 177/77/3
|
||||
f 177/77/5 178/78/5 181/69/5
|
||||
f 155/91/2 171/80/2 156/52/2
|
||||
f 155/91/2 153/82/2 171/80/2
|
||||
f 153/82/2 154/84/2 169/83/2
|
||||
f 157/89/4 173/86/4 158/71/4
|
||||
f 159/84/4 175/88/4 157/89/4
|
||||
f 159/84/4 160/82/4 175/88/4
|
||||
f 156/52/2 172/81/2 154/84/2
|
||||
f 160/82/4 158/71/4 176/90/4
|
||||
f 167/52/4 183/81/4 165/84/4
|
||||
f 167/52/4 168/91/4 183/81/4
|
||||
f 165/84/4 181/85/4 166/82/4
|
||||
f 161/71/2 162/89/2 177/87/2
|
||||
f 163/82/2 161/71/2 179/90/2
|
||||
f 163/82/2 179/90/2 164/84/2
|
||||
f 164/84/2 180/88/2 162/89/2
|
||||
f 168/91/4 166/82/4 184/80/4
|
||||
f 106/95/12 107/92/12 105/94/12
|
||||
f 102/97/6 106/95/6 101/96/6
|
||||
f 102/96/8 103/97/8 106/94/8
|
||||
f 103/96/7 104/97/7 107/94/7
|
||||
f 104/96/9 101/97/9 108/94/9
|
||||
f 101/97/4 104/96/4 16/99/4
|
||||
f 16/98/3 13/99/3 101/96/3
|
||||
f 103/97/2 102/96/2 14/99/2
|
||||
f 104/97/1 103/96/1 15/99/1
|
||||
@ -1,677 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'assembler_new_cog.blend'
|
||||
# www.blender.org
|
||||
o Cylinder_Cylinder.001
|
||||
v 0.000000 -0.500000 0.050000
|
||||
v 0.000000 -0.500000 -0.050000
|
||||
v 0.129410 -0.482963 0.050000
|
||||
v 0.129410 -0.482963 -0.050000
|
||||
v 0.250000 -0.433013 0.050000
|
||||
v 0.250000 -0.433013 -0.050000
|
||||
v 0.353553 -0.353553 0.050000
|
||||
v 0.353553 -0.353553 -0.050000
|
||||
v 0.433013 -0.250000 0.050000
|
||||
v 0.433013 -0.250000 -0.050000
|
||||
v 0.482963 -0.129410 0.050000
|
||||
v 0.482963 -0.129410 -0.050000
|
||||
v 0.500000 -0.000000 0.050000
|
||||
v 0.500000 -0.000000 -0.050000
|
||||
v 0.482963 0.129409 0.050000
|
||||
v 0.482963 0.129409 -0.050000
|
||||
v 0.433013 0.250000 0.050000
|
||||
v 0.433013 0.250000 -0.050000
|
||||
v 0.353553 0.353553 0.050000
|
||||
v 0.353553 0.353553 -0.050000
|
||||
v 0.250000 0.433013 0.050000
|
||||
v 0.250000 0.433013 -0.050000
|
||||
v 0.129410 0.482963 0.050000
|
||||
v 0.129410 0.482963 -0.050000
|
||||
v 0.000000 0.500000 0.050000
|
||||
v 0.000000 0.500000 -0.050000
|
||||
v -0.129409 0.482963 0.050000
|
||||
v -0.129409 0.482963 -0.050000
|
||||
v -0.250000 0.433013 0.050000
|
||||
v -0.250000 0.433013 -0.050000
|
||||
v -0.353553 0.353554 0.050000
|
||||
v -0.353553 0.353554 -0.050000
|
||||
v -0.433013 0.250000 0.050000
|
||||
v -0.433013 0.250000 -0.050000
|
||||
v -0.482963 0.129410 0.050000
|
||||
v -0.482963 0.129410 -0.050000
|
||||
v -0.500000 0.000000 0.050000
|
||||
v -0.500000 0.000000 -0.050000
|
||||
v -0.482963 -0.129409 0.050000
|
||||
v -0.482963 -0.129409 -0.050000
|
||||
v -0.433013 -0.250000 0.050000
|
||||
v -0.433013 -0.250000 -0.050000
|
||||
v -0.353554 -0.353553 0.050000
|
||||
v -0.353554 -0.353553 -0.050000
|
||||
v -0.250000 -0.433013 0.050000
|
||||
v -0.250000 -0.433013 -0.050000
|
||||
v -0.129410 -0.482963 0.050000
|
||||
v -0.129410 -0.482963 -0.050000
|
||||
v 0.019579 -0.648717 0.050000
|
||||
v 0.019579 -0.648717 -0.050000
|
||||
v 0.148988 -0.631680 -0.050000
|
||||
v 0.148988 -0.631680 0.050000
|
||||
v 0.341314 -0.552016 0.050000
|
||||
v 0.341314 -0.552016 -0.050000
|
||||
v 0.444868 -0.472556 -0.050000
|
||||
v 0.444868 -0.472556 0.050000
|
||||
v 0.571595 -0.307402 0.050000
|
||||
v 0.571595 -0.307402 -0.050000
|
||||
v 0.621545 -0.186812 -0.050000
|
||||
v 0.621545 -0.186812 0.050000
|
||||
v 0.648717 0.019579 0.050000
|
||||
v 0.648717 0.019579 -0.050000
|
||||
v 0.631680 0.148988 -0.050000
|
||||
v 0.631680 0.148988 0.050000
|
||||
v 0.552016 0.341314 0.050000
|
||||
v 0.552016 0.341314 -0.050000
|
||||
v 0.472557 0.444867 -0.050000
|
||||
v 0.472557 0.444867 0.050000
|
||||
v 0.307403 0.571595 0.050000
|
||||
v 0.307403 0.571595 -0.050000
|
||||
v 0.186812 0.621545 -0.050000
|
||||
v 0.186812 0.621545 0.050000
|
||||
v -0.019579 0.648717 0.050000
|
||||
v -0.019579 0.648717 -0.050000
|
||||
v -0.148988 0.631680 -0.050000
|
||||
v -0.148988 0.631680 0.050000
|
||||
v -0.341314 0.552016 0.050000
|
||||
v -0.341314 0.552016 -0.050000
|
||||
v -0.444867 0.472557 -0.050000
|
||||
v -0.444867 0.472557 0.050000
|
||||
v -0.571595 0.307403 0.050000
|
||||
v -0.571595 0.307403 -0.050000
|
||||
v -0.621545 0.186812 -0.050000
|
||||
v -0.621545 0.186812 0.050000
|
||||
v -0.648717 -0.019579 0.050000
|
||||
v -0.648717 -0.019579 -0.050000
|
||||
v -0.631680 -0.148988 -0.050000
|
||||
v -0.631680 -0.148988 0.050000
|
||||
v -0.552016 -0.341314 0.050000
|
||||
v -0.552016 -0.341314 -0.050000
|
||||
v -0.472557 -0.444867 -0.050000
|
||||
v -0.472557 -0.444867 0.050000
|
||||
v -0.307403 -0.571594 0.050000
|
||||
v -0.307403 -0.571594 -0.050000
|
||||
v -0.186812 -0.621545 -0.050000
|
||||
v -0.186812 -0.621545 0.050000
|
||||
v -0.000000 -0.375000 0.050000
|
||||
v 0.097057 -0.362222 0.050000
|
||||
v 0.097057 -0.362222 -0.050000
|
||||
v -0.000000 -0.375000 -0.050000
|
||||
v 0.187500 -0.324760 0.050000
|
||||
v 0.187500 -0.324760 -0.050000
|
||||
v 0.265165 -0.265165 0.050000
|
||||
v 0.265165 -0.265165 -0.050000
|
||||
v 0.324760 -0.187500 0.050000
|
||||
v 0.324760 -0.187500 -0.050000
|
||||
v 0.362222 -0.097057 0.050000
|
||||
v 0.362222 -0.097057 -0.050000
|
||||
v 0.375000 -0.000000 0.050000
|
||||
v 0.375000 -0.000000 -0.050000
|
||||
v 0.362222 0.097057 0.050000
|
||||
v 0.362222 0.097057 -0.050000
|
||||
v 0.324760 0.187500 0.050000
|
||||
v 0.324760 0.187500 -0.050000
|
||||
v 0.265165 0.265165 0.050000
|
||||
v 0.265165 0.265165 -0.050000
|
||||
v 0.187500 0.324760 0.050000
|
||||
v 0.187500 0.324760 -0.050000
|
||||
v 0.097057 0.362222 0.050000
|
||||
v 0.097057 0.362222 -0.050000
|
||||
v 0.000000 0.375000 0.050000
|
||||
v 0.000000 0.375000 -0.050000
|
||||
v -0.097057 0.362222 0.050000
|
||||
v -0.097057 0.362222 -0.050000
|
||||
v -0.187500 0.324760 0.050000
|
||||
v -0.187500 0.324760 -0.050000
|
||||
v -0.265165 0.265165 0.050000
|
||||
v -0.265165 0.265165 -0.050000
|
||||
v -0.324759 0.187500 0.050000
|
||||
v -0.324759 0.187500 -0.050000
|
||||
v -0.362222 0.097057 0.050000
|
||||
v -0.362222 0.097057 -0.050000
|
||||
v -0.375000 0.000000 0.050000
|
||||
v -0.375000 0.000000 -0.050000
|
||||
v -0.362222 -0.097057 0.050000
|
||||
v -0.362222 -0.097057 -0.050000
|
||||
v -0.324760 -0.187500 0.050000
|
||||
v -0.324760 -0.187500 -0.050000
|
||||
v -0.265165 -0.265165 0.050000
|
||||
v -0.265165 -0.265165 -0.050000
|
||||
v -0.187500 -0.324759 0.050000
|
||||
v -0.187500 -0.324759 -0.050000
|
||||
v -0.097057 -0.362222 0.050000
|
||||
v -0.097057 -0.362222 -0.050000
|
||||
v 0.000000 -0.187500 0.050000
|
||||
v 0.048529 -0.181111 0.050000
|
||||
v 0.048529 -0.181111 -0.050000
|
||||
v 0.000000 -0.187500 -0.050000
|
||||
v 0.093750 -0.162380 0.050000
|
||||
v 0.093750 -0.162380 -0.050000
|
||||
v 0.132583 -0.132582 0.050000
|
||||
v 0.132583 -0.132582 -0.050000
|
||||
v 0.162380 -0.093750 0.050000
|
||||
v 0.162380 -0.093750 -0.050000
|
||||
v 0.181111 -0.048529 0.050000
|
||||
v 0.181111 -0.048529 -0.050000
|
||||
v 0.187500 0.000000 0.050000
|
||||
v 0.187500 0.000000 -0.050000
|
||||
v 0.181111 0.048529 0.050000
|
||||
v 0.181111 0.048529 -0.050000
|
||||
v 0.162380 0.093750 0.050000
|
||||
v 0.162380 0.093750 -0.050000
|
||||
v 0.132583 0.132583 0.050000
|
||||
v 0.132583 0.132583 -0.050000
|
||||
v 0.093750 0.162380 0.050000
|
||||
v 0.093750 0.162380 -0.050000
|
||||
v 0.048529 0.181111 0.050000
|
||||
v 0.048529 0.181111 -0.050000
|
||||
v 0.000000 0.187500 0.050000
|
||||
v 0.000000 0.187500 -0.050000
|
||||
v -0.048528 0.181111 0.050000
|
||||
v -0.048528 0.181111 -0.050000
|
||||
v -0.093750 0.162380 0.050000
|
||||
v -0.093750 0.162380 -0.050000
|
||||
v -0.132582 0.132583 0.050000
|
||||
v -0.132582 0.132583 -0.050000
|
||||
v -0.162380 0.093750 0.050000
|
||||
v -0.162380 0.093750 -0.050000
|
||||
v -0.181111 0.048529 0.050000
|
||||
v -0.181111 0.048529 -0.050000
|
||||
v -0.187500 0.000000 0.050000
|
||||
v -0.187500 0.000000 -0.050000
|
||||
v -0.181111 -0.048528 0.050000
|
||||
v -0.181111 -0.048528 -0.050000
|
||||
v -0.162380 -0.093750 0.050000
|
||||
v -0.162380 -0.093750 -0.050000
|
||||
v -0.132583 -0.132582 0.050000
|
||||
v -0.132583 -0.132582 -0.050000
|
||||
v -0.093750 -0.162380 0.050000
|
||||
v -0.093750 -0.162380 -0.050000
|
||||
v -0.048529 -0.181111 0.050000
|
||||
v -0.048529 -0.181111 -0.050000
|
||||
v 0.000000 0.000000 -0.050000
|
||||
v 0.000000 0.000000 0.050000
|
||||
vt 0.333333 0.750000
|
||||
vt 0.166667 0.750000
|
||||
vt 0.166667 0.583333
|
||||
vt 0.333333 0.333333
|
||||
vt 0.500000 0.333333
|
||||
vt 0.500000 0.500000
|
||||
vt 0.333333 0.583333
|
||||
vt 0.333333 0.500000
|
||||
vt 0.833333 0.750000
|
||||
vt 0.666667 0.750000
|
||||
vt 0.666667 0.583333
|
||||
vt 0.500000 0.583333
|
||||
vt 0.833333 0.583333
|
||||
vt 1.000000 0.583333
|
||||
vt 0.000000 0.750000
|
||||
vt 0.000000 0.583333
|
||||
vt 0.500000 0.750000
|
||||
vt 0.833333 0.166667
|
||||
vt 0.833333 0.333333
|
||||
vt 0.666667 0.333333
|
||||
vt 0.500000 0.166667
|
||||
vt 0.666667 0.166667
|
||||
vt 0.333333 0.166667
|
||||
vt 0.166667 0.333333
|
||||
vt 0.500000 1.000000
|
||||
vt 0.333333 1.000000
|
||||
vt 0.166667 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.833333 1.000000
|
||||
vt 0.666667 1.000000
|
||||
vt 1.000000 0.750000
|
||||
vt 1.000000 0.333333
|
||||
vt 1.000000 0.166667
|
||||
vt -0.000000 0.083333
|
||||
vt 0.166667 0.083333
|
||||
vt 0.000000 0.333333
|
||||
vt 0.250000 0.166667
|
||||
vt 0.166667 0.166667
|
||||
vt 0.166667 0.000000
|
||||
vt 0.416667 0.166667
|
||||
vt 0.333333 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.416667 0.000000
|
||||
vt 0.083333 0.333333
|
||||
vt 0.083333 0.583333
|
||||
vn 0.000000 -0.000000 -1.000000
|
||||
vn 0.382700 -0.923900 0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.793400 -0.608800 0.000000
|
||||
vn 0.991400 -0.130500 0.000000
|
||||
vn 0.923900 0.382700 0.000000
|
||||
vn 0.608800 0.793400 0.000000
|
||||
vn 0.130500 0.991400 0.000000
|
||||
vn -0.382700 0.923900 0.000000
|
||||
vn -0.793400 0.608800 0.000000
|
||||
vn -0.991400 0.130500 -0.000000
|
||||
vn -0.923900 -0.382700 0.000000
|
||||
vn -0.608800 -0.793400 0.000000
|
||||
vn -0.130500 -0.991400 0.000000
|
||||
vn 0.130500 -0.991400 0.000000
|
||||
vn -0.991400 -0.130500 0.000000
|
||||
vn 0.991400 0.130500 0.000000
|
||||
vn 0.608800 -0.793400 0.000000
|
||||
vn -0.793400 -0.608800 0.000000
|
||||
vn 0.793400 0.608800 0.000000
|
||||
vn 0.923900 -0.382700 0.000000
|
||||
vn -0.382700 -0.923900 0.000000
|
||||
vn 0.382700 0.923900 0.000000
|
||||
vn -0.130500 0.991400 0.000000
|
||||
vn -0.608800 0.793400 0.000000
|
||||
vn -0.923900 0.382700 0.000000
|
||||
vn -0.258800 0.965900 -0.000000
|
||||
vn -0.866000 0.500000 0.000000
|
||||
vn 0.866000 -0.500000 0.000000
|
||||
vn 0.965900 0.258800 0.000000
|
||||
vn -0.500000 -0.866000 0.000000
|
||||
vn -0.965900 -0.258800 0.000000
|
||||
vn 0.500000 0.866000 0.000000
|
||||
vn 0.258800 -0.965900 0.000000
|
||||
s off
|
||||
f 14/1/1 12/2/1 108/3/1
|
||||
f 4/4/2 6/5/2 5/6/2
|
||||
f 1/2/3 97/3/3 143/7/3
|
||||
f 8/6/4 10/8/4 9/4/4
|
||||
f 29/9/3 31/10/3 127/11/3
|
||||
f 12/6/5 14/8/5 13/4/5
|
||||
f 13/2/3 109/3/3 107/7/3
|
||||
f 16/6/6 18/8/6 17/4/6
|
||||
f 38/1/1 134/7/1 136/12/1
|
||||
f 20/6/7 22/8/7 21/4/7
|
||||
f 20/9/1 116/13/1 118/14/1
|
||||
f 24/6/8 26/8/8 25/4/8
|
||||
f 37/2/3 39/15/3 135/16/3
|
||||
f 27/5/9 28/6/9 30/8/9
|
||||
f 21/17/3 117/12/3 115/11/3
|
||||
f 32/4/10 34/5/10 33/6/10
|
||||
f 2/1/1 100/7/1 99/12/1
|
||||
f 36/4/11 38/5/11 37/6/11
|
||||
f 46/15/1 142/16/1 144/3/1
|
||||
f 40/4/12 42/5/12 41/6/12
|
||||
f 133/18/5 134/19/5 132/20/5
|
||||
f 44/4/13 46/5/13 45/6/13
|
||||
f 28/17/1 124/12/1 126/11/1
|
||||
f 48/4/14 2/5/14 1/6/14
|
||||
f 123/5/15 124/21/15 122/22/15
|
||||
f 10/15/1 106/16/1 108/3/1
|
||||
f 50/23/15 51/21/15 52/5/15
|
||||
f 50/7/16 49/3/16 1/24/16
|
||||
f 51/25/1 50/26/1 2/1/1
|
||||
f 3/4/17 52/7/17 51/3/17
|
||||
f 49/27/3 52/28/3 3/15/3
|
||||
f 54/23/18 55/21/18 56/5/18
|
||||
f 54/7/19 53/3/19 5/24/19
|
||||
f 55/29/1 54/30/1 6/10/1
|
||||
f 56/7/20 55/3/20 8/24/20
|
||||
f 5/9/3 53/29/3 56/30/3
|
||||
f 58/5/21 59/4/21 60/23/21
|
||||
f 58/7/22 57/3/22 9/24/22
|
||||
f 59/27/1 58/28/1 10/15/1
|
||||
f 60/7/23 59/3/23 12/24/23
|
||||
f 9/17/3 57/25/3 60/26/3
|
||||
f 62/5/17 63/4/17 64/23/17
|
||||
f 62/7/15 61/3/15 13/24/15
|
||||
f 63/25/1 62/26/1 14/1/1
|
||||
f 64/7/24 63/3/24 16/24/24
|
||||
f 61/27/3 64/28/3 15/15/3
|
||||
f 66/5/20 67/4/20 68/23/20
|
||||
f 18/4/18 66/7/18 65/3/18
|
||||
f 67/29/1 66/30/1 18/10/1
|
||||
f 68/7/25 67/3/25 20/24/25
|
||||
f 17/9/3 65/29/3 68/30/3
|
||||
f 70/5/23 71/4/23 72/23/23
|
||||
f 70/7/21 69/3/21 21/24/21
|
||||
f 71/27/1 70/28/1 22/15/1
|
||||
f 72/7/26 71/3/26 24/24/26
|
||||
f 69/25/3 72/26/3 23/1/3
|
||||
f 73/21/24 74/5/24 75/4/24
|
||||
f 74/7/17 73/3/17 25/24/17
|
||||
f 75/25/1 74/26/1 26/1/1
|
||||
f 76/7/16 75/3/16 28/24/16
|
||||
f 25/2/3 73/27/3 76/28/3
|
||||
f 78/5/25 79/4/25 80/23/25
|
||||
f 30/4/20 78/7/20 77/3/20
|
||||
f 79/29/1 78/30/1 30/10/1
|
||||
f 80/7/19 79/3/19 32/24/19
|
||||
f 29/9/3 77/29/3 80/30/3
|
||||
f 82/23/26 83/21/26 84/5/26
|
||||
f 82/7/23 81/3/23 33/24/23
|
||||
f 83/27/1 82/28/1 34/15/1
|
||||
f 84/7/22 83/3/22 36/24/22
|
||||
f 81/25/3 84/26/3 35/1/3
|
||||
f 86/23/16 87/21/16 88/5/16
|
||||
f 86/7/24 85/3/24 37/24/24
|
||||
f 87/25/1 86/26/1 38/1/1
|
||||
f 88/7/15 87/3/15 40/24/15
|
||||
f 37/2/3 85/27/3 88/28/3
|
||||
f 90/23/19 91/21/19 92/5/19
|
||||
f 90/7/25 89/3/25 41/24/25
|
||||
f 44/9/1 91/29/1 90/30/1
|
||||
f 92/7/18 91/3/18 44/24/18
|
||||
f 89/29/3 92/30/3 43/10/3
|
||||
f 94/23/22 95/21/22 96/5/22
|
||||
f 94/7/26 93/3/26 45/24/26
|
||||
f 95/27/1 94/28/1 46/15/1
|
||||
f 47/4/21 96/7/21 95/3/21
|
||||
f 93/25/3 96/26/3 47/1/3
|
||||
f 30/10/1 126/11/1 128/13/1
|
||||
f 2/1/1 48/2/1 144/3/1
|
||||
f 5/9/3 101/13/3 98/14/3
|
||||
f 23/1/3 119/7/3 117/12/3
|
||||
f 39/31/3 41/9/3 137/13/3
|
||||
f 4/17/1 99/12/1 102/11/1
|
||||
f 24/2/1 22/15/1 118/16/1
|
||||
f 40/17/1 136/12/1 138/11/1
|
||||
f 15/15/3 111/16/3 109/3/3
|
||||
f 33/17/3 129/12/3 127/11/3
|
||||
f 16/17/1 14/1/1 110/7/1
|
||||
f 34/31/1 32/9/1 128/13/1
|
||||
f 7/10/3 103/11/3 101/13/3
|
||||
f 25/2/3 121/3/3 119/7/3
|
||||
f 41/9/3 43/10/3 139/11/3
|
||||
f 8/9/1 6/10/1 102/11/1
|
||||
f 24/2/1 120/3/1 122/7/1
|
||||
f 42/10/1 138/11/1 140/13/1
|
||||
f 17/9/3 113/13/3 111/14/3
|
||||
f 35/1/3 131/7/3 129/12/3
|
||||
f 16/17/1 112/12/1 114/11/1
|
||||
f 34/15/1 130/16/1 132/3/1
|
||||
f 9/17/3 105/12/3 103/11/3
|
||||
f 27/15/3 123/16/3 121/3/3
|
||||
f 45/17/3 141/12/3 139/11/3
|
||||
f 8/9/1 104/13/1 106/14/1
|
||||
f 26/1/1 122/7/1 124/12/1
|
||||
f 44/9/1 140/13/1 142/14/1
|
||||
f 19/10/3 115/11/3 113/13/3
|
||||
f 37/2/3 133/3/3 131/7/3
|
||||
f 20/9/1 18/10/1 114/11/1
|
||||
f 36/2/1 132/3/1 134/7/1
|
||||
f 11/1/3 107/7/3 105/12/3
|
||||
f 29/9/3 125/13/3 123/14/3
|
||||
f 45/17/3 47/1/3 143/7/3
|
||||
f 1/2/3 3/15/3 98/16/3
|
||||
f 104/13/1 152/19/1 154/32/1
|
||||
f 121/20/14 122/22/14 120/18/14
|
||||
f 135/33/17 136/32/17 134/19/17
|
||||
f 119/19/22 120/18/22 118/33/22
|
||||
f 183/34/27 184/35/27 136/24/27
|
||||
f 117/24/28 118/36/28 166/34/28
|
||||
f 182/37/16 184/38/16 183/39/16
|
||||
f 166/40/23 168/23/23 167/41/23
|
||||
f 98/33/24 99/32/24 100/19/24
|
||||
f 168/23/8 170/37/8 169/42/8
|
||||
f 97/18/8 100/19/8 144/20/8
|
||||
f 170/37/24 172/38/24 171/39/24
|
||||
f 143/22/23 144/20/23 142/5/23
|
||||
f 137/13/3 185/19/3 183/32/3
|
||||
f 190/34/29 189/35/29 141/24/29
|
||||
f 171/34/30 172/35/30 124/24/30
|
||||
f 136/12/1 184/5/1 186/20/1
|
||||
f 125/13/3 173/19/3 171/32/3
|
||||
f 190/39/22 192/42/22 191/37/22
|
||||
f 139/11/3 187/20/3 185/19/3
|
||||
f 178/40/26 180/23/26 179/41/26
|
||||
f 126/11/1 124/12/1 172/5/1
|
||||
f 113/13/3 161/19/3 159/32/3
|
||||
f 138/11/1 186/20/1 188/19/1
|
||||
f 192/42/14 148/41/14 145/23/14
|
||||
f 125/13/3 127/11/3 175/20/3
|
||||
f 114/11/1 112/12/1 160/5/1
|
||||
f 139/11/3 141/12/3 189/5/3
|
||||
f 101/13/3 149/19/3 146/32/3
|
||||
f 126/11/1 174/20/1 176/19/1
|
||||
f 115/11/3 163/20/3 161/19/3
|
||||
f 140/13/1 188/19/1 190/32/1
|
||||
f 102/11/1 99/12/1 147/5/1
|
||||
f 129/12/3 177/5/3 175/20/3
|
||||
f 114/11/1 162/20/1 164/19/1
|
||||
f 180/23/11 182/37/11 181/42/11
|
||||
f 103/11/3 151/20/3 149/19/3
|
||||
f 128/13/1 176/19/1 178/32/1
|
||||
f 115/11/3 117/12/3 165/5/3
|
||||
f 148/41/15 147/43/15 146/40/15
|
||||
f 104/13/1 102/11/1 150/20/1
|
||||
f 177/35/31 129/24/31 130/36/31
|
||||
f 118/14/1 116/13/1 164/19/1
|
||||
f 131/22/21 132/20/21 130/5/21
|
||||
f 105/12/3 153/5/3 151/20/3
|
||||
f 99/24/32 98/36/32 146/34/32
|
||||
f 156/23/5 158/37/5 157/42/5
|
||||
f 158/37/17 160/38/17 159/39/17
|
||||
f 154/40/21 156/23/21 155/41/21
|
||||
f 154/34/33 153/35/33 105/24/33
|
||||
f 111/36/34 159/34/34 160/35/34
|
||||
f 111/5/16 112/21/16 110/22/16
|
||||
f 107/19/26 108/18/26 106/33/26
|
||||
f 107/19/11 109/20/11 110/22/11
|
||||
f 193/44/1 147/3/1 148/45/1
|
||||
f 193/44/1 192/3/1 190/45/1
|
||||
f 193/44/1 188/3/1 186/45/1
|
||||
f 193/44/1 184/3/1 182/45/1
|
||||
f 193/44/1 180/3/1 178/45/1
|
||||
f 193/44/1 176/3/1 174/45/1
|
||||
f 193/44/1 172/3/1 170/45/1
|
||||
f 193/44/1 168/3/1 166/45/1
|
||||
f 193/44/1 164/3/1 162/45/1
|
||||
f 193/44/1 160/3/1 158/45/1
|
||||
f 193/44/1 156/3/1 154/45/1
|
||||
f 193/44/1 152/3/1 150/45/1
|
||||
f 194/44/3 191/3/3 145/45/3
|
||||
f 189/45/3 191/16/3 194/44/3
|
||||
f 185/45/3 187/16/3 194/44/3
|
||||
f 181/45/3 183/16/3 194/44/3
|
||||
f 177/45/3 179/16/3 194/44/3
|
||||
f 173/45/3 175/16/3 194/44/3
|
||||
f 169/45/3 171/16/3 194/44/3
|
||||
f 165/45/3 167/16/3 194/44/3
|
||||
f 161/45/3 163/16/3 194/44/3
|
||||
f 157/45/3 159/16/3 194/44/3
|
||||
f 153/45/3 155/16/3 194/44/3
|
||||
f 149/45/3 151/16/3 194/44/3
|
||||
f 110/7/1 14/1/1 108/3/1
|
||||
f 3/8/2 4/4/2 5/6/2
|
||||
f 47/1/3 1/2/3 143/7/3
|
||||
f 7/5/4 8/6/4 9/4/4
|
||||
f 125/13/3 29/9/3 127/11/3
|
||||
f 11/5/5 12/6/5 13/4/5
|
||||
f 11/1/3 13/2/3 107/7/3
|
||||
f 15/5/6 16/6/6 17/4/6
|
||||
f 40/17/1 38/1/1 136/12/1
|
||||
f 19/5/7 20/6/7 21/4/7
|
||||
f 22/31/1 20/9/1 118/14/1
|
||||
f 23/5/8 24/6/8 25/4/8
|
||||
f 133/3/3 37/2/3 135/16/3
|
||||
f 29/4/9 27/5/9 30/8/9
|
||||
f 19/10/3 21/17/3 115/11/3
|
||||
f 31/8/10 32/4/10 33/6/10
|
||||
f 4/17/1 2/1/1 99/12/1
|
||||
f 35/8/11 36/4/11 37/6/11
|
||||
f 48/2/1 46/15/1 144/3/1
|
||||
f 39/8/12 40/4/12 41/6/12
|
||||
f 131/22/5 133/18/5 132/20/5
|
||||
f 43/8/13 44/4/13 45/6/13
|
||||
f 30/10/1 28/17/1 126/11/1
|
||||
f 47/8/14 48/4/14 1/6/14
|
||||
f 121/20/15 123/5/15 122/22/15
|
||||
f 12/2/1 10/15/1 108/3/1
|
||||
f 49/4/15 50/23/15 52/5/15
|
||||
f 2/4/16 50/7/16 1/24/16
|
||||
f 4/17/1 51/25/1 2/1/1
|
||||
f 4/24/17 3/4/17 51/3/17
|
||||
f 1/2/3 49/27/3 3/15/3
|
||||
f 53/4/18 54/23/18 56/5/18
|
||||
f 6/4/19 54/7/19 5/24/19
|
||||
f 8/9/1 55/29/1 6/10/1
|
||||
f 7/4/20 56/7/20 8/24/20
|
||||
f 7/10/3 5/9/3 56/30/3
|
||||
f 57/21/21 58/5/21 60/23/21
|
||||
f 10/4/22 58/7/22 9/24/22
|
||||
f 12/2/1 59/27/1 10/15/1
|
||||
f 11/4/23 60/7/23 12/24/23
|
||||
f 11/1/3 9/17/3 60/26/3
|
||||
f 61/21/17 62/5/17 64/23/17
|
||||
f 14/4/15 62/7/15 13/24/15
|
||||
f 16/17/1 63/25/1 14/1/1
|
||||
f 15/4/24 64/7/24 16/24/24
|
||||
f 13/2/3 61/27/3 15/15/3
|
||||
f 65/21/20 66/5/20 68/23/20
|
||||
f 17/24/18 18/4/18 65/3/18
|
||||
f 20/9/1 67/29/1 18/10/1
|
||||
f 19/4/25 68/7/25 20/24/25
|
||||
f 19/10/3 17/9/3 68/30/3
|
||||
f 69/21/23 70/5/23 72/23/23
|
||||
f 22/4/21 70/7/21 21/24/21
|
||||
f 24/2/1 71/27/1 22/15/1
|
||||
f 23/4/26 72/7/26 24/24/26
|
||||
f 21/17/3 69/25/3 23/1/3
|
||||
f 76/23/24 73/21/24 75/4/24
|
||||
f 26/4/17 74/7/17 25/24/17
|
||||
f 28/17/1 75/25/1 26/1/1
|
||||
f 27/4/16 76/7/16 28/24/16
|
||||
f 27/15/3 25/2/3 76/28/3
|
||||
f 77/21/25 78/5/25 80/23/25
|
||||
f 29/24/20 30/4/20 77/3/20
|
||||
f 32/9/1 79/29/1 30/10/1
|
||||
f 31/4/19 80/7/19 32/24/19
|
||||
f 31/10/3 29/9/3 80/30/3
|
||||
f 81/4/26 82/23/26 84/5/26
|
||||
f 34/4/23 82/7/23 33/24/23
|
||||
f 36/2/1 83/27/1 34/15/1
|
||||
f 35/4/22 84/7/22 36/24/22
|
||||
f 33/17/3 81/25/3 35/1/3
|
||||
f 85/4/16 86/23/16 88/5/16
|
||||
f 38/4/24 86/7/24 37/24/24
|
||||
f 40/17/1 87/25/1 38/1/1
|
||||
f 39/4/15 88/7/15 40/24/15
|
||||
f 39/15/3 37/2/3 88/28/3
|
||||
f 89/4/19 90/23/19 92/5/19
|
||||
f 42/4/25 90/7/25 41/24/25
|
||||
f 42/10/1 44/9/1 90/30/1
|
||||
f 43/4/18 92/7/18 44/24/18
|
||||
f 41/9/3 89/29/3 43/10/3
|
||||
f 93/4/22 94/23/22 96/5/22
|
||||
f 46/4/26 94/7/26 45/24/26
|
||||
f 48/2/1 95/27/1 46/15/1
|
||||
f 48/24/21 47/4/21 95/3/21
|
||||
f 45/17/3 93/25/3 47/1/3
|
||||
f 32/9/1 30/10/1 128/13/1
|
||||
f 100/7/1 2/1/1 144/3/1
|
||||
f 3/31/3 5/9/3 98/14/3
|
||||
f 21/17/3 23/1/3 117/12/3
|
||||
f 135/14/3 39/31/3 137/13/3
|
||||
f 6/10/1 4/17/1 102/11/1
|
||||
f 120/3/1 24/2/1 118/16/1
|
||||
f 42/10/1 40/17/1 138/11/1
|
||||
f 13/2/3 15/15/3 109/3/3
|
||||
f 31/10/3 33/17/3 127/11/3
|
||||
f 112/12/1 16/17/1 110/7/1
|
||||
f 130/14/1 34/31/1 128/13/1
|
||||
f 5/9/3 7/10/3 101/13/3
|
||||
f 23/1/3 25/2/3 119/7/3
|
||||
f 137/13/3 41/9/3 139/11/3
|
||||
f 104/13/1 8/9/1 102/11/1
|
||||
f 26/1/1 24/2/1 122/7/1
|
||||
f 44/9/1 42/10/1 140/13/1
|
||||
f 15/31/3 17/9/3 111/14/3
|
||||
f 33/17/3 35/1/3 129/12/3
|
||||
f 18/10/1 16/17/1 114/11/1
|
||||
f 36/2/1 34/15/1 132/3/1
|
||||
f 7/10/3 9/17/3 103/11/3
|
||||
f 25/2/3 27/15/3 121/3/3
|
||||
f 43/10/3 45/17/3 139/11/3
|
||||
f 10/31/1 8/9/1 106/14/1
|
||||
f 28/17/1 26/1/1 124/12/1
|
||||
f 46/31/1 44/9/1 142/14/1
|
||||
f 17/9/3 19/10/3 113/13/3
|
||||
f 35/1/3 37/2/3 131/7/3
|
||||
f 116/13/1 20/9/1 114/11/1
|
||||
f 38/1/1 36/2/1 134/7/1
|
||||
f 9/17/3 11/1/3 105/12/3
|
||||
f 27/31/3 29/9/3 123/14/3
|
||||
f 141/12/3 45/17/3 143/7/3
|
||||
f 97/3/3 1/2/3 98/16/3
|
||||
f 106/14/1 104/13/1 154/32/1
|
||||
f 119/19/14 121/20/14 120/18/14
|
||||
f 133/18/17 135/33/17 134/19/17
|
||||
f 117/32/22 119/19/22 118/33/22
|
||||
f 135/36/27 183/34/27 136/24/27
|
||||
f 165/35/28 117/24/28 166/34/28
|
||||
f 181/42/16 182/37/16 183/39/16
|
||||
f 165/43/23 166/40/23 167/41/23
|
||||
f 97/18/24 98/33/24 100/19/24
|
||||
f 167/41/8 168/23/8 169/42/8
|
||||
f 143/22/8 97/18/8 144/20/8
|
||||
f 169/42/24 170/37/24 171/39/24
|
||||
f 141/21/23 143/22/23 142/5/23
|
||||
f 135/14/3 137/13/3 183/32/3
|
||||
f 142/36/29 190/34/29 141/24/29
|
||||
f 123/36/30 171/34/30 124/24/30
|
||||
f 138/11/1 136/12/1 186/20/1
|
||||
f 123/14/3 125/13/3 171/32/3
|
||||
f 189/38/22 190/39/22 191/37/22
|
||||
f 137/13/3 139/11/3 185/19/3
|
||||
f 177/43/26 178/40/26 179/41/26
|
||||
f 174/20/1 126/11/1 172/5/1
|
||||
f 111/14/3 113/13/3 159/32/3
|
||||
f 140/13/1 138/11/1 188/19/1
|
||||
f 191/37/14 192/42/14 145/23/14
|
||||
f 173/19/3 125/13/3 175/20/3
|
||||
f 162/20/1 114/11/1 160/5/1
|
||||
f 187/20/3 139/11/3 189/5/3
|
||||
f 98/14/3 101/13/3 146/32/3
|
||||
f 128/13/1 126/11/1 176/19/1
|
||||
f 113/13/3 115/11/3 161/19/3
|
||||
f 142/14/1 140/13/1 190/32/1
|
||||
f 150/20/1 102/11/1 147/5/1
|
||||
f 127/11/3 129/12/3 175/20/3
|
||||
f 116/13/1 114/11/1 164/19/1
|
||||
f 179/41/11 180/23/11 181/42/11
|
||||
f 101/13/3 103/11/3 149/19/3
|
||||
f 130/14/1 128/13/1 178/32/1
|
||||
f 163/20/3 115/11/3 165/5/3
|
||||
f 145/23/15 148/41/15 146/40/15
|
||||
f 152/19/1 104/13/1 150/20/1
|
||||
f 178/34/31 177/35/31 130/36/31
|
||||
f 166/32/1 118/14/1 164/19/1
|
||||
f 129/21/21 131/22/21 130/5/21
|
||||
f 103/11/3 105/12/3 151/20/3
|
||||
f 147/35/32 99/24/32 146/34/32
|
||||
f 155/41/5 156/23/5 157/42/5
|
||||
f 157/42/17 158/37/17 159/39/17
|
||||
f 153/43/21 154/40/21 155/41/21
|
||||
f 106/36/33 154/34/33 105/24/33
|
||||
f 112/24/34 111/36/34 160/35/34
|
||||
f 109/20/16 111/5/16 110/22/16
|
||||
f 105/32/26 107/19/26 106/33/26
|
||||
f 108/18/11 107/19/11 110/22/11
|
||||
f 192/16/1 193/44/1 148/45/1
|
||||
f 188/16/1 193/44/1 190/45/1
|
||||
f 184/16/1 193/44/1 186/45/1
|
||||
f 180/16/1 193/44/1 182/45/1
|
||||
f 176/16/1 193/44/1 178/45/1
|
||||
f 172/16/1 193/44/1 174/45/1
|
||||
f 168/16/1 193/44/1 170/45/1
|
||||
f 164/16/1 193/44/1 166/45/1
|
||||
f 160/16/1 193/44/1 162/45/1
|
||||
f 156/16/1 193/44/1 158/45/1
|
||||
f 152/16/1 193/44/1 154/45/1
|
||||
f 147/16/1 193/44/1 150/45/1
|
||||
f 146/16/3 194/44/3 145/45/3
|
||||
f 187/3/3 189/45/3 194/44/3
|
||||
f 183/3/3 185/45/3 194/44/3
|
||||
f 179/3/3 181/45/3 194/44/3
|
||||
f 175/3/3 177/45/3 194/44/3
|
||||
f 171/3/3 173/45/3 194/44/3
|
||||
f 167/3/3 169/45/3 194/44/3
|
||||
f 163/3/3 165/45/3 194/44/3
|
||||
f 159/3/3 161/45/3 194/44/3
|
||||
f 155/3/3 157/45/3 194/44/3
|
||||
f 151/3/3 153/45/3 194/44/3
|
||||
f 146/3/3 149/45/3 194/44/3
|
||||
@ -1,48 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'assembler_new_slider.blend'
|
||||
# www.blender.org
|
||||
o Cube.001_Cube
|
||||
v -0.062500 1.312500 0.500000
|
||||
v -0.062500 1.375000 0.500000
|
||||
v -0.062500 1.312500 -0.500000
|
||||
v -0.062500 1.375000 -0.500000
|
||||
v 0.062500 1.312500 0.500000
|
||||
v 0.062500 1.375000 0.500000
|
||||
v 0.062500 1.312500 -0.500000
|
||||
v 0.062500 1.375000 -0.500000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.062500
|
||||
vt 0.000000 0.062500
|
||||
vt 0.812500 0.437500
|
||||
vt 0.812500 0.375000
|
||||
vt 0.937500 0.375000
|
||||
vt -0.000000 0.125000
|
||||
vt 0.062500 0.437500
|
||||
vt 0.062500 0.375000
|
||||
vt 0.187500 0.375000
|
||||
vt 1.000000 0.125000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.000000 0.250000
|
||||
vt 1.000000 0.375000
|
||||
vt 0.000000 0.375000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.937500 0.437500
|
||||
vt 0.187500 0.437500
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
s off
|
||||
f 4/1/1 3/2/1 1/3/1
|
||||
f 8/4/2 7/5/2 3/6/2
|
||||
f 6/7/3 5/3/3 7/2/3
|
||||
f 2/8/4 1/9/4 5/10/4
|
||||
f 3/11/5 7/12/5 5/13/5
|
||||
f 8/12/6 4/14/6 2/15/6
|
||||
f 2/16/1 4/1/1 1/3/1
|
||||
f 4/17/2 8/4/2 3/6/2
|
||||
f 8/11/3 6/7/3 7/2/3
|
||||
f 6/18/4 2/8/4 5/10/4
|
||||
f 1/7/5 3/11/5 5/13/5
|
||||
f 6/13/6 8/12/6 2/15/6
|
||||
@ -1,68 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'chemplant_new_fluid.blend'
|
||||
# www.blender.org
|
||||
o Cylinder.002_Cylinder.001
|
||||
v -0.000000 0.875000 -0.475000
|
||||
v -0.000000 1.000000 -0.475000
|
||||
v 0.237500 0.875000 -0.411362
|
||||
v 0.237500 1.000000 -0.411362
|
||||
v 0.411362 0.875000 -0.237500
|
||||
v 0.411362 1.000000 -0.237500
|
||||
v 0.475000 0.875000 0.000000
|
||||
v 0.475000 1.000000 0.000000
|
||||
v 0.411362 0.875000 0.237500
|
||||
v 0.411362 1.000000 0.237500
|
||||
v 0.237500 0.875000 0.411362
|
||||
v 0.237500 1.000000 0.411362
|
||||
v 0.000000 0.875000 0.475000
|
||||
v 0.000000 1.000000 0.475000
|
||||
v -0.237500 0.875000 0.411362
|
||||
v -0.237500 1.000000 0.411362
|
||||
v -0.411362 0.875000 0.237500
|
||||
v -0.411362 1.000000 0.237500
|
||||
v -0.475000 0.875000 0.000000
|
||||
v -0.475000 1.000000 0.000000
|
||||
v -0.411362 0.875000 -0.237500
|
||||
v -0.411362 1.000000 -0.237500
|
||||
v -0.237500 0.875000 -0.411362
|
||||
v -0.237500 1.000000 -0.411362
|
||||
vt 0.500000 1.000000
|
||||
vt 0.500000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vn 0.258800 0.000000 -0.965900
|
||||
vn 0.707100 0.000000 -0.707100
|
||||
vn 0.965900 0.000000 -0.258800
|
||||
vn 0.965900 0.000000 0.258800
|
||||
vn 0.707100 0.000000 0.707100
|
||||
vn 0.258800 0.000000 0.965900
|
||||
vn -0.258800 0.000000 0.965900
|
||||
vn -0.707100 0.000000 0.707100
|
||||
vn -0.965900 0.000000 0.258800
|
||||
vn -0.965900 0.000000 -0.258800
|
||||
vn -0.258800 0.000000 -0.965900
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
s off
|
||||
f 2/1/1 4/2/1 3/3/1
|
||||
f 4/1/2 6/2/2 5/3/2
|
||||
f 6/1/3 8/2/3 7/3/3
|
||||
f 8/1/4 10/2/4 9/3/4
|
||||
f 10/1/5 12/2/5 11/3/5
|
||||
f 12/1/6 14/2/6 13/3/6
|
||||
f 14/1/7 16/2/7 15/3/7
|
||||
f 16/1/8 18/2/8 17/3/8
|
||||
f 18/1/9 20/2/9 19/3/9
|
||||
f 20/1/10 22/2/10 21/3/10
|
||||
f 24/1/11 2/2/11 1/3/11
|
||||
f 22/1/12 24/2/12 23/3/12
|
||||
f 1/4/1 2/1/1 3/3/1
|
||||
f 3/4/2 4/1/2 5/3/2
|
||||
f 5/4/3 6/1/3 7/3/3
|
||||
f 7/4/4 8/1/4 9/3/4
|
||||
f 9/4/5 10/1/5 11/3/5
|
||||
f 11/4/6 12/1/6 13/3/6
|
||||
f 13/4/7 14/1/7 15/3/7
|
||||
f 15/4/8 16/1/8 17/3/8
|
||||
f 17/4/9 18/1/9 19/3/9
|
||||
f 19/4/10 20/1/10 21/3/10
|
||||
f 23/4/11 24/1/11 1/3/11
|
||||
f 21/4/12 22/1/12 23/3/12
|
||||
@ -1,83 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'chemplant_new_fluidcap.blend'
|
||||
# www.blender.org
|
||||
o Cylinder.002_Cylinder.001
|
||||
v -0.000000 0.875000 -0.475000
|
||||
v -0.000000 1.000000 -0.356250
|
||||
v 0.237500 0.875000 -0.411362
|
||||
v 0.178125 1.000000 -0.308521
|
||||
v 0.411362 0.875000 -0.237500
|
||||
v 0.308522 1.000000 -0.178125
|
||||
v 0.475000 0.875000 0.000000
|
||||
v 0.356250 1.000000 0.000000
|
||||
v 0.411362 0.875000 0.237500
|
||||
v 0.308522 1.000000 0.178125
|
||||
v 0.237500 0.875000 0.411362
|
||||
v 0.178125 1.000000 0.308522
|
||||
v 0.000000 0.875000 0.475000
|
||||
v 0.000000 1.000000 0.356250
|
||||
v -0.237500 0.875000 0.411362
|
||||
v -0.178125 1.000000 0.308522
|
||||
v -0.411362 0.875000 0.237500
|
||||
v -0.308521 1.000000 0.178125
|
||||
v -0.475000 0.875000 0.000000
|
||||
v -0.356250 1.000000 0.000000
|
||||
v -0.411362 0.875000 -0.237500
|
||||
v -0.308522 1.000000 -0.178125
|
||||
v -0.237500 0.875000 -0.411362
|
||||
v -0.178125 1.000000 -0.308521
|
||||
v 0.000000 1.000000 0.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.500000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -1.000000 0.500000
|
||||
vn 0.190700 0.676100 -0.711700
|
||||
vn 0.521000 0.676100 -0.521000
|
||||
vn 0.711700 0.676100 -0.190700
|
||||
vn 0.711700 0.676100 0.190700
|
||||
vn 0.521000 0.676100 0.521000
|
||||
vn 0.190700 0.676100 0.711700
|
||||
vn -0.190700 0.676100 0.711700
|
||||
vn -0.521000 0.676100 0.521000
|
||||
vn -0.711700 0.676100 0.190700
|
||||
vn -0.711700 0.676100 -0.190700
|
||||
vn -0.190700 0.676100 -0.711700
|
||||
vn -0.521000 0.676100 -0.521000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
s off
|
||||
f 2/1/1 4/2/1 3/3/1
|
||||
f 4/1/2 6/2/2 5/3/2
|
||||
f 6/1/3 8/2/3 7/3/3
|
||||
f 8/1/4 10/2/4 9/3/4
|
||||
f 10/1/5 12/2/5 11/3/5
|
||||
f 12/1/6 14/2/6 13/3/6
|
||||
f 14/1/7 16/2/7 15/3/7
|
||||
f 16/1/8 18/2/8 17/3/8
|
||||
f 18/1/9 20/2/9 19/3/9
|
||||
f 19/4/10 20/1/10 22/2/10
|
||||
f 24/1/11 2/2/11 1/3/11
|
||||
f 22/1/12 24/2/12 23/3/12
|
||||
f 20/4/13 25/5/13 22/3/13
|
||||
f 18/4/13 25/5/13 20/3/13
|
||||
f 16/4/13 25/5/13 18/3/13
|
||||
f 14/4/13 25/5/13 16/3/13
|
||||
f 12/4/13 25/5/13 14/3/13
|
||||
f 10/4/13 25/5/13 12/3/13
|
||||
f 8/4/13 25/5/13 10/3/13
|
||||
f 6/4/13 25/5/13 8/3/13
|
||||
f 4/4/13 25/5/13 6/3/13
|
||||
f 2/4/13 25/5/13 4/3/13
|
||||
f 24/4/13 25/5/13 2/3/13
|
||||
f 22/4/13 25/5/13 24/3/13
|
||||
f 1/4/1 2/1/1 3/3/1
|
||||
f 3/4/2 4/1/2 5/3/2
|
||||
f 5/4/3 6/1/3 7/3/3
|
||||
f 7/4/4 8/1/4 9/3/4
|
||||
f 9/4/5 10/1/5 11/3/5
|
||||
f 11/4/6 12/1/6 13/3/6
|
||||
f 13/4/7 14/1/7 15/3/7
|
||||
f 15/4/8 16/1/8 17/3/8
|
||||
f 17/4/9 18/1/9 19/3/9
|
||||
f 21/3/10 19/4/10 22/2/10
|
||||
f 23/4/11 24/1/11 1/3/11
|
||||
f 21/4/12 22/1/12 23/3/12
|
||||
@ -1,75 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'chemplant_new_piston.blend'
|
||||
# www.blender.org
|
||||
o Cube.001_Cube.004
|
||||
v 0.375000 2.750000 -0.375000
|
||||
v 0.375000 3.000000 -0.375000
|
||||
v 0.375000 2.750000 -0.875000
|
||||
v 0.375000 3.000000 -0.875000
|
||||
v 0.875000 2.750000 -0.375000
|
||||
v 0.875000 3.000000 -0.375000
|
||||
v 0.875000 2.750000 -0.875000
|
||||
v 0.875000 3.000000 -0.875000
|
||||
v 0.500000 2.750000 -0.750000
|
||||
v 0.500000 2.750000 -0.500000
|
||||
v 0.750000 2.750000 -0.750000
|
||||
v 0.750000 2.750000 -0.500000
|
||||
v 0.500000 2.250000 -0.750000
|
||||
v 0.500000 2.250000 -0.500000
|
||||
v 0.750000 2.250000 -0.750000
|
||||
v 0.750000 2.250000 -0.500000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.000000 0.125000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.750000 0.125000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.500000 0.375000
|
||||
vt 0.437500 0.312500
|
||||
vt 0.437500 0.187500
|
||||
vt 0.000000 0.375000
|
||||
vt 0.625000 0.375000
|
||||
vt 0.625000 0.125000
|
||||
vt 0.312500 0.187500
|
||||
vt 0.312500 0.312500
|
||||
vt 0.250000 0.375000
|
||||
vt 0.875000 0.375000
|
||||
vt 0.875000 0.125000
|
||||
vt 1.000000 0.125000
|
||||
vt 0.750000 0.375000
|
||||
vt 1.000000 0.375000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
s off
|
||||
f 4/1/1 3/2/1 1/3/1
|
||||
f 8/4/2 7/5/2 3/2/2
|
||||
f 6/6/3 5/7/3 7/5/3
|
||||
f 2/8/4 1/3/4 5/9/4
|
||||
f 7/10/5 11/11/5 9/12/5
|
||||
f 8/13/6 4/6/6 2/4/6
|
||||
f 10/14/4 14/15/4 16/8/4
|
||||
f 1/4/5 10/16/5 12/17/5
|
||||
f 5/18/5 12/17/5 11/11/5
|
||||
f 3/1/5 9/12/5 10/16/5
|
||||
f 11/19/2 15/20/2 13/21/2
|
||||
f 12/22/3 16/8/3 15/20/3
|
||||
f 9/10/1 13/1/1 14/15/1
|
||||
f 2/8/1 4/1/1 1/3/1
|
||||
f 4/1/2 8/4/2 3/2/2
|
||||
f 8/4/3 6/6/3 7/5/3
|
||||
f 6/21/4 2/8/4 5/9/4
|
||||
f 3/1/5 7/10/5 9/12/5
|
||||
f 6/18/6 8/13/6 2/4/6
|
||||
f 12/22/4 10/14/4 16/8/4
|
||||
f 5/18/5 1/4/5 12/17/5
|
||||
f 7/10/5 5/18/5 11/11/5
|
||||
f 1/4/5 3/1/5 10/16/5
|
||||
f 9/23/2 11/19/2 13/21/2
|
||||
f 11/19/3 12/22/3 15/20/3
|
||||
f 10/14/1 9/10/1 14/15/1
|
||||
@ -1,135 +0,0 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'chemplant_new_spinner.blend'
|
||||
# www.blender.org
|
||||
o Cylinder
|
||||
v 0.000000 0.875000 -0.062500
|
||||
v 0.000000 2.937500 -0.062500
|
||||
v 0.044194 0.875000 -0.044194
|
||||
v 0.044194 2.937500 -0.044194
|
||||
v 0.062500 0.875000 0.000000
|
||||
v 0.062500 2.937500 0.000000
|
||||
v 0.044194 0.875000 0.044194
|
||||
v 0.044194 2.937500 0.044194
|
||||
v -0.000000 0.875000 0.062500
|
||||
v -0.000000 2.937500 0.062500
|
||||
v -0.044194 0.875000 0.044194
|
||||
v -0.044194 2.937500 0.044194
|
||||
v -0.062500 0.875000 -0.000000
|
||||
v -0.062500 2.937500 -0.000000
|
||||
v -0.044194 0.875000 -0.044194
|
||||
v -0.044194 2.937500 -0.044194
|
||||
v 0.000000 0.875000 -0.437500
|
||||
v 0.000000 2.875000 -0.437500
|
||||
v 0.437500 0.875000 0.000000
|
||||
v 0.437500 2.875000 0.000000
|
||||
v -0.000000 0.875000 0.437500
|
||||
v -0.000000 2.875000 0.437500
|
||||
v -0.437500 0.875000 -0.000000
|
||||
v -0.437500 2.875000 -0.000000
|
||||
v 0.000000 0.875000 -0.062500
|
||||
v 0.000000 2.875000 -0.062500
|
||||
v 0.062500 0.875000 0.000000
|
||||
v 0.062500 2.875000 0.000000
|
||||
v -0.000000 0.875000 0.062500
|
||||
v -0.000000 2.875000 0.062500
|
||||
v -0.062500 0.875000 -0.000000
|
||||
v -0.062500 2.875000 -0.000000
|
||||
v 0.000000 0.875000 -0.437500
|
||||
v 0.000000 2.875000 -0.437500
|
||||
v 0.437500 0.875000 0.000000
|
||||
v 0.437500 2.875000 0.000000
|
||||
v -0.000000 0.875000 0.437500
|
||||
v -0.000000 2.875000 0.437500
|
||||
v -0.437500 0.875000 -0.000000
|
||||
v -0.437500 2.875000 -0.000000
|
||||
v 0.000000 0.875000 -0.062500
|
||||
v 0.000000 2.875000 -0.062500
|
||||
v 0.062500 0.875000 0.000000
|
||||
v 0.062500 2.875000 0.000000
|
||||
v -0.000000 0.875000 0.062500
|
||||
v -0.000000 2.875000 0.062500
|
||||
v -0.062500 0.875000 -0.000000
|
||||
v -0.062500 2.875000 -0.000000
|
||||
vt 0.166667 0.916667
|
||||
vt 0.138889 0.916667
|
||||
vt 0.138889 -0.000000
|
||||
vt 0.111111 0.916667
|
||||
vt 0.111111 -0.000000
|
||||
vt 0.083333 0.916667
|
||||
vt 0.083333 -0.000000
|
||||
vt 0.055556 0.916667
|
||||
vt 0.055556 -0.000000
|
||||
vt 0.027778 0.916667
|
||||
vt 0.027778 -0.000000
|
||||
vt -0.000000 0.916667
|
||||
vt -0.000000 -0.000000
|
||||
vt -0.000000 0.944444
|
||||
vt 0.027778 0.972222
|
||||
vt 0.194444 0.916667
|
||||
vt 0.166667 -0.000000
|
||||
vt 0.222222 0.916667
|
||||
vt 0.194444 -0.000000
|
||||
vt 0.555556 0.888889
|
||||
vt 0.555556 -0.000000
|
||||
vt 0.722222 -0.000000
|
||||
vt 0.388889 0.888889
|
||||
vt 0.388889 -0.000000
|
||||
vt 0.222222 0.888889
|
||||
vt 0.222222 -0.000000
|
||||
vt 0.888889 0.888889
|
||||
vt 0.888889 0.000000
|
||||
vt 0.055556 0.944444
|
||||
vt 0.055556 0.972222
|
||||
vt 0.000000 0.972222
|
||||
vt 0.722222 0.888889
|
||||
vn 0.382700 0.000000 -0.923900
|
||||
vn 0.923900 0.000000 -0.382700
|
||||
vn 0.923900 0.000000 0.382700
|
||||
vn 0.382700 0.000000 0.923900
|
||||
vn -0.382700 0.000000 0.923900
|
||||
vn -0.923900 0.000000 0.382700
|
||||
vn 0.000000 1.000000 -0.000000
|
||||
vn -0.382700 0.000000 -0.923900
|
||||
vn -0.923900 0.000000 -0.382700
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -1.000000 0.000000 -0.000000
|
||||
vn -0.000000 0.000000 1.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
s off
|
||||
f 2/1/1 4/2/1 3/3/1
|
||||
f 4/2/2 6/4/2 5/5/2
|
||||
f 6/4/3 8/6/3 7/7/3
|
||||
f 8/6/4 10/8/4 9/9/4
|
||||
f 10/8/5 12/10/5 11/11/5
|
||||
f 12/10/6 14/12/6 13/13/6
|
||||
f 14/14/7 10/10/7 2/15/7
|
||||
f 16/16/8 2/1/8 1/17/8
|
||||
f 14/18/9 16/16/9 15/19/9
|
||||
f 32/20/10 31/21/10 23/22/10
|
||||
f 30/23/11 29/24/11 21/21/11
|
||||
f 28/25/12 27/26/12 19/24/12
|
||||
f 18/27/11 17/28/11 25/22/11
|
||||
f 39/22/12 47/21/12 48/20/12
|
||||
f 37/21/13 45/24/13 46/23/13
|
||||
f 35/24/10 43/26/10 44/25/10
|
||||
f 41/22/13 33/28/13 34/27/13
|
||||
f 1/17/1 2/1/1 3/3/1
|
||||
f 3/3/2 4/2/2 5/5/2
|
||||
f 5/5/3 6/4/3 7/7/3
|
||||
f 7/7/4 8/6/4 9/9/4
|
||||
f 9/9/5 10/8/5 11/11/5
|
||||
f 11/11/6 12/10/6 13/13/6
|
||||
f 6/29/7 4/30/7 2/15/7
|
||||
f 2/15/7 16/31/7 14/14/7
|
||||
f 14/14/7 12/12/7 10/10/7
|
||||
f 10/10/7 8/8/7 6/29/7
|
||||
f 6/29/7 2/15/7 10/10/7
|
||||
f 15/19/8 16/16/8 1/17/8
|
||||
f 13/26/9 14/18/9 15/19/9
|
||||
f 24/32/10 32/20/10 23/22/10
|
||||
f 22/20/11 30/23/11 21/21/11
|
||||
f 20/23/12 28/25/12 19/24/12
|
||||
f 26/32/11 18/27/11 25/22/11
|
||||
f 40/32/12 39/22/12 48/20/12
|
||||
f 38/20/13 37/21/13 46/23/13
|
||||
f 36/23/10 35/24/10 44/25/10
|
||||
f 42/32/13 41/22/13 34/27/13
|
||||
|
Before Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 756 B |
|
Before Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 469 B |
|
Before Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 352 B |
|
Before Width: | Height: | Size: 674 B |
|
Before Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 443 B |
|
Before Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 524 B |
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 303 B |