Compare commits

..

No commits in common. "master" and "1.0.27_X5615" have entirely different histories.

598 changed files with 37044 additions and 19995 deletions

View File

@ -10,15 +10,11 @@
**This is for 1.7.10!** For 1.12, check out these projects:
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE/releases
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE
* NTM Extended Edition (Alcater): https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
For further ports, try:
* NTM Remake on 1.18.2: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
* HBM Modernized on 1.20.1: https://github.com/Raptor324/HBM-Modernized/releases
* NTM Neo on 1.21.1: https://github.com/ohiomannnn/HBMsNTM-NEO-EDITION/releases
For 1.18, try Martin's remake: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
## Downloading pre-compiled versions from GitHub

View File

@ -1,21 +1,55 @@
## Added
* Plasma forge
* Plasma-powered assembly machine
* Used to produce lategame items that until now were regular assembler recipes
* Target pistol
* Weapon steel tier pistol that holds 15 rounds and shoots .22 LR
* Accepts silencers
* NCR Ranger Power Armor
* Legendary set, like the remnants power armor
* Stats are largely similar, but has a speed boost when sprinting
* Red room exclusive
* Comes with the power armor - melee controller item
* If the full set is equipped, the melee controller allows for powerful melee attacks
* Left click does two rapid swings, right click causes both arms to swing at once
* The NCRPA's blades are armor-piercing and gib enemies on death
* The blades do 250% damage on large enemies, i.e. ones with 100 or more max health
* And also the power armor - ranged controller
* Allows the NCRPA to fire rockets straight from the intentory
* Left click fires guided rockets and right click unguided ones
* Only does 25 damage max, but has no reload and a fire rate of 120 per minute
## Changed
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
* Hoppers and buckets can now be made out of steel
* RoR gauges now show the lowest and highest configured value on the actual gauge
* The steel sword now looks like a medieval broad sword with the appropriate scale
* All remaining items have been removed from the template folder, siren tracks and plate stamps are now made in the anvil
* Gerald assembly now requires stellar flux
* The DFC parts are now made in the plasma forge, with the recipes being more expensive
* The restrictions for firing Folly (using the scope, waiting for the startup) no longer apply to NPCs (which can never fulfill them anyway), allowing them to actually use it
* The plinking sound played when a drill cannot break a block now only plays once for the entire AoE instead of once for every single block that couldnt be broken
* Reworked the industrial turbine
* New model and texture
* Removed the GUI, it now uses the same in-world compressor toggle as the leviathan turbine
* No longer has a volatile power buffer, power isn't buffered at all anymore, similar to steam engines and MHD turbines
* Steam capacity changes based on compression level, the ratio for turbine cascades is now 1:1:1:1
* Comes with a flywheel, energy output slowly ramps up as steam is supplied and slowly goes down as steam cuts out
* Recipe is similar to the old inudstrial turbine, but slightly simplified and cheaper
* Leviathan turbines no longer have a power buffer
* Updated russian and chinese localization
* The PWR can now be controlled via RoR
* The RoR value reader can read core and hull heat as well as fuel depletion in percent
* The RoR controller can set the control rod level in percent as well as jetison all loaded fuel
* Having 528, expensive or rampant mode enabled now displays a badge in the top left corner, showing that it is enabled
* Badges can be disabled with the `BADGES_HUD` value of `/ntmclient`
* The badge only shows up if the "true" configuration is used, 528 requires default settings, expensive requires the precision assembler config to not be modified and rampant needs most of the default settings enabled
* If all three modes are enabled, the "328 mode" badge also appears
* Removed toothpicks, as they haven't been used in recipes for well over a year
* Cleaned up a ton of unused assets
* The old crucible smelting rules when not using a template can be restores with the `/ntmserver` value `LEGACY_CRUCIBLE_RULES`
* Due to repeated complaints, power armor sounds are now generally more quiet, with 25% volume for steps and 50% volume for jumping and landing
* Reduced mask man's projectile resistance from 75% to 50%
* Reduced maskman's resistance to damage above 50 from 75% to 50%
* Remnants power armor can now use the melee controller, allowing Sergeant Arch Dornan to beat the snot out of people
* Improved gibbing
* All cybercrab variants can now be gibbed, turning into metal fragments
* Iron golems now also turn into metal instead of fleshy chunks
* Slimes can now be gibbed, turning into slime globs
* Creepers now also gib into slime instead of blood
* The ZIRNOX can now be toggled by supplying redstone to one of its ports
## Fixed
* Fixed size 15 dual kerosene thruster not rendering at all
* Fixed HUD/jetpack toggle popup not working at all on multiplayer servers
* Fixed assembly machine NEI handler not being able to handle all thirteen inputs at once
* Fixed RBMK fuel channels playing the meltdown sound when broken while hot with meltdowns disabled
# Fixed
* Fixed proxy tiles that do not use electricity at all visually connecting to cables
* Fixed missing texture for canned horse slime
* Fixed incorrect ore dictionary key used by enriched naquadah watz pellet recipe
* Fixed out of bounds light level for the RTG blast furnace
* Fixed the recipe configs now allowing NBT data for output items, rendering the precision assembler and annihilator configs useless

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5634
mod_build_number=5615
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\
@ -64,7 +64,6 @@ credits=HbMinecraft,\
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
\ Abel1502 (abilities GUI, optimization, crate upgrade recipes, strand caster improvements, varous tweaks),\
\ Darek505 (armor rendering compatibility fix),\
\ mikkerlo (autosaw tree detection improvements),\
\ ranch21 (improved HUD gauges),\
\ SuperCraftAlex (tooltips)\
\ Ice-Arrow (research reactor tweaks),\

View File

@ -131,14 +131,14 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
world.setBlockMetadataWithNotify(x, y, z, offset + world.getBlockMetadata(x, y, z), 3);
}
public int[] findCore(IBlockAccess world, int x, int y, int z) {
public int[] findCore(World world, int x, int y, int z) {
positions.clear();
return findCoreRec(world, x, y, z);
}
List<ThreeInts> positions = new ArrayList<>();
public int[] findCoreRec(IBlockAccess world, int x, int y, int z) {
public int[] findCoreRec(World world, int x, int y, int z) {
ThreeInts pos = new ThreeInts(x, y, z);

View File

@ -8,7 +8,14 @@ import com.hbm.blocks.generic.*;
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
import com.hbm.blocks.machine.*;
import com.hbm.blocks.machine.albion.*;
import com.hbm.blocks.machine.fusion.*;
import com.hbm.blocks.machine.fusion.MachineFusionBoiler;
import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
import com.hbm.blocks.machine.fusion.MachineFusionCoupler;
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
import com.hbm.blocks.machine.fusion.MachineFusionKlystronCreative;
import com.hbm.blocks.machine.fusion.MachineFusionMHDT;
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
import com.hbm.blocks.machine.pile.*;
import com.hbm.blocks.machine.rbmk.*;
import com.hbm.blocks.network.*;
@ -50,6 +57,8 @@ 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;
@ -694,6 +703,14 @@ 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;
@ -703,6 +720,12 @@ 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;
@ -741,7 +764,6 @@ public class ModBlocks {
public static Block red_cable_gauge;
public static Block red_cable_box;
public static Block red_connector;
public static Block red_connector_super;
public static Block red_pylon;
public static Block red_pylon_medium_wood;
public static Block red_pylon_medium_wood_transformer;
@ -880,7 +902,6 @@ public class ModBlocks {
public static Block fusion_boiler;
public static Block fusion_mhdt;
public static Block fusion_coupler;
public static Block fusion_plasma_forge;
public static Block machine_icf_press;
public static Block icf_component;
@ -975,14 +996,18 @@ 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;
@ -1077,8 +1102,6 @@ public class ModBlocks {
public static Block rbmk_control;
public static Block rbmk_control_mod;
public static Block rbmk_control_auto;
public static Block rbmk_control_reasim;
public static Block rbmk_control_reasim_auto;
public static Block rbmk_blank;
public static Block rbmk_boiler;
public static Block rbmk_reflector;
@ -1090,9 +1113,6 @@ public class ModBlocks {
public static Block rbmk_heater;
public static Block rbmk_console;
public static Block rbmk_crane_console;
public static Block rbmk_display;
public static Block rbmk_key_pad;
public static Block rbmk_gauge;
public static Block rbmk_autoloader;
public static Block rbmk_loader;
public static Block rbmk_steam_inlet;
@ -1221,6 +1241,8 @@ 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");
@ -1324,7 +1346,6 @@ 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");
@ -1366,7 +1387,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");
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_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");
@ -1430,8 +1451,8 @@ public class ModBlocks {
deco_lead = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
deco_beryllium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).noFortune().setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_blank_top");
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_side");
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
deco_emitter = new BlockEmitter().setBlockName("deco_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":emitter");
part_emitter = new PartEmitter().setBlockName("part_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":part_top");
@ -1702,7 +1723,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 + ":block_steel");
bomb_multi = new BombMulti(Material.iron).setBlockName("bomb_multi").setCreativeTab(MainRegistry.nukeTab).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":bomb_multi1");
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);
@ -1794,6 +1815,13 @@ 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");
@ -1803,6 +1831,12 @@ 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);
@ -1856,7 +1890,6 @@ public class ModBlocks {
red_cable_gauge = new BlockCableGauge().setBlockName("red_cable_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
red_cable_box = new PowerCableBox(Material.iron).setBlockName("red_cable_box").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
red_connector_super = new ConnectorRedWireSuper(Material.iron).setBlockName("red_connector_super").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
red_pylon_medium_wood = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
red_pylon_medium_wood_transformer = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
@ -1997,7 +2030,6 @@ public class ModBlocks {
fusion_boiler = new MachineFusionBoiler().setBlockName("fusion_boiler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_mhdt = new MachineFusionMHDT().setBlockName("fusion_mhdt").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_coupler = new MachineFusionCoupler().setBlockName("fusion_coupler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_plasma_forge = new MachineFusionPlasmaForge().setBlockName("fusion_plasma_forge").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_icf_press = new MachineICFPress().setBlockName("machine_icf_press").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -2029,7 +2061,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 + ":concrete");
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");
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");
@ -2100,8 +2132,6 @@ public class ModBlocks {
rbmk_control = new RBMKControl(false).setBlockName("rbmk_control").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control");
rbmk_control_mod = new RBMKControl(true).setBlockName("rbmk_control_mod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_mod");
rbmk_control_auto = new RBMKControlAuto().setBlockName("rbmk_control_auto").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_auto");
rbmk_control_reasim = new RBMKControl(false).setBlockName("rbmk_control_reasim").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_reasim");
rbmk_control_reasim_auto = new RBMKControlAuto().setBlockName("rbmk_control_reasim_auto").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_reasim_auto");
rbmk_blank = new RBMKBlank().setBlockName("rbmk_blank").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_blank");
rbmk_boiler = new RBMKBoiler().setBlockName("rbmk_boiler").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_boiler");
rbmk_reflector = new RBMKReflector().setBlockName("rbmk_reflector").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_reflector");
@ -2113,9 +2143,6 @@ public class ModBlocks {
rbmk_heater = new RBMKHeater().setBlockName("rbmk_heater").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_heater");
rbmk_console = new RBMKConsole().setBlockName("rbmk_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_console");
rbmk_crane_console = new RBMKCraneConsole().setBlockName("rbmk_crane_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_crane_console");
rbmk_display = new RBMKDisplay().setBlockName("rbmk_display").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
rbmk_key_pad = new RBMKKeyPad().setBlockName("rbmk_key_pad").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
rbmk_gauge = new RBMKGauge().setBlockName("rbmk_gauge").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
rbmk_autoloader = new RBMKAutoloader().setBlockName("rbmk_autoloader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_autoloader");
rbmk_loader = new RBMKLoader(Material.iron).setBlockName("rbmk_loader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_loader");
rbmk_steam_inlet = new RBMKInlet(Material.iron).setBlockName("rbmk_steam_inlet").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_steam_inlet");
@ -2162,8 +2189,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 + ":block_steel");
machine_pumpjack = new MachinePumpjack().setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
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_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");
@ -2184,19 +2211,23 @@ 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(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 + ":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_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 + ":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_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");
@ -2364,6 +2395,8 @@ 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
@ -3070,6 +3103,13 @@ 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());
@ -3079,6 +3119,12 @@ 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);
@ -3094,8 +3140,6 @@ public class ModBlocks {
GameRegistry.registerBlock(rbmk_control, rbmk_control.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_mod, rbmk_control_mod.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_auto, rbmk_control_auto.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_reasim, rbmk_control_reasim.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_reasim_auto, rbmk_control_reasim_auto.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_blank, rbmk_blank.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_boiler, rbmk_boiler.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_reflector, rbmk_reflector.getUnlocalizedName());
@ -3107,9 +3151,6 @@ public class ModBlocks {
GameRegistry.registerBlock(rbmk_heater, rbmk_heater.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_console, rbmk_console.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_crane_console, rbmk_crane_console.getUnlocalizedName());
register(rbmk_display);
register(rbmk_key_pad);
register(rbmk_gauge);
register(rbmk_autoloader);
register(rbmk_loader);
register(rbmk_steam_inlet);
@ -3125,8 +3166,7 @@ public class ModBlocks {
register(red_cable_gauge);
register(red_cable_box);
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
register(red_connector);
register(red_connector_super);
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
register(red_pylon_medium_wood);
register(red_pylon_medium_wood_transformer);
@ -3223,10 +3263,14 @@ 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);
@ -3359,7 +3403,6 @@ public class ModBlocks {
register(fusion_boiler);
register(fusion_mhdt);
register(fusion_coupler);
register(fusion_plasma_forge);
register(watz_element);
register(watz_cooler);
@ -3407,10 +3450,10 @@ public class ModBlocks {
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
//Rails
register(rail_wood);
register(rail_narrow);
register(rail_highspeed);
register(rail_booster);
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_narrow_straight);
register(rail_narrow_curve);
register(rail_large_straight);

View File

@ -1,13 +1,10 @@
package com.hbm.blocks.generic;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.BlockPillar;
import com.hbm.items.ModItems;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -41,12 +38,5 @@ public class BlockForgottenLock extends BlockPillar {
public static void generate(World world, int x, int y, int z, int meta, ForgeDirection dir) {
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
int len = 15;
for(int w = -2; w <= 2; w++) for(int h = -2; h <= 2; h++) for(int d = 0; d < len; d++) {
Block b = (w == -2 || w == 2 || h == -2 || h == 2 || d == len - 1) ? ModBlocks.brick_forgotten : Blocks.air;
world.setBlock(x - dir.offsetX * d + rot.offsetX * w, y + h, z - dir.offsetZ * d + rot.offsetZ * w, b);
}
}
}

View File

@ -155,24 +155,5 @@ public class BlockLoot extends BlockContainer {
nbt.setDouble("z" + i, item.getZ());
}
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 1,
yCoord,
zCoord - 1,
xCoord + 2,
yCoord + 3,
zCoord + 2
);
}
return bb;
}
}
}

View File

@ -5,7 +5,6 @@ import java.util.Random;
import com.hbm.blocks.IBlockMulti;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.main.NTMSounds;
import com.hbm.world.gen.nbt.INBTTileEntityTransformable;
import com.hbm.world.gen.nbt.INBTBlockTransformable;
@ -103,9 +102,9 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
return true;
} else {
if(plushie.type == PlushieType.HUNDUN) {
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, NTMSounds.BLOCK_HUNDUNS_MAGNIFICENT_HOWL, 100F, 1F);
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.hunduns_magnificent_howl", 100F, 1F);
} else {
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, NTMSounds.BLOCK_PLUSHY, 0.25F, 1F);
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.squeakyToy", 0.25F, 1F);
}
return true;
}
@ -161,7 +160,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
NUMBERNINE( "Number Nine", "None of y'all deserve coal."),
HUNDUN( "Hundun", "混沌"),
DERG( "Dragon", "Squeeze him."); // blerg
DERG( "Dragon", "Squeeze him.");
public String label;
public String inscription;

View File

@ -163,7 +163,6 @@ public class BlockStorageCrate extends BlockContainer implements IBlockMulti, IL
}
if(!nbt.hasNoTags()) {
nbt.setLong("stacklock", world.rand.nextLong());
drop.stackTagCompound = nbt;
}
@ -174,7 +173,7 @@ public class BlockStorageCrate extends BlockContainer implements IBlockMulti, IL
}
}
if(drop.hasTagCompound()) {
if (drop.hasTagCompound()) {
try {
byte[] abyte = CompressedStreamTools.compress(drop.stackTagCompound);

View File

@ -0,0 +1,93 @@
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;
}
}

View File

@ -0,0 +1,67 @@
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");
}
}
}

View File

@ -0,0 +1,85 @@
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;
}
}
}

View File

@ -0,0 +1,79 @@
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;
}
}

View File

@ -0,0 +1,11 @@
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);
}
}

View File

@ -0,0 +1,52 @@
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);
}
}

View File

@ -0,0 +1,64 @@
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);
}
}

View File

@ -0,0 +1,64 @@
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;
}
}

View File

@ -0,0 +1,65 @@
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;
}
}

View File

@ -0,0 +1,66 @@
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);
}
}

View File

@ -10,7 +10,6 @@ import com.hbm.blocks.rail.IRenderBlock;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
@ -31,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
public class MachineFunnel extends BlockContainer implements ITooltipProvider, IRenderBlock {
@ -120,9 +120,9 @@ public class MachineFunnel extends BlockContainer implements ITooltipProvider, I
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
GL11.glTranslatef(0F, -0.5F, 0F);
tessellator.startDrawingQuads();
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, false);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, false);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, false);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, false);
tessellator.draw();
}
@ -130,9 +130,9 @@ public class MachineFunnel extends BlockContainer implements ITooltipProvider, I
@SideOnly(Side.CLIENT)
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
}
}

View File

@ -13,7 +13,6 @@ import com.hbm.inventory.gui.GUIAnvil;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.tileentity.IGUIProvider;
@ -36,6 +35,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
public class NTMAnvil extends BlockFallingNT implements ITooltipProvider, IGUIProvider {
@ -211,12 +211,12 @@ public class NTMAnvil extends BlockFallingNT implements ITooltipProvider, IGUIPr
if(falling.getMeta() == 4) rotation = 180F / 180F * (float)Math.PI;
tessellator.addTranslation(0F, -0.5F, 0F);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.anvil, "Top", getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.anvil, "Bottom", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.anvil, "Front", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.anvil, "Back", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.anvil, "Left", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.anvil, "Right", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Top", getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Bottom", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Front", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Back", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Left", getIcon(0, 0), tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Right", getIcon(0, 0), tessellator, rotation, true);
tessellator.addTranslation(0F, 0.5F, 0F);
}
}

View File

@ -7,7 +7,6 @@ import java.util.Random;
import com.hbm.blocks.BlockEnums.LightType;
import com.hbm.blocks.ISpotlight;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.world.gen.nbt.INBTBlockTransformable;
import cpw.mods.fml.client.registry.RenderingRegistry;
@ -24,6 +23,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class Spotlight extends Block implements ISpotlight, INBTBlockTransformable {
@ -61,11 +61,11 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
return renderID;
}
public HFRWavefrontObject getModel() {
public WavefrontObject getModel() {
switch(type) {
case FLUORESCENT: return (HFRWavefrontObject) ResourceManager.fluorescent_lamp;
case HALOGEN: return (HFRWavefrontObject) ResourceManager.flood_lamp;
default: return (HFRWavefrontObject) ResourceManager.cage_lamp;
case FLUORESCENT: return (WavefrontObject) ResourceManager.fluorescent_lamp;
case HALOGEN: return (WavefrontObject) ResourceManager.flood_lamp;
default: return (WavefrontObject) ResourceManager.cage_lamp;
}
}

View File

@ -8,14 +8,13 @@ import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.albion.TileEntityPABeamline;
import api.hbm.block.IToolable;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class BlockPABeamline extends BlockDummyable implements ITooltipProvider, IToolable {
public class BlockPABeamline extends BlockDummyable implements ITooltipProvider {
public BlockPABeamline() {
super(Material.iron);
@ -36,19 +35,4 @@ public class BlockPABeamline extends BlockDummyable implements ITooltipProvider,
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
addStandardInfo(stack, player, list, ext);
}
@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) return true;
int[] pos = this.findCore(world, x, y, z);
if(pos != null) {
TileEntityPABeamline tile = (TileEntityPABeamline) world.getTileEntity(pos[0], pos[1], pos[2]);
tile.window = !tile.window;
tile.markDirty();
}
return false;
}
}

View File

@ -1,38 +0,0 @@
package com.hbm.blocks.machine.fusion;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
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;
public class MachineFusionPlasmaForge extends BlockDummyable {
public MachineFusionPlasmaForge() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityFusionPlasmaForge();
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
return null;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return this.standardOpenBehavior(world, x, y, z, player, 0);
}
@Override public int[] getDimensions() { return new int[] { 4, 0, 5, 5, 5, 5 }; }
@Override public int getOffset() { return 5; }
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
}
}

View File

@ -2,12 +2,12 @@ package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.handler.neutron.NeutronNodeWorld;
import com.hbm.handler.neutron.RBMKNeutronHandler.RBMKNeutronNode;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRBMKLid;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.rbmk.RBMKDials;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKBase;
@ -20,14 +20,12 @@ 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.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.util.ForgeDirection;
@ -36,18 +34,7 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
public static boolean dropLids = true;
public static boolean digamma = false;
public static final int LID_NONE = 0;
public static final int LID_STANDARD = 1;
public static final int LID_GLASS = 2;
public static int renderLid = LID_NONE;
public static boolean overrideOnlyRenderSides = false;
public IIcon coverTextureTop;
public IIcon coverTextureSide;
public IIcon glassTextureTop;
public IIcon glassTextureSide;
public IIcon textureTop;
public ResourceLocation coverTexture;
protected RBMKBase() {
super(Material.iron);
@ -55,41 +42,11 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
this.setResistance(30F);
}
@Override public boolean isOpaqueCube() { return true; }
@Override public boolean renderAsNormalBlock() { return true; }
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
if(overrideOnlyRenderSides && side < 2) return false;
if(renderLid != LID_NONE && side > 1) return true;
return super.shouldSideBeRendered(world, x, y, z, side);
}
public boolean hasOwnLid() {
return this == ModBlocks.rbmk_control || this == ModBlocks.rbmk_control_auto || this == ModBlocks.rbmk_control_mod ||
this == ModBlocks.rbmk_control_reasim || this == ModBlocks.rbmk_control_reasim_auto;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon(this.getTextureName() + "_side");
this.textureTop = reg.registerIcon(this.getTextureName() + "_top");
if(hasOwnLid()) return;
this.coverTextureTop = reg.registerIcon(this.getTextureName() + "_cover_top");
this.coverTextureSide = reg.registerIcon(this.getTextureName() + "_cover_side");
this.glassTextureTop = reg.registerIcon(this.getTextureName() + "_glass_top");
this.glassTextureSide = reg.registerIcon(this.getTextureName() + "_glass_side");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(!hasOwnLid()) {
if(renderLid == LID_STANDARD) return side == 0 || side == 1 ? coverTextureTop : coverTextureSide;
if(renderLid == LID_GLASS) return side == 0 || side == 1 ? glassTextureTop : glassTextureSide;
}
return side == 0 || side == 1 ? textureTop : blockIcon;
public Block setBlockTextureName(String texture) {
this.textureName = texture;
this.coverTexture = new ResourceLocation(RefStrings.MODID + ":textures/blocks/" + (texture.split(":")[1]) + ".png");
return this;
}
@Override
@ -104,24 +61,34 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
public boolean openInv(World world, int x, int y, int z, EntityPlayer player) {
if(world.isRemote) return true;
if(world.isRemote) {
return true;
}
int[] pos = this.findCore(world, x, y, z);
if(pos == null) return false;
if(pos == null)
return false;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntityRBMKBase)) return false;
if(!(te instanceof TileEntityRBMKBase))
return false;
TileEntityRBMKBase rbmk = (TileEntityRBMKBase) te;
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKLid) {
if(!rbmk.hasLid()) return false;
if(!rbmk.hasLid())
return false;
}
if(!player.isSneaking())
if(!player.isSneaking()) {
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
return true;
} else {
return true;
}
}
@Override
@ -158,12 +125,6 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
public static final ForgeDirection DIR_NORMAL_LID = ForgeDirection.EAST;
public static final ForgeDirection DIR_GLASS_LID = ForgeDirection.SOUTH;
public static int metaToLid(int meta) {
if(meta - 10 == DIR_NORMAL_LID.ordinal()) return LID_STANDARD;
if(meta - 10 == DIR_GLASS_LID.ordinal()) return LID_GLASS;
return LID_NONE;
}
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(world), this, dir);
@ -225,9 +186,7 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
world.spawnEntityInWorld(new EntityItem(world, pos[0] + 0.5, pos[1] + 0.5 + RBMKDials.getColumnHeight(world), pos[2] + 0.5, new ItemStack(ModItems.rbmk_lid_glass)));
}
rbmk.explodeOnBroken = false;
world.setBlockMetadataWithNotify(pos[0], pos[1], pos[2], DIR_NO_LID.ordinal() + offset, 3);
rbmk.explodeOnBroken = true;
}
return true;

View File

@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKBoiler extends RBMKPipedBase {
public class RBMKBoiler extends RBMKBase {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
@ -25,4 +25,9 @@ public class RBMKBoiler extends RBMKPipedBase {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return openInv(world, x, y, z, player);
}
@Override
public int getRenderType(){
return this.renderIDControl;
}
}

View File

@ -1,47 +1,26 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.ModBlocks;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class RBMKControl extends RBMKPipedBase {
public class RBMKControl extends RBMKBase {
public boolean moderated = false;
public IIcon textureBottom;
public RBMKControl(boolean moderated) {
super();
this.moderated = moderated;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
if(this == ModBlocks.rbmk_control_reasim)
this.textureBottom = reg.registerIcon(this.getTextureName() + "_bottom");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(this.renderLid == LID_NONE && this == ModBlocks.rbmk_control_reasim && side == 0) return textureBottom;
return super.getIcon(side, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset) return new TileEntityRBMKControlManual();
if(meta >= this.extra) return new TileEntityProxyCombo();
if(meta >= this.offset)
return new TileEntityRBMKControlManual();
return null;
}
@ -54,4 +33,9 @@ public class RBMKControl extends RBMKPipedBase {
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}
@Override
public int getRenderType(){
return this.renderIDControl;
}
}

View File

@ -1,39 +1,19 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.ModBlocks;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlAuto;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class RBMKControlAuto extends RBMKPipedBase {
public IIcon textureBottom;
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
if(this == ModBlocks.rbmk_control_reasim_auto)
this.textureBottom = reg.registerIcon(this.getTextureName() + "_bottom");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(this.renderLid == LID_NONE && this == ModBlocks.rbmk_control_reasim_auto && side == 0) return textureBottom;
return super.getIcon(side, meta);
}
public class RBMKControlAuto extends RBMKBase {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset) return new TileEntityRBMKControlAuto();
if(meta >= this.offset)
return new TileEntityRBMKControlAuto();
return null;
}
@ -46,4 +26,9 @@ public class RBMKControlAuto extends RBMKPipedBase {
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}
@Override
public int getRenderType(){
return this.renderIDControl;
}
}

View File

@ -1,6 +1,5 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKCooler;
import net.minecraft.tileentity.TileEntity;
@ -10,8 +9,10 @@ public class RBMKCooler extends RBMKBase {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset) return new TileEntityRBMKCooler();
if(hasExtra(meta)) return new TileEntityProxyCombo().fluid();
if(meta >= this.offset)
return new TileEntityRBMKCooler();
return null;
}

View File

@ -1,29 +0,0 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKDisplay;
import api.hbm.block.IToolable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKDisplay extends RBMKMiniPanelBase implements IToolable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityRBMKDisplay();
}
@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) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileEntityRBMKDisplay) {
((TileEntityRBMKDisplay) tile).rotate();
}
}
return true;
}
}

View File

@ -1,25 +0,0 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge;
import api.hbm.block.IToolable;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKGauge extends RBMKMiniPanelBase implements IToolable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityRBMKGauge();
}
@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) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;
}
}

View File

@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKHeater extends RBMKPipedBase {
public class RBMKHeater extends RBMKBase {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
@ -25,4 +25,9 @@ public class RBMKHeater extends RBMKPipedBase {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return openInv(world, x, y, z, player);
}
@Override
public int getRenderType(){
return this.renderIDControl;
}
}

View File

@ -1,51 +0,0 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKKeyPad;
import api.hbm.block.IToolable;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKKeyPad extends RBMKMiniPanelBase implements IToolable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityRBMKKeyPad();
}
@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) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;
}
@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;
if(player.isSneaking()) return false;
if(hitX != 0 && hitX != 1 && hitZ != 0 && hitZ != 1 && side != 0 && side != 1) {
TileEntityRBMKKeyPad tile = (TileEntityRBMKKeyPad) world.getTileEntity(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
int indexHit = 0;
if(meta == 2 && hitX < 0.5) indexHit = 1;
if(meta == 3 && hitX > 0.5) indexHit = 1;
if(meta == 4 && hitZ > 0.5) indexHit = 1;
if(meta == 5 && hitZ < 0.5) indexHit = 1;
if(hitY < 0.5) indexHit += 2;
if(!tile.keys[indexHit].active) return false;
tile.keys[indexHit].click();
}
return true;
}
}

View File

@ -5,7 +5,6 @@ import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.generic.BlockGeneric;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.trait.FT_Coolable;
import com.hbm.inventory.fluid.trait.FT_Heatable;
@ -25,11 +24,12 @@ public class RBMKLoader extends BlockGeneric implements IFluidConnectorBlock, IT
@Override
public boolean canConnect(FluidType type, IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
if(dir == ForgeDirection.UP) return type.hasTrait(FT_Heatable.class);
return type.hasTrait(FT_Coolable.class) || type == Fluids.PERFLUOROMETHYL;
return type.hasTrait(FT_Coolable.class);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -1,87 +0,0 @@
package com.hbm.blocks.machine.rbmk;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.Library;
import com.hbm.render.block.ISBRHUniversal;
import com.hbm.render.util.RenderBlocksNT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public abstract class RBMKMiniPanelBase extends BlockContainer implements ISBRHUniversal {
public RBMKMiniPanelBase() {
super(Material.iron);
}
@Override public int getRenderType() { return renderID; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
return true;
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
int meta = world.getBlockMetadata(x, y, z);
setBlockBounds(0, 0, 0, 1, 1, 1);
if(meta == Library.POS_X.ordinal()) setBlockBounds(0, 0, 0, 0.75F, 1, 1);
if(meta == Library.POS_Z.ordinal()) setBlockBounds(0, 0, 0, 1, 1, 0.75F);
if(meta == Library.NEG_X.ordinal()) setBlockBounds(0.25F, 0, 0, 1, 1, 1);
if(meta == Library.NEG_Z.ordinal()) setBlockBounds(0, 0, 0.25F, 1, 1, 1);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
@Override
public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks) {
GL11.glPushMatrix();
RenderBlocks renderer = (RenderBlocks) renderBlocks;
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
renderer.setRenderBounds(0.25D, 0D, 0D, 1D, 1D, 1D);
RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks) {
RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world);
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
tessellator.setColorOpaque_F(1, 1, 1);
int meta = world.getBlockMetadata(x, y, z);
renderer.setRenderBounds(meta == 4 ? 0.25D : 0D, 0D, meta == 2 ? 0.25D : 0D, meta == 5 ? 0.75D : 1D, 1D, meta == 3 ? 0.75D : 1D);
renderer.renderStandardBlock(block, x, y, z);
return true;
}
}

View File

@ -1,34 +0,0 @@
package com.hbm.blocks.machine.rbmk;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
public abstract class RBMKPipedBase extends RBMKBase {
public static boolean renderPipes = false;
public IIcon pipeTextureTop;
public IIcon pipeTextureSide;
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
this.pipeTextureTop = reg.registerIcon(this.getTextureName() + "_pipe_top");
this.pipeTextureSide = reg.registerIcon(this.getTextureName() + "_pipe_side");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(renderPipes) return side == 0 || side == 1 ? pipeTextureTop : pipeTextureSide;
return super.getIcon(side, meta);
}
@Override
public int getRenderType(){
return this.renderIDControl;
}
}

View File

@ -4,18 +4,12 @@ import com.hbm.handler.BossSpawnHandler;
import com.hbm.items.machine.ItemRBMKLid;
import com.hbm.items.machine.ItemRBMKRod;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.rbmk.RBMKDials;
import com.hbm.tileentity.TileEntityProxyInventory;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class RBMKRod extends RBMKBase {
@ -27,41 +21,18 @@ public class RBMKRod extends RBMKBase {
this.moderated = moderated;
}
public IIcon inner;
public IIcon fuel;
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset) return new TileEntityRBMKRod();
if(hasExtra(meta)) return new TileEntityProxyCombo().inventory();
if(meta >= this.offset)
return new TileEntityRBMKRod();
if(hasExtra(meta))
return new TileEntityProxyInventory();
return null;
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
if(meta >= this.offset && !RBMKDials.getMeltdownsDisabled(world)) {
TileEntityRBMKRod tile = (TileEntityRBMKRod) world.getTileEntity(x, y, z);
if(tile != null && tile.explodeOnBroken) {
if(tile.slots[0] != null && tile.slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getHullHeat(tile.slots[0]) >= 1500) {
tile.meltdown();
}
}
}
super.breakBlock(world, x, y, z, block, meta);
world.removeTileEntity(x, y, z);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
this.inner = reg.registerIcon(this.getTextureName() + "_inner");
this.fuel = reg.registerIcon(this.getTextureName() + "_fuel");
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
BossSpawnHandler.markFBI(player);
@ -82,7 +53,7 @@ public class RBMKRod extends RBMKBase {
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKRod && rbmk.slots[0] == null) {
rbmk.slots[0] = player.getHeldItem().copy();
rbmk.slots[0].stackSize = 1;
if(!player.capabilities.isCreativeMode) player.getHeldItem().stackSize--;
player.getHeldItem().stackSize--;
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
return false;
}

View File

@ -1,6 +1,6 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.TileEntityProxyInventory;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRodReaSim;
import net.minecraft.tileentity.TileEntity;
@ -14,8 +14,13 @@ public class RBMKRodReaSim extends RBMKRod {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset) return new TileEntityRBMKRodReaSim();
if(hasExtra(meta)) return new TileEntityProxyCombo().inventory();
if(meta >= this.offset)
return new TileEntityRBMKRodReaSim();
if(hasExtra(meta))
return new TileEntityProxyInventory();
return null;
}
}

View File

@ -1,62 +0,0 @@
package com.hbm.blocks.network;
import java.util.List;
import com.hbm.lib.Library;
import com.hbm.tileentity.network.TileEntityConnectorSuper;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class ConnectorRedWireSuper extends PylonBase {
public ConnectorRedWireSuper(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityConnectorSuper();
}
@Override public int onBlockPlaced(World world, int x, int y, int z, int side, float fX, float fY, float fZ, int meta) { return side; }
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
setBlockBounds(world.getBlockMetadata(x, y, z));
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
@Override public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { setBlockBounds(world.getBlockMetadata(x, y, z)); }
private void setBlockBounds(int meta) {
float pixel = 0.0625F;
float min = pixel * 5F;
float max = pixel * 11F;
ForgeDirection dir = ForgeDirection.getOrientation(meta).getOpposite();
float minX = dir == Library.NEG_X ? 0F : dir == Library.POS_X ? 0F : min;
float maxX = dir == Library.POS_X ? 1F : dir == Library.NEG_X ? 1F : max;
float minY = dir == Library.NEG_Y ? 0F : dir == Library.POS_Y ? 0F : min;
float maxY = dir == Library.POS_Y ? 1F : dir == Library.NEG_Y ? 1F : max;
float minZ = dir == Library.NEG_Z ? 0F : dir == Library.POS_Z ? 0F : min;
float maxZ = dir == Library.POS_Z ? 1F : dir == Library.NEG_Z ? 1F : max;
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "100m");
}
}

View File

@ -9,15 +9,17 @@ import li.cil.oc.api.machine.Arguments;
import li.cil.oc.api.machine.Callback;
import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.SimpleComponent;
import org.lwjgl.input.Keyboard;
import com.hbm.blocks.ILookOverlay;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIPump;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.BobMathUtil;
@ -33,6 +35,10 @@ import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
@ -44,6 +50,7 @@ import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.util.ForgeDirection;
@ -339,4 +346,98 @@ public class FluidPump extends BlockContainer implements INBTBlockTransformable,
throw new NoSuchMethodException();
}
}
@SideOnly(Side.CLIENT)
public static class GUIPump extends GuiScreen {
protected final TileEntityFluidPump pump;
private GuiTextField textPlacementPriority;
private GuiButton buttonPressure;
private GuiButton buttonPriority;
private int pressure;
private int priority;
public GUIPump(TileEntityFluidPump pump) {
this.pump = pump;
this.pressure = pump.tank[0].getPressure();
this.priority = pump.priority.ordinal();
}
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
textPlacementPriority = new GuiTextField(fontRendererObj, this.width / 2 - 150, 100, 90, 20);
textPlacementPriority.setText("" + pump.bufferSize);
textPlacementPriority.setMaxStringLength(5);
buttonPressure = new GuiButton(0, this.width / 2 - 50, 100, 90, 20, pressure + " PU");
buttonPriority = new GuiButton(1, this.width / 2 + 50, 100, 90, 20, pump.priority.name());
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
drawDefaultBackground();
drawString(fontRendererObj, "Throughput:", this.width / 2 - 150, 80, 0xA0A0A0);
drawString(fontRendererObj, "(max. 10,000mB)", this.width / 2 - 150, 90, 0xA0A0A0);
textPlacementPriority.drawTextBox();
drawString(fontRendererObj, "Pressure:", this.width / 2 - 50, 80, 0xA0A0A0);
buttonPressure.drawButton(mc, mouseX, mouseY);
drawString(fontRendererObj, "Priority:", this.width / 2 + 50, 80, 0xA0A0A0);
buttonPriority.drawButton(mc, mouseX, mouseY);
super.drawScreen(mouseX, mouseY, partialTicks);
}
@Override
public void onGuiClosed() {
Keyboard.enableRepeatEvents(false);
NBTTagCompound data = new NBTTagCompound();
data.setByte("pressure", (byte) pressure);
data.setByte("priority", (byte) priority);
try { data.setInteger("capacity", Integer.parseInt(textPlacementPriority.getText())); } catch(Exception ex) {}
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, pump.xCoord, pump.yCoord, pump.zCoord));
}
@Override
protected void keyTyped(char typedChar, int keyCode) {
super.keyTyped(typedChar, keyCode);
if(textPlacementPriority.textboxKeyTyped(typedChar, keyCode)) return;
if(keyCode == 1 || keyCode == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
this.mc.thePlayer.closeScreen();
}
}
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
super.mouseClicked(mouseX, mouseY, mouseButton);
textPlacementPriority.mouseClicked(mouseX, mouseY, mouseButton);
if(buttonPressure.mousePressed(mc, mouseX, mouseY)) {
this.pressure++;
if(pressure > 5) pressure = 0;
buttonPressure.displayString = pressure + " PU";
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
}
if(buttonPriority.mousePressed(mc, mouseX, mouseY)) {
this.priority++;
if(priority >= ConnectionPriority.values().length) priority = 0;
buttonPriority.displayString = EnumUtil.grabEnumSafely(ConnectionPriority.class, priority).name();
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
}
}
@Override public boolean doesGuiPauseGame() { return false; }
}
}

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -20,6 +19,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -154,7 +154,7 @@ public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRender
GL11.glScaled(0.2, 0.2, 0.2);
GL11.glTranslated(2.5, -0.0625, -1.5);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -167,7 +167,7 @@ public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRender
if(meta == 14) rotation = 180F / 180F * (float) Math.PI;
if(meta == 13) rotation = 270F / 180F * (float) Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
}
}

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -20,6 +19,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -124,7 +124,7 @@ public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRen
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
GL11.glTranslated(0, -0.0625, 0);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -134,7 +134,7 @@ public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRen
float rotation = 0;
if(meta == 2 || meta == 3 || meta == 12 || meta == 13) rotation = 90F / 180F * (float) Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
}
}

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -19,6 +18,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -148,7 +148,7 @@ public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRen
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.3, 0.3, 0.3);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_buffer, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_buffer, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -165,7 +165,7 @@ public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRen
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_buffer, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_buffer, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -20,6 +19,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardCurveBase extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -215,7 +215,7 @@ public class RailStandardCurveBase extends BlockDummyable implements IRailNTM, I
GL11.glRotated(60, 1, 0, 0);
GL11.glTranslated(2, 0, 2);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -228,7 +228,7 @@ public class RailStandardCurveBase extends BlockDummyable implements IRailNTM, I
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
}
}

View File

@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import cpw.mods.fml.relauncher.Side;
@ -13,6 +12,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardCurveWide7 extends RailStandardCurveBase {
@ -94,7 +94,7 @@ public class RailStandardCurveWide7 extends RailStandardCurveBase {
GL11.glRotated(60, 1, 0, 0);
GL11.glTranslated(3, 0, 3);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -107,7 +107,7 @@ public class RailStandardCurveWide7 extends RailStandardCurveBase {
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
}
}

View File

@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import cpw.mods.fml.relauncher.Side;
@ -13,6 +12,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardCurveWide9 extends RailStandardCurveBase {
@ -129,7 +129,7 @@ public class RailStandardCurveWide9 extends RailStandardCurveBase {
GL11.glRotated(60, 1, 0, 0);
GL11.glTranslated(4, 0, 4);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -142,7 +142,7 @@ public class RailStandardCurveWide9 extends RailStandardCurveBase {
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
}
}

View File

@ -6,7 +6,6 @@ import com.hbm.blocks.BlockDummyable;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -21,6 +20,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -150,7 +150,7 @@ public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRende
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.3, 0.3, 0.3);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_ramp, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_ramp, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -167,7 +167,7 @@ public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRende
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_ramp, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_ramp, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -20,6 +19,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardStraight extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -131,7 +131,7 @@ public class RailStandardStraight extends BlockDummyable implements IRailNTM, IR
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.3, 0.3, 0.3);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -146,7 +146,7 @@ public class RailStandardStraight extends BlockDummyable implements IRailNTM, IR
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -20,6 +19,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardStraightShort extends BlockDummyable implements IRailNTM, IRenderBlock {
@ -127,7 +127,7 @@ public class RailStandardStraightShort extends BlockDummyable implements IRailNT
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.7, 0.7, 0.7);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, 0, false);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();
}
@ -142,7 +142,7 @@ public class RailStandardStraightShort extends BlockDummyable implements IRailNT
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, rotation, true);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);

View File

@ -7,7 +7,6 @@ import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import cpw.mods.fml.relauncher.Side;
@ -26,6 +25,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardSwitch extends BlockRailWaypointSystem implements IRenderBlock {
@ -205,7 +205,7 @@ public class RailStandardSwitch extends BlockRailWaypointSystem implements IRend
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.1, 0.1, 0.1);
tessellator.startDrawingQuads();
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch, "Rail", this.blockIcon, tessellator, 0, false);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch, "Rail", this.blockIcon, tessellator, 0, false);
tessellator.draw();
}
@ -222,13 +222,13 @@ public class RailStandardSwitch extends BlockRailWaypointSystem implements IRend
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch, "Rail", this.blockIcon, tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch, "Rail", this.blockIcon, tessellator, rotation, true);
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityRailSwitch) {
TileEntityRailSwitch sw = (TileEntityRailSwitch) tile;
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
}
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);

View File

@ -8,7 +8,6 @@ import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HFRWavefrontObject;
import com.hbm.render.util.ObjUtil;
import cpw.mods.fml.relauncher.Side;
@ -23,6 +22,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implements IRenderBlock {
@ -202,7 +202,7 @@ public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implement
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.1, 0.1, 0.1);
tessellator.startDrawingQuads();
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, 0, false);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, 0, false);
tessellator.draw();
}
@ -219,13 +219,13 @@ public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implement
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, rotation, true);
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityRailSwitch) {
TileEntityRailSwitch sw = (TileEntityRailSwitch) tile;
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch_flipped, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch_flipped, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
}
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);

View File

@ -0,0 +1,118 @@
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);
}
}
}
}

View File

@ -0,0 +1,38 @@
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);
}
}
}
}

View File

@ -81,16 +81,19 @@ public class WorldConfig {
public static boolean enableSulfurCave = true;
public static boolean enableAsbestosCave = true;
// public static int radioStructure = 500;
public static int antennaStructure = 250;
public static int atomStructure = 500;
public static int dungeonStructure = 64;
public static int relayStructure = 500;
public static int satelliteStructure = 500;
// public static int factoryStructure = 1000;
public static int dudStructure = 500;
public static int spaceshipStructure = 1000;
public static int barrelStructure = 5000;
public static int geyserWater = 3000;
public static int geyserChlorine = 3000;
public static int geyserVapor = 250;
public static int geyserVapor = 500;
public static int capsuleStructure = 100;
public static int arcticStructure = 500;
public static int jungleStructure = 2000;
@ -201,10 +204,13 @@ public class WorldConfig {
enableAsbestosCave = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.C01_enableAsbestosCave", "Toggles asbestos caves", true);
final String CATEGORY_DUNGEON = CommonConfig.CATEGORY_DUNGEONS;
// radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);
atomStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.02_atomSpawn", "Spawn power plant on every nTH chunk", 500);
dungeonStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.04_dungeonSpawn", "Spawn library dungeon on every nTH chunk", 64);
relayStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.05_relaySpawn", "Spawn relay on every nTH chunk", 500);
satelliteStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.06_satelliteSpawn", "Spawn satellite dish on every nTH chunk", 500);
// factoryStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.09_factorySpawn", "Spawn factory on every nTH chunk", 1000);
dudStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.10_dudSpawn", "Spawn dud on every nTH chunk", 500);
spaceshipStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.11_spaceshipSpawn", "Spawn spaceship on every nTH chunk", 1000);
barrelStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.12_barrelSpawn", "Spawn waste tank on every nTH chunk", 5000);
@ -214,7 +220,7 @@ public class WorldConfig {
vaultfreq = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.16_vaultSpawn", "Spawn locked safe on every nTH chunk", 2500);
geyserWater = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.17_geyserWaterSpawn", "Spawn water geyser on every nTH chunk", 3000);
geyserChlorine = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.18_geyserChlorineSpawn", "Spawn poison geyser on every nTH chunk", 3000);
geyserVapor = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.19_geyserVaporSpawn", "Spawn vapor geyser on every nTH chunk", 250);
geyserVapor = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.19_geyserVaporSpawn", "Spawn vapor geyser on every nTH chunk", 500);
capsuleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.21_capsuleSpawn", "Spawn landing capsule on every nTH chunk", 100);
arcticStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.22_arcticVaultSpawn", "Spawn arctic code vault on every nTH chunk", 500);
jungleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.23_jungleDungeonSpawn", "Spawn jungle dungeon on every nTH chunk", 2000);
@ -239,10 +245,13 @@ public class WorldConfig {
craterBiomeOuterRad = (float) CommonConfig.createConfigDouble(config, CATEGORY_BIOMES, "17.R02_craterBiomeOuterRad", "RAD/s for the outer crater biome", 0.5D);
craterBiomeWaterMult = (float) CommonConfig.createConfigDouble(config, CATEGORY_BIOMES, "17.R03_craterBiomeWaterMult", "Multiplier for RAD/s in crater biomes when in water", 5D);
// radioStructure = CommonConfig.setDefZero(radioStructure, 1000);
antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000);
atomStructure = CommonConfig.setDefZero(atomStructure, 1000);
dungeonStructure = CommonConfig.setDefZero(dungeonStructure, 1000);
relayStructure = CommonConfig.setDefZero(relayStructure, 1000);
satelliteStructure = CommonConfig.setDefZero(satelliteStructure, 1000);
// factoryStructure = CommonConfig.setDefZero(factoryStructure, 1000);
dudStructure = CommonConfig.setDefZero(dudStructure, 1000);
spaceshipStructure = CommonConfig.setDefZero(spaceshipStructure, 1000);
barrelStructure = CommonConfig.setDefZero(barrelStructure, 1000);

View File

@ -174,8 +174,8 @@ public class MineralRecipes {
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_neptunium_fuel, 3), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_neptunium });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_neptunium_fuel, 1), new Object[] { "nuggetNeptunium237", "nuggetNeptunium237", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_neptunium_fuel, 1), new Object[] { "tinyNp237", "tinyNp237", "tinyU238", "tinyU238", "tinyU238", "tinyU238" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_mox_fuel, 3), new Object[] { ModItems.billet_uranium_fuel, ModItems.billet_uranium_fuel, "billetPlutonium239" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_mox_fuel, 1), new Object[] { "nuggetPlutonium239", "nuggetPlutonium239", ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_mox_fuel, 3), new Object[] { ModItems.billet_uranium_fuel, ModItems.billet_uranium_fuel, ModItems.billet_pu_mix });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_mox_fuel, 1), new Object[] { ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 3), new Object[] { ModItems.billet_schrabidium, ModItems.billet_neptunium, ModItems.billet_beryllium });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 1), new Object[] { ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, "nuggetNeptunium237", "nuggetNeptunium237", ModItems.nugget_beryllium, ModItems.nugget_beryllium }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 1), new Object[] { ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, "tinyNp237", "tinyNp237", ModItems.nugget_beryllium, ModItems.nugget_beryllium }));

View File

@ -100,7 +100,6 @@ public class RodRecipes {
addRBMKRod(ModItems.billet_uranium_fuel, ModItems.rbmk_fuel_meu);
addRBMKRod(U233, ModItems.rbmk_fuel_heu233);
addRBMKRod(U235, ModItems.rbmk_fuel_heu235);
addRBMKRod(ModItems.billet_uzh, ModItems.rbmk_fuel_uzh);
addRBMKRod(ModItems.billet_thorium_fuel, ModItems.rbmk_fuel_thmeu);
addRBMKRod(ModItems.billet_mox_fuel, ModItems.rbmk_fuel_mox);
addRBMKRod(ModItems.billet_plutonium_fuel, ModItems.rbmk_fuel_lep);

View File

@ -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', Fluids.TRITIUM.getDict(16_000) });
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 });
//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 });

View File

@ -16,8 +16,9 @@ public class TemplateTab extends CreativeTabs {
@Override
public Item getTabIconItem() {
if(ModItems.crucible_template != null) {
return ModItems.crucible_template;
if(ModItems.assembly_template != null)
{
return ModItems.assembly_template;
}
return Items.iron_pickaxe;

View File

@ -12,7 +12,6 @@ import com.hbm.entity.projectile.rocketbehavior.RocketTargetingPredictive;
import com.hbm.items.weapon.ItemAmmoHIMARS;
import com.hbm.items.weapon.ItemAmmoHIMARS.HIMARSRocket;
import com.hbm.main.MainRegistry;
import com.hbm.util.Vec3NT;
import api.hbm.entity.IRadarDetectable;
import cpw.mods.fml.relauncher.Side;
@ -99,21 +98,20 @@ public class EntityArtilleryRocket extends EntityThrowableInterp implements IChu
if(!worldObj.isRemote) {
Vec3NT delta = new Vec3NT(this.lastTargetPos.xCoord - this.posX, this.lastTargetPos.yCoord - this.posY, this.lastTargetPos.zCoord - this.posZ);
double momentum = Math.sqrt(motionX * motionX + motionY * motionY + motionZ * motionZ) * motionMult();
if(delta.lengthVector() <= momentum * 1.5) {
if(this.targetEntity == null || !this.targetEntity.isEntityAlive()) {
//shitty hack, figure out what's happening here
if(this.targeting == null) this.targeting = new RocketTargetingPredictive();
if(this.steering == null) this.steering = new RocketSteeringBallisticArc();
if(this.targetEntity == null) {
Vec3 delta = Vec3.createVectorHelper(this.lastTargetPos.xCoord - this.posX, this.lastTargetPos.yCoord - this.posY, this.lastTargetPos.zCoord - this.posZ);
if(delta.lengthVector() <= 15D) {
this.targeting = null;
this.steering = null;
}
delta.normalizeSelf();
motionX = delta.xCoord * momentum / motionMult();
motionY = delta.yCoord * momentum / motionMult();
motionZ = delta.zCoord * momentum / motionMult();
} else {
}
if(this.targeting != null && this.targetEntity != null) this.targeting.recalculateTargetPosition(this, this.targetEntity);
if(this.steering != null) this.steering.adjustCourse(this, 25D, 15D);
}
loadNeighboringChunks((int)Math.floor(posX / 16D), (int)Math.floor(posZ / 16D));
this.getType().onUpdate(this);

View File

@ -454,24 +454,21 @@ public class EntityChemical extends EntityThrowableNT {
}
}
Block block = worldObj.getBlock(x, y, z);
if(type == Fluids.SEEDSLURRY) {
for(int i = -1; i <= 1; i++) for(int j = -1; j <= 1; j++) for(int k = -1; k <= 1; k++) {
Block block = worldObj.getBlock(x + i, y + j, z + k);
if(block == Blocks.dirt || block == ModBlocks.waste_earth || block == ModBlocks.dirt_dead || block == ModBlocks.dirt_oily) {
if(worldObj.getBlockLightValue(x + i, y + j + 1, z + k) >= 9 && worldObj.getBlockLightOpacity(x + i, y + j + 1, z + k) <= 2) {
worldObj.setBlock(x + i, y + j, z + k, Blocks.grass);
if(worldObj.getBlockLightValue(x, y + 1, z) >= 9 && worldObj.getBlockLightOpacity(x, y + 1, z) <= 2) {
worldObj.setBlock(x, y, z, Blocks.grass);
}
}
int meta = worldObj.getBlockMetadata(x + i, y + j, z + k);
if(block == Blocks.cobblestone) worldObj.setBlock(x + i, y + j, z + k, Blocks.mossy_cobblestone);
if(block == Blocks.stonebrick && meta == 0) worldObj.setBlock(x + i, y + j, z + k, Blocks.stonebrick, 1, 3);
if(block == ModBlocks.waste_earth) worldObj.setBlock(x + i, y + j, z + k, Blocks.grass);
if(block == ModBlocks.brick_concrete) worldObj.setBlock(x + i, y + j, z + k, ModBlocks.brick_concrete_mossy);
if(block == ModBlocks.concrete_brick_slab && meta % 8 == 0) worldObj.setBlock(x + i, y + j, z + k, ModBlocks.concrete_brick_slab, meta + 1, 3);
if(block == ModBlocks.brick_concrete_stairs) worldObj.setBlock(x + i, y + j, z + k, ModBlocks.brick_concrete_mossy_stairs, meta, 3);
}
int meta = worldObj.getBlockMetadata(x, y, z);
if(block == Blocks.cobblestone) worldObj.setBlock(x, y, z, Blocks.mossy_cobblestone);
if(block == Blocks.stonebrick && meta == 0) worldObj.setBlock(x, y, z, Blocks.stonebrick, 1, 3);
if(block == ModBlocks.waste_earth) worldObj.setBlock(x, y, z, Blocks.grass);
if(block == ModBlocks.brick_concrete) worldObj.setBlock(x, y, z, ModBlocks.brick_concrete_mossy);
if(block == ModBlocks.concrete_brick_slab && meta % 8 == 0) worldObj.setBlock(x, y, z, ModBlocks.concrete_brick_slab, meta + 1, 3);
if(block == ModBlocks.brick_concrete_stairs) worldObj.setBlock(x, y, z, ModBlocks.brick_concrete_mossy_stairs, meta, 3);
}
this.setDead();

View File

@ -5,15 +5,12 @@ import com.hbm.handler.ArmorModHandler;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.items.armor.ItemModShield;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.PlayerInformPacket;
import com.hbm.tileentity.IGUIProvider;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
@ -89,9 +86,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
this.enableBackpack = !this.enableBackpack;
if(this.enableBackpack)
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK, 1000), (EntityPlayerMP) player);
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK);
else
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK, 1000), (EntityPlayerMP) player);
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK);
}
}
if (key == EnumKeybind.TOGGLE_MAGNET){
@ -99,9 +96,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
this.enableMagnet = !this.enableMagnet;
if(this.enableMagnet)
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET, 1000), (EntityPlayerMP) player);
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET);
else
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET, 1000), (EntityPlayerMP) player);
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Magnet OFF", MainRegistry.proxy.ID_MAGNET);
}
}
if(key == EnumKeybind.TOGGLE_HEAD) {
@ -110,9 +107,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
this.enableHUD = !this.enableHUD;
if(this.enableHUD)
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD, 1000), (EntityPlayerMP) player);
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD);
else
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD, 1000), (EntityPlayerMP) player);
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "HUD OFF", MainRegistry.proxy.ID_HUD);
}
}

View File

@ -108,23 +108,25 @@ 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.fusion_klystron),
new ItemStack(ModBlocks.fusion_torus),
new ItemStack(ModBlocks.fusion_mhdt),
new ItemStack(ModBlocks.machine_intake, 3),
new ItemStack(ModBlocks.iter),
new ItemStack(ModBlocks.plasma_heater),
new ItemStack(ModItems.fusion_shield_vaporwave),
ItemBattery.getFullBattery(ModItems.battery_spark),
new ItemStack(ModBlocks.machine_chemical_factory, 4),
new ItemStack(ModBlocks.machine_chemplant, 10),
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.PERFLUOROMETHYL.getID()),
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.XENON.getID()),
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.MERCURY.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, 3),
new ItemStack(ModBlocks.machine_chungus, 1),
new ItemStack(ModBlocks.machine_large_turbine, 3),
new ItemStack(ModItems.template_folder, 1),
new ItemStack(Items.paper, 64),
new ItemStack(Items.dye, 64)

View File

@ -4,9 +4,7 @@ import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import com.google.gson.Gson;
@ -20,7 +18,6 @@ import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import com.hbm.util.Compat;
import com.hbm.util.ShadyUtil;
import com.hbm.util.Tuple.Pair;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@ -29,23 +26,17 @@ import net.minecraft.item.ItemStack;
public class HazmatRegistry {
public static List<Pair<Item, Double>> external = new ArrayList();
public static double helmet = 0.2D;
public static double chest = 0.4D;
public static double legs = 0.3D;
public static double boots = 0.1D;
public static void initDefault() {
for(Pair<Item, Double> pair : external) {
HazmatRegistry.registerHazmat(pair.getKey(), pair.getValue());
}
//assuming coefficient of 10
//real coefficient turned out to be 5
//oops
double helmet = 0.2D;
double chest = 0.4D;
double legs = 0.3D;
double boots = 0.1D;
double iron = 0.0225D; // 5%
double gold = 0.0225D; // 5%
double steel = 0.045D; // 10%
@ -59,6 +50,15 @@ public class HazmatRegistry {
double paa = 1.7D; // 97%
double liquidator = 2.4D; // 99.6%
double t51 = 1D; // 90%
double ajr = 1.3D; // 95%
double bj = 1D; // 90%
double env = 1.0D; // 99%
double hev = 2.3D; // 99.5%
double rpa = 2D; // 99%
double trench = 1D; // 90%
double fau = 4D; // 99.99%
double dns = 5D; // 99.999%
double security = 0.825D; // 85%
double star = 1D; // 90%
double cmb = 1.3D; // 95%
@ -85,6 +85,66 @@ public class HazmatRegistry {
HazmatRegistry.registerHazmat(ModItems.liquidator_legs, liquidator * legs);
HazmatRegistry.registerHazmat(ModItems.liquidator_boots, liquidator * boots);
HazmatRegistry.registerHazmat(ModItems.t45_helmet, t51 * helmet);
HazmatRegistry.registerHazmat(ModItems.t45_plate, t51 * chest);
HazmatRegistry.registerHazmat(ModItems.t45_legs, t51 * legs);
HazmatRegistry.registerHazmat(ModItems.t45_boots, t51 * boots);
HazmatRegistry.registerHazmat(ModItems.t51_helmet, t51 * helmet);
HazmatRegistry.registerHazmat(ModItems.t51_plate, t51 * chest);
HazmatRegistry.registerHazmat(ModItems.t51_legs, t51 * legs);
HazmatRegistry.registerHazmat(ModItems.t51_boots, t51 * boots);
HazmatRegistry.registerHazmat(ModItems.ajr_helmet, ajr * helmet);
HazmatRegistry.registerHazmat(ModItems.ajr_plate, ajr * chest);
HazmatRegistry.registerHazmat(ModItems.ajr_legs, ajr * legs);
HazmatRegistry.registerHazmat(ModItems.ajr_boots, ajr * boots);
HazmatRegistry.registerHazmat(ModItems.ajro_helmet, ajr * helmet);
HazmatRegistry.registerHazmat(ModItems.ajro_plate, ajr * chest);
HazmatRegistry.registerHazmat(ModItems.ajro_legs, ajr * legs);
HazmatRegistry.registerHazmat(ModItems.ajro_boots, ajr * boots);
HazmatRegistry.registerHazmat(ModItems.bj_helmet, bj * helmet);
HazmatRegistry.registerHazmat(ModItems.bj_plate, bj * chest);
HazmatRegistry.registerHazmat(ModItems.bj_plate_jetpack, bj * chest);
HazmatRegistry.registerHazmat(ModItems.bj_legs, bj * legs);
HazmatRegistry.registerHazmat(ModItems.bj_boots, bj * boots);
HazmatRegistry.registerHazmat(ModItems.steamsuit_helmet, 1.3 * helmet);
HazmatRegistry.registerHazmat(ModItems.steamsuit_plate, 1.3 * chest);
HazmatRegistry.registerHazmat(ModItems.steamsuit_legs, 1.3 * legs);
HazmatRegistry.registerHazmat(ModItems.steamsuit_boots, 1.3 * boots);
HazmatRegistry.registerHazmat(ModItems.envsuit_helmet, env * helmet);
HazmatRegistry.registerHazmat(ModItems.envsuit_plate, env * chest);
HazmatRegistry.registerHazmat(ModItems.envsuit_legs, env * legs);
HazmatRegistry.registerHazmat(ModItems.envsuit_boots, env * boots);
HazmatRegistry.registerHazmat(ModItems.hev_helmet, hev * helmet);
HazmatRegistry.registerHazmat(ModItems.hev_plate, hev * chest);
HazmatRegistry.registerHazmat(ModItems.hev_legs, hev * legs);
HazmatRegistry.registerHazmat(ModItems.hev_boots, hev * boots);
HazmatRegistry.registerHazmat(ModItems.rpa_helmet, rpa * helmet);
HazmatRegistry.registerHazmat(ModItems.rpa_plate, rpa * chest);
HazmatRegistry.registerHazmat(ModItems.rpa_legs, rpa * legs);
HazmatRegistry.registerHazmat(ModItems.rpa_boots, rpa * boots);
HazmatRegistry.registerHazmat(ModItems.trenchmaster_helmet, trench * helmet);
HazmatRegistry.registerHazmat(ModItems.trenchmaster_plate, trench * chest);
HazmatRegistry.registerHazmat(ModItems.trenchmaster_legs, trench * legs);
HazmatRegistry.registerHazmat(ModItems.trenchmaster_boots, trench * boots);
HazmatRegistry.registerHazmat(ModItems.fau_helmet, fau * helmet);
HazmatRegistry.registerHazmat(ModItems.fau_plate, fau * chest);
HazmatRegistry.registerHazmat(ModItems.fau_legs, fau * legs);
HazmatRegistry.registerHazmat(ModItems.fau_boots, fau * boots);
HazmatRegistry.registerHazmat(ModItems.dns_helmet, dns * helmet);
HazmatRegistry.registerHazmat(ModItems.dns_plate, dns * chest);
HazmatRegistry.registerHazmat(ModItems.dns_legs, dns * legs);
HazmatRegistry.registerHazmat(ModItems.dns_boots, dns * boots);
HazmatRegistry.registerHazmat(ModItems.paa_plate, paa * chest);
HazmatRegistry.registerHazmat(ModItems.paa_legs, paa * legs);
HazmatRegistry.registerHazmat(ModItems.paa_boots, paa * boots);

View File

@ -3,9 +3,6 @@ package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.AssemblyMachineRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.inventory.recipes.loader.GenericRecipes;
import net.minecraft.block.Block;
public class AssemblyMachineRecipeHandler extends NEIGenericRecipeHandler {
@ -13,20 +10,9 @@ public class AssemblyMachineRecipeHandler extends NEIGenericRecipeHandler {
super(ModBlocks.machine_assembly_machine.getLocalizedName(), AssemblyMachineRecipes.INSTANCE, ModBlocks.machine_assembly_machine);
}
public AssemblyMachineRecipeHandler(String displayName, GenericRecipes recipeSet, Block... machines) { super(displayName, recipeSet, machines); }
@Override public String getRecipeID() { return "ntmAssemblyMachine"; }
@Override public int getInputXOffset(GenericRecipe recipe, int inputCount) { return inputCount > 12 ? -9 : inputCount > 9 ? 18 : 0; }
@Override public int getOutputXOffset(GenericRecipe recipe, int outputCount) { return getOffset(recipe); }
@Override public int getMachineXOffset(GenericRecipe recipe) { return getOffset(recipe); }
public int getOffset(GenericRecipe recipe) {
int length = 0;
if(recipe.inputItem != null) length += recipe.inputItem.length;
if(recipe.inputFluid != null) length += recipe.inputFluid.length;
if(length > 12) return 27;
if(length > 9) return 18;
return 0;
}
@Override public int getInputXOffset(GenericRecipe recipe, int inputCount) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
@Override public int getOutputXOffset(GenericRecipe recipe, int outputCount) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
@Override public int getMachineXOffset(GenericRecipe recipe) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
}

View File

@ -1,13 +0,0 @@
package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
public class PlasmaForgeRecipeHandler extends AssemblyMachineRecipeHandler {
public PlasmaForgeRecipeHandler() {
super(ModBlocks.fusion_plasma_forge.getLocalizedName(), PlasmaForgeRecipes.INSTANCE, ModBlocks.fusion_plasma_forge);
}
@Override public String getRecipeID() { return "ntmPlasmaForge"; }
}

View File

@ -355,8 +355,6 @@ public class RBMKNeutronHandler {
((TileEntityRBMKRod) originTE).receiveFlux(this);
return;
} else if(type == RBMKType.ABSORBER) {
((TileEntityRBMKAbsorber) nodeTE).heat += RBMKDials.getAbsorberHeatConversion(worldObj) * this.fluxQuantity;
if(absorberEfficiency == 1)
return;

View File

@ -89,7 +89,6 @@ public class HazardRegistry {
public static final float u235 = 1.0F;
public static final float u238 = 0.25F;
public static final float uf = 0.5F;
public static final float uzh = 0.125F;
public static final float np237 = 2.5F;
public static final float npf = 1.5F;
public static final float pu = 7.5F;
@ -289,7 +288,6 @@ public class HazardRegistry {
HazardSystem.register(billet_uranium_fuel, makeData(RADIATION, uf * billet));
HazardSystem.register(ingot_uranium_fuel, makeData(RADIATION, uf * ingot));
HazardSystem.register(block_uranium_fuel, makeData(RADIATION, uf * block));
HazardSystem.register(billet_uzh, makeData(RADIATION, uzh * billet));
HazardSystem.register(nugget_plutonium_fuel, makeData(RADIATION, puf * nugget));
HazardSystem.register(billet_plutonium_fuel, makeData(RADIATION, puf * billet));
@ -369,7 +367,6 @@ public class HazardRegistry {
registerRBMKRod(rbmk_fuel_meu, uf * rod_rbmk, wst * rod_rbmk * 21.5F);
registerRBMKRod(rbmk_fuel_heu233, u233 * rod_rbmk, wst * rod_rbmk * 31F);
registerRBMKRod(rbmk_fuel_heu235, u235 * rod_rbmk, wst * rod_rbmk * 30F);
registerRBMKRod(rbmk_fuel_uzh, uzh * rod_rbmk, wst * rod_rbmk * 20F);
registerRBMKRod(rbmk_fuel_thmeu, thf * rod_rbmk, wst * rod_rbmk * 17.5F);
registerRBMKRod(rbmk_fuel_lep, puf * rod_rbmk, wst * rod_rbmk * 25F);
registerRBMKRod(rbmk_fuel_mep, purg * rod_rbmk, wst * rod_rbmk * 30F);
@ -403,7 +400,6 @@ public class HazardRegistry {
registerRBMKPellet(rbmk_pellet_meu, uf * billet, wst * billet * 21.5F);
registerRBMKPellet(rbmk_pellet_heu233, u233 * billet, wst * billet * 31F);
registerRBMKPellet(rbmk_pellet_heu235, u235 * billet, wst * billet * 30F);
registerRBMKPellet(rbmk_pellet_uzh, uzh * billet, wst * billet * 20F);
registerRBMKPellet(rbmk_pellet_thmeu, thf * billet, wst * billet * 17.5F);
registerRBMKPellet(rbmk_pellet_lep, puf * billet, wst * billet * 25F);
registerRBMKPellet(rbmk_pellet_mep, purg * billet, wst * billet * 30F);

View File

@ -271,11 +271,6 @@ public class RecipesCommon {
public List<ItemStack> extractForNEI() {
return Arrays.asList(new ItemStack[] {this.toStack()});
}
@Override
public String toString() {
return this.stacksize + "x" + (this.item != null ? this.item.getUnlocalizedName() : "null") + "@" + this.meta;
}
}
public static class NBTStack extends ComparableStack {
@ -379,11 +374,6 @@ public class RecipesCommon {
return 0;
}
@Override
public String toString() {
return this.stacksize + "x" + (this.item != null ? this.item.getUnlocalizedName() : "null") + "@" + this.meta + "?" + this.nbt;
}
}
public static class OreDictStack extends AStack {
@ -500,11 +490,6 @@ public class RecipesCommon {
return false;
return true;
}
@Override
public String toString() {
return this.stacksize + "x" + this.name;
}
}
public static class MetaBlock {

View File

@ -0,0 +1,67 @@
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;
}
}

View File

@ -0,0 +1,68 @@
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;
}
}

View File

@ -0,0 +1,86 @@
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);
}
}

View File

@ -0,0 +1,109 @@
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);
}
}

View File

@ -0,0 +1,112 @@
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);
}
}

View File

@ -1,70 +0,0 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotCraftingOutput;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.items.ModItems;
import com.hbm.util.InventoryUtil;
import api.hbm.energymk2.IBatteryItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerMachinePlasmaForge extends ContainerBase {
public ContainerMachinePlasmaForge(InventoryPlayer invPlayer, IInventory assembler) {
super(invPlayer, assembler);
// Battery
this.addSlotToContainer(new SlotNonRetarded(assembler, 0, 152, 82));
// Schematic
this.addSlotToContainer(new SlotNonRetarded(assembler, 1, 35, 81));
// Booster
this.addSlotToContainer(new SlotNonRetarded(assembler, 2, 98, 116));
// Input
this.addSlots(assembler, 3, 8, 18, 3, 4);
// Output
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, assembler, 15, 116, 36));
this.playerInv(invPlayer, 8, 162);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack slotOriginal = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack slotStack = slot.getStack();
slotOriginal = slotStack.copy();
if(index <= tile.getSizeInventory() - 1) {
SlotCraftingOutput.checkAchievements(player, slotStack);
if(!this.mergeItemStack(slotStack, tile.getSizeInventory(), this.inventorySlots.size(), true)) {
return null;
}
} else {
if(slotOriginal.getItem() instanceof IBatteryItem || slotOriginal.getItem() == ModItems.battery_creative) {
if(!this.mergeItemStack(slotStack, 0, 1, false)) return null;
} else if(slotOriginal.getItem() == ModItems.blueprints) {
if(!this.mergeItemStack(slotStack, 1, 2, false)) return null;
} else {
if(!InventoryUtil.mergeItemStack(this.inventorySlots, slotStack, 2, 15, false)) return null;
}
}
if(slotStack.stackSize == 0) {
slot.putStack(null);
} else {
slot.onSlotChanged();
}
slot.onPickupFromSlot(player, slotStack);
}
return slotOriginal;
}
}

View File

@ -29,27 +29,7 @@ public class ContainerRBMKRod extends Container {
}
@Override
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
if(index == 0 && !player.capabilities.isCreativeMode) {
if(rbmk.coldEnoughForManual()) {
return super.slotClick(index, button, mode, player);
} else {
Slot slot = this.getSlot(index);
ItemStack ret = null;
if(slot.getHasStack()) ret = slot.getStack().copy();
return ret;
}
}
return super.slotClick(index, button, mode, player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int par2) {
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
@ -58,7 +38,6 @@ public class ContainerRBMKRod extends Container {
var3 = var5.copy();
if(par2 <= rbmk.getSizeInventory() - 1) {
if(!rbmk.coldEnoughForManual() && !player.capabilities.isCreativeMode) return null;
if(!this.mergeItemStack(var5, rbmk.getSizeInventory(), this.inventorySlots.size(), true)) {
return null;
}

View File

@ -1,21 +1,66 @@
package com.hbm.inventory.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@invtweaks.api.container.ChestContainer(rowSize = 5, isLargeChest = false)
public class ContainerSafe extends ContainerCrateBase {
//@invtweaks.api.container.ChestContainer(rowSize = 5)
public class ContainerSafe extends Container {
public ContainerSafe(InventoryPlayer invPlayer, IInventory te) {
super(invPlayer,te);
private IInventory diFurnace;
public ContainerSafe(InventoryPlayer invPlayer, IInventory tedf) {
diFurnace = tedf;
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 5; j++) {
this.addSlotToContainer(new Slot(te, j + i * 5, 8 + j * 18 + 18 * 2, 18 + i * 18));
this.addSlotToContainer(new Slot(tedf, j + i * 5, 8 + j * 18 + 18 * 2, 18 + i * 18));
}
}
this.playerInv(invPlayer, 8, 32 + 18 * 3, 90 + (18 * 3));
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 + 2));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 2));
}
}
@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 <= diFurnace.getSizeInventory() - 1) {
if(!this.mergeItemStack(var5, diFurnace.getSizeInventory(), this.inventorySlots.size(), true)) {
return null;
}
} else if(!this.mergeItemStack(var5, 0, diFurnace.getSizeInventory(), false)) {
return null;
}
if(var5.stackSize == 0) {
var4.putStack((ItemStack) null);
} else {
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return diFurnace.isUseableByPlayer(player);
}
}

View File

@ -0,0 +1,87 @@
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);
}
}
}

View File

@ -0,0 +1,93 @@
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);
}
}
}

View File

@ -0,0 +1,138 @@
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);
}
}

View File

@ -0,0 +1,77 @@
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);
}
}

View File

@ -0,0 +1,91 @@
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);
}
}

View File

@ -1,140 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
import com.hbm.inventory.recipes.PlasmaForgeRecipe;
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.items.machine.ItemBlueprints;
import com.hbm.lib.RefStrings;
import com.hbm.render.util.GaugeUtil;
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
import com.hbm.util.BobMathUtil;
import com.hbm.util.i18n.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class GUIMachinePlasmaForge extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_fusion_plasmaforge.png");
private TileEntityFusionPlasmaForge forge;
public GUIMachinePlasmaForge(InventoryPlayer invPlayer, TileEntityFusionPlasmaForge tedf) {
super(new ContainerMachinePlasmaForge(invPlayer, tedf));
forge = tedf;
this.xSize = 176;
this.ySize = 244;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
forge.inputTank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 18, 16, 52);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 62, forge.power, forge.maxPower);
if(guiLeft + 7 <= mouseX && guiLeft + 7 + 18 > mouseX && guiTop + 80 < mouseY && guiTop + 80 + 18 >= mouseY) {
if(this.forge.plasmaModule.recipe != null && PlasmaForgeRecipes.INSTANCE.recipeNameMap.containsKey(this.forge.plasmaModule.recipe)) {
GenericRecipe recipe = (GenericRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(this.forge.plasmaModule.recipe);
this.func_146283_a(recipe.print(), mouseX, mouseY);
} else {
this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY);
}
}
PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe);
if(recipe != null) {
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(forge.plasmaEnergySync) + "KyU / " + BobMathUtil.getShortNumber(recipe.ignitionTemp) + "KyU");
} else {
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, "0TU / 0TU");
}
}
@Override
protected void mouseClicked(int x, int y, int button) {
super.mouseClicked(x, y, button);
if(this.checkClick(x, y, 7, 80, 18, 18)) GUIScreenRecipeSelector.openSelector(PlasmaForgeRecipes.INSTANCE, forge, forge.plasmaModule.recipe, 0, ItemBlueprints.grabPool(forge.slots[1]), this);
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.forge.hasCustomInventoryName() ? this.forge.getInventoryName() : I18n.format(this.forge.getInventoryName());
this.fontRendererObj.drawString(name, 70 - 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 p = (int) (forge.power * 61 / forge.maxPower);
drawTexturedModalRect(guiLeft + 152, guiTop + 80 - p, 176, 62 - p, 16, p);
if(forge.plasmaModule.progress > 0) {
int j = (int) Math.ceil(70 * forge.plasmaModule.progress);
drawTexturedModalRect(guiLeft + 62, guiTop + 81, 176, 62, j, 16);
}
PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe);
/// LEFT LED
if(forge.didProcess) {
drawTexturedModalRect(guiLeft + 51, guiTop + 76, 195, 0, 3, 6);
} else if(recipe != null) {
drawTexturedModalRect(guiLeft + 51, guiTop + 76, 192, 0, 3, 6);
}
/// RIGHT LED
if(forge.didProcess) {
drawTexturedModalRect(guiLeft + 56, guiTop + 76, 195, 0, 3, 6);
} else if(recipe != null && forge.power >= recipe.power) {
drawTexturedModalRect(guiLeft + 56, guiTop + 76, 192, 0, 3, 6);
}
double inputGauge = recipe == null ? 0 : Math.min(((double) forge.plasmaEnergySync / (double) recipe.ignitionTemp), 1.5) / 1.5D;
double boosterGauge = 0;
// input energy
GaugeUtil.drawSmoothGauge(guiLeft + 34, guiTop + 124, this.zLevel, inputGauge, 5, 2, 1, 0xA00000);
// output genergy
GaugeUtil.drawSmoothGauge(guiLeft + 70, guiTop + 124, this.zLevel, boosterGauge, 5, 2, 1, 0xA00000);
this.renderItem(recipe != null ? recipe.getIcon() : TEMPLATE_FOLDER, 8, 81);
if(recipe != null && recipe.inputItem != null) {
for(int i = 0; i < recipe.inputItem.length; i++) {
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(forge.plasmaModule.inputSlots[i]);
if(!slot.getHasStack()) this.renderItem(recipe.inputItem[i].extractForCyclingDisplay(20), slot.xDisplayPosition, slot.yDisplayPosition, 10F);
}
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor4f(1F, 1F, 1F, 0.5F);
GL11.glEnable(GL11.GL_BLEND);
this.zLevel = 300F;
for(int i = 0; i < recipe.inputItem.length; i++) {
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(forge.plasmaModule.inputSlots[i]);
if(!slot.getHasStack()) drawTexturedModalRect(guiLeft + slot.xDisplayPosition, guiTop + slot.yDisplayPosition, slot.xDisplayPosition, slot.yDisplayPosition, 16, 16);
}
this.zLevel = 0F;
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glDisable(GL11.GL_BLEND);
}
forge.inputTank.renderTank(guiLeft + 80, guiTop + 70, this.zLevel, 16, 52);
}
}

View File

@ -32,8 +32,11 @@ public class GUIMachineShredder extends GuiInfoContainer {
boolean flag = false;
if(diFurnace.getGearLeft() == 0 || diFurnace.getGearLeft() == 3) flag = true;
if(diFurnace.getGearRight() == 0 || diFurnace.getGearRight() == 3) flag = true;
if(diFurnace.getGearLeft() == 0 || diFurnace.getGearLeft() == 3)
flag = true;
if(diFurnace.getGearRight() == 0 || diFurnace.getGearRight() == 3)
flag = true;
if(flag) {
String[] text = new String[] { "Error: Shredder blades are broken or missing!" };

View File

@ -1,112 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.input.Keyboard;
import com.hbm.blocks.network.FluidPump.TileEntityFluidPump;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.util.EnumUtil;
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
@SideOnly(Side.CLIENT)
public class GUIPump extends GuiScreen {
protected final TileEntityFluidPump pump;
private GuiTextField textPlacementPriority;
private GuiButton buttonPressure;
private GuiButton buttonPriority;
private int pressure;
private int priority;
public GUIPump(TileEntityFluidPump pump) {
this.pump = pump;
this.pressure = pump.tank[0].getPressure();
this.priority = pump.priority.ordinal();
}
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
textPlacementPriority = new GuiTextField(fontRendererObj, this.width / 2 - 150, 100, 90, 20);
textPlacementPriority.setText("" + pump.bufferSize);
textPlacementPriority.setMaxStringLength(5);
buttonPressure = new GuiButton(0, this.width / 2 - 50, 100, 90, 20, pressure + " PU");
buttonPriority = new GuiButton(1, this.width / 2 + 50, 100, 90, 20, pump.priority.name());
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
drawDefaultBackground();
drawString(fontRendererObj, "Throughput:", this.width / 2 - 150, 80, 0xA0A0A0);
drawString(fontRendererObj, "(max. 10,000mB)", this.width / 2 - 150, 90, 0xA0A0A0);
textPlacementPriority.drawTextBox();
drawString(fontRendererObj, "Pressure:", this.width / 2 - 50, 80, 0xA0A0A0);
buttonPressure.drawButton(mc, mouseX, mouseY);
drawString(fontRendererObj, "Priority:", this.width / 2 + 50, 80, 0xA0A0A0);
buttonPriority.drawButton(mc, mouseX, mouseY);
super.drawScreen(mouseX, mouseY, partialTicks);
}
@Override
public void onGuiClosed() {
Keyboard.enableRepeatEvents(false);
NBTTagCompound data = new NBTTagCompound();
data.setByte("pressure", (byte) pressure);
data.setByte("priority", (byte) priority);
try { data.setInteger("capacity", Integer.parseInt(textPlacementPriority.getText())); } catch(Exception ex) {}
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, pump.xCoord, pump.yCoord, pump.zCoord));
}
@Override
protected void keyTyped(char typedChar, int keyCode) {
super.keyTyped(typedChar, keyCode);
if(textPlacementPriority.textboxKeyTyped(typedChar, keyCode)) return;
if(keyCode == 1 || keyCode == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
this.mc.thePlayer.closeScreen();
}
}
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
super.mouseClicked(mouseX, mouseY, mouseButton);
textPlacementPriority.mouseClicked(mouseX, mouseY, mouseButton);
if(buttonPressure.mousePressed(mc, mouseX, mouseY)) {
this.pressure++;
if(pressure > 5) pressure = 0;
buttonPressure.displayString = pressure + " PU";
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
}
if(buttonPriority.mousePressed(mc, mouseX, mouseY)) {
this.priority++;
if(priority >= ConnectionPriority.values().length) priority = 0;
buttonPriority.displayString = EnumUtil.grabEnumSafely(ConnectionPriority.class, priority).name();
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
}
}
@Override public boolean doesGuiPauseGame() { return false; }
}

View File

@ -7,7 +7,6 @@ import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
import com.hbm.util.BobMathUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -34,10 +33,6 @@ public class GUIRBMKControl extends GuiInfoContainer {
super.drawScreen(mouseX, mouseY, f);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 71, guiTop + 29, 16, 56, mouseX, mouseY, new String[]{ (int)(rod.level * 100) + "%" } );
if(rod.isPowered()) {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 87, guiTop + 21, 16, 16, mouseX, mouseY, new String[]{ BobMathUtil.getShortNumber(rod.power) + " / " + BobMathUtil.getShortNumber(rod.maxPower) + "HE" } );
}
}
@Override
@ -90,9 +85,5 @@ public class GUIRBMKControl extends GuiInfoContainer {
drawTexturedModalRect(guiLeft + 28, guiTop + 26 + color * 11, 184, color * 10, 12, 10);
}
if(rod.isPowered()) {
drawTexturedModalRect(guiLeft + 87, guiTop + 21, 196, rod.hasPower ? 16 : 0, 16, 16);
}
}
}

View File

@ -9,7 +9,6 @@ import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlAuto;
import com.hbm.util.BobMathUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -65,10 +64,6 @@ public class GUIRBMKControlAuto extends GuiInfoContainer {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 124, guiTop + 29, 16, 56, mouseX, mouseY, new String[]{ (int)(rod.level * 100) + "%" } );
if(rod.isPowered()) {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 136, guiTop + 21, 16, 16, mouseX, mouseY, new String[]{ BobMathUtil.getShortNumber(rod.power) + " / " + BobMathUtil.getShortNumber(rod.maxPower) + "HE" } );
}
String func = "Function: ";
switch(rod.function) {
@ -160,10 +155,6 @@ public class GUIRBMKControlAuto extends GuiInfoContainer {
int f = rod.function.ordinal();
drawTexturedModalRect(guiLeft + 59, guiTop + 27, 184, f * 19, 26, 19);
if(rod.isPowered()) {
drawTexturedModalRect(guiLeft + 136, guiTop + 21, 210, rod.hasPower ? 16 : 0, 16, 16);
}
for(int i = 0; i < 4; i++) {
this.fields[i].drawTextBox();
}

View File

@ -8,11 +8,12 @@ import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIRBMKRod extends GuiInfoContainer {
public class GUIRBMKRod extends GuiContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_rbmk_element.png");
private TileEntityRBMKRod rod;
@ -25,16 +26,6 @@ public class GUIRBMKRod extends GuiInfoContainer {
this.ySize = 186;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
if(!rod.coldEnoughForAutoloader())
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 20, 16, 16, guiLeft - 8, guiTop + 20 + 16, "Fuel skin temperature has exceeded 1,000°C,", "autoloaders can no longer cycle fuel!");
if(!rod.coldEnoughForManual())
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, "Fuel skin temperature has exceeded 200°C,", "fuel can no longer be removed by hand!");
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.rod.hasCustomInventoryName() ? this.rod.getInventoryName() : I18n.format(this.rod.getInventoryName());
@ -60,8 +51,5 @@ public class GUIRBMKRod extends GuiInfoContainer {
int x = (int)(xenon * 58);
drawTexturedModalRect(guiLeft + 126, guiTop + 82 - x, 212, 58 - x, 14, x);
}
if(!rod.coldEnoughForAutoloader()) this.drawInfoPanel(guiLeft - 16, guiTop + 20, 16, 16, 6);
if(!rod.coldEnoughForManual()) this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 7);
}
}

View File

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.generic.BlockBobble.BobbleType;
import com.hbm.blocks.generic.BlockBobble.TileEntityBobble;
import com.hbm.main.NTMSounds;
import com.hbm.util.Tuple.Pair;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -27,7 +26,7 @@ public class GUIScreenBobble extends GuiScreen {
@Override
public void initGui() {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation(NTMSounds.BLOCK_FALLOUT_3_POPUP), 1.0F));
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.bobble"), 1.0F));
}
@Override

View File

@ -1,175 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge;
import com.hbm.util.i18n.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
public class GUIScreenRBMKGauge extends GuiScreen {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rbmk_gauge.png");
public TileEntityRBMKGauge keypad;
protected int xSize = 256;
protected int ySize = 204;
protected int guiLeft;
protected int guiTop;
protected GuiTextField[] color = new GuiTextField[4];
protected GuiTextField[] label = new GuiTextField[4];
protected GuiTextField[] rtty = new GuiTextField[4];
protected GuiTextField[] min = new GuiTextField[4];
protected GuiTextField[] max = new GuiTextField[4];
protected boolean[] active = new boolean[4];
protected boolean[] polling = new boolean[4];
public GUIScreenRBMKGauge(TileEntityRBMKGauge keypad) {
this.keypad = keypad;
this.xSize = 256;
this.ySize = 204;
}
@Override
public void initGui() {
super.initGui();
this.guiLeft = (this.width - this.xSize) / 2;
this.guiTop = (this.height - this.ySize) / 2;
Keyboard.enableRepeatEvents(true);
int oX = 4;
int oY = 4;
for(int i = 0; i < 4; i++) {
String col = Integer.toHexString(keypad.gauges[i].color);
while(col.length() < 6) col = "0" + col;
color[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(color[i], 6, col);
label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(label[i], 15, keypad.gauges[i].label);
rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 73 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, keypad.gauges[i].rtty);
min[i] = new GuiTextField(this.fontRendererObj, guiLeft + 121 + oX, guiTop + 73 + oY + i * 36, 52 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(min[i], 32, keypad.gauges[i].min + "");
max[i] = new GuiTextField(this.fontRendererObj, guiLeft + 195 + oX, guiTop + 73 + oY + i * 36, 52 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(max[i], 32, keypad.gauges[i].max + "");
active[i] = keypad.gauges[i].active;
polling[i] = keypad.gauges[i].polling;
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
this.drawDefaultBackground();
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
GL11.glDisable(GL11.GL_LIGHTING);
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
GL11.glEnable(GL11.GL_LIGHTING);
}
private void drawGuiContainerForegroundLayer(int x, int y) {
String name = I18nUtil.resolveKey("container.rbmkGauge");
this.fontRendererObj.drawString(name, this.guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, this.guiTop + 6, 4210752);
}
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
for(int i = 0; i < 4; i++) {
if(this.active[i]) drawTexturedModalRect(guiLeft + 111, guiTop + i * 36 + 54, 18, 204, 16, 16);
if(this.polling[i]) drawTexturedModalRect(guiLeft + 128, guiTop + i * 36 + 53, 0, 204, 18, 18);
}
for(int i = 0; i < 4; i++) {
this.color[i].drawTextBox();
this.label[i].drawTextBox();
this.rtty[i].drawTextBox();
this.min[i].drawTextBox();
this.max[i].drawTextBox();
}
}
@Override
protected void mouseClicked(int x, int y, int b) {
super.mouseClicked(x, y, b);
for(int i = 0; i < 4; i++) {
if(guiLeft + 111 <= x && guiLeft + 111 + 16 > x && guiTop + i * 36 + 54 < y && guiTop + i * 36 + 54 + 16 >= y) {
this.active[i] = !this.active[i];
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 0.5F + (this.active[i] ? 0.25F : 0F)));
return;
}
if(guiLeft + 128 <= x && guiLeft + 128 + 18 > x && guiTop + i * 36 + 53 < y && guiTop + i * 36 + 53 + 18 >= y) {
this.polling[i] = !this.polling[i];
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 0.5F + (this.polling[i] ? 0.25F : 0F)));
return;
}
}
if(guiLeft + 209 <= x && guiLeft + 209 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
byte active = 0;
byte polling = 0;
for(int i = 0; i < 4; i++) {
if(this.active[i]) active |= 1 << i;
if(this.polling[i]) polling |= 1 << i;
}
data.setByte("active", active);
data.setByte("polling", polling);
for(int i = 0; i < 4; i++) {
try { data.setInteger("color" + i, Integer.parseInt(this.color[i].getText(), 16)); } catch(Exception ex) { }
data.setString("label" + i, this.label[i].getText());
data.setString("rtty" + i, this.rtty[i].getText());
try { data.setInteger("min" + i, Integer.parseInt(this.min[i].getText())); } catch(Exception ex) { }
try { data.setInteger("max" + i, Integer.parseInt(this.max[i].getText())); } catch(Exception ex) { }
}
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, keypad.xCoord, keypad.yCoord, keypad.zCoord));
return;
}
for(int i = 0; i < 4; i++) {
this.color[i].mouseClicked(x, y, b);
this.label[i].mouseClicked(x, y, b);
this.rtty[i].mouseClicked(x, y, b);
this.min[i].mouseClicked(x, y, b);
this.max[i].mouseClicked(x, y, b);
}
}
@Override
protected void keyTyped(char c, int b) {
for(int i = 0; i < 4; i++) {
if(this.color[i].textboxKeyTyped(c, b)) return;
if(this.label[i].textboxKeyTyped(c, b)) return;
if(this.rtty[i].textboxKeyTyped(c, b)) return;
if(this.min[i].textboxKeyTyped(c, b)) return;
if(this.max[i].textboxKeyTyped(c, b)) return;
}
if(b == 1 || b == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
this.mc.thePlayer.closeScreen();
this.mc.setIngameFocus();
}
}
@Override public void onGuiClosed() { Keyboard.enableRepeatEvents(false); }
@Override public boolean doesGuiPauseGame() { return false; }
}

View File

@ -1,176 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKKeyPad;
import com.hbm.util.i18n.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
public class GUIScreenRBMKKeyPad extends GuiScreen {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rbmk_keypad.png");
public TileEntityRBMKKeyPad keypad;
protected int xSize = 256;
protected int ySize = 204;
protected int guiLeft;
protected int guiTop;
protected GuiTextField[] color = new GuiTextField[4];
protected GuiTextField[] label = new GuiTextField[4];
protected GuiTextField[] rtty = new GuiTextField[4];
protected GuiTextField[] cmd = new GuiTextField[4];
protected boolean[] active = new boolean[4];
protected boolean[] polling = new boolean[4];
public GUIScreenRBMKKeyPad(TileEntityRBMKKeyPad keypad) {
this.keypad = keypad;
this.xSize = 256;
this.ySize = 204;
}
public static void setupTextFieldStandard(GuiTextField field, int length, String def) {
field.setTextColor(0x00ff00);
field.setDisabledTextColour(0x00ff00);
field.setEnableBackgroundDrawing(false);
field.setMaxStringLength(length);
field.setText(def != null ? def : "");
}
@Override
public void initGui() {
super.initGui();
this.guiLeft = (this.width - this.xSize) / 2;
this.guiTop = (this.height - this.ySize) / 2;
Keyboard.enableRepeatEvents(true);
int oX = 4;
int oY = 4;
for(int i = 0; i < 4; i++) {
String col = Integer.toHexString(keypad.keys[i].color);
while(col.length() < 6) col = "0" + col;
color[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
setupTextFieldStandard(color[i], 6, col);
label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
setupTextFieldStandard(label[i], 15, keypad.keys[i].label);
rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 73 + oY + i * 36, 72 - oX * 2, 14);
setupTextFieldStandard(rtty[i], 10, keypad.keys[i].rtty);
cmd[i] = new GuiTextField(this.fontRendererObj, guiLeft + 121 + oX, guiTop + 73 + oY + i * 36, 126 - oX * 2, 14);
setupTextFieldStandard(cmd[i], 32, keypad.keys[i].command);
active[i] = keypad.keys[i].active;
polling[i] = keypad.keys[i].polling;
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
this.drawDefaultBackground();
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
GL11.glDisable(GL11.GL_LIGHTING);
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
GL11.glEnable(GL11.GL_LIGHTING);
}
private void drawGuiContainerForegroundLayer(int x, int y) {
String name = I18nUtil.resolveKey("container.rbmkKeyPad");
this.fontRendererObj.drawString(name, this.guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, this.guiTop + 6, 4210752);
}
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
for(int i = 0; i < 4; i++) {
if(this.active[i]) drawTexturedModalRect(guiLeft + 111, guiTop + i * 36 + 54, 18, 204, 16, 16);
if(this.polling[i]) drawTexturedModalRect(guiLeft + 128, guiTop + i * 36 + 53, 0, 204, 18, 18);
}
for(int i = 0; i < 4; i++) {
this.color[i].drawTextBox();
this.label[i].drawTextBox();
this.rtty[i].drawTextBox();
this.cmd[i].drawTextBox();
}
}
@Override
protected void mouseClicked(int x, int y, int b) {
super.mouseClicked(x, y, b);
for(int i = 0; i < 4; i++) {
if(guiLeft + 111 <= x && guiLeft + 111 + 16 > x && guiTop + i * 36 + 54 < y && guiTop + i * 36 + 54 + 16 >= y) {
this.active[i] = !this.active[i];
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 0.5F + (this.active[i] ? 0.25F : 0F)));
return;
}
if(guiLeft + 128 <= x && guiLeft + 128 + 18 > x && guiTop + i * 36 + 53 < y && guiTop + i * 36 + 53 + 18 >= y) {
this.polling[i] = !this.polling[i];
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 0.5F + (this.polling[i] ? 0.25F : 0F)));
return;
}
}
if(guiLeft + 209 <= x && guiLeft + 209 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
byte active = 0;
byte polling = 0;
for(int i = 0; i < 4; i++) {
if(this.active[i]) active |= 1 << i;
if(this.polling[i]) polling |= 1 << i;
}
data.setByte("active", active);
data.setByte("polling", polling);
for(int i = 0; i < 4; i++) {
try { data.setInteger("color" + i, Integer.parseInt(this.color[i].getText(), 16)); } catch(Exception ex) { }
data.setString("label" + i, this.label[i].getText());
data.setString("rtty" + i, this.rtty[i].getText());
data.setString("cmd" + i, this.cmd[i].getText());
}
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, keypad.xCoord, keypad.yCoord, keypad.zCoord));
return;
}
for(int i = 0; i < 4; i++) {
this.color[i].mouseClicked(x, y, b);
this.label[i].mouseClicked(x, y, b);
this.rtty[i].mouseClicked(x, y, b);
this.cmd[i].mouseClicked(x, y, b);
}
}
@Override
protected void keyTyped(char c, int b) {
for(int i = 0; i < 4; i++) {
if(this.color[i].textboxKeyTyped(c, b)) return;
if(this.label[i].textboxKeyTyped(c, b)) return;
if(this.rtty[i].textboxKeyTyped(c, b)) return;
if(this.cmd[i].textboxKeyTyped(c, b)) return;
}
if(b == 1 || b == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
this.mc.thePlayer.closeScreen();
this.mc.setIngameFocus();
}
}
@Override public void onGuiClosed() { Keyboard.enableRepeatEvents(false); }
@Override public boolean doesGuiPauseGame() { return false; }
}

View File

@ -71,6 +71,7 @@ public class GUIScreenRadioTorchController extends GuiScreen {
GL11.glEnable(GL11.GL_LIGHTING);
}
private void drawGuiContainerForegroundLayer(int x, int y) {
String name = I18nUtil.resolveKey("container.rttyController");
this.fontRendererObj.drawString(name, this.guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, this.guiTop + 6, 4210752);

View File

@ -5,7 +5,6 @@ import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.main.NTMSounds;
import com.hbm.util.i18n.I18nUtil;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -24,7 +23,7 @@ public class GUIScreenSnowglobe extends GuiScreen {
@Override
public void initGui() {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation(NTMSounds.BLOCK_FALLOUT_3_POPUP), 1.0F));
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.bobble"), 1.0F));
}
@Override

View File

@ -10,8 +10,12 @@ 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;
import com.hbm.items.machine.ItemStamp;
import com.hbm.items.machine.ItemStamp.StampType;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
@ -53,7 +57,17 @@ public class GUIScreenTemplateFolder extends GuiScreen {
this.isJournal = item != ModItems.template_folder;
if(!this.isJournal) {
// Stamps
for(ItemStack i : ItemStamp.stamps.get(StampType.PLATE)) allStacks.add(i.copy());
for(ItemStack i : ItemStamp.stamps.get(StampType.WIRE)) allStacks.add(i.copy());
for(ItemStack i : ItemStamp.stamps.get(StampType.CIRCUIT)) allStacks.add(i.copy());
// Tracks
for(int i = 1; i < ItemCassette.TrackType.values().length; i++) {
allStacks.add(new ItemStack(ModItems.siren_track, 1, i));
}
}
if(!this.isJournal) {
@ -286,7 +300,11 @@ 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.crucible_template)
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)
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);

View File

@ -140,7 +140,7 @@ public class Mats {
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setAutogen(WIRE, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK).m();
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x82A59C, 0x06281E, 0x42665C).setAutogen(BOLT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setAutogen(DUST, CASTPLATE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, STOCK, GRIP).m();
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setAutogen(DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setAutogen(DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setAutogen(CASTPLATE, HEAVYBARREL, HEAVYRECEIVER).m();
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setAutogen(DUST, CASTPLATE, WELDEDPLATE, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER).m();
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setAutogen(CASTPLATE, WELDEDPLATE, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER).m();

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ import static com.hbm.inventory.OreDictManager.*;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockCap.EnumCapBlock;
import com.hbm.blocks.machine.BlockICFLaserComponent.EnumICFPart;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.OreDictManager;
@ -82,6 +83,10 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new OreDictStack(DESH.ingot(), 4), new OreDictStack(ANY_PLASTIC.dust(), 2), new OreDictStack(DURA.ingot(), 1)));
this.register(new GenericRecipe("ass.platebismuth").setup(200, 100).outputItems(new ItemStack(ModItems.plate_bismuth, 1))
.inputItems(new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)));
this.register(new GenericRecipe("ass.plateeuphemium").setup(600, 100).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
this.register(new GenericRecipe("ass.platednt").setup(600, 100).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
// expensive parts
this.register(new GenericRecipe("ass.exsteelplating").setup(200, 400).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.STEEL_PLATING.ordinal()))
@ -107,8 +112,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.explastic").setup(600, 20_000).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.PLASTIC.ordinal()))
.inputItems(new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(ANY_RUBBER.ingot(), 8))
.inputFluids(new FluidStack(Fluids.SOLVENT, 1_000)));
this.register(new GenericRecipe("ass.exgold").setup(600, 10_000).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.GOLD_DUST.ordinal()))
.inputItems(new OreDictStack(GOLD.dust(), 64), new OreDictStack(GOLD.dust(), 64)));
// cloth
this.register(new GenericRecipe("ass.hazcloth").setup(50, 100).outputItems(new ItemStack(ModItems.hazmat_cloth, 4))
@ -420,6 +423,32 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 8_000))
.outputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 8_000)));
this.register(new GenericRecipe("ass.fensusan").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_battery_redd, 1))
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
new OreDictStack(CMB.plateCast(), 32),
new OreDictStack(MAGTUNG.wireDense(), 32),
new ComparableStack(ModItems.plate_dineutronium, 64),
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64))
.inputItemsEx(new ComparableStack(ModItems.ingot_electronium, 64),
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.FERRO_PLATING),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
new OreDictStack(CMB.plateCast(), 64),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64)));
// fluid tanks
this.register(new GenericRecipe("ass.tank").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_fluidtank, 1))
.inputItems(new OreDictStack(STEEL.plate(), 8), new OreDictStack(STEEL.shell(), 4))
@ -428,7 +457,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16)));
this.register(new GenericRecipe("ass.orbus").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_orbus, 1))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(BSCCO.wireDense(), 8), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new OreDictStack(BIGMT.plateCast(), 16), new ComparableStack(ModItems.coil_advanced_alloy, 24), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210)));
// accelerators
@ -479,7 +508,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(B.ingot(), 8), new OreDictStack(GRAPHITE.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new OreDictStack(ANY_CONCRETE.any(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.LEAD_PLATING), new OreDictStack(GRAPHITE.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new OreDictStack(ANY_CONCRETE.any(), 16), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT)));
this.register(new GenericRecipe("ass.rbmk").setup(100, 100).outputItems(new ItemStack(ModBlocks.rbmk_blank, 1))
.inputItems(new ComparableStack(ModBlocks.concrete_asbestos, 4), new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plate(), 4), new OreDictStack(RUBBER.ingot(), 2))
.inputItems(new ComparableStack(ModBlocks.concrete_asbestos, 4), new OreDictStack(STEEL.plateCast(), 4), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.plate_polymer, 4))
.inputItemsEx(new ComparableStack(ModBlocks.concrete_asbestos, 4), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.FERRO_PLATING), new OreDictStack(CU.plate(), 16))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "ferrouranium"));
this.register(new GenericRecipe("ass.rbmkautoloader").setup(100, 100).outputItems(new ItemStack(ModBlocks.rbmk_autoloader, 1))
@ -572,6 +601,55 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 6, EnumExpensiveType.LEAD_PLATING), new OreDictStack(ANY_RESISTANTALLOY.plateWelded()))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "tcalloy"));
// ICF
this.register(new GenericRecipe("ass.icfcell").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CELL.ordinal()))
.inputItems(new ComparableStack(ModItems.ingot_cft, 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new ComparableStack(ModBlocks.glass_quartz, 16))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 8), new ComparableStack(ModBlocks.glass_quartz, 16))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfemitter").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.EMITTER.ordinal()))
.inputItems(new OreDictStack(W.plateWelded(), 4), new OreDictStack(MAGTUNG.wireDense(), 16))
.inputItemsEx(new OreDictStack(W.plateWelded(), 8), new OreDictStack(MAGTUNG.wireDense(), 16))
.inputFluids(new FluidStack(Fluids.XENON, 16_000))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfcapacitor").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CAPACITOR.ordinal()))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 1), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfturbo").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.TURBO.ordinal()))
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new OreDictStack(DNT.wireDense(), 4), new OreDictStack(SBD.wireDense(), 4))
.inputItemsEx(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(DNT.wireDense(), 8), new OreDictStack(SBD.wireDense(), 4))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfcasing").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CASING.ordinal()))
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfport").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.PORT.ordinal()))
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfcontroller").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_controller, 1))
.inputItems(new ComparableStack(ModItems.ingot_cft, 16), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.COMPUTER))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfscaffold").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_component, 1, 0))
.inputItems(new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plateWelded(), 2))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfvessel").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_component, 1, 1))
.inputItems(new ComparableStack(ModItems.ingot_cft, 1), new OreDictStack(CMB.plateCast(), 1), new OreDictStack(W.plateWelded(), 2))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfstructural").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_component, 1, 3))
.inputItems(new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(CU.plateWelded(), 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 1))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(STEEL.plateWelded(), 8))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfcore").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.struct_icf_core, 1))
.inputItems(new OreDictStack(CMB.plateWelded(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 16), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 16), new OreDictStack(SBD.wireDense(), 32), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.QUANTUM))
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(CMB.plateWelded(), 16), new OreDictStack(SBD.wireDense(), 32), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.QUANTUM), new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.COMPUTER))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
this.register(new GenericRecipe("ass.icfpress").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_icf_press, 1))
.inputItems(new OreDictStack(GOLD.plateCast(), 8), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
// upgrades
if(no528) {
this.register(new GenericRecipe("ass.overdrive1").setup(200, 100).outputItems(new ItemStack(ModItems.upgrade_overdrive_1, 1))
@ -902,6 +980,22 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new ComparableStack(ModItems.seg_15, 1), new OreDictStack(WEAPONSTEEL.plate(), 32), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 16), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "controller"));
// weapons
this.register(new GenericRecipe("ass.schrabhammer").setup(6_000, 100).outputItems(new ItemStack(ModItems.schrabidium_hammer, 1))
.inputItems(
new OreDictStack(SA326.block(), 35),
new ComparableStack(ModItems.billet_yharonite, 64),
new ComparableStack(ModItems.billet_yharonite, 64),
new ComparableStack(ModItems.coin_ufo, 1),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64),
new ComparableStack(ModItems.fragment_meteorite, 64)));
// ammo
this.register(new GenericRecipe("ass.50bmgsm").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_standard, 6, EnumAmmo.BMG50_SM.ordinal()))
.inputItems(new ComparableStack(ModItems.casing, 1, EnumCasingType.LARGE_STEEL), new OreDictStack(ANY_SMOKELESS.dust(), 6), new OreDictStack(STAR.ingot(), 3))
@ -1006,6 +1100,30 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.thruster_small, 1),
new ComparableStack(ModItems.photo_panel, 12),
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
this.register(new GenericRecipe("ass.gerald").setup(6_000, 100).outputItems(new ItemStack(ModItems.sat_gerald, 1))
.inputItems(new OreDictStack(SBD.plateCast(), 64),
new OreDictStack(SBD.plateCast(), 64),
new OreDictStack(BSCCO.wireDense(), 64),
new OreDictStack(BSCCO.wireDense(), 64),
new ComparableStack(ModBlocks.det_nuke, 64),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
new ComparableStack(ModItems.coin_ufo, 1))
.inputItemsEx(new OreDictStack(SBD.plateCast(), 64),
new OreDictStack(BSCCO.wireDense(), 64),
new ComparableStack(ModBlocks.det_nuke, 64),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.COMPUTER),
new ComparableStack(ModItems.coin_ufo, 1)).setPools(GenericRecipes.POOL_PREFIX_DISCOVER + "gerald"));
this.register(new GenericRecipe("ass.emptypackage").setup(40, 100).outputItems(new ItemStack(ModItems.fluid_pack_empty, 1))
.inputItems(new OreDictStack(TI.plate(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 2)));
@ -1034,6 +1152,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.motor_bismuth, 3)));
}
}
}
public static HashMap getRecipes() {

View File

@ -0,0 +1,468 @@
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();
}
}

View File

@ -9,14 +9,11 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import static com.hbm.inventory.OreDictManager.*;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumExpensiveType;
import net.minecraft.item.ItemStack;
@ -29,13 +26,8 @@ public class ExposureChamberRecipes extends SerializableRecipe {
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_higgs), new OreDictStack(U.ingot()), new ItemStack(ModItems.ingot_schraranium)));
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_higgs), new OreDictStack(U238.ingot()), new ItemStack(ModItems.ingot_schrabidium)));
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_dark), new OreDictStack(PU.ingot()), new ItemStack(ModItems.ingot_euphemium)));
if(GeneralConfig.enableExpensiveMode) {
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_sparkticle), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.DEGENERATE_MATTER), new ItemStack(ModItems.ingot_dineutronium)));
} else {
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_sparkticle), new OreDictStack(SBD.ingot()), new ItemStack(ModItems.ingot_dineutronium)));
}
}
public static ExposureChamberRecipe getRecipe(ItemStack particle, ItemStack input) {
for(ExposureChamberRecipe recipe : recipes) if(recipe.particle.matchesRecipe(particle, true) && recipe.ingredient.matchesRecipe(input, true)) return recipe;

View File

@ -0,0 +1,194 @@
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();
}
}

View File

@ -41,12 +41,6 @@ public class PUREXRecipes extends GenericRecipes<GenericRecipe> {
long watzPower = 10_000;
long vitrification = 1_000;
this.register(new GenericRecipe("purex.uzh").setup(600, 1_000)
.inputItems(new ComparableStack(ModItems.billet_uranium_fuel),
new OreDictStack(ZR.billet(), 3))
.inputFluids(new FluidStack(Fluids.NITRIC_ACID, 1000), new FluidStack(Fluids.HYDROGEN, 4000))
.outputItems(new ItemStack(ModItems.billet_uzh, 4)));
//CP-1
String autoPile = "autoswitch.pile";
this.register(new GenericRecipe("purex.pilepu").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this)

Some files were not shown because too many files have changed in this diff Show More