mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Compare commits
167 Commits
1.0.27_X55
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed481dded5 | ||
|
|
960d28740b | ||
|
|
ca247c69b8 | ||
|
|
b76027cb58 | ||
|
|
efa69dbde0 | ||
|
|
b7f40edb85 | ||
|
|
225b39dfe0 | ||
|
|
ad72c71082 | ||
|
|
f62fcc89cb | ||
|
|
2313cd3b44 | ||
|
|
36a39b09e4 | ||
|
|
6be023015f | ||
|
|
04708e8c90 | ||
|
|
e20baf4293 | ||
|
|
f4e43ce829 | ||
|
|
18187e8010 | ||
|
|
e20d28f1d6 | ||
|
|
43c59db14b | ||
|
|
2d6fbfc2d9 | ||
|
|
18074097c7 | ||
|
|
888ced0977 | ||
|
|
3c520944bc | ||
|
|
84344889b7 | ||
|
|
af34fb730f | ||
|
|
08d12bceb3 | ||
|
|
22bd62f789 | ||
|
|
75946a0054 | ||
|
|
29bec0725b | ||
|
|
57db8cc9ab | ||
|
|
0e687e0ff5 | ||
|
|
3361d0a35e | ||
|
|
fcf016b0f3 | ||
|
|
c70cb9aaed | ||
|
|
eba8484a98 | ||
|
|
3a580a6b41 | ||
|
|
65be5db641 | ||
|
|
f6243aaaab | ||
|
|
4ed8bc7a64 | ||
|
|
057c0b005d | ||
|
|
67bffe1dab | ||
|
|
d842871ba8 | ||
|
|
17999f2f38 | ||
|
|
bb3c301f4c | ||
|
|
9a9c29632c | ||
|
|
6451ff4cb7 | ||
|
|
bcfff3f860 | ||
|
|
6f0f80414a | ||
|
|
720fb07b0f | ||
|
|
f53d7f07e0 | ||
|
|
ecab0fbcb3 | ||
|
|
f9311eff8d | ||
|
|
55f15a274d | ||
|
|
068c3a8b7d | ||
|
|
1ad65345b0 | ||
|
|
4e0bce27df | ||
|
|
27664b36b0 | ||
|
|
3728adfe13 | ||
|
|
bcbc048136 | ||
|
|
9d78cc465c | ||
|
|
1bc33bbcf9 | ||
|
|
a2c06ce752 | ||
|
|
304720b57f | ||
|
|
eb30a5ef3b | ||
|
|
ea50cd5c66 | ||
|
|
24cd4af867 | ||
|
|
171317c9f5 | ||
|
|
2e4b2c2d30 | ||
|
|
4fb369e4e3 | ||
|
|
6f9e8c9542 | ||
|
|
b0b1b4c0af | ||
|
|
44edbfe2f3 | ||
|
|
b7d54ffb06 | ||
|
|
eb1773f7fc | ||
|
|
d1c1820c1a | ||
|
|
477c038e70 | ||
|
|
e7d632bdbc | ||
|
|
a288d4b1bf | ||
|
|
222781da42 | ||
|
|
a5685f4d16 | ||
|
|
081de229fd | ||
|
|
b52107b2c3 | ||
|
|
c0b6089f70 | ||
|
|
52c1c0f20a | ||
|
|
dadaa752ff | ||
|
|
21cd47d063 | ||
|
|
efbc676765 | ||
|
|
424fa4fcf6 | ||
|
|
e55f9fadf6 | ||
|
|
e962479af5 | ||
|
|
2a0d887526 | ||
|
|
84e718cd97 | ||
|
|
38e58117da | ||
|
|
97230f1b74 | ||
|
|
aa4942ea68 | ||
|
|
8087582519 | ||
|
|
d13cfdece4 | ||
|
|
14610ef919 | ||
|
|
a56397c8c7 | ||
|
|
aa40b57297 | ||
|
|
843d3ea6cd | ||
|
|
afeaa9e73c | ||
|
|
b358727425 | ||
|
|
6939944868 | ||
|
|
1a83ddea80 | ||
|
|
5a4c2f2183 | ||
|
|
dc55ec75cc | ||
|
|
cb5ea3929b | ||
|
|
6bb6b5426c | ||
|
|
492703ab23 | ||
|
|
b4d0122cfc | ||
|
|
a2e0cfb2ee | ||
|
|
17f76d6dc1 | ||
|
|
f809843745 | ||
|
|
6401ffde19 | ||
|
|
1aba934d36 | ||
|
|
69c1ed01fa | ||
|
|
e776b4c8d9 | ||
|
|
6fa00c5771 | ||
|
|
a4e5b177b7 | ||
|
|
69c1f49f55 | ||
|
|
ade48e4ac7 | ||
|
|
6c1fd10a50 | ||
|
|
a2fd0ea108 | ||
|
|
33a4b983e5 | ||
|
|
0d431e387b | ||
|
|
f0a1eaaaff | ||
|
|
165fd062f4 | ||
|
|
7b18634b34 | ||
|
|
99ca4628dc | ||
|
|
b892f0cc37 | ||
|
|
7664cacd2f | ||
|
|
e96e821146 | ||
|
|
e02e4f6aae | ||
|
|
c1464f2881 | ||
|
|
91dd4cc218 | ||
|
|
6cadca0d89 | ||
|
|
5c9d71c626 | ||
|
|
bd03028170 | ||
|
|
67aee6a2e0 | ||
|
|
223fe240c1 | ||
|
|
5cb013d545 | ||
|
|
82293e46cd | ||
|
|
2e7af7058c | ||
|
|
cc816b40e0 | ||
|
|
64fc72e18a | ||
|
|
76c6222f45 | ||
|
|
2f8b0dde49 | ||
|
|
712ae952df | ||
|
|
90e148e022 | ||
|
|
52440fca2f | ||
|
|
292b989e09 | ||
|
|
b0e0b54def | ||
|
|
c146829bf4 | ||
|
|
b60cf07e98 | ||
|
|
1f17af27f7 | ||
|
|
5ec68643f8 | ||
|
|
52ae974f51 | ||
|
|
f089578ba7 | ||
|
|
1e4346a54b | ||
|
|
a1b83b4a67 | ||
|
|
838bcb8faa | ||
|
|
a8b046f46b | ||
|
|
6b87447ca1 | ||
|
|
bce98561d3 | ||
|
|
003afa4071 | ||
|
|
7f963bdb6f | ||
|
|
96298a5c31 |
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@ -7,6 +7,7 @@
|
||||
|
||||
# Yes this is a mostly untouched Github actions template
|
||||
|
||||
|
||||
name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
@ -16,19 +17,36 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'temurin' # Temurin because it's default :P
|
||||
|
||||
# Calculate days since 10/10/10
|
||||
- name: Calculate days since 10/10/10
|
||||
id: calculate_days
|
||||
run: |
|
||||
start_date="2010-10-10"
|
||||
current_date=$(date +%Y-%m-%d)
|
||||
days_since=$(( ($(date -d "$current_date" +%s) - $(date -d "$start_date" +%s)) / 86400 ))
|
||||
echo "days=$days_since" >> $GITHUB_OUTPUT
|
||||
|
||||
# Update version files with proper sed syntax
|
||||
- name: Update version files
|
||||
run: |
|
||||
days=${{ steps.calculate_days.outputs.days }}
|
||||
# Use proper sed syntax for Linux runners
|
||||
sed -i "s/public static final String VERSION = \".*\";/public static final String VERSION = \"1.0.27 BETA ($days)\";/" src/main/java/com/hbm/lib/RefStrings.java
|
||||
sed -i "s/mod_build_number=.*/mod_build_number=$days/" gradle.properties
|
||||
|
||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||
- name: Setup Gradle
|
||||
@ -42,5 +60,3 @@ jobs:
|
||||
with:
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: ./build/libs
|
||||
|
||||
|
||||
|
||||
57
changelog
57
changelog
@ -1,33 +1,30 @@
|
||||
## Added
|
||||
* Heavy duty electricity connector
|
||||
* Upgraded version of the standard model
|
||||
* Two times as chunky, ten times as powerful
|
||||
* Ideal for custom pylon designs
|
||||
* Two new expensive mode items
|
||||
* Ultra fine gold dust, which can be combined with ferric schrabidate in the particle accelerator to create degenerate matter
|
||||
* Degenerate matter, which is used instead of regular ferric schrabidate in the exposure chamber to create DNT
|
||||
|
||||
## Changed
|
||||
* Material autogen now creates redstone in ingot form, allowing smaller than block quantities to be cast
|
||||
* Removed the ancient ZPE blocks
|
||||
* Drone hitboxes are now way smaller, which should cause them to get stuck when flying less
|
||||
* The new FENSU now keeps its charge and installed muffler when broken
|
||||
* Battery sockets are now compatible with comparator output
|
||||
* Battery sockets now have a tooltip when a battery pack is installed
|
||||
* Sef-charging batteries have been reworked
|
||||
* They are now a new item with metadata (legacy ones still work)
|
||||
* The base form is an empty selfcharger which is filled with two billets of material, i.e. no more upgrade recipes
|
||||
* There are a few new variants like cobalt-60 and gold-198
|
||||
* New selfchargers have a model when plugged into a battery socket
|
||||
* Selfchargers are a fair bit weaker than their old counterparts, but substantially cheaper too
|
||||
* Old batteries now have the "LEGACY" tag
|
||||
* Pneumatic pipe networks with multiple outputs, especially filtered ones, should now have much better throughput due to not constantly failing to send items in round robin mode
|
||||
* The [N] calculator window now shows a history of previous operations
|
||||
* Simplified the cyclotron recipe
|
||||
* Snow golems now use the grey metallic gib particles instead of blood
|
||||
* The heavy magnetic storage tank now uses BSCCO instead of AA
|
||||
* Increased the industrial steam turbine's throughput to 150mB/t of UDS exactly
|
||||
* In addition to being an almost 50% buff, this also fixes the slight issue where turbine chains couldn't reach 100% throughput
|
||||
* The remants power armor melee ability now has a refire check, meaning the attack will be repeated automatically if the attack button is held down
|
||||
* ATATATATATATATATATATATATATATA
|
||||
* Power armor melee attacks now detect entities with a hitbox that's 0.5 blocks larger in all directions, making it substantially easier to hit small targets
|
||||
* As a side effect, this also increases the maximum range by 0.5 blocks
|
||||
|
||||
## Fixed
|
||||
* Fixed the FEnSU, cyclotron and reliant robin missile being uncraftable due to stacksize limitations
|
||||
* The system for detecting impossible recipe has been improved, instead of a fixed 64 item limit, it now uses the actual limit of the item (or 64 for ore dictionary inputs)
|
||||
* Fixed yet another issue regarding addon fluids breaking on recipe reload
|
||||
* Fixed YET ANOTHER issue regarding crates, AGAIN
|
||||
* Fixed a rare issue where the fusion reactor could have negative fuel
|
||||
* Fixed battery socket priority tooltip offset
|
||||
* Fixed enchantability on many armor sets being incorrect
|
||||
* Most power armors are intended to not be enchantable at all
|
||||
* Fixed crash caused by the balefire bomb
|
||||
* Fixed JSON gun reload animations becoming faster and faster with the trenchmaster set
|
||||
* Fixed heat transfer rate labels on the boilers and coker unit being off by a magnitude of 10
|
||||
* Fixed crucible not having a heat transfer rate tooltip
|
||||
* Fixed certain heliostat mirror rotations not showing the mirror
|
||||
* Fixed chopper recipe creating eight choppers instead of one
|
||||
* Fixed chemical factory internal tank sharing ignoring tank pressure
|
||||
* Fixed the NCR ranger power armor missing most protection stats
|
||||
* Fixed LPS pipes not properly connecting to the new industrial turbines
|
||||
* Fixed NCRPA missing radiation resistance stats (it's 97% for the full set)
|
||||
* Fixed NCRPA chestplate giving night vision even without a full set
|
||||
* Probably fixed the fused meteorite sword recipe being missing (untested)
|
||||
* Decreased the fusing difficulty of chlorine and calcium in the ICF which should hopefully make ClCa fuel pellets usable (untested)
|
||||
* Fixed loot piles only having a single block render AABB, causing armor rewards from red rooms to blink out of existence at certain angles
|
||||
* Fixed filled crate blocks not dropping crate items with a stack lock in place
|
||||
* Fixed stack lock not being applied when an item crate is opened, allowing them to be stacked while the item is open
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5572
|
||||
mod_build_number=5615
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
@ -36,6 +36,7 @@ credits=HbMinecraft,\
|
||||
\ xxwinhere (chinese localization),\
|
||||
\ Nycticoraxnightheron (chinese localization),\
|
||||
\ NarekoMichigami810 (chinese localization),\
|
||||
\ Romarku (chinese localization),\
|
||||
\ Maksymisio (polish localization)\
|
||||
\ el3ctro4ndre (italian localization),\
|
||||
\ Goaty1208 (italian localization),\
|
||||
@ -74,6 +75,7 @@ credits=HbMinecraft,\
|
||||
\ Dash (PA particle serialization fix),\
|
||||
\ archiecarrot123 (armor rendering compatibility fix),\
|
||||
\ mikkerlo (mining laser & builder's jetpack improvements),\
|
||||
\ Hacker6329 (ZIRNOX redstone control),\
|
||||
\ icomet (refactoring),\
|
||||
\ martemen (project settings),\
|
||||
\ OvermindDL1 (project settings),\
|
||||
|
||||
@ -80,4 +80,5 @@ public class BlockEnums {
|
||||
FLUORESCENT,
|
||||
HALOGEN
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -30,6 +30,8 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityFileCabinet;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFalling;
|
||||
@ -343,6 +345,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block lightstone;
|
||||
public static Block brick_forgotten;
|
||||
public static Block brick_forgotten_lock;
|
||||
|
||||
public static Block concrete_slab;
|
||||
public static Block concrete_double_slab;
|
||||
@ -615,15 +618,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block tesla;
|
||||
|
||||
public static Block sat_mapper;
|
||||
public static Block sat_scanner;
|
||||
public static Block sat_radar;
|
||||
public static Block sat_laser;
|
||||
public static Block sat_foeq;
|
||||
public static Block sat_resonator;
|
||||
|
||||
public static Block sat_dock;
|
||||
|
||||
public static Block soyuz_capsule;
|
||||
public static Block crate_supply;
|
||||
|
||||
@ -769,6 +764,7 @@ public class ModBlocks {
|
||||
public static Block red_cable_gauge;
|
||||
public static Block red_cable_box;
|
||||
public static Block red_connector;
|
||||
public static Block red_connector_super;
|
||||
public static Block red_pylon;
|
||||
public static Block red_pylon_medium_wood;
|
||||
public static Block red_pylon_medium_wood_transformer;
|
||||
@ -852,7 +848,6 @@ public class ModBlocks {
|
||||
public static Block barrel_antimatter;
|
||||
|
||||
public static Block machine_transformer;
|
||||
public static Block machine_transformer_dnt;
|
||||
|
||||
public static Block machine_solar_boiler;
|
||||
public static Block solar_mirror;
|
||||
@ -974,7 +969,14 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_steam_engine;
|
||||
public static Block machine_turbine;
|
||||
public static Block machine_large_turbine;
|
||||
@Deprecated public static Block machine_large_turbine;
|
||||
public static Block machine_industrial_turbine;
|
||||
public static Block machine_chungus;
|
||||
|
||||
public static Block machine_condenser;
|
||||
public static Block machine_tower_small;
|
||||
public static Block machine_tower_large;
|
||||
public static Block machine_condenser_powered;
|
||||
|
||||
public static Block machine_deuterium_extractor;
|
||||
public static Block machine_deuterium_tower;
|
||||
@ -985,12 +987,6 @@ public class ModBlocks {
|
||||
public static Block machine_compressor;
|
||||
public static Block machine_compressor_compact;
|
||||
|
||||
public static Block machine_chungus;
|
||||
public static Block machine_condenser;
|
||||
public static Block machine_tower_small;
|
||||
public static Block machine_tower_large;
|
||||
public static Block machine_condenser_powered;
|
||||
|
||||
public static Block machine_electrolyser;
|
||||
|
||||
public static Block machine_excavator;
|
||||
@ -1172,10 +1168,11 @@ public class ModBlocks {
|
||||
public static Block gas_explosive;
|
||||
public static Block vacuum;
|
||||
|
||||
public static Block absorber;
|
||||
public static Block absorber_red;
|
||||
public static Block absorber_green;
|
||||
public static Block absorber_pink;
|
||||
@Deprecated public static Block absorber;
|
||||
@Deprecated public static Block absorber_red;
|
||||
@Deprecated public static Block absorber_green;
|
||||
@Deprecated public static Block absorber_pink;
|
||||
public static Block rad_absorber;
|
||||
public static Block decon;
|
||||
|
||||
public static Block mud_block;
|
||||
@ -1197,17 +1194,8 @@ public class ModBlocks {
|
||||
public static Block corium_block;
|
||||
public static Fluid corium_fluid;
|
||||
public static final Material fluidcorium = (new MaterialLiquid(MapColor.brownColor) {
|
||||
|
||||
@Override
|
||||
public boolean blocksMovement() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material setImmovableMobility() { //override access modifier
|
||||
return super.setImmovableMobility();
|
||||
}
|
||||
|
||||
@Override public boolean blocksMovement() { return true; }
|
||||
@Override public Material setImmovableMobility() { return super.setImmovableMobility(); } //override access modifier
|
||||
}.setImmovableMobility());
|
||||
|
||||
public static Block volcanic_lava_block;
|
||||
@ -1223,7 +1211,6 @@ public class ModBlocks {
|
||||
public static Block volcano_core;
|
||||
public static Block volcano_rad_core;
|
||||
|
||||
public static Block dummy_block_vault;
|
||||
public static Block dummy_block_blast;
|
||||
public static Block dummy_plate_compact_launcher;
|
||||
public static Block dummy_port_compact_launcher;
|
||||
@ -1547,6 +1534,7 @@ public class ModBlocks {
|
||||
|
||||
lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone");
|
||||
brick_forgotten = new BlockPillar(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||
brick_forgotten_lock = new BlockForgottenLock(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten_lock").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten_lock");
|
||||
|
||||
concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
concrete_double_slab = new BlockMultiSlab(concrete_slab, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_double_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
@ -1804,7 +1792,7 @@ public class ModBlocks {
|
||||
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_difurnace_extension = new MachineDiFurnaceExtension().setBlockName("machine_difurnace_extension").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_rtg_off = new MachineDiFurnaceRTG(false).setBlockName("machine_difurnace_rtg_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(2.0F).setCreativeTab(null);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(1.0F).setCreativeTab(null);
|
||||
|
||||
machine_centrifuge = new MachineCentrifuge(Material.iron).setBlockName("machine_centrifuge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_gascent = new MachineGasCent(Material.iron).setBlockName("machine_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -1903,6 +1891,7 @@ public class ModBlocks {
|
||||
red_cable_gauge = new BlockCableGauge().setBlockName("red_cable_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
red_cable_box = new PowerCableBox(Material.iron).setBlockName("red_cable_box").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||
red_connector_super = new ConnectorRedWireSuper(Material.iron).setBlockName("red_connector_super").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_wood = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_wood_transformer = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
@ -1983,8 +1972,7 @@ public class ModBlocks {
|
||||
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
||||
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
||||
|
||||
machine_transformer = new MachineTransformer(Material.iron, 10000L, 1).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
machine_transformer_dnt = new MachineTransformer(Material.iron, 1000000000000000L, 1).setBlockName("machine_transformer_dnt").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
||||
machine_transformer = new MachineTransformer(Material.iron).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
|
||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
@ -2075,7 +2063,7 @@ public class ModBlocks {
|
||||
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
||||
|
||||
vault_door = new VaultDoor(Material.iron).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door");
|
||||
|
||||
sliding_blast_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDE_DOOR).setBlockName("sliding_blast_door").setHardness(10.0F).setResistance(750.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":sliding_blast_door");
|
||||
@ -2121,13 +2109,6 @@ public class ModBlocks {
|
||||
launch_table = new LaunchTable(Material.iron).setBlockName("launch_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_table");
|
||||
soyuz_launcher = new SoyuzLauncher(Material.iron).setBlockName("soyuz_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_launcher");
|
||||
|
||||
sat_mapper = new DecoBlock(Material.iron).setBlockName("sat_mapper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_mapper");
|
||||
sat_radar = new DecoBlock(Material.iron).setBlockName("sat_radar").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_radar");
|
||||
sat_scanner = new DecoBlock(Material.iron).setBlockName("sat_scanner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_scanner");
|
||||
sat_laser = new DecoBlock(Material.iron).setBlockName("sat_laser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_laser");
|
||||
sat_foeq = new DecoBlock(Material.iron).setBlockName("sat_foeq").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_foeq");
|
||||
sat_resonator = new DecoBlock(Material.iron).setBlockName("sat_resonator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_resonator");
|
||||
|
||||
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
|
||||
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
|
||||
crate_supply = new BlockSupplyCrate(Material.wood).setBlockName("crate_supply").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
|
||||
@ -2266,7 +2247,8 @@ public class ModBlocks {
|
||||
machine_steam_engine = new MachineSteamEngine().setBlockName("machine_steam_engine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbine = new MachineTurbine(Material.iron).setBlockName("machine_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbine");
|
||||
machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine");
|
||||
machine_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus");
|
||||
machine_industrial_turbine = new MachineIndustrialTurbine().setBlockName("machine_industrial_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chungus = new MachineChungus().setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_condenser = new MachineCondenser(Material.iron).setBlockName("machine_condenser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":condenser");
|
||||
machine_tower_small = new MachineTowerSmall(Material.iron).setBlockName("machine_tower_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
||||
machine_tower_large = new MachineTowerLarge(Material.iron).setBlockName("machine_tower_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
@ -2333,10 +2315,12 @@ public class ModBlocks {
|
||||
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
||||
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
||||
|
||||
absorber = new BlockAbsorber(Material.iron, 2.5F).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber");
|
||||
absorber_red = new BlockAbsorber(Material.iron, 10F).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_red");
|
||||
absorber_green = new BlockAbsorber(Material.iron, 100F).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_green");
|
||||
absorber_pink = new BlockAbsorber(Material.iron, 10000F).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
|
||||
absorber = new BlockGeneric(Material.iron).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
absorber_red = new BlockGeneric(Material.iron).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
absorber_green = new BlockGeneric(Material.iron).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
absorber_pink = new BlockGeneric(Material.iron).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
|
||||
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
||||
|
||||
if(Loader.isModLoaded("OpenComputers")) {
|
||||
@ -2383,7 +2367,6 @@ public class ModBlocks {
|
||||
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);
|
||||
|
||||
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_plate_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, false).setBounds(0, 16, 0, 16, 16, 16).setBlockName("dummy_plate_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, true).setBlockName("dummy_port_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2723,6 +2706,7 @@ public class ModBlocks {
|
||||
register(stones_double_slab, ItemModSlab.class);
|
||||
|
||||
register(brick_forgotten);
|
||||
register(brick_forgotten_lock);
|
||||
|
||||
GameRegistry.registerBlock(concrete_slab, ItemModSlab.class, concrete_slab.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_double_slab, ItemModSlab.class, concrete_double_slab.getUnlocalizedName());
|
||||
@ -3184,7 +3168,8 @@ public class ModBlocks {
|
||||
register(red_cable_gauge);
|
||||
register(red_cable_box);
|
||||
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
|
||||
register(red_connector);
|
||||
register(red_connector_super);
|
||||
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
|
||||
register(red_pylon_medium_wood);
|
||||
register(red_pylon_medium_wood_transformer);
|
||||
@ -3276,7 +3261,6 @@ public class ModBlocks {
|
||||
register(capacitor_tantalium);
|
||||
register(capacitor_schrabidate);
|
||||
GameRegistry.registerBlock(machine_transformer, machine_transformer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_transformer_dnt, machine_transformer_dnt.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
|
||||
@ -3303,6 +3287,7 @@ public class ModBlocks {
|
||||
register(machine_steam_engine);
|
||||
register(machine_turbine);
|
||||
register(machine_large_turbine);
|
||||
register(machine_industrial_turbine);
|
||||
register(machine_chungus);
|
||||
GameRegistry.registerBlock(machine_condenser, machine_condenser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_tower_small, machine_tower_small.getUnlocalizedName());
|
||||
@ -3310,8 +3295,8 @@ public class ModBlocks {
|
||||
register(machine_condenser_powered);
|
||||
GameRegistry.registerBlock(machine_deuterium_extractor, machine_deuterium_extractor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_deuterium_tower, machine_deuterium_tower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_liquefactor, ItemBlockBase.class, machine_liquefactor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_solidifier, ItemBlockBase.class, machine_solidifier.getUnlocalizedName());
|
||||
register(machine_liquefactor);
|
||||
register(machine_solidifier);
|
||||
register(machine_intake);
|
||||
register(machine_compressor);
|
||||
register(machine_compressor_compact);
|
||||
@ -3369,6 +3354,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(absorber_red, absorber_red.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(absorber_green, absorber_green.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(absorber_pink, absorber_pink.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rad_absorber, ItemBlockBase.class, rad_absorber.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(decon, decon.getUnlocalizedName());
|
||||
|
||||
//Solar Tower Blocks
|
||||
@ -3466,14 +3452,6 @@ public class ModBlocks {
|
||||
//Guide
|
||||
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
|
||||
|
||||
//Sat Blocks
|
||||
GameRegistry.registerBlock(sat_mapper, sat_mapper.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_scanner, sat_scanner.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_radar, sat_radar.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_laser, sat_laser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_foeq, sat_foeq.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_resonator, sat_resonator.getUnlocalizedName());
|
||||
|
||||
//Rails
|
||||
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
|
||||
@ -3516,7 +3494,6 @@ public class ModBlocks {
|
||||
//GameRegistry.registerBlock(concrete_liquid, concrete_liquid.getUnlocalizedName());
|
||||
|
||||
//Multiblock Dummy Blocks
|
||||
GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_plate_compact_launcher, dummy_plate_compact_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_compact_launcher, dummy_port_compact_launcher.getUnlocalizedName());
|
||||
@ -3543,7 +3520,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(vacuum, vacuum.getUnlocalizedName());
|
||||
|
||||
// OC Compat Items
|
||||
if (Loader.isModLoaded("OpenComputers")) {
|
||||
if(Loader.isModLoaded(Compat.MOD_OC)) {
|
||||
register(oc_cable_paintable);
|
||||
}
|
||||
|
||||
|
||||
@ -54,21 +54,24 @@ public class BlockCrashedBomb extends BlockEnumMulti implements ITileEntityProvi
|
||||
|
||||
EnumDudType type = EnumUtil.grabEnumSafely(EnumDudType.class, world.getBlockMetadata(x, y, z));
|
||||
|
||||
//TODO: make this less scummy
|
||||
if(type == type.BALEFIRE) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.egg_balefire_shard)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.egg_balefire_shard));
|
||||
}
|
||||
if(type == type.CONVENTIONAL) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 16)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 16));
|
||||
}
|
||||
if(type == type.NUKE) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 8)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.billet_plutonium, 4)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 4));
|
||||
}
|
||||
if(type == type.SALTED) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 8)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.billet_plutonium, 2)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ingot_cobalt, 12)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 2),
|
||||
new ItemStack(ModItems.ingot_cobalt, 12));
|
||||
}
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
@ -78,6 +81,10 @@ public class BlockCrashedBomb extends BlockEnumMulti implements ITileEntityProvi
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void dropItems(World world, int x, int y, int z, ItemStack... drops) {
|
||||
for(ItemStack drop : drops) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.item.EntityTNTPrimedBase;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -16,6 +17,8 @@ public class BlockFissureBomb extends BlockTNTBase {
|
||||
|
||||
int range = 5;
|
||||
|
||||
boolean crater = world.getBiomeGenForCoords((int) Math.floor(x), (int) Math.floor(z)) instanceof BiomeGenCraterBase;
|
||||
|
||||
for(int i = -range; i <= range; i++) {
|
||||
for(int j = -range; j <= range; j++) {
|
||||
for(int k = -range; k <= range; k++) {
|
||||
@ -27,7 +30,7 @@ public class BlockFissureBomb extends BlockTNTBase {
|
||||
Block block = world.getBlock(a, b, c);
|
||||
|
||||
if(block == ModBlocks.ore_bedrock) {
|
||||
world.setBlock(a, b, c, ModBlocks.ore_volcano);
|
||||
world.setBlock(a, b, c, ModBlocks.ore_volcano, crater ? 1 : 0, 3);
|
||||
} else if(block == ModBlocks.ore_bedrock_oil) {
|
||||
world.setBlock(a, b, c, Blocks.bedrock);
|
||||
}
|
||||
|
||||
@ -2,38 +2,79 @@ package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAbsorber extends Block {
|
||||
public class BlockAbsorber extends BlockEnumMulti implements IBlockMulti {
|
||||
|
||||
float absorb = 0;
|
||||
// Enum for tiers they are in order of meta data, 0, 1, 2, 3 for Base, Red, Green, Pink
|
||||
public static enum EnumAbsorberTier {
|
||||
|
||||
public BlockAbsorber(Material mat, float ab) {
|
||||
super(mat);
|
||||
BASE(2.5F, "absorber"), RED(10F, "absorber_red"), GREEN(100F, "absorber_green"), PINK(10000F, "absorber_pink");
|
||||
|
||||
public final float absorbAmount;
|
||||
public final String textureName;
|
||||
|
||||
private EnumAbsorberTier(float absorb, String texture) {
|
||||
this.absorbAmount = absorb;
|
||||
this.textureName = texture;
|
||||
}
|
||||
}
|
||||
|
||||
public BlockAbsorber(Material mat) {
|
||||
super(mat, EnumAbsorberTier.class, true, true);
|
||||
this.setTickRandomly(true);
|
||||
absorb = ab;
|
||||
this.setBlockName("rad_absorber");
|
||||
}
|
||||
|
||||
public EnumAbsorberTier getTier(int meta) {
|
||||
return EnumAbsorberTier.values()[rectify(meta)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World world) {
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
EnumAbsorberTier tier = getTier(stack.getItemDamage());
|
||||
String tierName = net.minecraft.util.StatCollector.translateToLocal("tile.rad_absorber." + tier.name().toLowerCase());
|
||||
return tierName;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(net.minecraft.client.renderer.texture.IIconRegister reg) {
|
||||
icons = new IIcon[EnumAbsorberTier.values().length];
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
icons[i] = reg.registerIcon(RefStrings.MODID + ":" + EnumAbsorberTier.values()[i].textureName);
|
||||
}
|
||||
}
|
||||
|
||||
// All that rad math shit that was on there already, did not touch this
|
||||
// -Wolf
|
||||
|
||||
@Override
|
||||
public int tickRate(World world) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, absorb);
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
EnumAbsorberTier tier = getTier(world.getBlockMetadata(x, y, z));
|
||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, tier.absorbAmount);
|
||||
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,13 +3,14 @@ package com.hbm.blocks.generic;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.items.special.ItemDoorSkin;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.Rotation;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -23,7 +24,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable {
|
||||
|
||||
public DoorDecl type;
|
||||
|
||||
@ -34,8 +35,7 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta){
|
||||
if(meta >= 12)
|
||||
return new TileEntityDoorGeneric();
|
||||
if(meta >= 12) return new TileEntityDoorGeneric();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -69,21 +69,30 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer playerIn, int side, float hitX, float hitY, float hitZ){
|
||||
if(!world.isRemote && !playerIn.isSneaking()) {
|
||||
int[] pos1 = findCore(world, x, y, z);
|
||||
if(pos1 == null)
|
||||
return false;
|
||||
if(pos1 == null) return false;
|
||||
TileEntityDoorGeneric door = (TileEntityDoorGeneric) world.getTileEntity(pos1[0], pos1[1], pos1[2]);
|
||||
|
||||
if(door != null) {
|
||||
if(playerIn.getHeldItem() != null && playerIn.getHeldItem().getItem() instanceof ItemDoorSkin) {
|
||||
return door.setSkinIndex((byte) playerIn.getHeldItem().getItemDamage());
|
||||
} else {
|
||||
return door.tryToggle(playerIn);
|
||||
}
|
||||
}
|
||||
}
|
||||
return !playerIn.isSneaking();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
if(tool != ToolType.SCREWDRIVER || !player.isSneaking()) return false;
|
||||
|
||||
int[] pos1 = findCore(world, x, y, z);
|
||||
if(pos1 == null) return false;
|
||||
TileEntityDoorGeneric door = (TileEntityDoorGeneric) world.getTileEntity(pos1[0], pos1[1], pos1[2]);
|
||||
|
||||
if(door == null || !door.getDoorType().hasSkins()) return false;
|
||||
if(world.isRemote) return true;
|
||||
door.cycleSkinIndex();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
@ -159,7 +168,6 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return getBoundingBox(world, x, y, z, false);
|
||||
//return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
|
||||
public AxisAlignedBB getBoundingBox(World world, int x, int y, int z, boolean forCollision) {
|
||||
@ -183,4 +191,24 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
}
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), x, y, z, dir)) return false;
|
||||
|
||||
if(type.getExtraDimensions() != null) for(int[] dims : type.getExtraDimensions()) {
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, dims, x, y, z, dir)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), this, dir);
|
||||
|
||||
if(type.getExtraDimensions() != null) for(int[] dims : type.getExtraDimensions()) {
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, dims, this, dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,8 @@ public class BlockFissure extends BlockContainer implements IBlockMultiPass {
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, ModBlocks.volcanic_lava_block);
|
||||
boolean crater = world.getBlockMetadata(x, y, z) != 0;
|
||||
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, crater ? ModBlocks.rad_lava_block : ModBlocks.volcanic_lava_block);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
42
src/main/java/com/hbm/blocks/generic/BlockForgottenLock.java
Normal file
42
src/main/java/com/hbm/blocks/generic/BlockForgottenLock.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.blocks.machine.BlockPillar;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockForgottenLock extends BlockPillar {
|
||||
|
||||
public BlockForgottenLock(Material mat, String top) {
|
||||
super(mat, top);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
// placeholder
|
||||
if(player.getHeldItem() != null) {
|
||||
boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked;
|
||||
if((player.getHeldItem().getItem() == ModItems.key_red || cracked) && side != 0 && side != 1) {
|
||||
if(cracked) player.getHeldItem().stackSize--;
|
||||
if(world.isRemote) return true;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
|
||||
generate(world, x, y, z, meta, dir);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:block.lockOpen", 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void generate(World world, int x, int y, int z, int meta, ForgeDirection dir) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -205,10 +205,18 @@ public class BlockKeyhole extends BlockStone {
|
||||
if(rand == 0) {
|
||||
world.setBlock(x, y + 1, z, ModBlocks.deco_loot);
|
||||
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y + 1, z);
|
||||
|
||||
if(world.rand.nextInt(5) == 0) {
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_helmet), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_plate), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_legs), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.ncrpa_boots), 0, 0, 0);
|
||||
} else {
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_helmet), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_plate), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_legs), 0, 0, 0);
|
||||
loot.addItem(new ItemStack(ModItems.trenchmaster_boots), 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
spawnPedestalItem(world, x, y + 1, z);
|
||||
}
|
||||
|
||||
@ -155,5 +155,24 @@ public class BlockLoot extends BlockContainer {
|
||||
nbt.setDouble("z" + i, item.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 1,
|
||||
yCoord,
|
||||
zCoord - 1,
|
||||
xCoord + 2,
|
||||
yCoord + 3,
|
||||
zCoord + 2
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,7 +159,8 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
|
||||
NONE( "NONE", null),
|
||||
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
|
||||
NUMBERNINE( "Number Nine", "None of y'all deserve coal."),
|
||||
HUNDUN( "Hundun", "混沌");
|
||||
HUNDUN( "Hundun", "混沌"),
|
||||
DERG( "Dragon", "Squeeze him.");
|
||||
|
||||
public String label;
|
||||
public String inscription;
|
||||
|
||||
@ -163,6 +163,7 @@ public class BlockStorageCrate extends BlockContainer implements IBlockMulti, IL
|
||||
}
|
||||
|
||||
if(!nbt.hasNoTags()) {
|
||||
nbt.setLong("stacklock", world.rand.nextLong());
|
||||
drop.stackTagCompound = nbt;
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,18 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityCore;
|
||||
|
||||
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.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -51,4 +57,42 @@ public class CoreCore extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
private Random rand = new Random();
|
||||
|
||||
// shitty copy pasted crap for the 50th time because i hate this block
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||
TileEntityCore core = (TileEntityCore) world.getTileEntity(x, y, z);
|
||||
|
||||
if(core != null) {
|
||||
for(int i1 = 0; i1 < core.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = core.getStackInSlot(i1);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.rand.nextInt(21) + 10;
|
||||
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147453_f(x, y, z, b);
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, b, m);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,54 +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.TileEntityMachineAssembler;
|
||||
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 DummyBlockAssembler extends DummyOldBase {
|
||||
|
||||
public DummyBlockAssembler(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_assembler);
|
||||
}
|
||||
|
||||
@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;
|
||||
|
||||
TileEntityMachineAssembler entity = (TileEntityMachineAssembler) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,53 +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.oil.TileEntityMachineRefinery;
|
||||
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 DummyBlockRefinery extends DummyOldBase {
|
||||
|
||||
public DummyBlockRefinery(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_refinery);
|
||||
}
|
||||
|
||||
@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;
|
||||
|
||||
TileEntityMachineRefinery entity = (TileEntityMachineRefinery) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,53 +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.TileEntityMachineTurbofan;
|
||||
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 DummyBlockTurbofan extends DummyOldBase {
|
||||
|
||||
public DummyBlockTurbofan(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_turbofan);
|
||||
}
|
||||
|
||||
@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;
|
||||
|
||||
TileEntityMachineTurbofan entity = (TileEntityMachineTurbofan) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,141 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.IDummy;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemLock;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockVault extends BlockContainer implements IDummy, IBomb {
|
||||
|
||||
public static boolean safeBreak = false;
|
||||
|
||||
public DummyBlockVault(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityDummy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
||||
if(!safeBreak) {
|
||||
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;
|
||||
|
||||
if(!world.isRemote)
|
||||
world.func_147480_a(a, b, c, true);
|
||||
}
|
||||
}
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return Item.getItemFromBlock(ModBlocks.vault_door);
|
||||
}
|
||||
|
||||
@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.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit)) {
|
||||
return false;
|
||||
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntity til = world.getTileEntity(x, y, z);
|
||||
if(til != null && til instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy) til).targetX;
|
||||
int b = ((TileEntityDummy) til).targetY;
|
||||
int c = ((TileEntityDummy) til).targetZ;
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(a, b, c);
|
||||
if(entity != null) {
|
||||
if(entity.canAccess(player))
|
||||
entity.tryToggle();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
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;
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(a, b, c);
|
||||
if(entity != null) {
|
||||
entity.type++;
|
||||
if(entity.type >= entity.maxTypes)
|
||||
entity.type = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
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;
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(a, b, c);
|
||||
if(entity != null && !entity.isLocked()) {
|
||||
entity.tryToggle();
|
||||
return BombReturnCode.TRIGGERED;
|
||||
}
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
return BombReturnCode.UNDEFINED;
|
||||
}
|
||||
}
|
||||
@ -20,8 +20,7 @@ public class FurnaceCombination extends BlockDummyable implements ITooltipProvid
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12)
|
||||
return new TileEntityFurnaceCombination();
|
||||
if(meta >= 12) return new TileEntityFurnaceCombination();
|
||||
return new TileEntityProxyCombo().inventory().fluid();
|
||||
}
|
||||
|
||||
|
||||
@ -74,6 +74,7 @@ public class MachineAssemblyFactory extends BlockDummyable implements ITooltipPr
|
||||
TileEntityMachineAssemblyFactory assemfac = (TileEntityMachineAssemblyFactory) te;
|
||||
|
||||
DirPos[] cool = assemfac.getCoolPos();
|
||||
DirPos[] io = assemfac.getIOPos();
|
||||
|
||||
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
||||
List<String> text = new ArrayList();
|
||||
@ -84,5 +85,15 @@ public class MachineAssemblyFactory extends BlockDummyable implements ITooltipPr
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
break;
|
||||
}
|
||||
|
||||
for(int i = 0; i < io.length; i++) {
|
||||
DirPos port = io[i];
|
||||
if(port.compare(x + port.getDir().offsetX, y, z + port.getDir().offsetZ)) {
|
||||
List<String> text = new ArrayList();
|
||||
text.add(EnumChatFormatting.YELLOW + "-> " + EnumChatFormatting.RESET + "Recipe field [" + (i + 1) + "]");
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,6 +74,7 @@ public class MachineChemicalFactory extends BlockDummyable implements ITooltipPr
|
||||
TileEntityMachineChemicalFactory chemfac = (TileEntityMachineChemicalFactory) te;
|
||||
|
||||
DirPos[] cool = chemfac.getCoolPos();
|
||||
DirPos[] io = chemfac.getIOPos();
|
||||
|
||||
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
||||
List<String> text = new ArrayList();
|
||||
@ -84,5 +85,15 @@ public class MachineChemicalFactory extends BlockDummyable implements ITooltipPr
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
break;
|
||||
}
|
||||
|
||||
for(int i = 0; i < io.length; i++) {
|
||||
DirPos port = io[i];
|
||||
if(port.compare(x + port.getDir().offsetX, y, z + port.getDir().offsetZ)) {
|
||||
List<String> text = new ArrayList();
|
||||
text.add(EnumChatFormatting.YELLOW + "-> " + EnumChatFormatting.RESET + "Recipe field [" + (i + 1) + "]");
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
@ -28,19 +29,14 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChungus extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||
|
||||
public MachineChungus(Material mat) {
|
||||
super(mat);
|
||||
public MachineChungus() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityChungus();
|
||||
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyCombo(false, true, true);
|
||||
|
||||
if(meta >= 12) return new TileEntityChungus();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -66,34 +62,14 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider,
|
||||
int iZ2 = entity.zCoord + dir.offsetZ * 2 + turn.offsetZ * 2;
|
||||
|
||||
if((x == iX || x == iX2) && (z == iZ || z == iZ2) && y < entity.yCoord + 2) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
|
||||
if(!world.isRemote) {
|
||||
FluidType type = entity.tanks[0].getTankType();
|
||||
entity.onLeverPull(type);
|
||||
|
||||
if(type == Fluids.STEAM) {
|
||||
entity.tanks[0].setTankType(Fluids.HOTSTEAM);
|
||||
entity.tanks[1].setTankType(Fluids.STEAM);
|
||||
entity.tanks[0].setFill(entity.tanks[0].getFill() / 10);
|
||||
entity.tanks[1].setFill(0);
|
||||
} else if(type == Fluids.HOTSTEAM) {
|
||||
entity.tanks[0].setTankType(Fluids.SUPERHOTSTEAM);
|
||||
entity.tanks[1].setTankType(Fluids.HOTSTEAM);
|
||||
entity.tanks[0].setFill(entity.tanks[0].getFill() / 10);
|
||||
entity.tanks[1].setFill(0);
|
||||
} else if(type == Fluids.SUPERHOTSTEAM) {
|
||||
entity.tanks[0].setTankType(Fluids.ULTRAHOTSTEAM);
|
||||
entity.tanks[1].setTankType(Fluids.SUPERHOTSTEAM);
|
||||
entity.tanks[0].setFill(entity.tanks[0].getFill() / 10);
|
||||
entity.tanks[1].setFill(0);
|
||||
if(!entity.operational) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
entity.onLeverPull();
|
||||
} else {
|
||||
entity.tanks[0].setTankType(Fluids.STEAM);
|
||||
entity.tanks[1].setTankType(Fluids.SPENTSTEAM);
|
||||
entity.tanks[0].setFill(Math.min(entity.tanks[0].getFill() * 1000, entity.tanks[0].getMaxFill()));
|
||||
entity.tanks[1].setFill(0);
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!"));
|
||||
}
|
||||
entity.markDirty();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -168,7 +144,7 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider,
|
||||
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + inputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankInput.getFill()) + "/" + String.format(Locale.US, "%,d", tankInput.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + outputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankOutput.getFill()) + "/" + String.format(Locale.US, "%,d", tankOutput.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(chungus.power) + "/" + BobMathUtil.getShortNumber(chungus.getMaxPower()) + "HE");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(chungus.powerBuffer) + "HE");
|
||||
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -0,0 +1,133 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineIndustrialTurbine;
|
||||
import com.hbm.tileentity.machine.TileEntityTurbineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineIndustrialTurbine extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||
|
||||
public MachineIndustrialTurbine() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineIndustrialTurbine();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().fluid().power();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return true;
|
||||
|
||||
TileEntityTurbineBase entity = (TileEntityTurbineBase) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(entity != null) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(entity.getBlockMetadata() - this.offset);
|
||||
|
||||
if(x == entity.xCoord + dir.offsetX * 3 && z == entity.zCoord + dir.offsetZ * 3 && y == entity.yCoord + 1) {
|
||||
if(!world.isRemote) {
|
||||
if(!entity.operational) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
entity.onLeverPull();
|
||||
} else {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!"));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 2, 0, 3, 3, 1, 1 }; }
|
||||
@Override public int getOffset() { return 3; }
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX, y, z + dir.offsetZ * 3 + rot.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX, y, z + dir.offsetZ * 3 - rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX * 1 + rot.offsetX, y, z - dir.offsetZ * 1 + rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX * 1 - rot.offsetX, y, z - dir.offsetZ * 1 - rot.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX * 3, y + 2, z + dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 1, y + 2, z - dir.offsetZ * 1);
|
||||
this.makeExtra(world, x - dir.offsetX * 3, y + 1, z - dir.offsetZ * 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
private static String[] blocks = new String[] {"▖ ", "▘ ", " ▘", " ▖"}; // right hand side quarter blocks break the renderer so we cheat a little
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityMachineIndustrialTurbine)) return;
|
||||
|
||||
TileEntityMachineIndustrialTurbine chungus = (TileEntityMachineIndustrialTurbine) te;
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
FluidTank tankInput = chungus.tanks[0];
|
||||
FluidTank tankOutput = chungus.tanks[1];
|
||||
|
||||
FluidType inputType = tankInput.getTankType();
|
||||
FluidType outputType = Fluids.NONE;
|
||||
|
||||
if(inputType.hasTrait(FT_Coolable.class)) {
|
||||
outputType = inputType.getTrait(FT_Coolable.class).coolsTo;
|
||||
}
|
||||
|
||||
int color = ((int) (0xFF - 0xFF * chungus.spin)) << 16 | ((int)(0xFF * chungus.spin) << 8);
|
||||
int time = (int) ((world.getTotalWorldTime() / 4) % 4);
|
||||
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + inputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankInput.getFill()) + "/" + String.format(Locale.US, "%,d", tankInput.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + outputType.getLocalizedName() + ": " + String.format(Locale.US, "%,d", tankOutput.getFill()) + "/" + String.format(Locale.US, "%,d", tankOutput.getMaxFill()) + "mB");
|
||||
text.add("&[" + color + "&]" + EnumChatFormatting.RED + "<- " + EnumChatFormatting.WHITE + BobMathUtil.getShortNumber(chungus.powerBuffer) + "HE (" +
|
||||
EnumChatFormatting.RESET + blocks[chungus.powerBuffer <= 0 ? 0 : time] + (int) Math.round(chungus.spin * 100) + "%" + EnumChatFormatting.WHITE + ")");
|
||||
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class MachineLargeTurbine extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineLargeTurbine(Material mat) {
|
||||
|
||||
@ -14,7 +14,7 @@ public class MachineTransformer extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public MachineTransformer(Material p_i45394_1_, long b, int d) {
|
||||
public MachineTransformer(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@ -26,10 +26,6 @@ public class MachineTransformer extends Block {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top_iron");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_iron");
|
||||
}
|
||||
if(this == ModBlocks.machine_transformer_dnt) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -87,4 +88,43 @@ public class ReactorZirnox extends BlockDummyable {
|
||||
this.makeExtra(world, x + dir.offsetX * o, y + 4, z + dir.offsetZ * o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||
super.onNeighborBlockChange(world, x, y, z, neighbor);
|
||||
if (world.isRemote) return;
|
||||
int[] core = this.findCore(world, x, y, z);
|
||||
if (core == null) return;
|
||||
int cx = core[0];
|
||||
int cy = core[1];
|
||||
int cz = core[2];
|
||||
TileEntity te = world.getTileEntity(cx, cy, cz);
|
||||
if (!(te instanceof TileEntityReactorZirnox)) return;
|
||||
TileEntityReactorZirnox reactor = (TileEntityReactorZirnox) te;
|
||||
boolean powered = false;
|
||||
// 2. Scan multiblock
|
||||
for (int dx = -2; dx <= 2 && !powered; dx++) {
|
||||
for (int dy = 0; dy <= 4 && !powered; dy++) {
|
||||
for (int dz = -2; dz <= 2 && !powered; dz++) {
|
||||
// Get only surface blocks
|
||||
if (dx == -2 || dx == 2 ||
|
||||
dy == 0 || dy == 4 ||
|
||||
dz == -2 || dz == 2) {
|
||||
|
||||
int sx = cx + dx;
|
||||
int sy = cy + dy;
|
||||
int sz = cz + dz;
|
||||
|
||||
if (world.isBlockIndirectlyGettingPowered(sx, sy, sz) ||
|
||||
world.getBlockPowerInput(sx, sy, sz) > 0) {
|
||||
|
||||
powered = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
reactor.setRedstonePowered(powered);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,156 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemLock;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
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.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class VaultDoor extends BlockContainer implements IBomb, IMultiblock {
|
||||
|
||||
public VaultDoor(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityVaultDoor();
|
||||
}
|
||||
|
||||
@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) {
|
||||
TileEntityVaultDoor te = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
|
||||
if(!te.isLocked()) {
|
||||
te.tryToggle();
|
||||
return BombReturnCode.TRIGGERED;
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
return BombReturnCode.UNDEFINED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
|
||||
TileEntityVaultDoor te = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x + 1, y, z) && te.placeDummy(x + 2, y, z) && te.placeDummy(x + 2, y + 1, z) && te.placeDummy(x + 2, y + 2, z) && te.placeDummy(x + 2, y + 3, z) && te.placeDummy(x + 2, y + 4, z) && te.placeDummy(x + 1, y + 4, z) && te.placeDummy(x, y + 4, z) && te.placeDummy(x - 1, y + 4, z) && te.placeDummy(x - 2, y + 4, z) && te.placeDummy(x - 2, y + 3, z) && te.placeDummy(x - 2, y + 2, z) && te.placeDummy(x - 2, y + 1, z) && te.placeDummy(x - 2, y, z) && te.placeDummy(x - 1, y, z) &&
|
||||
// cog
|
||||
te.placeDummy(x - 1, y + 1, z) && te.placeDummy(x - 1, y + 2, z) && te.placeDummy(x - 1, y + 3, z) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x + 1, y + 1, z) && te.placeDummy(x + 1, y + 2, z) && te.placeDummy(x + 1, y + 3, z) &&
|
||||
// teeth
|
||||
te.placeDummy(x + 2, y, z + 1) && te.placeDummy(x + 1, y, z + 1) && te.placeDummy(x, y, z + 1) && te.placeDummy(x - 1, y, z + 1) && te.placeDummy(x - 2, y, z + 1))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x, y, z + 1) && te.placeDummy(x, y, z + 2) && te.placeDummy(x, y + 1, z + 2) && te.placeDummy(x, y + 2, z + 2) && te.placeDummy(x, y + 3, z + 2) && te.placeDummy(x, y + 4, z + 2) && te.placeDummy(x, y + 4, z + 1) && te.placeDummy(x, y + 4, z) && te.placeDummy(x, y + 4, z - 1) && te.placeDummy(x, y + 4, z - 2) && te.placeDummy(x, y + 3, z - 2) && te.placeDummy(x, y + 2, z - 2) && te.placeDummy(x, y + 1, z - 2) && te.placeDummy(x, y, z - 2) && te.placeDummy(x, y, z - 1) &&
|
||||
// cog
|
||||
te.placeDummy(x, y + 1, z - 1) && te.placeDummy(x, y + 2, z - 1) && te.placeDummy(x, y + 3, z - 1) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x, y + 1, z + 1) && te.placeDummy(x, y + 2, z + 1) && te.placeDummy(x, y + 3, z + 1) &&
|
||||
// teeth
|
||||
te.placeDummy(x - 1, y, z + 2) && te.placeDummy(x - 1, y, z + 1) && te.placeDummy(x - 1, y, z) && te.placeDummy(x - 1, y, z - 1) && te.placeDummy(x - 1, y, z - 2))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x + 1, y, z) && te.placeDummy(x + 2, y, z) && te.placeDummy(x + 2, y + 1, z) && te.placeDummy(x + 2, y + 2, z) && te.placeDummy(x + 2, y + 3, z) && te.placeDummy(x + 2, y + 4, z) && te.placeDummy(x + 1, y + 4, z) && te.placeDummy(x, y + 4, z) && te.placeDummy(x - 1, y + 4, z) && te.placeDummy(x - 2, y + 4, z) && te.placeDummy(x - 2, y + 3, z) && te.placeDummy(x - 2, y + 2, z) && te.placeDummy(x - 2, y + 1, z) && te.placeDummy(x - 2, y, z) && te.placeDummy(x - 1, y, z) &&
|
||||
// cog
|
||||
te.placeDummy(x - 1, y + 1, z) && te.placeDummy(x - 1, y + 2, z) && te.placeDummy(x - 1, y + 3, z) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x + 1, y + 1, z) && te.placeDummy(x + 1, y + 2, z) && te.placeDummy(x + 1, y + 3, z) &&
|
||||
// teeth
|
||||
te.placeDummy(x + 2, y, z - 1) && te.placeDummy(x + 1, y, z - 1) && te.placeDummy(x, y, z - 1) && te.placeDummy(x - 1, y, z - 1) && te.placeDummy(x - 2, y, z - 1))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x, y, z + 1) && te.placeDummy(x, y, z + 2) && te.placeDummy(x, y + 1, z + 2) && te.placeDummy(x, y + 2, z + 2) && te.placeDummy(x, y + 3, z + 2) && te.placeDummy(x, y + 4, z + 2) && te.placeDummy(x, y + 4, z + 1) && te.placeDummy(x, y + 4, z) && te.placeDummy(x, y + 4, z - 1) && te.placeDummy(x, y + 4, z - 2) && te.placeDummy(x, y + 3, z - 2) && te.placeDummy(x, y + 2, z - 2) && te.placeDummy(x, y + 1, z - 2) && te.placeDummy(x, y, z - 2) && te.placeDummy(x, y, z - 1) &&
|
||||
// cog
|
||||
te.placeDummy(x, y + 1, z - 1) && te.placeDummy(x, y + 2, z - 1) && te.placeDummy(x, y + 3, z - 1) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x, y + 1, z + 1) && te.placeDummy(x, y + 2, z + 1) && te.placeDummy(x, y + 3, z + 1) &&
|
||||
// teeth
|
||||
te.placeDummy(x + 1, y, z + 2) && te.placeDummy(x + 1, y, z + 1) && te.placeDummy(x + 1, y, z) && te.placeDummy(x + 1, y, z - 1) && te.placeDummy(x + 1, y, z - 2))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit)) {
|
||||
return false;
|
||||
|
||||
}
|
||||
if(!player.isSneaking()) {
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
if(entity.isLocked()) {
|
||||
if(entity.canAccess(player))
|
||||
entity.tryToggle();
|
||||
} else {
|
||||
entity.tryToggle();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
entity.type++;
|
||||
if(entity.type >= entity.maxTypes)
|
||||
entity.type = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.network.TileEntityConnectorSuper;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ConnectorRedWireSuper extends PylonBase {
|
||||
|
||||
public ConnectorRedWireSuper(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityConnectorSuper();
|
||||
}
|
||||
|
||||
@Override public int onBlockPlaced(World world, int x, int y, int z, int side, float fX, float fY, float fZ, int meta) { return side; }
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
setBlockBounds(world.getBlockMetadata(x, y, z));
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { setBlockBounds(world.getBlockMetadata(x, y, z)); }
|
||||
|
||||
private void setBlockBounds(int meta) {
|
||||
|
||||
float pixel = 0.0625F;
|
||||
float min = pixel * 5F;
|
||||
float max = pixel * 11F;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta).getOpposite();
|
||||
|
||||
float minX = dir == Library.NEG_X ? 0F : dir == Library.POS_X ? 0F : min;
|
||||
float maxX = dir == Library.POS_X ? 1F : dir == Library.NEG_X ? 1F : max;
|
||||
float minY = dir == Library.NEG_Y ? 0F : dir == Library.POS_Y ? 0F : min;
|
||||
float maxY = dir == Library.POS_Y ? 1F : dir == Library.NEG_Y ? 1F : max;
|
||||
float minZ = dir == Library.NEG_Z ? 0F : dir == Library.POS_Z ? 0F : min;
|
||||
float maxZ = dir == Library.POS_Z ? 1F : dir == Library.NEG_Z ? 1F : max;
|
||||
|
||||
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "100m");
|
||||
}
|
||||
}
|
||||
@ -82,9 +82,9 @@ public class MachineBatterySocket extends BlockDummyable implements ITooltipProv
|
||||
if(socket.syncStack == null) return;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(BobMathUtil.getShortNumber(socket.powerFromStack(socket.syncStack)) + " / " + BobMathUtil.getShortNumber(socket.maxPowerFromStack(socket.syncStack)) + "HE");
|
||||
text.add(BobMathUtil.getShortNumber(socket.syncPower) + " / " + BobMathUtil.getShortNumber(socket.syncMaxPower) + "HE");
|
||||
|
||||
double percent = (double) socket.powerFromStack(socket.syncStack) / (double) socket.maxPowerFromStack(socket.syncStack);
|
||||
double percent = (double) socket.syncPower / socket.syncMaxPower;
|
||||
int charge = (int) Math.floor(percent * 10_000D);
|
||||
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||
|
||||
|
||||
@ -37,6 +37,8 @@ public class ClientConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Integer> RENDER_REBAR_LIMIT = new ConfigWrapper(250);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_X = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Boolean> SHOW_BLOCK_META_OVERLAY = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> BADGES_HUD = new ConfigWrapper(true);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
|
||||
@ -63,6 +65,8 @@ public class ClientConfig extends RunningConfig {
|
||||
configMap.put("RENDER_REBAR_LIMIT", RENDER_REBAR_LIMIT);
|
||||
configMap.put("TOOL_HUD_INDICATOR_X", TOOL_HUD_INDICATOR_X);
|
||||
configMap.put("TOOL_HUD_INDICATOR_Y", TOOL_HUD_INDICATOR_Y);
|
||||
configMap.put("SHOW_BLOCK_META_OVERLAY", SHOW_BLOCK_META_OVERLAY);
|
||||
configMap.put("BADGES_HUD", BADGES_HUD);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import com.hbm.inventory.recipes.PrecAssRecipes;
|
||||
import com.hbm.lib.RefStrings;
|
||||
public class GeneralConfig {
|
||||
|
||||
@ -43,6 +45,10 @@ public class GeneralConfig {
|
||||
|
||||
public static boolean enableExpensiveMode = false;
|
||||
|
||||
public static boolean trueExp() {
|
||||
return enableExpensiveMode && !PrecAssRecipes.INSTANCE.modified;
|
||||
}
|
||||
|
||||
public static boolean enable528 = false;
|
||||
public static boolean enable528ReasimBoilers = true;
|
||||
public static boolean enable528ColtanDeposit = true;
|
||||
@ -53,6 +59,11 @@ public class GeneralConfig {
|
||||
public static boolean enable528ExplosiveEnergistics = true;
|
||||
public static int coltanRate = 2;
|
||||
|
||||
public static boolean true528() {
|
||||
return enable528 && enable528ReasimBoilers && !enable528ColtanSpawn && enable528BosniaSimulator &&
|
||||
enable528NetherBurn && enable528PressurizedRecipes && enable528ExplosiveEnergistics && coltanRate <= 2;
|
||||
}
|
||||
|
||||
public static boolean enableLBSM = false;
|
||||
public static boolean enableLBSMFullSchrab = true;
|
||||
public static boolean enableLBSMShorterDecay = true;
|
||||
|
||||
@ -68,6 +68,10 @@ public class MobConfig {
|
||||
public static double rampantSmokeStackOverride = 0.4;
|
||||
public static double pollutionMult = 3;
|
||||
|
||||
public static boolean trueRam() {
|
||||
return rampantMode && rampantNaturalScoutSpawn && scoutThreshold <= 0.1 && rampantExtendedTargetting && rampantDig && rampantGlyphidGuidance;
|
||||
}
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY = CommonConfig.CATEGORY_MOBS;
|
||||
|
||||
@ -21,6 +21,7 @@ public class ServerConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
||||
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> LEGACY_CRUCIBLE_RULES = new ConfigWrapper(false);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
|
||||
@ -34,6 +35,7 @@ public class ServerConfig extends RunningConfig {
|
||||
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
||||
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
||||
configMap.put("ENABLE_MKU", ENABLE_MKU);
|
||||
configMap.put("LEGACY_CRUCIBLE_RULES", LEGACY_CRUCIBLE_RULES);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -161,7 +161,7 @@ public class RodRecipes {
|
||||
|
||||
public static void registerInit() {
|
||||
/* GT6 */
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadah-Enriched")) addPellet(new DictFrame("Naquadah-Enriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadahEnriched")) addPellet(new DictFrame("NaquadahEnriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadria")) addPellet(new DictFrame("Naquadria"), EnumWatzType.NQR);
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +77,8 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_akimbo, 1), new Object[] { "UMU", 'U', ModItems.gun_uzi, 'M', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "BRM", "BGS", 'B', DESH.lightBarrel(), 'R', DESH.lightReceiver(), 'M', GUNMETAL.mechanism(), 'G', ANY_PLASTIC.grip(), 'S', DESH.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "BBB", "PGM", 'B', DESH.heavyBarrel(), 'P', STEEL.plateCast(), 'G', DESH.grip(), 'M', GUNMETAL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_star_f, 1), new Object[] { "BRM", " G", 'B', WEAPONSTEEL.lightBarrel(), 'R', WEAPONSTEEL.lightReceiver(), 'M', WEAPONSTEEL.mechanism(), 'G', ANY_PLASTIC.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_star_f_akimbo, 1), new Object[] { "UMU", 'U', ModItems.gun_star_f, 'M', BIGMT.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_g3, 1), new Object[] { "BRM", "WGS", 'B', WEAPONSTEEL.lightBarrel(), 'R', WEAPONSTEEL.lightReceiver(), 'M', WEAPONSTEEL.mechanism(), 'W', WOOD.grip(), 'G', RUBBER.grip(), 'S', WOOD.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_g3_zebra, 1), new Object[] { " M ", "MPM", " M ", 'M', BIGMT.mechanism(), 'P', ModItems.gun_g3 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "BBB", "PGM", 'B', WEAPONSTEEL.heavyBarrel(), 'P', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'G', WEAPONSTEEL.grip(), 'M', WEAPONSTEEL.mechanism() });
|
||||
@ -101,6 +103,9 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_charge_thrower, 1), new Object[] { "MMM", "BBL", "GG ", 'M', GUNMETAL.mechanism(), 'B', STEEL.heavyBarrel(), 'G', STEEL.grip(), 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_drill, 1), new Object[] { " GL", "IBP", " GL", 'G', GUNMETAL.ingot(), 'L', ANY_RUBBER.ingot(), 'I', TI.ingot(), 'B', STEEL.block(), 'P', ModItems.piston_selenium });
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_pa_melee, 1), new Object[] { " C ", "MWM", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'M', ModItems.motor, 'W', GOLD.wireDense() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_pa_ranged, 1), new Object[] { "C", "W", "P", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'P', ANY_PLASTIC.ingot(), 'W', GOLD.wireDense() });
|
||||
|
||||
//SEDNA Ammo
|
||||
CraftingManager.addRecipeAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.STONE, 6), new Object[] { "C", "P", "G", 'C', KEY_COBBLESTONE, 'P', Items.paper, 'G', Items.gunpowder });
|
||||
CraftingManager.addRecipeAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.STONE_AP, 6), new Object[] { "C", "P", "G", 'C', Items.flint, 'P', Items.paper, 'G', Items.gunpowder });
|
||||
|
||||
@ -150,10 +150,13 @@ public class EntityFBI extends EntityMob implements IRangedAttackMob {
|
||||
canDestroy.add(Blocks.trapdoor);
|
||||
canDestroy.add(ModBlocks.machine_press);
|
||||
canDestroy.add(ModBlocks.machine_epress);
|
||||
canDestroy.add(ModBlocks.machine_chemplant);
|
||||
canDestroy.add(ModBlocks.machine_chemical_plant);
|
||||
canDestroy.add(ModBlocks.machine_chemical_factory);
|
||||
canDestroy.add(ModBlocks.machine_crystallizer);
|
||||
canDestroy.add(ModBlocks.machine_turbine);
|
||||
canDestroy.add(ModBlocks.machine_large_turbine);
|
||||
canDestroy.add(ModBlocks.machine_industrial_turbine);
|
||||
canDestroy.add(ModBlocks.machine_chungus);
|
||||
canDestroy.add(ModBlocks.machine_purex);
|
||||
canDestroy.add(ModBlocks.crate_iron);
|
||||
canDestroy.add(ModBlocks.crate_steel);
|
||||
canDestroy.add(ModBlocks.machine_diesel);
|
||||
|
||||
@ -66,17 +66,13 @@ public class EntityMaskMan extends EntityMob implements IBossDisplayData, IRadia
|
||||
return true;
|
||||
}
|
||||
|
||||
if(source.isFireDamage())
|
||||
amount = 0;
|
||||
if(source.isMagicDamage())
|
||||
amount = 0;
|
||||
if(source.isProjectile())
|
||||
amount *= 0.25F;
|
||||
if(source.isExplosion())
|
||||
amount *= 0.5F;
|
||||
if(source.isFireDamage()) amount = 0;
|
||||
if(source.isMagicDamage()) amount = 0;
|
||||
if(source.isProjectile()) amount *= 0.5F;
|
||||
if(source.isExplosion()) amount *= 0.5F;
|
||||
|
||||
if(amount > 50) {
|
||||
amount = 50 + (amount - 50) * 0.25F;
|
||||
amount = 50 + (amount - 50) * 0.5F;
|
||||
}
|
||||
|
||||
return super.attackEntityFrom(source, amount);
|
||||
|
||||
@ -149,7 +149,7 @@ public class BobmazonOfferFactory {
|
||||
|
||||
special.add(new Offer(ItemKitNBT.create(
|
||||
new ItemStack(ModItems.rod_of_discord).setStackDisplayName("Cock Joke"),
|
||||
ModItems.canned_conserve.stackFromEnum(64, EnumFoodType.JIZZ).setStackDisplayName("Class A Horse Semen"),
|
||||
ModItems.canned_conserve.stackFromEnum(64, EnumFoodType.SLIME).setStackDisplayName("Class A Horse Semen"),
|
||||
new ItemStack(ModItems.pipe_lead).setStackDisplayName("Get Nutted, Dumbass"),
|
||||
new ItemStack(ModItems.gem_alexandrite)
|
||||
).setStackDisplayName("The Nut Bucket"), Requirement.HIDDEN, 64));
|
||||
|
||||
@ -56,6 +56,7 @@ public class HazmatRegistry {
|
||||
double env = 1.0D; // 99%
|
||||
double hev = 2.3D; // 99.5%
|
||||
double rpa = 2D; // 99%
|
||||
double ncrpa = 1.7D; // 97%
|
||||
double trench = 1D; // 90%
|
||||
double fau = 4D; // 99.99%
|
||||
double dns = 5D; // 99.999%
|
||||
@ -130,6 +131,11 @@ public class HazmatRegistry {
|
||||
HazmatRegistry.registerHazmat(ModItems.rpa_legs, rpa * legs);
|
||||
HazmatRegistry.registerHazmat(ModItems.rpa_boots, rpa * boots);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.ncrpa_helmet, ncrpa * helmet);
|
||||
HazmatRegistry.registerHazmat(ModItems.ncrpa_plate, ncrpa * chest);
|
||||
HazmatRegistry.registerHazmat(ModItems.ncrpa_legs, ncrpa * legs);
|
||||
HazmatRegistry.registerHazmat(ModItems.ncrpa_boots, ncrpa * boots);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.trenchmaster_helmet, trench * helmet);
|
||||
HazmatRegistry.registerHazmat(ModItems.trenchmaster_plate, trench * chest);
|
||||
HazmatRegistry.registerHazmat(ModItems.trenchmaster_legs, trench * legs);
|
||||
|
||||
@ -11,8 +11,8 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.imc.ICompatNHNEI;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.gui.GUIMachineShredder;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.recipes.ShredderRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
@ -175,9 +175,18 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler implements ICom
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
if(fuels == null || fuels.isEmpty())
|
||||
fuels = new ArrayList<Fuel>();
|
||||
for(ItemStack i : MachineRecipes.instance().getBlades()) {
|
||||
for(ItemStack i : getBlades()) {
|
||||
fuels.add(new Fuel(i));
|
||||
}
|
||||
return super.newInstance();
|
||||
}
|
||||
|
||||
public static ArrayList<ItemStack> getBlades() {
|
||||
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
|
||||
fuels.add(new ItemStack(ModItems.blades_advanced_alloy));
|
||||
fuels.add(new ItemStack(ModItems.blades_steel));
|
||||
fuels.add(new ItemStack(ModItems.blades_titanium));
|
||||
fuels.add(new ItemStack(ModItems.blades_desh));
|
||||
return fuels;
|
||||
}
|
||||
}
|
||||
|
||||
10
src/main/java/com/hbm/interfaces/HalfLifeType.java
Normal file
10
src/main/java/com/hbm/interfaces/HalfLifeType.java
Normal file
@ -0,0 +1,10 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public enum HalfLifeType {
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
@ -1,429 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
/**
|
||||
* Interface for customizable warheads or other explosive devices
|
||||
* @author UFFR
|
||||
*
|
||||
*/
|
||||
@Beta
|
||||
@Spaghetti("AAAAAAAA")
|
||||
public interface ICustomWarhead
|
||||
{
|
||||
public static enum EnumCustomWarhead
|
||||
{
|
||||
AMAT,
|
||||
BF,
|
||||
BIO,
|
||||
CHEM,
|
||||
FUSION,
|
||||
GRAV,
|
||||
HE,
|
||||
NUCLEAR,
|
||||
TX,
|
||||
SCHRAB,
|
||||
ZPE;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.".concat(toString()));
|
||||
}
|
||||
|
||||
public enum EnumChemicalType
|
||||
{
|
||||
ACID,
|
||||
CHLORINE,
|
||||
NERVE,
|
||||
TOX;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.CHEM.".concat(toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public enum EnumBioType
|
||||
{
|
||||
ANTHRAX,
|
||||
MKU;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.BIO.".concat(toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
public static enum EnumCustomWarheadTrait
|
||||
{
|
||||
CLEAN,
|
||||
CLEANISH,
|
||||
DIRTY,
|
||||
RAD,
|
||||
SALT;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadTrait.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public static enum EnumWeaponType
|
||||
{
|
||||
DENIAL,
|
||||
STRATEGIC,
|
||||
TACTICAL,
|
||||
WMD;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadType.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public static final String KEY_ANTHRAX = "warheadFuel.ANTHRAX";
|
||||
public static final String KEY_MKU = "warheadFuel.MKU";
|
||||
public static final String KEY_CAUSTIC = "warheadFuel.ACID";
|
||||
public static final String KEY_NERVE = "warheadFuel.NERVE";
|
||||
public static final String KEY_TOX = "warheadFuel.TOX";
|
||||
|
||||
public static final String NBT_GROUP = "NTM_NUKE_INFO";
|
||||
public static final String NBT_YIELD = "YIELD";
|
||||
public static final String NBT_ALTITUDE = "ALTITUDE";
|
||||
public static final String NBT_MASS = "MASS";
|
||||
public static final String NBT_SPECIAL = "SPECIAL_FIELD";
|
||||
public static final String NBT_WARHEAD = "WARHEAD";
|
||||
public static final String NBT_TYPE = "WARHEAD_TYPE";
|
||||
public static final String NBT_TRAIT = "WARHEAD_TRAIT";
|
||||
public static final DecimalFormat df = new DecimalFormat("#.00");
|
||||
|
||||
public static EnumChatFormatting getColorFromWarhead(EnumCustomWarhead warhead)
|
||||
{
|
||||
switch (warhead)
|
||||
{
|
||||
case AMAT:
|
||||
return EnumChatFormatting.DARK_RED;
|
||||
case BF:
|
||||
return EnumChatFormatting.GREEN;
|
||||
case BIO:
|
||||
return EnumChatFormatting.GOLD;
|
||||
case CHEM:
|
||||
return EnumChatFormatting.YELLOW;
|
||||
case FUSION:
|
||||
return EnumChatFormatting.BLUE;
|
||||
case GRAV:
|
||||
return EnumChatFormatting.DARK_GRAY;
|
||||
case HE:
|
||||
return EnumChatFormatting.RED;
|
||||
case NUCLEAR:
|
||||
return EnumChatFormatting.DARK_GREEN;
|
||||
case SCHRAB:
|
||||
return EnumChatFormatting.AQUA;
|
||||
case TX:
|
||||
return EnumChatFormatting.DARK_PURPLE;
|
||||
case ZPE:
|
||||
return (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.DARK_AQUA : EnumChatFormatting.LIGHT_PURPLE);
|
||||
default:
|
||||
return EnumChatFormatting.WHITE;
|
||||
}
|
||||
}
|
||||
|
||||
public default float getYield()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
public default EnumCustomWarhead getWarheadType(NBTTagCompound data)
|
||||
{
|
||||
return EnumCustomWarhead.valueOf(data.getString(NBT_WARHEAD));
|
||||
}
|
||||
public default EnumWeaponType getWeaponType(NBTTagCompound data)
|
||||
{
|
||||
return EnumWeaponType.valueOf(data.getString(NBT_TYPE));
|
||||
}
|
||||
public default EnumCustomWarheadTrait getWeaponTrait(NBTTagCompound data)
|
||||
{
|
||||
return EnumCustomWarheadTrait.valueOf(data.getString(NBT_TRAIT));
|
||||
}
|
||||
public ItemStack constructNew();
|
||||
public ICustomWarhead getInstance();
|
||||
|
||||
public default Item getItem()
|
||||
{
|
||||
return (Item) this;
|
||||
}
|
||||
|
||||
public static ItemStack addData(NBTTagCompound data, Item item)
|
||||
{
|
||||
ItemStack stackOut = new ItemStack(item);
|
||||
|
||||
stackOut.stackTagCompound = new NBTTagCompound();
|
||||
stackOut.stackTagCompound.setTag(NBT_GROUP, data);
|
||||
|
||||
return stackOut.copy();
|
||||
}
|
||||
|
||||
public default NBTTagCompound getWarheadData(ItemStack stack)
|
||||
{
|
||||
return stack.getTagCompound().getCompoundTag(NBT_GROUP);
|
||||
}
|
||||
|
||||
public default ItemStack addFuel(ItemStack stack, Enum<?> fuel, float amount)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
{
|
||||
NBTTagCompound data = getWarheadData(stack);
|
||||
data.setFloat(fuel.toString(), amount);
|
||||
data.setFloat(NBT_MASS, data.getFloat(NBT_MASS) + amount);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public default ItemStack addData(ItemStack stack, String key, String value)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
getWarheadData(stack).setString(key, value);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public default void addCompositionalInfo(NBTTagCompound data, List<String> tooltip, List<Enum<?>> combinedFuels)
|
||||
{
|
||||
for (Enum<?> f : combinedFuels)
|
||||
if (data.getFloat(f.toString()) > 0)
|
||||
tooltip.add(String.format(Locale.US, "%s: %skg (%s)", I18nUtil.resolveKey("warheadFuel.".concat(f.toString())), df.format(data.getFloat(f.toString())), BobMathUtil.toPercentage(data.getFloat(f.toString()), data.getFloat(NBT_MASS))));
|
||||
}
|
||||
|
||||
public default void addTooltip(ItemStack stack, List<String> tooltip)
|
||||
{
|
||||
// tooltip.clear();
|
||||
try {
|
||||
NBTTagCompound data = getWarheadData(stack);
|
||||
|
||||
final ArrayList<Enum<?>> combinedFuels = new ArrayList<>();
|
||||
combinedFuels.addAll(Arrays.asList(FissileFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(FusionFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(SaltedFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(EnumCustomWarhead.values()));
|
||||
switch (getWarheadType(data))
|
||||
{
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
case HE:
|
||||
tooltip.add("Composition:");
|
||||
addCompositionalInfo(data, tooltip, combinedFuels);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
final EnumCustomWarhead warhead = getWarheadType(data);
|
||||
tooltip.add(data.getFloat(NBT_MASS) + "kg total");
|
||||
tooltip.add("");
|
||||
switch (warhead)
|
||||
{
|
||||
case CHEM:
|
||||
case BIO:
|
||||
tooltip.add("Type: " + getColorFromWarhead(warhead) + I18nUtil.resolveKey("warhead.".concat(warhead.toString()), I18nUtil.resolveKey(data.getString(NBT_SPECIAL))));
|
||||
break;
|
||||
default:
|
||||
tooltip.add("Type: " + getColorFromWarhead(warhead) + warhead.getLoc());
|
||||
break;
|
||||
}
|
||||
tooltip.add("Function: " + getWeaponType(data).getLoc());
|
||||
switch (warhead)
|
||||
{
|
||||
case AMAT:
|
||||
case BF:
|
||||
case FUSION:
|
||||
case GRAV:
|
||||
case HE:
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
tooltip.add("Yield: " + BobMathUtil.getShortNumber(data.getInteger(NBT_YIELD)) + "T");
|
||||
break;
|
||||
case BIO:
|
||||
case CHEM:
|
||||
case SCHRAB:
|
||||
tooltip.add("Radius: " + BobMathUtil.getShortNumber(data.getInteger(NBT_YIELD)) + "M");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tooltip.add("Trait: " + getWeaponTrait(data).getLoc());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainRegistry.logger.catching(Level.ERROR, e);
|
||||
}
|
||||
}
|
||||
|
||||
public enum FissileFuel
|
||||
{
|
||||
U233(15F, 197.5F, HazardRegistry.u233, 19.05F),
|
||||
U235(52F, 202.5F, HazardRegistry.u235, 19.05F),
|
||||
Np237(60F, 202.5F, HazardRegistry.np237, 20.45F),
|
||||
Pu239(10F, 207.1F, HazardRegistry.pu239, 19.86F),
|
||||
Pu241(12, 210F, HazardRegistry.pu241, 19.86F),
|
||||
Am241(66, 210F, HazardRegistry.am241, 13.67F),
|
||||
Am242m(11F, 212F, HazardRegistry.am242, 13.67F),
|
||||
Sa326(1F, 250F, HazardRegistry.sa326, 39.7F);
|
||||
public final float criticalMass;
|
||||
public final float energyReleased;
|
||||
public final float radioactivity;
|
||||
private final float mass;
|
||||
private FissileFuel(float criticalMass, float energyReleased, float radioactivity, float mass)
|
||||
{
|
||||
this.criticalMass = criticalMass;
|
||||
this.energyReleased = energyReleased;
|
||||
this.radioactivity = radioactivity;
|
||||
this.mass = mass;
|
||||
}
|
||||
public float getBlockMass()
|
||||
{
|
||||
return mass * 100;
|
||||
}
|
||||
public float getIngotMass()
|
||||
{
|
||||
return getBlockMass() / 9;
|
||||
}
|
||||
public float getNuggetMass()
|
||||
{
|
||||
return getIngotMass() / 9;
|
||||
}
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadFuel.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public enum FusionFuel
|
||||
{
|
||||
DEUT,
|
||||
TRIT,
|
||||
Li,
|
||||
LiDEUT;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadFuel".concat(toString()));
|
||||
}
|
||||
}
|
||||
public enum SaltedFuel
|
||||
{
|
||||
Co59(1.4902F * 0.75F, 5, HalfLifeType.MEDIUM, 8.86F),
|
||||
Co60(1.4902F, 5, HalfLifeType.MEDIUM, 8.86F),
|
||||
Sr90(0.546F, 28, HalfLifeType.MEDIUM, 2.64F),
|
||||
Cs137(1.1737F, 30, HalfLifeType.MEDIUM, 1.93F),
|
||||
Ta181(0.52F * 0.75F, 114, HalfLifeType.SHORT, 16.65F),
|
||||
Ta182(0.52F, 114, HalfLifeType.SHORT, 16.654F),
|
||||
Au197(1.3735F * 0.75F, 2, HalfLifeType.SHORT, 19.32F),
|
||||
Au198(1.3735F, 2, HalfLifeType.SHORT, 19.32F),
|
||||
Pu240(5.25575F, 65, HalfLifeType.LONG, 19.86F),
|
||||
Sa327(0.5F, 100, HalfLifeType.LONG, 39.7F);
|
||||
public final float decayEnergy;
|
||||
public final int halfLife;
|
||||
public final HalfLifeType type;
|
||||
private final float mass;
|
||||
SaltedFuel(float decayEnergy, int halfLife, HalfLifeType type, float mass)
|
||||
{
|
||||
this.decayEnergy = decayEnergy;
|
||||
this.halfLife = halfLife;
|
||||
this.type = type;
|
||||
this.mass = mass;
|
||||
}
|
||||
public enum HalfLifeType
|
||||
{
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
public float getBlockMass()
|
||||
{
|
||||
return mass * 100;
|
||||
}
|
||||
public float getIngotMass()
|
||||
{
|
||||
return getBlockMass() / 9;
|
||||
}
|
||||
public float getNuggetMass()
|
||||
{
|
||||
return getIngotMass() / 9;
|
||||
}
|
||||
}
|
||||
|
||||
/*public static class CustomWarheadWrapper
|
||||
{
|
||||
public static final ICustomWarhead cWarhead = (ICustomWarhead) ModItems.custom_warhead;
|
||||
public static final ICustomWarhead cCore = (ICustomWarhead) ModItems.custom_core;
|
||||
public static final CustomWarheadWrapper gravimetricBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumCustomWarhead.GRAV, 1000.0F).addData(NBT_TYPE, EnumWeaponType.TACTICAL).addData(NBT_WARHEAD, EnumCustomWarhead.GRAV).addData(NBT_TRAIT, EnumCustomWarheadTrait.CLEAN);
|
||||
public static final CustomWarheadWrapper pureFusionBase = new CustomWarheadWrapper(cWarhead).addFuel(FusionFuel.LiDEUT, 500).addData(NBT_TYPE, EnumWeaponType.TACTICAL).addData(NBT_WARHEAD, EnumCustomWarhead.FUSION).addData(NBT_TRAIT, EnumCustomWarheadTrait.CLEANISH).setStackData(8, 1);
|
||||
public static final CustomWarheadWrapper chemicalBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumChemicalType.NERVE, 15).addData(NBT_TYPE, EnumWeaponType.WMD).addData(NBT_WARHEAD, EnumCustomWarhead.CHEM).addData(NBT_TRAIT, EnumCustomWarheadTrait.DIRTY).addData(NBT_SPECIAL, KEY_NERVE).setStackData(1, 2);
|
||||
public static final CustomWarheadWrapper biologicalBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumBioType.ANTHRAX, 15).addData(NBT_TYPE, EnumWeaponType.WMD).addData(NBT_WARHEAD, EnumCustomWarhead.BIO).addData(NBT_TRAIT, EnumCustomWarheadTrait.DIRTY).addData(NBT_SPECIAL, KEY_ANTHRAX).setStackData(1, 3);
|
||||
public static final CustomWarheadWrapper saltedBase = new CustomWarheadWrapper(cWarhead).addFuel(FissileFuel.U235, 20).addFuel(FissileFuel.Pu239, 5).addFuel(FusionFuel.LiDEUT, 20).addFuel(SaltedFuel.Co59, 10).addData(NBT_TYPE, EnumWeaponType.DENIAL).addData(NBT_WARHEAD, EnumCustomWarhead.TX).addData(NBT_TRAIT, EnumCustomWarheadTrait.SALT).setStackData(1, 4);
|
||||
private ItemStack stack;
|
||||
private ICustomWarhead warhead;
|
||||
public CustomWarheadWrapper(ItemStack stack)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
{
|
||||
this.stack = ((ICustomWarhead) stack.getItem()).constructNew();
|
||||
warhead = (ICustomWarhead) stack.getItem();
|
||||
}
|
||||
else
|
||||
throw new IllegalArgumentException("Input stack item is not instance of " + ICustomWarhead.class.toString());
|
||||
}
|
||||
public CustomWarheadWrapper(ICustomWarhead warhead)
|
||||
{
|
||||
stack = warhead.constructNew();
|
||||
this.warhead = warhead;
|
||||
}
|
||||
public CustomWarheadWrapper(Item item)
|
||||
{
|
||||
if (!(item instanceof ICustomWarhead))
|
||||
throw new IllegalArgumentException("Input stack item is not instance of [ICustomWarhead]");
|
||||
stack = ((ICustomWarhead) item).constructNew();
|
||||
warhead = (ICustomWarhead) item;
|
||||
}
|
||||
public CustomWarheadWrapper addFuel(Enum<?> fuel, float amount)
|
||||
{
|
||||
warhead.addFuel(stack, fuel, amount);
|
||||
return this;
|
||||
}
|
||||
public CustomWarheadWrapper addData(String key, String value)
|
||||
{
|
||||
warhead.addData(stack, key, value);
|
||||
return this;
|
||||
}
|
||||
public CustomWarheadWrapper addData(String key, Enum<?> value)
|
||||
{
|
||||
return addData(key, value.toString());
|
||||
}
|
||||
public CustomWarheadWrapper setStackData(int stackSize, int meta)
|
||||
{
|
||||
stack.stackSize = stackSize <= 1 ? 1 : stackSize;
|
||||
stack.setItemDamage(meta <= 0 ? 0 : meta);
|
||||
return this;
|
||||
}
|
||||
public NBTTagCompound regurgitateData()
|
||||
{
|
||||
return (NBTTagCompound) warhead.getWarheadData(getStack()).copy();
|
||||
}
|
||||
public ICustomWarhead getInterface()
|
||||
{
|
||||
return warhead;
|
||||
}
|
||||
public ItemStack getStack()
|
||||
{
|
||||
return stack.copy();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@ -6,13 +6,12 @@ import com.hbm.inventory.container.ContainerCrateDesh;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUICrateDesh extends GuiContainer {
|
||||
public class GUICrateDesh extends GuiCrateBase {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_desh.png");
|
||||
private IInventory crate;
|
||||
|
||||
@ -7,12 +7,11 @@ import com.hbm.inventory.container.ContainerCrateIron;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUICrateIron extends GuiContainer {
|
||||
public class GUICrateIron extends GuiCrateBase {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_iron.png");
|
||||
private IInventory diFurnace;
|
||||
|
||||
@ -6,13 +6,12 @@ import com.hbm.inventory.container.ContainerCrateSteel;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUICrateSteel extends GuiContainer {
|
||||
public class GUICrateSteel extends GuiCrateBase {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_steel.png");
|
||||
private IInventory crate;
|
||||
|
||||
@ -7,12 +7,11 @@ import com.hbm.inventory.container.ContainerCrateTemplate;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUICrateTemplate extends GuiContainer {
|
||||
public class GUICrateTemplate extends GuiCrateBase {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_template.png");
|
||||
private IInventory diFurnace;
|
||||
|
||||
@ -8,12 +8,11 @@ import com.hbm.inventory.container.ContainerCrateTungsten;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUICrateTungsten extends GuiContainer {
|
||||
public class GUICrateTungsten extends GuiCrateBase {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_tungsten.png");
|
||||
private static ResourceLocation texture_hot = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_tungsten_hot.png");
|
||||
|
||||
19
src/main/java/com/hbm/inventory/gui/GuiCrateBase.java
Normal file
19
src/main/java/com/hbm/inventory/gui/GuiCrateBase.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
public abstract class GuiCrateBase extends GuiContainer {
|
||||
|
||||
public GuiCrateBase(Container container) {
|
||||
super(container);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int button) {
|
||||
boolean touchScreen = this.mc.gameSettings.touchscreen;
|
||||
this.mc.gameSettings.touchscreen = false;
|
||||
super.mouseClicked(x, y, button);
|
||||
this.mc.gameSettings.touchscreen = touchScreen;
|
||||
}
|
||||
}
|
||||
@ -80,7 +80,7 @@ public class ArcWelderRecipes extends SerializableRecipe {
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_CMB.id), 1_200, 10_000_000L, new FluidStack(Fluids.REFORMGAS, 1_000),
|
||||
new OreDictStack(CMB.plateCast(), 2)));
|
||||
//pre-DFC
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id), 6_000, 20_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id), 6_000, 50_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
|
||||
new OreDictStack(OSMIRIDIUM.plateCast(), 2)));
|
||||
|
||||
//Missile Parts
|
||||
|
||||
@ -112,6 +112,8 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
this.register(new GenericRecipe("ass.explastic").setup(600, 20_000).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.PLASTIC.ordinal()))
|
||||
.inputItems(new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(ANY_RUBBER.ingot(), 8))
|
||||
.inputFluids(new FluidStack(Fluids.SOLVENT, 1_000)));
|
||||
this.register(new GenericRecipe("ass.exgold").setup(600, 10_000).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.GOLD_DUST.ordinal()))
|
||||
.inputItems(new OreDictStack(GOLD.dust(), 64), new OreDictStack(GOLD.dust(), 64)));
|
||||
|
||||
// cloth
|
||||
this.register(new GenericRecipe("ass.hazcloth").setup(50, 100).outputItems(new ItemStack(ModItems.hazmat_cloth, 4))
|
||||
@ -386,8 +388,8 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
this.register(new GenericRecipe("ass.hephaestus").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_hephaestus, 1))
|
||||
.inputItems(new OreDictStack(STEEL.pipe(), 12), new OreDictStack(STEEL.ingot(), 24), new OreDictStack(CU.plate(), 24), new OreDictStack(NB.ingot(), 4), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModBlocks.glass_quartz, 16))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(NB.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModBlocks.glass_quartz, 16)));
|
||||
this.register(new GenericRecipe("ass.iturbine").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_large_turbine, 1))
|
||||
.inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 6), new OreDictStack(DURA.pipe(), 3), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC))
|
||||
this.register(new GenericRecipe("ass.iturbine").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_industrial_turbine, 1))
|
||||
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 4), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 16), new OreDictStack(DURA.pipe(), 16), new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.CIRCUIT)));
|
||||
this.register(new GenericRecipe("ass.leviturbine").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_chungus, 1))
|
||||
.inputItems(new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.plateWelded(), 16), new OreDictStack(TI.plate(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 16), new ComparableStack(ModItems.turbine_tungsten, 5), new ComparableStack(ModItems.turbine_titanium, 3), new ComparableStack(ModItems.flywheel_beryllium, 1), new OreDictStack(GOLD.wireDense(), 48), new OreDictStack(DURA.pipe(), 16), new OreDictStack(STEEL.pipe(), 16))
|
||||
@ -457,7 +459,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16)));
|
||||
this.register(new GenericRecipe("ass.orbus").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_orbus, 1))
|
||||
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210))
|
||||
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(BSCCO.wireDense(), 8), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new OreDictStack(BIGMT.plateCast(), 16), new ComparableStack(ModItems.coil_advanced_alloy, 24), new ComparableStack(ModItems.battery_sc, 1, EnumBatterySC.PO210)));
|
||||
|
||||
// accelerators
|
||||
|
||||
@ -9,11 +9,14 @@ import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumExpensiveType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -26,8 +29,13 @@ public class ExposureChamberRecipes extends SerializableRecipe {
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_higgs), new OreDictStack(U.ingot()), new ItemStack(ModItems.ingot_schraranium)));
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_higgs), new OreDictStack(U238.ingot()), new ItemStack(ModItems.ingot_schrabidium)));
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_dark), new OreDictStack(PU.ingot()), new ItemStack(ModItems.ingot_euphemium)));
|
||||
|
||||
if(GeneralConfig.enableExpensiveMode) {
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_sparkticle), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.DEGENERATE_MATTER), new ItemStack(ModItems.ingot_dineutronium)));
|
||||
} else {
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_sparkticle), new OreDictStack(SBD.ingot()), new ItemStack(ModItems.ingot_dineutronium)));
|
||||
}
|
||||
}
|
||||
|
||||
public static ExposureChamberRecipe getRecipe(ItemStack particle, ItemStack input) {
|
||||
for(ExposureChamberRecipe recipe : recipes) if(recipe.particle.matchesRecipe(particle, true) && recipe.ingredient.matchesRecipe(input, true)) return recipe;
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.util.Tuple.Triplet;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@ -50,7 +49,6 @@ public class MachineRecipes {
|
||||
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
|
||||
fuels.add(new ItemStack(ModItems.battery_potato));
|
||||
fuels.add(new ItemStack(ModItems.battery_potatos));
|
||||
fuels.add(new ItemStack(ModItems.fusion_core));
|
||||
fuels.add(new ItemStack(ModItems.energy_core));
|
||||
for(EnumBatteryPack num : EnumBatteryPack.values()) fuels.add(new ItemStack(ModItems.battery_pack, 1, num.ordinal()));
|
||||
for(EnumBatterySC num : EnumBatterySC.values()) fuels.add(new ItemStack(ModItems.battery_sc, 1, num.ordinal()));
|
||||
@ -58,35 +56,6 @@ public class MachineRecipes {
|
||||
return fuels;
|
||||
}
|
||||
|
||||
public ArrayList<ItemStack> getBlades() {
|
||||
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
|
||||
fuels.add(new ItemStack(ModItems.blades_advanced_alloy));
|
||||
fuels.add(new ItemStack(ModItems.blades_steel));
|
||||
fuels.add(new ItemStack(ModItems.blades_titanium));
|
||||
fuels.add(new ItemStack(ModItems.blades_desh));
|
||||
return fuels;
|
||||
}
|
||||
|
||||
public static boolean mODE(Item item, String[] names) {
|
||||
return mODE(new ItemStack(item), names);
|
||||
}
|
||||
|
||||
public static boolean mODE(ItemStack item, String[] names) {
|
||||
boolean flag = false;
|
||||
if(names.length > 0) {
|
||||
for(int i = 0; i < names.length; i++) {
|
||||
if(mODE(item, names[i]))
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
public static boolean mODE(Item item, String name) {
|
||||
return mODE(new ItemStack(item), name);
|
||||
}
|
||||
|
||||
//Matches Ore Dict Entry
|
||||
public static boolean mODE(ItemStack stack, String name) {
|
||||
|
||||
|
||||
@ -8,10 +8,13 @@ import java.util.List;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumExpensiveType;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -86,6 +89,13 @@ public class ParticleAcceleratorRecipes extends SerializableRecipe {
|
||||
new ItemStack(ModItems.particle_digamma),
|
||||
null
|
||||
));
|
||||
recipes.add(new ParticleAcceleratorRecipe(
|
||||
new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.GOLD_DUST),
|
||||
new OreDictStack(SBD.ingot()),
|
||||
10_000,
|
||||
new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.DEGENERATE_MATTER.ordinal()),
|
||||
null
|
||||
));
|
||||
recipes.add(new ParticleAcceleratorRecipe(
|
||||
new ComparableStack(Items.chicken),
|
||||
new ComparableStack(Items.chicken),
|
||||
|
||||
@ -67,7 +67,7 @@ public class PedestalRecipes extends SerializableRecipe {
|
||||
new OreDictStack(STAR.ingot()), new OreDictStack(DURA.plateCast()), new OreDictStack(STAR.ingot())));
|
||||
|
||||
register(new PedestalRecipe(new ItemStack(ModItems.gun_flamer_daybreaker),
|
||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.JIZZ), new OreDictStack(GOLD.plateCast()),
|
||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.SLIME), new OreDictStack(GOLD.plateCast()),
|
||||
new OreDictStack(P_WHITE.ingot()), new ComparableStack(ModItems.gun_flamer), new OreDictStack(P_WHITE.ingot()),
|
||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.stick_dynamite), new OreDictStack(GOLD.plateCast()))
|
||||
.extra(PedestalExtraCondition.SUN));
|
||||
|
||||
@ -25,6 +25,7 @@ import com.hbm.inventory.recipes.*;
|
||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import api.hbm.recipe.IRecipeRegisterListener;
|
||||
@ -301,7 +302,7 @@ public abstract class SerializableRecipe {
|
||||
writer.value(comp.nbt != null ? "nbt" : "item"); //NBT identifier
|
||||
writer.value(Item.itemRegistry.getNameForObject(comp.toStack().getItem())); //item name
|
||||
if(comp.stacksize != 1 || comp.meta > 0) writer.value(comp.stacksize); //stack size
|
||||
if(comp.meta > 0) writer.value(comp.meta); //metadata
|
||||
if(comp.meta > 0 || comp.nbt != null) writer.value(comp.meta); //metadata
|
||||
if(comp.nbt != null) writer.value(comp.nbt.toString()); //NBT
|
||||
} else if(astack instanceof ComparableStack) {
|
||||
ComparableStack comp = (ComparableStack) astack;
|
||||
@ -324,7 +325,11 @@ public abstract class SerializableRecipe {
|
||||
Item item = (Item) Item.itemRegistry.getObject(array.get(0).getAsString());
|
||||
int stacksize = array.size() > 1 ? array.get(1).getAsInt() : 1;
|
||||
int meta = array.size() > 2 ? array.get(2).getAsInt() : 0;
|
||||
if(item != null) return new ItemStack(item, stacksize, meta);
|
||||
if(item != null) {
|
||||
ItemStack stack = new ItemStack(item, stacksize, meta);
|
||||
if(array.size() > 3) ItemStackUtil.addNBTFromString(stack, array.get(3).getAsString());
|
||||
return stack;
|
||||
}
|
||||
} catch(Exception ex) { }
|
||||
MainRegistry.logger.error("Error reading stack array " + array.toString() + " - defaulting to NOTHING item!");
|
||||
return new ItemStack(ModItems.nothing);
|
||||
@ -335,8 +340,12 @@ public abstract class SerializableRecipe {
|
||||
Item item = (Item) Item.itemRegistry.getObject(array.get(0).getAsString());
|
||||
int stacksize = array.size() > 2 ? array.get(1).getAsInt() : 1;
|
||||
int meta = array.size() > 3 ? array.get(2).getAsInt() : 0;
|
||||
if(item != null) {
|
||||
ItemStack stack = new ItemStack(item, stacksize, meta);
|
||||
if(array.size() > 4) ItemStackUtil.addNBTFromString(stack, array.get(3).getAsString());
|
||||
float chance = array.get(array.size() - 1).getAsFloat();
|
||||
if(item != null) return new Pair(new ItemStack(item, stacksize, meta), chance);
|
||||
return new Pair(stack, chance);
|
||||
}
|
||||
} catch(Exception ex) { }
|
||||
MainRegistry.logger.error("Error reading stack array " + array.toString() + " - defaulting to NOTHING item!");
|
||||
return new Pair(new ItemStack(ModItems.nothing), 1F);
|
||||
@ -366,8 +375,9 @@ public abstract class SerializableRecipe {
|
||||
writer.beginArray();
|
||||
writer.setIndent("");
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getItem())); //item name
|
||||
if(stack.stackSize != 1 || stack.getItemDamage() != 0) writer.value(stack.stackSize); //stack size
|
||||
if(stack.getItemDamage() != 0) writer.value(stack.getItemDamage()); //metadata
|
||||
if(stack.stackSize != 1 || stack.getItemDamage() != 0 || stack.hasTagCompound()) writer.value(stack.stackSize); //stack size
|
||||
if(stack.getItemDamage() != 0 || stack.hasTagCompound()) writer.value(stack.getItemDamage()); //metadata
|
||||
if(stack.hasTagCompound()) writer.value(stack.stackTagCompound.toString()); //nbt
|
||||
writer.endArray();
|
||||
writer.setIndent(" ");
|
||||
}
|
||||
@ -376,8 +386,9 @@ public abstract class SerializableRecipe {
|
||||
writer.beginArray();
|
||||
writer.setIndent("");
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getKey().getItem())); //item name
|
||||
if(stack.getKey().stackSize != 1 || stack.getKey().getItemDamage() != 0) writer.value(stack.getKey().stackSize); //stack size
|
||||
if(stack.getKey().getItemDamage() != 0) writer.value(stack.getKey().getItemDamage()); //metadata
|
||||
if(stack.getKey().stackSize != 1 || stack.getKey().getItemDamage() != 0 || stack.getKey().hasTagCompound()) writer.value(stack.getKey().stackSize); //stack size
|
||||
if(stack.getKey().getItemDamage() != 0 || stack.getKey().hasTagCompound()) writer.value(stack.getKey().getItemDamage()); //metadata
|
||||
if(stack.getKey().hasTagCompound()) writer.value(stack.getKey().stackTagCompound.toString()); //nbt
|
||||
writer.value(stack.value); //chance
|
||||
writer.endArray();
|
||||
writer.setIndent(" ");
|
||||
|
||||
@ -122,10 +122,10 @@ public class ItemPoolsComponent {
|
||||
weighted(Items.map, 0, 1, 1, 50),
|
||||
weighted(Items.writable_book, 0, 1, 1, 30),
|
||||
weighted(ModItems.cigarette, 0, 1, 16, 20),
|
||||
weighted(ModItems.toothpicks, 0, 1, 16, 10),
|
||||
weighted(ModItems.dust, 0, 1, 1, 40),
|
||||
weighted(ModItems.dust_tiny, 0, 1, 3, 75),
|
||||
weighted(ModItems.ink, 0, 1, 1, 1),
|
||||
weighted(ModItems.screwdriver, 0, 1, 1, 10),
|
||||
weighted(ModItems.blueprint_folder, 0, 1, 1, 5)
|
||||
};
|
||||
}};
|
||||
|
||||
@ -92,6 +92,6 @@ public class ItemEnums {
|
||||
}
|
||||
|
||||
public static enum EnumExpensiveType {
|
||||
STEEL_PLATING, HEAVY_FRAME, CIRCUIT, LEAD_PLATING, FERRO_PLATING, COMPUTER, BRONZE_TUBES, PLASTIC
|
||||
STEEL_PLATING, HEAVY_FRAME, CIRCUIT, LEAD_PLATING, FERRO_PLATING, COMPUTER, BRONZE_TUBES, PLASTIC, GOLD_DUST, DEGENERATE_MATTER
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.handler.BucketHandler;
|
||||
import com.hbm.handler.ability.IToolAreaAbility;
|
||||
import com.hbm.handler.ability.IToolHarvestAbility;
|
||||
import com.hbm.handler.ability.IWeaponAbility;
|
||||
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
|
||||
import com.hbm.interfaces.HalfLifeType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
@ -610,7 +610,6 @@ public class ModItems {
|
||||
public static Item gear_large;
|
||||
public static Item sawblade;
|
||||
|
||||
public static Item toothpicks;
|
||||
public static Item ducttape;
|
||||
public static Item catalyst_clay;
|
||||
|
||||
@ -774,12 +773,6 @@ public class ModItems {
|
||||
public static Item ams_catalyst_thorium;
|
||||
public static Item ams_catalyst_tungsten;
|
||||
|
||||
public static Item ams_focus_blank;
|
||||
public static Item ams_focus_limiter;
|
||||
public static Item ams_focus_booster;
|
||||
|
||||
public static Item ams_muzzle;
|
||||
|
||||
public static Item ams_lens;
|
||||
|
||||
public static Item ams_core_sing;
|
||||
@ -936,33 +929,6 @@ public class ModItems {
|
||||
public static Item cap_fritz;
|
||||
public static Item ring_pull;
|
||||
public static Item bdcl;
|
||||
//public static Item canned_beef;
|
||||
//public static Item canned_tuna;
|
||||
//public static Item canned_mystery;
|
||||
//public static Item canned_pashtet;
|
||||
//public static Item canned_cheese;
|
||||
//public static Item canned_jizz;
|
||||
//public static Item canned_milk;
|
||||
//public static Item canned_ass;
|
||||
//public static Item canned_pizza;
|
||||
//public static Item canned_tube;
|
||||
//public static Item canned_tomato;
|
||||
//public static Item canned_asbestos;
|
||||
//public static Item canned_bhole;
|
||||
//public static Item canned_hotdogs;
|
||||
//public static Item canned_leftovers;
|
||||
//public static Item canned_yogurt;
|
||||
//public static Item canned_stew;
|
||||
//public static Item canned_chinese;
|
||||
//public static Item canned_oil;
|
||||
//public static Item canned_fist;
|
||||
//public static Item canned_spam;
|
||||
//public static Item canned_fried;
|
||||
//public static Item canned_napalm;
|
||||
//public static Item canned_diesel;
|
||||
//public static Item canned_kerosene;
|
||||
//public static Item canned_recursion;
|
||||
//public static Item canned_bark;
|
||||
public static ItemEnumMulti canned_conserve;
|
||||
public static Item can_key;
|
||||
|
||||
@ -1374,16 +1340,6 @@ public class ModItems {
|
||||
public static Item mp_chip_4;
|
||||
public static Item mp_chip_5;
|
||||
|
||||
public static Item missile_skin_camo;
|
||||
public static Item missile_skin_desert;
|
||||
public static Item missile_skin_flames;
|
||||
public static Item missile_skin_manly_pink;
|
||||
public static Item missile_skin_orange_insulation;
|
||||
public static Item missile_skin_sleek;
|
||||
public static Item missile_skin_soviet_glory;
|
||||
public static Item missile_skin_soviet_stank;
|
||||
public static Item missile_skin_metal;
|
||||
|
||||
public static Item missile_custom;
|
||||
|
||||
public static Item missile_soyuz;
|
||||
@ -1443,6 +1399,8 @@ public class ModItems {
|
||||
public static Item gun_uzi_akimbo;
|
||||
public static Item gun_spas12;
|
||||
public static Item gun_panzerschreck;
|
||||
public static Item gun_star_f;
|
||||
public static Item gun_star_f_akimbo;
|
||||
public static Item gun_g3;
|
||||
public static Item gun_g3_zebra;
|
||||
public static Item gun_stinger;
|
||||
@ -1481,6 +1439,8 @@ public class ModItems {
|
||||
public static Item gun_n_i_4_n_i;
|
||||
public static Item gun_charge_thrower;
|
||||
public static Item gun_drill;
|
||||
public static Item gun_pa_melee;
|
||||
public static Item gun_pa_ranged;
|
||||
|
||||
public static Item ammo_standard;
|
||||
public static Item ammo_secret;
|
||||
@ -1820,6 +1780,10 @@ public class ModItems {
|
||||
public static Item rpa_plate;
|
||||
public static Item rpa_legs;
|
||||
public static Item rpa_boots;
|
||||
public static Item ncrpa_helmet;
|
||||
public static Item ncrpa_plate;
|
||||
public static Item ncrpa_legs;
|
||||
public static Item ncrpa_boots;
|
||||
public static Item bismuth_helmet;
|
||||
public static Item bismuth_plate;
|
||||
public static Item bismuth_legs;
|
||||
@ -2162,8 +2126,6 @@ public class ModItems {
|
||||
public static Item door_bunker;
|
||||
public static Item door_red;
|
||||
|
||||
public static Item sliding_blast_door_skin;
|
||||
|
||||
public static Item record_lc;
|
||||
public static Item record_ss;
|
||||
public static Item record_vc;
|
||||
@ -2734,7 +2696,6 @@ public class ModItems {
|
||||
blade_tungsten = new Item().setUnlocalizedName("blade_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":blade_tungsten");
|
||||
turbine_tungsten = new Item().setUnlocalizedName("turbine_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":turbine_tungsten");
|
||||
|
||||
toothpicks = new Item().setUnlocalizedName("toothpicks").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":toothpicks");
|
||||
ducttape = new Item().setUnlocalizedName("ducttape").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ducttape");
|
||||
catalyst_clay = new Item().setUnlocalizedName("catalyst_clay").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":catalyst_clay");
|
||||
|
||||
@ -2975,7 +2936,7 @@ public class ModItems {
|
||||
radx = new ItemPill(0).setUnlocalizedName("radx").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radx");
|
||||
siox = new ItemPill(0).setUnlocalizedName("siox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":siox");
|
||||
pill_herbal = new ItemPill(0).setUnlocalizedName("pill_herbal").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_herbal");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax");
|
||||
fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet");
|
||||
five_htp = new ItemPill(0).setUnlocalizedName("five_htp").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":5htp");
|
||||
pill_iodine = new ItemPill(0).setUnlocalizedName("pill_iodine").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_iodine");
|
||||
@ -3467,7 +3428,7 @@ public class ModItems {
|
||||
icf_pellet = new ItemICFPellet().setUnlocalizedName("icf_pellet").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":icf_pellet");
|
||||
icf_pellet_depleted = new Item().setUnlocalizedName("icf_pellet_depleted").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":icf_pellet_depleted");
|
||||
|
||||
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite_new");
|
||||
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite");
|
||||
nuclear_waste_long = new ItemWasteLong().setUnlocalizedName("nuclear_waste_long").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long");
|
||||
nuclear_waste_long_tiny = new ItemWasteLong().setUnlocalizedName("nuclear_waste_long_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long_tiny");
|
||||
nuclear_waste_short = new ItemWasteShort().setUnlocalizedName("nuclear_waste_short").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_short");
|
||||
@ -3707,16 +3668,6 @@ public class ModItems {
|
||||
mp_chip_4 = new ItemCustomMissilePart().makeChip(0.005F) .setUnlocalizedName("mp_c_4").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_c_4");
|
||||
mp_chip_5 = new ItemCustomMissilePart().makeChip(0.0F) .setUnlocalizedName("mp_c_5").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_c_5");
|
||||
|
||||
missile_skin_camo = new ItemCustomLore().setUnlocalizedName("missile_skin_camo").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_camo");
|
||||
missile_skin_desert = new ItemCustomLore().setUnlocalizedName("missile_skin_desert").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_desert");
|
||||
missile_skin_flames = new ItemCustomLore().setUnlocalizedName("missile_skin_flames").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_flames");
|
||||
missile_skin_manly_pink = new ItemCustomLore().setUnlocalizedName("missile_skin_manly_pink").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_manly_pink");
|
||||
missile_skin_orange_insulation = new ItemCustomLore().setUnlocalizedName("missile_skin_orange_insulation").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_orange_insulation");
|
||||
missile_skin_sleek = new ItemCustomLore().setUnlocalizedName("missile_skin_sleek").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_sleek");
|
||||
missile_skin_soviet_glory = new ItemCustomLore().setUnlocalizedName("missile_skin_soviet_glory").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_soviet_glory");
|
||||
missile_skin_soviet_stank = new ItemCustomLore().setUnlocalizedName("missile_skin_soviet_stank").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_soviet_stank");
|
||||
missile_skin_metal = new ItemCustomLore().setUnlocalizedName("missile_skin_metal").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_metal");
|
||||
|
||||
ammo_shell = (ItemEnumMulti) new ItemAmmo(Ammo240Shell.class).setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_shell");
|
||||
ammo_dgk = new ItemCustomLore().setUnlocalizedName("ammo_dgk").setCreativeTab(MainRegistry.weaponTab);
|
||||
ammo_fireext = (ItemEnumMulti) new ItemAmmo(AmmoFireExt.class).setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_fireext");
|
||||
@ -3932,10 +3883,6 @@ public class ModItems {
|
||||
arc_electrode = new ItemArcElectrode().setUnlocalizedName("arc_electrode").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":arc_electrode");
|
||||
arc_electrode_burnt = new ItemArcElectrodeBurnt().setUnlocalizedName("arc_electrode_burnt").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":arc_electrode_burnt");
|
||||
|
||||
ams_focus_blank = new Item().setUnlocalizedName("ams_focus_blank").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_blank");
|
||||
ams_focus_limiter = new ItemCustomLore().setUnlocalizedName("ams_focus_limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_limiter");
|
||||
ams_focus_booster = new ItemCustomLore().setUnlocalizedName("ams_focus_booster").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_booster");
|
||||
ams_muzzle = new ItemCustomLore().setUnlocalizedName("ams_muzzle").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_muzzle");
|
||||
ams_lens = new ItemLens(60 * 60 * 60 * 20 * 100).setUnlocalizedName("ams_lens").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_lens");
|
||||
ams_core_sing = new ItemAMSCore(1000000000L, 200, 10).setUnlocalizedName("ams_core_sing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_core_sing");
|
||||
ams_core_wormhole = new ItemAMSCore(1500000000L, 200, 15).setUnlocalizedName("ams_core_wormhole").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_core_wormhole");
|
||||
@ -4313,6 +4260,20 @@ public class ModItems {
|
||||
rpa_legs = new ArmorRPA(aMatAJR, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_legs").setTextureName(RefStrings.MODID + ":rpa_legs");
|
||||
rpa_boots = new ArmorRPA(aMatAJR, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_boots").setTextureName(RefStrings.MODID + ":rpa_boots");
|
||||
|
||||
ncrpa_helmet = new ArmorNCRPA(aMatAJR, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25)
|
||||
.enableVATS(true)
|
||||
.setHasGeigerSound(true)
|
||||
.setHasHardLanding(true)
|
||||
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 3))
|
||||
.setStep("hbm:step.powered")
|
||||
.setJump("hbm:step.powered")
|
||||
.setFall("hbm:step.powered")
|
||||
.hides(EnumPlayerPart.HAT)
|
||||
.setUnlocalizedName("ncrpa_helmet").setTextureName(RefStrings.MODID + ":rpa_helmet");
|
||||
ncrpa_plate = new ArmorNCRPA(aMatAJR, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("ncrpa_plate").setTextureName(RefStrings.MODID + ":rpa_plate");
|
||||
ncrpa_legs = new ArmorNCRPA(aMatAJR, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("ncrpa_legs").setTextureName(RefStrings.MODID + ":rpa_legs");
|
||||
ncrpa_boots = new ArmorNCRPA(aMatAJR, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("ncrpa_boots").setTextureName(RefStrings.MODID + ":rpa_boots");
|
||||
|
||||
ArmorMaterial aMatBJ = EnumHelper.addArmorMaterial("HBM_BLACKJACK", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatBJ.customCraftingMaterial = ModItems.plate_armor_lunar;
|
||||
bj_helmet = new ArmorBJ(aMatBJ, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 1000, 100)
|
||||
@ -4877,8 +4838,6 @@ public class ModItems {
|
||||
door_bunker = new ItemModDoor().setUnlocalizedName("door_bunker").setCreativeTab(MainRegistry.blockTab).setTextureName(RefStrings.MODID + ":door_bunker");
|
||||
door_red = new ItemModDoor().setUnlocalizedName("door_red").setCreativeTab(null).setTextureName(RefStrings.MODID + ":door_red");
|
||||
|
||||
sliding_blast_door_skin = new ItemSlidingBlastDoorSkin().setUnlocalizedName("sliding_blast_door_skin").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":sliding_blast_door_default");
|
||||
|
||||
record_lc = new ItemModRecord("lc").setUnlocalizedName("record_lc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_lc");
|
||||
record_ss = new ItemModRecord("ss").setUnlocalizedName("record_ss").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_ss");
|
||||
record_vc = new ItemModRecord("vc").setUnlocalizedName("record_vc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_vc");
|
||||
@ -5509,7 +5468,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(turbine_titanium, turbine_titanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(turbine_tungsten, turbine_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerItem(flywheel_beryllium, flywheel_beryllium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(toothpicks, toothpicks.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ducttape, ducttape.getUnlocalizedName());
|
||||
GameRegistry.registerItem(catalyst_clay, catalyst_clay.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_assembly, missile_assembly.getUnlocalizedName());
|
||||
@ -5884,10 +5842,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(catalytic_converter, catalytic_converter.getUnlocalizedName());
|
||||
|
||||
//AMS Components
|
||||
GameRegistry.registerItem(ams_focus_blank, ams_focus_blank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_focus_limiter, ams_focus_limiter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_focus_booster, ams_focus_booster.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_muzzle, ams_muzzle.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_lens, ams_lens.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_core_sing, ams_core_sing.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_core_wormhole, ams_core_wormhole.getUnlocalizedName());
|
||||
@ -6334,6 +6288,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_uzi_akimbo, gun_uzi_akimbo.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_spas12, gun_spas12.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_panzerschreck, gun_panzerschreck.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_star_f, gun_star_f.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_star_f_akimbo, gun_star_f_akimbo.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_g3, gun_g3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_g3_zebra, gun_g3_zebra.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_stinger, gun_stinger.getUnlocalizedName());
|
||||
@ -6374,6 +6330,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_fireext, gun_fireext.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_charge_thrower, gun_charge_thrower.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_drill, gun_drill.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_pa_melee, gun_pa_melee.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_pa_ranged, gun_pa_ranged.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_secret, ammo_secret.getUnlocalizedName());
|
||||
@ -6871,6 +6829,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(rpa_plate, rpa_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rpa_legs, rpa_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rpa_boots, rpa_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_helmet, ncrpa_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_plate, ncrpa_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_legs, ncrpa_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_boots, ncrpa_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bj_helmet, bj_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bj_plate, bj_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bj_plate_jetpack, bj_plate_jetpack.getUnlocalizedName());
|
||||
@ -7059,7 +7021,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(door_office, door_office.getUnlocalizedName());
|
||||
GameRegistry.registerItem(door_bunker, door_bunker.getUnlocalizedName());
|
||||
GameRegistry.registerItem(door_red, door_red.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sliding_blast_door_skin, sliding_blast_door_skin.getUnlocalizedName());
|
||||
|
||||
//Records
|
||||
GameRegistry.registerItem(record_lc, record_lc.getUnlocalizedName());
|
||||
|
||||
@ -288,7 +288,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
Block block = player.worldObj.getBlock(px, py, pz);
|
||||
|
||||
if(block.getMaterial() != Material.air && player.getEntityData().getFloat("hfr_nextStepDistance") <= distanceWalkedOnStepModified.getFloat(player))
|
||||
player.playSound(sound, 1.0F, 1.0F);
|
||||
player.playSound(sound, 0.25F, 1.0F);
|
||||
|
||||
player.getEntityData().setFloat("hfr_nextStepDistance", nextStepDistance.getFloat(player));
|
||||
|
||||
@ -303,7 +303,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
ArmorFSB chestplate = (ArmorFSB) player.inventory.armorInventory[2].getItem();
|
||||
|
||||
if(chestplate.jump != null)
|
||||
player.playSound(chestplate.jump, 1.0F, 1.0F);
|
||||
player.playSound(chestplate.jump, 0.5F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,9 +315,6 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
|
||||
if(chestplate.hardLanding && player.fallDistance > 10) {
|
||||
|
||||
// player.playSound(Block.soundTypeAnvil.func_150496_b(), 2.0F,
|
||||
// 0.5F);
|
||||
|
||||
List<Entity> entities = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, player.boundingBox.expand(3, 0, 3));
|
||||
|
||||
for(Entity e : entities) {
|
||||
@ -337,11 +334,10 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
e.attackEntityFrom(DamageSource.causePlayerDamage(player).setDamageBypassesArmor(), (float) (intensity * 10));
|
||||
}
|
||||
}
|
||||
// return;
|
||||
}
|
||||
|
||||
if(chestplate.fall != null)
|
||||
player.playSound(chestplate.fall, 1.0F, 1.0F);
|
||||
player.playSound(chestplate.fall, 0.5F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
102
src/main/java/com/hbm/items/armor/ArmorNCRPA.java
Normal file
102
src/main/java/com/hbm/items/armor/ArmorNCRPA.java
Normal file
@ -0,0 +1,102 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.model.ModelArmorNCRPA;
|
||||
import com.hbm.render.tileentity.IItemRendererProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ArmorNCRPA extends ArmorFSBPowered implements IItemRendererProvider, IPAWeaponsProvider {
|
||||
|
||||
public ArmorNCRPA(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelArmorNCRPA[] models;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
if(models == null) {
|
||||
models = new ModelArmorNCRPA[4];
|
||||
for(int i = 0; i < 4; i++) models[i] = new ModelArmorNCRPA(i);
|
||||
}
|
||||
|
||||
return models[armorSlot];
|
||||
}
|
||||
|
||||
private static final UUID speed = UUID.fromString("6ab858ba-d712-485c-bae9-e5e765fc555a");
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
super.onArmorTick(world, player, stack);
|
||||
|
||||
if(this != ModItems.ncrpa_plate) return;
|
||||
|
||||
/// SPEED ///
|
||||
Multimap multimap = super.getAttributeModifiers(stack);
|
||||
multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(speed, "NCRPA SPEED", 0.1, 0));
|
||||
player.getAttributeMap().removeAttributeModifiers(multimap);
|
||||
|
||||
if(player.isSprinting()) {
|
||||
player.getAttributeMap().applyAttributeModifiers(multimap);
|
||||
}
|
||||
|
||||
if(this.hasFSBArmor(player)) {
|
||||
if(world.getTotalWorldTime() % 20 != 0) return;
|
||||
if(HbmPlayerProps.getData(player).enableHUD) player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, 0, true));
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Item getItemForRenderer() { return this; }
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() { setupRenderInv(); }
|
||||
public void renderNonInv() { setupRenderNonInv(); }
|
||||
public void renderCommon() {
|
||||
if(armorType == 0) GL11.glTranslated(0, 0.5, 0);
|
||||
renderStandard(ResourceManager.armor_ncr, armorType,
|
||||
ResourceManager.ncrpa_helmet, ResourceManager.ncrpa_chest, ResourceManager.ncrpa_arm, ResourceManager.ncrpa_leg,
|
||||
"Helmet,Eyes", "Chest", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
|
||||
}};
|
||||
}
|
||||
|
||||
public static final ArmorNCRPAMelee meleeComponent = new ArmorNCRPAMelee();
|
||||
public static final ArmorNCRPARanged rangedComponent = new ArmorNCRPARanged();
|
||||
|
||||
@Override
|
||||
public IPAMelee getMeleeComponent(EntityPlayer entity) {
|
||||
if(this.hasFSBArmorIgnoreCharge(entity)) return meleeComponent;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPARanged getRangedComponent(EntityPlayer entity) {
|
||||
if(this.hasFSBArmorIgnoreCharge(entity)) return rangedComponent;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
128
src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java
Normal file
128
src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java
Normal file
@ -0,0 +1,128 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.ConfettiUtil;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactoryPA;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
public class ArmorNCRPAMelee implements IPAMelee {
|
||||
|
||||
@Override public void clickPrimary(ItemStack stack, LambdaContext ctx) { XFactoryPA.doSwing(stack, ctx, GunAnimation.CYCLE, 25); }
|
||||
@Override public void clickSecondary(ItemStack stack, LambdaContext ctx) { XFactoryPA.doSwing(stack, ctx, GunAnimation.ALT_CYCLE, 30); }
|
||||
|
||||
@Override
|
||||
public void orchestra(ItemStack stack, LambdaContext ctx) {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
boolean swings = type == GunAnimation.CYCLE && (timer == 5 || timer == 15);
|
||||
boolean sweep = type == GunAnimation.ALT_CYCLE && timer == 5;
|
||||
|
||||
if((swings || sweep) && ctx.getPlayer() != null) {
|
||||
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D, 0.5D);
|
||||
|
||||
if(mop != null) {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && mop.entityHit.isEntityAlive()) {
|
||||
float damage = swings ? 15F : 35F;
|
||||
float knockback = swings ? 0F : 1.5F;
|
||||
float dt = swings ? 5F : 15F;
|
||||
float pierce = swings ? 0.1F : 0.25F;
|
||||
|
||||
if(mop.entityHit instanceof EntityLivingBase) {
|
||||
EntityLivingBase living = (EntityLivingBase) mop.entityHit;
|
||||
if(living.getMaxHealth() >= 100) damage *= 2.5;
|
||||
EntityDamageUtil.attackEntityFromNT((EntityLivingBase) mop.entityHit, DamageSource.causePlayerDamage(ctx.getPlayer()), damage, true, false, knockback, dt, pierce);
|
||||
if(!living.isEntityAlive()) ConfettiUtil.gib(living);
|
||||
} else {
|
||||
mop.entityHit.attackEntityFrom(DamageSource.causePlayerDamage(ctx.getPlayer()), damage);
|
||||
}
|
||||
|
||||
entity.worldObj.playSoundAtEntity(mop.entityHit, "hbm:weapon.fire.stab", 1F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
Block b = entity.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
entity.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, b.stepSound.getStepResourcePath(), 2F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusAnimation playAnim(ItemStack stack, GunAnimation type) {
|
||||
if(type == GunAnimation.EQUIP) return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().setPos(-1, 0, 0).addPos(0, 0, 0, 750, IType.SIN_DOWN));
|
||||
if(type == GunAnimation.CYCLE) return new BusAnimation()
|
||||
.addBus("SWINGRIGHT", new BusAnimationSequence().addPos(1, 0, 0, 250, IType.SIN_DOWN).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("SWINGLEFT", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(1, 0, 0, 250, IType.SIN_DOWN).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
if(type == GunAnimation.ALT_CYCLE) return new BusAnimation()
|
||||
.addBus("SWEEPTURN", new BusAnimationSequence().addPos(1, 0, 0, 100, IType.LINEAR).hold(350).addPos(0, 0, 0, 500, IType.LINEAR))
|
||||
.addBus("SWEEPCUT", new BusAnimationSequence().hold(100).addPos(1, 0, 0, 250, IType.SIN_DOWN).hold(100).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public void setupFirstPerson(ItemStack stack) { }
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.ncrpa_arm);
|
||||
|
||||
GL11.glTranslated(0, -1.5, 0.5);
|
||||
double scale = 0.125D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double swingRight = HbmAnimations.getRelevantTransformation("SWINGRIGHT")[0];
|
||||
double swingLeft = HbmAnimations.getRelevantTransformation("SWINGLEFT")[0];
|
||||
double sweepTurn = HbmAnimations.getRelevantTransformation("SWEEPTURN")[0];
|
||||
double sweepCut = HbmAnimations.getRelevantTransformation("SWEEPCUT")[0];
|
||||
|
||||
double forwardTilt = 60 - 60 * equip[0];
|
||||
double offsetOutward = 3;
|
||||
double roll = 60;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(-14 * swingLeft - 4 * sweepTurn, 6 * sweepCut, 2 * swingLeft + 8 * sweepCut);
|
||||
GL11.glRotated(forwardTilt + swingRight * 40 - 60 * sweepCut, 1, 0, 0);
|
||||
|
||||
GL11.glTranslated(offsetOutward, 0, 0);
|
||||
GL11.glTranslated(6, 8, 0);
|
||||
GL11.glRotated(90 * swingLeft, 0, 0, 1);
|
||||
GL11.glRotated(roll + 30 * swingLeft - 90 * sweepTurn, 0, 1, 0);
|
||||
GL11.glTranslated(-6, -8, 0);
|
||||
ResourceManager.armor_ncr.renderPart("LeftArm");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(14 * swingRight + 4 * sweepTurn, 6 * sweepCut, 2 * swingRight + 8 * sweepCut);
|
||||
GL11.glRotated(forwardTilt + swingLeft * 40 - 60 * sweepCut, 1, 0, 0);
|
||||
|
||||
GL11.glTranslated(-offsetOutward, 0, 0);
|
||||
GL11.glTranslated(-6, 8, 0);
|
||||
GL11.glRotated(-90 * swingRight, 0, 0, 1);
|
||||
GL11.glRotated(-roll - 30 * swingRight + 90 * sweepTurn, 0, 1, 0);
|
||||
GL11.glTranslated(6, -8, 0);
|
||||
ResourceManager.armor_ncr.renderPart("RightArm");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
51
src/main/java/com/hbm/items/armor/ArmorNCRPARanged.java
Normal file
51
src/main/java/com/hbm/items/armor/ArmorNCRPARanged.java
Normal file
@ -0,0 +1,51 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactoryRocket;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineBelt;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArmorNCRPARanged implements IPARanged {
|
||||
|
||||
public static MagazineBelt rocketSteerMag = new MagazineBelt();
|
||||
public static MagazineBelt rocketMag = new MagazineBelt();
|
||||
|
||||
@Override public void clickPrimary(ItemStack stack, LambdaContext ctx) { fireRocket(stack, ctx, true); }
|
||||
@Override public void clickSecondary(ItemStack stack, LambdaContext ctx) { fireRocket(stack, ctx, false); }
|
||||
|
||||
public static void fireRocket(ItemStack stack, LambdaContext ctx, boolean steer) {
|
||||
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
GunState state = ItemGunBaseNT.getState(stack, 0);
|
||||
MagazineBelt mag = steer ? rocketSteerMag : rocketMag;
|
||||
|
||||
if(state == GunState.IDLE) {
|
||||
if(mag.acceptedBullets.isEmpty()) {
|
||||
mag.addConfigs(steer ? XFactoryRocket.rocket_ncrpa_steer : XFactoryRocket.rocket_ncrpa);
|
||||
}
|
||||
BulletConfig cfg = mag.getType(stack, player.inventory);
|
||||
int amount = mag.getAmount(stack, player.inventory);
|
||||
|
||||
if(amount > 0) {
|
||||
mag.useUpAmmo(stack, player.inventory, 1);
|
||||
EntityBulletBaseMK4 mk4 = new EntityBulletBaseMK4(player, cfg, 25, 0, 0.25F * (player.getRNG().nextBoolean() ? - 1 : 1), 0, 0);
|
||||
player.worldObj.spawnEntityInWorld(mk4);
|
||||
ItemGunBaseNT.setState(stack, 0, GunState.COOLDOWN);
|
||||
ItemGunBaseNT.setTimer(stack, 0, 10);
|
||||
player.worldObj.playSoundAtEntity(player, "hbm:weapon.rpgShoot", 0.5F, 0.9F + player.getRNG().nextFloat() * 0.2F);
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
} else {
|
||||
ItemGunBaseNT.setState(stack, 0, GunState.COOLDOWN);
|
||||
ItemGunBaseNT.setTimer(stack, 0, 10);
|
||||
player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -11,11 +11,12 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ArmorRPA extends ArmorFSBPowered implements IItemRendererProvider {
|
||||
public class ArmorRPA extends ArmorFSBPowered implements IItemRendererProvider, IPAWeaponsProvider {
|
||||
|
||||
public ArmorRPA(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
|
||||
@ -52,4 +53,14 @@ public class ArmorRPA extends ArmorFSBPowered implements IItemRendererProvider {
|
||||
"Head", "Body,Fan,Glow", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
|
||||
}};
|
||||
}
|
||||
|
||||
public static final ArmorRPAMelee meleeComponent = new ArmorRPAMelee();
|
||||
|
||||
@Override
|
||||
public IPAMelee getMeleeComponent(EntityPlayer entity) {
|
||||
if(this.hasFSBArmorIgnoreCharge(entity)) return meleeComponent;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public IPARanged getRangedComponent(EntityPlayer entity) { return null; }
|
||||
}
|
||||
|
||||
135
src/main/java/com/hbm/items/armor/ArmorRPAMelee.java
Normal file
135
src/main/java/com/hbm/items/armor/ArmorRPAMelee.java
Normal file
@ -0,0 +1,135 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.ConfettiUtil;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactoryPA;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
@NotableComments
|
||||
public class ArmorRPAMelee implements IPAMelee {
|
||||
|
||||
@Override public void clickPrimary(ItemStack stack, LambdaContext ctx) { XFactoryPA.doSwing(stack, ctx, GunAnimation.CYCLE, 14); }
|
||||
@Override public void clickSecondary(ItemStack stack, LambdaContext ctx) { XFactoryPA.doSwing(stack, ctx, GunAnimation.ALT_CYCLE, 20); }
|
||||
|
||||
@Override
|
||||
public void orchestra(ItemStack stack, LambdaContext ctx) {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
// refire check so you can just continuously beat the shit out of someone
|
||||
if(type == GunAnimation.CYCLE && timer == 14 && ItemGunBaseNT.getPrimary(stack, 0)) {
|
||||
XFactoryPA.doSwing(stack, ctx, GunAnimation.CYCLE, 14);
|
||||
}
|
||||
|
||||
boolean swings = type == GunAnimation.CYCLE && (timer == 3 || timer == 9);
|
||||
boolean slap = type == GunAnimation.ALT_CYCLE && timer == 8;
|
||||
|
||||
if((swings || slap) && ctx.getPlayer() != null) {
|
||||
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D, 0.5D);
|
||||
|
||||
if(mop != null) {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
float damage = swings ? 15F : 35F;
|
||||
float knockback = swings ? 0F : 1.5F;
|
||||
float dt = swings ? 5F : 15F;
|
||||
float pierce = swings ? 0.1F : 0.25F;
|
||||
|
||||
if(mop.entityHit instanceof EntityLivingBase) {
|
||||
EntityLivingBase living = (EntityLivingBase) mop.entityHit;
|
||||
if(living.getMaxHealth() >= 100) damage *= 2.5;
|
||||
EntityDamageUtil.attackEntityFromNT((EntityLivingBase) mop.entityHit, DamageSource.causePlayerDamage(ctx.getPlayer()), damage, true, false, knockback, dt, pierce);
|
||||
if(living.getRNG().nextInt(slap ? 3 : 10) == 0 && !living.isEntityAlive()) ConfettiUtil.gib(living);
|
||||
} else {
|
||||
mop.entityHit.attackEntityFrom(DamageSource.causePlayerDamage(ctx.getPlayer()), damage);
|
||||
}
|
||||
|
||||
entity.worldObj.playSoundAtEntity(mop.entityHit, "hbm:weapon.fire.smack", 1F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
Block b = entity.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
entity.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, b.stepSound.getStepResourcePath(), 2F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusAnimation playAnim(ItemStack stack, GunAnimation type) {
|
||||
if(type == GunAnimation.EQUIP) return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().setPos(-1, 0, 0).addPos(0, 0, 0, 250, IType.SIN_DOWN));
|
||||
if(type == GunAnimation.CYCLE) return new BusAnimation()
|
||||
.addBus("SWINGRIGHT", new BusAnimationSequence().addPos(1, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SWINGLEFT", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(1, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
if(type == GunAnimation.ALT_CYCLE) return new BusAnimation()
|
||||
.addBus("SLAPTURN", new BusAnimationSequence().addPos(1, 0, 0, 250, IType.LINEAR).hold(150).addPos(0, 0, 0, 350, IType.LINEAR))
|
||||
.addBus("SLAP", new BusAnimationSequence().hold(250).addPos(1, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 350, IType.SIN_FULL));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public void setupFirstPerson(ItemStack stack) { }
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.rpa_arm);
|
||||
|
||||
GL11.glTranslated(0, -1.5, 0.5);
|
||||
double scale = 0.125D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double swingRight = HbmAnimations.getRelevantTransformation("SWINGRIGHT")[0];
|
||||
double swingLeft = HbmAnimations.getRelevantTransformation("SWINGLEFT")[0];
|
||||
double slapTurn = HbmAnimations.getRelevantTransformation("SLAPTURN")[0];
|
||||
double slap = HbmAnimations.getRelevantTransformation("SLAP")[0];
|
||||
|
||||
double forwardTilt = 60 - 60 * equip[0];
|
||||
double offsetOutward = 3;
|
||||
double roll = 60;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(-12 * swingLeft + 2 * slapTurn - 5 * slap, 6 * slap, 5 * swingLeft + 8 * slap);
|
||||
GL11.glRotated(forwardTilt - swingRight * 20, 1, 0, 0);
|
||||
|
||||
GL11.glTranslated(offsetOutward, 0, 0);
|
||||
GL11.glTranslated(6, 8, 0);
|
||||
GL11.glRotated(60 * swingLeft + 45 * slap, 0, 0, 1);
|
||||
GL11.glRotated(roll + 15 * swingLeft + 45 * slapTurn, 0, 1, 0);
|
||||
GL11.glTranslated(-6, -8, 0);
|
||||
ResourceManager.armor_remnant.renderPart("LeftArm");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(12 * swingRight - 2 * slapTurn + 5 * slap, 6 * slap, 5 * swingRight + 8 * slap);
|
||||
GL11.glRotated(forwardTilt - swingLeft * 20, 1, 0, 0);
|
||||
|
||||
GL11.glTranslated(-offsetOutward, 0, 0);
|
||||
GL11.glTranslated(-6, 8, 0);
|
||||
GL11.glRotated(-60 * swingRight - 45 * slap, 0, 0, 1);
|
||||
GL11.glRotated(-roll - 15 * swingRight - 45 * slapTurn, 0, 1, 0);
|
||||
GL11.glTranslated(6, -8, 0);
|
||||
ResourceManager.armor_remnant.renderPart("RightArm");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
19
src/main/java/com/hbm/items/armor/IPAMelee.java
Normal file
19
src/main/java/com/hbm/items/armor/IPAMelee.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IPAMelee {
|
||||
|
||||
public void setupFirstPerson(ItemStack stack);
|
||||
public void renderFirstPerson(ItemStack stack);
|
||||
|
||||
public BusAnimation playAnim(ItemStack stack, GunAnimation type);
|
||||
public void orchestra(ItemStack stack, LambdaContext ctx);
|
||||
|
||||
public void clickPrimary(ItemStack stack, LambdaContext ctx);
|
||||
public void clickSecondary(ItemStack stack, LambdaContext ctx);
|
||||
}
|
||||
11
src/main/java/com/hbm/items/armor/IPARanged.java
Normal file
11
src/main/java/com/hbm/items/armor/IPARanged.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IPARanged {
|
||||
|
||||
public void clickPrimary(ItemStack stack, LambdaContext ctx);
|
||||
public void clickSecondary(ItemStack stack, LambdaContext ctx);
|
||||
}
|
||||
36
src/main/java/com/hbm/items/armor/IPAWeaponsProvider.java
Normal file
36
src/main/java/com/hbm/items/armor/IPAWeaponsProvider.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public interface IPAWeaponsProvider {
|
||||
|
||||
public IPAMelee getMeleeComponent(EntityPlayer entity);
|
||||
|
||||
public static IPAMelee getMeleeComponentClient() {
|
||||
return getMeleeComponentCommon(MainRegistry.proxy.me());
|
||||
}
|
||||
|
||||
public static IPAMelee getMeleeComponentCommon(EntityPlayer player) {
|
||||
if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() instanceof IPAWeaponsProvider) {
|
||||
IPAWeaponsProvider prov = (IPAWeaponsProvider) player.inventory.armorInventory[2].getItem();
|
||||
return prov.getMeleeComponent(player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public IPARanged getRangedComponent(EntityPlayer entity);
|
||||
|
||||
public static IPARanged getRangedComponentClient() {
|
||||
return getRangedComponentCommon(MainRegistry.proxy.me());
|
||||
}
|
||||
|
||||
public static IPARanged getRangedComponentCommon(EntityPlayer player) {
|
||||
if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() instanceof IPAWeaponsProvider) {
|
||||
IPAWeaponsProvider prov = (IPAWeaponsProvider) player.inventory.armorInventory[2].getItem();
|
||||
return prov.getRangedComponent(player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -101,6 +101,7 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
|
||||
this.slots = new ItemStack[this.getSizeInventory()];
|
||||
if(target.stackTagCompound == null) {
|
||||
target.stackTagCompound = new NBTTagCompound();
|
||||
target.stackTagCompound.setLong("stacklock", rand.nextLong());
|
||||
}
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
|
||||
@ -113,7 +113,7 @@ public class ItemConserve extends ItemEnumMulti {
|
||||
MYSTERY(6, 0.5F),
|
||||
PASHTET(4, 0.5F),
|
||||
CHEESE(3, 1F),
|
||||
JIZZ(15, 5F), // :3
|
||||
SLIME(15, 5F),
|
||||
MILK(5, 0.25F),
|
||||
ASS(6, 0.75F), // :3
|
||||
PIZZA(8, 075F),
|
||||
|
||||
@ -43,8 +43,8 @@ public class ItemICFPellet extends Item {
|
||||
OXYGEN( 0xB4E2FF, 1.25D, 1.50D, 7.50D),
|
||||
SODIUM( 0xDFE4E7, 3.00D, 0.75D, 8.75D),
|
||||
//aluminium, silicon, phosphorus
|
||||
CHLORINE( 0xDAE598, 2.50D, 1.00D, 10.0D),
|
||||
CALCIUM( 0xD2C7A9, 3.00D, 1.00D, 12.5D),
|
||||
CHLORINE( 0xDAE598, 2.50D, 1.00D, 9.25D),
|
||||
CALCIUM( 0xD2C7A9, 3.00D, 1.00D, 9.75D),
|
||||
//titanium
|
||||
;
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ public class ItemStamp extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
if((this.type == StampType.PLATE || this.type == StampType.WIRE || this.type == StampType.CIRCUIT) && this.getMaxDamage() > 0)
|
||||
if(this.type == StampType.PLATE || this.type == StampType.WIRE || this.type == StampType.CIRCUIT)
|
||||
list.add("[CREATED USING TEMPLATE FOLDER]");
|
||||
}
|
||||
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDoorSkin extends Item {
|
||||
protected final IIcon[] icons;
|
||||
|
||||
public ItemDoorSkin(int skinCount) {
|
||||
setMaxStackSize(1);
|
||||
icons = new IIcon[skinCount];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getHasSubtypes() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return icons[meta];
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemSlidingBlastDoorSkin extends ItemDoorSkin {
|
||||
public ItemSlidingBlastDoorSkin() {
|
||||
super(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
this.itemIcon = reg.registerIcon(this.getIconString());
|
||||
|
||||
this.icons[0] = reg.registerIcon(RefStrings.MODID + ":sliding_blast_door_default");
|
||||
this.icons[1] = reg.registerIcon(RefStrings.MODID + ":sliding_blast_door_variant1");
|
||||
this.icons[2] = reg.registerIcon(RefStrings.MODID + ":sliding_blast_door_variant2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName(stack) + "." + stack.getItemDamage();
|
||||
}
|
||||
}
|
||||
@ -274,10 +274,11 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
|
||||
public static void playAnimation(EntityPlayer player, ItemStack stack, GunAnimation type, int index) {
|
||||
if(player instanceof EntityPlayerMP) {
|
||||
PacketDispatcher.wrapper.sendTo(new HbmAnimationPacket(type.ordinal(), 0, index), (EntityPlayerMP) player);
|
||||
}
|
||||
|
||||
setLastAnim(stack, index, type);
|
||||
setAnimTimer(stack, index, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeld) {
|
||||
@ -458,9 +459,9 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
|
||||
|
||||
for(int i = 0; i < confNo; i++) {
|
||||
IHUDComponent[] components = gun.getConfig(stack, i).getHUDComponents(stack);
|
||||
int bottomOffset = 0;
|
||||
|
||||
if(components != null) for(IHUDComponent component : components) {
|
||||
int bottomOffset = 0;
|
||||
component.renderHUDComponent(event, type, player, stack, bottomOffset, i);
|
||||
bottomOffset += component.getComponentHeight(player, stack);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.botprime.EntityBOTPrimeBase;
|
||||
import com.hbm.handler.threading.PacketThreading;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.particle.helper.AshesCreator;
|
||||
@ -11,8 +12,14 @@ import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityBlaze;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGolem;
|
||||
import net.minecraft.entity.monster.EntityIronGolem;
|
||||
import net.minecraft.entity.monster.EntityMagmaCube;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@ -42,10 +49,22 @@ public class ConfettiUtil {
|
||||
}
|
||||
|
||||
public static void gib(EntityLivingBase entity) {
|
||||
if(entity instanceof EntityCyberCrab) return;
|
||||
if(entity instanceof EntityTeslaCrab) return;
|
||||
if(entity instanceof EntityTaintCrab) return;
|
||||
if(entity instanceof EntitySlime) return;
|
||||
if(entity instanceof EntityOcelot) return;
|
||||
|
||||
int type = 0;
|
||||
if(entity instanceof EntitySlime) type = 1;
|
||||
if(entity instanceof EntityMagmaCube) type = 1;
|
||||
if(entity instanceof EntityCreeper) type = 1;
|
||||
if(entity instanceof EntityGolem) type = 2;
|
||||
if(entity instanceof EntityIronGolem) type = 2;
|
||||
if(entity instanceof EntityCyberCrab) type = 2;
|
||||
if(entity instanceof EntityTeslaCrab) type = 2;
|
||||
if(entity instanceof EntityTaintCrab) type = 2;
|
||||
if(entity instanceof EntityBlaze) type = 2;
|
||||
if(entity instanceof EntityFBIDrone) type = 2;
|
||||
if(entity instanceof EntityRADBeast) type = 2;
|
||||
if(entity instanceof EntityUFO) type = 2;
|
||||
if(entity instanceof EntityBOTPrimeBase) type = 2;
|
||||
|
||||
SkeletonCreator.composeEffectGib(entity.worldObj, entity, 0.25F);
|
||||
|
||||
@ -54,6 +73,7 @@ public class ConfettiUtil {
|
||||
NBTTagCompound vdat = new NBTTagCompound();
|
||||
vdat.setString("type", "giblets");
|
||||
vdat.setInteger("ent", entity.getEntityId());
|
||||
vdat.setInteger("gibType", type);
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(vdat, entity.posX, entity.posY + entity.height * 0.5, entity.posZ), new TargetPoint(entity.dimension, entity.posX, entity.posY + entity.height * 0.5, entity.posZ, 150));
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.hbm.interfaces.IOrderedEnum;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -8,6 +10,8 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -16,10 +20,12 @@ import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GunFactory {
|
||||
|
||||
public static BulletConfig ammo_debug;
|
||||
public static BulletConfig ammo_debug_shot;
|
||||
|
||||
public static SpentCasing CASING44 = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F, 1.0F, 1.5F).setColor(SpentCasing.COLOR_CASE_44);
|
||||
|
||||
@ -32,6 +38,7 @@ public class GunFactory {
|
||||
|
||||
/// BULLLET CFGS ///
|
||||
ammo_debug = new BulletConfig().setItem(ModItems.ammo_debug).setSpread(0.01F).setRicochetAngle(45).setCasing(CASING44.clone().register("DEBUG0"));
|
||||
ammo_debug_shot = new BulletConfig().setItem(ModItems.ammo_debug).setSpread(0.05F).setProjectiles(6).setRicochetAngle(45).setCasing(CASING44.clone().register("DEBUG1"));
|
||||
|
||||
/// GUNS ///
|
||||
ModItems.gun_debug = new ItemGunBaseNT(WeaponQuality.DEBUG, new GunConfig()
|
||||
@ -40,9 +47,15 @@ public class GunFactory {
|
||||
.dmg(10F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 12).addConfigs(ammo_debug))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD).pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE),
|
||||
new Receiver(1)
|
||||
.dmg(5F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(1, 12).addConfigs(ammo_debug_shot))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.canFire(Lego.LAMBDA_SECOND_CAN_FIRE).fire(Lego.LAMBDA_SECOND_FIRE))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).ps((stack, ctx) -> { Lego.clickReceiver(stack, ctx, 1); })
|
||||
.pr(Lego.LAMBDA_STANDARD_RELOAD).pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.decider(LAMBDA_DEBUG_DECIDER)
|
||||
.anim(Lego.LAMBDA_DEBUG_ANIMS)
|
||||
).setUnlocalizedName("gun_debug");
|
||||
|
||||
@ -69,6 +82,7 @@ public class GunFactory {
|
||||
XFactory45.init();
|
||||
XFactoryTool.init();
|
||||
XFactoryDrill.init();
|
||||
XFactoryPA.init();
|
||||
|
||||
ModItems.weapon_mod_test = new ItemEnumMulti(EnumModTest.class, true, true).setUnlocalizedName("weapon_mod_test").setMaxStackSize(1);
|
||||
ModItems.weapon_mod_generic = new ItemEnumMulti(EnumModGeneric.class, true, true).setUnlocalizedName("weapon_mod_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
@ -79,6 +93,17 @@ public class GunFactory {
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_DEBUG_DECIDER = (stack, ctx) -> {
|
||||
int index = ctx.configIndex;
|
||||
GunState lastState = ItemGunBaseNT.getState(stack, index);
|
||||
GunStateDecider.deciderStandardFinishDraw(stack, lastState, index);
|
||||
GunStateDecider.deciderStandardClearJam(stack, lastState, index);
|
||||
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 0, index);
|
||||
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 1, index);
|
||||
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 0, index, () -> { return ItemGunBaseNT.getPrimary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
|
||||
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 1, index, () -> { return ItemGunBaseNT.getSecondary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
|
||||
};
|
||||
|
||||
public static enum EnumAmmo implements IOrderedEnum {
|
||||
STONE, STONE_AP, STONE_IRON, STONE_SHOT,
|
||||
M357_BP, M357_SP, M357_FMJ, M357_JHP, M357_AP, M357_EXPRESS,
|
||||
|
||||
@ -66,6 +66,8 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi_akimbo, new ItemRenderUziAkimbo());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_spas12, new ItemRenderSPAS12());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_panzerschreck, new ItemRenderPanzerschreck());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_star_f, new ItemRenderStarF());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_star_f_akimbo, new ItemRenderStarFAkimbo());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_g3, new ItemRenderG3(ResourceManager.g3_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_g3_zebra, new ItemRenderG3(ResourceManager.g3_zebra_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stinger, new ItemRenderStinger());
|
||||
@ -103,9 +105,11 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_charge_thrower, new ItemRenderChargeThrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_drill, new ItemRenderDrill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_n_i_4_n_i, new ItemRenderNI4NI());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_pa_melee, new ItemRenderPAMelee());
|
||||
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
ammo_debug_shot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
|
||||
stone.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
flint.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -207,6 +211,8 @@ public class GunFactoryClient {
|
||||
setRendererBulk(LegoClient.RENDER_RPZB, rocket_rpzb);
|
||||
setRendererBulk(LegoClient.RENDER_QD, rocket_qd);
|
||||
setRendererBulk(LegoClient.RENDER_ML, rocket_ml);
|
||||
setRendererBulk(LegoClient.RENDER_RPZB, rocket_ncrpa_steer);
|
||||
setRendererBulk(LegoClient.RENDER_RPZB, rocket_ncrpa);
|
||||
|
||||
setRendererBulk(LegoClient.RENDER_NUKE, nuke_standard, nuke_demo, nuke_high);
|
||||
nuke_tots.setRenderer(LegoClient.RENDER_GRENADE);
|
||||
@ -238,7 +244,8 @@ public class GunFactoryClient {
|
||||
setRendererBulk(LegoClient.RENDER_GRENADE, shell_normal, shell_explosive, shell_ap, shell_du, shell_w9); //TODO: change the sabots
|
||||
|
||||
//HUDS
|
||||
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO, LegoClient.HUD_COMPONENT_AMMO_SECOND);
|
||||
|
||||
((ItemGunBaseNT) ModItems.gun_pepperbox) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_atlas) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
@ -261,6 +268,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_uzi) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_spas12) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_panzerschreck) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_star_f) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_g3) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_g3_zebra) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_stinger) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
@ -303,6 +311,8 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_maresleg_akimbo) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_uzi_akimbo) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_uzi_akimbo) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_star_f_akimbo) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_star_f_akimbo) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_minigun_dual) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_minigun_dual) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_aberrator_eott) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
|
||||
@ -20,7 +20,8 @@ public class GunStateDecider {
|
||||
/**
|
||||
* The meat and bones of the gun system's state machine.
|
||||
* This standard decider can handle guns with an automatic primary receiver, as well as one receiver's reloading state.
|
||||
* It supports draw delays as well as semi and auto fire
|
||||
* It supports draw delays as well as semi and auto fire with a standard left click refire check.
|
||||
* Only handles single receiver weapons!
|
||||
*/
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_DECIDER = (stack, ctx) -> {
|
||||
int index = ctx.configIndex;
|
||||
|
||||
@ -175,6 +175,7 @@ public class Lego {
|
||||
|
||||
/** Returns true if the mag has ammo in it. Used by keybind functions on whether to fire, and deciders on whether to trigger a refire. */
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_STANDARD_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0; };
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_SECOND_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[1].getMagazine(stack).getAmount(stack, ctx.inventory) > 0; };
|
||||
|
||||
/** Returns true if the mag has ammo in it, and the gun is in the locked on state */
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_LOCKON_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0 && ItemGunBaseNT.getIsLockedOn(stack); };
|
||||
@ -187,26 +188,29 @@ public class Lego {
|
||||
|
||||
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 0, true);
|
||||
};
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SECOND_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 1, true);
|
||||
};
|
||||
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, ignores wear */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_NOWEAR_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, false);
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 0, false);
|
||||
};
|
||||
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, then resets lockon progress */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_LOCKON_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 0, true);
|
||||
ItemGunBaseNT.setIsLockedOn(stack, false);
|
||||
};
|
||||
|
||||
public static void doStandardFire(ItemStack stack, LambdaContext ctx, GunAnimation anim, boolean calcWear) {
|
||||
public static void doStandardFire(ItemStack stack, LambdaContext ctx, GunAnimation anim, int receiver, boolean calcWear) {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
int index = ctx.configIndex;
|
||||
if(anim != null) ItemGunBaseNT.playAnimation(player, stack, anim, ctx.configIndex);
|
||||
|
||||
boolean aim = ItemGunBaseNT.getIsAiming(stack);
|
||||
Receiver primary = ctx.config.getReceivers(stack)[0];
|
||||
Receiver primary = ctx.config.getReceivers(stack)[receiver];
|
||||
IMagazine mag = primary.getMagazine(stack);
|
||||
BulletConfig config = (BulletConfig) mag.getType(stack, ctx.inventory);
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@ public class LegoClient {
|
||||
public static HUDComponentAmmoCounter HUD_COMPONENT_AMMO = new HUDComponentAmmoCounter(0);
|
||||
public static HUDComponentAmmoCounter HUD_COMPONENT_AMMO_MIRROR = new HUDComponentAmmoCounter(0).mirror();
|
||||
public static HUDComponentAmmoCounter HUD_COMPONENT_AMMO_NOCOUNTER = new HUDComponentAmmoCounter(0).noCounter();
|
||||
public static HUDComponentAmmoCounter HUD_COMPONENT_AMMO_SECOND = new HUDComponentAmmoCounter(1);
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_STANDARD_BULLET = (bullet, interp) -> {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
|
||||
@ -14,7 +14,9 @@ import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.items.weapon.sedna.mods.XWeaponModManager;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.packet.toclient.MuzzleFlashPacket;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.helper.CasingCreator;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
@ -58,6 +60,7 @@ public class Orchestras {
|
||||
}
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 11) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -81,6 +84,7 @@ public class Orchestras {
|
||||
if(timer == 55) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverSpin", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 21) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.6F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -108,6 +112,7 @@ public class Orchestras {
|
||||
if(timer == 44) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.9F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -136,6 +141,7 @@ public class Orchestras {
|
||||
if(timer == 44) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.9F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -177,6 +183,7 @@ public class Orchestras {
|
||||
if(timer == 44) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.leverCock", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 14) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.5, -0.125, aiming ? -0.125 : -0.375D, 0, 0.12, -0.12, 0.01, -7.5F + (float)entity.getRNG().nextGaussian() * 5F, (float)entity.getRNG().nextGaussian() * 1.5F, casing.getName(), true, 60, 0.5D, 20);
|
||||
@ -200,6 +207,7 @@ public class Orchestras {
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.openLatch", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 2) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.55, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, -7.5F + (float)entity.getRNG().nextGaussian() * 5F, 12F + (float)entity.getRNG().nextGaussian() * 5F, casing.getName());
|
||||
@ -248,6 +256,7 @@ public class Orchestras {
|
||||
if(timer == 29) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.leverCock", 1F, 0.8F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 14) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.3125, -0.125, aiming ? -0.125 : -0.375D, 0, 0.18, -0.12, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 5F, (float)entity.getRNG().nextGaussian() * 2.5F, casing.getName(), true, 60, 0.5D, 20);
|
||||
@ -283,6 +292,7 @@ public class Orchestras {
|
||||
if(timer == 29) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.leverCock", 1F, 0.8F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 14) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.3125, -0.125, aiming ? -0.125 : -0.375D, 0, -0.08, 0, 0.01, -15F + (float)entity.getRNG().nextGaussian() * 5F, (float)entity.getRNG().nextGaussian() * 2.5F, casing.getName(), true, 60, 0.5D, 20);
|
||||
@ -303,6 +313,7 @@ public class Orchestras {
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 14) {
|
||||
int offset = ctx.configIndex == 0 ? -1 : 1;
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
@ -368,6 +379,7 @@ public class Orchestras {
|
||||
}
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 11) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 1F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -388,6 +400,7 @@ public class Orchestras {
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 1) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.3125, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.21, -0.06, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 2.5F, 2.5F + (float)entity.getRNG().nextGaussian() * 2F, casing.getName(), true, 60, 0.5D, 20);
|
||||
@ -424,6 +437,7 @@ public class Orchestras {
|
||||
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.4375, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, -0.06, 0, 0.01, (float)entity.getRNG().nextGaussian() * 10F, (float)entity.getRNG().nextGaussian() * 10F, casing.getName());
|
||||
}
|
||||
@ -448,6 +462,7 @@ public class Orchestras {
|
||||
} else {
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.4375, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, -0.06, 0, 0.01, (float)entity.getRNG().nextGaussian() * 10F, (float)entity.getRNG().nextGaussian() * 10F, casing.getName());
|
||||
}
|
||||
@ -479,6 +494,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
|
||||
if(timer == 4) {
|
||||
@ -524,6 +542,7 @@ public class Orchestras {
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 15) {
|
||||
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
|
||||
SpentCasing casing = mag.getCasing(stack, ctx.inventory);
|
||||
@ -603,6 +622,7 @@ public class Orchestras {
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 1) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? 0 : -0.0625, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 5F, 10F + entity.getRNG().nextFloat() * 10F, casing.getName());
|
||||
@ -636,6 +656,7 @@ public class Orchestras {
|
||||
if(timer == 8) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.openLatch", 1F, 1.25F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 1) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, -2.5F + (float)entity.getRNG().nextGaussian() * 5F, 10F + (float)entity.getRNG().nextFloat() * 15F, casing.getName());
|
||||
@ -667,6 +688,7 @@ public class Orchestras {
|
||||
if(timer == 8) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.openLatch", 1F, 1.25F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 1) {
|
||||
int mult = ctx.configIndex == 0 ? -1 : 1;
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
@ -697,6 +719,7 @@ public class Orchestras {
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE || type == GunAnimation.ALT_CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 8) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.shotgunCock", 1F, 1F);
|
||||
if(timer == 10) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory); //turns out there's a reason why stovepipes look like that
|
||||
@ -734,12 +757,89 @@ public class Orchestras {
|
||||
if(entity.worldObj.isRemote) return;
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.insertCanister", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_STAR_F = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.3125, aiming ? 0 : -0.125, aiming ? 0 : -0.1875D, 0, 0.18, -0.12, 0.01, (float)entity.getRNG().nextGaussian() * 5F, 12.5F + (float)entity.getRNG().nextFloat() * 5F, casing.getName());
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.9F);
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.pistolCock", 1F, 1.1F);
|
||||
|
||||
}
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 22) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
}
|
||||
if(type == GunAnimation.JAMMED) {
|
||||
if(timer == 15) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 19) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
if(timer == 23) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 27) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
}
|
||||
if(type == GunAnimation.INSPECT) {
|
||||
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_STAR_F_AKIMBO = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
int side = ctx.configIndex == 0 ? -1 : 1;
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.3125, aiming ? 0 : -0.125, aiming ? 0 : -0.1875D * side, 0, 0.18, -0.12 * side, 0.01, (float)entity.getRNG().nextGaussian() * 5F, 12.5F + (float)entity.getRNG().nextFloat() * 5F, casing.getName());
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.9F);
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.pistolCock", 1F, 1.1F);
|
||||
|
||||
}
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 22) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
}
|
||||
if(type == GunAnimation.JAMMED) {
|
||||
if(timer == 15) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 19) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
if(timer == 23) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 27) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
}
|
||||
if(type == GunAnimation.INSPECT) {
|
||||
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_G3 = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
@ -752,6 +852,7 @@ public class Orchestras {
|
||||
if(timer == 0) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.5, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, (float)entity.getRNG().nextGaussian() * 5F, 12.5F + (float)entity.getRNG().nextFloat() * 5F, casing.getName());
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -800,8 +901,11 @@ public class Orchestras {
|
||||
//stop sound due to timeout
|
||||
if(runningAudio != null && runningAudio.isPlaying()) runningAudio.stopSound();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.insertCanister", 1F, 1F);
|
||||
}
|
||||
@ -853,6 +957,7 @@ public class Orchestras {
|
||||
}
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
if(timer == 12) {
|
||||
@ -903,6 +1008,7 @@ public class Orchestras {
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? 0 : -0.125, aiming ? 0 : -0.3125D, 0, 0.06, -0.18, 0.01, (float)entity.getRNG().nextGaussian() * 20F, 12.5F + (float)entity.getRNG().nextGaussian() * 7.5F, casing.getName());
|
||||
}
|
||||
@ -916,6 +1022,7 @@ public class Orchestras {
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.5F);
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
@ -940,9 +1047,12 @@ public class Orchestras {
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0 && ctx.config.getReceivers(stack)[0].getMagazine(stack).getType(stack, null) == XFactory12ga.g12_equestrian_bj) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(ctx.config.getReceivers(stack)[0].getMagazine(stack).getType(stack, null) == XFactory12ga.g12_equestrian_bj) {
|
||||
ItemGunBaseNT.setTimer(stack, 0, 20);
|
||||
}
|
||||
}
|
||||
|
||||
if(timer == 2) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
@ -987,6 +1097,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.insertCanister", 1F, 1F);
|
||||
}
|
||||
@ -1001,6 +1114,7 @@ public class Orchestras {
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
int rounds = XWeaponModManager.hasUpgrade(stack, ctx.configIndex, XWeaponModManager.ID_MINIGUN_SPEED) ? 3 : 1;
|
||||
for(int i = 0; i < rounds; i++) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
@ -1029,6 +1143,7 @@ public class Orchestras {
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
int index = ctx.configIndex == 0 ? -1 : 1;
|
||||
int rounds = XWeaponModManager.hasUpgrade(stack, ctx.configIndex, XWeaponModManager.ID_MINIGUN_SPEED) ? 3 : 1;
|
||||
for(int i = 0; i < rounds; i++) {
|
||||
@ -1056,6 +1171,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1.25F);
|
||||
}
|
||||
@ -1095,6 +1213,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1.5F);
|
||||
}
|
||||
@ -1123,6 +1244,7 @@ public class Orchestras {
|
||||
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, aiming ? 0.125 : 0.125, aiming ? -0.125 : -0.25, aiming ? -0.125 : -0.25D, 0, 0.18, -0.12, 0.01, (float)entity.getRNG().nextGaussian() * 5F, 7.5F + entity.getRNG().nextFloat() * 5F, casing.getName());
|
||||
}
|
||||
@ -1149,6 +1271,7 @@ public class Orchestras {
|
||||
} else {
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, aiming ? 0.125 : 0.25, aiming ? -0.125 : -0.25, aiming ? -0.125 : -0.25D, 0, 0.18, -0.12, 0.01, (float)entity.getRNG().nextGaussian() * 5F, 7.5F + entity.getRNG().nextFloat() * 5F, casing.getName());
|
||||
}
|
||||
@ -1270,6 +1393,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1.5F);
|
||||
}
|
||||
@ -1300,6 +1426,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE && stack.getItem() == ModItems.gun_n_i_4_n_i) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.RELOAD) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.coilgunReload", 1F, 1F);
|
||||
}
|
||||
@ -1311,6 +1440,9 @@ public class Orchestras {
|
||||
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
}
|
||||
@ -1413,7 +1545,9 @@ public class Orchestras {
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
|
||||
if(timer == 19) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.8F);
|
||||
}
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
}
|
||||
if(type == GunAnimation.CYCLE_DRY) {
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
}
|
||||
@ -1433,6 +1567,7 @@ public class Orchestras {
|
||||
}
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 1) {
|
||||
int cba = (stack.getItem() == ModItems.gun_aberrator_eott && ctx.configIndex == 0) ? -1 : 1;
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
@ -1459,6 +1594,7 @@ public class Orchestras {
|
||||
}
|
||||
|
||||
if(type == GunAnimation.CYCLE) {
|
||||
if(timer == 0) PacketDispatcher.wrapper.sendToAllAround(new MuzzleFlashPacket(entity), new TargetPoint(entity.worldObj.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 100));
|
||||
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
|
||||
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
|
||||
if(timer == 12) {
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mods.XWeaponModManager;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
@ -54,23 +55,60 @@ public class XFactory22lr {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_AM180))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_AM180_ANIMS).orchestra(Orchestras.ORCHESTRA_AM180)
|
||||
).setDefaultAmmo(EnumAmmo.P22_SP, 35).setNameMutator(LAMBDA_NAME_AM180)
|
||||
).setDefaultAmmo(EnumAmmo.P22_SP, 35).setNameMutator(LAMBDA_NAME_SILENCED)
|
||||
.setUnlocalizedName("gun_am180");
|
||||
|
||||
ModItems.gun_star_f = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(15 * 25).draw(15).inspect(38).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12.5F).delay(5).dry(17).spread(0.01F).reload(40).jam(32).sound("hbm:weapon.fire.pistolLight", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 15).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_STAR_F))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_STAR_F_ANIMS).orchestra(Orchestras.ORCHESTRA_STAR_F)
|
||||
).setDefaultAmmo(EnumAmmo.P22_SP, 15).setNameMutator(LAMBDA_NAME_SILENCED)
|
||||
.setUnlocalizedName("gun_star_f");
|
||||
|
||||
ModItems.gun_star_f_akimbo = new ItemGunBaseNT(WeaponQuality.B_SIDE,
|
||||
new GunConfig().dura(15 * 25).draw(15).inspect(38).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12.5F).delay(5).dry(17).spread(0.01F).reload(40).jam(32).sound("hbm:weapon.fire.pistolLight", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 15).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
|
||||
.offset(1, -0.0625 * 1.5, 0.25D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_STAR_F))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_STAR_F_ANIMS).orchestra(Orchestras.ORCHESTRA_STAR_F_AKIMBO),
|
||||
new GunConfig().dura(15 * 25).draw(15).inspect(38).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12.5F).delay(5).dry(17).spread(0.01F).reload(40).jam(32).sound("hbm:weapon.fire.pistolLight", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(1, 15).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
|
||||
.offset(1, -0.0625 * 1.5, -0.25D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_STAR_F))
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_STAR_F_ANIMS).orchestra(Orchestras.ORCHESTRA_STAR_F_AKIMBO)
|
||||
).setDefaultAmmo(EnumAmmo.P9_SP, 30).setUnlocalizedName("gun_star_f_akimbo");
|
||||
}
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_AM180 = (stack) -> {
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_SILENCED = (stack) -> {
|
||||
if(XWeaponModManager.hasUpgrade(stack, 0, XWeaponModManager.ID_SILENCER)) return stack.getUnlocalizedName() + "_silenced";
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 3000, 0.05D, 1.1D, 0);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 3000, 0.05D, 1.1D, ctx.configIndex);
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_AM180 = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25));
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_STAR_F = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil(2.5F, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_AM180_ANIMS = (stack, type) -> {
|
||||
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
|
||||
switch(type) {
|
||||
@ -109,4 +147,42 @@ public class XFactory22lr {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_STAR_F_ANIMS = (stack, type) -> {
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.125 : -0.5, 15, IType.SIN_DOWN).addPos(0, 0, 0, 35, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.5 : -1, 25, IType.SIN_DOWN).addPos(0, 0, 0, 75, IType.SIN_UP))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(1, 0, 0, 50, IType.SIN_UP).addPos(0, 0, 0, 50, IType.SIN_DOWN))
|
||||
.addBus("BULLET", ammo <= 1 ? new BusAnimationSequence().setPos(100, 0, 0) : new BusAnimationSequence().addPos(0, 0, 0, 90).addPos(0, 0.5, 2.25, 50));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(1, 0, 0, 50, IType.SIN_UP).hold(450).addPos(0, 0, 0, 50, IType.SIN_DOWN))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.5 : -1, 100, IType.SIN_FULL).hold(100).addPos(0, 0, 0, 75, IType.SIN_UP))
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(-3, 0, 0, 175, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("BULLET", new BusAnimationSequence().setPos(100, 0, 0));
|
||||
case RELOAD:
|
||||
return new BusAnimation()
|
||||
.addBus("TILT", new BusAnimationSequence().addPos(-30, 0, 0, 250, IType.SIN_FULL).hold(1500).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(0, 0, -1, 100, IType.SIN_FULL).hold(1125).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(0, -7, -1.5, 300, IType.SIN_UP).hold(400).addPos(0, 0, 0, 300, IType.SIN_UP))
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(3, 0, 0, 750, IType.SIN_FULL).addPos(-3, 0, 0, 50, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(0, 0, 15, 300, IType.SIN_FULL).hold(900).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("BULLET", new BusAnimationSequence().setPos(ammo <= 1 ? 100 : 0, 0, 0).hold(750).setPos(0, 0, 0).hold(750).addPos(0, 0.5, 2.25, 50));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("TILT", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(-30, 0, 0, 150, IType.SIN_FULL).hold(800).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 25, 150, IType.SIN_FULL).hold(800).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(0, 0, -0.5, 100, IType.SIN_FULL).hold(100).addPos(0, 0, 0, 100, IType.SIN_UP).hold(100).addPos(0, 0, -0.5, 100, IType.SIN_FULL).hold(100).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("BULLET", new BusAnimationSequence().setPos(0, 0.5, 2.25).hold(750).addPos(0, 0.5, 1.25, 100, IType.SIN_FULL).hold(100).addPos(0, 0.5, 2.25, 100, IType.SIN_UP).hold(100).addPos(0, 0.5, 1.25, 100, IType.SIN_FULL).hold(100).addPos(0, 0.5, 2.25, 100, IType.SIN_UP));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("TILT", new BusAnimationSequence().addPos(-30, 0, 0, 250, IType.SIN_FULL).hold(1500).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 25, 250, IType.SIN_FULL).hold(1500).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, -0.5, 100, IType.SIN_FULL).hold(1125).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("BULLET", ammo <= 1 ? new BusAnimationSequence().setPos(100, 0, 0) : new BusAnimationSequence().setPos(0, 0.5, 2.25).hold(350).addPos(0, 0.5, 1.25, 100, IType.SIN_FULL).hold(1125).addPos(0, 0.5, 2.25, 100, IType.SIN_UP));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class XFactory50 {
|
||||
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50ap"));
|
||||
bmg50_du = new BulletConfig().setItem(EnumAmmo.BMG50_DU).setCasing(EnumCasingType.LARGE_STEEL, 12).setDoesPenetrate(true).setDamageFalloffByPen(false).setDamage(1.5F).setThresholdNegation(21F).setArmorPiercing(0.25F)
|
||||
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50du"));
|
||||
bmg50_he = new BulletConfig().setItem(EnumAmmo.BMG50_HE).setCasing(EnumCasingType.LARGE_STEEL, 12).setWear(3F).setDoesPenetrate(true).setDamageFalloffByPen(false).setDamage(1.75F).setOnImpact(LAMBDA_STANDARD_EXPLODE)
|
||||
bmg50_he = new BulletConfig().setItem(EnumAmmo.BMG50_HE).setCasing(EnumCasingType.LARGE_STEEL, 12).setWear(3F).setDamage(1.75F).setOnImpact(LAMBDA_STANDARD_EXPLODE)
|
||||
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50he"));
|
||||
bmg50_sm = new BulletConfig().setItem(EnumAmmo.BMG50_SM).setCasing(EnumCasingType.LARGE_STEEL, 6).setWear(10F).setDoesPenetrate(true).setDamageFalloffByPen(false).setDamage(2.5F).setThresholdNegation(30F).setArmorPiercing(0.35F)
|
||||
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50sm"));
|
||||
|
||||
@ -154,7 +154,7 @@ public class XFactory9mm {
|
||||
ItemGunBaseNT.setTimer(stack, index, primary.getDelayAfterFire(stack));
|
||||
EntityDamageUtil.attackEntityFromNT(player, BulletConfig.getDamage(player, player, DamageClass.PHYSICAL), 1_000F, true, false, 1D, 5F, 0F);
|
||||
} else {
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, 0, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ public class XFactoryFolly {
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, false);
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, 0, false);
|
||||
};
|
||||
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> {
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.armor.IPAMelee;
|
||||
import com.hbm.items.armor.IPARanged;
|
||||
import com.hbm.items.armor.IPAWeaponsProvider;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class XFactoryPA {
|
||||
|
||||
public static void init() {
|
||||
|
||||
ModItems.gun_pa_melee = new ItemGunPA(WeaponQuality.UTILITY, new GunConfig()
|
||||
.draw(10).crosshair(Crosshair.NONE)
|
||||
.rec(new Receiver(0))
|
||||
.pp(LAMBDA_CLICK_MELEE_PRIMARY).ps(LAMBDA_CLICK_MELEE_SENONDARY).decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_MELEE_ANIMS).orchestra(ORCHESTRA)
|
||||
).setUnlocalizedName("gun_pa_melee");
|
||||
|
||||
ModItems.gun_pa_ranged = new ItemGunPA(WeaponQuality.UTILITY, new GunConfig()
|
||||
.draw(0).crosshair(Crosshair.CROSS)
|
||||
.rec(new Receiver(0))
|
||||
.pp(LAMBDA_CLICK_RANGED_PRIMARY).ps(LAMBDA_CLICK_RANGED_SENONDARY).decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
).setUnlocalizedName("gun_pa_ranged").setFull3D().setTextureName(RefStrings.MODID + ":gun_pa_ranged");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA = (stack, ctx) -> {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) component.orchestra(stack, ctx);
|
||||
};
|
||||
|
||||
public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MELEE_ANIMS = (stack, type) -> {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) return component.playAnim(stack, type);
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_CLICK_MELEE_PRIMARY = (stack, ctx) -> {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) component.clickPrimary(stack, ctx);
|
||||
};
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_CLICK_MELEE_SENONDARY = (stack, ctx) -> {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) component.clickSecondary(stack, ctx);
|
||||
};
|
||||
|
||||
public static void doSwing(ItemStack stack, LambdaContext ctx, GunAnimation anim, int cooldown) {
|
||||
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
int index = ctx.configIndex;
|
||||
GunState state = ItemGunBaseNT.getState(stack, index);
|
||||
|
||||
if(state == GunState.IDLE) {
|
||||
ItemGunBaseNT.playAnimation(player, stack, anim, ctx.configIndex);
|
||||
ItemGunBaseNT.setState(stack, index, GunState.COOLDOWN);
|
||||
ItemGunBaseNT.setTimer(stack, index, cooldown);
|
||||
}
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_CLICK_RANGED_PRIMARY = (stack, ctx) -> {
|
||||
IPARanged component = IPAWeaponsProvider.getRangedComponentClient();
|
||||
if(component != null) component.clickPrimary(stack, ctx);
|
||||
};
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_CLICK_RANGED_SENONDARY = (stack, ctx) -> {
|
||||
IPARanged component = IPAWeaponsProvider.getRangedComponentClient();
|
||||
if(component != null) component.clickSecondary(stack, ctx);
|
||||
};
|
||||
|
||||
public static class ItemGunPA extends ItemGunBaseNT {
|
||||
|
||||
public ItemGunPA(WeaponQuality quality, GunConfig... cfg) {
|
||||
super(quality, cfg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
|
||||
}
|
||||
}
|
||||
@ -50,6 +50,8 @@ public class XFactoryRocket {
|
||||
public static BulletConfig[] rocket_rpzb;
|
||||
public static BulletConfig[] rocket_qd;
|
||||
public static BulletConfig[] rocket_ml;
|
||||
public static BulletConfig[] rocket_ncrpa;
|
||||
public static BulletConfig[] rocket_ncrpa_steer;
|
||||
|
||||
// FLYING
|
||||
public static Consumer<Entity> LAMBDA_STANDARD_ACCELERATE = (entity) -> {
|
||||
@ -57,13 +59,25 @@ public class XFactoryRocket {
|
||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||
};
|
||||
public static Consumer<Entity> LAMBDA_STEERING_ACCELERATE = (entity) -> {
|
||||
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
||||
if(!(entity instanceof EntityPlayer)) {
|
||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||
return;
|
||||
}
|
||||
EntityPlayer player = (EntityPlayer) bullet.getThrower();
|
||||
steeringAccelerate(entity, player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof ItemGunBaseNT) || !ItemGunBaseNT.getIsAiming(player.getHeldItem()));
|
||||
};
|
||||
public static Consumer<Entity> LAMBDA_NCR_ACCELERATE = (entity) -> {
|
||||
steeringAccelerate(entity, false);
|
||||
};
|
||||
public static void steeringAccelerate(Entity entity, boolean noSteer) {
|
||||
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
||||
if(bullet.accel < 4) bullet.accel += 0.4D;
|
||||
if(bullet.getThrower() == null || !(bullet.getThrower() instanceof EntityPlayer)) return;
|
||||
|
||||
EntityPlayer player = (EntityPlayer) bullet.getThrower();
|
||||
if(Vec3.createVectorHelper(bullet.posX - player.posX, bullet.posY - player.posY, bullet.posZ - player.posZ).lengthVector() > 100) return;
|
||||
if(player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof ItemGunBaseNT) || !ItemGunBaseNT.getIsAiming(player.getHeldItem())) return;
|
||||
if(noSteer) return;
|
||||
|
||||
MovingObjectPosition mop = Library.rayTrace(player, 200, 1);
|
||||
if(mop == null || mop.hitVec == null) return;
|
||||
@ -76,7 +90,7 @@ public class XFactoryRocket {
|
||||
bullet.motionX = vec.xCoord * speed;
|
||||
bullet.motionY = vec.yCoord * speed;
|
||||
bullet.motionZ = vec.zCoord * speed;
|
||||
};
|
||||
}
|
||||
|
||||
// IMPACT
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
@ -138,6 +152,7 @@ public class XFactoryRocket {
|
||||
|
||||
public static BulletConfig makeRPZB(BulletConfig original) { return original.clone(); }
|
||||
public static BulletConfig makeQD(BulletConfig original) { return original.clone().setLife(400).setOnUpdate(LAMBDA_STEERING_ACCELERATE); }
|
||||
public static BulletConfig makeNCR(BulletConfig original) { return original.clone().setLife(400).setOnUpdate(LAMBDA_NCR_ACCELERATE); }
|
||||
public static BulletConfig makeML(BulletConfig original) { return original.clone(); }
|
||||
|
||||
//this is starting to get messy but we need to put this crap *somewhere* and fragmenting it into a billion classes with two methods each just isn't gonna help
|
||||
@ -156,11 +171,15 @@ public class XFactoryRocket {
|
||||
rocket_rpzb = new BulletConfig[rocket_template.length];
|
||||
rocket_qd = new BulletConfig[rocket_template.length];
|
||||
rocket_ml = new BulletConfig[rocket_template.length];
|
||||
rocket_ncrpa_steer = new BulletConfig[rocket_template.length];
|
||||
rocket_ncrpa = new BulletConfig[rocket_template.length];
|
||||
|
||||
for(int i = 0; i < rocket_template.length; i++) {
|
||||
rocket_rpzb[i] = makeRPZB(rocket_template[i]);
|
||||
rocket_qd[i] = makeQD(rocket_template[i]);
|
||||
rocket_ml[i] = makeML(rocket_template[i]);
|
||||
rocket_ncrpa_steer[i] = makeNCR(rocket_template[i]);
|
||||
rocket_ncrpa[i] = makeRPZB(rocket_template[i]);
|
||||
}
|
||||
|
||||
ModItems.gun_panzerschreck = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
|
||||
@ -41,7 +41,7 @@ public class HUDComponentAmmoCounter implements IHUDComponent {
|
||||
|
||||
@Override
|
||||
public int getComponentHeight(EntityPlayer player, ItemStack stack){
|
||||
return 24;
|
||||
return 17;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -52,7 +52,7 @@ public class HUDComponentAmmoCounter implements IHUDComponent {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
int pX = resolution.getScaledWidth() / 2 + (mirrored ? -(62 + 36 + 52) : (62 + 36)) + (noCounter ? 14 : 0);
|
||||
int pZ = resolution.getScaledHeight() - bottomOffset - 23;
|
||||
int pZ = resolution.getScaledHeight() - bottomOffset - 18;
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
IMagazine mag = gun.getConfig(stack, gunIndex).getReceivers(stack)[this.receiver].getMagazine(stack);
|
||||
|
||||
|
||||
@ -91,6 +91,7 @@ public class XWeaponModManager {
|
||||
ModItems.gun_spas12,
|
||||
ModItems.gun_panzerschreck };
|
||||
Item[] wsteelGuns = new Item[] {
|
||||
ModItems.gun_star_f, ModItems.gun_star_f_akimbo,
|
||||
ModItems.gun_g3, ModItems.gun_g3_zebra,
|
||||
ModItems.gun_stinger,
|
||||
ModItems.gun_chemthrower };
|
||||
@ -130,7 +131,7 @@ public class XWeaponModManager {
|
||||
new WeaponModDefinition(EnumModGeneric.BRONZE_DURA).addMod(bronzeGuns, new WeaponModGenericDurability(117));
|
||||
|
||||
new WeaponModDefinition(EnumModSpecial.SPEEDLOADER).addMod(ModItems.gun_liberator, new WeaponModLiberatorSpeedloader(200));
|
||||
new WeaponModDefinition(EnumModSpecial.SILENCER).addMod(new Item[] {ModItems.gun_am180, ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_g3, ModItems.gun_amat}, new WeaponModSilencer(ID_SILENCER));
|
||||
new WeaponModDefinition(EnumModSpecial.SILENCER).addMod(new Item[] {ModItems.gun_am180, ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_star_f, ModItems.gun_star_f_akimbo, ModItems.gun_g3, ModItems.gun_amat}, new WeaponModSilencer(ID_SILENCER));
|
||||
new WeaponModDefinition(EnumModSpecial.SCOPE).addMod(new Item[] {ModItems.gun_heavy_revolver, ModItems.gun_g3, ModItems.gun_mas36, ModItems.gun_charge_thrower}, new WeaponModScope(ID_SCOPE));
|
||||
new WeaponModDefinition(EnumModSpecial.SAW)
|
||||
.addMod(new Item[] {ModItems.gun_maresleg, ModItems.gun_double_barrel}, new WeaponModSawedOff(ID_SAWED_OFF))
|
||||
@ -176,7 +177,9 @@ public class XWeaponModManager {
|
||||
BulletConfig[] r762 = new BulletConfig[] {XFactory762mm.r762_sp, XFactory762mm.r762_fmj, XFactory762mm.r762_jhp, XFactory762mm.r762_ap, XFactory762mm.r762_du, XFactory762mm.r762_he};
|
||||
BulletConfig[] bmg50 = new BulletConfig[] {XFactory50.bmg50_sp, XFactory50.bmg50_fmj, XFactory50.bmg50_jhp, XFactory50.bmg50_ap, XFactory50.bmg50_du, XFactory50.bmg50_he};
|
||||
new WeaponModDefinition(EnumModCaliber.P9)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(300, 28, 10F, p9));
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(300, 28, 10F, p9))
|
||||
.addMod(ModItems.gun_star_f, new WeaponModCaliber(301, 12, 15F, p9))
|
||||
.addMod(ModItems.gun_star_f_akimbo, new WeaponModCaliber(302, 12, 15F, p9));
|
||||
new WeaponModDefinition(EnumModCaliber.P45)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(310, 28, 10F, p45))
|
||||
.addMod(ModItems.gun_greasegun, new WeaponModCaliber(311, 24, 3F, p45))
|
||||
@ -265,6 +268,7 @@ public class XWeaponModManager {
|
||||
/** Saves the state on receiver 0 so that if the mag changes through upgrading, the state may potentially be restored, if compatible */
|
||||
private static void saveMagState(ItemStack stack, int cfg) {
|
||||
IMagazine mag = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, cfg).getReceivers(stack)[0].getMagazine(stack);
|
||||
if(mag == null) return;
|
||||
prevMagType = mag.getType(stack, null);
|
||||
prevMagCount = mag.getAmount(stack, null);
|
||||
}
|
||||
@ -282,6 +286,7 @@ public class XWeaponModManager {
|
||||
changedMagState = false;
|
||||
|
||||
IMagazine mag = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, cfg).getReceivers(stack)[0].getMagazine(stack);
|
||||
if(mag == null) return;
|
||||
if(mag.getType(stack, null) == prevMagType) {
|
||||
mag.setAmount(stack, MathHelper.clamp_int(prevMagCount, 0, mag.getCapacity(stack)));
|
||||
} else {
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (5572)";
|
||||
public static final String VERSION = "1.0.27 BETA (5615)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -61,6 +61,7 @@ import com.hbm.render.item.ItemRenderMissileGeneric.RenderMissileType;
|
||||
import com.hbm.render.item.block.ItemRenderBlock;
|
||||
import com.hbm.render.item.block.ItemRenderDecoBlock;
|
||||
import com.hbm.render.item.weapon.*;
|
||||
import com.hbm.render.loader.HFRModelReloader;
|
||||
import com.hbm.render.loader.HmfModelLoader;
|
||||
import com.hbm.render.model.ModelPigeon;
|
||||
import com.hbm.render.tileentity.*;
|
||||
@ -162,7 +163,9 @@ public class ClientProxy extends ServerProxy {
|
||||
|
||||
Jars.initJars();
|
||||
|
||||
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new QMAWLoader());
|
||||
IReloadableResourceManager resourceMan = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
|
||||
resourceMan.registerReloadListener(new QMAWLoader());
|
||||
resourceMan.registerReloadListener(new HFRModelReloader());
|
||||
|
||||
if(GeneralConfig.enableSoundExtension) {
|
||||
SoundSystemConfig.setNumberNormalChannels(GeneralConfig.normalSoundChannels);
|
||||
@ -309,6 +312,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatterySocket.class, new RenderBatterySocket());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatteryREDD.class, new RenderBatteryREDD());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineLargeTurbine.class, new RenderBigTurbine());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineIndustrialTurbine.class, new RenderIndustrialTurbine());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineReactorBreeding.class, new RenderBreeder());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySolarBoiler.class, new RenderSolarBoiler());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStorageDrum.class, new RenderStorageDrum());
|
||||
@ -389,6 +393,7 @@ public class ClientProxy extends ServerProxy {
|
||||
//network
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylon.class, new RenderPylon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnector.class, new RenderConnector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnectorSuper.class, new RenderConnectorSuper());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonMedium.class, new RenderPylonMedium());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonLarge.class, new RenderPylonLarge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySubstation.class, new RenderSubstation());
|
||||
@ -440,7 +445,6 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzPump.class, new RenderWatzPump());
|
||||
//doors
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDoorGeneric.class, new RenderDoorGeneric());
|
||||
//storage
|
||||
@ -1814,6 +1818,7 @@ public class ClientProxy extends ServerProxy {
|
||||
|
||||
if("giblets".equals(type)) {
|
||||
int ent = data.getInteger("ent");
|
||||
int gibType = data.getInteger("gibType");
|
||||
this.vanish(ent);
|
||||
Entity e = world.getEntityByID(ent);
|
||||
|
||||
@ -1837,7 +1842,7 @@ public class ClientProxy extends ServerProxy {
|
||||
mult *= 10;
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult));
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult, gibType));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.main;
|
||||
import com.hbm.blocks.BlockEnums.DecoCabinetEnum;
|
||||
import com.hbm.blocks.BlockEnums.LightstoneType;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockAbsorber.EnumAbsorberTier;
|
||||
import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType;
|
||||
import com.hbm.blocks.generic.BlockGenericStairs;
|
||||
import com.hbm.blocks.generic.BlockMultiSlab;
|
||||
@ -27,7 +28,6 @@ import com.hbm.items.ItemEnums.EnumLegendaryType;
|
||||
import com.hbm.items.ItemEnums.EnumPages;
|
||||
import com.hbm.items.ItemEnums.EnumPlantType;
|
||||
import com.hbm.items.ItemGenericPart.EnumPartType;
|
||||
import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||
import com.hbm.items.machine.ItemArcElectrode.EnumElectrodeType;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
|
||||
@ -220,7 +220,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.memespoon, 1), new Object[] { "CGC", "PSP", "IAI", 'C', ModItems.powder_yellowcake, 'G', TH232.block(), 'P', ModItems.photo_panel, 'S', ModItems.steel_shovel, 'I', ModItems.plate_polymer, 'A', "ingotAustralium" });
|
||||
addShapelessAuto(new ItemStack(ModItems.cbt_device, 1), new Object[] { STEEL.bolt(), ModItems.wrench });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.toothpicks, 3), new Object[] { KEY_STICK, KEY_STICK, KEY_STICK });
|
||||
addRecipeAuto(new ItemStack(ModItems.ducttape, 4), new Object[] { "F", "P", "S", 'F', Items.string, 'S', KEY_SLIME, 'P', Items.paper });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.radio_torch_sender, 4), new Object[] { "G", "R", "I", 'G', "dustGlowstone", 'R', Blocks.redstone_torch, 'I', NETHERQUARTZ.gem() });
|
||||
@ -254,6 +253,7 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_cable, 1), new Object[] { ModBlocks.red_cable_classic });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_cable_gauge), new Object[] { ModBlocks.red_wire_coated, STEEL.ingot(), DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_connector, 4), new Object[] { "C", "I", "S", 'C', ModItems.coil_copper, 'I', ModItems.plate_polymer, 'S', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_connector_super, 2), new Object[] { "CCC", "III", " S ", 'C', ModItems.coil_copper, 'I', ModItems.plate_polymer, 'S', ANY_RESISTANTALLOY.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon, 4), new Object[] { "CWC", "PWP", " T ", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'P', ModItems.plate_polymer, 'T', ModBlocks.red_wire_coated });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon_medium_wood, 2), new Object[] { "CCW", "IIW", " S", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'I', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_pylon_medium_wood_transformer, 1), new Object[] { ModBlocks.red_pylon_medium_wood, ModItems.plate_polymer, ModItems.coil_copper });
|
||||
@ -615,17 +615,10 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_satlinker), new Object[] { "PSP", "SCS", "PSP", 'P', STEEL.plate(), 'S', STAR.ingot(), 'C', ModItems.sat_chip });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_keyforge), new Object[] { "PCP", "WSW", "WSW", 'P', STEEL.plate(), 'S', W.ingot(), 'C', ModItems.padlock, 'W', KEY_PLANKS });
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_chip), new Object[] { "WWW", "CIC", "WWW", 'W', MINGRADE.wireFine(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'I', ANY_PLASTIC.ingot() });
|
||||
addShapelessAuto(new ItemStack(ModItems.sat_mapper), new Object[] { ModBlocks.sat_mapper });
|
||||
addShapelessAuto(new ItemStack(ModItems.sat_scanner), new Object[] { ModBlocks.sat_scanner });
|
||||
addShapelessAuto(new ItemStack(ModItems.sat_radar), new Object[] { ModBlocks.sat_radar });
|
||||
addShapelessAuto(new ItemStack(ModItems.sat_laser), new Object[] { ModBlocks.sat_laser });
|
||||
addShapelessAuto(new ItemStack(ModItems.sat_resonator), new Object[] { ModBlocks.sat_resonator });
|
||||
addShapelessAuto(new ItemStack(ModItems.sat_foeq), new Object[] { ModBlocks.sat_foeq });
|
||||
addShapelessAuto(new ItemStack(ModItems.geiger_counter), new Object[] { ModBlocks.geiger });
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_interface), new Object[] { "ISI", "PCP", "PAP", 'I', STEEL.ingot(), 'S', STAR.ingot(), 'P', ModItems.plate_polymer, 'C', ModItems.sat_chip, 'A', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_coord), new Object[] { "SII", "SCA", "SPP", 'I', STEEL.ingot(), 'S', STAR.ingot(), 'P', ModItems.plate_polymer, 'C', ModItems.sat_chip, 'A', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_transformer), new Object[] { "SCS", "MDM", "SCS", 'S', IRON.ingot(), 'D', MINGRADE.ingot(), 'M',ModItems.coil_advanced_alloy, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_transformer_dnt), new Object[] { "SDS", "MCM", "MCM", 'S', STAR.ingot(), 'D', DESH.ingot(), 'M', MAGTUNG.wireDense(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.radiobox), new Object[] { "PLP", "PSP", "PLP", 'P', STEEL.plate(), 'S', ModItems.ring_starmetal, 'C', ModItems.fusion_core, 'L', getReflector() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.radiorec), new Object[] { " W", "PCP", "PIP", 'W', CU.wireFine(), 'P', STEEL.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'I', ANY_PLASTIC.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.jackt), new Object[] { "S S", "LIL", "LIL", 'S', STEEL.plate(), 'L', Items.leather, 'I', ANY_RUBBER.ingot() });
|
||||
@ -643,11 +636,11 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.ammo_bag, 1), new Object[] { "LLL", "MGM", "LLL", 'L', Items.leather, 'G', WEAPONSTEEL.plate(), 'M', WEAPONSTEEL.mechanism() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ammo_bag, 1), new Object[] { "LLL", "MGM", "LLL", 'L', ANY_RUBBER.ingot(), 'G', WEAPONSTEEL.plate(), 'M', WEAPONSTEEL.mechanism() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.absorber, 1), new Object[] { "ICI", "CPC", "ICI", 'I', CU.ingot(), 'C', COAL.dust(), 'P', PB.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.absorber_red, 1), new Object[] { "ICI", "CPC", "ICI", 'I', TI.ingot(), 'C', COAL.dust(), 'P', ModBlocks.absorber });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.absorber_green, 1), new Object[] { "ICI", "CPC", "ICI", 'I', ANY_PLASTIC.ingot(), 'C', ModItems.powder_desh_mix, 'P', ModBlocks.absorber_red });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.absorber_pink, 1), new Object[] { "ICI", "CPC", "ICI", 'I', BIGMT.ingot(), 'C', ModItems.powder_nitan_mix, 'P', ModBlocks.absorber_green });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.decon, 1), new Object[] { "BGB", "SAS", "BSB", 'B', BE.ingot(), 'G', Blocks.iron_bars, 'S', STEEL.ingot(), 'A', ModBlocks.absorber });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', CU.ingot(), 'C', COAL.dust(), 'P', PB.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.RED.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', TI.ingot(), 'C', COAL.dust(),'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.GREEN.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', ANY_PLASTIC.ingot(), 'C', ModItems.powder_desh_mix,'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.RED.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.PINK.ordinal()), new Object[] { "ICI", "CPC", "ICI", 'I', BIGMT.ingot(), 'C', ModItems.powder_nitan_mix,'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.GREEN.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.decon, 1), new Object[] { "BGB", "SAS", "BSB", 'B', BE.ingot(), 'G', Blocks.iron_bars, 'S', STEEL.ingot(), 'A', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_minirtg, 1), new Object[] { "LLL", "PPP", "TRT", 'L', PB.plate(), 'P', PU238.billet(), 'T', ModItems.thermo_element, 'R', ModItems.rtg_unit });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_powerrtg, 1), new Object[] { "SRS", "PTP", "SRS", 'S', STAR.ingot(), 'R', ModItems.rtg_unit, 'P', PO210.billet(), 'T', TS.dust() });
|
||||
|
||||
@ -735,8 +728,8 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_schrabidium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_dagaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, SA326.dust(), SA326.dust(), SA326.dust(), SA326.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_dineutronium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_hagalaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, DNT.dust(), DNT.dust(), DNT.dust(), DNT.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_core, 1), new Object[] { "DLD", "LML", "DLD", 'D', ModItems.ingot_bismuth, 'L', DNT.block(), 'M', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModBlocks.block_dineutronium, 'L', STEEL.shell() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()), 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()), 'X', ModBlocks.block_dineutronium, 'L', STEEL.shell() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_injector, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', CMB.plate(), 'T', ModBlocks.machine_fluidtank, 'X', ModItems.motor, 'L', STEEL.pipe() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModBlocks.hadron_coil_alloy, 'L', ModItems.crystal_xen });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.barrel_plastic, 1), new Object[] { "IPI", "I I", "IPI", 'I', ModItems.plate_polymer, 'P', AL.plate() });
|
||||
@ -875,7 +868,6 @@ public class CraftingManager {
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'C', CU.plateCast() });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.TEST.ordinal()), new Object[] { Items.book, ModItems.canned_conserve.stackFromEnum(EnumFoodType.JIZZ) });
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()), new Object[] { Items.book, Items.potato });
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.STARTER.ordinal()), new Object[] { Items.book, Items.iron_ingot });
|
||||
|
||||
@ -1079,11 +1071,6 @@ public class CraftingManager {
|
||||
ModItems.circuit_star_piece.stackFromEnum(ScrapType.BOARD_BLANK)
|
||||
});
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.sliding_blast_door_skin), "SPS", "DPD", "SPS", 'P', Items.paper, 'D', "dye", 'S', STEEL.plate());
|
||||
addShapelessAuto(new ItemStack(ModItems.sliding_blast_door_skin, 1, 1), new ItemStack(ModItems.sliding_blast_door_skin, 1, 0));
|
||||
addShapelessAuto(new ItemStack(ModItems.sliding_blast_door_skin, 1, 2), new ItemStack(ModItems.sliding_blast_door_skin, 1, 1));
|
||||
addShapelessAuto(new ItemStack(ModItems.sliding_blast_door_skin), new ItemStack(ModItems.sliding_blast_door_skin, 1, 2));
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cm_block, 4, 0), " I ", "IPI", " I ", 'I', STEEL.ingot(), 'P', STEEL.plateCast());
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cm_block, 4, 1), " I ", "IPI", " I ", 'I', ALLOY.ingot(), 'P', ALLOY.plateCast());
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cm_block, 4, 2), " I ", "IPI", " I ", 'I', DESH.ingot(), 'P', DESH.plateCast());
|
||||
|
||||
@ -1471,6 +1471,20 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.fusion_motor");
|
||||
ignoreMappings.add("hbm:tile.machine_spp_bottom");
|
||||
ignoreMappings.add("hbm:tile.machine_spp_top");
|
||||
ignoreMappings.add("hbm:tile.sat_mapper");
|
||||
ignoreMappings.add("hbm:tile.sat_radar");
|
||||
ignoreMappings.add("hbm:tile.sat_scanner");
|
||||
ignoreMappings.add("hbm:tile.sat_laser");
|
||||
ignoreMappings.add("hbm:tile.sat_foeq");
|
||||
ignoreMappings.add("hbm:tile.sat_resonator");
|
||||
ignoreMappings.add("hbm:item.sliding_blast_door_skin");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_vault");
|
||||
ignoreMappings.add("hbm:item.toothpicks");
|
||||
ignoreMappings.add("hbm:item.ams_focus_blank");
|
||||
ignoreMappings.add("hbm:item.ams_focus_limiter");
|
||||
ignoreMappings.add("hbm:item.ams_focus_booster");
|
||||
ignoreMappings.add("hbm:item.ams_muzzle");
|
||||
ignoreMappings.add("hbm:tile.machine_transformer_dnt");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -36,7 +36,6 @@ import com.hbm.handler.threading.PacketThreading;
|
||||
import com.hbm.items.IEquipReceiver;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.armor.*;
|
||||
import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||
import com.hbm.items.tool.ItemGuideBook.BookType;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
@ -505,7 +504,7 @@ public class ModEventHandler {
|
||||
|
||||
ItemStack[] prevArmor = event.entityLiving.previousEquipment;
|
||||
|
||||
if(event.entityLiving instanceof EntityPlayer && prevArmor != null && event.entityLiving.getHeldItem() != null
|
||||
if(event.entityLiving instanceof EntityPlayerMP && prevArmor != null && event.entityLiving.getHeldItem() != null
|
||||
&& (prevArmor[0] == null || prevArmor[0].getItem() != event.entityLiving.getHeldItem().getItem())
|
||||
&& event.entityLiving.getHeldItem().getItem() instanceof IEquipReceiver) {
|
||||
|
||||
@ -1071,6 +1070,21 @@ public class ModEventHandler {
|
||||
event.getChunk().func_150807_a(x, y, z, Blocks.air, 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
for(int x = 0; x < 16; x++) for(int y = 0; y < 255; y++) for(int z = 0; z < 16; z++) {
|
||||
if(event.getChunk().getBlock(x, y, z) == ModBlocks.absorber) {
|
||||
event.getChunk().func_150807_a(x, y, z, ModBlocks.rad_absorber, 0);
|
||||
}
|
||||
else if(event.getChunk().getBlock(x, y, z) == ModBlocks.absorber_red) {
|
||||
event.getChunk().func_150807_a(x, y, z, ModBlocks.rad_absorber, 1);
|
||||
}
|
||||
else if(event.getChunk().getBlock(x, y, z) == ModBlocks.absorber_green) {
|
||||
event.getChunk().func_150807_a(x, y, z, ModBlocks.rad_absorber, 2);
|
||||
}
|
||||
else if(event.getChunk().getBlock(x, y, z) == ModBlocks.absorber_pink) {
|
||||
event.getChunk().func_150807_a(x, y, z, ModBlocks.rad_absorber, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@ -1110,8 +1124,6 @@ public class ModEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onItemPickup(PlayerEvent.ItemPickupEvent event) {
|
||||
if(event.pickedUp.getEntityItem().getItem() == ModItems.canned_conserve && EnumUtil.grabEnumSafely(EnumFoodType.class, event.pickedUp.getEntityItem().getItemDamage()) == EnumFoodType.JIZZ)
|
||||
event.player.triggerAchievement(MainRegistry.achC20_5);
|
||||
if(event.pickedUp.getEntityItem().getItem() == Items.slime_ball)
|
||||
event.player.triggerAchievement(MainRegistry.achSlimeball);
|
||||
}
|
||||
|
||||
@ -224,6 +224,15 @@ public class ModEventHandlerClient {
|
||||
text.add("Meta: " + world.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ));
|
||||
ILookOverlay.printGeneric(event, "DEBUG", 0xffff00, 0x4040000, text);*/
|
||||
|
||||
if(ClientConfig.SHOW_BLOCK_META_OVERLAY.get()) {
|
||||
Block b = world.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
int i = world.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ);
|
||||
List<String> text = new ArrayList();
|
||||
text.add(b.getUnlocalizedName());
|
||||
text.add("Meta: " + i);
|
||||
ILookOverlay.printGeneric(event, "DEBUG", 0xffff00, 0x4040000, text);
|
||||
}
|
||||
|
||||
} else if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
Entity entity = mop.entityHit;
|
||||
|
||||
@ -821,8 +830,7 @@ public class ModEventHandlerClient {
|
||||
//@SubscribeEvent
|
||||
public void onRenderStorm(RenderHandEvent event) {
|
||||
|
||||
if(BlockAshes.ashes == 0)
|
||||
return;
|
||||
if(BlockAshes.ashes <= 0) return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -896,7 +904,7 @@ public class ModEventHandlerClient {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ArmorNo9.updateWorldHook(mc.theWorld);
|
||||
|
||||
boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded("angelica");
|
||||
boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded(Compat.MOD_ANG);
|
||||
|
||||
if(mc.gameSettings.renderDistanceChunks > 16 && GeneralConfig.enableRenderDistCheck && !supportsHighRenderDistance) {
|
||||
mc.gameSettings.renderDistanceChunks = 16;
|
||||
@ -926,6 +934,13 @@ public class ModEventHandlerClient {
|
||||
if(ArmorUtil.isWearingEmptyMask(mc.thePlayer)) {
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Your mask has no filter!", MainRegistry.proxy.ID_FILTER);
|
||||
}
|
||||
|
||||
//prune other entities' muzzle flashes
|
||||
if(mc.theWorld.getTotalWorldTime() % 30 == 0) {
|
||||
long millis = System.currentTimeMillis();
|
||||
//dead entities may have later insertion order than actively firing ones, so we be safe
|
||||
ItemRenderWeaponBase.flashMap.values().removeIf(entry -> millis - entry.longValue() >= 150);
|
||||
}
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(HbmKeybinds.qmaw.getKeyCode()) && Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && Minecraft.getMinecraft().currentScreen != null) {
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.items.weapon.sedna.factory.XFactoryDrill;
|
||||
import com.hbm.packet.PermaSyncHandler;
|
||||
import com.hbm.render.item.weapon.sedna.ItemRenderWeaponBase;
|
||||
import com.hbm.render.model.ModelMan;
|
||||
import com.hbm.render.util.RenderScreenOverlay;
|
||||
import com.hbm.util.Clock;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
@ -87,7 +88,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo()) {
|
||||
if(renderGun.isAkimbo(player)) {
|
||||
partsHidden[EnumPlayerPart.LEFT_ARM.ordinal()] = true;
|
||||
ModelRenderer box = getBoxFromType(renderer, EnumPlayerPart.LEFT_ARM);
|
||||
box.isHidden = true;
|
||||
@ -138,7 +139,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo()) akimbo = true;
|
||||
if(renderGun.isAkimbo(player)) akimbo = true;
|
||||
if(renderGun.isLeftHanded()) leftHand = true;
|
||||
}
|
||||
}
|
||||
@ -232,7 +233,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo()) {
|
||||
if(renderGun.isAkimbo(player)) {
|
||||
ModelBiped biped = renderer.modelBipedMain;
|
||||
renderer.modelArmorChestplate.bipedLeftArm.rotateAngleY = renderer.modelArmor.bipedLeftArm.rotateAngleY = biped.bipedLeftArm.rotateAngleY = 0.1F + biped.bipedHead.rotateAngleY;
|
||||
}
|
||||
@ -257,7 +258,7 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderWeapon = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderWeapon.isAkimbo() || renderWeapon.isLeftHanded()) {
|
||||
if(renderWeapon.isAkimbo(player) || renderWeapon.isLeftHanded()) {
|
||||
GL11.glPushMatrix();
|
||||
renderer.modelBipedMain.bipedLeftArm.isHidden = false;
|
||||
renderer.modelBipedMain.bipedLeftArm.postRender(0.0625F);
|
||||
@ -279,10 +280,10 @@ public class ModEventHandlerRenderer {
|
||||
if(renderWeapon.isLeftHanded()) {
|
||||
GL11.glTranslatef(0.1875F, 0F, 0.0F);
|
||||
renderWeapon.setupThirdPerson(held);
|
||||
renderWeapon.renderEquippedAkimbo(held);
|
||||
renderWeapon.renderEquippedAkimbo(held, player);
|
||||
} else {
|
||||
renderWeapon.setupThirdPersonAkimbo(held);
|
||||
renderWeapon.renderEquippedAkimbo(held);
|
||||
renderWeapon.renderEquippedAkimbo(held, player);
|
||||
}
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
@ -570,6 +571,11 @@ public class ModEventHandlerRenderer {
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onRenderHUD(RenderGameOverlayEvent.Pre event) {
|
||||
|
||||
//TODO: using ALL doesn't work as anticipated - still hides in F1. need a different event for this
|
||||
if(event.type == ElementType.ALL) {
|
||||
if(ClientConfig.BADGES_HUD.get()) RenderScreenOverlay.renderBadges(event.resolution, Minecraft.getMinecraft().ingameGUI);
|
||||
}
|
||||
|
||||
if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) > 0 && ClientConfig.NUKE_HUD_SHAKE.get()) {
|
||||
double mult = (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) / (double) ModEventHandlerClient.shakeDuration * 2;
|
||||
double horizontal = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.02), -0.7, 0.7) * 15;
|
||||
@ -581,7 +587,7 @@ public class ModEventHandlerRenderer {
|
||||
@SubscribeEvent
|
||||
public void onRenderHand(RenderHandEvent event) {
|
||||
|
||||
//can't use plaxer.getHeldItem() here because the item rendering persists for a few frames after hitting the switch key
|
||||
//can't use player.getHeldItem() here because the item rendering persists for a few frames after hitting the switch key
|
||||
ItemStack toRender = Minecraft.getMinecraft().entityRenderer.itemRenderer.itemToRender;
|
||||
|
||||
if(toRender != null) {
|
||||
|
||||
@ -69,7 +69,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModItems.burnt_bark));
|
||||
API.hideItem(new ItemStack(ModItems.ams_core_thingy));
|
||||
}
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_vault));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_blast));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_compact_launcher));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_launch_table));
|
||||
|
||||
@ -105,9 +105,10 @@ public class ResourceManager {
|
||||
public static final IModelCustom pump = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/pump.obj")).asVBO();
|
||||
|
||||
//Large Turbine
|
||||
public static final IModelCustom steam_engine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/steam_engine.obj")).asVBO();
|
||||
public static final IModelCustom turbine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/turbine.obj"));
|
||||
public static final IModelCustom chungus = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chungus.obj")).asVBO();
|
||||
public static final IModelCustom steam_engine = new HFRWavefrontObject("models/machines/steam_engine.obj").asVBO();
|
||||
public static final IModelCustom turbine = new HFRWavefrontObject("models/machines/turbine.obj").asVBO();
|
||||
public static final IModelCustom industrial_turbine = new HFRWavefrontObject("models/machines/industrial_turbine.obj").asVBO();
|
||||
public static final IModelCustom chungus = new HFRWavefrontObject("models/machines/chungus.obj").asVBO();
|
||||
|
||||
//Cooling Tower
|
||||
public static final IModelCustom tower_small = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/tower_small.obj")).asVBO();
|
||||
@ -118,13 +119,13 @@ public class ResourceManager {
|
||||
public static final IModelCustom condenser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/condenser.obj")).asVBO();
|
||||
|
||||
//Wood burner
|
||||
public static final IModelCustom wood_burner = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/wood_burner.obj"));
|
||||
public static final IModelCustom wood_burner = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/wood_burner.obj")).asVBO();
|
||||
|
||||
//IGen
|
||||
public static final IModelCustom igen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/igen.obj"));
|
||||
|
||||
//Combustion Engine
|
||||
public static final IModelCustom dieselgen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/dieselgen.obj"));
|
||||
public static final IModelCustom dieselgen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/dieselgen.obj")).asVBO();
|
||||
public static final IModelCustom combustion_engine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/combustion_engine.obj")).asVBO();
|
||||
|
||||
//Press
|
||||
@ -159,7 +160,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom purex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/purex.obj")).asVBO();
|
||||
|
||||
//Mixer
|
||||
public static final IModelCustom mixer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mixer.obj"));
|
||||
public static final IModelCustom mixer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mixer.obj")).asVBO();
|
||||
|
||||
//Arc Welder
|
||||
public static final IModelCustom arc_welder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/arc_welder.obj"), false).asVBO();
|
||||
@ -183,7 +184,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom microwave = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/microwave.obj"));
|
||||
|
||||
//Big Man Johnson
|
||||
public static final IModelCustom autosaw = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/autosaw.obj"));
|
||||
public static final IModelCustom autosaw = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/autosaw.obj"), false).asVBO();
|
||||
|
||||
//Mining Drill
|
||||
public static final IModelCustom mining_drill = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_drill.obj")).asVBO();
|
||||
@ -301,13 +302,6 @@ public class ResourceManager {
|
||||
public static final IModelCustom dud_salted = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/dud_salted.obj")).asVBO();
|
||||
|
||||
//Satellites
|
||||
public static final IModelCustom sat_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_base.obj"));
|
||||
public static final IModelCustom sat_radar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_radar.obj"));
|
||||
public static final IModelCustom sat_resonator = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_resonator.obj"));
|
||||
public static final IModelCustom sat_scanner = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_scanner.obj"));
|
||||
public static final IModelCustom sat_mapper = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_mapper.obj"));
|
||||
public static final IModelCustom sat_laser = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_laser.obj"));
|
||||
public static final IModelCustom sat_foeq = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_foeq.obj"));
|
||||
public static final IModelCustom sat_foeq_burning = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_foeq_burning.obj"));
|
||||
public static final IModelCustom sat_foeq_fire = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sat_foeq_fire.obj"));
|
||||
|
||||
@ -333,48 +327,52 @@ public class ResourceManager {
|
||||
public static final IModelCustom blast_door_slider = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blast_door_slider.obj"));
|
||||
public static final IModelCustom blast_door_block = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blast_door_block.obj"));
|
||||
|
||||
//Sliding Blast Door
|
||||
public static final ResourceLocation sliding_blast_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/sliding_blast_door.png");
|
||||
public static final ResourceLocation sliding_blast_door_variant1_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/sliding_blast_door_variant1.png");
|
||||
public static final ResourceLocation sliding_blast_door_variant2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/sliding_blast_door_variant2.png");
|
||||
|
||||
public static AnimatedModel sliding_blast_door = ColladaLoader.load(new ResourceLocation(RefStrings.MODID, "models/doors/sliding_blast_door.dae"));
|
||||
public static Animation sliding_blast_door_anim = ColladaLoader.loadAnim(1200, new ResourceLocation(RefStrings.MODID, "models/doors/sliding_blast_door.dae"));
|
||||
|
||||
//Doors
|
||||
public static AnimatedModel transition_seal = ColladaLoader.load(new ResourceLocation(RefStrings.MODID, "models/doors/seal.dae"), true);
|
||||
public static Animation transition_seal_anim = ColladaLoader.loadAnim(24040, new ResourceLocation(RefStrings.MODID, "models/doors/seal.dae"));
|
||||
public static final IModelCustomNamed fire_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/fire_door.obj")).asVBO();
|
||||
|
||||
//Secure Access Door
|
||||
public static final ResourceLocation secure_access_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/secure_access_door.png");
|
||||
public static IModelCustomNamed secure_access_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/secure_access_door.obj")).asVBO();
|
||||
|
||||
public static final ResourceLocation water_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/water_door.png");
|
||||
public static IModelCustomNamed water_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/water_door.obj")).asVBO();
|
||||
|
||||
public static final ResourceLocation sliding_seal_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/sliding_seal_door.png");
|
||||
public static IModelCustomNamed sliding_seal_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/sliding_seal_door.obj")).asVBO();
|
||||
|
||||
public static final ResourceLocation round_airlock_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/round_airlock_door.png");
|
||||
public static IModelCustomNamed round_airlock_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/round_airlock_door.obj")).asVBO();
|
||||
|
||||
public static final ResourceLocation qe_sliding_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/qe_sliding_door.png");
|
||||
public static IModelCustomNamed qe_sliding_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/qe_sliding_door.obj")).asVBO();
|
||||
|
||||
public static final ResourceLocation qe_containment_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/qe_containment.png");
|
||||
public static IModelCustomNamed qe_containment = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/qe_containment.obj")).asVBO();
|
||||
|
||||
public static final ResourceLocation large_vehicle_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/large_vehicle_door.png");
|
||||
public static IModelCustomNamed large_vehicle_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/large_vehicle_door.obj")).asVBO();
|
||||
public static final ResourceLocation qe_containment_decal = new ResourceLocation(RefStrings.MODID, "textures/models/doors/qe_containment_decal.png");
|
||||
//PheoDoors
|
||||
public static final ResourceLocation pheo_fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door.png");
|
||||
public static final ResourceLocation pheo_fire_door_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_black.png");
|
||||
public static final ResourceLocation pheo_fire_door_orange_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_orange.png");
|
||||
public static IModelCustomNamed pheo_fire_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/fire_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_airlock_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door.png");
|
||||
public static final ResourceLocation pheo_airlock_door_clean_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door_clean.png");
|
||||
public static final ResourceLocation pheo_airlock_door_green_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door_green.png");
|
||||
public static IModelCustomNamed pheo_airlock_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/airlock_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_blast_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/blast_door.png");
|
||||
public static IModelCustomNamed pheo_blast_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/blast_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_containment_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/containment_door.png");
|
||||
public static IModelCustomNamed pheo_containment_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/containment_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_seal_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/seal_door.png");
|
||||
public static IModelCustomNamed pheo_seal_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/seal_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_secure_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/secure_door.png");
|
||||
public static final ResourceLocation pheo_secure_door_grey_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/secure_door_grey.png");
|
||||
public static IModelCustomNamed pheo_secure_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/secure_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_sliding_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/sliding_door.png");
|
||||
public static IModelCustomNamed pheo_sliding_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/sliding_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_vehicle_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vehicle_door.png");
|
||||
public static IModelCustomNamed pheo_vehicle_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/vehicle_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_water_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/water_door.png");
|
||||
public static IModelCustomNamed pheo_water_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/water_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_vault_door_3 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_3.png");
|
||||
public static final ResourceLocation pheo_vault_door_4 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_4.png");
|
||||
public static final ResourceLocation pheo_vault_door_s = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_s.png");
|
||||
public static final ResourceLocation pheo_label_2 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_2.png");
|
||||
public static final ResourceLocation pheo_label_81 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_81.png");
|
||||
public static final ResourceLocation pheo_label_87 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_87.png");
|
||||
public static final ResourceLocation pheo_label_99 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_99.png");
|
||||
public static final ResourceLocation pheo_label_101 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_101.png");
|
||||
public static final ResourceLocation pheo_label_106 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_106.png");
|
||||
public static final ResourceLocation pheo_label_111 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_111.png");
|
||||
public static IModelCustomNamed pheo_vault_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/vault_door.obj")).asVBO();
|
||||
|
||||
//Doors
|
||||
public static final ResourceLocation silo_hatch_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/silo_hatch.png");
|
||||
public static IModelCustomNamed silo_hatch = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/silo_hatch.obj")).asVBO();
|
||||
public static final ResourceLocation silo_hatch_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/silo_hatch_large.png");
|
||||
public static IModelCustomNamed silo_hatch_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/silo_hatch_large.obj")).asVBO();
|
||||
|
||||
|
||||
//Skeleton
|
||||
public static final IModelCustom skeleton_holder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/skeleton_holder.obj"),false).asVBO();
|
||||
|
||||
@ -401,12 +399,13 @@ public class ResourceManager {
|
||||
public static final IModelCustom zirnox_destroyed = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/zirnox_destroyed.obj")).asVBO();
|
||||
|
||||
//Network
|
||||
public static final IModelCustom connector = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/connector.obj"));
|
||||
public static final IModelCustom pylon_medium = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_medium.obj"));
|
||||
public static final IModelCustom pylon_large = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_large.obj"));
|
||||
public static final IModelCustom substation = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/substation.obj")).asVBO();
|
||||
public static final IModelCustom pipe_anchor = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/pipe_anchor.obj")).asVBO();
|
||||
public static final IModelCustom fluid_pump = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/fluid_diode.obj")).asVBO();
|
||||
public static final IModelCustom connector = new HFRWavefrontObject("models/network/connector.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom connector_super = new HFRWavefrontObject("models/network/connector_super.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom pylon_medium = new HFRWavefrontObject("models/network/pylon_medium.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom pylon_large = new HFRWavefrontObject("models/network/pylon_large.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom substation = new HFRWavefrontObject("models/network/substation.obj").asVBO();
|
||||
public static final IModelCustom pipe_anchor = new HFRWavefrontObject("models/network/pipe_anchor.obj").asVBO();
|
||||
public static final IModelCustom fluid_pump = new HFRWavefrontObject("models/network/fluid_diode.obj").asVBO();
|
||||
|
||||
//Radiolysis
|
||||
public static final IModelCustom radiolysis = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/radiolysis.obj"));
|
||||
@ -549,6 +548,7 @@ public class ResourceManager {
|
||||
//Large Turbine
|
||||
public static final ResourceLocation steam_engine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/steam_engine.png");
|
||||
public static final ResourceLocation turbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/turbine.png");
|
||||
public static final ResourceLocation industrial_turbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/industrial_turbine.png");
|
||||
public static final ResourceLocation chungus_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/chungus.png");
|
||||
|
||||
//Cooling Tower
|
||||
@ -821,7 +821,6 @@ public class ResourceManager {
|
||||
|
||||
//Doors
|
||||
public static final ResourceLocation transition_seal_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/transition_seal.png");
|
||||
public static final ResourceLocation fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/fire_door.png");
|
||||
|
||||
//Skeleton
|
||||
public static final ResourceLocation skeleton_holder_tex = new ResourceLocation(RefStrings.MODID, "textures/particle/skeleton.png");
|
||||
@ -854,6 +853,7 @@ public class ResourceManager {
|
||||
|
||||
//Electricity
|
||||
public static final ResourceLocation connector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/connector.png");
|
||||
public static final ResourceLocation connector_super_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/connector_super.png");
|
||||
public static final ResourceLocation pylon_medium_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_medium.png");
|
||||
public static final ResourceLocation pylon_medium_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_medium_steel.png");
|
||||
public static final ResourceLocation pylon_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_large.png");
|
||||
@ -917,6 +917,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom uzi = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/uzi.obj")).asVBO();
|
||||
public static final IModelCustom spas_12 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/spas-12.obj")).asVBO();
|
||||
public static final IModelCustom panzerschreck = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/panzerschreck.obj")).asVBO();
|
||||
public static final IModelCustom star_f = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/star_f.obj")).asVBO();
|
||||
public static final IModelCustom g3 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/g3.obj")).asVBO();
|
||||
public static final IModelCustom stinger = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/stinger.obj")).asVBO();
|
||||
public static final IModelCustom chemthrower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/chemthrower.obj")).asVBO();
|
||||
@ -969,6 +970,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj")).asVBO();
|
||||
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj")).asVBO();
|
||||
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj")).asVBO();
|
||||
public static final IModelCustom armor_ncr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/ncrpa.obj")).asVBO();
|
||||
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj")).asVBO();
|
||||
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj")).asVBO();
|
||||
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj")).asVBO();
|
||||
@ -1041,6 +1043,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation uzi_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/uzi.png");
|
||||
public static final ResourceLocation uzi_saturnite_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/uzi_saturnite.png");
|
||||
public static final ResourceLocation panzerschreck_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/panzerschreck.png");
|
||||
public static final ResourceLocation star_f_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/star_f.png");
|
||||
public static final ResourceLocation star_f_elite_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/star_f_elite.png");
|
||||
public static final ResourceLocation g3_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3.png");
|
||||
public static final ResourceLocation g3_zebra_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_zebra.png");
|
||||
public static final ResourceLocation g3_green_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_polymer_green.png");
|
||||
@ -1153,6 +1157,11 @@ public class ResourceManager {
|
||||
public static final ResourceLocation rpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_chest.png");
|
||||
public static final ResourceLocation rpa_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_arm.png");
|
||||
|
||||
public static final ResourceLocation ncrpa_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_helmet.png");
|
||||
public static final ResourceLocation ncrpa_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_leg.png");
|
||||
public static final ResourceLocation ncrpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_chest.png");
|
||||
public static final ResourceLocation ncrpa_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_arm.png");
|
||||
|
||||
public static final ResourceLocation taurun_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_helmet.png");
|
||||
public static final ResourceLocation taurun_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_leg.png");
|
||||
public static final ResourceLocation taurun_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_chest.png");
|
||||
|
||||
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