mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-11 20:25:36 +00:00
Merge branch 'HbmMods:master' into New_master
This commit is contained in:
commit
a64c4a2c38
52
changelog
52
changelog
@ -1,36 +1,22 @@
|
|||||||
## Added
|
|
||||||
* Satellite radar relay
|
|
||||||
* Can be linked to a death ray
|
|
||||||
* Allows the death ray to be used with the radar's targeting system
|
|
||||||
* Combinator funnel
|
|
||||||
* Has 9 input and 9 output slots
|
|
||||||
* Will automatically do single ingredient 2x2 or 3x3 recipes like compressing ingots into blocks at up to 9 operations per tick
|
|
||||||
* Input is strictly on the top and output on the bottom
|
|
||||||
* The side acts as an output for the ingredients as a way to de-clog the funnel from leftover materials
|
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* Updated russian localization
|
* Nuclear craters have been reworked
|
||||||
* Nerfed scrap and dust even further
|
* The fallout effect no longer creates dead grass, instead it converts the area into three new biomes, the outer crater, crater and inner crater
|
||||||
* Tiny dusts now shred into the generic tiny dust instead of scrap
|
* The entire crater is now slaked sellafite which now has texture variance to look more like debris, as well as getting darker towards the center
|
||||||
* Tiny dust now shreds into more tiny dust, just like dust shreds into dust
|
* The biomes being overridden means that nukes are now a solution to thaumcraft taint. Yay!
|
||||||
* Updated the strange stone's texture to be more blatant about what it is
|
* There are now new ore variants for the block conversions which match the surrounding sellafite
|
||||||
* Added more OC compat for the RBMK console
|
* Berylliumm ore now has a 100% chance of being converted into emerald
|
||||||
* Inverted large door's redstone behavior to be in line with vanilla iron doors
|
* The watz now cools up to 20% of its current heat level instead of 10%, making reactors a lot cooler and therefore react faster, which means more energy and faster depletion rates
|
||||||
* The FEL now has a humming sound when it is active
|
* Mud production rates have been halved, to prevent currently working setups from exploding instantly
|
||||||
* Updated the gadget's model
|
* This is your reminder that you can achieve more power, mud and depletion by building larger watz powerplants, i.e. stacking more watz segments on top of each other. Your tiny poo reactors make me sick.
|
||||||
* The wires will not render on the fast graphic setting for performance reasons
|
* Watz pellets now have a 50% smaller yield, halving the expected time until depletion
|
||||||
* Remade Lil'Pipsqueak
|
* Adjusted the nuclear flash's intensity, the flash will now deal less and less radiation the longer it goes on
|
||||||
* Now features proper animations for drawing the weapon, firing and reloading, as well as new sounds
|
* The nuclear flash now bypasses radiation resistance, being only affected by blocks and distance
|
||||||
* Comes with a new and improved 3D model as well as a cylinder gap flash when firing
|
* Mushroom clouds' initial scale is now based on the total scale instead of all spawning roughly at the same size, causing fireballs to be comically small for huge bombs
|
||||||
* Is now part of the red room loot pool
|
* Removed the old mining drill, combustion generator, old watz core, structure marker, all old large reactor parts and CMB furnace for good
|
||||||
* Powder box recipes now produce 8 boxes from the same amount of ingredients, making cyclotron recipes more affordable
|
|
||||||
* Buffed the radiation-powered engine, all valid fuels now produce 10x more energy per tick
|
|
||||||
* Removed tungsten and HSS bolts as dedicated items, they are now a single bolt item that uses the autogen system
|
|
||||||
* Regular steel is now also a valid bolt material which will replace tungsten in many recipes where tungsten just doesn't make sense
|
|
||||||
* Bolts Are now 1/8 of an ingot instead of 1/2 which makes some recipes marginally cheaper, as well as making them equal to GregTech bolts
|
|
||||||
* Bolts are oredicted and interchangeable, as well as recycleable in the crucible
|
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed afterburn upgrades not being craftable with bakelite
|
* Fixed a rare crash caused by radars force-loading chunks conflicting with certain mods' chunk loading changes
|
||||||
* Fixed bismuth block not being properly oredicted
|
* Fixed PWR fuel rods not having any radiation value assigned to them
|
||||||
* Powder detectors that are used in the same network as diodes should now be somewhat less wrong
|
* Fixed trenchmaster helmet not having gas mask protection
|
||||||
|
* Fixed large thermobaric artillery rocket still using the wrong slag block
|
||||||
|
* Fixed some of the assembly templates having broken names due to using the wrong way of translating the output
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
mod_version=1.0.27
|
mod_version=1.0.27
|
||||||
# Empty build number makes a release type
|
# Empty build number makes a release type
|
||||||
mod_build_number=4824
|
mod_build_number=4837
|
||||||
|
|
||||||
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
||||||
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
|
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
|
||||||
|
|||||||
@ -11,4 +11,7 @@ public interface IBlockMultiPass {
|
|||||||
return renderID;
|
return renderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public default boolean shouldRenderItemMulti() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -534,12 +534,10 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block sellafield_slaked;
|
public static Block sellafield_slaked;
|
||||||
public static Block sellafield;
|
public static Block sellafield;
|
||||||
/*public static Block sellafield_0;
|
public static Block ore_sellafield_diamond;
|
||||||
public static Block sellafield_1;
|
public static Block ore_sellafield_emerald;
|
||||||
public static Block sellafield_2;
|
public static Block ore_sellafield_uranium_scorched;
|
||||||
public static Block sellafield_3;
|
public static Block ore_sellafield_schrabidium;
|
||||||
public static Block sellafield_4;
|
|
||||||
public static Block sellafield_core;*/
|
|
||||||
|
|
||||||
public static Block geysir_water;
|
public static Block geysir_water;
|
||||||
public static Block geysir_chlorine;
|
public static Block geysir_chlorine;
|
||||||
@ -631,8 +629,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block tesla;
|
public static Block tesla;
|
||||||
|
|
||||||
public static Block marker_structure;
|
|
||||||
|
|
||||||
public static Block muffler;
|
public static Block muffler;
|
||||||
|
|
||||||
public static Block sat_mapper;
|
public static Block sat_mapper;
|
||||||
@ -664,7 +660,6 @@ public class ModBlocks {
|
|||||||
public static Block nuke_custom;
|
public static Block nuke_custom;
|
||||||
public static Block nuke_solinium;
|
public static Block nuke_solinium;
|
||||||
public static Block nuke_n2;
|
public static Block nuke_n2;
|
||||||
public static Block nuke_n45;
|
|
||||||
public static Block nuke_fstbmb;
|
public static Block nuke_fstbmb;
|
||||||
public static Block bomb_multi;
|
public static Block bomb_multi;
|
||||||
|
|
||||||
@ -784,8 +779,6 @@ public class ModBlocks {
|
|||||||
public static Block capacitor_tantalium;
|
public static Block capacitor_tantalium;
|
||||||
public static Block capacitor_schrabidate;
|
public static Block capacitor_schrabidate;
|
||||||
|
|
||||||
@Deprecated public static Block machine_coal_off;
|
|
||||||
@Deprecated public static Block machine_coal_on;
|
|
||||||
public static Block machine_wood_burner;
|
public static Block machine_wood_burner;
|
||||||
|
|
||||||
public static Block red_wire_coated;
|
public static Block red_wire_coated;
|
||||||
@ -910,14 +903,6 @@ public class ModBlocks {
|
|||||||
public static Block pwr_controller;
|
public static Block pwr_controller;
|
||||||
public static Block pwr_block;
|
public static Block pwr_block;
|
||||||
|
|
||||||
@Deprecated public static Block reactor_element;
|
|
||||||
@Deprecated public static Block reactor_control;
|
|
||||||
@Deprecated public static Block reactor_hatch;
|
|
||||||
@Deprecated public static Block reactor_ejector;
|
|
||||||
@Deprecated public static Block reactor_inserter;
|
|
||||||
@Deprecated public static Block reactor_conductor;
|
|
||||||
@Deprecated public static Block reactor_computer;
|
|
||||||
|
|
||||||
public static Block fusion_conductor;
|
public static Block fusion_conductor;
|
||||||
public static Block fusion_center;
|
public static Block fusion_center;
|
||||||
public static Block fusion_motor;
|
public static Block fusion_motor;
|
||||||
@ -936,9 +921,7 @@ public class ModBlocks {
|
|||||||
public static Block watz_control;
|
public static Block watz_control;
|
||||||
public static Block watz_cooler;
|
public static Block watz_cooler;
|
||||||
public static Block watz_end;
|
public static Block watz_end;
|
||||||
public static Block watz_hatch;
|
|
||||||
public static Block watz_conductor;
|
public static Block watz_conductor;
|
||||||
public static Block watz_core;
|
|
||||||
|
|
||||||
public static Block fwatz_conductor;
|
public static Block fwatz_conductor;
|
||||||
public static Block fwatz_cooler;
|
public static Block fwatz_cooler;
|
||||||
@ -977,8 +960,6 @@ public class ModBlocks {
|
|||||||
public static Block machine_shredder_large;
|
public static Block machine_shredder_large;
|
||||||
public static final int guiID_machine_shredder_large = 76;
|
public static final int guiID_machine_shredder_large = 76;
|
||||||
|
|
||||||
public static Block machine_combine_factory;
|
|
||||||
|
|
||||||
public static Block machine_teleporter;
|
public static Block machine_teleporter;
|
||||||
public static Block teleanchor;
|
public static Block teleanchor;
|
||||||
public static Block field_disturber;
|
public static Block field_disturber;
|
||||||
@ -1036,10 +1017,7 @@ public class ModBlocks {
|
|||||||
public static Block machine_deaerator;
|
public static Block machine_deaerator;
|
||||||
public static final int guiID_machine_deaerator = 74;
|
public static final int guiID_machine_deaerator = 74;
|
||||||
|
|
||||||
public static Block machine_drill;
|
|
||||||
public static Block drill_pipe;
|
|
||||||
public static Block machine_excavator;
|
public static Block machine_excavator;
|
||||||
|
|
||||||
public static Block machine_autosaw;
|
public static Block machine_autosaw;
|
||||||
|
|
||||||
public static Block machine_mining_laser;
|
public static Block machine_mining_laser;
|
||||||
@ -1174,7 +1152,8 @@ public class ModBlocks {
|
|||||||
public static Block rail_large_straight;
|
public static Block rail_large_straight;
|
||||||
public static Block rail_large_straight_short;
|
public static Block rail_large_straight_short;
|
||||||
public static Block rail_large_curve;
|
public static Block rail_large_curve;
|
||||||
public static Block rail_large_curve_wide;
|
public static Block rail_large_curve_7;
|
||||||
|
public static Block rail_large_curve_9;
|
||||||
public static Block rail_large_ramp;
|
public static Block rail_large_ramp;
|
||||||
public static Block rail_large_buffer;
|
public static Block rail_large_buffer;
|
||||||
public static Block rail_large_switch;
|
public static Block rail_large_switch;
|
||||||
@ -1260,8 +1239,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block volcano_core;
|
public static Block volcano_core;
|
||||||
|
|
||||||
public static Block dummy_block_drill;
|
|
||||||
public static Block dummy_port_drill;
|
|
||||||
public static Block dummy_block_ams_limiter;
|
public static Block dummy_block_ams_limiter;
|
||||||
public static Block dummy_port_ams_limiter;
|
public static Block dummy_port_ams_limiter;
|
||||||
public static Block dummy_block_ams_emitter;
|
public static Block dummy_block_ams_emitter;
|
||||||
@ -1286,8 +1263,6 @@ public class ModBlocks {
|
|||||||
public static Block pink_double_slab;
|
public static Block pink_double_slab;
|
||||||
public static Block pink_stairs;
|
public static Block pink_stairs;
|
||||||
|
|
||||||
public static Block ff;
|
|
||||||
|
|
||||||
public static Material materialGas = new MaterialGas();
|
public static Material materialGas = new MaterialGas();
|
||||||
|
|
||||||
private static void initializeBlock() {
|
private static void initializeBlock() {
|
||||||
@ -1776,14 +1751,12 @@ public class ModBlocks {
|
|||||||
sand_dirty_red = new BlockFalling(Material.sand).setBlockName("sand_dirty_red").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_dirty_red");
|
sand_dirty_red = new BlockFalling(Material.sand).setBlockName("sand_dirty_red").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_dirty_red");
|
||||||
stone_cracked = new BlockFalling(Material.rock).setBlockName("stone_cracked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":stone_cracked");
|
stone_cracked = new BlockFalling(Material.rock).setBlockName("stone_cracked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":stone_cracked");
|
||||||
|
|
||||||
sellafield_slaked = new BlockGeneric(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked");
|
sellafield_slaked = new BlockSellafieldSlaked(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked");
|
||||||
sellafield = new BlockSellafield(Material.rock).setBlockName("sellafield").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
|
sellafield = new BlockSellafield(Material.rock).setBlockName("sellafield").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
|
||||||
/*sellafield_0 = new BlockHazard(Material.rock).setBlockName("sellafield_0").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
|
ore_sellafield_diamond = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_diamond").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_diamond");
|
||||||
sellafield_1 = new BlockHazard(Material.rock).setBlockName("sellafield_1").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_1");
|
ore_sellafield_emerald = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_emerald").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_emerald");
|
||||||
sellafield_2 = new BlockHazard(Material.rock).setBlockName("sellafield_2").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_2");
|
ore_sellafield_uranium_scorched = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_uranium_scorched").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_uranium_scorched");
|
||||||
sellafield_3 = new BlockHazard(Material.rock).setBlockName("sellafield_3").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_3");
|
ore_sellafield_schrabidium = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_schrabidium").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_schrabidium");
|
||||||
sellafield_4 = new BlockHazard(Material.rock).setBlockName("sellafield_4").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_4");
|
|
||||||
sellafield_core = new BlockHazard(Material.rock).setBlockName("sellafield_core").setStepSound(Block.soundTypeStone).setHardness(10.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_core");*/
|
|
||||||
|
|
||||||
geysir_water = new BlockGeysir(Material.rock).setBlockName("geysir_water").setStepSound(Block.soundTypeStone).setHardness(5.0F);
|
geysir_water = new BlockGeysir(Material.rock).setBlockName("geysir_water").setStepSound(Block.soundTypeStone).setHardness(5.0F);
|
||||||
geysir_chlorine = new BlockGeysir(Material.rock).setBlockName("geysir_chlorine").setStepSound(Block.soundTypeStone).setHardness(5.0F);
|
geysir_chlorine = new BlockGeysir(Material.rock).setBlockName("geysir_chlorine").setStepSound(Block.soundTypeStone).setHardness(5.0F);
|
||||||
@ -1803,7 +1776,6 @@ public class ModBlocks {
|
|||||||
nuke_custom = new NukeCustom(Material.iron).setBlockName("nuke_custom").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":custom");
|
nuke_custom = new NukeCustom(Material.iron).setBlockName("nuke_custom").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":custom");
|
||||||
nuke_solinium = new NukeSolinium(Material.iron).setBlockName("nuke_solinium").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_solinium");
|
nuke_solinium = new NukeSolinium(Material.iron).setBlockName("nuke_solinium").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_solinium");
|
||||||
nuke_n2 = new NukeN2(Material.iron).setBlockName("nuke_n2").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_n2");
|
nuke_n2 = new NukeN2(Material.iron).setBlockName("nuke_n2").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_n2");
|
||||||
nuke_n45 = new NukeN45(Material.iron).setBlockName("nuke_n45").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":code");
|
|
||||||
nuke_fstbmb = new NukeBalefire(Material.iron).setBlockName("nuke_fstbmb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_fstbmb");
|
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 + ":bomb_multi1");
|
||||||
@ -1905,7 +1877,7 @@ public class ModBlocks {
|
|||||||
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_yellow");
|
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).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(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_striped");
|
hadron_plating_striped = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_striped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).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(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
hadron_plating_voltz = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_voltz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
||||||
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
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(MainRegistry.machineTab).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_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_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");
|
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");
|
||||||
@ -1922,7 +1894,7 @@ public class ModBlocks {
|
|||||||
hadron_power_10g = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
hadron_power_10g = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
||||||
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
||||||
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
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(MainRegistry.machineTab).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(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
hadron_access = new BlockHadronAccess(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_access").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
||||||
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
||||||
hadron_cooler = new BlockHadronCooler(Material.iron).setBlockName("hadron_cooler").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
hadron_cooler = new BlockHadronCooler(Material.iron).setBlockName("hadron_cooler").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||||
@ -1949,18 +1921,13 @@ public class ModBlocks {
|
|||||||
capacitor_tantalium = new MachineCapacitor(Material.iron, 150_000_000L, "tantalium").setBlockName("capacitor_tantalium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
|
capacitor_tantalium = new MachineCapacitor(Material.iron, 150_000_000L, "tantalium").setBlockName("capacitor_tantalium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
|
||||||
capacitor_schrabidate = new MachineCapacitor(Material.iron, 50_000_000_000L, "schrabidate").setBlockName("capacitor_schrabidate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_schrabidate");
|
capacitor_schrabidate = new MachineCapacitor(Material.iron, 50_000_000_000L, "schrabidate").setBlockName("capacitor_schrabidate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_schrabidate");
|
||||||
|
|
||||||
machine_coal_off = new MachineCoal(false).setBlockName("machine_coal_off").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
|
||||||
machine_coal_on = new MachineCoal(true).setBlockName("machine_coal_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
|
||||||
machine_wood_burner = new MachineWoodBurner(Material.iron).setBlockName("machine_wood_burner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_wood_burner = new MachineWoodBurner(Material.iron).setBlockName("machine_wood_burner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
machine_diesel = new MachineDiesel().setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_diesel = new MachineDiesel().setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_combustion_engine = new MachineCombustionEngine().setBlockName("machine_combustion_engine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_combustion_engine = new MachineCombustionEngine().setBlockName("machine_combustion_engine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
machine_shredder = new MachineShredder(Material.iron).setBlockName("machine_shredder").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_shredder = new MachineShredder(Material.iron).setBlockName("machine_shredder").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
machine_shredder_large = new MachineShredderLarge(Material.iron).setBlockName("machine_shredder_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":code");
|
machine_shredder_large = new MachineShredderLarge(Material.iron).setBlockName("machine_shredder_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":code");
|
||||||
|
|
||||||
machine_combine_factory = new MachineCMBFactory(Material.iron).setBlockName("machine_combine_factory").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
|
||||||
|
|
||||||
machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
teleanchor = new MachineTeleanchor().setBlockName("teleanchor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
teleanchor = new MachineTeleanchor().setBlockName("teleanchor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber");
|
field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber");
|
||||||
@ -2092,14 +2059,6 @@ public class ModBlocks {
|
|||||||
pwr_controller = new MachinePWRController(Material.iron).setBlockName("pwr_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing_blank");
|
pwr_controller = new MachinePWRController(Material.iron).setBlockName("pwr_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing_blank");
|
||||||
pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pwr_block");
|
pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pwr_block");
|
||||||
|
|
||||||
reactor_element = new BlockPillar(Material.iron, RefStrings.MODID + ":reactor_element_top", RefStrings.MODID + ":reactor_element_base").setBlockName("reactor_element").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":reactor_element_side");
|
|
||||||
reactor_control = new BlockPillar(Material.iron, RefStrings.MODID + ":reactor_control_top").setBlockName("reactor_control").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":reactor_control_side");
|
|
||||||
reactor_hatch = new ReactorHatch(Material.iron).setBlockName("reactor_hatch").setHardness(5.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
|
||||||
reactor_ejector = new BlockRotatable(Material.iron).setBlockName("reactor_ejector").setHardness(5.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
|
||||||
reactor_inserter = new BlockRotatable(Material.iron).setBlockName("reactor_inserter").setHardness(5.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
|
||||||
reactor_conductor = new BlockPillar(Material.iron, RefStrings.MODID + ":reactor_conductor_top").setBlockName("reactor_conductor").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":reactor_conductor_side");
|
|
||||||
reactor_computer = new ReactorCore(Material.iron).setBlockName("reactor_computer").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":reactor_computer");
|
|
||||||
|
|
||||||
fusion_conductor = new BlockToolConversionPillar(Material.iron).addVariant("_welded").setBlockName("fusion_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_conductor");
|
fusion_conductor = new BlockToolConversionPillar(Material.iron).addVariant("_welded").setBlockName("fusion_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_conductor");
|
||||||
fusion_center = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_center_top_alt").setBlockName("fusion_center").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_center_side_alt");
|
fusion_center = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_center_top_alt").setBlockName("fusion_center").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_center_side_alt");
|
||||||
fusion_motor = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_motor_top_alt").setBlockName("fusion_motor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_motor_side_alt");
|
fusion_motor = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_motor_top_alt").setBlockName("fusion_motor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_motor_side_alt");
|
||||||
@ -2113,9 +2072,7 @@ public class ModBlocks {
|
|||||||
watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side");
|
watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side");
|
||||||
watz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_cooler_top").setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler_side");
|
watz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_cooler_top").setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler_side");
|
||||||
watz_end = new BlockToolConversion(Material.iron).addVariant("_bolted").setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing");
|
watz_end = new BlockToolConversion(Material.iron).addVariant("_bolted").setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing");
|
||||||
watz_hatch = new WatzHatch(Material.iron).setBlockName("watz_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":watz_hatch");
|
|
||||||
watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top");
|
watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top");
|
||||||
watz_core = new WatzCore(Material.iron).setBlockName("watz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":watz_computer");
|
|
||||||
watz = new Watz().setBlockName("watz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
watz = new Watz().setBlockName("watz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
watz_pump = new WatzPump().setBlockName("watz_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
watz_pump = new WatzPump().setBlockName("watz_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
@ -2180,8 +2137,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
tesla = new MachineTesla(Material.iron).setBlockName("tesla").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":tesla");
|
tesla = new MachineTesla(Material.iron).setBlockName("tesla").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":tesla");
|
||||||
|
|
||||||
marker_structure = new BlockMarker(Material.iron).setBlockName("marker_structure").setHardness(0.1F).setResistance(0.1F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":marker_structure");
|
|
||||||
|
|
||||||
muffler = new BlockGeneric(Material.cloth).setBlockName("muffler").setHardness(0.8F).setStepSound(Block.soundTypeCloth).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":muffler");
|
muffler = new BlockGeneric(Material.cloth).setBlockName("muffler").setHardness(0.8F).setStepSound(Block.soundTypeCloth).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":muffler");
|
||||||
|
|
||||||
launch_pad = new LaunchPad(Material.iron).setBlockName("launch_pad").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_pad");
|
launch_pad = new LaunchPad(Material.iron).setBlockName("launch_pad").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_pad");
|
||||||
@ -2252,14 +2207,15 @@ public class ModBlocks {
|
|||||||
rail_booster = new RailBooster().setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
rail_booster = new RailBooster().setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
||||||
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||||
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
rail_large_straight_short = new RailStandardStraightShort().setBlockName("rail_large_straight_short").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_straight_short = new RailStandardStraightShort().setBlockName("rail_large_straight_short").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
rail_large_curve = new RailStandardCurve().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_curve = new RailStandardCurveBase().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
rail_large_curve_wide = new RailStandardCurveWide().setBlockName("rail_large_curve_wide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_curve_7 = new RailStandardCurveWide7().setBlockName("rail_large_curve_7").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_curve_9 = new RailStandardCurveWide9().setBlockName("rail_large_curve_9").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
||||||
rail_large_switch_flipped = new RailStandardSwitchFlipped().setBlockName("rail_large_switch_flipped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
|
rail_large_switch_flipped = new RailStandardSwitchFlipped().setBlockName("rail_large_switch_flipped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
|
|
||||||
crate = new BlockCrate(Material.wood).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate");
|
crate = new BlockCrate(Material.wood).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate");
|
||||||
crate_weapon = new BlockCrate(Material.wood).setBlockName("crate_weapon").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_weapon");
|
crate_weapon = new BlockCrate(Material.wood).setBlockName("crate_weapon").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_weapon");
|
||||||
@ -2295,9 +2251,7 @@ public class ModBlocks {
|
|||||||
machine_catalytic_reformer = new MachineCatalyticReformer(Material.iron).setBlockName("machine_catalytic_reformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_catalytic_reformer = new MachineCatalyticReformer(Material.iron).setBlockName("machine_catalytic_reformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_coker = new MachineCoker(Material.iron).setBlockName("machine_coker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_coker = new MachineCoker(Material.iron).setBlockName("machine_coker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_drill = new MachineMiningDrill(Material.iron).setBlockName("machine_drill").setHardness(5.0F).setResistance(100.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_drill");
|
|
||||||
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
drill_pipe = new BlockNoDrop(Material.iron).setBlockName("drill_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":drill_pipe");
|
|
||||||
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");
|
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");
|
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(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||||
@ -2446,8 +2400,6 @@ public class ModBlocks {
|
|||||||
Fluid liquidConcrete = new GenericFluid("concrete_liquid").setViscosity(2000);
|
Fluid liquidConcrete = new GenericFluid("concrete_liquid").setViscosity(2000);
|
||||||
concrete_liquid = new GenericFiniteFluid(liquidConcrete, Material.rock, "concrete_liquid", "concrete_liquid_flowing").setQuantaPerBlock(4).setBlockName("concrete_liquid").setResistance(500F);
|
concrete_liquid = new GenericFiniteFluid(liquidConcrete, Material.rock, "concrete_liquid", "concrete_liquid_flowing").setQuantaPerBlock(4).setBlockName("concrete_liquid").setResistance(500F);
|
||||||
|
|
||||||
dummy_block_drill = new DummyBlockDrill(Material.iron, false).setBlockName("dummy_block_drill").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_lead");
|
|
||||||
dummy_port_drill = new DummyBlockDrill(Material.iron, true).setBlockName("dummy_port_drill").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_lead");
|
|
||||||
dummy_block_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_block_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
dummy_block_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_block_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
||||||
dummy_port_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_port_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
dummy_port_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_port_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
||||||
dummy_block_ams_emitter = new DummyBlockAMSEmitter(Material.iron).setBlockName("dummy_block_ams_emitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
dummy_block_ams_emitter = new DummyBlockAMSEmitter(Material.iron).setBlockName("dummy_block_ams_emitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
||||||
@ -2471,8 +2423,6 @@ public class ModBlocks {
|
|||||||
pink_slab = new BlockPinkSlab(false, Material.wood).setBlockName("pink_slab").setStepSound(Block.soundTypeWood).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pink_planks");
|
pink_slab = new BlockPinkSlab(false, Material.wood).setBlockName("pink_slab").setStepSound(Block.soundTypeWood).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pink_planks");
|
||||||
pink_double_slab = new BlockPinkSlab(true, Material.wood).setBlockName("pink_double_slab").setStepSound(Block.soundTypeWood).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pink_planks");
|
pink_double_slab = new BlockPinkSlab(true, Material.wood).setBlockName("pink_double_slab").setStepSound(Block.soundTypeWood).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pink_planks");
|
||||||
pink_stairs = new BlockGenericStairs(pink_planks, 0).setBlockName("pink_stairs").setStepSound(Block.soundTypeWood).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pink_planks");
|
pink_stairs = new BlockGenericStairs(pink_planks, 0).setBlockName("pink_stairs").setStepSound(Block.soundTypeWood).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pink_planks");
|
||||||
|
|
||||||
ff = new BlockFF(Material.iron).setBlockName("ff").setHardness(0.5F).setStepSound(Block.soundTypeGravel).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":code");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerBlock() {
|
private static void registerBlock() {
|
||||||
@ -2975,7 +2925,11 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(impact_dirt, impact_dirt.getUnlocalizedName());
|
GameRegistry.registerBlock(impact_dirt, impact_dirt.getUnlocalizedName());
|
||||||
|
|
||||||
//RAD
|
//RAD
|
||||||
GameRegistry.registerBlock(sellafield_slaked, sellafield_slaked.getUnlocalizedName());
|
register(sellafield_slaked);
|
||||||
|
register(ore_sellafield_diamond);
|
||||||
|
register(ore_sellafield_emerald);
|
||||||
|
register(ore_sellafield_uranium_scorched);
|
||||||
|
register(ore_sellafield_schrabidium);
|
||||||
GameRegistry.registerBlock(sellafield, ItemBlockNamedMeta.class, sellafield.getUnlocalizedName());
|
GameRegistry.registerBlock(sellafield, ItemBlockNamedMeta.class, sellafield.getUnlocalizedName());
|
||||||
|
|
||||||
//Geysirs
|
//Geysirs
|
||||||
@ -2994,7 +2948,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(nuke_fleija, nuke_fleija.getUnlocalizedName());
|
GameRegistry.registerBlock(nuke_fleija, nuke_fleija.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(nuke_solinium, nuke_solinium.getUnlocalizedName());
|
GameRegistry.registerBlock(nuke_solinium, nuke_solinium.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(nuke_n2, nuke_n2.getUnlocalizedName());
|
GameRegistry.registerBlock(nuke_n2, nuke_n2.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(nuke_n45, nuke_n45.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(nuke_fstbmb, nuke_fstbmb.getUnlocalizedName());
|
GameRegistry.registerBlock(nuke_fstbmb, nuke_fstbmb.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(nuke_custom, nuke_custom.getUnlocalizedName());
|
GameRegistry.registerBlock(nuke_custom, nuke_custom.getUnlocalizedName());
|
||||||
|
|
||||||
@ -3185,8 +3138,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_nuke_furnace_on, machine_nuke_furnace_on.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_nuke_furnace_on, machine_nuke_furnace_on.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_rtg_furnace_off, machine_rtg_furnace_off.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_rtg_furnace_off, machine_rtg_furnace_off.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_rtg_furnace_on, machine_rtg_furnace_on.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_rtg_furnace_on, machine_rtg_furnace_on.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_coal_off, machine_coal_off.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(machine_coal_on, machine_coal_on.getUnlocalizedName());
|
|
||||||
register(machine_wood_burner);
|
register(machine_wood_burner);
|
||||||
register(machine_diesel);
|
register(machine_diesel);
|
||||||
register(machine_selenium);
|
register(machine_selenium);
|
||||||
@ -3400,7 +3351,6 @@ public class ModBlocks {
|
|||||||
register(machine_catalytic_cracker);
|
register(machine_catalytic_cracker);
|
||||||
register(machine_catalytic_reformer);
|
register(machine_catalytic_reformer);
|
||||||
register(machine_coker);
|
register(machine_coker);
|
||||||
register(machine_drill);
|
|
||||||
register(machine_autosaw);
|
register(machine_autosaw);
|
||||||
register(machine_excavator);
|
register(machine_excavator);
|
||||||
register(machine_mining_laser);
|
register(machine_mining_laser);
|
||||||
@ -3408,7 +3358,6 @@ public class ModBlocks {
|
|||||||
register(machine_turbofan);
|
register(machine_turbofan);
|
||||||
register(machine_turbinegas);
|
register(machine_turbinegas);
|
||||||
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
||||||
@ -3419,9 +3368,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(radiorec, radiorec.getUnlocalizedName());
|
GameRegistry.registerBlock(radiorec, radiorec.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(radiobox, radiobox.getUnlocalizedName());
|
GameRegistry.registerBlock(radiobox, radiobox.getUnlocalizedName());
|
||||||
|
|
||||||
//Multiblock Helpers
|
|
||||||
GameRegistry.registerBlock(marker_structure, marker_structure.getUnlocalizedName());
|
|
||||||
|
|
||||||
//The muffler
|
//The muffler
|
||||||
GameRegistry.registerBlock(muffler, muffler.getUnlocalizedName());
|
GameRegistry.registerBlock(muffler, muffler.getUnlocalizedName());
|
||||||
|
|
||||||
@ -3474,20 +3420,11 @@ public class ModBlocks {
|
|||||||
register(pwr_block);
|
register(pwr_block);
|
||||||
|
|
||||||
//Multiblock Generators
|
//Multiblock Generators
|
||||||
GameRegistry.registerBlock(reactor_element, reactor_element.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(reactor_control, reactor_control.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(reactor_hatch, reactor_hatch.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(reactor_ejector, reactor_ejector.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(reactor_inserter, reactor_inserter.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(reactor_conductor, reactor_conductor.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(reactor_computer, reactor_computer.getUnlocalizedName());
|
|
||||||
|
|
||||||
register(fusion_conductor);
|
register(fusion_conductor);
|
||||||
GameRegistry.registerBlock(fusion_center, fusion_center.getUnlocalizedName());
|
GameRegistry.registerBlock(fusion_center, fusion_center.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(fusion_motor, fusion_motor.getUnlocalizedName());
|
GameRegistry.registerBlock(fusion_motor, fusion_motor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName());
|
GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName());
|
GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName());
|
||||||
//GameRegistry.registerBlock(fusion_core, fusion_core.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName());
|
GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
||||||
@ -3496,9 +3433,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(watz_control, watz_control.getUnlocalizedName());
|
GameRegistry.registerBlock(watz_control, watz_control.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(watz_cooler, watz_cooler.getUnlocalizedName());
|
GameRegistry.registerBlock(watz_cooler, watz_cooler.getUnlocalizedName());
|
||||||
register(watz_end);
|
register(watz_end);
|
||||||
GameRegistry.registerBlock(watz_hatch, watz_hatch.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName());
|
GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(watz_core, watz_core.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(watz, watz.getUnlocalizedName());
|
GameRegistry.registerBlock(watz, watz.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(watz_pump, watz_pump.getUnlocalizedName());
|
GameRegistry.registerBlock(watz_pump, watz_pump.getUnlocalizedName());
|
||||||
|
|
||||||
@ -3561,7 +3496,8 @@ public class ModBlocks {
|
|||||||
register(rail_large_straight);
|
register(rail_large_straight);
|
||||||
register(rail_large_straight_short);
|
register(rail_large_straight_short);
|
||||||
register(rail_large_curve);
|
register(rail_large_curve);
|
||||||
register(rail_large_curve_wide);
|
register(rail_large_curve_7);
|
||||||
|
register(rail_large_curve_9);
|
||||||
register(rail_large_ramp);
|
register(rail_large_ramp);
|
||||||
register(rail_large_buffer);
|
register(rail_large_buffer);
|
||||||
register(rail_large_switch);
|
register(rail_large_switch);
|
||||||
@ -3594,8 +3530,6 @@ public class ModBlocks {
|
|||||||
//GameRegistry.registerBlock(concrete_liquid, concrete_liquid.getUnlocalizedName());
|
//GameRegistry.registerBlock(concrete_liquid, concrete_liquid.getUnlocalizedName());
|
||||||
|
|
||||||
//Multiblock Dummy Blocks
|
//Multiblock Dummy Blocks
|
||||||
GameRegistry.registerBlock(dummy_block_drill, dummy_block_drill.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(dummy_port_drill, dummy_port_drill.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(dummy_block_ams_limiter, dummy_block_ams_limiter.getUnlocalizedName());
|
GameRegistry.registerBlock(dummy_block_ams_limiter, dummy_block_ams_limiter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(dummy_port_ams_limiter, dummy_port_ams_limiter.getUnlocalizedName());
|
GameRegistry.registerBlock(dummy_port_ams_limiter, dummy_port_ams_limiter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(dummy_block_ams_emitter, dummy_block_ams_emitter.getUnlocalizedName());
|
GameRegistry.registerBlock(dummy_block_ams_emitter, dummy_block_ams_emitter.getUnlocalizedName());
|
||||||
@ -3614,7 +3548,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
//Other Technical Blocks
|
//Other Technical Blocks
|
||||||
GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName());
|
GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(drill_pipe, drill_pipe.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(vent_chlorine, vent_chlorine.getUnlocalizedName());
|
GameRegistry.registerBlock(vent_chlorine, vent_chlorine.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(vent_cloud, vent_cloud.getUnlocalizedName());
|
GameRegistry.registerBlock(vent_cloud, vent_cloud.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(vent_pink_cloud, vent_pink_cloud.getUnlocalizedName());
|
GameRegistry.registerBlock(vent_pink_cloud, vent_pink_cloud.getUnlocalizedName());
|
||||||
@ -3645,7 +3578,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(pink_slab, pink_slab.getUnlocalizedName());
|
GameRegistry.registerBlock(pink_slab, pink_slab.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(pink_double_slab, pink_double_slab.getUnlocalizedName());
|
GameRegistry.registerBlock(pink_double_slab, pink_double_slab.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(pink_stairs, pink_stairs.getUnlocalizedName());
|
GameRegistry.registerBlock(pink_stairs, pink_stairs.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ff, ff.getUnlocalizedName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void register(Block b) {
|
private static void register(Block b) {
|
||||||
|
|||||||
@ -1,137 +0,0 @@
|
|||||||
package com.hbm.blocks.bomb;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.interfaces.IBomb;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class NukeN45 extends BlockContainer implements IBomb {
|
|
||||||
|
|
||||||
private final Random field_149933_a = new Random();
|
|
||||||
private static boolean keepInventory = false;
|
|
||||||
|
|
||||||
public NukeN45(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityNukeN45();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
|
||||||
if(!keepInventory) {
|
|
||||||
ISidedInventory tileentityfurnace = (ISidedInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
|
||||||
|
|
||||||
if(tileentityfurnace != null) {
|
|
||||||
for(int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
|
||||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
|
||||||
|
|
||||||
if(itemstack != null) {
|
|
||||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
|
|
||||||
while(itemstack.stackSize > 0) {
|
|
||||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
|
||||||
|
|
||||||
if(j1 > itemstack.stackSize) {
|
|
||||||
j1 = itemstack.stackSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
itemstack.stackSize -= j1;
|
|
||||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
|
||||||
|
|
||||||
if(itemstack.hasTagCompound()) {
|
|
||||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
|
||||||
}
|
|
||||||
|
|
||||||
float f3 = 0.05F;
|
|
||||||
entityitem.motionX = (float) this.field_149933_a.nextGaussian() * f3;
|
|
||||||
entityitem.motionY = (float) this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
|
||||||
entityitem.motionZ = (float) this.field_149933_a.nextGaussian() * f3;
|
|
||||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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()) {
|
|
||||||
TileEntityNukeN45 entity = (TileEntityNukeN45) world.getTileEntity(x, y, z);
|
|
||||||
if(entity != null) {
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
|
||||||
return Item.getItemFromBlock(ModBlocks.nuke_n45);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRenderType() {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
|
||||||
|
|
||||||
if(!world.isRemote) {
|
|
||||||
TileEntityNukeN45 entity = (TileEntityNukeN45) world.getTileEntity(x, y, z);
|
|
||||||
|
|
||||||
if(entity.getType() == 100) {
|
|
||||||
entity.primed = true;
|
|
||||||
return BombReturnCode.TRIGGERED;
|
|
||||||
} else if(!entity.primed && entity.getType() > 0) {
|
|
||||||
int t = entity.getType();
|
|
||||||
entity.clearSlots();
|
|
||||||
entity.explode(world, x, y, z, t);
|
|
||||||
return BombReturnCode.DETONATED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
return BombReturnCode.UNDEFINED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -12,6 +12,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -39,10 +40,30 @@ public class BlockAmmoCrate extends Block {
|
|||||||
return side == 0 ? this.iconBottom : (side == 1 ? this.iconTop : this.blockIcon);
|
return side == 0 ? this.iconBottom : (side == 1 ? this.iconTop : this.blockIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||||
|
if(!world.isRemote) {
|
||||||
|
dropContents(world, x, y, z);
|
||||||
|
world.setBlockToAir(x, y, z);
|
||||||
|
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
|
||||||
@Override
|
public void dropContents(World world, int x, int y, int z) {
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
ArrayList<ItemStack> items = getContents(world, x, y, z);
|
||||||
|
|
||||||
|
for(ItemStack item : items) {
|
||||||
|
this.dropBlockAsItem(world, x, y, z, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<ItemStack> getContents(World world, int x, int y, int z) {
|
||||||
|
|
||||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||||
|
|
||||||
|
|||||||
@ -11,9 +11,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ChatComponentText;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockCanCrate extends Block {
|
public class BlockCanCrate extends Block {
|
||||||
@ -41,59 +39,57 @@ public class BlockCanCrate extends Block {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||||
if(world.isRemote)
|
if(!world.isRemote) {
|
||||||
{
|
dropContents(world, x, y, z);
|
||||||
player.addChatMessage(new ChatComponentText("The one crate you are allowed to smash!"));
|
world.setBlockToAir(x, y, z);
|
||||||
|
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
Random rand = new Random();
|
||||||
|
|
||||||
|
public void dropContents(World world, int x, int y, int z) {
|
||||||
|
ArrayList<ItemStack> items = getContents(world, x, y, z);
|
||||||
|
|
||||||
|
for(ItemStack item : items) {
|
||||||
|
this.dropBlockAsItem(world, x, y, z, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<ItemStack> getContents(World world, int x, int y, int z) {
|
||||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||||
|
|
||||||
int count = quantityDropped(metadata, fortune, world.rand);
|
int count = getContentAmount(world.rand);
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
Item item = getItemDropped(metadata, world.rand, fortune);
|
ret.add(getRandomItem(world.rand));
|
||||||
if(item != null)
|
|
||||||
ret.add(new ItemStack(item, 1, damageDropped(metadata, world.rand, item)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
//pain
|
public ItemStack getRandomItem(Random rand) {
|
||||||
public int damageDropped(int meta, Random rand, Item item) {
|
|
||||||
if(item != ModItems.canned_conserve)
|
|
||||||
return damageDropped(meta);
|
|
||||||
else
|
|
||||||
return Math.abs(rand.nextInt() % EnumFoodType.values().length);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
List<ItemStack> items = new ArrayList();
|
||||||
public Item getItemDropped(int i, Random rand, int j) {
|
|
||||||
|
|
||||||
List<Item> items = new ArrayList();
|
|
||||||
for(int a = 0; a < EnumFoodType.values().length; a++)
|
for(int a = 0; a < EnumFoodType.values().length; a++)
|
||||||
items.add(ModItems.canned_conserve);
|
items.add(new ItemStack(ModItems.canned_conserve, 1, a));
|
||||||
items.add(ModItems.can_smart);
|
items.add(new ItemStack(ModItems.can_smart));
|
||||||
items.add(ModItems.can_creature);
|
items.add(new ItemStack(ModItems.can_creature));
|
||||||
items.add(ModItems.can_redbomb);
|
items.add(new ItemStack(ModItems.can_redbomb));
|
||||||
items.add(ModItems.can_mrsugar);
|
items.add(new ItemStack(ModItems.can_mrsugar));
|
||||||
items.add(ModItems.can_overcharge);
|
items.add(new ItemStack(ModItems.can_overcharge));
|
||||||
items.add(ModItems.can_luna);
|
items.add(new ItemStack(ModItems.can_luna));
|
||||||
items.add(ModItems.can_breen);
|
items.add(new ItemStack(ModItems.can_breen));
|
||||||
items.add(ModItems.can_bepis);
|
items.add(new ItemStack(ModItems.can_bepis));
|
||||||
items.add(ModItems.pudding);
|
items.add(new ItemStack(ModItems.pudding));
|
||||||
|
|
||||||
return items.get(rand.nextInt(items.size()));
|
return items.get(rand.nextInt(items.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public int getContentAmount(Random rand) {
|
||||||
public int quantityDropped(Random rand) {
|
|
||||||
|
|
||||||
return 5 + rand.nextInt(4);
|
return 5 + rand.nextInt(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import net.minecraft.entity.item.EntityItem;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ChatComponentText;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockCrate extends BlockFalling {
|
public class BlockCrate extends BlockFalling {
|
||||||
@ -29,26 +28,18 @@ public class BlockCrate extends BlockFalling {
|
|||||||
super(p_i45394_1_);
|
super(p_i45394_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||||
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||||
|
if(!world.isRemote) {
|
||||||
dropItems(world, x, y, z);
|
dropItems(world, x, y, z);
|
||||||
world.setBlockToAir(x, y, z);
|
world.setBlockToAir(x, y, z);
|
||||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
if(world.isRemote) {
|
|
||||||
player.addChatMessage(new ChatComponentText("I'll need a crate opening device to get the loot, smashing the whole thing won't work..."));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void setDrops() {
|
public void setDrops() {
|
||||||
|
|
||||||
@ -133,7 +124,7 @@ public class BlockCrate extends BlockFalling {
|
|||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 9);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 9);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_reactor_breeding), 6);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_reactor_breeding), 6);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 7);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 7);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_coal_off), 10);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_wood_burner), 10);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_selenium), 7);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_selenium), 7);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
|
||||||
@ -143,7 +134,6 @@ public class BlockCrate extends BlockFalling {
|
|||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembler), 10);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembler), 10);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_drill), 4);
|
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.centrifuge_element, 6);
|
BlockCrate.addToListWithWeight(metalList, ModItems.centrifuge_element, 6);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.motor, 8);
|
BlockCrate.addToListWithWeight(metalList, ModItems.motor, 8);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.coil_tungsten, 7);
|
BlockCrate.addToListWithWeight(metalList, ModItems.coil_tungsten, 7);
|
||||||
|
|||||||
@ -58,9 +58,9 @@ public class BlockDecoContainer extends BlockDecoModel implements ITileEntityPro
|
|||||||
} else {
|
} else {
|
||||||
TileEntity entity = world.getTileEntity(x, y, z);
|
TileEntity entity = world.getTileEntity(x, y, z);
|
||||||
if(entity instanceof TileEntityLockableBase) { //annoying accommodations for the filing cabinet, but whatever, could potentially be useful
|
if(entity instanceof TileEntityLockableBase) { //annoying accommodations for the filing cabinet, but whatever, could potentially be useful
|
||||||
if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit))
|
if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit)) {
|
||||||
return false;
|
return false;
|
||||||
else if(!player.isSneaking() && ((TileEntityLockableBase) entity).canAccess(player)) {
|
} else if(!player.isSneaking() && ((TileEntityLockableBase) entity).canAccess(player)) {
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -99,6 +99,7 @@ public class BlockDecoContainer extends BlockDecoModel implements ITileEntityPro
|
|||||||
|
|
||||||
if(itemstack.hasTagCompound()) {
|
if(itemstack.hasTagCompound()) {
|
||||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||||
|
}
|
||||||
|
|
||||||
float f3 = 0.05F;
|
float f3 = 0.05F;
|
||||||
entityitem.motionX = (float) rand.nextGaussian() * f3;
|
entityitem.motionX = (float) rand.nextGaussian() * f3;
|
||||||
@ -107,7 +108,6 @@ public class BlockDecoContainer extends BlockDecoModel implements ITileEntityPro
|
|||||||
world.spawnEntityInWorld(entityitem);
|
world.spawnEntityInWorld(entityitem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
world.func_147453_f(x, y, z, block);
|
world.func_147453_f(x, y, z, block);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,159 +0,0 @@
|
|||||||
package com.hbm.blocks.generic;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityStructureMarker;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
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.AxisAlignedBB;
|
|
||||||
import net.minecraft.util.ChatComponentText;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
|
||||||
import net.minecraft.util.Vec3;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockMarker extends BlockContainer {
|
|
||||||
|
|
||||||
public BlockMarker(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityStructureMarker();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRenderType() {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean func_150107_m(World p_150107_1_, int p_150107_2_, int p_150107_3_, int p_150107_4_) {
|
|
||||||
if(World.doesBlockHaveSolidTopSurface(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
Block block = p_150107_1_.getBlock(p_150107_2_, p_150107_3_, p_150107_4_);
|
|
||||||
return block.canPlaceTorchOnTop(p_150107_1_, p_150107_2_, p_150107_3_, p_150107_4_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) {
|
|
||||||
return func_150107_m(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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, 6, 2);
|
|
||||||
}
|
|
||||||
if(i == 1) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 7, 2);
|
|
||||||
}
|
|
||||||
if(i == 2) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 8, 2);
|
|
||||||
}
|
|
||||||
if(i == 3) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 9, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {
|
|
||||||
super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_);
|
|
||||||
|
|
||||||
if(p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_) == 0) {
|
|
||||||
this.onBlockAdded(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) {
|
|
||||||
this.func_150108_b(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, p_149695_5_);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean func_150108_b(World p_150108_1_, int p_150108_2_, int p_150108_3_, int p_150108_4_, Block p_150108_5_) {
|
|
||||||
if(this.func_150109_e(p_150108_1_, p_150108_2_, p_150108_3_, p_150108_4_)) {
|
|
||||||
boolean flag = false;
|
|
||||||
|
|
||||||
if(!this.func_150107_m(p_150108_1_, p_150108_2_, p_150108_3_ - 1, p_150108_4_)) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flag) {
|
|
||||||
this.dropBlockAsItem(p_150108_1_, p_150108_2_, p_150108_3_, p_150108_4_, p_150108_1_.getBlockMetadata(p_150108_2_, p_150108_3_, p_150108_4_), 0);
|
|
||||||
p_150108_1_.setBlockToAir(p_150108_2_, p_150108_3_, p_150108_4_);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean func_150109_e(World p_150109_1_, int p_150109_2_, int p_150109_3_, int p_150109_4_) {
|
|
||||||
if(!this.canPlaceBlockAt(p_150109_1_, p_150109_2_, p_150109_3_, p_150109_4_)) {
|
|
||||||
if(p_150109_1_.getBlock(p_150109_2_, p_150109_3_, p_150109_4_) == this) {
|
|
||||||
this.dropBlockAsItem(p_150109_1_, p_150109_2_, p_150109_3_, p_150109_4_, p_150109_1_.getBlockMetadata(p_150109_2_, p_150109_3_, p_150109_4_), 0);
|
|
||||||
p_150109_1_.setBlockToAir(p_150109_2_, p_150109_3_, p_150109_4_);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, Vec3 p_149731_5_, Vec3 p_149731_6_) {
|
|
||||||
float f = 0.15F;
|
|
||||||
f = 0.1F;
|
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f);
|
|
||||||
|
|
||||||
return super.collisionRayTrace(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_, p_149731_5_, p_149731_6_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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) {
|
|
||||||
int i = ((TileEntityStructureMarker) world.getTileEntity(x, y, z)).type + 1;
|
|
||||||
if(i > 2) i -= 3;
|
|
||||||
if(i == 0) player.addChatMessage(new ChatComponentText("[Structure Marker] Set template: Nuclear Reactor"));
|
|
||||||
if(i == 1) player.addChatMessage(new ChatComponentText("[Structure Marker] Set template: Watz Power Plant"));
|
|
||||||
if(i == 2) player.addChatMessage(new ChatComponentText("[Structure Marker] Set template: Fusionary Watz Plant"));
|
|
||||||
return true;
|
|
||||||
} else if(!player.isSneaking()) {
|
|
||||||
if(world.getTileEntity(x, y, z) != null && world.getTileEntity(x, y, z) instanceof TileEntityStructureMarker) {
|
|
||||||
((TileEntityStructureMarker) world.getTileEntity(x, y, z)).type++;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -127,7 +127,7 @@ public class BlockOre extends Block {
|
|||||||
case 23:
|
case 23:
|
||||||
return Item.getItemFromBlock(ModBlocks.fusion_conductor);
|
return Item.getItemFromBlock(ModBlocks.fusion_conductor);
|
||||||
case 24:
|
case 24:
|
||||||
return Item.getItemFromBlock(ModBlocks.reactor_computer);
|
return Item.getItemFromBlock(ModBlocks.pwr_fuel);
|
||||||
case 25:
|
case 25:
|
||||||
return Item.getItemFromBlock(ModBlocks.machine_diesel);
|
return Item.getItemFromBlock(ModBlocks.machine_diesel);
|
||||||
case 26:
|
case 26:
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import net.minecraft.network.Packet;
|
|||||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockPedestal extends BlockContainer {
|
public class BlockPedestal extends BlockContainer {
|
||||||
@ -63,6 +64,12 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
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(world.isRemote) return true;
|
||||||
|
|||||||
@ -8,11 +8,14 @@ import com.hbm.handler.radiation.ChunkRadiationManager;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.potion.HbmPotion;
|
import com.hbm.potion.HbmPotion;
|
||||||
|
import com.hbm.render.icon.RGBMutatorInterpolatedComponentRemap;
|
||||||
|
import com.hbm.render.icon.TextureAtlasSpriteMutatable;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
@ -20,12 +23,17 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockSellafield extends BlockHazard {
|
public class BlockSellafield extends BlockHazard {
|
||||||
|
|
||||||
//Sellafite blocks should probably be entirely metadata, but removing them now might mess with shit
|
@SideOnly(Side.CLIENT)
|
||||||
//...Ah, fuck it! Noone cares anyway.
|
protected IIcon[][] icons;
|
||||||
|
|
||||||
|
public static final int SELLAFITE_LEVELS = 6;
|
||||||
|
public static final int TEXTURE_VARIANTS = 4;
|
||||||
|
|
||||||
public BlockSellafield(Material mat) {
|
public BlockSellafield(Material mat) {
|
||||||
super(mat);
|
super(mat);
|
||||||
this.setCreativeTab(MainRegistry.blockTab);
|
this.setCreativeTab(MainRegistry.blockTab);
|
||||||
@ -57,10 +65,6 @@ public class BlockSellafield extends BlockHazard {
|
|||||||
|
|
||||||
@Override public void onBlockAdded(World world, int x, int y, int z) { }
|
@Override public void onBlockAdded(World world, int x, int y, int z) { }
|
||||||
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
protected IIcon[] icons;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int meta) {
|
public int damageDropped(int meta) {
|
||||||
return meta;
|
return meta;
|
||||||
@ -69,24 +73,62 @@ public class BlockSellafield extends BlockHazard {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||||
for(byte i = 0; i < 6; i++) {
|
for(byte i = 0; i < SELLAFITE_LEVELS; i++) {
|
||||||
list.add(new ItemStack(item, 1, i));
|
list.add(new ItemStack(item, 1, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister reg) {
|
||||||
super.registerBlockIcons(iconRegister);
|
super.registerBlockIcons(reg);
|
||||||
icons = new IIcon[6];
|
icons = new IIcon[SELLAFITE_LEVELS][TEXTURE_VARIANTS];
|
||||||
|
String[] names = new String[] {
|
||||||
|
RefStrings.MODID + ":sellafield_slaked",
|
||||||
|
RefStrings.MODID + ":sellafield_slaked_1",
|
||||||
|
RefStrings.MODID + ":sellafield_slaked_2",
|
||||||
|
RefStrings.MODID + ":sellafield_slaked_3"
|
||||||
|
};
|
||||||
|
|
||||||
for(byte i = 0; i < 6; i++)
|
if(reg instanceof TextureMap) {
|
||||||
icons[i] = iconRegister.registerIcon(RefStrings.MODID + ":sellafield_" + i);
|
TextureMap map = (TextureMap) reg;
|
||||||
|
|
||||||
|
int[][] colors = new int[][] {
|
||||||
|
{0x4C7939, 0x41463F},
|
||||||
|
{0x418223, 0x3E443B},
|
||||||
|
{0x338C0E, 0x3B5431},
|
||||||
|
{0x1C9E00, 0x394733},
|
||||||
|
{0x02B200, 0x37492F},
|
||||||
|
{0x00D300, 0x324C26}
|
||||||
|
};
|
||||||
|
|
||||||
|
for(int level = 0; level < SELLAFITE_LEVELS; level++) {
|
||||||
|
int[] tint = colors[level];
|
||||||
|
|
||||||
|
for(int subtype = 0; subtype < TEXTURE_VARIANTS; subtype++) {
|
||||||
|
String texName = names[subtype];
|
||||||
|
String placeholderName = texName + "-" + level + "-" + subtype;
|
||||||
|
TextureAtlasSpriteMutatable mutableIcon = new TextureAtlasSpriteMutatable(placeholderName, new RGBMutatorInterpolatedComponentRemap(0x858384, 0x434343, tint[0], tint[1])).setBlockAtlas();
|
||||||
|
map.setTextureEntry(placeholderName, mutableIcon);
|
||||||
|
icons[level][subtype] = mutableIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
long l = (long) (x * 3129871) ^ (long)y * 116129781L ^ (long)z;
|
||||||
|
l = l * l * 42317861L + l * 11L;
|
||||||
|
int i = (int)(l >> 16 & 3L);
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
return icons[(int)(Math.abs(meta) % SELLAFITE_LEVELS)][(int)(Math.abs(i) % TEXTURE_VARIANTS)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int meta) {
|
public IIcon getIcon(int side, int meta) {
|
||||||
return this.icons[meta % this.icons.length];
|
return this.icons[(int) Math.abs(meta) % this.icons.length][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
105
src/main/java/com/hbm/blocks/generic/BlockSellafieldOre.java
Normal file
105
src/main/java/com/hbm/blocks/generic/BlockSellafieldOre.java
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.IBlockMultiPass;
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.render.block.RenderBlockMultipass;
|
||||||
|
|
||||||
|
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.init.Items;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
public class BlockSellafieldOre extends BlockSellafieldSlaked implements IBlockMultiPass {
|
||||||
|
|
||||||
|
public BlockSellafieldOre(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister reg) {
|
||||||
|
this.blockIcon = reg.registerIcon(this.getTextureName());
|
||||||
|
super.registerBlockIcons(reg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType() {
|
||||||
|
return IBlockMultiPass.getRenderType();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
if(RenderBlockMultipass.currentPass == 1) return this.blockIcon;
|
||||||
|
return super.getIcon(world, x, y, z, side);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(int side, int meta) {
|
||||||
|
if(RenderBlockMultipass.currentPass == 1) return this.blockIcon;
|
||||||
|
return icons[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
||||||
|
if(RenderBlockMultipass.currentPass == 1) return 0xffffff;
|
||||||
|
return super.colorMultiplier(world, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPasses() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderItemMulti() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
if(this == ModBlocks.ore_sellafield_diamond) return Items.diamond;
|
||||||
|
if(this == ModBlocks.ore_sellafield_emerald) return Items.emerald;
|
||||||
|
return Item.getItemFromBlock(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int quantityDropped(Random rand) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int quantityDroppedWithBonus(int fortune, Random rand) {
|
||||||
|
if(fortune > 0 && Item.getItemFromBlock(this) != this.getItemDropped(0, rand, fortune)) {
|
||||||
|
int j = rand.nextInt(fortune + 2) - 1;
|
||||||
|
if(j < 0) j = 0;
|
||||||
|
return this.quantityDropped(rand) * (j + 1);
|
||||||
|
} else {
|
||||||
|
return this.quantityDropped(rand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Random rand = new Random();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getExpDrop(IBlockAccess world, int meta, int fortune) {
|
||||||
|
if(this.getItemDropped(meta, rand, fortune) != Item.getItemFromBlock(this)) {
|
||||||
|
int j1 = 0;
|
||||||
|
|
||||||
|
if(this == ModBlocks.ore_sellafield_diamond) j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||||
|
if(this == ModBlocks.ore_sellafield_emerald) j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||||
|
|
||||||
|
return j1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
|
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.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
public class BlockSellafieldSlaked extends Block {
|
||||||
|
|
||||||
|
public IIcon[] icons;
|
||||||
|
|
||||||
|
public BlockSellafieldSlaked(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
long l = (long) (x * 3129871) ^ (long)y * 116129781L ^ (long)z;
|
||||||
|
l = l * l * 42317861L + l * 11L;
|
||||||
|
int i = (int)(l >> 16 & 3L);
|
||||||
|
return icons[(int)(Math.abs(i) % icons.length)];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(int side, int meta) {
|
||||||
|
return icons[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister reg) {
|
||||||
|
icons = new IIcon[4];
|
||||||
|
icons[0] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked");
|
||||||
|
icons[1] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked_1");
|
||||||
|
icons[2] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked_2");
|
||||||
|
icons[3] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked_3");
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
return Color.HSBtoRGB(0F, 0F, 1F - meta / 15F);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,23 +1,15 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
import api.hbm.fluid.IFluidConnectorBlock;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
public class BlockPillar extends Block implements IFluidConnectorBlock {
|
public class BlockPillar extends Block {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconTop;
|
private IIcon iconTop;
|
||||||
@ -39,14 +31,9 @@ public class BlockPillar extends Block implements IFluidConnectorBlock {
|
|||||||
|
|
||||||
public Block setBlockTextureName(String name) {
|
public Block setBlockTextureName(String name) {
|
||||||
|
|
||||||
if(textureTop.isEmpty())
|
if(textureTop.isEmpty()) textureTop = name;
|
||||||
textureTop = name;
|
if(textureAlt.isEmpty()) textureAlt = name;
|
||||||
|
|
||||||
if(textureAlt.isEmpty())
|
|
||||||
textureAlt = name;
|
|
||||||
|
|
||||||
this.textureName = name;
|
this.textureName = name;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,37 +49,6 @@ public class BlockPillar extends Block implements IFluidConnectorBlock {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata) {
|
public IIcon getIcon(int side, int metadata) {
|
||||||
|
|
||||||
if(this == ModBlocks.reactor_element && metadata == 1)
|
|
||||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.iconAlt);
|
|
||||||
|
|
||||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
|
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
|
||||||
|
|
||||||
if(this != ModBlocks.reactor_element)
|
|
||||||
return super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
|
|
||||||
|
|
||||||
if(player.isSneaking())
|
|
||||||
{
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 0) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 1, 3);
|
|
||||||
} else {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canConnect(FluidType type, IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
|
||||||
if(this != ModBlocks.reactor_conductor) return false;
|
|
||||||
return type == Fluids.WATER || type == Fluids.COOLANT || type == Fluids.STEAM || type == Fluids.HOTSTEAM || type == Fluids.SUPERHOTSTEAM || type == Fluids.ULTRAHOTSTEAM;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,63 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
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.item.ItemStack;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockRotatable extends Block {
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon iconFront;
|
|
||||||
|
|
||||||
public BlockRotatable(Material p_i45394_1_) {
|
|
||||||
super(p_i45394_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
|
|
||||||
if(this == ModBlocks.reactor_ejector) {
|
|
||||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":reactor_ejector");
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":brick_concrete");
|
|
||||||
}
|
|
||||||
if(this == ModBlocks.reactor_inserter) {
|
|
||||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":reactor_inserter");
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":brick_concrete");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int metadata) {
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class DummyBlockDrill extends DummyOldBase {
|
|
||||||
|
|
||||||
public DummyBlockDrill(Material p_i45386_1_, boolean port) {
|
|
||||||
super(p_i45386_1_, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityDummy();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public Item getItem(World world, int x, int y, int z)
|
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(ModBlocks.machine_drill);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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())
|
|
||||||
{
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
if(te != null && te instanceof TileEntityDummy) {
|
|
||||||
int a = ((TileEntityDummy)te).targetX;
|
|
||||||
int b = ((TileEntityDummy)te).targetY;
|
|
||||||
int c = ((TileEntityDummy)te).targetZ;
|
|
||||||
|
|
||||||
TileEntityMachineMiningDrill entity = (TileEntityMachineMiningDrill) world.getTileEntity(a, b, c);
|
|
||||||
if(entity != null)
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,131 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineCMBFactory;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class MachineCMBFactory extends BlockContainer {
|
|
||||||
|
|
||||||
private final Random field_149933_a = new Random();
|
|
||||||
private static boolean keepInventory;
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon iconTop;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_cmb_top");
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_cmb_side");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int metadata) {
|
|
||||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(ModBlocks.machine_combine_factory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MachineCMBFactory(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityMachineCMBFactory();
|
|
||||||
}
|
|
||||||
|
|
||||||
@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())
|
|
||||||
{
|
|
||||||
TileEntityMachineCMBFactory entity = (TileEntityMachineCMBFactory) world.getTileEntity(x, y, z);
|
|
||||||
if(entity != null)
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
|
||||||
{
|
|
||||||
if (!keepInventory)
|
|
||||||
{
|
|
||||||
TileEntityMachineCMBFactory tileentityfurnace = (TileEntityMachineCMBFactory)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
|
||||||
|
|
||||||
if (tileentityfurnace != null)
|
|
||||||
{
|
|
||||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
|
||||||
{
|
|
||||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
|
||||||
|
|
||||||
if (itemstack != null)
|
|
||||||
{
|
|
||||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
|
|
||||||
while (itemstack.stackSize > 0)
|
|
||||||
{
|
|
||||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
|
||||||
|
|
||||||
if (j1 > itemstack.stackSize)
|
|
||||||
{
|
|
||||||
j1 = itemstack.stackSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
itemstack.stackSize -= j1;
|
|
||||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
|
||||||
|
|
||||||
if (itemstack.hasTagCompound())
|
|
||||||
{
|
|
||||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
|
||||||
}
|
|
||||||
|
|
||||||
float f3 = 0.05F;
|
|
||||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
|
||||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
|
||||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
|
||||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineCoal;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public class MachineCoal extends BlockContainer {
|
|
||||||
|
|
||||||
public MachineCoal(boolean blockState) {
|
|
||||||
super(Material.iron);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityMachineCoal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,232 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.handler.MultiblockHandler;
|
|
||||||
import com.hbm.interfaces.IMultiblock;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class MachineMiningDrill extends BlockContainer implements IMultiblock {
|
|
||||||
|
|
||||||
public MachineMiningDrill(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityMachineMiningDrill();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
|
||||||
return Item.getItemFromBlock(ModBlocks.machine_drill);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRenderType() {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@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, 5, 2);
|
|
||||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.drillDimension)) {
|
|
||||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.drillDimension, ModBlocks.dummy_block_drill);
|
|
||||||
|
|
||||||
//
|
|
||||||
DummyBlockDrill.safeBreak = true;
|
|
||||||
world.setBlock(x + 1, y, z, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te = world.getTileEntity(x + 1, y, z);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
world.setBlock(x - 1, y, z, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te2 = world.getTileEntity(x - 1, y, z);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
DummyBlockDrill.safeBreak = false;
|
|
||||||
//
|
|
||||||
|
|
||||||
} else
|
|
||||||
world.func_147480_a(x, y, z, true);
|
|
||||||
}
|
|
||||||
if (i == 1) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
|
||||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.drillDimension)) {
|
|
||||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.drillDimension, ModBlocks.dummy_block_drill);
|
|
||||||
|
|
||||||
//
|
|
||||||
DummyBlockDrill.safeBreak = true;
|
|
||||||
world.setBlock(x, y, z + 1, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z + 1);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
world.setBlock(x, y, z - 1, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te2 = world.getTileEntity(x, y, z - 1);
|
|
||||||
if(te2 instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
DummyBlockDrill.safeBreak = false;
|
|
||||||
//
|
|
||||||
|
|
||||||
} else
|
|
||||||
world.func_147480_a(x, y, z, true);
|
|
||||||
}
|
|
||||||
if (i == 2) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
|
||||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.drillDimension)) {
|
|
||||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.drillDimension, ModBlocks.dummy_block_drill);
|
|
||||||
|
|
||||||
//
|
|
||||||
DummyBlockDrill.safeBreak = true;
|
|
||||||
world.setBlock(x + 1, y, z, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te = world.getTileEntity(x + 1, y, z);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
world.setBlock(x - 1, y, z, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te2 = world.getTileEntity(x - 1, y, z);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
DummyBlockDrill.safeBreak = false;
|
|
||||||
//
|
|
||||||
|
|
||||||
} else
|
|
||||||
world.func_147480_a(x, y, z, true);
|
|
||||||
}
|
|
||||||
if (i == 3) {
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
|
||||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.drillDimension)) {
|
|
||||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.drillDimension, ModBlocks.dummy_block_drill);
|
|
||||||
|
|
||||||
//
|
|
||||||
DummyBlockDrill.safeBreak = true;
|
|
||||||
world.setBlock(x, y, z + 1, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z + 1);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
world.setBlock(x, y, z - 1, ModBlocks.dummy_port_drill);
|
|
||||||
TileEntity te2 = world.getTileEntity(x, y, z - 1);
|
|
||||||
if(te instanceof TileEntityDummy) {
|
|
||||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
|
||||||
dummy.targetX = x;
|
|
||||||
dummy.targetY = y;
|
|
||||||
dummy.targetZ = z;
|
|
||||||
}
|
|
||||||
DummyBlockDrill.safeBreak = false;
|
|
||||||
//
|
|
||||||
|
|
||||||
} else
|
|
||||||
world.func_147480_a(x, y, z, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private final Random field_149933_a = new Random();
|
|
||||||
private static boolean keepInventory;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
|
||||||
{
|
|
||||||
if (!keepInventory)
|
|
||||||
{
|
|
||||||
ISidedInventory tileentityfurnace = (ISidedInventory)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
|
||||||
|
|
||||||
if (tileentityfurnace != null)
|
|
||||||
{
|
|
||||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
|
||||||
{
|
|
||||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
|
||||||
|
|
||||||
if (itemstack != null)
|
|
||||||
{
|
|
||||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
|
|
||||||
while (itemstack.stackSize > 0)
|
|
||||||
{
|
|
||||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
|
||||||
|
|
||||||
if (j1 > itemstack.stackSize)
|
|
||||||
{
|
|
||||||
j1 = itemstack.stackSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
itemstack.stackSize -= j1;
|
|
||||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
|
||||||
|
|
||||||
if (itemstack.hasTagCompound())
|
|
||||||
{
|
|
||||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
|
||||||
}
|
|
||||||
|
|
||||||
float f3 = 0.05F;
|
|
||||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
|
||||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
|
||||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
|
||||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class ReactorCore extends BlockContainer {
|
|
||||||
|
|
||||||
public boolean keepInventory = false;
|
|
||||||
public Random field_149933_a = new Random();
|
|
||||||
|
|
||||||
public ReactorCore(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,158 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
|
||||||
|
|
||||||
import api.hbm.fluid.IFluidConnectorBlock;
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ChatComponentText;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
public class ReactorHatch extends Block implements IFluidConnectorBlock {
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon iconFront;
|
|
||||||
|
|
||||||
public ReactorHatch(Material p_i45394_1_) {
|
|
||||||
super(p_i45394_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":reactor_hatch");
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":brick_concrete");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int metadata) {
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z) {
|
|
||||||
super.onBlockAdded(world, x, y, z);
|
|
||||||
//this.setDefaultDirection(world, x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 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())
|
|
||||||
{
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 2)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x, y, z + 2) instanceof TileEntityMachineReactorLarge)
|
|
||||||
{
|
|
||||||
if(((TileEntityMachineReactorLarge)world.getTileEntity(x, y, z + 2)).checkBody())
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z + 2);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 3)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x, y, z - 2) instanceof TileEntityMachineReactorLarge)
|
|
||||||
{
|
|
||||||
if(((TileEntityMachineReactorLarge)world.getTileEntity(x, y, z - 2)).checkBody())
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z - 2);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 4)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x + 2, y, z) instanceof TileEntityMachineReactorLarge)
|
|
||||||
{
|
|
||||||
if(((TileEntityMachineReactorLarge)world.getTileEntity(x + 2, y, z)).checkBody())
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x + 2, y, z);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 5)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x - 2, y, z) instanceof TileEntityMachineReactorLarge)
|
|
||||||
{
|
|
||||||
if(((TileEntityMachineReactorLarge)world.getTileEntity(x - 2, y, z)).checkBody())
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x - 2, y, z);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Nuclear Reactor Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canConnect(FluidType type, IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
|
||||||
return type == Fluids.WATER || type == Fluids.COOLANT || type == Fluids.STEAM || type == Fluids.HOTSTEAM || type == Fluids.SUPERHOTSTEAM || type == Fluids.ULTRAHOTSTEAM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityWatzCore;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class WatzCore extends BlockContainer {
|
|
||||||
|
|
||||||
public WatzCore(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityWatzCore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,158 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityWatzCore;
|
|
||||||
|
|
||||||
import api.hbm.fluid.IFluidConnectorBlock;
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ChatComponentText;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
public class WatzHatch extends Block implements IFluidConnectorBlock {
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon iconFront;
|
|
||||||
|
|
||||||
public WatzHatch(Material p_i45394_1_) {
|
|
||||||
super(p_i45394_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":watz_hatch");
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":reinforced_brick");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int metadata) {
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z) {
|
|
||||||
super.onBlockAdded(world, x, y, z);
|
|
||||||
//this.setDefaultDirection(world, x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 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())
|
|
||||||
{
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 2)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x, y, z + 3) instanceof TileEntityWatzCore)
|
|
||||||
{
|
|
||||||
if(((TileEntityWatzCore)world.getTileEntity(x, y, z + 3)).isStructureValid(world))
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z + 3);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 3)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x, y, z - 3) instanceof TileEntityWatzCore)
|
|
||||||
{
|
|
||||||
if(((TileEntityWatzCore)world.getTileEntity(x, y, z - 3)).isStructureValid(world))
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z - 3);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 4)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x + 3, y, z) instanceof TileEntityWatzCore)
|
|
||||||
{
|
|
||||||
if(((TileEntityWatzCore)world.getTileEntity(x + 3, y, z)).isStructureValid(world))
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x + 3, y, z);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(world.getBlockMetadata(x, y, z) == 5)
|
|
||||||
{
|
|
||||||
if(world.getTileEntity(x - 3, y, z) instanceof TileEntityWatzCore)
|
|
||||||
{
|
|
||||||
if(((TileEntityWatzCore)world.getTileEntity(x - 3, y, z)).isStructureValid(world))
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x - 3, y, z);
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Structure not valid!"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.addChatMessage(new ChatComponentText("[Watz Power Plant] Error: Reactor Core not found!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canConnect(FluidType type, IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
|
||||||
return type == Fluids.WATZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -158,8 +158,6 @@ public abstract class BlockRailWaypointSystem extends BlockDummyable implements
|
|||||||
currentPos = nextNode;
|
currentPos = nextNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!world.isRemote) PacketDispatcher.wrapper.sendToAllAround(new PlayerInformPacket(ChatBuilder.start("" + distRemaining).color(EnumChatFormatting.RED).flush(), 1), new TargetPoint(world.provider.dimensionId, x, y, z, 50));
|
|
||||||
|
|
||||||
info.overshoot = distRemaining;
|
info.overshoot = distRemaining;
|
||||||
info.pos = new BlockPos(currentPos.xCoord, currentPos.yCoord, currentPos.zCoord);
|
info.pos = new BlockPos(currentPos.xCoord, currentPos.yCoord, currentPos.zCoord);
|
||||||
|
|
||||||
|
|||||||
@ -22,9 +22,11 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRenderBlock {
|
public class RailStandardCurveBase extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||||
|
|
||||||
public RailStandardCurve() {
|
protected int width = 4;
|
||||||
|
|
||||||
|
public RailStandardCurveBase() {
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,8 +61,8 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
|||||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
double turnRadius = 4D;
|
double turnRadius = width;
|
||||||
double axisDist = 4.5D;
|
double axisDist = width + 0.5D;
|
||||||
|
|
||||||
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||||
double axisX = cX + 0.5 + dir.offsetX * 0.5 + rot.offsetX * axisDist;
|
double axisX = cX + 0.5 + dir.offsetX * 0.5 + rot.offsetX * axisDist;
|
||||||
@ -105,7 +107,7 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
|||||||
double angleOvershoot = effAngle - 90D;
|
double angleOvershoot = effAngle - 90D;
|
||||||
moveAngle -= angleOvershoot;
|
moveAngle -= angleOvershoot;
|
||||||
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
||||||
info.dist(lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX - dir.offsetX * 4 + rot.offsetX * 5, y, cZ - dir.offsetZ * 4 + rot.offsetZ * 5)).yaw((float) moveAngle);
|
info.dist(lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX - dir.offsetX * width + rot.offsetX * (width + 1), y, cZ - dir.offsetZ * width + rot.offsetZ * (width + 1))).yaw((float) moveAngle);
|
||||||
return Vec3.createVectorHelper(axisX - dir.offsetX * turnRadius, y + 0.1875, axisZ - dir.offsetZ * turnRadius);
|
return Vec3.createVectorHelper(axisX - dir.offsetX * turnRadius, y + 0.1875, axisZ - dir.offsetZ * turnRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +132,7 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[] {0, 0, 4, 0, 4, 0};
|
return new int[] {0, 0, width, 0, width, 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -208,9 +210,10 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||||
GL11.glScaled(0.2, 0.2, 0.2);
|
GL11.glScaled(0.3, 0.3, 0.3);
|
||||||
GL11.glTranslated(2.5, -0.0625, -1.5);
|
GL11.glRotated(45, 0, 1, 0);
|
||||||
GL11.glRotated(90, 0, 1, 0);
|
GL11.glRotated(60, 1, 0, 0);
|
||||||
|
GL11.glTranslated(2, 0, 2);
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, 0, false);
|
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, 0, false);
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
@ -1,239 +0,0 @@
|
|||||||
package com.hbm.blocks.rail;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
|
||||||
import com.hbm.lib.Library;
|
|
||||||
import com.hbm.main.ResourceManager;
|
|
||||||
import com.hbm.render.util.ObjUtil;
|
|
||||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
|
||||||
|
|
||||||
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.Tessellator;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
|
||||||
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 RailStandardCurveWide extends BlockDummyable implements IRailNTM, IRenderBlock {
|
|
||||||
|
|
||||||
public RailStandardCurveWide() {
|
|
||||||
super(Material.iron);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRenderType() {
|
|
||||||
return renderID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Vec3 getSnappingPos(World world, int x, int y, int z, double trainX, double trainY, double trainZ) {
|
|
||||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, 0, 0, 0, 0, new RailContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) {
|
|
||||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Very simple function determining the snapping position and adding the motion value to it, if desired. */
|
|
||||||
public Vec3 snapAndMove(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) {
|
|
||||||
int[] pos = this.findCore(world, x, y, z);
|
|
||||||
if(pos == null) return Vec3.createVectorHelper(trainX, trainY, trainZ);
|
|
||||||
int cX = pos[0];
|
|
||||||
int cY = pos[1];
|
|
||||||
int cZ = pos[2];
|
|
||||||
int meta = world.getBlockMetadata(cX, cY, cZ) - this.offset;
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
|
||||||
|
|
||||||
double turnRadius = 6D;
|
|
||||||
double axisDist = 6.5D;
|
|
||||||
|
|
||||||
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
|
||||||
double axisX = cX + 0.5 + dir.offsetX * 0.5 + rot.offsetX * axisDist;
|
|
||||||
double axisZ = cZ + 0.5 + dir.offsetZ * 0.5 + rot.offsetZ * axisDist;
|
|
||||||
|
|
||||||
Vec3 dist = Vec3.createVectorHelper(vec.xCoord - axisX, 0, vec.zCoord - axisZ);
|
|
||||||
dist = dist.normalize();
|
|
||||||
dist.xCoord *= turnRadius;
|
|
||||||
dist.zCoord *= turnRadius;
|
|
||||||
|
|
||||||
double moveAngle = Math.atan2(motionX, motionZ) * 180D / Math.PI + 90;
|
|
||||||
|
|
||||||
if(speed == 0) {
|
|
||||||
info.dist(0).pos(new BlockPos(x, y, z)).yaw((float) moveAngle);
|
|
||||||
return Vec3.createVectorHelper(axisX + dist.xCoord, y, axisZ + dist.zCoord);
|
|
||||||
}
|
|
||||||
|
|
||||||
double angleDeg = Math.atan2(dist.xCoord, dist.zCoord) * 180D / Math.PI + 90;
|
|
||||||
if(dir == Library.NEG_X) angleDeg -= 90;
|
|
||||||
if(dir == Library.POS_X) angleDeg += 90;
|
|
||||||
if(dir == Library.POS_Z) angleDeg += 180;
|
|
||||||
angleDeg = MathHelper.wrapAngleTo180_double(angleDeg);
|
|
||||||
double length90Deg = turnRadius * Math.PI / 2D;
|
|
||||||
double angularChange = speed / length90Deg * 90D;
|
|
||||||
|
|
||||||
ForgeDirection moveDir = ForgeDirection.UNKNOWN;
|
|
||||||
|
|
||||||
if(Math.abs(motionX) > Math.abs(motionZ)) {
|
|
||||||
moveDir = motionX > 0 ? Library.POS_X : Library.NEG_X;
|
|
||||||
} else {
|
|
||||||
moveDir = motionZ > 0 ? Library.POS_Z : Library.NEG_Z;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(moveDir == dir || moveDir == rot.getOpposite()) {
|
|
||||||
angularChange *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
double effAngle = angleDeg + angularChange;
|
|
||||||
moveAngle += angularChange;
|
|
||||||
|
|
||||||
if(effAngle > 90) {
|
|
||||||
double angleOvershoot = effAngle - 90D;
|
|
||||||
moveAngle -= angleOvershoot;
|
|
||||||
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
|
||||||
info.dist(lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX - dir.offsetX * 6 + rot.offsetX * 7, y, cZ - dir.offsetZ * 6 + rot.offsetZ * 7)).yaw((float) moveAngle);
|
|
||||||
return Vec3.createVectorHelper(axisX - dir.offsetX * turnRadius, y + 0.1875, axisZ - dir.offsetZ * turnRadius);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(effAngle < 0) {
|
|
||||||
double angleOvershoot = -effAngle;
|
|
||||||
moveAngle -= angleOvershoot;
|
|
||||||
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
|
||||||
info.dist(-lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX + dir.offsetX , y, cZ + dir.offsetZ)).yaw((float) moveAngle);
|
|
||||||
return Vec3.createVectorHelper(axisX - rot.offsetX * turnRadius, y + 0.1875, axisZ -rot.offsetZ * turnRadius);
|
|
||||||
}
|
|
||||||
|
|
||||||
double radianChange = angularChange * Math.PI / 180D;
|
|
||||||
dist.rotateAroundY((float) radianChange);
|
|
||||||
|
|
||||||
return Vec3.createVectorHelper(axisX + dist.xCoord, y + 0.1875, axisZ + dist.zCoord);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TrackGauge getGauge(World world, int x, int y, int z) {
|
|
||||||
return TrackGauge.STANDARD;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getDimensions() {
|
|
||||||
return new int[] {0, 0, 6, 0, 6, 0};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getOffset() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
|
||||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
|
||||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
|
||||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
|
||||||
|
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
|
||||||
dir = dir.getOpposite();
|
|
||||||
|
|
||||||
int dX = dir.offsetX;
|
|
||||||
int dZ = dir.offsetZ;
|
|
||||||
int rX = rot.offsetX;
|
|
||||||
int rZ = rot.offsetZ;
|
|
||||||
|
|
||||||
return world.getBlock(x + dX, y, z + dZ).isReplaceable(world, x + dX, y, z + dZ) &&
|
|
||||||
world.getBlock(x + rX, y, z + rZ).isReplaceable(world, x + rX, y, z + rZ) &&
|
|
||||||
world.getBlock(x + dX + rX, y, z + dZ + rZ).isReplaceable(world, x + dX + rX, y, z + dZ + rZ) &&
|
|
||||||
world.getBlock(x + dX + rX * 2, y, z + dZ + rZ * 2).isReplaceable(world, x + dX + rX * 2, y, z + dZ + rZ * 2) &&
|
|
||||||
world.getBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ).isReplaceable(world, x + dX * 2 + rX, y, z + dZ * 2 + rZ) &&
|
|
||||||
world.getBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2).isReplaceable(world, x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2) &&
|
|
||||||
world.getBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ).isReplaceable(world, x + dX * 3 + rX, y, z + dZ * 3 + rZ) &&
|
|
||||||
world.getBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2).isReplaceable(world, x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2) &&
|
|
||||||
world.getBlock(x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3).isReplaceable(world, x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3) &&
|
|
||||||
world.getBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3).isReplaceable(world, x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3) &&
|
|
||||||
world.getBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3).isReplaceable(world, x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3) &&
|
|
||||||
world.getBlock(x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4).isReplaceable(world, x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4) &&
|
|
||||||
world.getBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4).isReplaceable(world, x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
|
||||||
|
|
||||||
BlockDummyable.safeRem = true;
|
|
||||||
|
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
|
||||||
dir = dir.getOpposite();
|
|
||||||
|
|
||||||
int dX = dir.offsetX;
|
|
||||||
int dZ = dir.offsetZ;
|
|
||||||
int rX = rot.offsetX;
|
|
||||||
int rZ = rot.offsetZ;
|
|
||||||
|
|
||||||
world.setBlock(x + dX, y, z + dZ, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 2, y, z + dZ * 2, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + rX, y, z + rZ, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX + rX, y, z + dZ + rZ, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 4 + rX, y, z + dZ * 4 + rZ, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 4 + rX * 2, y, z + dZ * 4 + rZ * 2, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 5 + rX * 2, y, z + dZ * 5 + rZ * 2, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 5 + rX * 3, y, z + dZ * 5 + rZ * 3, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 5 + rX * 4, y, z + dZ * 5 + rZ * 4, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 6 + rX * 4, y, z + dZ * 6 + rZ * 4, this, dir.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 5 + rX * 5, y, z + dZ * 5 + rZ * 5, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 5 + rX * 6, y, z + dZ * 5 + rZ * 6, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 6 + rX * 5, y, z + dZ * 6 + rZ * 5, this, rot.ordinal(), 3);
|
|
||||||
world.setBlock(x + dX * 6 + rX * 6, y, z + dZ * 6 + rZ * 6, this, rot.ordinal(), 3);
|
|
||||||
|
|
||||||
BlockDummyable.safeRem = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
|
||||||
GL11.glScaled(0.12, 0.12, 0.12);
|
|
||||||
GL11.glTranslated(2.5, -0.0625, -3);
|
|
||||||
GL11.glRotated(90, 0, 1, 0);
|
|
||||||
tessellator.startDrawingQuads();
|
|
||||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide, block.getIcon(1, 0), tessellator, 0, false);
|
|
||||||
tessellator.draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
|
||||||
if(meta < 12) return;
|
|
||||||
float rotation = 0;
|
|
||||||
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
|
||||||
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_wide, block.getIcon(1, 0), tessellator, rotation, true);
|
|
||||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
113
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide7.java
Normal file
113
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide7.java
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
package com.hbm.blocks.rail;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
|
import com.hbm.render.util.ObjUtil;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
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 {
|
||||||
|
|
||||||
|
public RailStandardCurveWide7() {
|
||||||
|
super();
|
||||||
|
this.width = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
dir = dir.getOpposite();
|
||||||
|
|
||||||
|
int dX = dir.offsetX;
|
||||||
|
int dZ = dir.offsetZ;
|
||||||
|
int rX = rot.offsetX;
|
||||||
|
int rZ = rot.offsetZ;
|
||||||
|
|
||||||
|
return world.getBlock(x + dX, y, z + dZ).isReplaceable(world, x + dX, y, z + dZ) &&
|
||||||
|
world.getBlock(x + rX, y, z + rZ).isReplaceable(world, x + rX, y, z + rZ) &&
|
||||||
|
world.getBlock(x + dX + rX, y, z + dZ + rZ).isReplaceable(world, x + dX + rX, y, z + dZ + rZ) &&
|
||||||
|
world.getBlock(x + dX + rX * 2, y, z + dZ + rZ * 2).isReplaceable(world, x + dX + rX * 2, y, z + dZ + rZ * 2) &&
|
||||||
|
world.getBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ).isReplaceable(world, x + dX * 2 + rX, y, z + dZ * 2 + rZ) &&
|
||||||
|
world.getBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2).isReplaceable(world, x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2) &&
|
||||||
|
world.getBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ).isReplaceable(world, x + dX * 3 + rX, y, z + dZ * 3 + rZ) &&
|
||||||
|
world.getBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2).isReplaceable(world, x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2) &&
|
||||||
|
world.getBlock(x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3).isReplaceable(world, x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3) &&
|
||||||
|
world.getBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3).isReplaceable(world, x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3) &&
|
||||||
|
world.getBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3).isReplaceable(world, x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3) &&
|
||||||
|
world.getBlock(x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4).isReplaceable(world, x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4) &&
|
||||||
|
world.getBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4).isReplaceable(world, x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
|
||||||
|
BlockDummyable.safeRem = true;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
dir = dir.getOpposite();
|
||||||
|
|
||||||
|
int dX = dir.offsetX;
|
||||||
|
int dZ = dir.offsetZ;
|
||||||
|
int rX = rot.offsetX;
|
||||||
|
int rZ = rot.offsetZ;
|
||||||
|
|
||||||
|
world.setBlock(x + dX, y, z + dZ, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 2, y, z + dZ * 2, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + rX, y, z + rZ, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX + rX, y, z + dZ + rZ, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 4 + rX, y, z + dZ * 4 + rZ, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 4 + rX * 2, y, z + dZ * 4 + rZ * 2, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 5 + rX * 2, y, z + dZ * 5 + rZ * 2, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 5 + rX * 3, y, z + dZ * 5 + rZ * 3, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 5 + rX * 4, y, z + dZ * 5 + rZ * 4, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 6 + rX * 4, y, z + dZ * 6 + rZ * 4, this, dir.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 5 + rX * 5, y, z + dZ * 5 + rZ * 5, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 5 + rX * 6, y, z + dZ * 5 + rZ * 6, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 6 + rX * 5, y, z + dZ * 6 + rZ * 5, this, rot.ordinal(), 3);
|
||||||
|
world.setBlock(x + dX * 6 + rX * 6, y, z + dZ * 6 + rZ * 6, this, rot.ordinal(), 3);
|
||||||
|
|
||||||
|
BlockDummyable.safeRem = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||||
|
GL11.glScaled(0.225, 0.225, 0.225);
|
||||||
|
GL11.glRotated(45, 0, 1, 0);
|
||||||
|
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);
|
||||||
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||||
|
if(meta < 12) return;
|
||||||
|
float rotation = 0;
|
||||||
|
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||||
|
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);
|
||||||
|
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||||
|
}
|
||||||
|
}
|
||||||
148
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide9.java
Normal file
148
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide9.java
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
package com.hbm.blocks.rail;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
|
import com.hbm.render.util.ObjUtil;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
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 {
|
||||||
|
|
||||||
|
public RailStandardCurveWide9() {
|
||||||
|
super();
|
||||||
|
this.width = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
dir = dir.getOpposite();
|
||||||
|
|
||||||
|
int dX = dir.offsetX;
|
||||||
|
int dZ = dir.offsetZ;
|
||||||
|
int rX = rot.offsetX;
|
||||||
|
int rZ = rot.offsetZ;
|
||||||
|
|
||||||
|
int[][] dim = new int[][] {
|
||||||
|
{1, 0},
|
||||||
|
{2, 0},
|
||||||
|
{0, 1},
|
||||||
|
{1, 1},
|
||||||
|
{2, 1},
|
||||||
|
{3, 1},
|
||||||
|
{4, 1},
|
||||||
|
{2, 2},
|
||||||
|
{3, 2},
|
||||||
|
{4, 2},
|
||||||
|
{5, 2},
|
||||||
|
{4, 3},
|
||||||
|
{5, 3},
|
||||||
|
{5, 4},
|
||||||
|
{6, 3},
|
||||||
|
{6, 4},
|
||||||
|
{7, 4},
|
||||||
|
{6, 5},
|
||||||
|
{7, 5},
|
||||||
|
{6, 6},
|
||||||
|
{7, 6},
|
||||||
|
{7, 7},
|
||||||
|
{7, 8},
|
||||||
|
{8, 6},
|
||||||
|
{8, 7},
|
||||||
|
{8, 8},
|
||||||
|
};
|
||||||
|
|
||||||
|
for(int[] array : dim) {
|
||||||
|
if(!world.getBlock(x + dX * array[0] + rX * array[1], y, z + dZ * array[0] + rZ * array[1]).isReplaceable(world, x + dX * array[0] + rX * array[1], y, z + dZ * array[0] + rZ * array[1])) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
|
||||||
|
BlockDummyable.safeRem = true;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
dir = dir.getOpposite();
|
||||||
|
|
||||||
|
int dX = dir.offsetX;
|
||||||
|
int dZ = dir.offsetZ;
|
||||||
|
int rX = rot.offsetX;
|
||||||
|
int rZ = rot.offsetZ;
|
||||||
|
|
||||||
|
int d = dir.ordinal();
|
||||||
|
int r = rot.ordinal();
|
||||||
|
|
||||||
|
int[][] dim = new int[][] {
|
||||||
|
{1, 0, d},
|
||||||
|
{2, 0, d},
|
||||||
|
{0, 1, r},
|
||||||
|
{1, 1, d},
|
||||||
|
{2, 1, d},
|
||||||
|
{3, 1, d},
|
||||||
|
{4, 1, d},
|
||||||
|
{2, 2, r},
|
||||||
|
{3, 2, r},
|
||||||
|
{4, 2, r},
|
||||||
|
{5, 2, d},
|
||||||
|
{4, 3, r},
|
||||||
|
{5, 3, r},
|
||||||
|
{5, 4, r},
|
||||||
|
{6, 3, d},
|
||||||
|
{6, 4, d},
|
||||||
|
{7, 4, d},
|
||||||
|
{6, 5, r},
|
||||||
|
{7, 5, r},
|
||||||
|
{6, 6, r},
|
||||||
|
{7, 6, r},
|
||||||
|
{7, 7, r},
|
||||||
|
{7, 8, r},
|
||||||
|
{8, 6, d},
|
||||||
|
{8, 7, d},
|
||||||
|
{8, 8, d},
|
||||||
|
};
|
||||||
|
|
||||||
|
for(int[] array : dim) {
|
||||||
|
world.setBlock(x + dX * array[0] + rX * array[1], y, z + dZ * array[0] + rZ * array[1], this, array[2], 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockDummyable.safeRem = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||||
|
GL11.glScaled(0.175, 0.175, 0.175);
|
||||||
|
GL11.glRotated(45, 0, 1, 0);
|
||||||
|
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);
|
||||||
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||||
|
if(meta < 12) return;
|
||||||
|
float rotation = 0;
|
||||||
|
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||||
|
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);
|
||||||
|
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -25,6 +25,7 @@ public class CommonConfig {
|
|||||||
public static final String CATEGORY_HAZARD = "14_hazard";
|
public static final String CATEGORY_HAZARD = "14_hazard";
|
||||||
public static final String CATEGORY_STRUCTURES = "15_structures";
|
public static final String CATEGORY_STRUCTURES = "15_structures";
|
||||||
public static final String CATEGORY_POLLUTION = "16_pollution";
|
public static final String CATEGORY_POLLUTION = "16_pollution";
|
||||||
|
public static final String CATEGORY_BIOMES = "17_biomes";
|
||||||
|
|
||||||
public static final String CATEGORY_528 = "528";
|
public static final String CATEGORY_528 = "528";
|
||||||
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";
|
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";
|
||||||
|
|||||||
@ -55,13 +55,8 @@ public class FalloutConfigJSON {
|
|||||||
private static void initDefault() {
|
private static void initDefault() {
|
||||||
|
|
||||||
double woodEffectRange = 65D;
|
double woodEffectRange = 65D;
|
||||||
/* destroy all leaves within the radios, kill all leaves outside of it */
|
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
|
||||||
entries.add(new FalloutEntry() .mB(ModBlocks.waste_leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
|
||||||
|
|
||||||
|
/* petrify all wooden things possible */
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.log) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
entries.add(new FalloutEntry() .mB(Blocks.log) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.log2) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
entries.add(new FalloutEntry() .mB(Blocks.log2) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block).mM(10) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block).mM(10) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
||||||
@ -69,24 +64,38 @@ public class FalloutConfigJSON {
|
|||||||
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.brown_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
entries.add(new FalloutEntry() .mB(Blocks.brown_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
entries.add(new FalloutEntry() .mB(Blocks.planks) .prim(new Triplet(ModBlocks.waste_planks, 0, 1)) .max(woodEffectRange));
|
entries.add(new FalloutEntry() .mB(Blocks.planks) .prim(new Triplet(ModBlocks.waste_planks, 0, 1)) .max(woodEffectRange));
|
||||||
|
/* if it can't be petrified, destroy it */
|
||||||
|
entries.add(new FalloutEntry() .mMa(Material.wood) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
|
/* destroy all leaves within the radios, kill all leaves outside of it */
|
||||||
|
entries.add(new FalloutEntry() .mMa(Material.leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
|
entries.add(new FalloutEntry() .mMa(Material.plants) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
|
entries.add(new FalloutEntry() .mMa(Material.vine) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
|
entries.add(new FalloutEntry() .mB(ModBlocks.waste_leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||||
|
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
||||||
|
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
||||||
|
|
||||||
FalloutEntry stoneCore = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 1, 1)).max(5).sol(true);
|
entries.add(new FalloutEntry().mB(Blocks.mossy_cobblestone).prim(new Triplet(Blocks.coal_ore, 0, 1)));
|
||||||
FalloutEntry stoneInner = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 0, 1)).min(5).max(15).sol(true);
|
entries.add(new FalloutEntry().mB(ModBlocks.ore_nether_uranium).prim(new Triplet(ModBlocks.ore_nether_schrabidium, 0, 1), new Triplet(ModBlocks.ore_nether_uranium_scorched, 0, 99)));
|
||||||
FalloutEntry stoneOuter = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).min(15).max(50).sol(true);
|
|
||||||
|
|
||||||
entries.add(stoneCore.clone().mB(Blocks.stone));
|
Block deepslate = Compat.tryLoadBlock(Compat.MOD_EF, "deepslate");
|
||||||
entries.add(stoneInner.clone().mB(Blocks.stone));
|
Block stone = Compat.tryLoadBlock(Compat.MOD_EF, "stone");
|
||||||
entries.add(stoneOuter.clone().mB(Blocks.stone));
|
|
||||||
entries.add(stoneCore.clone().mB(Blocks.gravel));
|
|
||||||
entries.add(stoneInner.clone().mB(Blocks.gravel));
|
|
||||||
entries.add(stoneOuter.clone().mB(Blocks.gravel));
|
|
||||||
/* recontaminate slaked sellafield */
|
|
||||||
entries.add(stoneCore.clone().mB(ModBlocks.sellafield_slaked));
|
|
||||||
entries.add(stoneInner.clone().mB(ModBlocks.sellafield_slaked));
|
|
||||||
|
|
||||||
entries.add(new FalloutEntry()
|
for(int i = 1; i <= 10; i++) {
|
||||||
.mB(Blocks.grass)
|
int m = 10 - i;
|
||||||
.prim(new Triplet(ModBlocks.waste_earth, 0, 1)));
|
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_diamond, m, 3), new Triplet(ModBlocks.ore_sellafield_emerald, m, 2)) .c(0.5) .max(i * 5).sol(true).mB(Blocks.coal_ore));
|
||||||
|
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_diamond, m, 1)) .c(0.2) .max(i * 5).sol(true).mB(ModBlocks.ore_lignite));
|
||||||
|
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_emerald, m, 1)) .max(i * 5).sol(true).mB(ModBlocks.ore_beryllium));
|
||||||
|
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_schrabidium, m, 1), new Triplet(ModBlocks.ore_sellafield_uranium_scorched, m, 99)) .max(i * 5).sol(true).mB(ModBlocks.ore_uranium));
|
||||||
|
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_schrabidium, m, 1), new Triplet(ModBlocks.ore_sellafield_uranium_scorched, m, 99)) .max(i * 5).sol(true).mB(ModBlocks.ore_gneiss_uranium));
|
||||||
|
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.rock));
|
||||||
|
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.sand));
|
||||||
|
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.ground));
|
||||||
|
if(i <= 9) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.grass));
|
||||||
|
if(deepslate != null) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mB(deepslate));
|
||||||
|
if(stone != null) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mB(stone));
|
||||||
|
}
|
||||||
|
|
||||||
|
//entries.add(new FalloutEntry().mB(Blocks.grass).prim(new Triplet(ModBlocks.waste_earth, 0, 1)));
|
||||||
entries.add(new FalloutEntry()
|
entries.add(new FalloutEntry()
|
||||||
.mB(Blocks.mycelium)
|
.mB(Blocks.mycelium)
|
||||||
.prim(new Triplet(ModBlocks.waste_mycelium, 0, 1)));
|
.prim(new Triplet(ModBlocks.waste_mycelium, 0, 1)));
|
||||||
@ -101,40 +110,6 @@ public class FalloutConfigJSON {
|
|||||||
entries.add(new FalloutEntry()
|
entries.add(new FalloutEntry()
|
||||||
.mB(Blocks.clay)
|
.mB(Blocks.clay)
|
||||||
.prim(new Triplet(Blocks.hardened_clay, 0, 1)));
|
.prim(new Triplet(Blocks.hardened_clay, 0, 1)));
|
||||||
entries.add(new FalloutEntry()
|
|
||||||
.mB(Blocks.mossy_cobblestone)
|
|
||||||
.prim(new Triplet(Blocks.coal_ore, 0, 1)));
|
|
||||||
entries.add(new FalloutEntry()
|
|
||||||
.mB(Blocks.coal_ore)
|
|
||||||
.prim(new Triplet(Blocks.diamond_ore, 0, 3), new Triplet(Blocks.emerald_ore, 0, 2))
|
|
||||||
.c(0.5));
|
|
||||||
entries.add(new FalloutEntry()
|
|
||||||
.mB(ModBlocks.ore_lignite)
|
|
||||||
.prim(new Triplet(Blocks.diamond_ore, 0, 1))
|
|
||||||
.c(0.2));
|
|
||||||
entries.add(new FalloutEntry()
|
|
||||||
.mB(ModBlocks.ore_uranium)
|
|
||||||
.prim(new Triplet(ModBlocks.ore_schrabidium, 0, 1), new Triplet(ModBlocks.ore_uranium_scorched, 0, 99)));
|
|
||||||
entries.add(new FalloutEntry()
|
|
||||||
.mB(ModBlocks.ore_nether_uranium)
|
|
||||||
.prim(new Triplet(ModBlocks.ore_nether_schrabidium, 0, 1), new Triplet(ModBlocks.ore_nether_uranium_scorched, 0, 99)));
|
|
||||||
entries.add(new FalloutEntry()
|
|
||||||
.mB(ModBlocks.ore_gneiss_uranium)
|
|
||||||
.prim(new Triplet(ModBlocks.ore_gneiss_schrabidium, 0, 1), new Triplet(ModBlocks.ore_gneiss_uranium_scorched, 0, 99)));
|
|
||||||
|
|
||||||
/// COMPAT ///
|
|
||||||
Block deepslate = Compat.tryLoadBlock(Compat.MOD_EF, "deepslate");
|
|
||||||
if(deepslate != null) { //identical to stone
|
|
||||||
entries.add(stoneCore.clone().mB(deepslate));
|
|
||||||
entries.add(stoneInner.clone().mB(deepslate));
|
|
||||||
entries.add(stoneOuter.clone().mB(deepslate));
|
|
||||||
}
|
|
||||||
Block stone = Compat.tryLoadBlock(Compat.MOD_EF, "stone");
|
|
||||||
if(stone != null) { //identical to stone
|
|
||||||
entries.add(stoneCore.clone().mB(stone));
|
|
||||||
entries.add(stoneInner.clone().mB(stone));
|
|
||||||
entries.add(stoneOuter.clone().mB(stone));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void writeDefault(File file) {
|
private static void writeDefault(File file) {
|
||||||
@ -191,6 +166,7 @@ public class FalloutConfigJSON {
|
|||||||
private double minDist = 0.0D;
|
private double minDist = 0.0D;
|
||||||
private double maxDist = 100.0D;
|
private double maxDist = 100.0D;
|
||||||
|
|
||||||
|
/** Whether the depth value should be decremented when this block is converted */
|
||||||
private boolean isSolid = false;
|
private boolean isSolid = false;
|
||||||
|
|
||||||
public FalloutEntry clone() {
|
public FalloutEntry clone() {
|
||||||
|
|||||||
@ -59,7 +59,7 @@ public class MobConfig {
|
|||||||
public static boolean rampantMode = false;
|
public static boolean rampantMode = false;
|
||||||
public static boolean rampantNaturalScoutSpawn = false;
|
public static boolean rampantNaturalScoutSpawn = false;
|
||||||
public static double rampantScoutSpawnThresh = 20;
|
public static double rampantScoutSpawnThresh = 20;
|
||||||
public static int rampantScoutSpawnChance = 1000;
|
public static int rampantScoutSpawnChance = 600;
|
||||||
public static boolean scoutInitialSpawn = false;
|
public static boolean scoutInitialSpawn = false;
|
||||||
public static boolean rampantExtendedTargetting = false;
|
public static boolean rampantExtendedTargetting = false;
|
||||||
public static boolean rampantDig = false;
|
public static boolean rampantDig = false;
|
||||||
@ -154,8 +154,8 @@ public class MobConfig {
|
|||||||
config.addCustomCategoryComment(CATEGORY, "The individual features of rampant can be used regardless of whether the main rampant toggle is enabled or not");
|
config.addCustomCategoryComment(CATEGORY, "The individual features of rampant can be used regardless of whether the main rampant toggle is enabled or not");
|
||||||
|
|
||||||
rampantNaturalScoutSpawn = CommonConfig.createConfigBool(config, CATEGORY,"12.R02_rampantScoutSpawn", "Whether scouts should spawn natually in highly polluted chunks", false);
|
rampantNaturalScoutSpawn = CommonConfig.createConfigBool(config, CATEGORY,"12.R02_rampantScoutSpawn", "Whether scouts should spawn natually in highly polluted chunks", false);
|
||||||
rampantScoutSpawnChance = CommonConfig.createConfigInt(config, CATEGORY, "12.R02.1_rampantScoutSpawnChance", "How much soot is needed for scouts to naturally spawn", 20);
|
rampantScoutSpawnThresh = CommonConfig.createConfigDouble(config, CATEGORY, "12.R02.1_rampantScoutSpawnThresh", "How much soot is needed for scouts to naturally spawn", 20);
|
||||||
rampantScoutSpawnThresh = CommonConfig.createConfigDouble(config, CATEGORY, "12.R02.2_rampantScoutSpawnThresh", "How often scouts naturally spawn per mob population, 1/x format, the bigger the number, the more uncommon the scouts", 600);
|
rampantScoutSpawnChance = CommonConfig.createConfigInt(config, CATEGORY, "12.R02.2_rampantScoutSpawnChance", "How often scouts naturally spawn per mob population, 1/x format, the bigger the number, the more uncommon the scouts", 600);
|
||||||
rampantExtendedTargetting = CommonConfig.createConfigBool(config, CATEGORY,"12.R03_rampantExtendedTargeting", "Whether Glyphids should have the extended targetting always enabled", false);
|
rampantExtendedTargetting = CommonConfig.createConfigBool(config, CATEGORY,"12.R03_rampantExtendedTargeting", "Whether Glyphids should have the extended targetting always enabled", false);
|
||||||
rampantDig = CommonConfig.createConfigBool(config, CATEGORY,"12.R04_rampantDig", "Whether Glyphids should be able to dig to waypoints", false);
|
rampantDig = CommonConfig.createConfigBool(config, CATEGORY,"12.R04_rampantDig", "Whether Glyphids should be able to dig to waypoints", false);
|
||||||
rampantGlyphidGuidance = CommonConfig.createConfigBool(config, CATEGORY,"12.R05_rampantGlyphidGuidance", "Whether Glyphids should always expand toward a player's spawnpoint", false);
|
rampantGlyphidGuidance = CommonConfig.createConfigBool(config, CATEGORY,"12.R05_rampantGlyphidGuidance", "Whether Glyphids should always expand toward a player's spawnpoint", false);
|
||||||
|
|||||||
@ -108,6 +108,14 @@ public class WorldConfig {
|
|||||||
public static int meteorShowerChance = 20 * 60 * 5;
|
public static int meteorShowerChance = 20 * 60 * 5;
|
||||||
public static int meteorShowerDuration = 6000;
|
public static int meteorShowerDuration = 6000;
|
||||||
|
|
||||||
|
public static int craterBiomeId = 80;
|
||||||
|
public static int craterBiomeInnerId = 81;
|
||||||
|
public static int craterBiomeOuterId = 82;
|
||||||
|
public static float craterBiomeRad = 5F;
|
||||||
|
public static float craterBiomeInnerRad = 25F;
|
||||||
|
public static float craterBiomeOuterRad = 0.5F;
|
||||||
|
public static float craterBiomeWaterMult = 5F;
|
||||||
|
|
||||||
public static void loadFromConfig(Configuration config) {
|
public static void loadFromConfig(Configuration config) {
|
||||||
|
|
||||||
final String CATEGORY_OREGEN = CommonConfig.CATEGORY_ORES;
|
final String CATEGORY_OREGEN = CommonConfig.CATEGORY_ORES;
|
||||||
@ -218,6 +226,15 @@ public class WorldConfig {
|
|||||||
meteorShowerChance = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.04_meteorShowerChance", "The probability of a meteor spawning during meteor shower (an average of once every nTH ticks)", 20 * 60 * 15);
|
meteorShowerChance = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.04_meteorShowerChance", "The probability of a meteor spawning during meteor shower (an average of once every nTH ticks)", 20 * 60 * 15);
|
||||||
meteorShowerDuration = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.05_meteorShowerDuration", "Max duration of meteor shower in ticks", 20 * 60 * 30);
|
meteorShowerDuration = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.05_meteorShowerDuration", "Max duration of meteor shower in ticks", 20 * 60 * 30);
|
||||||
|
|
||||||
|
final String CATEGORY_BIOMES = CommonConfig.CATEGORY_BIOMES;
|
||||||
|
craterBiomeId = CommonConfig.createConfigInt(config, CATEGORY_BIOMES, "17.B00_craterBiomeId", "The numeric ID for the crater biome", 80);
|
||||||
|
craterBiomeInnerId = CommonConfig.createConfigInt(config, CATEGORY_BIOMES, "17.B01_craterBiomeInnerId", "The numeric ID for the inner crater biome", 81);
|
||||||
|
craterBiomeOuterId = CommonConfig.createConfigInt(config, CATEGORY_BIOMES, "17.B02_craterBiomeOuterId", "The numeric ID for the outer crater biome", 82);
|
||||||
|
craterBiomeRad = (float) CommonConfig.createConfigDouble(config, CATEGORY_BIOMES, "17.R00_craterBiomeRad", "RAD/s for the crater biome", 5D);
|
||||||
|
craterBiomeInnerRad = (float) CommonConfig.createConfigDouble(config, CATEGORY_BIOMES, "17.R01_craterBiomeInnerRad", "RAD/s for the inner crater biome", 25D);
|
||||||
|
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);
|
radioStructure = CommonConfig.setDefZero(radioStructure, 1000);
|
||||||
antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000);
|
antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000);
|
||||||
atomStructure = CommonConfig.setDefZero(atomStructure, 1000);
|
atomStructure = CommonConfig.setDefZero(atomStructure, 1000);
|
||||||
|
|||||||
@ -164,8 +164,8 @@ public class ConsumableRecipes {
|
|||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_polonium, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', IRON.plate(), 'S', PO210.block() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_polonium, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', IRON.plate(), 'S', PO210.block() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_era, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', IRON.plate(), 'S', ModItems.ingot_semtex });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_era, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', IRON.plate(), 'S', ModItems.ingot_semtex });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_kevlar, 1), new Object[] { "KIK", "IDI", "KIK", 'K', ModItems.plate_kevlar, 'I', ANY_RUBBER.ingot(), 'D', ModItems.ducttape });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_kevlar, 1), new Object[] { "KIK", "IDI", "KIK", 'K', ModItems.plate_kevlar, 'I', ANY_RUBBER.ingot(), 'D', ModItems.ducttape });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_sapi, 1), new Object[] { "PKP", "DPD", "PKP", 'P', POLYMER.ingot(), 'K', ModItems.insert_kevlar, 'D', ModItems.ducttape });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_sapi, 1), new Object[] { "PKP", "DPD", "PKP", 'P', ANY_PLASTIC.ingot(), 'K', ModItems.insert_kevlar, 'D', ModItems.ducttape });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_esapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', POLYMER.ingot(), 'K', ModItems.insert_sapi, 'D', ModItems.ducttape, 'S', BIGMT.plate() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_esapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', ANY_PLASTIC.ingot(), 'K', ModItems.insert_sapi, 'D', ModItems.ducttape, 'S', BIGMT.plate() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_xsapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', ASBESTOS.ingot(), 'K', ModItems.insert_esapi, 'D', ModItems.ducttape, 'S', ModItems.ingot_meteorite_forged });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_xsapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', ASBESTOS.ingot(), 'K', ModItems.insert_esapi, 'D', ModItems.ducttape, 'S', ModItems.ingot_meteorite_forged });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_yharonite, 1), new Object[] { "YIY", "IYI", "YIY", 'Y', ModItems.billet_yharonite, 'I', ModItems.insert_du });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_yharonite, 1), new Object[] { "YIY", "IYI", "YIY", 'Y', ModItems.billet_yharonite, 'I', ModItems.insert_du });
|
||||||
|
|
||||||
|
|||||||
@ -160,7 +160,7 @@ public class WeaponRecipes {
|
|||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', STEEL.bolt(), 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', STEEL.bolt(), 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_glass_cannon, 1), new Object[] { "GGC", "GTM", 'G', Item.getItemFromBlock(ModBlocks.glass_quartz), 'C', ModItems.battery_lithium_cell, 'T', ModItems.crt_display, 'M', ModItems.mechanism_special });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_glass_cannon, 1), new Object[] { "GGC", "GTM", 'G', Item.getItemFromBlock(ModBlocks.glass_quartz), 'C', ModItems.battery_lithium_cell, 'T', ModItems.crt_display, 'M', ModItems.mechanism_special });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_remington, 1), new Object[] { "PPM", "S L", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_SLAB, 'L', KEY_LOG });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_remington, 1), new Object[] { "PPM", "S L", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_SLAB, 'L', KEY_LOG });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_benelli), new Object[] { "HHP", "SSM", "AAP", 'H', ModItems.ingot_dura_steel, 'S', ModItems.hull_small_steel, 'A', ModItems.hull_small_aluminium, 'P', ModItems.ingot_polymer, 'M', ModItems.mechanism_rifle_2 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_benelli), new Object[] { "HHP", "SSM", "AAP", 'H', ModItems.ingot_dura_steel, 'S', ModItems.hull_small_steel, 'A', ModItems.hull_small_aluminium, 'P', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_2 });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lunatic_marksman), new Object[] { " GN", "SSM", " A", 'G', KEY_ANYPANE, 'N', ModItems.powder_nitan_mix, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'A', ANY_RESISTANTALLOY.plateCast() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lunatic_marksman), new Object[] { " GN", "SSM", " A", 'G', KEY_ANYPANE, 'N', ModItems.powder_nitan_mix, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'A', ANY_RESISTANTALLOY.plateCast() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_coilgun), new Object[] { "CCC", "SSM", " P", 'C', ModBlocks.capacitor_copper, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'P', ANY_PLASTIC.ingot() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_coilgun), new Object[] { "CCC", "SSM", " P", 'C', ModBlocks.capacitor_copper, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'P', ANY_PLASTIC.ingot() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 0), new Object[] { " T ", "TST", " T ", 'T', W.ingot(), 'S', BIGMT.ingot() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 0), new Object[] { " T ", "TST", " T ", 'T', W.ingot(), 'S', BIGMT.ingot() });
|
||||||
|
|||||||
@ -223,6 +223,7 @@ public class EntityMappings {
|
|||||||
addEntity(EntityAcidBomb.class, "entity_acid_bomb", 1000);
|
addEntity(EntityAcidBomb.class, "entity_acid_bomb", 1000);
|
||||||
addEntity(EntityFallingBlockNT.class, "entity_falling_block_nt", 1000);
|
addEntity(EntityFallingBlockNT.class, "entity_falling_block_nt", 1000);
|
||||||
addEntity(EntityBoatRubber.class, "entity_rubber_boat", 250, false);
|
addEntity(EntityBoatRubber.class, "entity_rubber_boat", 250, false);
|
||||||
|
addEntity(EntityMissileStealth.class, "entity_missile_stealth", 1000);
|
||||||
|
|
||||||
addEntity(EntityItemWaste.class, "entity_item_waste", 100);
|
addEntity(EntityItemWaste.class, "entity_item_waste", 100);
|
||||||
addEntity(EntityItemBuoyant.class, "entity_item_buoyant", 100);
|
addEntity(EntityItemBuoyant.class, "entity_item_buoyant", 100);
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.hbm.config.FalloutConfigJSON;
|
|||||||
import com.hbm.config.FalloutConfigJSON.FalloutEntry;
|
import com.hbm.config.FalloutConfigJSON.FalloutEntry;
|
||||||
import com.hbm.entity.item.EntityFallingBlockNT;
|
import com.hbm.entity.item.EntityFallingBlockNT;
|
||||||
import com.hbm.saveddata.AuxSavedData;
|
import com.hbm.saveddata.AuxSavedData;
|
||||||
|
import com.hbm.world.WorldUtil;
|
||||||
|
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@ -15,6 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.ChunkCoordIntPair;
|
import net.minecraft.world.ChunkCoordIntPair;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.storage.WorldInfo;
|
import net.minecraft.world.storage.WorldInfo;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
@ -55,24 +58,40 @@ public class EntityFalloutRain extends Entity {
|
|||||||
long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time
|
long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time
|
||||||
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
|
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
|
||||||
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
|
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
|
||||||
|
boolean biomeModified = false;
|
||||||
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
|
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
|
||||||
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
|
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
|
||||||
stomp(x, z, Math.hypot(x - posX, z - posZ) * 100 / getScale());
|
double percent = Math.hypot(x - posX, z - posZ) * 100 / getScale();
|
||||||
|
stomp(x, z, percent);
|
||||||
|
BiomeGenBase biome = getBiomeChange(percent, getScale());
|
||||||
|
if(biome != null) {
|
||||||
|
WorldUtil.setBiome(worldObj, x, z, biome);
|
||||||
|
biomeModified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(biomeModified) WorldUtil.syncBiomeChange(worldObj, chunkPosX << 4, chunkPosZ << 4);
|
||||||
|
|
||||||
} else if (!outerChunksToProcess.isEmpty()) {
|
} else if (!outerChunksToProcess.isEmpty()) {
|
||||||
long chunkPos = outerChunksToProcess.remove(outerChunksToProcess.size() - 1);
|
long chunkPos = outerChunksToProcess.remove(outerChunksToProcess.size() - 1);
|
||||||
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
|
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
|
||||||
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
|
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
|
||||||
|
boolean biomeModified = false;
|
||||||
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
|
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
|
||||||
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
|
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
|
||||||
double distance = Math.hypot(x - posX, z - posZ);
|
double distance = Math.hypot(x - posX, z - posZ);
|
||||||
if(distance <= getScale()) {
|
if(distance <= getScale()) {
|
||||||
stomp(x, z, distance * 100 / getScale());
|
double percent = distance * 100 / getScale();
|
||||||
|
stomp(x, z, percent);
|
||||||
|
BiomeGenBase biome = getBiomeChange(percent, getScale());
|
||||||
|
if(biome != null) {
|
||||||
|
WorldUtil.setBiome(worldObj, x, z, biome);
|
||||||
|
biomeModified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(biomeModified) WorldUtil.syncBiomeChange(worldObj, chunkPosX << 4, chunkPosZ << 4);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setDead();
|
setDead();
|
||||||
@ -94,6 +113,13 @@ public class EntityFalloutRain extends Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static BiomeGenBase getBiomeChange(double dist, int scale) {
|
||||||
|
if(scale >= 150 && dist < 15) return BiomeGenCraterBase.craterInnerBiome;
|
||||||
|
if(scale >= 100 && dist < 55) return BiomeGenCraterBase.craterBiome;
|
||||||
|
if(scale >= 25) return BiomeGenCraterBase.craterOuterBiome;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private final List<Long> chunksToProcess = new ArrayList<>();
|
private final List<Long> chunksToProcess = new ArrayList<>();
|
||||||
private final List<Long> outerChunksToProcess = new ArrayList<>();
|
private final List<Long> outerChunksToProcess = new ArrayList<>();
|
||||||
|
|
||||||
@ -123,25 +149,21 @@ public class EntityFalloutRain extends Entity {
|
|||||||
Collections.reverse(outerChunksToProcess);
|
Collections.reverse(outerChunksToProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
//private List<int[]> changedPositions = new ArrayList();
|
|
||||||
|
|
||||||
// TODO cache chunks?
|
|
||||||
private void stomp(int x, int z, double dist) {
|
private void stomp(int x, int z, double dist) {
|
||||||
|
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
|
|
||||||
for(int y = 255; y >= 0; y--) {
|
for(int y = 255; y >= 0; y--) {
|
||||||
|
|
||||||
if(depth >= 3)
|
if(depth >= 3) return;
|
||||||
return;
|
|
||||||
|
|
||||||
Block b = worldObj.getBlock(x, y, z);
|
Block b = worldObj.getBlock(x, y, z);
|
||||||
|
|
||||||
|
if(b.getMaterial() == Material.air) continue;
|
||||||
|
|
||||||
Block ab = worldObj.getBlock(x, y + 1, z);
|
Block ab = worldObj.getBlock(x, y + 1, z);
|
||||||
int meta = worldObj.getBlockMetadata(x, y, z);
|
int meta = worldObj.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
if(b.getMaterial() == Material.air)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) {
|
if(b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) {
|
||||||
|
|
||||||
double d = dist / 100;
|
double d = dist / 100;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ public class EntityNukeTorex extends Entity {
|
|||||||
|
|
||||||
if(worldObj.isRemote) {
|
if(worldObj.isRemote) {
|
||||||
|
|
||||||
|
if(ticksExisted == 1) this.setScale((float) s);
|
||||||
|
|
||||||
if(lastSpawnY == -1) {
|
if(lastSpawnY == -1) {
|
||||||
lastSpawnY = posY - 3;
|
lastSpawnY = posY - 3;
|
||||||
}
|
}
|
||||||
@ -82,7 +84,7 @@ public class EntityNukeTorex extends Entity {
|
|||||||
double x = posX + rand.nextGaussian() * range;
|
double x = posX + rand.nextGaussian() * range;
|
||||||
double z = posZ + rand.nextGaussian() * range;
|
double z = posZ + rand.nextGaussian() * range;
|
||||||
Cloudlet cloud = new Cloudlet(x, lastSpawnY, z, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime);
|
Cloudlet cloud = new Cloudlet(x, lastSpawnY, z, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime);
|
||||||
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) cs, 5F * (float) cs);
|
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) s, 5F * (float) cs);
|
||||||
cloudlets.add(cloud);
|
cloudlets.add(cloud);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,13 +106,44 @@ public class EntityNukeTorex extends Entity {
|
|||||||
|
|
||||||
// spawn ring clouds
|
// spawn ring clouds
|
||||||
if(ticksExisted < 200) {
|
if(ticksExisted < 200) {
|
||||||
|
lifetime *= s;
|
||||||
for(int i = 0; i < 2; i++) {
|
for(int i = 0; i < 2; i++) {
|
||||||
Cloudlet cloud = new Cloudlet(posX, posY + coreHeight, posZ, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime, TorexType.RING);
|
Cloudlet cloud = new Cloudlet(posX, posY + coreHeight, posZ, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime, TorexType.RING);
|
||||||
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) cs * 0.5F, 3F * (float) (cs * s));
|
cloud.setScale(1F + this.ticksExisted * 0.0025F * (float) (cs * s), 3F * (float) (cs * s));
|
||||||
cloudlets.add(cloud);
|
cloudlets.add(cloud);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// spawn condensation clouds
|
||||||
|
if(ticksExisted > 200 && ticksExisted < 600) {
|
||||||
|
|
||||||
|
for(int i = 0; i < 20; i++) {
|
||||||
|
for(int j = 0; j < 4; j++) {
|
||||||
|
float angle = (float) (Math.PI * 2 * rand.nextDouble());
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * 3, 0, 0);
|
||||||
|
vec.rotateAroundZ((float) (Math.PI / 45 * j));
|
||||||
|
vec.rotateAroundY(angle);
|
||||||
|
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight - 5 + j * s, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
|
||||||
|
cloud.setScale(0.125F * (float) (cs * s), 3F * (float) (cs * s));
|
||||||
|
cloudlets.add(cloud);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ticksExisted > 300 && ticksExisted < 600) {
|
||||||
|
|
||||||
|
for(int i = 0; i < 20; i++) {
|
||||||
|
for(int j = 0; j < 4; j++) {
|
||||||
|
float angle = (float) (Math.PI * 2 * rand.nextDouble());
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * 2, 0, 0);
|
||||||
|
vec.rotateAroundZ((float) (Math.PI / 45 * j));
|
||||||
|
vec.rotateAroundY(angle);
|
||||||
|
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight + 25 + j * s, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
|
||||||
|
cloud.setScale(0.125F * (float) (cs * s), 3F * (float) (cs * s));
|
||||||
|
cloudlets.add(cloud);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(Cloudlet cloud : cloudlets) {
|
for(Cloudlet cloud : cloudlets) {
|
||||||
cloud.update();
|
cloud.update();
|
||||||
}
|
}
|
||||||
@ -131,7 +164,7 @@ public class EntityNukeTorex extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public EntityNukeTorex setScale(float scale) {
|
public EntityNukeTorex setScale(float scale) {
|
||||||
getDataWatcher().updateObject(10, scale);
|
if(!worldObj.isRemote) getDataWatcher().updateObject(10, scale);
|
||||||
this.coreHeight = this.coreHeight / 1.5D * scale;
|
this.coreHeight = this.coreHeight / 1.5D * scale;
|
||||||
this.convectionHeight = this.convectionHeight / 1.5D * scale;
|
this.convectionHeight = this.convectionHeight / 1.5D * scale;
|
||||||
this.torusWidth = this.torusWidth / 1.5D * scale;
|
this.torusWidth = this.torusWidth / 1.5D * scale;
|
||||||
@ -270,6 +303,11 @@ public class EntityNukeTorex extends Entity {
|
|||||||
this.motionX = motion.xCoord;
|
this.motionX = motion.xCoord;
|
||||||
this.motionY = motion.yCoord;
|
this.motionY = motion.yCoord;
|
||||||
this.motionZ = motion.zCoord;
|
this.motionZ = motion.zCoord;
|
||||||
|
} else if(this.type == TorexType.CONDENSATION) {
|
||||||
|
Vec3 motion = getCondensationMotion();
|
||||||
|
this.motionX = motion.xCoord;
|
||||||
|
this.motionY = motion.yCoord;
|
||||||
|
this.motionZ = motion.zCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
double mult = this.motionMult * getSimulationSpeed();
|
double mult = this.motionMult * getSimulationSpeed();
|
||||||
@ -281,6 +319,15 @@ public class EntityNukeTorex extends Entity {
|
|||||||
this.updateColor();
|
this.updateColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Vec3 getCondensationMotion() {
|
||||||
|
Vec3 delta = Vec3.createVectorHelper(posX - EntityNukeTorex.this.posX, 0, posZ - EntityNukeTorex.this.posZ);
|
||||||
|
double speed = 0.00002 * EntityNukeTorex.this.getScale() * EntityNukeTorex.this.ticksExisted;
|
||||||
|
delta.xCoord *= speed;
|
||||||
|
//delta.yCoord *= speed * 0.75 * EntityNukeTorex.this.getScale();
|
||||||
|
delta.zCoord *= speed;
|
||||||
|
return delta;
|
||||||
|
}
|
||||||
|
|
||||||
private Vec3 getRingMotion(double simPosX, double simPosZ) {
|
private Vec3 getRingMotion(double simPosX, double simPosZ) {
|
||||||
|
|
||||||
/*Vec3 targetPos = Vec3.createVectorHelper(
|
/*Vec3 targetPos = Vec3.createVectorHelper(
|
||||||
@ -440,6 +487,11 @@ public class EntityNukeTorex extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Vec3 getInterpColor(float interp) {
|
public Vec3 getInterpColor(float interp) {
|
||||||
|
|
||||||
|
if(this.type == TorexType.CONDENSATION) {
|
||||||
|
return Vec3.createVectorHelper(1F, 1F, 1F);
|
||||||
|
}
|
||||||
|
|
||||||
double greying = EntityNukeTorex.this.getGreying();
|
double greying = EntityNukeTorex.this.getGreying();
|
||||||
|
|
||||||
if(this.type == TorexType.RING) {
|
if(this.type == TorexType.RING) {
|
||||||
@ -453,7 +505,9 @@ public class EntityNukeTorex extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float getAlpha() {
|
public float getAlpha() {
|
||||||
return (1F - ((float)age / (float)cloudletLife)) * EntityNukeTorex.this.getAlpha();
|
float alpha = (1F - ((float)age / (float)cloudletLife)) * EntityNukeTorex.this.getAlpha();
|
||||||
|
if(this.type == TorexType.CONDENSATION) alpha *= 0.25;
|
||||||
|
return alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
private float startingScale = 1;
|
private float startingScale = 1;
|
||||||
@ -479,7 +533,8 @@ public class EntityNukeTorex extends Entity {
|
|||||||
|
|
||||||
public static enum TorexType {
|
public static enum TorexType {
|
||||||
STANDARD,
|
STANDARD,
|
||||||
RING
|
RING,
|
||||||
|
CONDENSATION
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
@Override protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
||||||
|
|||||||
@ -63,7 +63,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
|
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
|
||||||
radiate(500_000, this.length * 2);
|
radiate(2_500_000F / (this.ticksExisted * 5 + 1), this.length * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!mute) {
|
if(!mute) {
|
||||||
@ -131,7 +131,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
|
|||||||
eRads /= (float)res;
|
eRads /= (float)res;
|
||||||
eRads /= (float)(len * len);
|
eRads /= (float)(len * len);
|
||||||
|
|
||||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads);
|
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.RAD_BYPASS, eRads);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,8 @@ public class EntityMissileAntiBallistic extends EntityThrowableInterp implements
|
|||||||
|
|
||||||
for(Entity e : TileEntityMachineRadarNT.matchingEntities) {
|
for(Entity e : TileEntityMachineRadarNT.matchingEntities) {
|
||||||
if(e.dimension != this.dimension) continue;
|
if(e.dimension != this.dimension) continue;
|
||||||
if(!(e instanceof EntityMissileBaseNT)) continue;
|
if(!(e instanceof EntityMissileBaseNT)) continue; //can only lock onto missiles
|
||||||
|
if(e instanceof EntityMissileStealth) continue; //cannot lack onto missiles with stealth coating
|
||||||
|
|
||||||
Vec3 vec = Vec3.createVectorHelper(e.posX - posX, e.posY - posY, e.posZ - posZ);
|
Vec3 vec = Vec3.createVectorHelper(e.posX - posX, e.posY - posY, e.posZ - posZ);
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
|||||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
|
||||||
import api.hbm.entity.IRadarDetectable;
|
|
||||||
import api.hbm.entity.IRadarDetectableNT;
|
import api.hbm.entity.IRadarDetectableNT;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -31,7 +30,7 @@ import net.minecraftforge.common.ForgeChunkManager;
|
|||||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||||
|
|
||||||
public abstract class EntityMissileBaseNT extends EntityThrowableInterp implements IChunkLoader, IRadarDetectable, IRadarDetectableNT {
|
public abstract class EntityMissileBaseNT extends EntityThrowableInterp implements IChunkLoader, IRadarDetectableNT {
|
||||||
|
|
||||||
public int startX;
|
public int startX;
|
||||||
public int startZ;
|
public int startZ;
|
||||||
|
|||||||
@ -105,11 +105,6 @@ public class EntityMissileDoomsday extends EntityMissileBaseNT {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER4;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.doomsday";
|
return "radar.target.doomsday";
|
||||||
|
|||||||
@ -61,11 +61,6 @@ public class EntityMissileShuttle extends EntityMissileBaseNT {
|
|||||||
return new ItemStack(ModItems.missile_generic);
|
return new ItemStack(ModItems.missile_generic);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER3;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.shuttle";
|
return "radar.target.shuttle";
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.hbm.entity.missile;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||||
|
import com.hbm.inventory.material.Mats;
|
||||||
|
import com.hbm.items.ItemEnums.EnumAshType;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import api.hbm.entity.IRadarDetectableNT;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class EntityMissileStealth extends EntityMissileBaseNT {
|
||||||
|
|
||||||
|
public EntityMissileStealth(World world) { super(world); }
|
||||||
|
public EntityMissileStealth(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDebris() {
|
||||||
|
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||||
|
list.add(new ItemStack(ModItems.bolt, 4, Mats.MAT_STEEL.id));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public String getUnlocalizedName() { return "radar.target.tier1"; }
|
||||||
|
@Override public int getBlipLevel() { return IRadarDetectableNT.TIER1; }
|
||||||
|
@Override public boolean canBeSeenBy(Object radar) { return false; }
|
||||||
|
|
||||||
|
@Override public void onImpact() { this.explodeStandard(20F, 24, false, true); }
|
||||||
|
@Override public ItemStack getDebrisRareDrop() { return DictFrame.fromOne(ModItems.powder_ash, EnumAshType.MISC); }
|
||||||
|
}
|
||||||
@ -37,11 +37,6 @@ public abstract class EntityMissileTier0 extends EntityMissileBaseNT {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.tier0";
|
return "radar.target.tier0";
|
||||||
|
|||||||
@ -25,11 +25,6 @@ public abstract class EntityMissileTier1 extends EntityMissileBaseNT {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.tier1";
|
return "radar.target.tier1";
|
||||||
|
|||||||
@ -29,11 +29,6 @@ public abstract class EntityMissileTier2 extends EntityMissileBaseNT {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.tier2";
|
return "radar.target.tier2";
|
||||||
|
|||||||
@ -31,11 +31,6 @@ public abstract class EntityMissileTier3 extends EntityMissileBaseNT {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER3;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.tier3";
|
return "radar.target.tier3";
|
||||||
|
|||||||
@ -30,11 +30,6 @@ public abstract class EntityMissileTier4 extends EntityMissileBaseNT {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RadarTargetType getTargetType() {
|
|
||||||
return RadarTargetType.MISSILE_TIER4;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "radar.target.tier4";
|
return "radar.target.tier4";
|
||||||
|
|||||||
@ -32,30 +32,20 @@ public class EntityBoxcar extends EntityThrowable {
|
|||||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||||
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
|
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
|
||||||
|
|
||||||
/*this.prevPosX = this.posX;
|
|
||||||
this.prevPosY = this.posY;
|
|
||||||
this.prevPosZ = this.posZ;
|
|
||||||
|
|
||||||
this.posX += this.motionX;
|
|
||||||
this.posY += this.motionY;
|
|
||||||
this.posZ += this.motionZ;*/
|
|
||||||
|
|
||||||
this.motionY -= 0.03;
|
this.motionY -= 0.03;
|
||||||
if(motionY < -1.5)
|
if(motionY < -1.5)
|
||||||
motionY = -1.5;
|
motionY = -1.5;
|
||||||
|
|
||||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
|
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
|
||||||
{
|
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:weapon.trainImpact", 100.0F, 1.0F);
|
||||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
|
|
||||||
this.setDead();
|
this.setDead();
|
||||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
|
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
|
||||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
|
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
|
||||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
|
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
|
||||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
|
//ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
|
||||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
|
//ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
|
||||||
|
|
||||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
List<Entity> list = (List<Entity>) worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 2, posY - 2, posZ - 2, posX + 2, posY + 2, posZ + 2));
|
||||||
AxisAlignedBB.getBoundingBox(posX - 2, posY - 2, posZ - 2, posX + 2, posY + 2, posZ + 2));
|
|
||||||
|
|
||||||
for(Entity e : list) {
|
for(Entity e : list) {
|
||||||
e.attackEntityFrom(ModDamageSource.boxcar, 1000);
|
e.attackEntityFrom(ModDamageSource.boxcar, 1000);
|
||||||
@ -67,14 +57,11 @@ public class EntityBoxcar extends EntityThrowable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onImpact(MovingObjectPosition p_70184_1_) {
|
protected void onImpact(MovingObjectPosition p_70184_1_) { }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean isInRangeToRenderDist(double distance)
|
public boolean isInRangeToRenderDist(double distance) {
|
||||||
{
|
|
||||||
return distance < 25000;
|
return distance < 25000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,7 +131,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
|||||||
data.setInteger("color", 0x0000ff);
|
data.setInteger("color", 0x0000ff);
|
||||||
data.setFloat("scale", 1.5F);
|
data.setFloat("scale", 1.5F);
|
||||||
data.setString("text", id + " (#" + train.ltuIndex + ")");
|
data.setString("text", id + " (#" + train.ltuIndex + ")");
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, train.posX, train.posY + 1, train.posZ), new TargetPoint(this.dimension, train.posX, train.posY + 1, train.posZ, 50));
|
//PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, train.posX, train.posY + 1, train.posZ), new TargetPoint(this.dimension, train.posX, train.posY + 1, train.posZ, 50));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -891,6 +891,6 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) {
|
public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) {
|
||||||
List<String> text = new ArrayList();
|
List<String> text = new ArrayList();
|
||||||
ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text); //none of this shit is going to work anyway
|
//ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
|||||||
this.dataWatcher.addObject(10, new Integer(0));
|
this.dataWatcher.addObject(10, new Integer(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int countVacantSlots() {
|
public int countOccupiedSlots() {
|
||||||
int slots = 0;
|
int slots = 0;
|
||||||
|
|
||||||
for(int i = 0; i < this.getSizeInventory(); i++) {
|
for(int i = 0; i < this.getSizeInventory(); i++) {
|
||||||
@ -53,11 +53,9 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
|||||||
this.slots[slot] = null;
|
this.slots[slot] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
|
||||||
return itemstack;
|
return itemstack;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,10 +65,8 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
|||||||
if(this.slots[slot] != null) {
|
if(this.slots[slot] != null) {
|
||||||
ItemStack itemstack = this.slots[slot];
|
ItemStack itemstack = this.slots[slot];
|
||||||
this.slots[slot] = null;
|
this.slots[slot] = null;
|
||||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
|
||||||
return itemstack;
|
return itemstack;
|
||||||
} else {
|
} else {
|
||||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,8 +78,12 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
|||||||
if(stack != null && stack.stackSize > this.getInventoryStackLimit()) {
|
if(stack != null && stack.stackSize > this.getInventoryStackLimit()) {
|
||||||
stack.stackSize = this.getInventoryStackLimit();
|
stack.stackSize = this.getInventoryStackLimit();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
@Override
|
||||||
|
public void onUpdate() {
|
||||||
|
super.onUpdate();
|
||||||
|
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countOccupiedSlots());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -142,7 +142,7 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dataWatcher.updateObject(10, this.countVacantSlots());
|
this.dataWatcher.updateObject(10, this.countOccupiedSlots());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -291,6 +291,6 @@ public abstract class EntityRailCarRidable extends EntityRailCarCargo {
|
|||||||
text.add("Front: " + this.coupledFront);
|
text.add("Front: " + this.coupledFront);
|
||||||
text.add("Back: " + this.coupledBack);*/
|
text.add("Back: " + this.coupledBack);*/
|
||||||
text.add("Nearest seat: " + this.getNearestSeat(MainRegistry.proxy.me()));
|
text.add("Nearest seat: " + this.getNearestSeat(MainRegistry.proxy.me()));
|
||||||
ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text);
|
//ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import java.util.Random;
|
|||||||
import com.hbm.config.BombConfig;
|
import com.hbm.config.BombConfig;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.config.RadiationConfig;
|
import com.hbm.config.RadiationConfig;
|
||||||
|
import com.hbm.config.WorldConfig;
|
||||||
import com.hbm.explosion.ExplosionNukeSmall;
|
import com.hbm.explosion.ExplosionNukeSmall;
|
||||||
import com.hbm.extprop.HbmLivingProps;
|
import com.hbm.extprop.HbmLivingProps;
|
||||||
import com.hbm.extprop.HbmPlayerProps;
|
import com.hbm.extprop.HbmPlayerProps;
|
||||||
@ -30,6 +31,7 @@ import com.hbm.util.ContaminationUtil;
|
|||||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||||
import com.hbm.util.ContaminationUtil.HazardType;
|
import com.hbm.util.ContaminationUtil.HazardType;
|
||||||
|
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -48,6 +50,7 @@ import net.minecraft.potion.PotionEffect;
|
|||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
public class EntityEffectHandler {
|
public class EntityEffectHandler {
|
||||||
|
|
||||||
@ -58,6 +61,17 @@ public class EntityEffectHandler {
|
|||||||
HbmLivingProps.setRadEnv(entity, 0);
|
HbmLivingProps.setRadEnv(entity, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(entity instanceof EntityPlayer && entity == MainRegistry.proxy.me()) {
|
||||||
|
EntityPlayer player = MainRegistry.proxy.me();
|
||||||
|
if(player != null) {
|
||||||
|
BiomeGenBase biome = player.worldObj.getBiomeGenForCoords((int) Math.floor(player.posX), (int) Math.floor(player.posZ));
|
||||||
|
if(biome == BiomeGenCraterBase.craterBiome || biome == BiomeGenCraterBase.craterInnerBiome) {
|
||||||
|
Random rand = player.getRNG();
|
||||||
|
for(int i = 0; i < 3; i++) player.worldObj.spawnParticle("townaura", player.posX + rand.nextGaussian() * 3, player.posY + rand.nextGaussian() * 2, player.posZ + rand.nextGaussian() * 3, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(entity instanceof EntityPlayerMP) {
|
if(entity instanceof EntityPlayerMP) {
|
||||||
HbmLivingProps props = HbmLivingProps.getData(entity);
|
HbmLivingProps props = HbmLivingProps.getData(entity);
|
||||||
HbmPlayerProps pprps = HbmPlayerProps.getData((EntityPlayerMP) entity);
|
HbmPlayerProps pprps = HbmPlayerProps.getData((EntityPlayerMP) entity);
|
||||||
@ -89,6 +103,18 @@ public class EntityEffectHandler {
|
|||||||
if(GeneralConfig.enable528 && entity instanceof EntityLivingBase && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) {
|
if(GeneralConfig.enable528 && entity instanceof EntityLivingBase && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) {
|
||||||
entity.setFire(5);
|
entity.setFire(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BiomeGenBase biome = entity.worldObj.getBiomeGenForCoords((int) Math.floor(entity.posX), (int) Math.floor(entity.posZ));
|
||||||
|
float radiation = 0;
|
||||||
|
if(biome == BiomeGenCraterBase.craterOuterBiome) radiation = WorldConfig.craterBiomeOuterRad;
|
||||||
|
if(biome == BiomeGenCraterBase.craterBiome) radiation = WorldConfig.craterBiomeRad;
|
||||||
|
if(biome == BiomeGenCraterBase.craterInnerBiome) radiation = WorldConfig.craterBiomeInnerRad;
|
||||||
|
|
||||||
|
if(entity.isWet()) radiation *= WorldConfig.craterBiomeWaterMult;
|
||||||
|
|
||||||
|
if(radiation > 0) {
|
||||||
|
ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, radiation / 20F);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleContamination(entity);
|
handleContamination(entity);
|
||||||
|
|||||||
@ -83,7 +83,7 @@ public class Gun44MagnumFactory {
|
|||||||
|
|
||||||
GunConfiguration config = getBaseConfig();
|
GunConfiguration config = getBaseConfig();
|
||||||
|
|
||||||
config.durability = 4000;
|
config.durability = 31_000;
|
||||||
|
|
||||||
config.name = "ifScope";
|
config.name = "ifScope";
|
||||||
config.manufacturer = EnumGunManufacturer.IF;
|
config.manufacturer = EnumGunManufacturer.IF;
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.hbm.inventory.OreDictManager.DictFrame;
|
|||||||
import com.hbm.inventory.material.MaterialShapes;
|
import com.hbm.inventory.material.MaterialShapes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
|
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
|
||||||
|
import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
|
||||||
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
|
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
|
||||||
import com.hbm.items.machine.ItemWatzPellet.EnumWatzType;
|
import com.hbm.items.machine.ItemWatzPellet.EnumWatzType;
|
||||||
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
|
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
|
||||||
@ -443,6 +444,22 @@ public class HazardRegistry {
|
|||||||
HazardSystem.register(DictFrame.fromOne(ModItems.watz_pellet, EnumWatzType.NQD), makeData(RADIATION, u235 * ingot * 4));
|
HazardSystem.register(DictFrame.fromOne(ModItems.watz_pellet, EnumWatzType.NQD), makeData(RADIATION, u235 * ingot * 4));
|
||||||
HazardSystem.register(DictFrame.fromOne(ModItems.watz_pellet, EnumWatzType.NQR), makeData(RADIATION, pu239 * ingot * 4));
|
HazardSystem.register(DictFrame.fromOne(ModItems.watz_pellet, EnumWatzType.NQR), makeData(RADIATION, pu239 * ingot * 4));
|
||||||
|
|
||||||
|
registerPWRFuel(EnumPWRFuel.MEU, uf * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HEU233, u233 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HEU235, u235 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.MEN, npf * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HEN237, np237 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.MOX, mox * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.MEP, purg * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HEP239, pu239 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HEP241, pu241 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.MEA, amrg * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HEA242, am242 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HES326, sa326 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.HES327, sa327 * billet * 2);
|
||||||
|
registerPWRFuel(EnumPWRFuel.BFB_AM_MIX, amrg * billet);
|
||||||
|
registerPWRFuel(EnumPWRFuel.BFB_PU241, pu241 * billet);
|
||||||
|
|
||||||
HazardSystem.register(powder_yellowcake, makeData(RADIATION, yc * powder));
|
HazardSystem.register(powder_yellowcake, makeData(RADIATION, yc * powder));
|
||||||
HazardSystem.register(block_yellowcake, makeData(RADIATION, yc * block * powder_mult));
|
HazardSystem.register(block_yellowcake, makeData(RADIATION, yc * block * powder_mult));
|
||||||
HazardSystem.register(ModItems.fallout, makeData(RADIATION, fo * powder));
|
HazardSystem.register(ModItems.fallout, makeData(RADIATION, fo * powder));
|
||||||
@ -535,6 +552,12 @@ public class HazardRegistry {
|
|||||||
private static HazardData makeData(HazardTypeBase hazard, float level) { return new HazardData().addEntry(hazard, level); }
|
private static HazardData makeData(HazardTypeBase hazard, float level) { return new HazardData().addEntry(hazard, level); }
|
||||||
private static HazardData makeData(HazardTypeBase hazard, float level, boolean override) { return new HazardData().addEntry(hazard, level, override); }
|
private static HazardData makeData(HazardTypeBase hazard, float level, boolean override) { return new HazardData().addEntry(hazard, level, override); }
|
||||||
|
|
||||||
|
private static void registerPWRFuel(EnumPWRFuel fuel, float baseRad) {
|
||||||
|
HazardSystem.register(DictFrame.fromOne(ModItems.pwr_fuel, fuel), makeData(RADIATION, baseRad));
|
||||||
|
HazardSystem.register(DictFrame.fromOne(ModItems.pwr_fuel_hot, fuel), makeData(RADIATION, baseRad * 10).addEntry(HOT, 5));
|
||||||
|
HazardSystem.register(DictFrame.fromOne(ModItems.pwr_fuel_depleted, fuel), makeData(RADIATION, baseRad * 10));
|
||||||
|
}
|
||||||
|
|
||||||
private static void registerRBMKPellet(Item pellet, float base, float dep) { registerRBMKPellet(pellet, base, dep, false, 0F, 0F); }
|
private static void registerRBMKPellet(Item pellet, float base, float dep) { registerRBMKPellet(pellet, base, dep, false, 0F, 0F); }
|
||||||
private static void registerRBMKPellet(Item pellet, float base, float dep, boolean linear) { registerRBMKPellet(pellet, base, dep, linear, 0F, 0F); }
|
private static void registerRBMKPellet(Item pellet, float base, float dep, boolean linear) { registerRBMKPellet(pellet, base, dep, linear, 0F, 0F); }
|
||||||
private static void registerRBMKPellet(Item pellet, float base, float dep, boolean linear, float blinding, float digamma) {
|
private static void registerRBMKPellet(Item pellet, float base, float dep, boolean linear, float blinding, float digamma) {
|
||||||
|
|||||||
@ -320,7 +320,7 @@ public class OreDictManager {
|
|||||||
/*
|
/*
|
||||||
* RADIOACTIVE
|
* RADIOACTIVE
|
||||||
*/
|
*/
|
||||||
U .rad(HazardRegistry.u) .nugget(nugget_uranium) .billet(billet_uranium) .ingot(ingot_uranium) .dust(powder_uranium) .block(block_uranium) .ore(ore_uranium, ore_uranium_scorched, ore_gneiss_uranium, ore_gneiss_uranium_scorched, ore_nether_uranium, ore_nether_uranium_scorched, ore_meteor_uranium) .oreNether(ore_nether_uranium, ore_nether_uranium_scorched);
|
U .rad(HazardRegistry.u) .nugget(nugget_uranium) .billet(billet_uranium) .ingot(ingot_uranium) .dust(powder_uranium) .block(block_uranium) .ore(ore_uranium, ore_uranium_scorched, ore_gneiss_uranium, ore_gneiss_uranium_scorched, ore_nether_uranium, ore_nether_uranium_scorched, ore_meteor_uranium, ore_sellafield_uranium_scorched) .oreNether(ore_nether_uranium, ore_nether_uranium_scorched);
|
||||||
U233 .rad(HazardRegistry.u233) .nugget(nugget_u233) .billet(billet_u233) .ingot(ingot_u233) .block(block_u233);
|
U233 .rad(HazardRegistry.u233) .nugget(nugget_u233) .billet(billet_u233) .ingot(ingot_u233) .block(block_u233);
|
||||||
U235 .rad(HazardRegistry.u235) .nugget(nugget_u235) .billet(billet_u235) .ingot(ingot_u235) .block(block_u235);
|
U235 .rad(HazardRegistry.u235) .nugget(nugget_u235) .billet(billet_u235) .ingot(ingot_u235) .block(block_u235);
|
||||||
U238 .rad(HazardRegistry.u238) .nugget(nugget_u238) .billet(billet_u238) .ingot(ingot_u238) .block(block_u238);
|
U238 .rad(HazardRegistry.u238) .nugget(nugget_u238) .billet(billet_u238) .ingot(ingot_u238) .block(block_u238);
|
||||||
@ -342,7 +342,7 @@ public class OreDictManager {
|
|||||||
CO60 .rad(HazardRegistry.co60) .hot(1) .nugget(nugget_co60) .billet(billet_co60) .ingot(ingot_co60) .dust(powder_co60);
|
CO60 .rad(HazardRegistry.co60) .hot(1) .nugget(nugget_co60) .billet(billet_co60) .ingot(ingot_co60) .dust(powder_co60);
|
||||||
AU198 .rad(HazardRegistry.au198) .hot(5) .nugget(nugget_au198) .billet(billet_au198) .ingot(ingot_au198) .dust(powder_au198);
|
AU198 .rad(HazardRegistry.au198) .hot(5) .nugget(nugget_au198) .billet(billet_au198) .ingot(ingot_au198) .dust(powder_au198);
|
||||||
PB209 .rad(HazardRegistry.pb209) .blinding(50F) .hot(7) .nugget(nugget_pb209) .billet(billet_pb209) .ingot(ingot_pb209);
|
PB209 .rad(HazardRegistry.pb209) .blinding(50F) .hot(7) .nugget(nugget_pb209) .billet(billet_pb209) .ingot(ingot_pb209);
|
||||||
SA326 .rad(HazardRegistry.sa326) .blinding(50F) .nugget(nugget_schrabidium) .billet(billet_schrabidium) .ingot(ingot_schrabidium) .dust(powder_schrabidium).plate(plate_schrabidium).plateCast(Mats.MAT_SCHRABIDIUM.make(plate_cast)).block(block_schrabidium).ore(ore_schrabidium, ore_gneiss_schrabidium, ore_nether_schrabidium) .oreNether(ore_nether_schrabidium);
|
SA326 .rad(HazardRegistry.sa326) .blinding(50F) .nugget(nugget_schrabidium) .billet(billet_schrabidium) .ingot(ingot_schrabidium) .dust(powder_schrabidium).plate(plate_schrabidium).plateCast(Mats.MAT_SCHRABIDIUM.make(plate_cast)).block(block_schrabidium).ore(ore_schrabidium, ore_gneiss_schrabidium, ore_nether_schrabidium, ore_sellafield_schrabidium) .oreNether(ore_nether_schrabidium);
|
||||||
SA327 .rad(HazardRegistry.sa327) .blinding(50F) .nugget(nugget_solinium) .billet(billet_solinium) .ingot(ingot_solinium) .block(block_solinium);
|
SA327 .rad(HazardRegistry.sa327) .blinding(50F) .nugget(nugget_solinium) .billet(billet_solinium) .ingot(ingot_solinium) .block(block_solinium);
|
||||||
SBD .rad(HazardRegistry.sb) .blinding(50F) .ingot(ingot_schrabidate) .dust(powder_schrabidate) .block(block_schrabidate);
|
SBD .rad(HazardRegistry.sb) .blinding(50F) .ingot(ingot_schrabidate) .dust(powder_schrabidate) .block(block_schrabidate);
|
||||||
SRN .rad(HazardRegistry.sr) .blinding(50F) .ingot(ingot_schraranium) .block(block_schraranium);
|
SRN .rad(HazardRegistry.sr) .blinding(50F) .ingot(ingot_schraranium) .block(block_schraranium);
|
||||||
|
|||||||
@ -1,115 +0,0 @@
|
|||||||
package com.hbm.inventory.container;
|
|
||||||
|
|
||||||
import com.hbm.inventory.SlotCraftingOutput;
|
|
||||||
import com.hbm.inventory.SlotTakeOnly;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineCMBFactory;
|
|
||||||
|
|
||||||
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 ContainerMachineCMBFactory extends Container {
|
|
||||||
|
|
||||||
private TileEntityMachineCMBFactory diFurnace;
|
|
||||||
private int progress;
|
|
||||||
|
|
||||||
public ContainerMachineCMBFactory(InventoryPlayer invPlayer, TileEntityMachineCMBFactory tedf) {
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 0, 62 + 9, 17));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 1, 80 + 9, 17));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 2, 62 + 9, 53));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 3, 80 + 9, 53));
|
|
||||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 4, 134 + 9, 35));
|
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 5, 62 - 9, 53));
|
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
for(int j = 0; j < 9; j++)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 0; i < 9; i++)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
|
||||||
super.addCraftingToCrafters(crafting);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.process);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 <= 5) {
|
|
||||||
if (!this.mergeItemStack(var5, 6, this.inventorySlots.size(), true))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(var5, 0, 4, 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.progress != this.diFurnace.process)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.process);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.progress = this.diFurnace.process;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 1)
|
|
||||||
{
|
|
||||||
diFurnace.process = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,116 +0,0 @@
|
|||||||
package com.hbm.inventory.container;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
|
||||||
|
|
||||||
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 ContainerMachineMiningDrill extends Container {
|
|
||||||
|
|
||||||
private TileEntityMachineMiningDrill nukeBoy;
|
|
||||||
|
|
||||||
private int warning;
|
|
||||||
|
|
||||||
public ContainerMachineMiningDrill(InventoryPlayer invPlayer, TileEntityMachineMiningDrill tedf) {
|
|
||||||
|
|
||||||
nukeBoy = tedf;
|
|
||||||
|
|
||||||
//Battery
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 53));
|
|
||||||
//Outputs
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 17));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 2, 98, 17));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 3, 116, 17));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 4, 80, 35));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 5, 98, 35));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 6, 116, 35));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 7, 80, 53));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 8, 98, 53));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 9, 116, 53));
|
|
||||||
//Upgrades
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 10, 152, 17));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 11, 152, 35));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 12, 152, 53));
|
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
for(int j = 0; j < 9; j++)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 0; i < 9; i++)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.detectAndSendChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 <= 12) {
|
|
||||||
if (!this.mergeItemStack(var5, 13, this.inventorySlots.size(), true))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!this.mergeItemStack(var5, 0, 13, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var5.stackSize == 0)
|
|
||||||
{
|
|
||||||
var4.putStack((ItemStack) null);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var4.onSlotChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return var3;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canInteractWith(EntityPlayer player) {
|
|
||||||
return nukeBoy.isUseableByPlayer(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++) {
|
|
||||||
ICrafting par1 = (ICrafting) this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.warning != this.nukeBoy.warning) {
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.warning = this.nukeBoy.warning;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 1) {
|
|
||||||
nukeBoy.warning = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
package com.hbm.inventory.container;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
|
||||||
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 ContainerNukeN45 extends Container {
|
|
||||||
|
|
||||||
private TileEntityNukeN45 diFurnace;
|
|
||||||
|
|
||||||
public ContainerNukeN45(InventoryPlayer invPlayer, TileEntityNukeN45 tedf) {
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
//Payload
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 35));
|
|
||||||
//Range up
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 1, 116, 35));
|
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
for(int j = 0; j < 9; j++)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 0; i < 9; i++)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
|
||||||
super.addCraftingToCrafters(crafting);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
|
||||||
{
|
|
||||||
ItemStack var3 = null;
|
|
||||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
|
||||||
|
|
||||||
if (var4 != null && var4.getHasStack())
|
|
||||||
{
|
|
||||||
ItemStack var5 = var4.getStack();
|
|
||||||
var3 = var5.copy();
|
|
||||||
|
|
||||||
if (par2 <= 1) {
|
|
||||||
if (!this.mergeItemStack(var5, 2, 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 diFurnace.isUseableByPlayer(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,88 +0,0 @@
|
|||||||
package com.hbm.inventory.container;
|
|
||||||
|
|
||||||
import com.hbm.inventory.SlotTakeOnly;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.inventory.Container;
|
|
||||||
import net.minecraft.inventory.Slot;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public class ContainerReactorMultiblock extends Container {
|
|
||||||
|
|
||||||
private TileEntityMachineReactorLarge diFurnace;
|
|
||||||
|
|
||||||
public ContainerReactorMultiblock(InventoryPlayer invPlayer, TileEntityMachineReactorLarge tedf) {
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
//Water in
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 0, 8, 90));
|
|
||||||
//Water out
|
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 1, 8, 108));
|
|
||||||
//Coolant in
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 2, 26, 90));
|
|
||||||
//Coolant out
|
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 3, 26, 108));
|
|
||||||
|
|
||||||
//Fuel in
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 4, 80, 36));
|
|
||||||
//Fuel out
|
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 5, 80, 72));
|
|
||||||
//Waste in
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 6, 152, 36));
|
|
||||||
//Waste out
|
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 7, 152, 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 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 <= 7) {
|
|
||||||
if (!this.mergeItemStack(var5, 8, this.inventorySlots.size(), true))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,138 +0,0 @@
|
|||||||
package com.hbm.inventory.container;
|
|
||||||
|
|
||||||
import com.hbm.items.ModItems;
|
|
||||||
import com.hbm.items.special.WatzFuel;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityWatzCore;
|
|
||||||
|
|
||||||
import api.hbm.energy.IBatteryItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.inventory.Container;
|
|
||||||
import net.minecraft.inventory.ICrafting;
|
|
||||||
import net.minecraft.inventory.Slot;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public class ContainerWatzCore extends Container {
|
|
||||||
|
|
||||||
private TileEntityWatzCore diFurnace;
|
|
||||||
|
|
||||||
public ContainerWatzCore(InventoryPlayer invPlayer, TileEntityWatzCore tedf) {
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 0, 8, 18));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 1, 26, 18));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 2, 44, 18));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 3, 62, 18));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 4, 80, 18));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 5, 98, 18));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 6, 8, 36));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 7, 26, 36));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 8, 44, 36));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 9, 62, 36));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 10, 80, 36));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 11, 98, 36));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 12, 8, 54));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 13, 26, 54));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 14, 44, 54));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 15, 62, 54));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 16, 80, 54));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 17, 98, 54));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 18, 8, 72));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 19, 26, 72));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 20, 44, 72));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 21, 62, 72));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 22, 80, 72));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 23, 98, 72));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 24, 8, 90));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 25, 26, 90));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 26, 44, 90));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 27, 62, 90));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 28, 80, 90));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 29, 98, 90));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 30, 8, 108));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 31, 26, 108));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 32, 44, 108));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 33, 62, 108));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 34, 80, 108));
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 35, 98, 108));
|
|
||||||
//Mud Input
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 36, 134, 108 - 18));
|
|
||||||
//Battery
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 37, 152, 108 - 18));
|
|
||||||
//Filter
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 38, 116, 63));
|
|
||||||
//Mud Output
|
|
||||||
this.addSlotToContainer(new Slot(tedf, 39, 134, 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 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 <= 39) {
|
|
||||||
if(!this.mergeItemStack(var5, 40, this.inventorySlots.size(), true)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if(var5.getItem() == ModItems.titanium_filter) {
|
|
||||||
if(!this.mergeItemStack(var5, 38, 39, false)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else if(var5.getItem() instanceof WatzFuel) {
|
|
||||||
if(!this.mergeItemStack(var5, 0, 36, false)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else if(var5.getItem() instanceof IBatteryItem) {
|
|
||||||
if(!this.mergeItemStack(var5, 37, 38, false)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(!this.mergeItemStack(var5, 36, 37, false)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(var5.stackSize == 0) {
|
|
||||||
var4.putStack((ItemStack) null);
|
|
||||||
} else {
|
|
||||||
var4.onSlotChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
var4.onPickupFromSlot(p_82846_1_, var5);
|
|
||||||
}
|
|
||||||
|
|
||||||
return var3;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canInteractWith(EntityPlayer player) {
|
|
||||||
return diFurnace.isUseableByPlayer(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
package com.hbm.inventory.gui;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerMachineCMBFactory;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineCMBFactory;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
|
|
||||||
public class GUIMachineCMBFactory extends GuiInfoContainer {
|
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_cmb_manufactory.png");
|
|
||||||
private TileEntityMachineCMBFactory diFurnace;
|
|
||||||
|
|
||||||
public GUIMachineCMBFactory(InventoryPlayer invPlayer, TileEntityMachineCMBFactory tedf) {
|
|
||||||
super(new ContainerMachineCMBFactory(invPlayer, tedf));
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.xSize = 176;
|
|
||||||
this.ySize = 166;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
|
||||||
super.drawScreen(mouseX, mouseY, f);
|
|
||||||
|
|
||||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 69 - 52, 16, 52);
|
|
||||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 106 - 88, 16, 88, diFurnace.power, diFurnace.maxPower);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
|
||||||
|
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
|
||||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
||||||
|
|
||||||
if(diFurnace.power > 0) {
|
|
||||||
int i = (int)diFurnace.getPowerScaled(52);
|
|
||||||
drawTexturedModalRect(guiLeft + 8, guiTop + 69 - i, 176, 52 - i, 16, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
int j1 = diFurnace.getProgressScaled(24);
|
|
||||||
drawTexturedModalRect(guiLeft + 101 + 9, guiTop + 34, 208, 0, j1 + 1, 16);
|
|
||||||
|
|
||||||
diFurnace.tank.renderTank(guiLeft + 26, guiTop + 69, this.zLevel, 16, 52);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
package com.hbm.inventory.gui;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerMachineMiningDrill;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
|
||||||
import com.hbm.util.I18nUtil;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
|
|
||||||
public class GUIMachineMiningDrill extends GuiInfoContainer {
|
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_drill.png");
|
|
||||||
private TileEntityMachineMiningDrill diFurnace;
|
|
||||||
|
|
||||||
public GUIMachineMiningDrill(InventoryPlayer invPlayer, TileEntityMachineMiningDrill tedf) {
|
|
||||||
super(new ContainerMachineMiningDrill(invPlayer, tedf));
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.xSize = 176;
|
|
||||||
this.ySize = 166;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
|
||||||
super.drawScreen(mouseX, mouseY, f);
|
|
||||||
|
|
||||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
|
||||||
|
|
||||||
String[] upgradeText = new String[4];
|
|
||||||
upgradeText[0] = I18nUtil.resolveKey("desc.gui.upgrade");
|
|
||||||
upgradeText[1] = I18nUtil.resolveKey("desc.gui.upgrade.speed");
|
|
||||||
upgradeText[2] = I18nUtil.resolveKey("desc.gui.upgrade.effectiveness");
|
|
||||||
upgradeText[3] = I18nUtil.resolveKey("desc.gui.upgrade.power");
|
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 141, guiTop + 39, 8, 8, guiLeft + 100, guiTop + 39 + 16 + 8, upgradeText);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
|
||||||
|
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
|
||||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
||||||
|
|
||||||
if(diFurnace.power > 0) {
|
|
||||||
int i = (int)diFurnace.getPowerScaled(52);
|
|
||||||
drawTexturedModalRect(guiLeft + 8, guiTop + 69 - i, 176, 52 - i, 16, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
int k = diFurnace.warning;
|
|
||||||
if(k == 2)
|
|
||||||
drawTexturedModalRect(guiLeft + 44, guiTop + 17, 192, 0, 16, 16);
|
|
||||||
if(k == 1)
|
|
||||||
drawTexturedModalRect(guiLeft + 44, guiTop + 17, 208, 0, 16, 16);
|
|
||||||
|
|
||||||
this.drawInfoPanel(guiLeft + 141, guiTop + 39, 8, 8, 8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -52,6 +52,7 @@ public class GUIMachineRadarNTSlots extends GuiInfoContainer {
|
|||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.radar.hasCustomInventoryName() ? this.radar.getInventoryName() : I18n.format(this.radar.getInventoryName());
|
String name = this.radar.hasCustomInventoryName() ? this.radar.getInventoryName() : I18n.format(this.radar.getInventoryName());
|
||||||
|
if(MainRegistry.polaroidID == 11) name = "Reda";
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
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);
|
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,73 +0,0 @@
|
|||||||
package com.hbm.inventory.gui;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerNukeN45;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
|
|
||||||
public class GUINukeN45 extends GuiInfoContainer {
|
|
||||||
|
|
||||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_n45.png");
|
|
||||||
private TileEntityNukeN45 diFurnace;
|
|
||||||
|
|
||||||
public GUINukeN45(InventoryPlayer invPlayer, TileEntityNukeN45 tedf) {
|
|
||||||
super(new ContainerNukeN45(invPlayer, tedf));
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.xSize = 176;
|
|
||||||
this.ySize = 168;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
|
||||||
super.drawScreen(mouseX, mouseY, f);
|
|
||||||
|
|
||||||
String[] text = new String[] { "The first slot holds the payload.",
|
|
||||||
"Acceptable payloads:",
|
|
||||||
" -Det Cord",
|
|
||||||
" -TNT",
|
|
||||||
" -Explosive Charge",
|
|
||||||
" -Nuclear Charge",
|
|
||||||
"Using detonator while in mine mode will",
|
|
||||||
"arm the mine, set to explode when",
|
|
||||||
"it detects a large entity nearby."};
|
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
|
||||||
|
|
||||||
String[] text1 = new String[] { "The second slot is for green machine",
|
|
||||||
"upgrades. Entity detection range increases",
|
|
||||||
"by 5 blocks for every level.",
|
|
||||||
"When left empty, the mine can not be armed",
|
|
||||||
"an will behave like a regular bomb." };
|
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
|
||||||
|
|
||||||
if(diFurnace.primed)
|
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 121, guiTop + 22, 6, 8, mouseX, mouseY, new String[]{ "Mine armed!" } );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
|
||||||
|
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
|
||||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
||||||
|
|
||||||
if(diFurnace.primed) {
|
|
||||||
drawTexturedModalRect(guiLeft + 121, guiTop + 22, 176, 0, 6, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
|
||||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,189 +0,0 @@
|
|||||||
package com.hbm.inventory.gui;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerReactorMultiblock;
|
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.packet.AuxButtonPacket;
|
|
||||||
import com.hbm.packet.PacketDispatcher;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
|
||||||
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.ResourceLocation;
|
|
||||||
|
|
||||||
public class GUIReactorMultiblock extends GuiInfoContainer {
|
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_large_experimental.png");
|
|
||||||
private TileEntityMachineReactorLarge diFurnace;
|
|
||||||
|
|
||||||
public GUIReactorMultiblock(InventoryPlayer invPlayer, TileEntityMachineReactorLarge tedf) {
|
|
||||||
super(new ContainerReactorMultiblock(invPlayer, tedf));
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.xSize = 176;
|
|
||||||
this.ySize = 222;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
|
||||||
super.drawScreen(mouseX, mouseY, f);
|
|
||||||
|
|
||||||
diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 88 - 52, 16, 52);
|
|
||||||
diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 88 - 52, 16, 52);
|
|
||||||
diFurnace.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 108, 88, 4);
|
|
||||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 114, 88, 4, new String[] { "Hull Temperature:", " " + Math.round((diFurnace.hullHeat) * 0.00001 * 980 + 20) + "°C" });
|
|
||||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 120, 88, 4, new String[] { "Core Temperature:", " " + Math.round((diFurnace.coreHeat) * 0.00002 * 980 + 20) + "°C" });
|
|
||||||
|
|
||||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 115, guiTop + 17, 18, 90, new String[] { "Operating Level: " + diFurnace.rods + "%" });
|
|
||||||
|
|
||||||
String fuel = "";
|
|
||||||
|
|
||||||
switch(diFurnace.type) {
|
|
||||||
case URANIUM:
|
|
||||||
fuel = "Uranium";
|
|
||||||
break;
|
|
||||||
case MOX:
|
|
||||||
fuel = "MOX";
|
|
||||||
break;
|
|
||||||
case PLUTONIUM:
|
|
||||||
fuel = "Plutonium";
|
|
||||||
break;
|
|
||||||
case SCHRABIDIUM:
|
|
||||||
fuel = "Schrabidium";
|
|
||||||
break;
|
|
||||||
case THORIUM:
|
|
||||||
fuel = "Thorium";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fuel = "ERROR";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 98, guiTop + 18, 16, 88, new String[] { fuel + ": " + (diFurnace.fuel / diFurnace.fuelMult) + "/" + (diFurnace.maxFuel / diFurnace.fuelMult) + "ng" });
|
|
||||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 18, 16, 88, new String[] { "Depleted " + fuel + ": " + (diFurnace.waste / diFurnace.fuelMult) + "/" + (diFurnace.maxWaste / diFurnace.fuelMult) + "ng" });
|
|
||||||
|
|
||||||
String[] text0 = new String[] { diFurnace.rods > 0 ? "Reactor is ON" : "Reactor is OFF"};
|
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 52, guiTop + 53, 18, 18, mouseX, mouseY, text0);
|
|
||||||
|
|
||||||
String s = "0";
|
|
||||||
|
|
||||||
FluidType type = diFurnace.tanks[2].getTankType();
|
|
||||||
if(type == Fluids.STEAM) s = "1x";
|
|
||||||
if(type == Fluids.HOTSTEAM) s = "10x";
|
|
||||||
if(type == Fluids.SUPERHOTSTEAM) s = "100x";
|
|
||||||
|
|
||||||
String[] text4 = new String[] { "Steam compression switch",
|
|
||||||
"Current compression level: " + s};
|
|
||||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 63, guiTop + 107, 14, 18, mouseX, mouseY, text4);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void mouseClicked(int x, int y, int i) {
|
|
||||||
super.mouseClicked(x, y, i);
|
|
||||||
|
|
||||||
if(guiLeft + 115 <= x && guiLeft + 115 + 18 > x && guiTop + 17 < y && guiTop + 17 + 90 >= y) {
|
|
||||||
|
|
||||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
|
||||||
|
|
||||||
int rods = (y - (guiTop + 24)) * 100 / 76;
|
|
||||||
|
|
||||||
if(rods < 0)
|
|
||||||
rods = 0;
|
|
||||||
|
|
||||||
if(rods > 100)
|
|
||||||
rods = 100;
|
|
||||||
|
|
||||||
rods = 100 - rods;
|
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, rods, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(guiLeft + 63 <= x && guiLeft + 63 + 14 > x && guiTop + 107 < y && guiTop + 107 + 18 >= y) {
|
|
||||||
|
|
||||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
|
||||||
int c = 0;
|
|
||||||
|
|
||||||
FluidType type = diFurnace.tanks[2].getTankType();
|
|
||||||
if(type == Fluids.STEAM) c = 0;
|
|
||||||
if(type == Fluids.HOTSTEAM) c = 1;
|
|
||||||
if(type == Fluids.SUPERHOTSTEAM) c = 2;
|
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, c, 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
|
||||||
|
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
|
||||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
||||||
|
|
||||||
int k = diFurnace.rods;
|
|
||||||
drawTexturedModalRect(guiLeft + 115, guiTop + 107 - 14 - (k * 76 / 100), 208, 36, 18, 14);
|
|
||||||
|
|
||||||
if(diFurnace.rods > 0)
|
|
||||||
drawTexturedModalRect(guiLeft + 52, guiTop + 53, 212, 0, 18, 18);
|
|
||||||
|
|
||||||
int q = diFurnace.getFuelScaled(88);
|
|
||||||
drawTexturedModalRect(guiLeft + 98, guiTop + 106 - q, 176, 124 - q, 16, q);
|
|
||||||
|
|
||||||
int j = diFurnace.getWasteScaled(88);
|
|
||||||
drawTexturedModalRect(guiLeft + 134, guiTop + 106 - j, 192, 124 - j, 16, j);
|
|
||||||
|
|
||||||
int s = diFurnace.size;
|
|
||||||
|
|
||||||
if(s < 8)
|
|
||||||
drawTexturedModalRect(guiLeft + 50, guiTop + 17, 208, 50 + s * 18, 22, 18);
|
|
||||||
else
|
|
||||||
drawTexturedModalRect(guiLeft + 50, guiTop + 17, 230, 50 + (s - 8) * 18, 22, 18);
|
|
||||||
|
|
||||||
|
|
||||||
FluidType type = diFurnace.tanks[2].getTankType();
|
|
||||||
if(type == Fluids.STEAM) drawTexturedModalRect(guiLeft + 63, guiTop + 107, 176, 18, 14, 18);
|
|
||||||
if(type == Fluids.HOTSTEAM) drawTexturedModalRect(guiLeft + 63, guiTop + 107, 190, 18, 14, 18);
|
|
||||||
if(type == Fluids.SUPERHOTSTEAM) drawTexturedModalRect(guiLeft + 63, guiTop + 107, 204, 18, 14, 18);
|
|
||||||
|
|
||||||
if(diFurnace.hasHullHeat()) {
|
|
||||||
int i = diFurnace.getHullHeatScaled(88);
|
|
||||||
|
|
||||||
i = (int) Math.min(i, 160);
|
|
||||||
|
|
||||||
drawTexturedModalRect(guiLeft + 80, guiTop + 114, 0, 226, i, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(diFurnace.hasCoreHeat()) {
|
|
||||||
int i = diFurnace.getCoreHeatScaled(88);
|
|
||||||
|
|
||||||
i = (int) Math.min(i, 160);
|
|
||||||
|
|
||||||
drawTexturedModalRect(guiLeft + 80, guiTop + 120, 0, 230, i, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(diFurnace.tanks[2].getFill() > 0) {
|
|
||||||
int i = diFurnace.getSteamScaled(88);
|
|
||||||
|
|
||||||
//i = (int) Math.min(i, 160);
|
|
||||||
|
|
||||||
int offset = 234;
|
|
||||||
|
|
||||||
if(type == Fluids.HOTSTEAM) offset += 4;
|
|
||||||
if(type == Fluids.SUPERHOTSTEAM) offset += 8;
|
|
||||||
|
|
||||||
drawTexturedModalRect(guiLeft + 80, guiTop + 108, 0, offset, i, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
diFurnace.tanks[0].renderTank(guiLeft + 8, guiTop + 88, this.zLevel, 16, 52);
|
|
||||||
diFurnace.tanks[1].renderTank(guiLeft + 26, guiTop + 88, this.zLevel, 16, 52);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.hbm.inventory.gui;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerWatzCore;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityWatzCore;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
|
|
||||||
public class GUIWatzCore extends GuiInfoContainer {
|
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_watz_multiblock.png");
|
|
||||||
private TileEntityWatzCore diFurnace;
|
|
||||||
|
|
||||||
public GUIWatzCore(InventoryPlayer invPlayer, TileEntityWatzCore tedf) {
|
|
||||||
super(new ContainerWatzCore(invPlayer, tedf));
|
|
||||||
diFurnace = tedf;
|
|
||||||
|
|
||||||
this.xSize = 176;
|
|
||||||
//this.ySize = 222;
|
|
||||||
this.ySize = 256;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
|
||||||
super.drawScreen(mouseX, mouseY, f);
|
|
||||||
|
|
||||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 106 - 18 - 70, 16, 70);
|
|
||||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 106 - 70, 16, 70 - 18, diFurnace.power, diFurnace.maxPower);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
|
||||||
|
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
|
||||||
this.fontRendererObj.drawString(I18n.format("container.inventory")/* + String.valueOf(diFurnace.powerList)*/, 8, this.ySize - 96 + 2 - 34, 4210752);
|
|
||||||
this.fontRendererObj.drawString(String.valueOf(diFurnace.powerList + " HE/tick"), 8, this.ySize - 50 + 2 + 13, 4210752);
|
|
||||||
this.fontRendererObj.drawString(String.valueOf(diFurnace.heatList + " heat"), 8, this.ySize - 50 + 2 + 22, 4210752);
|
|
||||||
this.fontRendererObj.drawString(String.valueOf((diFurnace.decayMultiplier * diFurnace.heat)/100 /100 + " waste/tick"), 8, this.ySize - 50 + 2 + 31, 4210752);
|
|
||||||
this.fontRendererObj.drawString(String.valueOf(diFurnace.powerMultiplier + "% power"), 100, this.ySize - 50 + 2 + 13, 4210752);
|
|
||||||
this.fontRendererObj.drawString(String.valueOf(diFurnace.heatMultiplier + "% heat"), 100, this.ySize - 50 + 2 + 22, 4210752);
|
|
||||||
this.fontRendererObj.drawString(String.valueOf(diFurnace.decayMultiplier + "% decay"), 100, this.ySize - 50 + 2 + 31, 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 l = (int)diFurnace.getPowerScaled(70);
|
|
||||||
drawTexturedModalRect(guiLeft + 152, guiTop + 106 - 18 - l, 192, 70 - l, 16, l);
|
|
||||||
|
|
||||||
diFurnace.tank.renderTank(guiLeft + 134, guiTop + 106 - 18, this.zLevel, 16, 70);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -197,6 +197,7 @@ public class AssemblerRecipes {
|
|||||||
makeRecipe(new ComparableStack(ModItems.warhead_volcano, 1), new AStack[] {new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_nuke, 3), new OreDictStack(U238.block(), 24), new ComparableStack(ModItems.circuit_tantalium, 5) }, 600);
|
makeRecipe(new ComparableStack(ModItems.warhead_volcano, 1), new AStack[] {new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_nuke, 3), new OreDictStack(U238.block(), 24), new ComparableStack(ModItems.circuit_tantalium, 5) }, 600);
|
||||||
makeRecipe(new ComparableStack(ModItems.warhead_thermo_endo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_endo, 2), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit_targeting_tier3, 1) },300);
|
makeRecipe(new ComparableStack(ModItems.warhead_thermo_endo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_endo, 2), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit_targeting_tier3, 1) },300);
|
||||||
makeRecipe(new ComparableStack(ModItems.warhead_thermo_exo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_exo, 2), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit_targeting_tier3, 1) },300);
|
makeRecipe(new ComparableStack(ModItems.warhead_thermo_exo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_exo, 2), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit_targeting_tier3, 1) },300);
|
||||||
|
makeRecipe(new ComparableStack(ModItems.missile_stealth, 1), new AStack[] { new OreDictStack(TI.plate(), 20), new OreDictStack(AL.plate(), 20), new OreDictStack(CU.plate(), 10), new OreDictStack(KEY_BLACK, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit_gold), new OreDictStack(STEEL.bolt(), 32) },1200);
|
||||||
makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new OreDictStack(DURA.ingot(), 32), new OreDictStack(B.ingot(), 8), new OreDictStack(PB.plate(), 16), new ComparableStack(ModItems.pipes_steel), new ComparableStack(ModItems.circuit_gold, 1) },600);
|
makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new OreDictStack(DURA.ingot(), 32), new OreDictStack(B.ingot(), 8), new OreDictStack(PB.plate(), 16), new ComparableStack(ModItems.pipes_steel), new ComparableStack(ModItems.circuit_gold, 1) },600);
|
||||||
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.photo_panel, 24), new ComparableStack(ModItems.board_copper, 12), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },500);
|
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.photo_panel, 24), new ComparableStack(ModItems.board_copper, 12), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },500);
|
||||||
makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.plate_desh, 2), new ComparableStack(ModItems.circuit_gold, 2), new OreDictStack(RUBBER.ingot(), 12), new OreDictStack(REDSTONE.dust(), 6), new ComparableStack(Items.diamond, 1), new ComparableStack(Blocks.glass_pane, 6), },400);
|
makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.plate_desh, 2), new ComparableStack(ModItems.circuit_gold, 2), new OreDictStack(RUBBER.ingot(), 12), new OreDictStack(REDSTONE.dust(), 6), new ComparableStack(Items.diamond, 1), new ComparableStack(Blocks.glass_pane, 6), },400);
|
||||||
|
|||||||
@ -95,7 +95,7 @@ public class MagicRecipes {
|
|||||||
recipes.add(new MagicRecipe(new ItemStack(ModItems.gun_darter),
|
recipes.add(new MagicRecipe(new ItemStack(ModItems.gun_darter),
|
||||||
new OreDictStack(STEEL.plate()),
|
new OreDictStack(STEEL.plate()),
|
||||||
new OreDictStack(STEEL.plate()),
|
new OreDictStack(STEEL.plate()),
|
||||||
new ComparableStack(ModItems.ingot_polymer),
|
new OreDictStack(ANY_PLASTIC.ingot()),
|
||||||
new OreDictStack(GOLD.plate())));
|
new OreDictStack(GOLD.plate())));
|
||||||
|
|
||||||
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_dart, 4, ItemAmmoEnums.AmmoDart.NUCLEAR.ordinal()),
|
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_dart, 4, ItemAmmoEnums.AmmoDart.NUCLEAR.ordinal()),
|
||||||
|
|||||||
@ -1324,6 +1324,7 @@ public class ModItems {
|
|||||||
public static Item missile_schrabidium;
|
public static Item missile_schrabidium;
|
||||||
public static Item missile_emp;
|
public static Item missile_emp;
|
||||||
public static Item missile_shuttle;
|
public static Item missile_shuttle;
|
||||||
|
public static Item missile_stealth;
|
||||||
|
|
||||||
public static Item mp_thruster_10_kerosene;
|
public static Item mp_thruster_10_kerosene;
|
||||||
public static Item mp_thruster_10_kerosene_tec;
|
public static Item mp_thruster_10_kerosene_tec;
|
||||||
@ -3943,6 +3944,7 @@ public class ModItems {
|
|||||||
missile_schrabidium = new Item().setUnlocalizedName("missile_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_schrabidium");
|
missile_schrabidium = new Item().setUnlocalizedName("missile_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_schrabidium");
|
||||||
missile_emp = new Item().setUnlocalizedName("missile_emp").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_emp");
|
missile_emp = new Item().setUnlocalizedName("missile_emp").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_emp");
|
||||||
missile_shuttle = new ItemMissileShuttle().setUnlocalizedName("missile_shuttle").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_shuttle");
|
missile_shuttle = new ItemMissileShuttle().setUnlocalizedName("missile_shuttle").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_shuttle");
|
||||||
|
missile_stealth = new Item().setUnlocalizedName("missile_stealth").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_stealth");
|
||||||
missile_carrier = new Item().setUnlocalizedName("missile_carrier").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_carrier");
|
missile_carrier = new Item().setUnlocalizedName("missile_carrier").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_carrier");
|
||||||
missile_soyuz = new ItemSoyuz().setUnlocalizedName("missile_soyuz").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz");
|
missile_soyuz = new ItemSoyuz().setUnlocalizedName("missile_soyuz").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz");
|
||||||
missile_soyuz_lander = new ItemCustomLore().setUnlocalizedName("missile_soyuz_lander").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz_lander");
|
missile_soyuz_lander = new ItemCustomLore().setUnlocalizedName("missile_soyuz_lander").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz_lander");
|
||||||
@ -6873,6 +6875,7 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(missile_schrabidium, missile_schrabidium.getUnlocalizedName());
|
GameRegistry.registerItem(missile_schrabidium, missile_schrabidium.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(missile_emp, missile_emp.getUnlocalizedName());
|
GameRegistry.registerItem(missile_emp, missile_emp.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(missile_shuttle, missile_shuttle.getUnlocalizedName());
|
GameRegistry.registerItem(missile_shuttle, missile_shuttle.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(missile_stealth, missile_stealth.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(missile_carrier, missile_carrier.getUnlocalizedName());
|
GameRegistry.registerItem(missile_carrier, missile_carrier.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(missile_soyuz, missile_soyuz.getUnlocalizedName());
|
GameRegistry.registerItem(missile_soyuz, missile_soyuz.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(missile_soyuz_lander, missile_soyuz_lander.getUnlocalizedName());
|
GameRegistry.registerItem(missile_soyuz_lander, missile_soyuz_lander.getUnlocalizedName());
|
||||||
|
|||||||
@ -106,7 +106,7 @@ public class ItemAssemblyTemplate extends Item {
|
|||||||
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
String s1 = ("" + StatCollector.translateToLocal(out.getUnlocalizedName() + ".name")).trim();
|
String s1 = out.getDisplayName().trim();
|
||||||
|
|
||||||
if(s1 != null) {
|
if(s1 != null) {
|
||||||
s = s + " " + s1;
|
s = s + " " + s1;
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
|||||||
NQD( 0x4B4B4B, 0x121212, 2_000, 20, 0.01D, new FunctionLinear(2D), new FunctionSqrt(1D/25D).withOff(25D * 25D), null),
|
NQD( 0x4B4B4B, 0x121212, 2_000, 20, 0.01D, new FunctionLinear(2D), new FunctionSqrt(1D/25D).withOff(25D * 25D), null),
|
||||||
NQR( 0x2D2D2D, 0x0B0B0B, 2_500, 30, 0.01D, new FunctionLinear(1.5D), new FunctionSqrt(1D/25D).withOff(25D * 25D), null);
|
NQR( 0x2D2D2D, 0x0B0B0B, 2_500, 30, 0.01D, new FunctionLinear(1.5D), new FunctionSqrt(1D/25D).withOff(25D * 25D), null);
|
||||||
|
|
||||||
public double yield = 1_000_000_000;
|
public double yield = 500_000_000;
|
||||||
public int colorLight;
|
public int colorLight;
|
||||||
public int colorDark;
|
public int colorDark;
|
||||||
public double mudContent; //how much mud per reaction flux should be produced
|
public double mudContent; //how much mud per reaction flux should be produced
|
||||||
@ -64,7 +64,7 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
|||||||
this.colorDark = colorDark;
|
this.colorDark = colorDark;
|
||||||
this.passive = passive;
|
this.passive = passive;
|
||||||
this.heatEmission = heatEmission;
|
this.heatEmission = heatEmission;
|
||||||
this.mudContent = mudContent;
|
this.mudContent = mudContent / 2D;
|
||||||
this.burnFunc = burnFunction;
|
this.burnFunc = burnFunction;
|
||||||
this.heatDiv = heatDivisor;
|
this.heatDiv = heatDivisor;
|
||||||
this.absorbFunc = absorbFunction;
|
this.absorbFunc = absorbFunction;
|
||||||
|
|||||||
@ -215,7 +215,7 @@ public class ItemStarterKit extends Item {
|
|||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_coal_off, 3));
|
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_excavator, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_diesel, 2));
|
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_diesel, 2));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_selenium, 1));
|
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_selenium, 1));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_cable, 64));
|
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_cable, 64));
|
||||||
|
|||||||
@ -44,9 +44,9 @@ public class ItemTrain extends ItemEnumMulti {
|
|||||||
public static enum EnumTrainType {
|
public static enum EnumTrainType {
|
||||||
|
|
||||||
// Engine Gauge Max Speed Accel. Eng. Brake Parking Brake
|
// Engine Gauge Max Speed Accel. Eng. Brake Parking Brake
|
||||||
CARGO_TRAM(TrainCargoTram.class, "Electric", "Standard Gauge", "10m/s", "0.2m/s", "<1m/s", "Yes"),
|
CARGO_TRAM(TrainCargoTram.class, "Electric", "Standard Gauge", "10m/s", "0.2m/s²", "<1m/s", "Yes"),
|
||||||
CARGO_TRAM_TRAILER(TrainCargoTramTrailer.class, null, "Standard Gauge", "Yes", null, null, "No"),
|
CARGO_TRAM_TRAILER(TrainCargoTramTrailer.class, null, "Standard Gauge", "Yes", null, null, "No"),
|
||||||
TUNNEL_BORE(TrainTunnelBore.class, "NONE", "Standard Gauge", "10m/s", "0.2m/s", "<1m/s", "Yes");
|
TUNNEL_BORE(TrainTunnelBore.class, "NONE", "Standard Gauge", "10m/s", "0.2m/s²", "<1m/s", "Yes");
|
||||||
|
|
||||||
public Class<? extends EntityRailCarBase> train;
|
public Class<? extends EntityRailCarBase> train;
|
||||||
public String engine;
|
public String engine;
|
||||||
@ -78,22 +78,26 @@ public class ItemTrain extends ItemEnumMulti {
|
|||||||
try { train = type.train.getConstructor(World.class).newInstance(world); } catch(Exception e) { }
|
try { train = type.train.getConstructor(World.class).newInstance(world); } catch(Exception e) { }
|
||||||
|
|
||||||
if(train != null && train.getGauge() == ((IRailNTM) b).getGauge(world, x, y, z)) {
|
if(train != null && train.getGauge() == ((IRailNTM) b).getGauge(world, x, y, z)) {
|
||||||
if(!world.isRemote) {
|
|
||||||
train.setPosition(x + fx, y + fy, z + fz);
|
train.setPosition(x + fx, y + fy, z + fz);
|
||||||
BlockPos anchor = train.getCurrentAnchorPos();
|
BlockPos anchor = train.getCurrentAnchorPos();
|
||||||
train.rotationYaw = entity.rotationYaw;
|
train.rotationYaw = entity.rotationYaw;
|
||||||
Vec3 corePos = train.getRelPosAlongRail(anchor, 0, new MoveContext(RailCheckType.CORE, 0));
|
Vec3 corePos = train.getRelPosAlongRail(anchor, 0, new MoveContext(RailCheckType.CORE, 0));
|
||||||
|
if(corePos != null) {
|
||||||
train.setPosition(corePos.xCoord, corePos.yCoord, corePos.zCoord);
|
train.setPosition(corePos.xCoord, corePos.yCoord, corePos.zCoord);
|
||||||
Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan(), new MoveContext(RailCheckType.FRONT, train.getCollisionSpan() - train.getLengthSpan()));
|
Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan(), new MoveContext(RailCheckType.FRONT, train.getCollisionSpan() - train.getLengthSpan()));
|
||||||
Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan(), new MoveContext(RailCheckType.BACK, train.getCollisionSpan() - train.getLengthSpan()));
|
Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan(), new MoveContext(RailCheckType.BACK, train.getCollisionSpan() - train.getLengthSpan()));
|
||||||
|
if(frontPos != null && backPos != null) {
|
||||||
|
if(!world.isRemote) {
|
||||||
train.rotationYaw = train.generateYaw(frontPos, backPos);
|
train.rotationYaw = train.generateYaw(frontPos, backPos);
|
||||||
world.spawnEntityInWorld(train);
|
world.spawnEntityInWorld(train);
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.stackSize--;
|
stack.stackSize--;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,11 @@ package com.hbm.items.tool;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.entity.effect.EntityNukeTorex;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.saveddata.TomSaveData;
|
import com.hbm.util.TrackerUtil;
|
||||||
|
import com.hbm.world.WorldUtil;
|
||||||
|
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -40,11 +43,19 @@ public class ItemWandD extends Item {
|
|||||||
TimeAnalyzer.endCount();
|
TimeAnalyzer.endCount();
|
||||||
TimeAnalyzer.dump();*/
|
TimeAnalyzer.dump();*/
|
||||||
|
|
||||||
TomSaveData data = TomSaveData.forWorld(world);
|
/*TomSaveData data = TomSaveData.forWorld(world);
|
||||||
data.impact = true;
|
data.impact = true;
|
||||||
data.fire = 0F;
|
data.fire = 0F;
|
||||||
data.dust = 0F;
|
data.dust = 0F;
|
||||||
data.markDirty();
|
data.markDirty();*/
|
||||||
|
|
||||||
|
/*for(int i = -5; i <= 5; i++) {
|
||||||
|
for(int j = -5; j <= 5; j++) {
|
||||||
|
WorldUtil.setBiome(world, pos.blockX + i, pos.blockZ + j, BiomeGenCraterBase.craterBiome);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WorldUtil.syncBiomeChange(world, pos.blockX, pos.blockZ);*/
|
||||||
|
|
||||||
/*EntityTomBlast tom = new EntityTomBlast(world);
|
/*EntityTomBlast tom = new EntityTomBlast(world);
|
||||||
tom.posX = pos.blockX;
|
tom.posX = pos.blockX;
|
||||||
@ -53,12 +64,11 @@ public class ItemWandD extends Item {
|
|||||||
tom.destructionRange = 600;
|
tom.destructionRange = 600;
|
||||||
world.spawnEntityInWorld(tom);*/
|
world.spawnEntityInWorld(tom);*/
|
||||||
|
|
||||||
/*EntityNukeTorex torex = new EntityNukeTorex(world);
|
EntityNukeTorex torex = new EntityNukeTorex(world);
|
||||||
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
|
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
|
||||||
torex.setScale(1.5F);
|
torex.setScale(1.5F);
|
||||||
torex.setType(1);
|
|
||||||
world.spawnEntityInWorld(torex);
|
world.spawnEntityInWorld(torex);
|
||||||
TrackerUtil.setTrackingRange(world, torex, 1000);*/
|
TrackerUtil.setTrackingRange(world, torex, 1000);
|
||||||
|
|
||||||
/*EntityTracker entitytracker = ((WorldServer) world).getEntityTracker();
|
/*EntityTracker entitytracker = ((WorldServer) world).getEntityTracker();
|
||||||
IntHashMap map = ReflectionHelper.getPrivateValue(EntityTracker.class, entitytracker, "trackedEntityIDs", "field_72794_c");
|
IntHashMap map = ReflectionHelper.getPrivateValue(EntityTracker.class, entitytracker, "trackedEntityIDs", "field_72794_c");
|
||||||
|
|||||||
@ -4,8 +4,6 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.world.machine.FWatz;
|
import com.hbm.world.machine.FWatz;
|
||||||
import com.hbm.world.machine.NuclearReactor;
|
|
||||||
import com.hbm.world.machine.Watz;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -19,10 +17,8 @@ public class ItemWandS extends Item {
|
|||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||||
{
|
{
|
||||||
list.add("Creative-only item");
|
list.add("DEPRECATED");
|
||||||
list.add("\"Instant structures for everyone!\"");
|
|
||||||
list.add("(Cycle with shift-right click,");
|
|
||||||
list.add("spawn structures with right click!)");
|
|
||||||
if(itemstack.stackTagCompound != null)
|
if(itemstack.stackTagCompound != null)
|
||||||
{
|
{
|
||||||
switch(itemstack.stackTagCompound.getInteger("building"))
|
switch(itemstack.stackTagCompound.getInteger("building"))
|
||||||
@ -58,10 +54,8 @@ public class ItemWandS extends Item {
|
|||||||
switch(stack.stackTagCompound.getInteger("building"))
|
switch(stack.stackTagCompound.getInteger("building"))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
new NuclearReactor().generate(world, rand, x, up ? y : y - 4, z);
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
new Watz().generate(world, rand, x, up ? y : y - 12, z);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
new FWatz().generateHull(world, rand, x, up ? y : y - 18, z);
|
new FWatz().generateHull(world, rand, x, up ? y : y - 18, z);
|
||||||
|
|||||||
@ -216,7 +216,7 @@ public class ItemAmmoHIMARS extends Item {
|
|||||||
|
|
||||||
this.itemTypes[LARGE_TB] = new HIMARSRocket("single_tb", "himars_single_tb", 1) {
|
this.itemTypes[LARGE_TB] = new HIMARSRocket("single_tb", "himars_single_tb", 1) {
|
||||||
public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) {
|
public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) {
|
||||||
standardExplosion(rocket, mop, 50F, 12F, true, ModBlocks.slag, 1);
|
standardExplosion(rocket, mop, 50F, 12F, true, ModBlocks.block_slag, 1);
|
||||||
ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30);
|
ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30);
|
||||||
standardMush(rocket, mop, 35);
|
standardMush(rocket, mop, 35);
|
||||||
}};
|
}};
|
||||||
|
|||||||
@ -76,6 +76,8 @@ public class Library {
|
|||||||
public static String Barnaby99_x = "b04cf173-cff0-4acd-aa19-3d835224b43d";
|
public static String Barnaby99_x = "b04cf173-cff0-4acd-aa19-3d835224b43d";
|
||||||
public static String Ma118 = "1121cb7a-8773-491f-8e2b-221290c93d81";
|
public static String Ma118 = "1121cb7a-8773-491f-8e2b-221290c93d81";
|
||||||
public static String Adam29Adam29 = "bbae7bfa-0eba-40ac-a0dd-f3b715e73e61";
|
public static String Adam29Adam29 = "bbae7bfa-0eba-40ac-a0dd-f3b715e73e61";
|
||||||
|
public static String Alcater = "0b399a4a-8545-45a1-be3d-ece70d7d48e9";
|
||||||
|
public static String ege444 = "42ee978c-442a-4cd8-95b6-29e469b6df10";
|
||||||
|
|
||||||
public static Set<String> contributors = Sets.newHashSet(new String[] {
|
public static Set<String> contributors = Sets.newHashSet(new String[] {
|
||||||
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
|
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
|
||||||
@ -164,10 +166,7 @@ public class Library {
|
|||||||
return true;
|
return true;
|
||||||
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
||||||
tileentity instanceof IFluidSource)) ||
|
tileentity instanceof IFluidSource)) ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.reactor_hatch ||
|
|
||||||
world.getBlock(x, y, z) == ModBlocks.reactor_conductor ||
|
|
||||||
world.getBlock(x, y, z) == ModBlocks.fusion_hatch ||
|
world.getBlock(x, y, z) == ModBlocks.fusion_hatch ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.watz_hatch ||
|
|
||||||
world.getBlock(x, y, z) == ModBlocks.fwatz_hatch ||
|
world.getBlock(x, y, z) == ModBlocks.fwatz_hatch ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_limiter ||
|
world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_limiter ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_emitter ||
|
world.getBlock(x, y, z) == ModBlocks.dummy_port_ams_emitter ||
|
||||||
@ -390,23 +389,6 @@ public class Library {
|
|||||||
Block block = worldObj.getBlock(x, y, z);
|
Block block = worldObj.getBlock(x, y, z);
|
||||||
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
||||||
|
|
||||||
//Large Nuclear Reactor
|
|
||||||
if(block == ModBlocks.reactor_hatch && worldObj.getBlock(x, y, z + 2) == ModBlocks.reactor_computer)
|
|
||||||
{
|
|
||||||
tileentity = worldObj.getTileEntity(x, y, z + 2);
|
|
||||||
}
|
|
||||||
if(block == ModBlocks.reactor_hatch && worldObj.getBlock(x, y, z - 2) == ModBlocks.reactor_computer)
|
|
||||||
{
|
|
||||||
tileentity = worldObj.getTileEntity(x, y, z - 2);
|
|
||||||
}
|
|
||||||
if(block == ModBlocks.reactor_hatch && worldObj.getBlock(x + 2, y, z) == ModBlocks.reactor_computer)
|
|
||||||
{
|
|
||||||
tileentity = worldObj.getTileEntity(x + 2, y, z);
|
|
||||||
}
|
|
||||||
if(block == ModBlocks.reactor_hatch && worldObj.getBlock(x - 2, y, z) == ModBlocks.reactor_computer)
|
|
||||||
{
|
|
||||||
tileentity = worldObj.getTileEntity(x - 2, y, z);
|
|
||||||
}
|
|
||||||
//FWatz Reactor
|
//FWatz Reactor
|
||||||
if(block == ModBlocks.fwatz_hatch && worldObj.getBlock(x, y + 11, z + 9) == ModBlocks.fwatz_core)
|
if(block == ModBlocks.fwatz_hatch && worldObj.getBlock(x, y + 11, z + 9) == ModBlocks.fwatz_core)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
|||||||
public class RefStrings {
|
public class RefStrings {
|
||||||
public static final String MODID = "hbm";
|
public static final String MODID = "hbm";
|
||||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||||
public static final String VERSION = "1.0.27 BETA (4824)";
|
public static final String VERSION = "1.0.27 BETA (4837)";
|
||||||
//HBM's Beta Naming Convention:
|
//HBM's Beta Naming Convention:
|
||||||
//V T (X)
|
//V T (X)
|
||||||
//V -> next release version
|
//V -> next release version
|
||||||
|
|||||||
@ -185,7 +185,6 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeSolinium.class, new RenderNukeSolinium());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeSolinium.class, new RenderNukeSolinium());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeN2.class, new RenderNukeN2());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeN2.class, new RenderNukeN2());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeMan.class, new RenderNukeMan());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeMan.class, new RenderNukeMan());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeN45.class, new RenderNukeN45());
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeBalefire.class, new RenderNukeFstbmb());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeBalefire.class, new RenderNukeFstbmb());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBombMulti.class, new RenderBombMulti());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBombMulti.class, new RenderBombMulti());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeMike.class, new RenderNukeMike());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeMike.class, new RenderNukeMike());
|
||||||
@ -224,7 +223,6 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineGasFlare.class, new RenderGasFlare());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineGasFlare.class, new RenderGasFlare());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyBrick.class, new RenderChimneyBrick());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyBrick.class, new RenderChimneyBrick());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyIndustrial.class, new RenderChimneyIndustrial());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyIndustrial.class, new RenderChimneyIndustrial());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningDrill.class, new RenderMiningDrill());
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningLaser.class, new RenderLaserMiner());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningLaser.class, new RenderLaserMiner());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssemfac.class, new RenderAssemfac());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssemfac.class, new RenderAssemfac());
|
||||||
@ -339,7 +337,6 @@ public class ClientProxy extends ServerProxy {
|
|||||||
//DecoContainer
|
//DecoContainer
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFileCabinet.class, new RenderFileCabinet());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFileCabinet.class, new RenderFileCabinet());
|
||||||
//multiblocks
|
//multiblocks
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStructureMarker.class, new RenderStructureMaker());
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzStruct.class, new RenderSoyuzMultiblock());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzStruct.class, new RenderSoyuzMultiblock());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITERStruct.class, new RenderITERMultiblock());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITERStruct.class, new RenderITERMultiblock());
|
||||||
@ -668,6 +665,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCustom.class, new RenderMissileCustom());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCustom.class, new RenderMissileCustom());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileGeneric.class, new RenderMissileGeneric());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileGeneric.class, new RenderMissileGeneric());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileDecoy.class, new RenderMissileGeneric());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileDecoy.class, new RenderMissileGeneric());
|
||||||
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileStealth.class, new RenderMissileGeneric());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileAntiBallistic.class, new RenderMissileGeneric());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileAntiBallistic.class, new RenderMissileGeneric());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileIncendiary.class, new RenderMissileGeneric());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileIncendiary.class, new RenderMissileGeneric());
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCluster.class, new RenderMissileGeneric());
|
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCluster.class, new RenderMissileGeneric());
|
||||||
|
|||||||
@ -107,8 +107,6 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModItems.plate_polymer, 4), new Object[] { "BB", 'B', "ingotBrick" });
|
addRecipeAuto(new ItemStack(ModItems.plate_polymer, 4), new Object[] { "BB", 'B', "ingotBrick" });
|
||||||
addRecipeAuto(new ItemStack(ModItems.plate_polymer, 4), new Object[] { "BB", 'B', "ingotNetherBrick" });
|
addRecipeAuto(new ItemStack(ModItems.plate_polymer, 4), new Object[] { "BB", 'B', "ingotNetherBrick" });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.marker_structure, 1), new Object[] { "L", "G", "R", 'L', LAPIS.dust(), 'G', Items.glowstone_dust, 'R', Blocks.redstone_torch });
|
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModItems.circuit_raw, 1), new Object[] { "A", "R", "S", 'S', STEEL.plate(), 'R', REDSTONE.dust(), 'A', ModItems.wire_aluminium });
|
addRecipeAuto(new ItemStack(ModItems.circuit_raw, 1), new Object[] { "A", "R", "S", 'S', STEEL.plate(), 'R', REDSTONE.dust(), 'A', ModItems.wire_aluminium });
|
||||||
addRecipeAuto(new ItemStack(ModItems.circuit_bismuth_raw, 1), new Object[] { "RPR", "ABA", "RPR", 'R', REDSTONE.dust(), 'P', ANY_PLASTIC.ingot(), 'A', (GeneralConfig.enable528 ? ModItems.circuit_tantalium : ASBESTOS.ingot()), 'B', ModItems.ingot_bismuth });
|
addRecipeAuto(new ItemStack(ModItems.circuit_bismuth_raw, 1), new Object[] { "RPR", "ABA", "RPR", 'R', REDSTONE.dust(), 'P', ANY_PLASTIC.ingot(), 'A', (GeneralConfig.enable528 ? ModItems.circuit_tantalium : ASBESTOS.ingot()), 'B', ModItems.ingot_bismuth });
|
||||||
addRecipeAuto(new ItemStack(ModItems.circuit_tantalium_raw, 1), new Object[] { "RWR", "PTP", "RWR", 'R', REDSTONE.dust(), 'W', ModItems.wire_gold, 'P', CU.plate(), 'T', TA.nugget() });
|
addRecipeAuto(new ItemStack(ModItems.circuit_tantalium_raw, 1), new Object[] { "RWR", "PTP", "RWR", 'R', REDSTONE.dust(), 'W', ModItems.wire_gold, 'P', CU.plate(), 'T', TA.nugget() });
|
||||||
@ -518,8 +516,12 @@ public class CraftingManager {
|
|||||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_straight_short, 5), new Object[] { ModBlocks.rail_large_straight });
|
addShapelessAuto(new ItemStack(ModBlocks.rail_large_straight_short, 5), new Object[] { ModBlocks.rail_large_straight });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_buffer, 1), new Object[] { " S", "RS", 'R', ModBlocks.rail_large_straight, 'S', STEEL.ingot() });
|
addRecipeAuto(new ItemStack(ModBlocks.rail_large_buffer, 1), new Object[] { " S", "RS", 'R', ModBlocks.rail_large_straight, 'S', STEEL.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve, 1), new Object[] { "R ", " R", 'R', ModBlocks.rail_large_straight });
|
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve, 1), new Object[] { "R ", " R", 'R', ModBlocks.rail_large_straight });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve_wide, 1), new Object[] { "RR", " R", 'R', ModBlocks.rail_large_straight });
|
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve_7, 1), new Object[] { "RR", " R", 'R', ModBlocks.rail_large_straight });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve_9, 1), new Object[] { "RR ", " R", " R", 'R', ModBlocks.rail_large_straight });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_ramp, 1), new Object[] { " R ", "SSS", 'R', ModBlocks.rail_large_straight, 'S', KEY_SLAB });
|
addRecipeAuto(new ItemStack(ModBlocks.rail_large_ramp, 1), new Object[] { " R ", "SSS", 'R', ModBlocks.rail_large_straight, 'S', KEY_SLAB });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.rail_large_switch, 1), new Object[] { "R R", " RR", " R", 'R', ModBlocks.rail_large_straight });
|
||||||
|
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch), new Object[] { ModBlocks.rail_large_switch_flipped });
|
||||||
|
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch_flipped), new Object[] { ModBlocks.rail_large_switch });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.bomb_multi), 1), new Object[] { "AAD", "CHF", "AAD", 'A', ModItems.wire_aluminium, 'C', ModItems.circuit_aluminium, 'H', ModItems.hull_small_aluminium, 'F', ModItems.fins_quad_titanium, 'D', KEY_WHITE });
|
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.bomb_multi), 1), new Object[] { "AAD", "CHF", "AAD", 'A', ModItems.wire_aluminium, 'C', ModItems.circuit_aluminium, 'H', ModItems.hull_small_aluminium, 'F', ModItems.fins_quad_titanium, 'D', KEY_WHITE });
|
||||||
addShapelessAuto(new ItemStack(ModItems.powder_ice, 4), new Object[] { Items.snowball, KNO.dust(), REDSTONE.dust() });
|
addShapelessAuto(new ItemStack(ModItems.powder_ice, 4), new Object[] { Items.snowball, KNO.dust(), REDSTONE.dust() });
|
||||||
@ -1077,6 +1079,8 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModBlocks.ore_nether_uranium, 8), new Object[] { "OOO", "OBO", "OOO", 'O', ModBlocks.ore_nether_uranium_scorched, 'B', Items.water_bucket });
|
addRecipeAuto(new ItemStack(ModBlocks.ore_nether_uranium, 8), new Object[] { "OOO", "OBO", "OOO", 'O', ModBlocks.ore_nether_uranium_scorched, 'B', Items.water_bucket });
|
||||||
addShapelessAuto(new ItemStack(ModBlocks.ore_gneiss_uranium, 1), new Object[] { ModBlocks.ore_gneiss_uranium_scorched, Items.water_bucket });
|
addShapelessAuto(new ItemStack(ModBlocks.ore_gneiss_uranium, 1), new Object[] { ModBlocks.ore_gneiss_uranium_scorched, Items.water_bucket });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.ore_gneiss_uranium, 8), new Object[] { "OOO", "OBO", "OOO", 'O', ModBlocks.ore_gneiss_uranium_scorched, 'B', Items.water_bucket });
|
addRecipeAuto(new ItemStack(ModBlocks.ore_gneiss_uranium, 8), new Object[] { "OOO", "OBO", "OOO", 'O', ModBlocks.ore_gneiss_uranium_scorched, 'B', Items.water_bucket });
|
||||||
|
addShapelessAuto(new ItemStack(ModBlocks.ore_uranium, 1), new Object[] { ModBlocks.ore_sellafield_uranium_scorched, Items.water_bucket });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.ore_uranium, 8), new Object[] { "OOO", "OBO", "OOO", 'O', ModBlocks.ore_sellafield_uranium_scorched, 'B', Items.water_bucket });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModItems.plate_iron, 4), new Object[] { "##", "##", '#', IRON.ingot() });
|
addRecipeAuto(new ItemStack(ModItems.plate_iron, 4), new Object[] { "##", "##", '#', IRON.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModItems.plate_gold, 4), new Object[] { "##", "##", '#', GOLD.ingot() });
|
addRecipeAuto(new ItemStack(ModItems.plate_gold, 4), new Object[] { "##", "##", '#', GOLD.ingot() });
|
||||||
|
|||||||
@ -43,10 +43,10 @@ import com.hbm.saveddata.satellites.Satellite;
|
|||||||
import com.hbm.tileentity.TileMappings;
|
import com.hbm.tileentity.TileMappings;
|
||||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||||
import com.hbm.util.*;
|
import com.hbm.util.*;
|
||||||
|
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||||
import com.hbm.world.feature.BedrockOre;
|
import com.hbm.world.feature.BedrockOre;
|
||||||
import com.hbm.world.feature.OreCave;
|
import com.hbm.world.feature.OreCave;
|
||||||
import com.hbm.world.feature.OreLayer3D;
|
import com.hbm.world.feature.OreLayer3D;
|
||||||
@ -295,6 +295,8 @@ public class MainRegistry {
|
|||||||
OreDictManager.registerGroups(); //important to run first
|
OreDictManager.registerGroups(); //important to run first
|
||||||
OreDictManager.registerOres();
|
OreDictManager.registerOres();
|
||||||
|
|
||||||
|
BiomeGenCraterBase.initDictionary();
|
||||||
|
|
||||||
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
|
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
|
||||||
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");
|
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");
|
||||||
Library.superuser.add("937c9804-e11f-4ad2-a5b1-42e62ac73077");
|
Library.superuser.add("937c9804-e11f-4ad2-a5b1-42e62ac73077");
|
||||||
@ -861,7 +863,6 @@ public class MainRegistry {
|
|||||||
ArmorUtil.register();
|
ArmorUtil.register();
|
||||||
HazmatRegistry.registerHazmats();
|
HazmatRegistry.registerHazmats();
|
||||||
FluidContainerRegistry.register();
|
FluidContainerRegistry.register();
|
||||||
TileEntityMachineReactorLarge.registerAll();
|
|
||||||
BlockToolConversion.registerRecipes();
|
BlockToolConversion.registerRecipes();
|
||||||
AchievementHandler.register();
|
AchievementHandler.register();
|
||||||
|
|
||||||
@ -1189,6 +1190,26 @@ public class MainRegistry {
|
|||||||
ignoreMappings.add("hbm:tile.bomber");
|
ignoreMappings.add("hbm:tile.bomber");
|
||||||
ignoreMappings.add("hbm:item.bolt_tungsten");
|
ignoreMappings.add("hbm:item.bolt_tungsten");
|
||||||
ignoreMappings.add("hbm:item.bolt_dura_steel");
|
ignoreMappings.add("hbm:item.bolt_dura_steel");
|
||||||
|
ignoreMappings.add("hbm:tile.rail_large_curve_wide");
|
||||||
|
ignoreMappings.add("hbm:tile.nuke_n45");
|
||||||
|
ignoreMappings.add("hbm:tile.machine_coal_off");
|
||||||
|
ignoreMappings.add("hbm:tile.machine_coal_on");
|
||||||
|
ignoreMappings.add("hbm:tile.machine_drill");
|
||||||
|
ignoreMappings.add("hbm:tile.drill_pipe");
|
||||||
|
ignoreMappings.add("hbm:tile.dummy_block_drill");
|
||||||
|
ignoreMappings.add("hbm:tile.dummy_port_drill");
|
||||||
|
ignoreMappings.add("hbm:tile.machine_combine_factory");
|
||||||
|
ignoreMappings.add("hbm:tile.watz_core");
|
||||||
|
ignoreMappings.add("hbm:tile.watz_hatch");
|
||||||
|
ignoreMappings.add("hbm:tile.marker_structure");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_element");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_control");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_hatch");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_ejector");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_inserter");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_conductor");
|
||||||
|
ignoreMappings.add("hbm:tile.reactor_computer");
|
||||||
|
ignoreMappings.add("hbm:tile.ff");
|
||||||
|
|
||||||
/// REMAP ///
|
/// REMAP ///
|
||||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.hbm.main;
|
package com.hbm.main;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -12,6 +13,10 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import com.hbm.blocks.ILookOverlay;
|
import com.hbm.blocks.ILookOverlay;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.generic.BlockAshes;
|
import com.hbm.blocks.generic.BlockAshes;
|
||||||
|
import com.hbm.blocks.rail.IRailNTM;
|
||||||
|
import com.hbm.blocks.rail.IRailNTM.MoveContext;
|
||||||
|
import com.hbm.blocks.rail.IRailNTM.RailCheckType;
|
||||||
|
import com.hbm.blocks.rail.IRailNTM.RailContext;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.entity.mob.EntityHunterChopper;
|
import com.hbm.entity.mob.EntityHunterChopper;
|
||||||
import com.hbm.entity.projectile.EntityChopperMine;
|
import com.hbm.entity.projectile.EntityChopperMine;
|
||||||
@ -64,6 +69,7 @@ import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
|||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
import com.hbm.util.ItemStackUtil;
|
import com.hbm.util.ItemStackUtil;
|
||||||
import com.hbm.util.LoggingUtil;
|
import com.hbm.util.LoggingUtil;
|
||||||
|
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||||
import com.hbm.wiaj.GuiWorldInAJar;
|
import com.hbm.wiaj.GuiWorldInAJar;
|
||||||
import com.hbm.wiaj.cannery.CanneryBase;
|
import com.hbm.wiaj.cannery.CanneryBase;
|
||||||
import com.hbm.wiaj.cannery.Jars;
|
import com.hbm.wiaj.cannery.Jars;
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.hbm.items.armor.IArmorDisableModel;
|
|||||||
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
|
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
|
||||||
import com.hbm.packet.PermaSyncHandler;
|
import com.hbm.packet.PermaSyncHandler;
|
||||||
import com.hbm.render.model.ModelMan;
|
import com.hbm.render.model.ModelMan;
|
||||||
|
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
@ -20,6 +21,7 @@ import net.minecraft.client.model.ModelRenderer;
|
|||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.client.renderer.entity.RenderManager;
|
import net.minecraft.client.renderer.entity.RenderManager;
|
||||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
|
import net.minecraft.client.settings.GameSettings;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
@ -27,12 +29,16 @@ import net.minecraft.item.ItemBlock;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||||
import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors;
|
import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors;
|
||||||
import net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity;
|
import net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||||
|
import net.minecraftforge.common.ForgeModContainer;
|
||||||
|
|
||||||
public class ModEventHandlerRenderer {
|
public class ModEventHandlerRenderer {
|
||||||
|
|
||||||
@ -369,6 +375,13 @@ public class ModEventHandlerRenderer {
|
|||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOW)
|
@SubscribeEvent(priority = EventPriority.LOW)
|
||||||
public void tintFog(FogColors event) {
|
public void tintFog(FogColors event) {
|
||||||
|
|
||||||
|
EntityPlayer player = MainRegistry.proxy.me();
|
||||||
|
Vec3 color = getFogBlendColor(player.worldObj, (int) Math.floor(player.posX), (int) Math.floor(player.posZ), event.renderPartialTicks);
|
||||||
|
event.red = (float) color.xCoord;
|
||||||
|
event.green = (float) color.yCoord;
|
||||||
|
event.blue = (float) color.zCoord;
|
||||||
|
|
||||||
float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold);
|
float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold);
|
||||||
float sootColor = 0.15F;
|
float sootColor = 0.15F;
|
||||||
float sootReq = (float) RadiationConfig.sootFogDivisor;
|
float sootReq = (float) RadiationConfig.sootFogDivisor;
|
||||||
@ -390,4 +403,71 @@ public class ModEventHandlerRenderer {
|
|||||||
GL11.glTranslated(horizontal * mult, vertical * mult, 0);
|
GL11.glTranslated(horizontal * mult, vertical * mult, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean fogInit = false;
|
||||||
|
private static int fogX;
|
||||||
|
private static int fogZ;
|
||||||
|
private static Vec3 fogRGBMultiplier;
|
||||||
|
|
||||||
|
/** Same procedure as getting the blended sky color but for fog */
|
||||||
|
public static Vec3 getFogBlendColor(World world, int playerX, int playerZ, double partialTicks) {
|
||||||
|
|
||||||
|
if(playerX == fogX && playerZ == fogZ && fogInit) return fogRGBMultiplier;
|
||||||
|
|
||||||
|
fogInit = true;
|
||||||
|
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
||||||
|
int[] ranges = ForgeModContainer.blendRanges;
|
||||||
|
int distance = 0;
|
||||||
|
|
||||||
|
if(settings.fancyGraphics && settings.renderDistanceChunks >= 0 && settings.renderDistanceChunks < ranges.length) {
|
||||||
|
distance = ranges[settings.renderDistanceChunks];
|
||||||
|
}
|
||||||
|
|
||||||
|
float r = 0F;
|
||||||
|
float g = 0F;
|
||||||
|
float b = 0F;
|
||||||
|
|
||||||
|
int divider = 0;
|
||||||
|
|
||||||
|
for(int x = -distance; x <= distance; x++) {
|
||||||
|
for(int z = -distance; z <= distance; z++) {
|
||||||
|
BiomeGenBase biome = world.getBiomeGenForCoords(playerX + x, playerZ + z);
|
||||||
|
Vec3 color = getBiomeFogColors(world, biome, partialTicks);
|
||||||
|
r += color.xCoord;
|
||||||
|
g += color.yCoord;
|
||||||
|
b += color.zCoord;
|
||||||
|
divider++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fogX = playerX;
|
||||||
|
fogZ = playerZ;
|
||||||
|
|
||||||
|
fogRGBMultiplier = Vec3.createVectorHelper(r / divider, g / divider, b / divider);
|
||||||
|
return fogRGBMultiplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns the current biome's fog color adjusted for brightness if in a crater, or the world's cached fog color if not */
|
||||||
|
public static Vec3 getBiomeFogColors(World world, BiomeGenBase biome, double partialTicks) {
|
||||||
|
|
||||||
|
Vec3 worldFog = world.getFogColor((float) partialTicks);
|
||||||
|
double r = worldFog.xCoord;
|
||||||
|
double g = worldFog.yCoord;
|
||||||
|
double b = worldFog.zCoord;
|
||||||
|
|
||||||
|
if(biome instanceof BiomeGenCraterBase) {
|
||||||
|
int color = biome.getSkyColorByTemp(biome.temperature);
|
||||||
|
r = ((color & 0xff0000) >> 16) / 255F;
|
||||||
|
g = ((color & 0x00ff00) >> 8) / 255F;
|
||||||
|
b = (color & 0x0000ff) / 255F;
|
||||||
|
|
||||||
|
float celestialAngle = world.getCelestialAngle((float) partialTicks);
|
||||||
|
float skyBrightness = MathHelper.clamp_float(MathHelper.cos(celestialAngle * (float) Math.PI * 2.0F) * 2.0F + 0.5F, 0F, 1F);
|
||||||
|
r *= skyBrightness;
|
||||||
|
g *= skyBrightness;
|
||||||
|
b *= skyBrightness;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Vec3.createVectorHelper(r, g, b);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,6 @@ public class NEIConfig implements IConfigureNEI {
|
|||||||
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
|
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
|
||||||
API.hideItem(ItemBattery.getFullBattery(ModItems.memory));
|
API.hideItem(ItemBattery.getFullBattery(ModItems.memory));
|
||||||
|
|
||||||
API.hideItem(new ItemStack(ModBlocks.machine_coal_on));
|
|
||||||
API.hideItem(new ItemStack(ModBlocks.machine_electric_furnace_on));
|
API.hideItem(new ItemStack(ModBlocks.machine_electric_furnace_on));
|
||||||
API.hideItem(new ItemStack(ModBlocks.machine_difurnace_on));
|
API.hideItem(new ItemStack(ModBlocks.machine_difurnace_on));
|
||||||
API.hideItem(new ItemStack(ModBlocks.machine_nuke_furnace_on));
|
API.hideItem(new ItemStack(ModBlocks.machine_nuke_furnace_on));
|
||||||
@ -110,7 +109,6 @@ public class NEIConfig implements IConfigureNEI {
|
|||||||
API.hideItem(new ItemStack(ModItems.burnt_bark));
|
API.hideItem(new ItemStack(ModItems.burnt_bark));
|
||||||
API.hideItem(new ItemStack(ModItems.ams_core_thingy));
|
API.hideItem(new ItemStack(ModItems.ams_core_thingy));
|
||||||
}
|
}
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_drill));
|
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_base));
|
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_base));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_emitter));
|
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_emitter));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_limiter));
|
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_limiter));
|
||||||
@ -118,7 +116,6 @@ public class NEIConfig implements IConfigureNEI {
|
|||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_blast));
|
API.hideItem(new ItemStack(ModBlocks.dummy_block_blast));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_uf6));
|
API.hideItem(new ItemStack(ModBlocks.dummy_block_uf6));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_puf6));
|
API.hideItem(new ItemStack(ModBlocks.dummy_block_puf6));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_drill));
|
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_base));
|
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_base));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_emitter));
|
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_emitter));
|
||||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_limiter));
|
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_limiter));
|
||||||
|
|||||||
@ -1047,6 +1047,7 @@ public class ResourceManager {
|
|||||||
//Missiles
|
//Missiles
|
||||||
public static final IModelCustom missileV2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_v2.obj")).asDisplayList();
|
public static final IModelCustom missileV2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_v2.obj")).asDisplayList();
|
||||||
public static final IModelCustom missileABM = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_abm.obj")).asDisplayList();
|
public static final IModelCustom missileABM = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_abm.obj")).asDisplayList();
|
||||||
|
public static final IModelCustom missileStealth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_stealth.obj"), false).asDisplayList();
|
||||||
public static final IModelCustom missileStrong = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_strong.obj"));
|
public static final IModelCustom missileStrong = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_strong.obj"));
|
||||||
public static final IModelCustom missileHuge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_huge.obj"));
|
public static final IModelCustom missileHuge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_huge.obj"));
|
||||||
public static final IModelCustom missileNuclear = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileNeon.obj"));
|
public static final IModelCustom missileNuclear = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileNeon.obj"));
|
||||||
@ -1191,6 +1192,7 @@ public class ResourceManager {
|
|||||||
public static final ResourceLocation missileV2_BU_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2_bu.png");
|
public static final ResourceLocation missileV2_BU_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2_bu.png");
|
||||||
public static final ResourceLocation missileV2_decoy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2_decoy.png");
|
public static final ResourceLocation missileV2_decoy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2_decoy.png");
|
||||||
public static final ResourceLocation missileAA_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_abm.png");
|
public static final ResourceLocation missileAA_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_abm.png");
|
||||||
|
public static final ResourceLocation missileStealth_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_stealth.png");
|
||||||
public static final ResourceLocation missileStrong_HE_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong.png");
|
public static final ResourceLocation missileStrong_HE_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong.png");
|
||||||
public static final ResourceLocation missileStrong_EMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong_emp.png");
|
public static final ResourceLocation missileStrong_EMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong_emp.png");
|
||||||
public static final ResourceLocation missileStrong_IN_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong_inc.png");
|
public static final ResourceLocation missileStrong_IN_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong_inc.png");
|
||||||
@ -1469,7 +1471,8 @@ public class ResourceManager {
|
|||||||
public static final IModelCustom rail_standard_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard.obj"));
|
public static final IModelCustom rail_standard_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard.obj"));
|
||||||
public static final IModelCustom rail_standard_straight_short = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_short.obj"));
|
public static final IModelCustom rail_standard_straight_short = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_short.obj"));
|
||||||
public static final IModelCustom rail_standard_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend.obj"));
|
public static final IModelCustom rail_standard_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend.obj"));
|
||||||
public static final IModelCustom rail_standard_curve_wide = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend_wide.obj"));
|
public static final IModelCustom rail_standard_curve_wide7 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend_wide.obj"));
|
||||||
|
public static final IModelCustom rail_standard_curve_wide9 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend_wide9.obj"));
|
||||||
public static final IModelCustom rail_standard_ramp = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_ramp.obj"));
|
public static final IModelCustom rail_standard_ramp = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_ramp.obj"));
|
||||||
public static final IModelCustom rail_standard_buffer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_buffer.obj"));
|
public static final IModelCustom rail_standard_buffer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_buffer.obj"));
|
||||||
public static final IModelCustom rail_standard_switch = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_switch.obj"));
|
public static final IModelCustom rail_standard_switch = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_switch.obj"));
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import com.hbm.tileentity.machine.TileEntityCoreStabilizer;
|
|||||||
import com.hbm.tileentity.machine.TileEntityForceField;
|
import com.hbm.tileentity.machine.TileEntityForceField;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMissileAssembly;
|
import com.hbm.tileentity.machine.TileEntityMachineMissileAssembly;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
|
||||||
import com.hbm.tileentity.machine.TileEntitySoyuzLauncher;
|
import com.hbm.tileentity.machine.TileEntitySoyuzLauncher;
|
||||||
import com.hbm.tileentity.machine.storage.TileEntityBarrel;
|
import com.hbm.tileentity.machine.storage.TileEntityBarrel;
|
||||||
import com.hbm.tileentity.machine.storage.TileEntityMachineBattery;
|
import com.hbm.tileentity.machine.storage.TileEntityMachineBattery;
|
||||||
@ -85,30 +84,6 @@ public class AuxButtonPacket implements IMessage {
|
|||||||
field.isOn = !field.isOn;
|
field.isOn = !field.isOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (te instanceof TileEntityMachineReactorLarge) {
|
|
||||||
TileEntityMachineReactorLarge reactor = (TileEntityMachineReactorLarge)te;
|
|
||||||
|
|
||||||
if(m.id == 0)
|
|
||||||
reactor.rods = m.value;
|
|
||||||
|
|
||||||
if(m.id == 1) {
|
|
||||||
FluidType type = Fluids.STEAM;
|
|
||||||
int fill = reactor.tanks[2].getFill();
|
|
||||||
|
|
||||||
switch(m.value) {
|
|
||||||
case 0: type = Fluids.HOTSTEAM; fill = (int)Math.floor(fill / 10D); break;
|
|
||||||
case 1: type = Fluids.SUPERHOTSTEAM; fill = (int)Math.floor(fill / 10D); break;
|
|
||||||
case 2: type = Fluids.STEAM; fill = (int)Math.floor(fill * 100); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fill > reactor.tanks[2].getMaxFill())
|
|
||||||
fill = reactor.tanks[2].getMaxFill();
|
|
||||||
|
|
||||||
reactor.tanks[2].setTankType(type);
|
|
||||||
reactor.tanks[2].setFill(fill);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (te instanceof TileEntityMachineMissileAssembly) {
|
if (te instanceof TileEntityMachineMissileAssembly) {
|
||||||
TileEntityMachineMissileAssembly assembly = (TileEntityMachineMissileAssembly)te;
|
TileEntityMachineMissileAssembly assembly = (TileEntityMachineMissileAssembly)te;
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import com.hbm.items.weapon.ItemMissile.PartSize;
|
|||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.tileentity.bomb.TileEntityCompactLauncher;
|
import com.hbm.tileentity.bomb.TileEntityCompactLauncher;
|
||||||
import com.hbm.tileentity.bomb.TileEntityLaunchTable;
|
import com.hbm.tileentity.bomb.TileEntityLaunchTable;
|
||||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||||
@ -127,11 +126,6 @@ public class AuxGaugePacket implements IMessage {
|
|||||||
if(m.id == 0)
|
if(m.id == 0)
|
||||||
boiler.heat = m.value;
|
boiler.heat = m.value;
|
||||||
}
|
}
|
||||||
if (te instanceof TileEntityNukeN45) {
|
|
||||||
TileEntityNukeN45 nuke = (TileEntityNukeN45)te;
|
|
||||||
|
|
||||||
nuke.primed = m.value == 1;
|
|
||||||
}
|
|
||||||
if (te instanceof TileEntityCompactLauncher) {
|
if (te instanceof TileEntityCompactLauncher) {
|
||||||
TileEntityCompactLauncher launcher = (TileEntityCompactLauncher)te;
|
TileEntityCompactLauncher launcher = (TileEntityCompactLauncher)te;
|
||||||
|
|
||||||
|
|||||||
@ -28,8 +28,8 @@ public class BiomeSyncPacket implements IMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BiomeSyncPacket(int blockX, int blockZ, byte biome) {
|
public BiomeSyncPacket(int blockX, int blockZ, byte biome) {
|
||||||
this.chunkX = blockX << 4;
|
this.chunkX = blockX >> 4;
|
||||||
this.chunkZ = blockZ << 4;
|
this.chunkZ = blockZ >> 4;
|
||||||
this.blockX = (byte) (blockX & 15);
|
this.blockX = (byte) (blockX & 15);
|
||||||
this.blockZ = (byte) (blockZ & 15);
|
this.blockZ = (byte) (blockZ & 15);
|
||||||
this.biome = biome;
|
this.biome = biome;
|
||||||
@ -63,7 +63,6 @@ public class BiomeSyncPacket implements IMessage {
|
|||||||
this.blockX = buf.readByte();
|
this.blockX = buf.readByte();
|
||||||
this.blockZ = buf.readByte();
|
this.blockZ = buf.readByte();
|
||||||
} else {
|
} else {
|
||||||
buf.writeBoolean(true);
|
|
||||||
this.biomeArray = new byte[256];
|
this.biomeArray = new byte[256];
|
||||||
for(int i = 0; i < 256; i++) {
|
for(int i = 0; i < 256; i++) {
|
||||||
this.biomeArray[i] = buf.readByte();
|
this.biomeArray[i] = buf.readByte();
|
||||||
@ -80,12 +79,15 @@ public class BiomeSyncPacket implements IMessage {
|
|||||||
World world = Minecraft.getMinecraft().theWorld;
|
World world = Minecraft.getMinecraft().theWorld;
|
||||||
if(!world.getChunkProvider().chunkExists(m.chunkX, m.chunkZ)) return null;
|
if(!world.getChunkProvider().chunkExists(m.chunkX, m.chunkZ)) return null;
|
||||||
Chunk chunk = world.getChunkFromChunkCoords(m.chunkX, m.chunkZ);
|
Chunk chunk = world.getChunkFromChunkCoords(m.chunkX, m.chunkZ);
|
||||||
|
chunk.isModified = true;
|
||||||
|
|
||||||
if(m.biomeArray == null) {
|
if(m.biomeArray == null) {
|
||||||
chunk.getBiomeArray()[(m.blockZ & 15) << 4 | (m.blockX & 15)] = m.biome;
|
chunk.getBiomeArray()[(m.blockZ & 15) << 4 | (m.blockX & 15)] = m.biome;
|
||||||
|
world.markBlockRangeForRenderUpdate(m.chunkX << 4, 0, m.chunkZ << 4, m.chunkX << 4, 255, m.chunkZ << 4);
|
||||||
} else {
|
} else {
|
||||||
for(int i = 0; i < 256; i++) {
|
for(int i = 0; i < 256; i++) {
|
||||||
chunk.getBiomeArray()[i] = m.biomeArray[i];
|
chunk.getBiomeArray()[i] = m.biomeArray[i];
|
||||||
|
world.markBlockRangeForRenderUpdate(m.chunkX << 4, 0, m.chunkZ << 4, (m.chunkX << 4) + 15, 255, (m.chunkZ << 4) + 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,18 +55,6 @@ public class LoopedSoundPacket implements IMessage {
|
|||||||
public IMessage onMessage(LoopedSoundPacket m, MessageContext ctx) {
|
public IMessage onMessage(LoopedSoundPacket m, MessageContext ctx) {
|
||||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||||
|
|
||||||
if (te != null && te instanceof TileEntityMachineMiningDrill) {
|
|
||||||
|
|
||||||
boolean flag = true;
|
|
||||||
for(int i = 0; i < SoundLoopMiner.list.size(); i++) {
|
|
||||||
if(SoundLoopMiner.list.get(i).getTE() == te && !SoundLoopMiner.list.get(i).isDonePlaying())
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(flag && te.getWorldObj().isRemote && ((TileEntityMachineMiningDrill)te).torque > 0.2F)
|
|
||||||
Minecraft.getMinecraft().getSoundHandler().playSound(new SoundLoopMiner(new ResourceLocation("hbm:block.minerOperate"), te));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (te != null && te instanceof TileEntityMachineAssembler) {
|
if (te != null && te instanceof TileEntityMachineAssembler) {
|
||||||
|
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
|
|||||||
@ -15,10 +15,6 @@ public class PacketDispatcher {
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
//Machine type for marker rendering
|
|
||||||
wrapper.registerMessage(TEStructurePacket.Handler.class, TEStructurePacket.class, i++, Side.CLIENT);
|
|
||||||
//Mining drill rotation for rendering
|
|
||||||
wrapper.registerMessage(TEDrillPacket.Handler.class, TEDrillPacket.class, i++, Side.CLIENT);
|
|
||||||
//Fluid packet for GUI
|
//Fluid packet for GUI
|
||||||
wrapper.registerMessage(TEFluidPacket.Handler.class, TEFluidPacket.class, i++, Side.CLIENT);
|
wrapper.registerMessage(TEFluidPacket.Handler.class, TEFluidPacket.class, i++, Side.CLIENT);
|
||||||
//Sound packet that keeps client and server separated
|
//Sound packet that keeps client and server separated
|
||||||
|
|||||||
@ -1,67 +0,0 @@
|
|||||||
package com.hbm.packet;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
public class TEDrillPacket implements IMessage {
|
|
||||||
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
int z;
|
|
||||||
float spin;
|
|
||||||
float torque;
|
|
||||||
|
|
||||||
public TEDrillPacket()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public TEDrillPacket(int x, int y, int z, float spin, float torque)
|
|
||||||
{
|
|
||||||
this.x = x;
|
|
||||||
this.y = y;
|
|
||||||
this.z = z;
|
|
||||||
this.spin = spin;
|
|
||||||
this.torque = torque;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void fromBytes(ByteBuf buf) {
|
|
||||||
x = buf.readInt();
|
|
||||||
y = buf.readInt();
|
|
||||||
z = buf.readInt();
|
|
||||||
spin = buf.readFloat();
|
|
||||||
torque = buf.readFloat();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void toBytes(ByteBuf buf) {
|
|
||||||
buf.writeInt(x);
|
|
||||||
buf.writeInt(y);
|
|
||||||
buf.writeInt(z);
|
|
||||||
buf.writeFloat(spin);
|
|
||||||
buf.writeFloat(torque);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Handler implements IMessageHandler<TEDrillPacket, IMessage> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IMessage onMessage(TEDrillPacket m, MessageContext ctx) {
|
|
||||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
|
||||||
|
|
||||||
if (te != null && te instanceof TileEntityMachineMiningDrill) {
|
|
||||||
|
|
||||||
TileEntityMachineMiningDrill gen = (TileEntityMachineMiningDrill) te;
|
|
||||||
gen.rotation = m.spin;
|
|
||||||
gen.torque = m.torque;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
package com.hbm.packet;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityStructureMarker;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
public class TEStructurePacket implements IMessage {
|
|
||||||
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
int z;
|
|
||||||
int type;
|
|
||||||
|
|
||||||
public TEStructurePacket()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public TEStructurePacket(int x, int y, int z, int type)
|
|
||||||
{
|
|
||||||
this.x = x;
|
|
||||||
this.y = y;
|
|
||||||
this.z = z;
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void fromBytes(ByteBuf buf) {
|
|
||||||
x = buf.readInt();
|
|
||||||
y = buf.readInt();
|
|
||||||
z = buf.readInt();
|
|
||||||
type = buf.readInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void toBytes(ByteBuf buf) {
|
|
||||||
buf.writeInt(x);
|
|
||||||
buf.writeInt(y);
|
|
||||||
buf.writeInt(z);
|
|
||||||
buf.writeInt(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Handler implements IMessageHandler<TEStructurePacket, IMessage> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IMessage onMessage(TEStructurePacket m, MessageContext ctx) {
|
|
||||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
|
||||||
|
|
||||||
if (te != null && te instanceof TileEntityStructureMarker) {
|
|
||||||
|
|
||||||
TileEntityStructureMarker marker = (TileEntityStructureMarker) te;
|
|
||||||
marker.type = m.type;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -41,7 +41,10 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
|||||||
renderer.setRenderBoundsFromBlock(block);
|
renderer.setRenderBoundsFromBlock(block);
|
||||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||||
|
IBlockMultiPass multi = (IBlockMultiPass) block;
|
||||||
|
|
||||||
|
for(int i = 0; i < (multi.shouldRenderItemMulti() ? multi.getPasses() : 1); i++) {
|
||||||
|
this.currentPass = i;
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
|
||||||
@ -66,6 +69,7 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
|||||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
|
||||||
/** terrible hack to make this shit work */
|
/** terrible hack to make this shit work */
|
||||||
if(block == ModBlocks.ore_random) {
|
if(block == ModBlocks.ore_random) {
|
||||||
|
|||||||
@ -138,7 +138,7 @@ public class RenderTorex extends Render {
|
|||||||
float f4 = ActiveRenderInfo.rotationXY;
|
float f4 = ActiveRenderInfo.rotationXY;
|
||||||
float f5 = ActiveRenderInfo.rotationXZ;
|
float f5 = ActiveRenderInfo.rotationXZ;
|
||||||
|
|
||||||
float brightness = 0.75F * cloud.colorMod;
|
float brightness = cloud.type == cloud.type.CONDENSATION ? 0.9F : 0.75F * cloud.colorMod;
|
||||||
Vec3 color = cloud.getInterpColor(interp);
|
Vec3 color = cloud.getInterpColor(interp);
|
||||||
tess.setColorRGBA_F((float)color.xCoord * brightness, (float)color.yCoord * brightness, (float)color.zCoord * brightness, alpha);
|
tess.setColorRGBA_F((float)color.xCoord * brightness, (float)color.yCoord * brightness, (float)color.zCoord * brightness, alpha);
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.render.entity.rocket;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||||
|
import com.hbm.entity.missile.EntityMissileStealth;
|
||||||
import com.hbm.entity.missile.EntityMissileTier1.*;
|
import com.hbm.entity.missile.EntityMissileTier1.*;
|
||||||
import com.hbm.main.ResourceManager;
|
import com.hbm.main.ResourceManager;
|
||||||
|
|
||||||
@ -28,6 +29,9 @@ public class RenderMissileGeneric extends Render {
|
|||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
ResourceManager.missileABM.renderAll();
|
ResourceManager.missileABM.renderAll();
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
} else if(entity instanceof EntityMissileStealth) {
|
||||||
|
bindTexture(ResourceManager.missileStealth_tex);
|
||||||
|
ResourceManager.missileStealth.renderAll();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if(entity instanceof EntityMissileGeneric)
|
if(entity instanceof EntityMissileGeneric)
|
||||||
|
|||||||
@ -322,19 +322,6 @@ public class ItemRenderLibrary {
|
|||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
}});
|
}});
|
||||||
|
|
||||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_drill), new ItemRenderBase() {
|
|
||||||
public void renderInventory() {
|
|
||||||
GL11.glTranslated(0, -2, 0);
|
|
||||||
GL11.glScaled(3, 3, 3);
|
|
||||||
}
|
|
||||||
public void renderCommon() {
|
|
||||||
GL11.glRotated(180, 0, 1, 0);
|
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
|
||||||
bindTexture(ResourceManager.drill_body_tex); ResourceManager.drill_body.renderAll();
|
|
||||||
bindTexture(ResourceManager.drill_bolt_tex); ResourceManager.drill_bolt.renderAll();
|
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
|
||||||
}});
|
|
||||||
|
|
||||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_mining_laser), new ItemRenderBase() {
|
renderers.put(Item.getItemFromBlock(ModBlocks.machine_mining_laser), new ItemRenderBase() {
|
||||||
public void renderInventory() {
|
public void renderInventory() {
|
||||||
GL11.glTranslated(0, -0.5, 0);
|
GL11.glTranslated(0, -0.5, 0);
|
||||||
|
|||||||
@ -32,19 +32,21 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer {
|
|||||||
|
|
||||||
//TODO: add a registry for missile rendering to be reused here and for the entity renderer
|
//TODO: add a registry for missile rendering to be reused here and for the entity renderer
|
||||||
if(toRender.getItem() == ModItems.missile_generic) {
|
if(toRender.getItem() == ModItems.missile_generic) {
|
||||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
|
||||||
bindTexture(ResourceManager.missileV2_HE_tex);
|
bindTexture(ResourceManager.missileV2_HE_tex);
|
||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
ResourceManager.missileV2.renderAll();
|
ResourceManager.missileV2.renderAll();
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
}
|
}
|
||||||
if(toRender.getItem() == ModItems.missile_decoy) {
|
if(toRender.getItem() == ModItems.missile_decoy) {
|
||||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
|
||||||
bindTexture(ResourceManager.missileV2_decoy_tex);
|
bindTexture(ResourceManager.missileV2_decoy_tex);
|
||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
ResourceManager.missileV2.renderAll();
|
ResourceManager.missileV2.renderAll();
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
}
|
}
|
||||||
|
if(toRender.getItem() == ModItems.missile_stealth) {
|
||||||
|
bindTexture(ResourceManager.missileStealth_tex);
|
||||||
|
ResourceManager.missileStealth.renderAll();
|
||||||
|
}
|
||||||
if(toRender.getItem() == ModItems.missile_strong) {
|
if(toRender.getItem() == ModItems.missile_strong) {
|
||||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||||
bindTexture(ResourceManager.missileStrong_HE_tex);
|
bindTexture(ResourceManager.missileStrong_HE_tex);
|
||||||
|
|||||||
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