mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-16 06:35:35 +00:00
Compare commits
194 Commits
1.0.27_X55
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59d5db4f66 | ||
|
|
c408a66e97 | ||
|
|
0bf5a82391 | ||
|
|
037f2a636b | ||
|
|
e8bbc53e36 | ||
|
|
2e27763092 | ||
|
|
b97970404a | ||
|
|
827aaf13e6 | ||
|
|
bf0ad9be66 | ||
|
|
185c049635 | ||
|
|
b8cccbca16 | ||
|
|
eaacba72c8 | ||
|
|
6678b76187 | ||
|
|
132bc10e50 | ||
|
|
2d9e645f9e | ||
|
|
f81adc816b | ||
|
|
bfc7790cae | ||
|
|
92706fdba3 | ||
|
|
4d28c091e1 | ||
|
|
6d3aaaf045 | ||
|
|
06c8928229 | ||
|
|
2049a05649 | ||
|
|
d80c0767d6 | ||
|
|
816ead946d | ||
|
|
7303ecbff6 | ||
|
|
a95b3761c6 | ||
|
|
d9353f5cc8 | ||
|
|
e9f59c7920 | ||
|
|
892e844f49 | ||
|
|
8bc5cf1c9d | ||
|
|
6ffc310f9a | ||
|
|
93e9f35f05 | ||
|
|
1ccad02a73 | ||
|
|
adcacf2d2f | ||
|
|
2396b23288 | ||
|
|
e3f43a5dc2 | ||
|
|
f6cca3fda6 | ||
|
|
1c54a590ef | ||
|
|
873ceac8f4 | ||
|
|
f721b321fc | ||
|
|
09dd62b71d | ||
|
|
7ecafd73fc | ||
|
|
0b418c2f51 | ||
|
|
ae5f5d0ac1 | ||
|
|
2766bb5b73 | ||
|
|
60f7541a8d | ||
|
|
aa23ba19bc | ||
|
|
3c01133374 | ||
|
|
be1ef22576 | ||
|
|
7ecdb61226 | ||
|
|
83a0f84b11 | ||
|
|
be9373e652 | ||
|
|
10613f22de | ||
|
|
e123b37a35 | ||
|
|
5d7fe1ac66 | ||
|
|
5253f9e818 | ||
|
|
393e90cae5 | ||
|
|
1bd1c325be | ||
|
|
e547ee5b79 | ||
|
|
7577ffd665 | ||
|
|
fd7e28f074 | ||
|
|
10168b945d | ||
|
|
73cb0e1db4 | ||
|
|
c8bfa6edcc | ||
|
|
96ae2a9a9c | ||
|
|
8146e68eaa | ||
|
|
341bc38a09 | ||
|
|
b108bc1f57 | ||
|
|
21cd3a9eeb | ||
|
|
3c38e6c414 | ||
|
|
dbff2daef1 | ||
|
|
aaf94ba6e4 | ||
|
|
144d5dc2a6 | ||
|
|
98e1f4b236 | ||
|
|
b3692b6352 | ||
|
|
f8b7e8528c | ||
|
|
a1fc206006 | ||
|
|
2fc4e04b4c | ||
|
|
c98c83aa5d | ||
|
|
3bf7b5614b | ||
|
|
4f8b43ac89 | ||
|
|
f7e271629d | ||
|
|
d5e53550ef | ||
|
|
c34e9c15e4 | ||
|
|
4aa7ac7550 | ||
|
|
34f66d0ad9 | ||
|
|
c6faa08e73 | ||
|
|
82dd6f6358 | ||
|
|
f15b21cb64 | ||
|
|
474e254a5d | ||
|
|
6fb495bd7b | ||
|
|
8f3c357d03 | ||
|
|
2cfb1bebed | ||
|
|
077a2cf68c | ||
|
|
a6f98a28c1 | ||
|
|
ed481dded5 | ||
|
|
960d28740b | ||
|
|
ca247c69b8 | ||
|
|
b76027cb58 | ||
|
|
efa69dbde0 | ||
|
|
b7f40edb85 | ||
|
|
225b39dfe0 | ||
|
|
ad72c71082 | ||
|
|
f62fcc89cb | ||
|
|
2313cd3b44 | ||
|
|
36a39b09e4 | ||
|
|
6be023015f | ||
|
|
04708e8c90 | ||
|
|
e20baf4293 | ||
|
|
f4e43ce829 | ||
|
|
18187e8010 | ||
|
|
e20d28f1d6 | ||
|
|
43c59db14b | ||
|
|
2d6fbfc2d9 | ||
|
|
18074097c7 | ||
|
|
888ced0977 | ||
|
|
3c520944bc | ||
|
|
84344889b7 | ||
|
|
af34fb730f | ||
|
|
08d12bceb3 | ||
|
|
22bd62f789 | ||
|
|
75946a0054 | ||
|
|
29bec0725b | ||
|
|
57db8cc9ab | ||
|
|
0e687e0ff5 | ||
|
|
3361d0a35e | ||
|
|
fcf016b0f3 | ||
|
|
c70cb9aaed | ||
|
|
eba8484a98 | ||
|
|
3a580a6b41 | ||
|
|
65be5db641 | ||
|
|
f6243aaaab | ||
|
|
4ed8bc7a64 | ||
|
|
057c0b005d | ||
|
|
67bffe1dab | ||
|
|
d842871ba8 | ||
|
|
17999f2f38 | ||
|
|
bb3c301f4c | ||
|
|
9a9c29632c | ||
|
|
6451ff4cb7 | ||
|
|
bcfff3f860 | ||
|
|
6f0f80414a | ||
|
|
720fb07b0f | ||
|
|
f53d7f07e0 | ||
|
|
ecab0fbcb3 | ||
|
|
f9311eff8d | ||
|
|
55f15a274d | ||
|
|
068c3a8b7d | ||
|
|
1ad65345b0 | ||
|
|
4e0bce27df | ||
|
|
27664b36b0 | ||
|
|
3728adfe13 | ||
|
|
bcbc048136 | ||
|
|
9d78cc465c | ||
|
|
1bc33bbcf9 | ||
|
|
a2c06ce752 | ||
|
|
304720b57f | ||
|
|
eb30a5ef3b | ||
|
|
ea50cd5c66 | ||
|
|
24cd4af867 | ||
|
|
171317c9f5 | ||
|
|
2e4b2c2d30 | ||
|
|
4fb369e4e3 | ||
|
|
6f9e8c9542 | ||
|
|
b0b1b4c0af | ||
|
|
44edbfe2f3 | ||
|
|
b7d54ffb06 | ||
|
|
eb1773f7fc | ||
|
|
d1c1820c1a | ||
|
|
477c038e70 | ||
|
|
e7d632bdbc | ||
|
|
a288d4b1bf | ||
|
|
222781da42 | ||
|
|
a5685f4d16 | ||
|
|
081de229fd | ||
|
|
b52107b2c3 | ||
|
|
c0b6089f70 | ||
|
|
52c1c0f20a | ||
|
|
dadaa752ff | ||
|
|
21cd47d063 | ||
|
|
424fa4fcf6 | ||
|
|
e55f9fadf6 | ||
|
|
e962479af5 | ||
|
|
84e718cd97 | ||
|
|
d13cfdece4 | ||
|
|
14610ef919 | ||
|
|
b358727425 | ||
|
|
6939944868 | ||
|
|
5a4c2f2183 | ||
|
|
dc55ec75cc | ||
|
|
cb5ea3929b | ||
|
|
a2e0cfb2ee | ||
|
|
17f76d6dc1 | ||
|
|
a4e5b177b7 |
@ -10,11 +10,15 @@
|
||||
|
||||
**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
|
||||
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE/releases
|
||||
* 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 1.18, try Martin's remake: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/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
|
||||
|
||||
## Downloading pre-compiled versions from GitHub
|
||||
|
||||
|
||||
51
changelog
51
changelog
@ -1,49 +1,6 @@
|
||||
## Changed
|
||||
* Updated russian localization
|
||||
* Rad absorbers now use metadata, existing blocks will be converted automatically
|
||||
* Fissure bombs that go off in crater biomes now create fissures with metadata 1 which creates radioactive volcanic lava
|
||||
* If a crater biome is created on top of an existing fissure, it will keep producing normal volcanic lava
|
||||
* Simplified the battery socket's client packets, reducing CPU load
|
||||
* Muzzle flashes on guns now work in third person mode, including on other players and on NPCs, making it more apparent when you're being fired at
|
||||
* This includes non-standard special effects like the .44 gap flash and the .35-800 ejector plume
|
||||
* Removed the old unused satellite deco blocks, freeing up 6 block IDs
|
||||
* Crucibles that smelt metal with no template set will no place the metal in the recipe stack instead of the waste stack, this should make it easier to get a recipe to work in the many, many cases where people add the template after smelting the material
|
||||
* Battery sockets and the FENSU now support the copy tool
|
||||
* Removed unused displaylist support from the model loader
|
||||
* DLs have been long phased out in favor of VBOs anyway
|
||||
* Rebranded canned horse slime
|
||||
* Now with extra bone marrow
|
||||
* Updated the deuterium tower's model
|
||||
* Updated most blast door visuals
|
||||
* RBMKs now have QMAW pages
|
||||
* Updated the model on the heavy magnetic storage container
|
||||
* Increased the power draw on the osmiridium welding recipe
|
||||
* Bullet casings now make sounds when falling to the ground
|
||||
* Most ammo types now have QMAW pages, including information on whether or not they are a war crime
|
||||
* Both assembly and chemical factories now have four special ports that only allow items inserted to go into one recipe group
|
||||
* All models using the HFR wavefront loader can now be hot-swapped via resource reload (F3 + T)
|
||||
* Updated most door models
|
||||
* Door skins are no longer a dedicated item, the skin can be changed using a screwdriver
|
||||
* Available skins are cycled through in the item preview
|
||||
* Fire doors and secure access doors no longer use clipping planes (i.e. making the doors not render outside of their frames)
|
||||
* Vault doors have been ported to the current door system, the blocks should convert automatically
|
||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||
* Hoppers and buckets can now be made out of steel
|
||||
|
||||
# Fixed
|
||||
* Potentially fixed yet another issue regarding crates
|
||||
* Fixed battery socket `fillpercent` RoR function always assuming a max power of 1
|
||||
* Fixed issue where multiblock ports would generate many OpenComputers component entries
|
||||
* Fixed RBMK automatic control rods having incorrect settings when using the copy tool
|
||||
* Fixed battery sockets producing junk debug data in the logs
|
||||
* Fixed an issue where the charging station would crash when trying to charge certain items
|
||||
* Fixed the DFC's core component not dropping its contents when mined
|
||||
* Fixed audio problems with guns
|
||||
* Fixed third person muzzleflash on the miniguns clipping the barrel
|
||||
* Fixed arc furnace IO slots stacking items with incompatible NBT
|
||||
* Fixed a bounding box issue with casing particles, causing them to slide sideways on the first tick, making trajectories weird
|
||||
* Fixed some turrets not using the more modern casing spawner system which allows casings to have a smoke trail
|
||||
* Fixed incorrect tooltip on the upgrade stat screen for assembly factories
|
||||
* Fixed crash caused by RBMK overpressure meltdown mechanic
|
||||
* Fixed a crash causing by the charging station in combination with the new battery packs
|
||||
* Fixed a broken and originally unintended feature where the flamethrower turret would be loadable using regular item tanks
|
||||
* Most ammo slots now work for loading, the empty canisters are returned via the fluid ID slot
|
||||
* Fixed a dupe regarding conveyors
|
||||
## Fixed
|
||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5593
|
||||
mod_build_number=5634
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
@ -36,6 +36,7 @@ credits=HbMinecraft,\
|
||||
\ xxwinhere (chinese localization),\
|
||||
\ Nycticoraxnightheron (chinese localization),\
|
||||
\ NarekoMichigami810 (chinese localization),\
|
||||
\ Romarku (chinese localization),\
|
||||
\ Maksymisio (polish localization)\
|
||||
\ el3ctro4ndre (italian localization),\
|
||||
\ Goaty1208 (italian localization),\
|
||||
@ -63,6 +64,7 @@ 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),\
|
||||
@ -74,6 +76,7 @@ credits=HbMinecraft,\
|
||||
\ Dash (PA particle serialization fix),\
|
||||
\ archiecarrot123 (armor rendering compatibility fix),\
|
||||
\ mikkerlo (mining laser & builder's jetpack improvements),\
|
||||
\ Hacker6329 (ZIRNOX redstone control),\
|
||||
\ icomet (refactoring),\
|
||||
\ martemen (project settings),\
|
||||
\ OvermindDL1 (project settings),\
|
||||
|
||||
@ -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(World world, int x, int y, int z) {
|
||||
public int[] findCore(IBlockAccess world, int x, int y, int z) {
|
||||
positions.clear();
|
||||
return findCoreRec(world, x, y, z);
|
||||
}
|
||||
|
||||
List<ThreeInts> positions = new ArrayList<>();
|
||||
|
||||
public int[] findCoreRec(World world, int x, int y, int z) {
|
||||
public int[] findCoreRec(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
ThreeInts pos = new ThreeInts(x, y, z);
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ 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.MachineFusionPlasmaForge;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
|
||||
import com.hbm.blocks.machine.pile.*;
|
||||
import com.hbm.blocks.machine.rbmk.*;
|
||||
@ -57,8 +58,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block event_tester;
|
||||
public static Block obj_tester;
|
||||
public static Block test_core;
|
||||
public static Block test_charge;
|
||||
public static Block structure_anchor;
|
||||
|
||||
public static Block ore_uranium;
|
||||
@ -345,6 +344,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block lightstone;
|
||||
public static Block brick_forgotten;
|
||||
public static Block brick_forgotten_lock;
|
||||
|
||||
public static Block concrete_slab;
|
||||
public static Block concrete_double_slab;
|
||||
@ -702,14 +702,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_cyclotron;
|
||||
public static Block machine_exposure_chamber;
|
||||
|
||||
public static Block hadron_plating;
|
||||
public static Block hadron_plating_blue;
|
||||
public static Block hadron_plating_black;
|
||||
public static Block hadron_plating_yellow;
|
||||
public static Block hadron_plating_striped;
|
||||
public static Block hadron_plating_voltz;
|
||||
public static Block hadron_plating_glass;
|
||||
public static Block hadron_coil_alloy;
|
||||
public static Block hadron_coil_gold;
|
||||
public static Block hadron_coil_neodymium;
|
||||
@ -719,12 +711,6 @@ public class ModBlocks {
|
||||
public static Block hadron_coil_starmetal;
|
||||
public static Block hadron_coil_chlorophyte;
|
||||
public static Block hadron_coil_mese;
|
||||
public static Block hadron_power;
|
||||
public static Block hadron_diode;
|
||||
public static Block hadron_analysis;
|
||||
public static Block hadron_analysis_glass;
|
||||
public static Block hadron_access;
|
||||
public static Block hadron_core;
|
||||
|
||||
public static Block pa_source;
|
||||
public static Block pa_beamline;
|
||||
@ -763,6 +749,7 @@ 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;
|
||||
@ -846,7 +833,6 @@ public class ModBlocks {
|
||||
public static Block barrel_antimatter;
|
||||
|
||||
public static Block machine_transformer;
|
||||
public static Block machine_transformer_dnt;
|
||||
|
||||
public static Block machine_solar_boiler;
|
||||
public static Block solar_mirror;
|
||||
@ -902,6 +888,7 @@ 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;
|
||||
@ -968,7 +955,14 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_steam_engine;
|
||||
public static Block machine_turbine;
|
||||
public static Block machine_large_turbine;
|
||||
@Deprecated public static Block machine_large_turbine;
|
||||
public static Block machine_industrial_turbine;
|
||||
public static Block machine_chungus;
|
||||
|
||||
public static Block machine_condenser;
|
||||
public static Block machine_tower_small;
|
||||
public static Block machine_tower_large;
|
||||
public static Block machine_condenser_powered;
|
||||
|
||||
public static Block machine_deuterium_extractor;
|
||||
public static Block machine_deuterium_tower;
|
||||
@ -979,12 +973,6 @@ public class ModBlocks {
|
||||
public static Block machine_compressor;
|
||||
public static Block machine_compressor_compact;
|
||||
|
||||
public static Block machine_chungus;
|
||||
public static Block machine_condenser;
|
||||
public static Block machine_tower_small;
|
||||
public static Block machine_tower_large;
|
||||
public static Block machine_condenser_powered;
|
||||
|
||||
public static Block machine_electrolyser;
|
||||
|
||||
public static Block machine_excavator;
|
||||
@ -995,18 +983,14 @@ public class ModBlocks {
|
||||
public static Block machine_mining_laser;
|
||||
public static Block barricade; // a sand bag that drops nothing, for automated walling purposes
|
||||
|
||||
@Deprecated public static Block machine_assembler;
|
||||
public static Block machine_assembly_machine;
|
||||
@Deprecated public static Block machine_assemfac;
|
||||
public static Block machine_assembly_factory;
|
||||
public static Block machine_precass;
|
||||
public static Block machine_arc_welder;
|
||||
public static Block machine_soldering_station;
|
||||
public static Block machine_arc_furnace;
|
||||
|
||||
@Deprecated public static Block machine_chemplant;
|
||||
public static Block machine_chemical_plant;
|
||||
@Deprecated public static Block machine_chemfac;
|
||||
public static Block machine_chemical_factory;
|
||||
public static Block machine_purex;
|
||||
public static Block machine_mixer;
|
||||
@ -1101,6 +1085,8 @@ 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;
|
||||
@ -1112,6 +1098,9 @@ 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;
|
||||
@ -1240,8 +1229,6 @@ public class ModBlocks {
|
||||
|
||||
event_tester = new TestEventTester(Material.iron).setBlockName("event_tester").setCreativeTab(null).setHardness(2.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":event_tester");
|
||||
obj_tester = new TestObjTester(Material.iron).setBlockName("obj_tester").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F);
|
||||
test_core = new TestCore(Material.iron).setBlockName("test_core").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_core");
|
||||
test_charge = new TestCharge(Material.iron).setBlockName("test_charge").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F);
|
||||
structure_anchor = new BlockGeneric(Material.iron).setBlockName("structure_anchor").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":structure_anchor");
|
||||
|
||||
ore_uranium = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium");
|
||||
@ -1345,6 +1332,7 @@ public class ModBlocks {
|
||||
|
||||
ore_tikite = new BlockDragonProof(Material.rock).setBlockName("ore_tikite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_tikite_alt");
|
||||
|
||||
// the block ID limit is weeping
|
||||
block_uranium = new BlockHazard().makeBeaconable().setBlockName("block_uranium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(50.0F).setBlockTextureName(RefStrings.MODID + ":block_uranium");
|
||||
block_u233 = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_u233").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(50.0F).setBlockTextureName(RefStrings.MODID + ":block_u233");
|
||||
block_u235 = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_u235").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(50.0F).setBlockTextureName(RefStrings.MODID + ":block_u235");
|
||||
@ -1386,7 +1374,7 @@ public class ModBlocks {
|
||||
block_corium = new BlockHazard(Material.iron).setBlockName("block_corium").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium");
|
||||
block_corium_cobble = new BlockOutgas(Material.iron, true, 1, true, true).setBlockName("block_corium_cobble").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium_cobble");
|
||||
block_scrap = new BlockFalling(Material.sand).setBlockName("block_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeGravel).setBlockTextureName(RefStrings.MODID + ":block_scrap");
|
||||
block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap_alt2");
|
||||
block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap");
|
||||
block_beryllium = new BlockBeaconable(Material.iron).setBlockName("block_beryllium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":block_beryllium");
|
||||
block_schraranium = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.SCHRAB).setBlockName("block_schraranium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(250.0F).setBlockTextureName(RefStrings.MODID + ":block_schraranium");
|
||||
block_schrabidium = new BlockHazard().makeBeaconable().setDisplayEffect(ExtDisplayEffect.SCHRAB).setBlockName("block_schrabidium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_schrabidium");
|
||||
@ -1450,8 +1438,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_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_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_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");
|
||||
@ -1532,6 +1520,7 @@ public class ModBlocks {
|
||||
|
||||
lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone");
|
||||
brick_forgotten = new BlockPillar(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||
brick_forgotten_lock = new BlockForgottenLock(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten_lock").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten_lock");
|
||||
|
||||
concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
concrete_double_slab = new BlockMultiSlab(concrete_slab, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_double_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
@ -1721,7 +1710,7 @@ public class ModBlocks {
|
||||
nuke_n2 = new NukeN2(Material.iron).setBlockName("nuke_n2").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_n2");
|
||||
nuke_fstbmb = new NukeBalefire(Material.iron).setBlockName("nuke_fstbmb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_fstbmb");
|
||||
|
||||
bomb_multi = new BombMulti(Material.iron).setBlockName("bomb_multi").setCreativeTab(MainRegistry.nukeTab).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":bomb_multi1");
|
||||
bomb_multi = new BombMulti(Material.iron).setBlockName("bomb_multi").setCreativeTab(MainRegistry.nukeTab).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
flame_war = new BombFlameWar(Material.iron).setBlockName("flame_war").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":flame_war");
|
||||
float_bomb = new BombFloat(Material.iron).setBlockName("float_bomb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F);
|
||||
@ -1789,7 +1778,7 @@ public class ModBlocks {
|
||||
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_difurnace_extension = new MachineDiFurnaceExtension().setBlockName("machine_difurnace_extension").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_rtg_off = new MachineDiFurnaceRTG(false).setBlockName("machine_difurnace_rtg_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(2.0F).setCreativeTab(null);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(1.0F).setCreativeTab(null);
|
||||
|
||||
machine_centrifuge = new MachineCentrifuge(Material.iron).setBlockName("machine_centrifuge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_gascent = new MachineGasCent(Material.iron).setBlockName("machine_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -1813,13 +1802,6 @@ public class ModBlocks {
|
||||
machine_exposure_chamber = new MachineExposureChamber(Material.iron).setBlockName("machine_exposure_chamber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_radgen");
|
||||
|
||||
hadron_plating = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating");
|
||||
hadron_plating_blue = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_blue").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_blue");
|
||||
hadron_plating_black = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_black").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_black");
|
||||
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_yellow");
|
||||
hadron_plating_striped = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_striped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_striped");
|
||||
hadron_plating_voltz = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_voltz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
||||
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
||||
hadron_coil_alloy = new BlockHadronCoil(Material.iron, 10).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_alloy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_alloy");
|
||||
hadron_coil_gold = new BlockHadronCoil(Material.iron, 25).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_gold");
|
||||
hadron_coil_neodymium = new BlockHadronCoil(Material.iron, 50).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_neodymium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_neodymium");
|
||||
@ -1829,12 +1811,6 @@ public class ModBlocks {
|
||||
hadron_coil_starmetal = new BlockHadronCoil(Material.iron, 1000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_starmetal").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_starmetal");
|
||||
hadron_coil_chlorophyte = new BlockHadronCoil(Material.iron, 2500).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_chlorophyte").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_chlorophyte");
|
||||
hadron_coil_mese = new BlockHadronCoil(Material.iron, 10000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_mese").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_mese");
|
||||
hadron_power = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
||||
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
||||
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
||||
hadron_access = new BlockHadronAccess(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_access").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
||||
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
||||
|
||||
pa_source = new BlockPASource().setStepSound(Block.soundTypeMetal).setBlockName("pa_source").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_beamline = new BlockPABeamline().setStepSound(Block.soundTypeMetal).setBlockName("pa_beamline").setHardness(5.0F).setResistance(10.0F);
|
||||
@ -1888,6 +1864,7 @@ 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");
|
||||
@ -1968,8 +1945,7 @@ public class ModBlocks {
|
||||
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
||||
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
||||
|
||||
machine_transformer = new MachineTransformer(Material.iron, 10000L, 1).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
machine_transformer_dnt = new MachineTransformer(Material.iron, 1000000000000000L, 1).setBlockName("machine_transformer_dnt").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
||||
machine_transformer = new MachineTransformer(Material.iron).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
|
||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
@ -2029,6 +2005,7 @@ 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");
|
||||
@ -2060,7 +2037,7 @@ public class ModBlocks {
|
||||
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
||||
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door");
|
||||
|
||||
sliding_blast_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDE_DOOR).setBlockName("sliding_blast_door").setHardness(10.0F).setResistance(750.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":sliding_blast_door");
|
||||
@ -2131,6 +2108,8 @@ 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");
|
||||
@ -2142,6 +2121,9 @@ 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");
|
||||
@ -2188,8 +2170,8 @@ public class ModBlocks {
|
||||
boxcar = new DecoBlock(Material.iron).setBlockName("boxcar").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":boxcar");
|
||||
boat = new DecoBlock(Material.iron).setBlockName("boat").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":asphalt");
|
||||
|
||||
machine_well = new MachineOilWell().setBlockName("machine_well").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_well");
|
||||
machine_pumpjack = new MachinePumpjack().setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_pumpjack");
|
||||
machine_well = new MachineOilWell().setBlockName("machine_well").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_pumpjack = new MachinePumpjack().setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_fracking_tower = new MachineFrackingTower().setBlockName("machine_fracking_tower").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
oil_pipe = new BlockNoDrop(Material.iron).setBlockName("oil_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":oil_pipe");
|
||||
machine_flare = new MachineGasFlare(Material.iron).setBlockName("machine_flare").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2210,23 +2192,19 @@ public class ModBlocks {
|
||||
machine_annihilator = new MachineAnnihilator().setBlockName("machine_annihilator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
||||
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||
machine_assembly_machine = new MachineAssemblyMachine(Material.iron).setBlockName("machine_assembly_machine").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_assembly_factory = new MachineAssemblyFactory(Material.iron).setBlockName("machine_assembly_factory").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_precass = new MachinePrecAss(Material.iron).setBlockName("machine_precass").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null /* the world isn't ready for your beauty yet */).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_precass = new MachinePrecAss(Material.iron).setBlockName("machine_precass").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_arc_welder = new MachineArcWelder(Material.iron).setBlockName("machine_arc_welder").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_soldering_station = new MachineSolderingStation(Material.iron).setBlockName("machine_soldering_station").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemical_plant = new MachineChemicalPlant(Material.iron).setBlockName("machine_chemical_plant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemfac = new MachineChemfac(Material.iron).setBlockName("machine_chemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemical_factory = new MachineChemicalFactory(Material.iron).setBlockName("machine_chemical_factory").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_purex = new MachinePUREX(Material.iron).setBlockName("machine_purex").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_mixer = new MachineMixer(Material.iron).setBlockName("machine_mixer").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank");
|
||||
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_bat9000 = new MachineBigAssTank9000(Material.iron).setBlockName("machine_bat9000").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbofan");
|
||||
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbinegas = new MachineTurbineGas(Material.iron).setBlockName("machine_turbinegas").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_lpw2 = new MachineLPW2().setBlockName("machine_lpw2").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
press_preheater = new BlockBase(Material.iron).setBlockName("press_preheater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":press_preheater");
|
||||
@ -2244,7 +2222,8 @@ public class ModBlocks {
|
||||
machine_steam_engine = new MachineSteamEngine().setBlockName("machine_steam_engine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbine = new MachineTurbine(Material.iron).setBlockName("machine_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbine");
|
||||
machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine");
|
||||
machine_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus");
|
||||
machine_industrial_turbine = new MachineIndustrialTurbine().setBlockName("machine_industrial_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chungus = new MachineChungus().setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_condenser = new MachineCondenser(Material.iron).setBlockName("machine_condenser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":condenser");
|
||||
machine_tower_small = new MachineTowerSmall(Material.iron).setBlockName("machine_tower_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
||||
machine_tower_large = new MachineTowerLarge(Material.iron).setBlockName("machine_tower_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
@ -2393,8 +2372,6 @@ public class ModBlocks {
|
||||
//Test
|
||||
GameRegistry.registerBlock(event_tester, event_tester.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(obj_tester, obj_tester.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_core, test_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_charge, test_charge.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(structure_anchor, structure_anchor.getUnlocalizedName());
|
||||
|
||||
//Ores
|
||||
@ -2702,6 +2679,7 @@ public class ModBlocks {
|
||||
register(stones_double_slab, ItemModSlab.class);
|
||||
|
||||
register(brick_forgotten);
|
||||
register(brick_forgotten_lock);
|
||||
|
||||
GameRegistry.registerBlock(concrete_slab, ItemModSlab.class, concrete_slab.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_double_slab, ItemModSlab.class, concrete_double_slab.getUnlocalizedName());
|
||||
@ -3100,13 +3078,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_hephaestus, machine_hephaestus.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_black, hadron_plating_black.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_yellow, hadron_plating_yellow.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_striped, hadron_plating_striped.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_glass, hadron_plating_glass.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_voltz, hadron_plating_voltz.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_alloy, ItemBlockBase.class, hadron_coil_alloy.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_gold, ItemBlockBase.class, hadron_coil_gold.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_neodymium, ItemBlockBase.class, hadron_coil_neodymium.getUnlocalizedName());
|
||||
@ -3116,12 +3087,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(hadron_coil_starmetal, ItemBlockBase.class, hadron_coil_starmetal.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemBlockBase.class, hadron_coil_chlorophyte.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_coil_mese, ItemBlockBase.class, hadron_coil_mese.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_power, hadron_power.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_diode, hadron_diode.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_analysis, hadron_analysis.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_analysis_glass, hadron_analysis_glass.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_access, hadron_access.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_core, hadron_core.getUnlocalizedName());
|
||||
|
||||
register(pa_source);
|
||||
register(pa_beamline);
|
||||
@ -3137,6 +3102,8 @@ 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());
|
||||
@ -3148,6 +3115,9 @@ 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);
|
||||
@ -3163,7 +3133,8 @@ public class ModBlocks {
|
||||
register(red_cable_gauge);
|
||||
register(red_cable_box);
|
||||
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
|
||||
register(red_connector);
|
||||
register(red_connector_super);
|
||||
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
|
||||
register(red_pylon_medium_wood);
|
||||
register(red_pylon_medium_wood_transformer);
|
||||
@ -3255,20 +3226,15 @@ public class ModBlocks {
|
||||
register(capacitor_tantalium);
|
||||
register(capacitor_schrabidate);
|
||||
GameRegistry.registerBlock(machine_transformer, machine_transformer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_transformer_dnt, machine_transformer_dnt.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());
|
||||
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);
|
||||
@ -3282,6 +3248,7 @@ public class ModBlocks {
|
||||
register(machine_steam_engine);
|
||||
register(machine_turbine);
|
||||
register(machine_large_turbine);
|
||||
register(machine_industrial_turbine);
|
||||
register(machine_chungus);
|
||||
GameRegistry.registerBlock(machine_condenser, machine_condenser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_tower_small, machine_tower_small.getUnlocalizedName());
|
||||
@ -3289,8 +3256,8 @@ public class ModBlocks {
|
||||
register(machine_condenser_powered);
|
||||
GameRegistry.registerBlock(machine_deuterium_extractor, machine_deuterium_extractor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_deuterium_tower, machine_deuterium_tower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_liquefactor, ItemBlockBase.class, machine_liquefactor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_solidifier, ItemBlockBase.class, machine_solidifier.getUnlocalizedName());
|
||||
register(machine_liquefactor);
|
||||
register(machine_solidifier);
|
||||
register(machine_intake);
|
||||
register(machine_compressor);
|
||||
register(machine_compressor_compact);
|
||||
@ -3400,6 +3367,7 @@ public class ModBlocks {
|
||||
register(fusion_boiler);
|
||||
register(fusion_mhdt);
|
||||
register(fusion_coupler);
|
||||
register(fusion_plasma_forge);
|
||||
|
||||
register(watz_element);
|
||||
register(watz_cooler);
|
||||
@ -3447,10 +3415,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
|
||||
|
||||
//Rails
|
||||
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_highspeed, ItemBlockBase.class, rail_highspeed.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_booster, ItemBlockBase.class, rail_booster.getUnlocalizedName());
|
||||
register(rail_wood);
|
||||
register(rail_narrow);
|
||||
register(rail_highspeed);
|
||||
register(rail_booster);
|
||||
register(rail_narrow_straight);
|
||||
register(rail_narrow_curve);
|
||||
register(rail_large_straight);
|
||||
|
||||
@ -54,21 +54,24 @@ public class BlockCrashedBomb extends BlockEnumMulti implements ITileEntityProvi
|
||||
|
||||
EnumDudType type = EnumUtil.grabEnumSafely(EnumDudType.class, world.getBlockMetadata(x, y, z));
|
||||
|
||||
//TODO: make this less scummy
|
||||
if(type == type.BALEFIRE) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.egg_balefire_shard)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.egg_balefire_shard));
|
||||
}
|
||||
if(type == type.CONVENTIONAL) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 16)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 16));
|
||||
}
|
||||
if(type == type.NUKE) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 8)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.billet_plutonium, 4)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 4));
|
||||
}
|
||||
if(type == type.SALTED) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 8)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.billet_plutonium, 2)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ingot_cobalt, 12)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 2),
|
||||
new ItemStack(ModItems.ingot_cobalt, 12));
|
||||
}
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
@ -77,6 +80,10 @@ public class BlockCrashedBomb extends BlockEnumMulti implements ITileEntityProvi
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void dropItems(World world, int x, int y, int z, ItemStack... drops) {
|
||||
for(ItemStack drop : drops) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
52
src/main/java/com/hbm/blocks/generic/BlockForgottenLock.java
Normal file
52
src/main/java/com/hbm/blocks/generic/BlockForgottenLock.java
Normal file
@ -0,0 +1,52 @@
|
||||
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;
|
||||
|
||||
public class BlockForgottenLock extends BlockPillar {
|
||||
|
||||
public BlockForgottenLock(Material mat, String top) {
|
||||
super(mat, top);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
// placeholder
|
||||
if(player.getHeldItem() != null) {
|
||||
boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked;
|
||||
if((player.getHeldItem().getItem() == ModItems.key_red || cracked) && side != 0 && side != 1) {
|
||||
if(cracked) player.getHeldItem().stackSize--;
|
||||
if(world.isRemote) return true;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
|
||||
generate(world, x, y, z, meta, dir);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:block.lockOpen", 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -205,10 +205,18 @@ public class BlockKeyhole extends BlockStone {
|
||||
if(rand == 0) {
|
||||
world.setBlock(x, y + 1, z, ModBlocks.deco_loot);
|
||||
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y + 1, z);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_helmet), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_plate), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_legs), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_boots), 0, 0, 0);
|
||||
|
||||
if(world.rand.nextInt(5) == 0) {
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_helmet), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_plate), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_legs), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_boots), 0, 0, 0);
|
||||
} else {
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_helmet), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_plate), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_legs), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_boots), 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
spawnPedestalItem(world, x, y + 1, z);
|
||||
}
|
||||
|
||||
@ -155,5 +155,24 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,6 +163,7 @@ public class BlockStorageCrate extends BlockContainer implements IBlockMulti, IL
|
||||
}
|
||||
|
||||
if(!nbt.hasNoTags()) {
|
||||
nbt.setLong("stacklock", world.rand.nextLong());
|
||||
drop.stackTagCompound = nbt;
|
||||
}
|
||||
|
||||
@ -173,7 +174,7 @@ public class BlockStorageCrate extends BlockContainer implements IBlockMulti, IL
|
||||
}
|
||||
}
|
||||
|
||||
if (drop.hasTagCompound()) {
|
||||
if(drop.hasTagCompound()) {
|
||||
try {
|
||||
byte[] abyte = CompressedStreamTools.compress(drop.stackTagCompound);
|
||||
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.IProxyController;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockHadronAccess extends BlockContainer implements IProxyController {
|
||||
|
||||
public BlockHadronAccess(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityProxyInventory();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta).getOpposite();
|
||||
|
||||
if(side != dir.ordinal())
|
||||
return ModBlocks.hadron_plating_blue.getIcon(side, meta);
|
||||
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(l).getOpposite();
|
||||
world.setBlockMetadataWithNotify(x, y, z, dir.ordinal(), 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
|
||||
BossSpawnHandler.markFBI(player);
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||
|
||||
for(int i = 1; i < 3; i++) {
|
||||
|
||||
if(world.getBlock(x + dir.offsetX * i, y + dir.offsetY * i, z + dir.offsetZ * i) == ModBlocks.hadron_core) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x + dir.offsetX * i, y + dir.offsetY * i, z + dir.offsetZ * i);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getCore(World world, int x, int y, int z) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||
|
||||
for(int i = 1; i < 3; i++) {
|
||||
TileEntity te = Compat.getTileStandard(world, x + dir.offsetX * i, y + dir.offsetY * i, z + dir.offsetZ * i);
|
||||
|
||||
if(te instanceof TileEntityHadron) {
|
||||
return te;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.hbm.blocks.BlockMulti;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockHadronCooler extends BlockMulti implements ITooltipProvider {
|
||||
|
||||
private IIcon[] icons = new IIcon[getSubCount()];
|
||||
|
||||
public BlockHadronCooler(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
icons[0] = reg.registerIcon(RefStrings.MODID + ":hadron_cooler");
|
||||
icons[1] = reg.registerIcon(RefStrings.MODID + ":hadron_cooler_mk2");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return icons[this.rectify(metadata)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int meta = this.rectify(stack.getItemDamage());
|
||||
|
||||
if(meta == 1) return this.getUnlocalizedName() + "_mk2";
|
||||
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray(this.getUnlocalizedName(stack) + ".desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,85 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockHadronCore extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconIn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconOut;
|
||||
|
||||
public BlockHadronCore(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityHadron();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
this.iconIn = iconRegister.registerIcon(RefStrings.MODID + ":hadron_core_in");
|
||||
this.iconOut = iconRegister.registerIcon(RefStrings.MODID + ":hadron_core_out");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(side == meta)
|
||||
return this.iconOut;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
|
||||
if(side == dir.getOpposite().ordinal())
|
||||
return this.iconIn;
|
||||
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
|
||||
BossSpawnHandler.markFBI(player);
|
||||
|
||||
TileEntityHadron entity = (TileEntityHadron) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,79 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronDiode;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronDiode.DiodeConfig;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockHadronDiode extends BlockContainer implements IToolable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconIn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconOut;
|
||||
|
||||
public BlockHadronDiode(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityHadronDiode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconIn = iconRegister.registerIcon(RefStrings.MODID + ":hadron_diode_in");
|
||||
this.iconOut = iconRegister.registerIcon(RefStrings.MODID + ":hadron_diode_out");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":hadron_diode");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
|
||||
TileEntityHadronDiode diode = (TileEntityHadronDiode) world.getTileEntity(x, y, z);
|
||||
|
||||
DiodeConfig conf = diode.getConfig(side);
|
||||
|
||||
switch(conf) {
|
||||
case NONE:
|
||||
return blockIcon;
|
||||
case IN:
|
||||
return iconIn;
|
||||
case OUT:
|
||||
default:
|
||||
return iconOut;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
if(tool != ToolType.SCREWDRIVER)
|
||||
return false;
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntityHadronDiode diode = (TileEntityHadronDiode) world.getTileEntity(x, y, z);
|
||||
int config = diode.getConfig(side).ordinal();
|
||||
config += 1;
|
||||
config %= DiodeConfig.values().length;
|
||||
diode.setConfig(side, config);
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockHadronPlating extends Block {
|
||||
|
||||
public BlockHadronPlating(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.machine.TileEntityHadronPower;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class BlockHadronPower extends BlockContainer implements ILookOverlay {
|
||||
|
||||
public long power;
|
||||
|
||||
public BlockHadronPower(Material mat, long power) {
|
||||
super(mat);
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityHadronPower();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityHadronPower))
|
||||
return;
|
||||
|
||||
TileEntityHadronPower battery = (TileEntityHadronPower) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(BobMathUtil.getShortNumber(battery.getPower()) + " / " + BobMathUtil.getShortNumber(battery.getMaxPower()) + "HE");
|
||||
|
||||
double percent = (double) battery.getPower() / (double) battery.getMaxPower();
|
||||
int charge = (int) Math.floor(percent * 10_000D);
|
||||
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||
|
||||
text.add("&[" + color + "&]" + (charge / 100D) + "%");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -20,8 +20,7 @@ public class FurnaceCombination extends BlockDummyable implements ITooltipProvid
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12)
|
||||
return new TileEntityFurnaceCombination();
|
||||
if(meta >= 12) return new TileEntityFurnaceCombination();
|
||||
return new TileEntityProxyCombo().inventory().fluid();
|
||||
}
|
||||
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineAssembler extends BlockDummyable {
|
||||
|
||||
public MachineAssembler(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.0, 0.0, -2.0, 2.0, 2.0, 1.0));
|
||||
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.14375, 0.34375, -2.5, 0.15625, 0.65625, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(0.85625, 0.34375, -2.5, 1.15625, 0.65625, 1.5));
|
||||
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.5, 0.0, -0.5, 0.0, 1.0, 0.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(1.0, 0.0, -1.5, 2.5, 1.0, -0.5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineAssembler();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 2, 1, 2, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x -= dir.offsetX;
|
||||
z -= dir.offsetZ;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 2, y, z + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 1, y, z - rot.offsetZ * 1);
|
||||
this.makeExtra(world, x + rot.offsetX * 2 - dir.offsetX, y, z + rot.offsetZ * 2 - dir.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX * 1 - dir.offsetX, y, z - rot.offsetZ * 1 - dir.offsetZ);
|
||||
}
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineAssemfac extends BlockDummyable {
|
||||
|
||||
public MachineAssemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineAssemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX * 2, y, z + dir.offsetZ * 3 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX * 3, y, z + dir.offsetZ * 3 - rot.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 4 + rot.offsetX * 2, y, z - dir.offsetZ * 4 + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - dir.offsetX * 4 - rot.offsetX * 3, y, z - dir.offsetZ * 4 - rot.offsetZ * 3);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * 2, y, z + rot.offsetZ * 3 + dir.offsetZ * 2);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 - dir.offsetX * 3, y, z + rot.offsetZ * 3 - dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * 2, y, z - rot.offsetZ * 4 + dir.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 - dir.offsetX * 3, y, z - rot.offsetZ * 4 - dir.offsetZ * 3);
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
@ -1,65 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineChemfac extends BlockDummyable {
|
||||
|
||||
public MachineChemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
for(int i = -3; i < 3; i++) {
|
||||
this.makeExtra(world, x + rot.offsetX * 2 + dir.offsetX * i, y + 3, z + rot.offsetZ * 2 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 3 + dir.offsetX * i, y + 3, z - rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 1, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 2, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 1, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 2, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
}
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Deprecated
|
||||
public class MachineChemplant extends BlockDummyable {
|
||||
|
||||
public MachineChemplant(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.0, 0.0, -2.0, 2.0, 3.0, 1.0));
|
||||
|
||||
// some guy once told me not to use magic numbers
|
||||
// so I turned him into a newt
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.14375, 0.34375, -2.5, 0.15625, 0.65625, 1.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(0.85625, 0.34375, -2.5, 1.15625, 0.65625, 1.5));
|
||||
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.5, 0.0, -0.5, 0.0, 1.0, 0.5));
|
||||
this.bounding.add(AxisAlignedBB.getBoundingBox(1.0, 0.0, -1.5, 2.5, 1.0, -0.5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemplant();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {2, 0, 2, 1, 2, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x -= dir.offsetX;
|
||||
z -= dir.offsetZ;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 2, y, z + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 1, y, z - rot.offsetZ * 1);
|
||||
this.makeExtra(world, x + rot.offsetX * 2 - dir.offsetX, y, z + rot.offsetZ * 2 - dir.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX * 1 - dir.offsetX, y, z - rot.offsetZ * 1 - dir.offsetZ);
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,7 @@ 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.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
@ -28,19 +29,14 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChungus extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||
|
||||
public MachineChungus(Material mat) {
|
||||
super(mat);
|
||||
public MachineChungus() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityChungus();
|
||||
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyCombo(false, true, true);
|
||||
|
||||
if(meta >= 12) return new TileEntityChungus();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -66,34 +62,14 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider,
|
||||
int iZ2 = entity.zCoord + dir.offsetZ * 2 + turn.offsetZ * 2;
|
||||
|
||||
if((x == iX || x == iX2) && (z == iZ || z == iZ2) && y < entity.yCoord + 2) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
|
||||
if(!world.isRemote) {
|
||||
FluidType type = entity.tanks[0].getTankType();
|
||||
entity.onLeverPull(type);
|
||||
|
||||
if(type == Fluids.STEAM) {
|
||||
entity.tanks[0].setTankType(Fluids.HOTSTEAM);
|
||||
entity.tanks[1].setTankType(Fluids.STEAM);
|
||||
entity.tanks[0].setFill(entity.tanks[0].getFill() / 10);
|
||||
entity.tanks[1].setFill(0);
|
||||
} else if(type == Fluids.HOTSTEAM) {
|
||||
entity.tanks[0].setTankType(Fluids.SUPERHOTSTEAM);
|
||||
entity.tanks[1].setTankType(Fluids.HOTSTEAM);
|
||||
entity.tanks[0].setFill(entity.tanks[0].getFill() / 10);
|
||||
entity.tanks[1].setFill(0);
|
||||
} else if(type == Fluids.SUPERHOTSTEAM) {
|
||||
entity.tanks[0].setTankType(Fluids.ULTRAHOTSTEAM);
|
||||
entity.tanks[1].setTankType(Fluids.SUPERHOTSTEAM);
|
||||
entity.tanks[0].setFill(entity.tanks[0].getFill() / 10);
|
||||
entity.tanks[1].setFill(0);
|
||||
if(!entity.operational) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
entity.onLeverPull();
|
||||
} else {
|
||||
entity.tanks[0].setTankType(Fluids.STEAM);
|
||||
entity.tanks[1].setTankType(Fluids.SPENTSTEAM);
|
||||
entity.tanks[0].setFill(Math.min(entity.tanks[0].getFill() * 1000, entity.tanks[0].getMaxFill()));
|
||||
entity.tanks[1].setFill(0);
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!"));
|
||||
}
|
||||
entity.markDirty();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -168,7 +144,7 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider,
|
||||
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + inputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankInput.getFill()) + "/" + String.format(Locale.US, "%,d", tankInput.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + outputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankOutput.getFill()) + "/" + String.format(Locale.US, "%,d", tankOutput.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(chungus.power) + "/" + BobMathUtil.getShortNumber(chungus.getMaxPower()) + "HE");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(chungus.powerBuffer) + "HE");
|
||||
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -10,6 +10,7 @@ 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;
|
||||
|
||||
@ -30,7 +31,6 @@ 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((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);
|
||||
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);
|
||||
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((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);
|
||||
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);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,133 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineIndustrialTurbine;
|
||||
import com.hbm.tileentity.machine.TileEntityTurbineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
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.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineIndustrialTurbine extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||
|
||||
public MachineIndustrialTurbine() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineIndustrialTurbine();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().fluid().power();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return true;
|
||||
|
||||
TileEntityTurbineBase entity = (TileEntityTurbineBase) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(entity != null) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(entity.getBlockMetadata() - this.offset);
|
||||
|
||||
if(x == entity.xCoord + dir.offsetX * 3 && z == entity.zCoord + dir.offsetZ * 3 && y == entity.yCoord + 1) {
|
||||
if(!world.isRemote) {
|
||||
if(!entity.operational) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
entity.onLeverPull();
|
||||
} else {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!"));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 2, 0, 3, 3, 1, 1 }; }
|
||||
@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.UP);
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX, y, z + dir.offsetZ * 3 + rot.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX, y, z + dir.offsetZ * 3 - rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX * 1 + rot.offsetX, y, z - dir.offsetZ * 1 + rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX * 1 - rot.offsetX, y, z - dir.offsetZ * 1 - rot.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX * 3, y + 2, z + dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 1, y + 2, z - dir.offsetZ * 1);
|
||||
this.makeExtra(world, x - dir.offsetX * 3, y + 1, z - dir.offsetZ * 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
private static String[] blocks = new String[] {"▖ ", "▘ ", " ▘", " ▖"}; // right hand side quarter blocks break the renderer so we cheat a little
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityMachineIndustrialTurbine)) return;
|
||||
|
||||
TileEntityMachineIndustrialTurbine chungus = (TileEntityMachineIndustrialTurbine) te;
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
FluidTank tankInput = chungus.tanks[0];
|
||||
FluidTank tankOutput = chungus.tanks[1];
|
||||
|
||||
FluidType inputType = tankInput.getTankType();
|
||||
FluidType outputType = Fluids.NONE;
|
||||
|
||||
if(inputType.hasTrait(FT_Coolable.class)) {
|
||||
outputType = inputType.getTrait(FT_Coolable.class).coolsTo;
|
||||
}
|
||||
|
||||
int color = ((int) (0xFF - 0xFF * chungus.spin)) << 16 | ((int)(0xFF * chungus.spin) << 8);
|
||||
int time = (int) ((world.getTotalWorldTime() / 4) % 4);
|
||||
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + inputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankInput.getFill()) + "/" + String.format(Locale.US, "%,d", tankInput.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + outputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankOutput.getFill()) + "/" + String.format(Locale.US, "%,d", tankOutput.getMaxFill()) + "mB");
|
||||
text.add("&[" + color + "&]" + EnumChatFormatting.RED + "<- " + EnumChatFormatting.WHITE + BobMathUtil.getShortNumber(chungus.powerBuffer) + "HE (" +
|
||||
EnumChatFormatting.RESET + blocks[chungus.powerBuffer <= 0 ? 0 : time] + (int) Math.round(chungus.spin * 100) + "%" + EnumChatFormatting.WHITE + ")");
|
||||
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class MachineLargeTurbine extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineLargeTurbine(Material mat) {
|
||||
|
||||
@ -14,7 +14,7 @@ public class MachineTransformer extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public MachineTransformer(Material p_i45394_1_, long b, int d) {
|
||||
public MachineTransformer(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@ -26,10 +26,6 @@ public class MachineTransformer extends Block {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top_iron");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_iron");
|
||||
}
|
||||
if(this == ModBlocks.machine_transformer_dnt) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -13,6 +13,7 @@ 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;
|
||||
|
||||
@ -35,7 +36,6 @@ 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((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);
|
||||
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);
|
||||
tessellator.addTranslation(0F, 0.5F, 0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -39,7 +40,7 @@ public class ReactorZirnox extends BlockDummyable {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
BossSpawnHandler.markFBI(player);
|
||||
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
@ -54,7 +55,7 @@ public class ReactorZirnox extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 2, 2, 2, 2,};
|
||||
return new int[] {1, 0, 2, 2, 2, 2,};
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -87,4 +88,43 @@ public class ReactorZirnox extends BlockDummyable {
|
||||
this.makeExtra(world, x + dir.offsetX * o, y + 4, z + dir.offsetZ * o);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||
super.onNeighborBlockChange(world, x, y, z, neighbor);
|
||||
if (world.isRemote) return;
|
||||
int[] core = this.findCore(world, x, y, z);
|
||||
if (core == null) return;
|
||||
int cx = core[0];
|
||||
int cy = core[1];
|
||||
int cz = core[2];
|
||||
TileEntity te = world.getTileEntity(cx, cy, cz);
|
||||
if (!(te instanceof TileEntityReactorZirnox)) return;
|
||||
TileEntityReactorZirnox reactor = (TileEntityReactorZirnox) te;
|
||||
boolean powered = false;
|
||||
// 2. Scan multiblock
|
||||
for (int dx = -2; dx <= 2 && !powered; dx++) {
|
||||
for (int dy = 0; dy <= 4 && !powered; dy++) {
|
||||
for (int dz = -2; dz <= 2 && !powered; dz++) {
|
||||
// Get only surface blocks
|
||||
if (dx == -2 || dx == 2 ||
|
||||
dy == 0 || dy == 4 ||
|
||||
dz == -2 || dz == 2) {
|
||||
|
||||
int sx = cx + dx;
|
||||
int sy = cy + dy;
|
||||
int sz = cz + dz;
|
||||
|
||||
if (world.isBlockIndirectlyGettingPowered(sx, sy, sz) ||
|
||||
world.getBlockPowerInput(sx, sy, sz) > 0) {
|
||||
|
||||
powered = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
reactor.setRedstonePowered(powered);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ 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;
|
||||
@ -23,7 +24,6 @@ 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 WavefrontObject getModel() {
|
||||
public HFRWavefrontObject getModel() {
|
||||
switch(type) {
|
||||
case FLUORESCENT: return (WavefrontObject) ResourceManager.fluorescent_lamp;
|
||||
case HALOGEN: return (WavefrontObject) ResourceManager.flood_lamp;
|
||||
default: return (WavefrontObject) ResourceManager.cage_lamp;
|
||||
case FLUORESCENT: return (HFRWavefrontObject) ResourceManager.fluorescent_lamp;
|
||||
case HALOGEN: return (HFRWavefrontObject) ResourceManager.flood_lamp;
|
||||
default: return (HFRWavefrontObject) ResourceManager.cage_lamp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,13 +8,14 @@ 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 {
|
||||
public class BlockPABeamline extends BlockDummyable implements ITooltipProvider, IToolable {
|
||||
|
||||
public BlockPABeamline() {
|
||||
super(Material.iron);
|
||||
@ -35,4 +36,19 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
package com.hbm.blocks.machine.fusion;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
|
||||
public MachineFusionPlasmaForge() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityFusionPlasmaForge();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] { 4, 0, 5, 5, 5, 5 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
@ -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,12 +20,14 @@ 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.ResourceLocation;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -34,7 +36,18 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
|
||||
|
||||
public static boolean dropLids = true;
|
||||
public static boolean digamma = false;
|
||||
public ResourceLocation coverTexture;
|
||||
|
||||
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;
|
||||
|
||||
protected RBMKBase() {
|
||||
super(Material.iron);
|
||||
@ -42,11 +55,41 @@ 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
|
||||
public Block setBlockTextureName(String texture) {
|
||||
this.textureName = texture;
|
||||
this.coverTexture = new ResourceLocation(RefStrings.MODID + ":textures/blocks/" + (texture.split(":")[1]) + ".png");
|
||||
return this;
|
||||
@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;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,34 +104,24 @@ 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;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -124,6 +157,12 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
|
||||
public static final ForgeDirection DIR_NO_LID = ForgeDirection.NORTH;
|
||||
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) {
|
||||
@ -186,7 +225,9 @@ 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;
|
||||
|
||||
@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RBMKBoiler extends RBMKBase {
|
||||
public class RBMKBoiler extends RBMKPipedBase {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
@ -25,9 +25,4 @@ public class RBMKBoiler extends RBMKBase {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,22 @@
|
||||
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 RBMKBase {
|
||||
public class RBMKControl extends RBMKPipedBase {
|
||||
|
||||
public boolean moderated = false;
|
||||
public IIcon textureBottom;
|
||||
|
||||
public RBMKControl(boolean moderated) {
|
||||
super();
|
||||
@ -17,10 +24,24 @@ public class RBMKControl extends RBMKBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
super.registerBlockIcons(reg);
|
||||
if(this == ModBlocks.rbmk_control_reasim)
|
||||
this.textureBottom = reg.registerIcon(this.getTextureName() + "_bottom");
|
||||
}
|
||||
|
||||
if(meta >= this.offset)
|
||||
return new TileEntityRBMKControlManual();
|
||||
@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();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -33,9 +54,4 @@ public class RBMKControl extends RBMKBase {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,39 @@
|
||||
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 RBMKBase {
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= this.offset)
|
||||
return new TileEntityRBMKControlAuto();
|
||||
if(meta >= this.offset) return new TileEntityRBMKControlAuto();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -26,9 +46,4 @@ public class RBMKControlAuto extends RBMKBase {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.blocks.machine.rbmk;
|
||||
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKCooler;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -9,10 +10,8 @@ public class RBMKCooler extends RBMKBase {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= this.offset)
|
||||
return new TileEntityRBMKCooler();
|
||||
|
||||
if(meta >= this.offset) return new TileEntityRBMKCooler();
|
||||
if(hasExtra(meta)) return new TileEntityProxyCombo().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
29
src/main/java/com/hbm/blocks/machine/rbmk/RBMKDisplay.java
Normal file
29
src/main/java/com/hbm/blocks/machine/rbmk/RBMKDisplay.java
Normal file
@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
25
src/main/java/com/hbm/blocks/machine/rbmk/RBMKGauge.java
Normal file
25
src/main/java/com/hbm/blocks/machine/rbmk/RBMKGauge.java
Normal file
@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RBMKHeater extends RBMKBase {
|
||||
public class RBMKHeater extends RBMKPipedBase {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
@ -25,9 +25,4 @@ public class RBMKHeater extends RBMKBase {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
51
src/main/java/com/hbm/blocks/machine/rbmk/RBMKKeyPad.java
Normal file
51
src/main/java/com/hbm/blocks/machine/rbmk/RBMKKeyPad.java
Normal file
@ -0,0 +1,51 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ 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;
|
||||
|
||||
@ -24,12 +25,11 @@ 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);
|
||||
return type.hasTrait(FT_Coolable.class) || type == Fluids.PERFLUOROMETHYL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
34
src/main/java/com/hbm/blocks/machine/rbmk/RBMKPipedBase.java
Normal file
34
src/main/java/com/hbm/blocks/machine/rbmk/RBMKPipedBase.java
Normal file
@ -0,0 +1,34 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -4,12 +4,18 @@ 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.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||
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 {
|
||||
@ -21,17 +27,40 @@ 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 TileEntityProxyInventory();
|
||||
|
||||
if(meta >= this.offset) return new TileEntityRBMKRod();
|
||||
if(hasExtra(meta)) return new TileEntityProxyCombo().inventory();
|
||||
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) {
|
||||
@ -53,7 +82,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;
|
||||
player.getHeldItem().stackSize--;
|
||||
if(!player.capabilities.isCreativeMode) player.getHeldItem().stackSize--;
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.hbm.blocks.machine.rbmk;
|
||||
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRodReaSim;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -14,13 +14,8 @@ 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 TileEntityProxyInventory();
|
||||
|
||||
if(meta >= this.offset) return new TileEntityRBMKRodReaSim();
|
||||
if(hasExtra(meta)) return new TileEntityProxyCombo().inventory();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
@ -9,17 +9,15 @@ 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;
|
||||
@ -35,10 +33,6 @@ 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;
|
||||
@ -50,7 +44,6 @@ 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;
|
||||
@ -346,98 +339,4 @@ 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; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ 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,7 +20,6 @@ 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((WavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_narrow_curve, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ 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,7 +20,6 @@ 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((WavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_narrow_straight, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ 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;
|
||||
|
||||
@ -18,7 +19,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_buffer, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_buffer, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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);
|
||||
|
||||
@ -5,6 +5,7 @@ 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,7 +20,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ 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;
|
||||
@ -12,7 +13,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ 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;
|
||||
@ -12,7 +13,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ 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;
|
||||
|
||||
@ -20,7 +21,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_ramp, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_ramp, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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);
|
||||
|
||||
@ -5,6 +5,7 @@ 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,7 +20,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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);
|
||||
|
||||
@ -5,6 +5,7 @@ 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,7 +20,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
ObjUtil.renderWithIcon((HFRWavefrontObject) 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);
|
||||
|
||||
@ -7,6 +7,7 @@ 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;
|
||||
@ -25,7 +26,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_switch, "Rail", this.blockIcon, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_switch, "Rail", this.blockIcon, tessellator, rotation, true);
|
||||
ObjUtil.renderPartWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_switch, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
|
||||
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
|
||||
}
|
||||
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
|
||||
@ -8,6 +8,7 @@ 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;
|
||||
@ -22,7 +23,6 @@ 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((WavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, rotation, true);
|
||||
ObjUtil.renderPartWithIcon((HFRWavefrontObject) 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((WavefrontObject) ResourceManager.rail_standard_switch_flipped, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
|
||||
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rail_standard_switch_flipped, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
|
||||
}
|
||||
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
|
||||
@ -1,118 +0,0 @@
|
||||
package com.hbm.blocks.test;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Facing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TestCharge extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public TestCharge(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
int l = determineOrientation(p_149689_1_, p_149689_2_, p_149689_3_, p_149689_4_, p_149689_5_);
|
||||
p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, l, 2);
|
||||
}
|
||||
|
||||
public static int determineOrientation(World p_150071_0_, int p_150071_1_, int p_150071_2_, int p_150071_3_, EntityLivingBase p_150071_4_) {
|
||||
|
||||
//instead of mirrored piston behavior, we could just scan for nearby cores and adjust it accordingly
|
||||
|
||||
if(MathHelper.abs((float) p_150071_4_.posX - (float) p_150071_1_) < 2.0F && MathHelper.abs((float) p_150071_4_.posZ - (float) p_150071_3_) < 2.0F) {
|
||||
double d0 = p_150071_4_.posY + 1.82D - (double) p_150071_4_.yOffset;
|
||||
|
||||
if(d0 - (double) p_150071_2_ > 2.0D) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((double) p_150071_2_ - d0 > 0.0D) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int l = MathHelper.floor_double((double) (p_150071_4_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
|
||||
return l == 0 ? 3 : (l == 1 ? 4 : (l == 2 ? 2 : (l == 3 ? 5 : 1)));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
this.blockIcon = p_149651_1_.registerIcon(RefStrings.MODID + ":test_charge_side");
|
||||
this.topIcon = p_149651_1_.registerIcon(RefStrings.MODID + ":test_charge_top");
|
||||
this.bottomIcon = p_149651_1_.registerIcon(RefStrings.MODID + ":test_charge_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
int k = getPistonOrientation(p_149691_2_);
|
||||
return k > 5 ? this.topIcon : (p_149691_1_ == k ? this.topIcon : (p_149691_1_ == Facing.oppositeSide[k] ? this.bottomIcon : this.blockIcon));
|
||||
}
|
||||
|
||||
public static int getPistonOrientation(int p_150076_0_) {
|
||||
return p_150076_0_ & 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
|
||||
//instead of exploding outright, we schedule an update. this will let redstone lines transmit signals
|
||||
//even if they are on top of the charge which would get destroyed, allowing for more compact designs
|
||||
if(!world.isRemote && world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||
world.scheduledUpdatesAreImmediate = false;
|
||||
world.scheduleBlockUpdate(x, y, z, this, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(getPistonOrientation(world.getBlockMetadata(x, y, z)));
|
||||
|
||||
//is our target a core?
|
||||
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == ModBlocks.test_core) {
|
||||
|
||||
//increment meta, schedule an update and set to air
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
int core = world.getBlockMetadata(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
//this should be false by default and only true for special world gen, but some mods tend to leak immediate updates
|
||||
world.scheduledUpdatesAreImmediate = false;
|
||||
world.setBlockMetadataWithNotify(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, core + 1, 4); //flag 4 causes no block update and no re-render on clients
|
||||
world.scheduleBlockUpdate(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.test_core, 1); //set delay to 2 if 1 isn't enough
|
||||
|
||||
//if not, just explode, who cares
|
||||
} else {
|
||||
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 5.0F, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package com.hbm.blocks.test;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestCore extends Block {
|
||||
|
||||
public TestCore(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(meta >= 6) {
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
EntityNukeTorex.statFacStandard(world, x + 0.5, y + 0.5, z + 0.5, BombConfig.missileRadius);
|
||||
|
||||
} else if(meta > 0) {
|
||||
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 5.0F, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,6 +38,7 @@ public class ClientConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_X = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Boolean> SHOW_BLOCK_META_OVERLAY = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> BADGES_HUD = new ConfigWrapper(true);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
|
||||
@ -65,6 +66,7 @@ public class ClientConfig extends RunningConfig {
|
||||
configMap.put("TOOL_HUD_INDICATOR_X", TOOL_HUD_INDICATOR_X);
|
||||
configMap.put("TOOL_HUD_INDICATOR_Y", TOOL_HUD_INDICATOR_Y);
|
||||
configMap.put("SHOW_BLOCK_META_OVERLAY", SHOW_BLOCK_META_OVERLAY);
|
||||
configMap.put("BADGES_HUD", BADGES_HUD);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import com.hbm.inventory.recipes.PrecAssRecipes;
|
||||
import com.hbm.lib.RefStrings;
|
||||
public class GeneralConfig {
|
||||
|
||||
@ -42,6 +44,10 @@ public class GeneralConfig {
|
||||
public static int normalSoundChannels = 200;
|
||||
|
||||
public static boolean enableExpensiveMode = false;
|
||||
|
||||
public static boolean trueExp() {
|
||||
return enableExpensiveMode && !PrecAssRecipes.INSTANCE.modified;
|
||||
}
|
||||
|
||||
public static boolean enable528 = false;
|
||||
public static boolean enable528ReasimBoilers = true;
|
||||
@ -52,6 +58,11 @@ public class GeneralConfig {
|
||||
public static boolean enable528PressurizedRecipes = true;
|
||||
public static boolean enable528ExplosiveEnergistics = true;
|
||||
public static int coltanRate = 2;
|
||||
|
||||
public static boolean true528() {
|
||||
return enable528 && enable528ReasimBoilers && !enable528ColtanSpawn && enable528BosniaSimulator &&
|
||||
enable528NetherBurn && enable528PressurizedRecipes && enable528ExplosiveEnergistics && coltanRate <= 2;
|
||||
}
|
||||
|
||||
public static boolean enableLBSM = false;
|
||||
public static boolean enableLBSMFullSchrab = true;
|
||||
|
||||
@ -68,6 +68,10 @@ public class MobConfig {
|
||||
public static double rampantSmokeStackOverride = 0.4;
|
||||
public static double pollutionMult = 3;
|
||||
|
||||
public static boolean trueRam() {
|
||||
return rampantMode && rampantNaturalScoutSpawn && scoutThreshold <= 0.1 && rampantExtendedTargetting && rampantDig && rampantGlyphidGuidance;
|
||||
}
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY = CommonConfig.CATEGORY_MOBS;
|
||||
|
||||
@ -21,6 +21,7 @@ public class ServerConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
||||
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> LEGACY_CRUCIBLE_RULES = new ConfigWrapper(false);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
|
||||
@ -34,6 +35,7 @@ public class ServerConfig extends RunningConfig {
|
||||
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
||||
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
||||
configMap.put("ENABLE_MKU", ENABLE_MKU);
|
||||
configMap.put("LEGACY_CRUCIBLE_RULES", LEGACY_CRUCIBLE_RULES);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -81,19 +81,16 @@ 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 = 500;
|
||||
public static int geyserVapor = 250;
|
||||
public static int capsuleStructure = 100;
|
||||
public static int arcticStructure = 500;
|
||||
public static int jungleStructure = 2000;
|
||||
@ -204,13 +201,10 @@ 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);
|
||||
@ -220,7 +214,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", 500);
|
||||
geyserVapor = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.19_geyserVaporSpawn", "Spawn vapor geyser on every nTH chunk", 250);
|
||||
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);
|
||||
@ -245,13 +239,10 @@ 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);
|
||||
|
||||
@ -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.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.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_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 }));
|
||||
|
||||
@ -100,6 +100,7 @@ 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);
|
||||
@ -158,28 +159,28 @@ public class RodRecipes {
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.icf_pellet_empty), new Object[] { "ZLZ", "L L", "ZLZ", 'Z', ZR.wireFine(), 'L', PB.wireFine() });
|
||||
}
|
||||
|
||||
|
||||
public static void registerInit() {
|
||||
/* GT6 */
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadah-Enriched")) addPellet(new DictFrame("Naquadah-Enriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadahEnriched")) addPellet(new DictFrame("NaquadahEnriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadria")) addPellet(new DictFrame("Naquadria"), EnumWatzType.NQR);
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with one billet. For fuels only, therefore no unloading or ore dict
|
||||
public static void addFuelRodBillet(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_empty, billet });
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with two billets
|
||||
public static void addDualFuelRodBillet(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_dual_empty, billet, billet });
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with three billets
|
||||
public static void addQuadFuelRodBillet(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_quad_empty, billet, billet, billet, billet });
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with one billet + unload
|
||||
public static void addRodBilletUnload(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_empty, billet });
|
||||
|
||||
@ -77,6 +77,8 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_akimbo, 1), new Object[] { "UMU", 'U', ModItems.gun_uzi, 'M', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "BRM", "BGS", 'B', DESH.lightBarrel(), 'R', DESH.lightReceiver(), 'M', GUNMETAL.mechanism(), 'G', ANY_PLASTIC.grip(), 'S', DESH.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "BBB", "PGM", 'B', DESH.heavyBarrel(), 'P', STEEL.plateCast(), 'G', DESH.grip(), 'M', GUNMETAL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_star_f, 1), new Object[] { "BRM", " G", 'B', WEAPONSTEEL.lightBarrel(), 'R', WEAPONSTEEL.lightReceiver(), 'M', WEAPONSTEEL.mechanism(), 'G', ANY_PLASTIC.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_star_f_akimbo, 1), new Object[] { "UMU", 'U', ModItems.gun_star_f, 'M', BIGMT.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_g3, 1), new Object[] { "BRM", "WGS", 'B', WEAPONSTEEL.lightBarrel(), 'R', WEAPONSTEEL.lightReceiver(), 'M', WEAPONSTEEL.mechanism(), 'W', WOOD.grip(), 'G', RUBBER.grip(), 'S', WOOD.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_g3_zebra, 1), new Object[] { " M ", "MPM", " M ", 'M', BIGMT.mechanism(), 'P', ModItems.gun_g3 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "BBB", "PGM", 'B', WEAPONSTEEL.heavyBarrel(), 'P', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'G', WEAPONSTEEL.grip(), 'M', WEAPONSTEEL.mechanism() });
|
||||
@ -101,6 +103,9 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_charge_thrower, 1), new Object[] { "MMM", "BBL", "GG ", 'M', GUNMETAL.mechanism(), 'B', STEEL.heavyBarrel(), 'G', STEEL.grip(), 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_drill, 1), new Object[] { " GL", "IBP", " GL", 'G', GUNMETAL.ingot(), 'L', ANY_RUBBER.ingot(), 'I', TI.ingot(), 'B', STEEL.block(), 'P', ModItems.piston_selenium });
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_pa_melee, 1), new Object[] { " C ", "MWM", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'M', ModItems.motor, 'W', GOLD.wireDense() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_pa_ranged, 1), new Object[] { "C", "W", "P", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'P', ANY_PLASTIC.ingot(), 'W', GOLD.wireDense() });
|
||||
|
||||
//SEDNA Ammo
|
||||
CraftingManager.addRecipeAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.STONE, 6), new Object[] { "C", "P", "G", 'C', KEY_COBBLESTONE, 'P', Items.paper, 'G', Items.gunpowder });
|
||||
CraftingManager.addRecipeAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.STONE_AP, 6), new Object[] { "C", "P", "G", 'C', Items.flint, 'P', Items.paper, 'G', Items.gunpowder });
|
||||
@ -190,7 +195,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_kerosene_metal, 1), new Object[] { "ICI", "CTC", "ICI", 'C', STEEL.plate(), 'I', IRON.plate(), 'T', ModItems.mp_fuselage_15_kerosene });
|
||||
|
||||
//Missile warheads
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_warhead_15_boxcar, 1), new Object[] { "SNS", "CBC", "SFS", 'S', STAR.ingot(), 'N', ModBlocks.det_nuke, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'B', ModBlocks.boxcar, 'F', ModItems.tritium_deuterium_cake });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_warhead_15_boxcar, 1), new Object[] { "SNS", "CBC", "SFS", 'S', STAR.ingot(), 'N', ModBlocks.det_nuke, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'B', ModBlocks.boxcar, 'F', Fluids.TRITIUM.getDict(16_000) });
|
||||
|
||||
//Missile chips
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_1, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'S', ModBlocks.steel_scaffold });
|
||||
|
||||
@ -16,9 +16,8 @@ public class TemplateTab extends CreativeTabs {
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
|
||||
if(ModItems.assembly_template != null)
|
||||
{
|
||||
return ModItems.assembly_template;
|
||||
if(ModItems.crucible_template != null) {
|
||||
return ModItems.crucible_template;
|
||||
}
|
||||
|
||||
return Items.iron_pickaxe;
|
||||
|
||||
@ -150,10 +150,13 @@ public class EntityFBI extends EntityMob implements IRangedAttackMob {
|
||||
canDestroy.add(Blocks.trapdoor);
|
||||
canDestroy.add(ModBlocks.machine_press);
|
||||
canDestroy.add(ModBlocks.machine_epress);
|
||||
canDestroy.add(ModBlocks.machine_chemplant);
|
||||
canDestroy.add(ModBlocks.machine_chemical_plant);
|
||||
canDestroy.add(ModBlocks.machine_chemical_factory);
|
||||
canDestroy.add(ModBlocks.machine_crystallizer);
|
||||
canDestroy.add(ModBlocks.machine_turbine);
|
||||
canDestroy.add(ModBlocks.machine_large_turbine);
|
||||
canDestroy.add(ModBlocks.machine_industrial_turbine);
|
||||
canDestroy.add(ModBlocks.machine_chungus);
|
||||
canDestroy.add(ModBlocks.machine_purex);
|
||||
canDestroy.add(ModBlocks.crate_iron);
|
||||
canDestroy.add(ModBlocks.crate_steel);
|
||||
canDestroy.add(ModBlocks.machine_diesel);
|
||||
|
||||
@ -66,17 +66,13 @@ public class EntityMaskMan extends EntityMob implements IBossDisplayData, IRadia
|
||||
return true;
|
||||
}
|
||||
|
||||
if(source.isFireDamage())
|
||||
amount = 0;
|
||||
if(source.isMagicDamage())
|
||||
amount = 0;
|
||||
if(source.isProjectile())
|
||||
amount *= 0.25F;
|
||||
if(source.isExplosion())
|
||||
amount *= 0.5F;
|
||||
if(source.isFireDamage()) amount = 0;
|
||||
if(source.isMagicDamage()) amount = 0;
|
||||
if(source.isProjectile()) amount *= 0.5F;
|
||||
if(source.isExplosion()) amount *= 0.5F;
|
||||
|
||||
if(amount > 50) {
|
||||
amount = 50 + (amount - 50) * 0.25F;
|
||||
amount = 50 + (amount - 50) * 0.5F;
|
||||
}
|
||||
|
||||
return super.attackEntityFrom(source, amount);
|
||||
|
||||
@ -12,6 +12,7 @@ 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;
|
||||
@ -97,21 +98,22 @@ public class EntityArtilleryRocket extends EntityThrowableInterp implements IChu
|
||||
super.onUpdate();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
//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) {
|
||||
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()) {
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@ -454,21 +454,24 @@ public class EntityChemical extends EntityThrowableNT {
|
||||
}
|
||||
}
|
||||
|
||||
Block block = worldObj.getBlock(x, y, z);
|
||||
if(type == Fluids.SEEDSLURRY) {
|
||||
if(block == Blocks.dirt || block == ModBlocks.waste_earth || block == ModBlocks.dirt_dead || block == ModBlocks.dirt_oily) {
|
||||
|
||||
if(worldObj.getBlockLightValue(x, y + 1, z) >= 9 && worldObj.getBlockLightOpacity(x, y + 1, z) <= 2) {
|
||||
worldObj.setBlock(x, y, z, Blocks.grass);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
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();
|
||||
|
||||
@ -108,25 +108,23 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModItems.euphemium_kit, 1), Requirement.HIDDEN, 64));
|
||||
|
||||
special.add(new Offer(ItemKitCustom.create("Fusion Man", "For the nuclear physicist on the go", 0xff00ff, 0x800080,
|
||||
new ItemStack(ModBlocks.iter),
|
||||
new ItemStack(ModBlocks.plasma_heater),
|
||||
new ItemStack(ModItems.fusion_shield_vaporwave),
|
||||
new ItemStack(ModBlocks.fusion_klystron),
|
||||
new ItemStack(ModBlocks.fusion_torus),
|
||||
new ItemStack(ModBlocks.fusion_mhdt),
|
||||
new ItemStack(ModBlocks.machine_intake, 3),
|
||||
ItemBattery.getFullBattery(ModItems.battery_spark),
|
||||
new ItemStack(ModBlocks.machine_chemplant, 10),
|
||||
new ItemStack(ModBlocks.machine_chemical_factory, 4),
|
||||
new ItemStack(ModBlocks.machine_fluidtank, 8),
|
||||
new ItemStack(ModBlocks.red_wire_coated, 64),
|
||||
new ItemStack(ModBlocks.red_cable, 64),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.DEUTERIUM.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.TRITIUM.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.XENON.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.MERCURY.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.PERFLUOROMETHYL.getID()),
|
||||
new ItemStack(ModBlocks.red_pylon_large, 8),
|
||||
new ItemStack(ModBlocks.substation, 4),
|
||||
new ItemStack(ModBlocks.red_pylon, 16),
|
||||
new ItemStack(ModBlocks.red_connector, 64),
|
||||
new ItemStack(ModItems.wiring_red_copper, 1),
|
||||
new ItemStack(ModBlocks.machine_chungus, 1),
|
||||
new ItemStack(ModBlocks.machine_large_turbine, 3),
|
||||
new ItemStack(ModBlocks.machine_chungus, 3),
|
||||
new ItemStack(ModItems.template_folder, 1),
|
||||
new ItemStack(Items.paper, 64),
|
||||
new ItemStack(Items.dye, 64)
|
||||
|
||||
@ -4,7 +4,9 @@ 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;
|
||||
@ -18,6 +20,7 @@ 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;
|
||||
@ -26,16 +29,22 @@ 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%
|
||||
@ -50,15 +59,6 @@ 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,66 +85,6 @@ 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);
|
||||
|
||||
@ -355,6 +355,8 @@ 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;
|
||||
|
||||
|
||||
@ -89,6 +89,7 @@ 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;
|
||||
@ -288,6 +289,7 @@ 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));
|
||||
@ -367,6 +369,7 @@ 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);
|
||||
@ -400,6 +403,7 @@ 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);
|
||||
|
||||
10
src/main/java/com/hbm/interfaces/HalfLifeType.java
Normal file
10
src/main/java/com/hbm/interfaces/HalfLifeType.java
Normal file
@ -0,0 +1,10 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public enum HalfLifeType {
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
@ -1,429 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
/**
|
||||
* Interface for customizable warheads or other explosive devices
|
||||
* @author UFFR
|
||||
*
|
||||
*/
|
||||
@Beta
|
||||
@Spaghetti("AAAAAAAA")
|
||||
public interface ICustomWarhead
|
||||
{
|
||||
public static enum EnumCustomWarhead
|
||||
{
|
||||
AMAT,
|
||||
BF,
|
||||
BIO,
|
||||
CHEM,
|
||||
FUSION,
|
||||
GRAV,
|
||||
HE,
|
||||
NUCLEAR,
|
||||
TX,
|
||||
SCHRAB,
|
||||
ZPE;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.".concat(toString()));
|
||||
}
|
||||
|
||||
public enum EnumChemicalType
|
||||
{
|
||||
ACID,
|
||||
CHLORINE,
|
||||
NERVE,
|
||||
TOX;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.CHEM.".concat(toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public enum EnumBioType
|
||||
{
|
||||
ANTHRAX,
|
||||
MKU;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.BIO.".concat(toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
public static enum EnumCustomWarheadTrait
|
||||
{
|
||||
CLEAN,
|
||||
CLEANISH,
|
||||
DIRTY,
|
||||
RAD,
|
||||
SALT;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadTrait.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public static enum EnumWeaponType
|
||||
{
|
||||
DENIAL,
|
||||
STRATEGIC,
|
||||
TACTICAL,
|
||||
WMD;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadType.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public static final String KEY_ANTHRAX = "warheadFuel.ANTHRAX";
|
||||
public static final String KEY_MKU = "warheadFuel.MKU";
|
||||
public static final String KEY_CAUSTIC = "warheadFuel.ACID";
|
||||
public static final String KEY_NERVE = "warheadFuel.NERVE";
|
||||
public static final String KEY_TOX = "warheadFuel.TOX";
|
||||
|
||||
public static final String NBT_GROUP = "NTM_NUKE_INFO";
|
||||
public static final String NBT_YIELD = "YIELD";
|
||||
public static final String NBT_ALTITUDE = "ALTITUDE";
|
||||
public static final String NBT_MASS = "MASS";
|
||||
public static final String NBT_SPECIAL = "SPECIAL_FIELD";
|
||||
public static final String NBT_WARHEAD = "WARHEAD";
|
||||
public static final String NBT_TYPE = "WARHEAD_TYPE";
|
||||
public static final String NBT_TRAIT = "WARHEAD_TRAIT";
|
||||
public static final DecimalFormat df = new DecimalFormat("#.00");
|
||||
|
||||
public static EnumChatFormatting getColorFromWarhead(EnumCustomWarhead warhead)
|
||||
{
|
||||
switch (warhead)
|
||||
{
|
||||
case AMAT:
|
||||
return EnumChatFormatting.DARK_RED;
|
||||
case BF:
|
||||
return EnumChatFormatting.GREEN;
|
||||
case BIO:
|
||||
return EnumChatFormatting.GOLD;
|
||||
case CHEM:
|
||||
return EnumChatFormatting.YELLOW;
|
||||
case FUSION:
|
||||
return EnumChatFormatting.BLUE;
|
||||
case GRAV:
|
||||
return EnumChatFormatting.DARK_GRAY;
|
||||
case HE:
|
||||
return EnumChatFormatting.RED;
|
||||
case NUCLEAR:
|
||||
return EnumChatFormatting.DARK_GREEN;
|
||||
case SCHRAB:
|
||||
return EnumChatFormatting.AQUA;
|
||||
case TX:
|
||||
return EnumChatFormatting.DARK_PURPLE;
|
||||
case ZPE:
|
||||
return (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.DARK_AQUA : EnumChatFormatting.LIGHT_PURPLE);
|
||||
default:
|
||||
return EnumChatFormatting.WHITE;
|
||||
}
|
||||
}
|
||||
|
||||
public default float getYield()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
public default EnumCustomWarhead getWarheadType(NBTTagCompound data)
|
||||
{
|
||||
return EnumCustomWarhead.valueOf(data.getString(NBT_WARHEAD));
|
||||
}
|
||||
public default EnumWeaponType getWeaponType(NBTTagCompound data)
|
||||
{
|
||||
return EnumWeaponType.valueOf(data.getString(NBT_TYPE));
|
||||
}
|
||||
public default EnumCustomWarheadTrait getWeaponTrait(NBTTagCompound data)
|
||||
{
|
||||
return EnumCustomWarheadTrait.valueOf(data.getString(NBT_TRAIT));
|
||||
}
|
||||
public ItemStack constructNew();
|
||||
public ICustomWarhead getInstance();
|
||||
|
||||
public default Item getItem()
|
||||
{
|
||||
return (Item) this;
|
||||
}
|
||||
|
||||
public static ItemStack addData(NBTTagCompound data, Item item)
|
||||
{
|
||||
ItemStack stackOut = new ItemStack(item);
|
||||
|
||||
stackOut.stackTagCompound = new NBTTagCompound();
|
||||
stackOut.stackTagCompound.setTag(NBT_GROUP, data);
|
||||
|
||||
return stackOut.copy();
|
||||
}
|
||||
|
||||
public default NBTTagCompound getWarheadData(ItemStack stack)
|
||||
{
|
||||
return stack.getTagCompound().getCompoundTag(NBT_GROUP);
|
||||
}
|
||||
|
||||
public default ItemStack addFuel(ItemStack stack, Enum<?> fuel, float amount)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
{
|
||||
NBTTagCompound data = getWarheadData(stack);
|
||||
data.setFloat(fuel.toString(), amount);
|
||||
data.setFloat(NBT_MASS, data.getFloat(NBT_MASS) + amount);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public default ItemStack addData(ItemStack stack, String key, String value)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
getWarheadData(stack).setString(key, value);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public default void addCompositionalInfo(NBTTagCompound data, List<String> tooltip, List<Enum<?>> combinedFuels)
|
||||
{
|
||||
for (Enum<?> f : combinedFuels)
|
||||
if (data.getFloat(f.toString()) > 0)
|
||||
tooltip.add(String.format(Locale.US, "%s: %skg (%s)", I18nUtil.resolveKey("warheadFuel.".concat(f.toString())), df.format(data.getFloat(f.toString())), BobMathUtil.toPercentage(data.getFloat(f.toString()), data.getFloat(NBT_MASS))));
|
||||
}
|
||||
|
||||
public default void addTooltip(ItemStack stack, List<String> tooltip)
|
||||
{
|
||||
// tooltip.clear();
|
||||
try {
|
||||
NBTTagCompound data = getWarheadData(stack);
|
||||
|
||||
final ArrayList<Enum<?>> combinedFuels = new ArrayList<>();
|
||||
combinedFuels.addAll(Arrays.asList(FissileFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(FusionFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(SaltedFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(EnumCustomWarhead.values()));
|
||||
switch (getWarheadType(data))
|
||||
{
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
case HE:
|
||||
tooltip.add("Composition:");
|
||||
addCompositionalInfo(data, tooltip, combinedFuels);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
final EnumCustomWarhead warhead = getWarheadType(data);
|
||||
tooltip.add(data.getFloat(NBT_MASS) + "kg total");
|
||||
tooltip.add("");
|
||||
switch (warhead)
|
||||
{
|
||||
case CHEM:
|
||||
case BIO:
|
||||
tooltip.add("Type: " + getColorFromWarhead(warhead) + I18nUtil.resolveKey("warhead.".concat(warhead.toString()), I18nUtil.resolveKey(data.getString(NBT_SPECIAL))));
|
||||
break;
|
||||
default:
|
||||
tooltip.add("Type: " + getColorFromWarhead(warhead) + warhead.getLoc());
|
||||
break;
|
||||
}
|
||||
tooltip.add("Function: " + getWeaponType(data).getLoc());
|
||||
switch (warhead)
|
||||
{
|
||||
case AMAT:
|
||||
case BF:
|
||||
case FUSION:
|
||||
case GRAV:
|
||||
case HE:
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
tooltip.add("Yield: " + BobMathUtil.getShortNumber(data.getInteger(NBT_YIELD)) + "T");
|
||||
break;
|
||||
case BIO:
|
||||
case CHEM:
|
||||
case SCHRAB:
|
||||
tooltip.add("Radius: " + BobMathUtil.getShortNumber(data.getInteger(NBT_YIELD)) + "M");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tooltip.add("Trait: " + getWeaponTrait(data).getLoc());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainRegistry.logger.catching(Level.ERROR, e);
|
||||
}
|
||||
}
|
||||
|
||||
public enum FissileFuel
|
||||
{
|
||||
U233(15F, 197.5F, HazardRegistry.u233, 19.05F),
|
||||
U235(52F, 202.5F, HazardRegistry.u235, 19.05F),
|
||||
Np237(60F, 202.5F, HazardRegistry.np237, 20.45F),
|
||||
Pu239(10F, 207.1F, HazardRegistry.pu239, 19.86F),
|
||||
Pu241(12, 210F, HazardRegistry.pu241, 19.86F),
|
||||
Am241(66, 210F, HazardRegistry.am241, 13.67F),
|
||||
Am242m(11F, 212F, HazardRegistry.am242, 13.67F),
|
||||
Sa326(1F, 250F, HazardRegistry.sa326, 39.7F);
|
||||
public final float criticalMass;
|
||||
public final float energyReleased;
|
||||
public final float radioactivity;
|
||||
private final float mass;
|
||||
private FissileFuel(float criticalMass, float energyReleased, float radioactivity, float mass)
|
||||
{
|
||||
this.criticalMass = criticalMass;
|
||||
this.energyReleased = energyReleased;
|
||||
this.radioactivity = radioactivity;
|
||||
this.mass = mass;
|
||||
}
|
||||
public float getBlockMass()
|
||||
{
|
||||
return mass * 100;
|
||||
}
|
||||
public float getIngotMass()
|
||||
{
|
||||
return getBlockMass() / 9;
|
||||
}
|
||||
public float getNuggetMass()
|
||||
{
|
||||
return getIngotMass() / 9;
|
||||
}
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadFuel.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public enum FusionFuel
|
||||
{
|
||||
DEUT,
|
||||
TRIT,
|
||||
Li,
|
||||
LiDEUT;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadFuel".concat(toString()));
|
||||
}
|
||||
}
|
||||
public enum SaltedFuel
|
||||
{
|
||||
Co59(1.4902F * 0.75F, 5, HalfLifeType.MEDIUM, 8.86F),
|
||||
Co60(1.4902F, 5, HalfLifeType.MEDIUM, 8.86F),
|
||||
Sr90(0.546F, 28, HalfLifeType.MEDIUM, 2.64F),
|
||||
Cs137(1.1737F, 30, HalfLifeType.MEDIUM, 1.93F),
|
||||
Ta181(0.52F * 0.75F, 114, HalfLifeType.SHORT, 16.65F),
|
||||
Ta182(0.52F, 114, HalfLifeType.SHORT, 16.654F),
|
||||
Au197(1.3735F * 0.75F, 2, HalfLifeType.SHORT, 19.32F),
|
||||
Au198(1.3735F, 2, HalfLifeType.SHORT, 19.32F),
|
||||
Pu240(5.25575F, 65, HalfLifeType.LONG, 19.86F),
|
||||
Sa327(0.5F, 100, HalfLifeType.LONG, 39.7F);
|
||||
public final float decayEnergy;
|
||||
public final int halfLife;
|
||||
public final HalfLifeType type;
|
||||
private final float mass;
|
||||
SaltedFuel(float decayEnergy, int halfLife, HalfLifeType type, float mass)
|
||||
{
|
||||
this.decayEnergy = decayEnergy;
|
||||
this.halfLife = halfLife;
|
||||
this.type = type;
|
||||
this.mass = mass;
|
||||
}
|
||||
public enum HalfLifeType
|
||||
{
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
public float getBlockMass()
|
||||
{
|
||||
return mass * 100;
|
||||
}
|
||||
public float getIngotMass()
|
||||
{
|
||||
return getBlockMass() / 9;
|
||||
}
|
||||
public float getNuggetMass()
|
||||
{
|
||||
return getIngotMass() / 9;
|
||||
}
|
||||
}
|
||||
|
||||
/*public static class CustomWarheadWrapper
|
||||
{
|
||||
public static final ICustomWarhead cWarhead = (ICustomWarhead) ModItems.custom_warhead;
|
||||
public static final ICustomWarhead cCore = (ICustomWarhead) ModItems.custom_core;
|
||||
public static final CustomWarheadWrapper gravimetricBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumCustomWarhead.GRAV, 1000.0F).addData(NBT_TYPE, EnumWeaponType.TACTICAL).addData(NBT_WARHEAD, EnumCustomWarhead.GRAV).addData(NBT_TRAIT, EnumCustomWarheadTrait.CLEAN);
|
||||
public static final CustomWarheadWrapper pureFusionBase = new CustomWarheadWrapper(cWarhead).addFuel(FusionFuel.LiDEUT, 500).addData(NBT_TYPE, EnumWeaponType.TACTICAL).addData(NBT_WARHEAD, EnumCustomWarhead.FUSION).addData(NBT_TRAIT, EnumCustomWarheadTrait.CLEANISH).setStackData(8, 1);
|
||||
public static final CustomWarheadWrapper chemicalBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumChemicalType.NERVE, 15).addData(NBT_TYPE, EnumWeaponType.WMD).addData(NBT_WARHEAD, EnumCustomWarhead.CHEM).addData(NBT_TRAIT, EnumCustomWarheadTrait.DIRTY).addData(NBT_SPECIAL, KEY_NERVE).setStackData(1, 2);
|
||||
public static final CustomWarheadWrapper biologicalBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumBioType.ANTHRAX, 15).addData(NBT_TYPE, EnumWeaponType.WMD).addData(NBT_WARHEAD, EnumCustomWarhead.BIO).addData(NBT_TRAIT, EnumCustomWarheadTrait.DIRTY).addData(NBT_SPECIAL, KEY_ANTHRAX).setStackData(1, 3);
|
||||
public static final CustomWarheadWrapper saltedBase = new CustomWarheadWrapper(cWarhead).addFuel(FissileFuel.U235, 20).addFuel(FissileFuel.Pu239, 5).addFuel(FusionFuel.LiDEUT, 20).addFuel(SaltedFuel.Co59, 10).addData(NBT_TYPE, EnumWeaponType.DENIAL).addData(NBT_WARHEAD, EnumCustomWarhead.TX).addData(NBT_TRAIT, EnumCustomWarheadTrait.SALT).setStackData(1, 4);
|
||||
private ItemStack stack;
|
||||
private ICustomWarhead warhead;
|
||||
public CustomWarheadWrapper(ItemStack stack)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
{
|
||||
this.stack = ((ICustomWarhead) stack.getItem()).constructNew();
|
||||
warhead = (ICustomWarhead) stack.getItem();
|
||||
}
|
||||
else
|
||||
throw new IllegalArgumentException("Input stack item is not instance of " + ICustomWarhead.class.toString());
|
||||
}
|
||||
public CustomWarheadWrapper(ICustomWarhead warhead)
|
||||
{
|
||||
stack = warhead.constructNew();
|
||||
this.warhead = warhead;
|
||||
}
|
||||
public CustomWarheadWrapper(Item item)
|
||||
{
|
||||
if (!(item instanceof ICustomWarhead))
|
||||
throw new IllegalArgumentException("Input stack item is not instance of [ICustomWarhead]");
|
||||
stack = ((ICustomWarhead) item).constructNew();
|
||||
warhead = (ICustomWarhead) item;
|
||||
}
|
||||
public CustomWarheadWrapper addFuel(Enum<?> fuel, float amount)
|
||||
{
|
||||
warhead.addFuel(stack, fuel, amount);
|
||||
return this;
|
||||
}
|
||||
public CustomWarheadWrapper addData(String key, String value)
|
||||
{
|
||||
warhead.addData(stack, key, value);
|
||||
return this;
|
||||
}
|
||||
public CustomWarheadWrapper addData(String key, Enum<?> value)
|
||||
{
|
||||
return addData(key, value.toString());
|
||||
}
|
||||
public CustomWarheadWrapper setStackData(int stackSize, int meta)
|
||||
{
|
||||
stack.stackSize = stackSize <= 1 ? 1 : stackSize;
|
||||
stack.setItemDamage(meta <= 0 ? 0 : meta);
|
||||
return this;
|
||||
}
|
||||
public NBTTagCompound regurgitateData()
|
||||
{
|
||||
return (NBTTagCompound) warhead.getWarheadData(getStack()).copy();
|
||||
}
|
||||
public ICustomWarhead getInterface()
|
||||
{
|
||||
return warhead;
|
||||
}
|
||||
public ItemStack getStack()
|
||||
{
|
||||
return stack.copy();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@ -271,6 +271,11 @@ 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 {
|
||||
@ -374,6 +379,11 @@ 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 {
|
||||
@ -490,6 +500,11 @@ public class RecipesCommon {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.stacksize + "x" + this.name;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MetaBlock {
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class ContainerAssemfac extends Container {
|
||||
|
||||
private TileEntityMachineAssemfac assemfac;
|
||||
|
||||
public ContainerAssemfac(InventoryPlayer playerInv, TileEntityMachineAssemfac tile) {
|
||||
assemfac = tile;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tile, 0, 234, 218));
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
this.addSlotToContainer(new SlotUpgrade(tile, 1 + i, 5, 172 + i * 18));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
int offX = 7 + j * 118;
|
||||
int offY = 14 + i * 38;
|
||||
int startIndex = 5 + (i * 2 + j) * 14;
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 6; l++) {
|
||||
this.addSlotToContainer(new Slot(tile, startIndex + k * 6 + l, offX + l * 16, offY + k * 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
this.addSlotToContainer(new Slot(tile, 17 + i * 14, 106, 13 + i * 19 - (i % 2 == 1 ? 1 : 0)));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(playerInv.player, tile, 18 + i * 14, 234, 13 + i * 16));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 34 + j * 18, 174 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 34 + i * 18, 232));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return assemfac.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class ContainerChemfac extends Container {
|
||||
|
||||
private TileEntityMachineChemfac chemfac;
|
||||
|
||||
public ContainerChemfac(InventoryPlayer playerInv, TileEntityMachineChemfac tile) {
|
||||
chemfac = tile;
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 0, 234, 79));
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
this.addSlotToContainer(new SlotUpgrade(tile, 1 + i * 2 + j, 217 + j * 18, 172 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 2; l++) {
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 7 + j * 110 + l * 16, 14 + i * 38 + k * 16));
|
||||
}
|
||||
}
|
||||
|
||||
for(int k = 0; k < 2; k++) {
|
||||
for(int l = 0; l < 2; l++) {
|
||||
this.addSlotToContainer(new SlotCraftingOutput(playerInv.player, tile, this.inventorySlots.size(), 69 + j * 110 + l * 16, 14 + i * 38 + k * 16));
|
||||
}
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, this.inventorySlots.size(), 51 + j * 110, 30 + i * 38));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 34 + j * 18, 174 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 34 + i * 18, 232));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return chemfac.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,86 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerHadron extends Container {
|
||||
|
||||
private TileEntityHadron hadron;
|
||||
|
||||
public ContainerHadron(InventoryPlayer invPlayer, TileEntityHadron tedf) {
|
||||
|
||||
hadron = tedf;
|
||||
|
||||
//Inputs
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 17, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 35, 36));
|
||||
//Outputs
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 2, 125, 36));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 3, 143, 36));
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 44, 108));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + (18 * 3) + 2));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + (18 * 3) + 2));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 4) {
|
||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else if (!this.mergeItemStack(var5, 0, 2, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return hadron.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -1,109 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class ContainerMachineAssembler extends Container {
|
||||
|
||||
private TileEntityMachineAssembler assembler;
|
||||
|
||||
public ContainerMachineAssembler(InventoryPlayer invPlayer, TileEntityMachineAssembler te) {
|
||||
assembler = te;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(te, 0, 80, 18));
|
||||
//Upgrades
|
||||
this.addSlotToContainer(new Slot(te, 1, 152, 18));
|
||||
this.addSlotToContainer(new Slot(te, 2, 152, 36));
|
||||
this.addSlotToContainer(new Slot(te, 3, 152, 54));
|
||||
//Schematic
|
||||
this.addSlotToContainer(new Slot(te, 4, 80, 54));
|
||||
//Output
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, te, 5, 134, 90));
|
||||
//Input
|
||||
this.addSlotToContainer(new Slot(te, 6, 8, 18));
|
||||
this.addSlotToContainer(new Slot(te, 7, 26, 18));
|
||||
this.addSlotToContainer(new Slot(te, 8, 8, 36));
|
||||
this.addSlotToContainer(new Slot(te, 9, 26, 36));
|
||||
this.addSlotToContainer(new Slot(te, 10, 8, 54));
|
||||
this.addSlotToContainer(new Slot(te, 11, 26, 54));
|
||||
this.addSlotToContainer(new Slot(te, 12, 8, 72));
|
||||
this.addSlotToContainer(new Slot(te, 13, 26, 72));
|
||||
this.addSlotToContainer(new Slot(te, 14, 8, 90));
|
||||
this.addSlotToContainer(new Slot(te, 15, 26, 90));
|
||||
this.addSlotToContainer(new Slot(te, 16, 8, 108));
|
||||
this.addSlotToContainer(new Slot(te, 17, 26, 108));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if (slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
SlotCraftingOutput.checkAchievements(player, stack);
|
||||
|
||||
if (index <= 17) {
|
||||
if (!this.mergeItemStack(stack, 18, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemMachineUpgrade) {
|
||||
if(!this.mergeItemStack(stack, 1, 4, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemAssemblyTemplate) {
|
||||
if(!this.mergeItemStack(stack, 4, 5, false)) return null;
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 6, 18, false)) return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(stack.stackSize == rStack.stackSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(player, rStack);
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return assembler.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -1,112 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotTakeOnly;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
@NotableComments
|
||||
public class ContainerMachineChemplant extends Container {
|
||||
|
||||
private TileEntityMachineChemplant nukeBoy; // still uses ancient copy pasted field names - lmfao
|
||||
|
||||
public ContainerMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
nukeBoy = tedf;
|
||||
|
||||
// Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 80, 18));
|
||||
// Upgrades
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 116, 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 116, 54));
|
||||
// Schematic
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 80, 54));
|
||||
// Outputs
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 5, 134, 90));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 6, 152, 90));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 7, 134, 108));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 8, 152, 108));
|
||||
// Fluid Output In
|
||||
this.addSlotToContainer(new Slot(tedf, 9, 134, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 10, 152, 54));
|
||||
// Fluid Outputs Out
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 11, 134, 72));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 12, 152, 72));
|
||||
// Input
|
||||
this.addSlotToContainer(new Slot(tedf, 13, 8, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 14, 26, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 15, 8, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 16, 26, 108));
|
||||
// Fluid Input In
|
||||
this.addSlotToContainer(new Slot(tedf, 17, 8, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 18, 26, 54));
|
||||
// Fluid Input Out
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 19, 8, 72));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 20, 26, 72));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
SlotCraftingOutput.checkAchievements(player, stack);
|
||||
|
||||
if(index <= 20) {
|
||||
if(!this.mergeItemStack(stack, 21, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemMachineUpgrade ) {
|
||||
if(!this.mergeItemStack(stack, 1, 4, false)) return null;
|
||||
} else if(rStack.getItem() instanceof ItemChemistryTemplate) {
|
||||
if(!this.mergeItemStack(stack, 4, 5, false)) return null;
|
||||
} else { //proper shift-clicking filled/empty fluid tanks is an exercise in futility
|
||||
if(!this.mergeItemStack(stack, 13, 19, false))
|
||||
if(!this.mergeItemStack(stack, 9, 11, false))
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return nukeBoy.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -29,7 +29,27 @@ public class ContainerRBMKRod extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
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) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
@ -38,6 +58,7 @@ 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;
|
||||
}
|
||||
|
||||
@ -1,66 +1,21 @@
|
||||
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)
|
||||
public class ContainerSafe extends Container {
|
||||
@invtweaks.api.container.ChestContainer(rowSize = 5, isLargeChest = false)
|
||||
public class ContainerSafe extends ContainerCrateBase {
|
||||
|
||||
private IInventory diFurnace;
|
||||
|
||||
public ContainerSafe(InventoryPlayer invPlayer, IInventory tedf) {
|
||||
diFurnace = tedf;
|
||||
public ContainerSafe(InventoryPlayer invPlayer, IInventory te) {
|
||||
super(invPlayer,te);
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 5; j++) {
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 5, 8 + j * 18 + 18 * 2, 18 + i * 18));
|
||||
this.addSlotToContainer(new Slot(te, j + i * 5, 8 + j * 18 + 18 * 2, 18 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
this.playerInv(invPlayer, 8, 32 + 18 * 3, 90 + (18 * 3));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerAssemfac;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIAssemfac extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_assemfac.png");
|
||||
private static ResourceLocation chemfac = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_chemfac.png");
|
||||
private TileEntityMachineAssemfac assemfac;
|
||||
|
||||
public GUIAssemfac(InventoryPlayer invPlayer, TileEntityMachineAssemfac tedf) {
|
||||
super(new ContainerAssemfac(invPlayer, tedf));
|
||||
assemfac = tedf;
|
||||
|
||||
this.xSize = 256;
|
||||
this.ySize = 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 234, guiTop + 164, 16, 52, assemfac.power, assemfac.getMaxPower());
|
||||
|
||||
assemfac.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 209, guiTop + 181, 9, 54);
|
||||
assemfac.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 218, guiTop + 181, 9, 54);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
|
||||
if(assemfac.maxProgress[i] > 0) {
|
||||
int progress = assemfac.progress[i] * 16 / assemfac.maxProgress[i];
|
||||
|
||||
if(progress > 0) {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
int x = guiLeft + 234;
|
||||
int y = guiTop + 13 + 16 * i;
|
||||
GL11.glColorMask(true, true, true, false);
|
||||
this.drawGradientRect(x, y, x + progress + 1, y + 16, -2130706433, -2130706433);
|
||||
GL11.glColorMask(true, true, true, true);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) { }
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int mX, int mY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(chemfac);
|
||||
|
||||
int p = (int) (assemfac.power * 52 / assemfac.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 234, guiTop + 216 - p, 0, 219 - p, 16, p);
|
||||
|
||||
if(assemfac.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 238, guiTop + 150, 0, 219, 9, 12);
|
||||
|
||||
assemfac.water.renderTank(guiLeft + 210, guiTop + 234, this.zLevel, 7, 52);
|
||||
assemfac.steam.renderTank(guiLeft + 219, guiTop + 234, this.zLevel, 7, 52);
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LMENU))
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
Slot s = this.inventorySlots.getSlot(i);
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow(i + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition, 0xffffff);
|
||||
this.fontRendererObj.drawStringWithShadow(s.getSlotIndex() + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition + 8, 0xff8080);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerChemfac;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIChemfac extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_chemfac.png");
|
||||
private TileEntityMachineChemfac chemfac;
|
||||
|
||||
public GUIChemfac(InventoryPlayer invPlayer, TileEntityMachineChemfac tedf) {
|
||||
super(new ContainerChemfac(invPlayer, tedf));
|
||||
chemfac = tedf;
|
||||
|
||||
this.xSize = 256;
|
||||
this.ySize = 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 234, guiTop + 25, 16, 52, chemfac.power, chemfac.getMaxPower());
|
||||
|
||||
for(int i = 0; i < 8; i ++) {
|
||||
|
||||
int offX = guiLeft + 110 * (i % 2);
|
||||
int offY = guiTop + 38 * (i / 2);
|
||||
chemfac.tanks[i * 4 + 0].renderTankInfo(this, mouseX, mouseY, offX + 40, offY + 45 - 32, 5, 34);
|
||||
chemfac.tanks[i * 4 + 1].renderTankInfo(this, mouseX, mouseY, offX + 45, offY + 45 - 32, 5, 34);
|
||||
chemfac.tanks[i * 4 + 2].renderTankInfo(this, mouseX, mouseY, offX + 102, offY + 45 - 32, 5, 34);
|
||||
chemfac.tanks[i * 4 + 3].renderTankInfo(this, mouseX, mouseY, offX + 107, offY + 45 - 32, 5, 34);
|
||||
}
|
||||
|
||||
chemfac.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 233, guiTop + 108, 9, 54);
|
||||
chemfac.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 242, guiTop + 108, 9, 54);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) { }
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int mX, int mY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, 167);
|
||||
drawTexturedModalRect(guiLeft + 26, guiTop + 167, 26, 167, 230, 44);
|
||||
drawTexturedModalRect(guiLeft + 26, guiTop + 211, 26, 211, 176, 45);
|
||||
|
||||
int p = (int) (chemfac.power * 52 / chemfac.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 234, guiTop + 77 - p, 0, 219 - p, 16, p);
|
||||
|
||||
if(chemfac.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 238, guiTop + 11, 0, 219, 9, 12);
|
||||
|
||||
for(int i = 0; i < 8; i ++) {
|
||||
|
||||
int offX = guiLeft + 110 * (i % 2);
|
||||
int offY = guiTop + 38 * (i / 2);
|
||||
|
||||
int prog = chemfac.progress[i];
|
||||
int j = prog * 17 / Math.max(chemfac.maxProgress[i], 1);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(offX + 51, offY + 16, 202, 247, j, 11);
|
||||
|
||||
chemfac.tanks[i * 4 + 0].renderTank(offX + 41, offY + 46, this.zLevel, 3, 32);
|
||||
chemfac.tanks[i * 4 + 1].renderTank(offX + 46, offY + 46, this.zLevel, 3, 32);
|
||||
chemfac.tanks[i * 4 + 2].renderTank(offX + 103, offY + 46, this.zLevel, 3, 32);
|
||||
chemfac.tanks[i * 4 + 3].renderTank(offX + 108, offY + 46, this.zLevel, 3, 32);
|
||||
}
|
||||
|
||||
chemfac.water.renderTank(guiLeft + 234, guiTop + 161, this.zLevel, 7, 52);
|
||||
chemfac.steam.renderTank(guiLeft + 243, guiTop + 161, this.zLevel, 7, 52);
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LMENU))
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
Slot s = this.inventorySlots.getSlot(i);
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow(i + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition, 0xffffff);
|
||||
this.fontRendererObj.drawStringWithShadow(s.getSlotIndex() + "", guiLeft + s.xDisplayPosition + 2, guiTop + s.yDisplayPosition + 8, 0xff8080);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,138 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerHadron;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toserver.AuxButtonPacket;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron;
|
||||
import com.hbm.tileentity.machine.TileEntityHadron.EnumHadronState;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIHadron extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_hadron.png");
|
||||
private TileEntityHadron hadron;
|
||||
|
||||
public GUIHadron(InventoryPlayer invPlayer, TileEntityHadron laser) {
|
||||
super(new ContainerHadron(invPlayer, laser));
|
||||
this.hadron = laser;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 108, 70, 16, hadron.power, hadron.maxPower);
|
||||
|
||||
if(hadron.ioMode == 1)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 89, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.hopper1"));
|
||||
else if(hadron.ioMode == 2)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 89, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.hopper2"));
|
||||
else
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 89, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.hopper0"));
|
||||
|
||||
if(hadron.analysisOnly)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 107, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.modeLine"));
|
||||
else
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 142, guiTop + 107, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("hadron.modeCircular"));
|
||||
|
||||
List<String> stats = new ArrayList();
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hadron.stats"));
|
||||
stats.add((hadron.stat_success ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + I18n.format("hadron." + this.hadron.stat_state.name().toLowerCase(Locale.US)));
|
||||
if(this.hadron.state.showCoord) stats.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hadron.stats_coord", hadron.stat_x, hadron.stat_y, hadron.stat_z));
|
||||
stats.add(EnumChatFormatting.GRAY + I18nUtil.resolveKey("hadron.stats_momentum", String.format(Locale.US, "%,d", hadron.stat_charge)));
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 41, guiTop + 92, 25, 11, mouseX, mouseY, stats.toArray(new String[0]));
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 4, guiTop + 36, 16, 16, guiLeft + 4, guiTop + 36 + 16, new String[] {"Initial particle momentum: 750"});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
// Toggle hadron
|
||||
if(guiLeft + 19 <= x && guiLeft + 19 + 18 > x && guiTop + 89 < y && guiTop + 89 + 18 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(hadron.xCoord, hadron.yCoord, hadron.zCoord, 0, 0));
|
||||
}
|
||||
|
||||
// Toggle analysis chamber
|
||||
if(guiLeft + 142 <= x && guiLeft + 142 + 18 > x && guiTop + 107 < y && guiTop + 107 + 18 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(hadron.xCoord, hadron.yCoord, hadron.zCoord, 0, 1));
|
||||
}
|
||||
|
||||
// Toggle hopper mode
|
||||
if(guiLeft + 142 <= x && guiLeft + 142 + 18 > x && guiTop + 89 < y && guiTop + 89 + 18 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(hadron.xCoord, hadron.yCoord, hadron.zCoord, 0, 2));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.hadron.hasCustomInventoryName() ? this.hadron.getInventoryName() : I18n.format(this.hadron.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
String state = I18n.format("hadron." + this.hadron.state.name().toLowerCase(Locale.US));
|
||||
this.fontRendererObj.drawString(state, this.xSize / 2 - this.fontRendererObj.getStringWidth(state) / 2, 76, this.hadron.state.color);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
if(hadron.isOn)
|
||||
drawTexturedModalRect(guiLeft + 16, guiTop + 89, 206, 0, 18, 18);
|
||||
|
||||
if(hadron.analysisOnly)
|
||||
drawTexturedModalRect(guiLeft + 142, guiTop + 107, 206, 18, 18, 18);
|
||||
|
||||
if(hadron.ioMode == hadron.MODE_HOPPER) drawTexturedModalRect(guiLeft + 142, guiTop + 89, 206, 36, 18, 18);
|
||||
if(hadron.ioMode == hadron.MODE_SINGLE) drawTexturedModalRect(guiLeft + 142, guiTop + 89, 224, 36, 18, 18);
|
||||
|
||||
if(hadron.state == EnumHadronState.SUCCESS) {
|
||||
drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 0, 30, 30);
|
||||
}
|
||||
if(hadron.state == EnumHadronState.NORESULT) {
|
||||
drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 30, 30, 30);
|
||||
}
|
||||
if(hadron.state == EnumHadronState.ERROR_GENERIC) {
|
||||
drawTexturedModalRect(guiLeft + 73, guiTop + 29, 176, 106, 30, 30);
|
||||
}
|
||||
|
||||
int i = hadron.getPowerScaled(70);
|
||||
drawTexturedModalRect(guiLeft + 62, guiTop + 108, 176, 60, i, 16);
|
||||
|
||||
int color = hadron.state.color;
|
||||
float red = (color & 0xff0000) >> 16;
|
||||
float green = (color & 0x00ff00) >> 8;
|
||||
float blue = (color & 0x0000ff);
|
||||
|
||||
GL11.glColor4f(red, green, blue, 1.0F);
|
||||
drawTexturedModalRect(guiLeft + 45, guiTop + 73, 0, 222, 86, 14);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 4, guiTop + 36, 16, 16, 2);
|
||||
}
|
||||
}
|
||||
@ -1,77 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineAssembler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIMachineAssembler extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_assembler.png");
|
||||
private TileEntityMachineAssembler assembler;
|
||||
|
||||
public GUIMachineAssembler(InventoryPlayer invPlayer, TileEntityMachineAssembler tedf) {
|
||||
super(new ContainerMachineAssembler(invPlayer, tedf));
|
||||
assembler = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 70 - 52, 16, 52, assembler.power, assembler.getMaxPower());
|
||||
|
||||
if(assembler.getStackInSlot(4) == null || assembler.getStackInSlot(4).getItem()!= ModItems.assembly_template) {
|
||||
|
||||
String[] warnText = I18nUtil.resolveKeyArray("desc.gui.assembler.warning");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, warnText);
|
||||
}
|
||||
|
||||
String[] templateText = I18nUtil.resolveKeyArray("desc.gui.template");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16, 16, 16, guiLeft - 8, guiTop + 16 + 16, templateText);
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 141, guiTop + 40, 8, 8, guiLeft + 225, guiTop + 40 + 16 + 8, this.getUpgradeInfo(assembler));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.assembler.hasCustomInventoryName() ? this.assembler.getInventoryName() : I18n.format(this.assembler.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int) (assembler.power * 52 / assembler.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 116, guiTop + 70 - i, 176, 52 - i, 16, i);
|
||||
|
||||
if(assembler.isProgressing) {
|
||||
int j = assembler.progress[0] * 83 / assembler.maxProgress[0];
|
||||
drawTexturedModalRect(guiLeft + 45, guiTop + 82, 2, 222, j, 32);
|
||||
}
|
||||
|
||||
if(assembler.getStackInSlot(4) == null || assembler.getStackInSlot(4).getItem()!= ModItems.assembly_template) {
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 6);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16, 16, 16, 11);
|
||||
this.drawInfoPanel(guiLeft + 141, guiTop + 40, 8, 8, 8);
|
||||
}
|
||||
}
|
||||
@ -1,91 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineChemplant;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GUIMachineChemplant extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_chemplant.png");
|
||||
private TileEntityMachineChemplant chemplant;
|
||||
|
||||
public GUIMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
super(new ContainerMachineChemplant(invPlayer, tedf));
|
||||
chemplant = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
chemplant.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 52 - 34, 16, 34);
|
||||
chemplant.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 52 - 34, 16, 34);
|
||||
chemplant.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 52 - 34, 16, 34);
|
||||
chemplant.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 52 - 34, 16, 34);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 70 - 52, 16, 52, chemplant.power, chemplant.maxPower);
|
||||
|
||||
if(chemplant.getStackInSlot(4) == null || chemplant.getStackInSlot(4).getItem()!= ModItems.chemistry_template) {
|
||||
|
||||
String[] warningText = I18nUtil.resolveKeyArray("desc.gui.chemplant.warning");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, warningText);
|
||||
}
|
||||
|
||||
String[] templateText = I18nUtil.resolveKeyArray("desc.gui.template");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 16, 16, 16, guiLeft - 8, guiTop + 16 + 16, templateText);
|
||||
|
||||
String[] upgradeText = new String[3];
|
||||
upgradeText[0] = I18nUtil.resolveKey("desc.gui.upgrade");
|
||||
upgradeText[1] = I18nUtil.resolveKey("desc.gui.upgrade.speed");
|
||||
upgradeText[2] = I18nUtil.resolveKey("desc.gui.upgrade.power");
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 105, guiTop + 40, 8, 8, guiLeft + 105, guiTop + 40 + 16, upgradeText);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.chemplant.hasCustomInventoryName() ? this.chemplant.getInventoryName() : I18n.format(this.chemplant.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int) (chemplant.power * 52 / chemplant.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 44, guiTop + 70 - i, 176, 52 - i, 16, i);
|
||||
|
||||
int j = chemplant.progress * 90 / chemplant.maxProgress;
|
||||
drawTexturedModalRect(guiLeft + 43, guiTop + 89, 0, 222, j, 18);
|
||||
|
||||
this.drawInfoPanel(guiLeft + 105, guiTop + 40, 8, 8, 8);
|
||||
|
||||
if(chemplant.getStackInSlot(4) == null || chemplant.getStackInSlot(4).getItem()!= ModItems.chemistry_template) {
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 6);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 16, 16, 16, 11);
|
||||
|
||||
chemplant.tanks[0].renderTank(guiLeft + 8, guiTop + 52, this.zLevel, 16, 34);
|
||||
chemplant.tanks[1].renderTank(guiLeft + 26, guiTop + 52, this.zLevel, 16, 34);
|
||||
chemplant.tanks[2].renderTank(guiLeft + 134, guiTop + 52, this.zLevel, 16, 34);
|
||||
chemplant.tanks[3].renderTank(guiLeft + 152, guiTop + 52, this.zLevel, 16, 34);
|
||||
}
|
||||
}
|
||||
@ -32,11 +32,8 @@ 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!" };
|
||||
|
||||
112
src/main/java/com/hbm/inventory/gui/GUIPump.java
Normal file
112
src/main/java/com/hbm/inventory/gui/GUIPump.java
Normal file
@ -0,0 +1,112 @@
|
||||
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; }
|
||||
}
|
||||
@ -7,6 +7,7 @@ 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;
|
||||
@ -33,6 +34,10 @@ 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
|
||||
@ -85,5 +90,9 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ 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;
|
||||
@ -64,6 +65,10 @@ 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) {
|
||||
@ -155,6 +160,10 @@ 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();
|
||||
}
|
||||
|
||||
@ -8,12 +8,11 @@ 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 GuiContainer {
|
||||
public class GUIRBMKRod extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_rbmk_element.png");
|
||||
private TileEntityRBMKRod rod;
|
||||
@ -26,6 +25,16 @@ public class GUIRBMKRod extends GuiContainer {
|
||||
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());
|
||||
@ -51,5 +60,8 @@ public class GUIRBMKRod extends GuiContainer {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
175
src/main/java/com/hbm/inventory/gui/GUIScreenRBMKGauge.java
Normal file
175
src/main/java/com/hbm/inventory/gui/GUIScreenRBMKGauge.java
Normal file
@ -0,0 +1,175 @@
|
||||
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; }
|
||||
}
|
||||
176
src/main/java/com/hbm/inventory/gui/GUIScreenRBMKKeyPad.java
Normal file
176
src/main/java/com/hbm/inventory/gui/GUIScreenRBMKKeyPad.java
Normal file
@ -0,0 +1,176 @@
|
||||
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; }
|
||||
}
|
||||
@ -71,7 +71,6 @@ 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);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user