mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-23 14:30:51 +00:00
Compare commits
No commits in common. "master" and "1.0.27_X5572" have entirely different histories.
master
...
1.0.27_X55
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@ -7,7 +7,6 @@
|
||||
|
||||
# Yes this is a mostly untouched Github actions template
|
||||
|
||||
|
||||
name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
@ -17,36 +16,19 @@ 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
|
||||
@ -60,3 +42,5 @@ jobs:
|
||||
with:
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: ./build/libs
|
||||
|
||||
|
||||
|
||||
78
changelog
78
changelog
@ -1,49 +1,33 @@
|
||||
## Added
|
||||
* Target pistol
|
||||
* Weapon steel tier pistol that holds 15 rounds and shoots .22 LR
|
||||
* Accepts silencers
|
||||
* NCR Ranger Power Armor
|
||||
* Legendary set, like the remnants power armor
|
||||
* Stats are largely similar, but has a speed boost when sprinting
|
||||
* Comes with the power armor - melee controller item
|
||||
* If the full set is equipped, the melee controller allows for powerful melee attacks
|
||||
* Left click does two rapid swings, right click causes both arms to swing at once
|
||||
* The NCRPA's blades are armor-piercing and gib enemies on death
|
||||
* The blades do 250% damage on large enemies, i.e. ones with 100 or more max health
|
||||
|
||||
## Changed
|
||||
* Reworked the industrial turbine
|
||||
* New model and texture
|
||||
* Removed the GUI, it now uses the same in-world compressor toggle as the leviathan turbine
|
||||
* No longer has a volatile power buffer, power isn't buffered at all anymore, similar to steam engines and MHD turbines
|
||||
* Steam capacity changes based on compression level, the ratio for turbine cascades is now 1:1:1:1
|
||||
* Comes with a flywheel, energy output slowly ramps up as steam is supplied and slowly goes down as steam cuts out
|
||||
* Recipe is similar to the old inudstrial turbine, but slightly simplified and cheaper
|
||||
* Leviathan turbines no longer have a power buffer
|
||||
* Updated russian and chinese localization
|
||||
* The PWR can now be controlled via RoR
|
||||
* The RoR value reader can read core and hull heat as well as fuel depletion in percent
|
||||
* The RoR controller can set the control rod level in percent as well as jetison all loaded fuel
|
||||
* Having 528, expensive or rampant mode enabled now displays a badge in the top left corner, showing that it is enabled
|
||||
* Badges can be disabled with the `BADGES_HUD` value of `/ntmclient`
|
||||
* The badge only shows up if the "true" configuration is used, 528 requires default settings, expensive requires the precision assembler config to not be modified and rampant needs most of the default settings enabled
|
||||
* If all three modes are enabled, the "328 mode" badge also appears
|
||||
* Removed toothpicks, as they haven't been used in recipes for well over a year
|
||||
* Cleaned up a ton of unused assets
|
||||
* The old crucible smelting rules when not using a template can be restores with the `/ntmserver` value `LEGACY_CRUCIBLE_RULES`
|
||||
* Due to repeated complaints, power armor sounds are now generally more quiet, with 25% volume for steps and 50% volume for jumping and landing
|
||||
* Reduced mask man's projectile resistance from 75% to 50%
|
||||
* Reduced maskman's resistance to damage above 50 from 75% to 50%
|
||||
* Remnants power armor can now use the melee controller, allowing Sergeant Arch Dornan to beat the snot out of people
|
||||
* Improved gibbing
|
||||
* All cybercrab variants can now be gibbed, turning into metal fragments
|
||||
* Iron golems now also turn into metal instead of fleshy chunks
|
||||
* Slimes can now be gibbed, turning into slime globs
|
||||
* Creepers now also gib into slime instead of blood
|
||||
* 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
|
||||
|
||||
# Fixed
|
||||
* Fixed proxy tiles that do not use electricity at all visually connecting to cables
|
||||
* Fixed missing texture for canned horse slime
|
||||
* Fixed incorrect ore dictionary key used by enriched naquadah watz pellet recipe
|
||||
* Fixed out of bounds light level for the RTG blast furnace
|
||||
* Fixed the recipe configs now allowing NBT data for output items, rendering the precision assembler and annihilator configs useless
|
||||
## 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
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5593
|
||||
mod_build_number=5572
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
|
||||
@ -109,7 +109,7 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
|
||||
// cannot be done accidentally, and is definitely preferable to multiblocks
|
||||
// just vanishing when their chunks are unloaded in an unlucky way.
|
||||
if(b != this && world.checkChunksExist(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1)) {
|
||||
if(isLegacyMonoblock(world, x, y, z)) {
|
||||
if (isLegacyMonoblock(world, x, y, z)) {
|
||||
fixLegacyMonoblock(world, x, y, z);
|
||||
} else {
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
@ -80,5 +80,4 @@ public class BlockEnums {
|
||||
FLUORESCENT,
|
||||
HALOGEN
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -30,8 +30,6 @@ 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;
|
||||
@ -345,7 +343,6 @@ 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;
|
||||
@ -618,7 +615,15 @@ 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;
|
||||
|
||||
@ -847,6 +852,7 @@ 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;
|
||||
@ -968,14 +974,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_steam_engine;
|
||||
public static Block machine_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_large_turbine;
|
||||
|
||||
public static Block machine_deuterium_extractor;
|
||||
public static Block machine_deuterium_tower;
|
||||
@ -986,6 +985,12 @@ 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;
|
||||
@ -1167,11 +1172,10 @@ public class ModBlocks {
|
||||
public static Block gas_explosive;
|
||||
public static Block vacuum;
|
||||
|
||||
@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 absorber;
|
||||
public static Block absorber_red;
|
||||
public static Block absorber_green;
|
||||
public static Block absorber_pink;
|
||||
public static Block decon;
|
||||
|
||||
public static Block mud_block;
|
||||
@ -1193,8 +1197,17 @@ 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() { return super.setImmovableMobility(); } //override access modifier
|
||||
|
||||
@Override
|
||||
public boolean blocksMovement() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material setImmovableMobility() { //override access modifier
|
||||
return super.setImmovableMobility();
|
||||
}
|
||||
|
||||
}.setImmovableMobility());
|
||||
|
||||
public static Block volcanic_lava_block;
|
||||
@ -1210,6 +1223,7 @@ 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;
|
||||
@ -1533,7 +1547,6 @@ 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);
|
||||
@ -1791,7 +1804,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(1.0F).setCreativeTab(null);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(2.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");
|
||||
@ -1970,7 +1983,8 @@ 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).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
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_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");
|
||||
@ -2061,7 +2075,7 @@ public class ModBlocks {
|
||||
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
||||
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
vault_door = new VaultDoor(Material.iron).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");
|
||||
@ -2107,6 +2121,13 @@ 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");
|
||||
@ -2245,8 +2266,7 @@ 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_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_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus");
|
||||
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");
|
||||
@ -2313,15 +2333,13 @@ 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 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);
|
||||
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");
|
||||
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")) {
|
||||
if (Loader.isModLoaded("OpenComputers")) {
|
||||
oc_cable_paintable = new BlockOpenComputersCablePaintable().setBlockName("oc_cable_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
}
|
||||
|
||||
@ -2365,6 +2383,7 @@ 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");
|
||||
@ -2704,7 +2723,6 @@ 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());
|
||||
@ -3258,6 +3276,7 @@ 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());
|
||||
@ -3284,7 +3303,6 @@ 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());
|
||||
@ -3292,8 +3310,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());
|
||||
register(machine_liquefactor);
|
||||
register(machine_solidifier);
|
||||
GameRegistry.registerBlock(machine_liquefactor, ItemBlockBase.class, machine_liquefactor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_solidifier, ItemBlockBase.class, machine_solidifier.getUnlocalizedName());
|
||||
register(machine_intake);
|
||||
register(machine_compressor);
|
||||
register(machine_compressor_compact);
|
||||
@ -3351,7 +3369,6 @@ 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
|
||||
@ -3449,6 +3466,14 @@ 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());
|
||||
@ -3491,6 +3516,7 @@ 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());
|
||||
@ -3517,7 +3543,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(vacuum, vacuum.getUnlocalizedName());
|
||||
|
||||
// OC Compat Items
|
||||
if(Loader.isModLoaded(Compat.MOD_OC)) {
|
||||
if (Loader.isModLoaded("OpenComputers")) {
|
||||
register(oc_cable_paintable);
|
||||
}
|
||||
|
||||
|
||||
@ -54,24 +54,21 @@ 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) {
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.egg_balefire_shard));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.egg_balefire_shard)));
|
||||
}
|
||||
if(type == type.CONVENTIONAL) {
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 16));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 16)));
|
||||
}
|
||||
if(type == type.NUKE) {
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 4));
|
||||
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)));
|
||||
}
|
||||
if(type == type.SALTED) {
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 2),
|
||||
new ItemStack(ModItems.ingot_cobalt, 12));
|
||||
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)));
|
||||
}
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
@ -81,10 +78,6 @@ 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,7 +3,6 @@ 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;
|
||||
@ -17,8 +16,6 @@ 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++) {
|
||||
@ -30,7 +27,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, crater ? 1 : 0, 3);
|
||||
world.setBlock(a, b, c, ModBlocks.ore_volcano);
|
||||
} else if(block == ModBlocks.ore_bedrock_oil) {
|
||||
world.setBlock(a, b, c, Blocks.bedrock);
|
||||
}
|
||||
|
||||
@ -2,79 +2,38 @@ 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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAbsorber extends BlockEnumMulti implements IBlockMulti {
|
||||
public class BlockAbsorber extends Block {
|
||||
|
||||
// Enum for tiers they are in order of meta data, 0, 1, 2, 3 for Base, Red, Green, Pink
|
||||
public static enum EnumAbsorberTier {
|
||||
float absorb = 0;
|
||||
|
||||
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);
|
||||
public BlockAbsorber(Material mat, float ab) {
|
||||
super(mat);
|
||||
this.setTickRandomly(true);
|
||||
this.setBlockName("rad_absorber");
|
||||
absorb = ab;
|
||||
}
|
||||
|
||||
public EnumAbsorberTier getTier(int meta) {
|
||||
return EnumAbsorberTier.values()[rectify(meta)];
|
||||
}
|
||||
|
||||
@Override
|
||||
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) {
|
||||
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));
|
||||
|
||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, absorb);
|
||||
world.scheduleBlockUpdate(x, y, z, this, 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, tickRate(world));
|
||||
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,14 +3,13 @@ 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;
|
||||
@ -24,7 +23,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable {
|
||||
public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
|
||||
public DoorDecl type;
|
||||
|
||||
@ -35,7 +34,8 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta){
|
||||
if(meta >= 12) return new TileEntityDoorGeneric();
|
||||
if(meta >= 12)
|
||||
return new TileEntityDoorGeneric();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -69,28 +69,19 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
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;
|
||||
return !playerIn.isSneaking();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -168,6 +159,7 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
@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) {
|
||||
@ -191,24 +183,4 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
}
|
||||
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,8 +55,7 @@ public class BlockFissure extends BlockContainer implements IBlockMultiPass {
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
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);
|
||||
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, ModBlocks.volcanic_lava_block);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
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) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -159,8 +159,7 @@ 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", "混沌"),
|
||||
DERG( "Dragon", "Squeeze him.");
|
||||
HUNDUN( "Hundun", "混沌");
|
||||
|
||||
public String label;
|
||||
public String inscription;
|
||||
|
||||
@ -1,18 +1,12 @@
|
||||
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;
|
||||
|
||||
@ -57,42 +51,4 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
53
src/main/java/com/hbm/blocks/machine/DummyBlockRefinery.java
Normal file
53
src/main/java/com/hbm/blocks/machine/DummyBlockRefinery.java
Normal file
@ -0,0 +1,53 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
53
src/main/java/com/hbm/blocks/machine/DummyBlockTurbofan.java
Normal file
53
src/main/java/com/hbm/blocks/machine/DummyBlockTurbofan.java
Normal file
@ -0,0 +1,53 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
141
src/main/java/com/hbm/blocks/machine/DummyBlockVault.java
Normal file
141
src/main/java/com/hbm/blocks/machine/DummyBlockVault.java
Normal file
@ -0,0 +1,141 @@
|
||||
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,7 +20,8 @@ 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,7 +74,6 @@ 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();
|
||||
@ -85,15 +84,5 @@ 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,7 +74,6 @@ 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();
|
||||
@ -85,15 +84,5 @@ 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,7 +21,6 @@ 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;
|
||||
@ -29,14 +28,19 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChungus extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||
|
||||
public MachineChungus() {
|
||||
super(Material.iron);
|
||||
public MachineChungus(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
@ -62,14 +66,34 @@ 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) {
|
||||
if(!entity.operational) {
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.chungusLever", 1.5F, 1.0F);
|
||||
entity.onLeverPull();
|
||||
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);
|
||||
} else {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "Cannot change compressor setting while operational!"));
|
||||
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);
|
||||
}
|
||||
entity.markDirty();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -144,7 +168,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.powerBuffer) + "HE");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(chungus.power) + "/" + BobMathUtil.getShortNumber(chungus.getMaxPower()) + "HE");
|
||||
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -1,133 +0,0 @@
|
||||
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,7 +17,6 @@ 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_) {
|
||||
public MachineTransformer(Material p_i45394_1_, long b, int d) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@ -26,6 +26,10 @@ 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
|
||||
|
||||
156
src/main/java/com/hbm/blocks/machine/VaultDoor.java
Normal file
156
src/main/java/com/hbm/blocks/machine/VaultDoor.java
Normal file
@ -0,0 +1,156 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -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.syncPower) + " / " + BobMathUtil.getShortNumber(socket.syncMaxPower) + "HE");
|
||||
text.add(BobMathUtil.getShortNumber(socket.powerFromStack(socket.syncStack)) + " / " + BobMathUtil.getShortNumber(socket.maxPowerFromStack(socket.syncStack)) + "HE");
|
||||
|
||||
double percent = (double) socket.syncPower / socket.syncMaxPower;
|
||||
double percent = (double) socket.powerFromStack(socket.syncStack) / (double) socket.maxPowerFromStack(socket.syncStack);
|
||||
int charge = (int) Math.floor(percent * 10_000D);
|
||||
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||
|
||||
|
||||
@ -37,8 +37,6 @@ 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);
|
||||
@ -65,8 +63,6 @@ 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,8 +1,6 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import com.hbm.inventory.recipes.PrecAssRecipes;
|
||||
import com.hbm.lib.RefStrings;
|
||||
public class GeneralConfig {
|
||||
|
||||
@ -45,10 +43,6 @@ 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;
|
||||
@ -59,11 +53,6 @@ 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,10 +68,6 @@ 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,7 +21,6 @@ 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);
|
||||
@ -35,7 +34,6 @@ 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("ingotNaquadahEnriched")) addPellet(new DictFrame("NaquadahEnriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadah-Enriched")) addPellet(new DictFrame("Naquadah-Enriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadria")) addPellet(new DictFrame("Naquadria"), EnumWatzType.NQR);
|
||||
}
|
||||
|
||||
|
||||
@ -77,8 +77,6 @@ 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() });
|
||||
|
||||
@ -150,13 +150,10 @@ 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_chemical_plant);
|
||||
canDestroy.add(ModBlocks.machine_chemical_factory);
|
||||
canDestroy.add(ModBlocks.machine_chemplant);
|
||||
canDestroy.add(ModBlocks.machine_crystallizer);
|
||||
canDestroy.add(ModBlocks.machine_turbine);
|
||||
canDestroy.add(ModBlocks.machine_industrial_turbine);
|
||||
canDestroy.add(ModBlocks.machine_chungus);
|
||||
canDestroy.add(ModBlocks.machine_purex);
|
||||
canDestroy.add(ModBlocks.machine_large_turbine);
|
||||
canDestroy.add(ModBlocks.crate_iron);
|
||||
canDestroy.add(ModBlocks.crate_steel);
|
||||
canDestroy.add(ModBlocks.machine_diesel);
|
||||
|
||||
@ -66,13 +66,17 @@ 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.5F;
|
||||
if(source.isExplosion()) amount *= 0.5F;
|
||||
if(source.isFireDamage())
|
||||
amount = 0;
|
||||
if(source.isMagicDamage())
|
||||
amount = 0;
|
||||
if(source.isProjectile())
|
||||
amount *= 0.25F;
|
||||
if(source.isExplosion())
|
||||
amount *= 0.5F;
|
||||
|
||||
if(amount > 50) {
|
||||
amount = 50 + (amount - 50) * 0.5F;
|
||||
amount = 50 + (amount - 50) * 0.25F;
|
||||
}
|
||||
|
||||
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.SLIME).setStackDisplayName("Class A Horse Semen"),
|
||||
ModItems.canned_conserve.stackFromEnum(64, EnumFoodType.JIZZ).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));
|
||||
|
||||
@ -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,18 +175,9 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler implements ICom
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
if(fuels == null || fuels.isEmpty())
|
||||
fuels = new ArrayList<Fuel>();
|
||||
for(ItemStack i : getBlades()) {
|
||||
for(ItemStack i : MachineRecipes.instance().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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public enum HalfLifeType {
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
429
src/main/java/com/hbm/interfaces/ICustomWarhead.java
Normal file
429
src/main/java/com/hbm/interfaces/ICustomWarhead.java
Normal file
@ -0,0 +1,429 @@
|
||||
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,12 +6,13 @@ 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 GuiCrateBase {
|
||||
public class GUICrateDesh extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_desh.png");
|
||||
private IInventory crate;
|
||||
|
||||
@ -7,11 +7,12 @@ 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 GuiCrateBase {
|
||||
public class GUICrateIron extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_iron.png");
|
||||
private IInventory diFurnace;
|
||||
|
||||
@ -6,12 +6,13 @@ 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 GuiCrateBase {
|
||||
public class GUICrateSteel extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_steel.png");
|
||||
private IInventory crate;
|
||||
|
||||
@ -7,11 +7,12 @@ 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 GuiCrateBase {
|
||||
public class GUICrateTemplate extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_crate_template.png");
|
||||
private IInventory diFurnace;
|
||||
|
||||
@ -8,11 +8,12 @@ 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 GuiCrateBase {
|
||||
public class GUICrateTungsten extends GuiContainer {
|
||||
|
||||
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");
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
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, 50_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
|
||||
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),
|
||||
new OreDictStack(OSMIRIDIUM.plateCast(), 2)));
|
||||
|
||||
//Missile Parts
|
||||
|
||||
@ -386,8 +386,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_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))
|
||||
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))
|
||||
.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))
|
||||
|
||||
@ -12,6 +12,7 @@ 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;
|
||||
@ -49,6 +50,7 @@ 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()));
|
||||
@ -56,6 +58,35 @@ 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) {
|
||||
|
||||
|
||||
@ -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.SLIME), new OreDictStack(GOLD.plateCast()),
|
||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.JIZZ), 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,7 +25,6 @@ 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;
|
||||
@ -302,7 +301,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 || comp.nbt != null) writer.value(comp.meta); //metadata
|
||||
if(comp.meta > 0) writer.value(comp.meta); //metadata
|
||||
if(comp.nbt != null) writer.value(comp.nbt.toString()); //NBT
|
||||
} else if(astack instanceof ComparableStack) {
|
||||
ComparableStack comp = (ComparableStack) astack;
|
||||
@ -325,11 +324,7 @@ 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) {
|
||||
ItemStack stack = new ItemStack(item, stacksize, meta);
|
||||
if(array.size() > 3) ItemStackUtil.addNBTFromString(stack, array.get(3).getAsString());
|
||||
return stack;
|
||||
}
|
||||
if(item != null) return new ItemStack(item, stacksize, meta);
|
||||
} catch(Exception ex) { }
|
||||
MainRegistry.logger.error("Error reading stack array " + array.toString() + " - defaulting to NOTHING item!");
|
||||
return new ItemStack(ModItems.nothing);
|
||||
@ -340,12 +335,8 @@ 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();
|
||||
return new Pair(stack, chance);
|
||||
}
|
||||
if(item != null) return new Pair(new ItemStack(item, stacksize, meta), 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);
|
||||
@ -375,9 +366,8 @@ public abstract class SerializableRecipe {
|
||||
writer.beginArray();
|
||||
writer.setIndent("");
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getItem())); //item name
|
||||
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
|
||||
if(stack.stackSize != 1 || stack.getItemDamage() != 0) writer.value(stack.stackSize); //stack size
|
||||
if(stack.getItemDamage() != 0) writer.value(stack.getItemDamage()); //metadata
|
||||
writer.endArray();
|
||||
writer.setIndent(" ");
|
||||
}
|
||||
@ -386,9 +376,8 @@ 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 || 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
|
||||
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
|
||||
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)
|
||||
};
|
||||
}};
|
||||
|
||||
@ -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.HalfLifeType;
|
||||
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
@ -610,6 +610,7 @@ 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;
|
||||
|
||||
@ -773,6 +774,12 @@ 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;
|
||||
@ -929,6 +936,33 @@ 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;
|
||||
|
||||
@ -1340,6 +1374,16 @@ 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;
|
||||
@ -1399,8 +1443,6 @@ 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;
|
||||
@ -1439,7 +1481,6 @@ 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 ammo_standard;
|
||||
public static Item ammo_secret;
|
||||
@ -1779,10 +1820,6 @@ 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;
|
||||
@ -2125,6 +2162,8 @@ 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;
|
||||
@ -2695,6 +2734,7 @@ 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");
|
||||
|
||||
@ -2935,7 +2975,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");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2");
|
||||
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");
|
||||
@ -3427,7 +3467,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");
|
||||
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite_new");
|
||||
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");
|
||||
@ -3667,6 +3707,16 @@ 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");
|
||||
@ -3882,6 +3932,10 @@ 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");
|
||||
@ -4259,20 +4313,6 @@ 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)
|
||||
@ -4837,6 +4877,8 @@ 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");
|
||||
@ -5467,6 +5509,7 @@ 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());
|
||||
@ -5841,6 +5884,10 @@ 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());
|
||||
@ -6287,8 +6334,6 @@ 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());
|
||||
@ -6329,7 +6374,6 @@ 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(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_secret, ammo_secret.getUnlocalizedName());
|
||||
@ -6827,10 +6871,6 @@ 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());
|
||||
@ -7019,6 +7059,7 @@ 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, 0.25F, 1.0F);
|
||||
player.playSound(sound, 1.0F, 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, 0.5F, 1.0F);
|
||||
player.playSound(chestplate.jump, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,6 +315,9 @@ 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) {
|
||||
@ -334,10 +337,11 @@ 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, 0.5F, 1.0F);
|
||||
player.playSound(chestplate.fall, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
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.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;
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
|
||||
/// 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);
|
||||
}
|
||||
}
|
||||
|
||||
@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();
|
||||
|
||||
@Override
|
||||
public IPAMelee getMeleeComponent(EntityPlayer entity) {
|
||||
if(this.hasFSBArmorIgnoreCharge(entity)) return meleeComponent;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,128 +0,0 @@
|
||||
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);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -11,12 +11,11 @@ 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, IPAWeaponsProvider {
|
||||
public class ArmorRPA extends ArmorFSBPowered implements IItemRendererProvider {
|
||||
|
||||
public ArmorRPA(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
|
||||
@ -53,12 +52,4 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,128 +0,0 @@
|
||||
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 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);
|
||||
|
||||
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);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
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);
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -113,7 +113,7 @@ public class ItemConserve extends ItemEnumMulti {
|
||||
MYSTERY(6, 0.5F),
|
||||
PASHTET(4, 0.5F),
|
||||
CHEESE(3, 1F),
|
||||
SLIME(15, 5F),
|
||||
JIZZ(15, 5F), // :3
|
||||
MILK(5, 0.25F),
|
||||
ASS(6, 0.75F), // :3
|
||||
PIZZA(8, 075F),
|
||||
|
||||
@ -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)
|
||||
if((this.type == StampType.PLATE || this.type == StampType.WIRE || this.type == StampType.CIRCUIT) && this.getMaxDamage() > 0)
|
||||
list.add("[CREATED USING TEMPLATE FOLDER]");
|
||||
}
|
||||
|
||||
|
||||
36
src/main/java/com/hbm/items/special/ItemDoorSkin.java
Normal file
36
src/main/java/com/hbm/items/special/ItemDoorSkin.java
Normal file
@ -0,0 +1,36 @@
|
||||
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];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
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,11 +274,10 @@ 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) {
|
||||
@ -459,9 +458,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,7 +3,6 @@ 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;
|
||||
@ -12,13 +11,8 @@ 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.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;
|
||||
@ -48,21 +42,10 @@ public class ConfettiUtil {
|
||||
}
|
||||
|
||||
public static void gib(EntityLivingBase entity) {
|
||||
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 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;
|
||||
if(entity instanceof EntityCyberCrab) return;
|
||||
if(entity instanceof EntityTeslaCrab) return;
|
||||
if(entity instanceof EntityTaintCrab) return;
|
||||
if(entity instanceof EntitySlime) return;
|
||||
|
||||
SkeletonCreator.composeEffectGib(entity.worldObj, entity, 0.25F);
|
||||
|
||||
@ -71,7 +54,6 @@ 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,7 +1,5 @@
|
||||
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;
|
||||
@ -10,8 +8,6 @@ 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;
|
||||
@ -20,12 +16,10 @@ 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);
|
||||
|
||||
@ -38,7 +32,6 @@ 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()
|
||||
@ -47,15 +40,9 @@ 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),
|
||||
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)
|
||||
.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)
|
||||
.anim(Lego.LAMBDA_DEBUG_ANIMS)
|
||||
).setUnlocalizedName("gun_debug");
|
||||
|
||||
@ -82,7 +69,6 @@ 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);
|
||||
@ -93,17 +79,6 @@ 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,8 +66,6 @@ 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());
|
||||
@ -105,11 +103,9 @@ 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);
|
||||
@ -242,8 +238,7 @@ 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, LegoClient.HUD_COMPONENT_AMMO_SECOND);
|
||||
|
||||
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((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);
|
||||
@ -266,7 +261,6 @@ 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);
|
||||
@ -309,8 +303,6 @@ 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,8 +20,7 @@ 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 with a standard left click refire check.
|
||||
* Only handles single receiver weapons!
|
||||
* It supports draw delays as well as semi and auto fire
|
||||
*/
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_DECIDER = (stack, ctx) -> {
|
||||
int index = ctx.configIndex;
|
||||
|
||||
@ -175,7 +175,6 @@ 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); };
|
||||
@ -188,29 +187,26 @@ 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, 0, true);
|
||||
};
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SECOND_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 1, true);
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 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, 0, false);
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, 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, 0, true);
|
||||
doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
|
||||
ItemGunBaseNT.setIsLockedOn(stack, false);
|
||||
};
|
||||
|
||||
public static void doStandardFire(ItemStack stack, LambdaContext ctx, GunAnimation anim, int receiver, boolean calcWear) {
|
||||
public static void doStandardFire(ItemStack stack, LambdaContext ctx, GunAnimation anim, 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)[receiver];
|
||||
Receiver primary = ctx.config.getReceivers(stack)[0];
|
||||
IMagazine mag = primary.getMagazine(stack);
|
||||
BulletConfig config = (BulletConfig) mag.getType(stack, ctx.inventory);
|
||||
|
||||
|
||||
@ -35,7 +35,6 @@ 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,9 +14,7 @@ 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;
|
||||
@ -60,7 +58,6 @@ 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) {
|
||||
@ -84,7 +81,6 @@ 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) {
|
||||
@ -112,7 +108,6 @@ 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) {
|
||||
@ -141,7 +136,6 @@ 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) {
|
||||
@ -183,7 +177,6 @@ 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);
|
||||
@ -207,7 +200,6 @@ 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());
|
||||
@ -256,7 +248,6 @@ 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);
|
||||
@ -292,7 +283,6 @@ 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);
|
||||
@ -313,7 +303,6 @@ 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);
|
||||
@ -379,7 +368,6 @@ 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) {
|
||||
@ -400,7 +388,6 @@ 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);
|
||||
@ -437,7 +424,6 @@ 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());
|
||||
}
|
||||
@ -462,7 +448,6 @@ 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());
|
||||
}
|
||||
@ -494,9 +479,6 @@ 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) {
|
||||
@ -542,7 +524,6 @@ 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);
|
||||
@ -622,7 +603,6 @@ 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());
|
||||
@ -656,7 +636,6 @@ 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());
|
||||
@ -688,7 +667,6 @@ 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);
|
||||
@ -719,7 +697,6 @@ 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
|
||||
@ -757,89 +734,12 @@ 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;
|
||||
@ -852,7 +752,6 @@ 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) {
|
||||
@ -901,11 +800,8 @@ 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);
|
||||
}
|
||||
@ -957,7 +853,6 @@ 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) {
|
||||
@ -1008,7 +903,6 @@ 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());
|
||||
}
|
||||
@ -1022,7 +916,6 @@ 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) {
|
||||
@ -1047,12 +940,9 @@ 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(ctx.config.getReceivers(stack)[0].getMagazine(stack).getType(stack, null) == XFactory12ga.g12_equestrian_bj) {
|
||||
if(timer == 0 && 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);
|
||||
@ -1097,9 +987,6 @@ 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);
|
||||
}
|
||||
@ -1114,7 +1001,6 @@ 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);
|
||||
@ -1143,7 +1029,6 @@ 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++) {
|
||||
@ -1171,9 +1056,6 @@ 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);
|
||||
}
|
||||
@ -1213,9 +1095,6 @@ 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);
|
||||
}
|
||||
@ -1244,7 +1123,6 @@ 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());
|
||||
}
|
||||
@ -1271,7 +1149,6 @@ 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());
|
||||
}
|
||||
@ -1393,9 +1270,6 @@ 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);
|
||||
}
|
||||
@ -1426,9 +1300,6 @@ 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);
|
||||
}
|
||||
@ -1440,9 +1311,6 @@ 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);
|
||||
}
|
||||
@ -1545,9 +1413,7 @@ 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);
|
||||
}
|
||||
@ -1567,7 +1433,6 @@ 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);
|
||||
@ -1594,7 +1459,6 @@ 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,7 +17,6 @@ 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;
|
||||
@ -55,60 +54,23 @@ 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_SILENCED)
|
||||
).setDefaultAmmo(EnumAmmo.P22_SP, 35).setNameMutator(LAMBDA_NAME_AM180)
|
||||
.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_SILENCED = (stack) -> {
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_AM180 = (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, ctx.configIndex);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 3000, 0.05D, 1.1D, 0);
|
||||
};
|
||||
|
||||
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) {
|
||||
@ -147,42 +109,4 @@ 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).setDamage(1.75F).setOnImpact(LAMBDA_STANDARD_EXPLODE)
|
||||
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)
|
||||
.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, 0, true);
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ public class XFactoryFolly {
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, 0, false);
|
||||
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, false);
|
||||
};
|
||||
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> {
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
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.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.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 ItemGunMelee(WeaponQuality.UTILITY, new GunConfig()
|
||||
.draw(10).inspect(55).crosshair(Crosshair.NONE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(20).jam(0)
|
||||
.offset(1, -0.0625 * 2.5, -0.25D))
|
||||
.pp(LAMBDA_CLICK_PRIMARY).ps(LAMBDA_CLICK_SENONDARY).decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_MELEE_ANIMS).orchestra(ORCHESTRA)
|
||||
).setUnlocalizedName("gun_pa_melee");
|
||||
}
|
||||
|
||||
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_PRIMARY = (stack, ctx) -> {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) component.clickPrimary(stack, ctx);
|
||||
};
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_CLICK_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 class ItemGunMelee extends ItemGunBaseNT {
|
||||
|
||||
public ItemGunMelee(WeaponQuality quality, GunConfig... cfg) {
|
||||
super(quality, cfg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
|
||||
}
|
||||
}
|
||||
@ -41,7 +41,7 @@ public class HUDComponentAmmoCounter implements IHUDComponent {
|
||||
|
||||
@Override
|
||||
public int getComponentHeight(EntityPlayer player, ItemStack stack){
|
||||
return 17;
|
||||
return 24;
|
||||
}
|
||||
|
||||
@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 - 18;
|
||||
int pZ = resolution.getScaledHeight() - bottomOffset - 23;
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
IMagazine mag = gun.getConfig(stack, gunIndex).getReceivers(stack)[this.receiver].getMagazine(stack);
|
||||
|
||||
|
||||
@ -91,7 +91,6 @@ 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 };
|
||||
@ -131,7 +130,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_star_f, ModItems.gun_star_f_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_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))
|
||||
@ -177,9 +176,7 @@ 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_star_f, new WeaponModCaliber(301, 12, 15F, p9))
|
||||
.addMod(ModItems.gun_star_f_akimbo, new WeaponModCaliber(302, 12, 15F, p9));
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(300, 28, 10F, 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))
|
||||
|
||||
@ -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 (5593)";
|
||||
public static final String VERSION = "1.0.27 BETA (5572)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -61,7 +61,6 @@ 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.*;
|
||||
@ -163,9 +162,7 @@ public class ClientProxy extends ServerProxy {
|
||||
|
||||
Jars.initJars();
|
||||
|
||||
IReloadableResourceManager resourceMan = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
|
||||
resourceMan.registerReloadListener(new QMAWLoader());
|
||||
resourceMan.registerReloadListener(new HFRModelReloader());
|
||||
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new QMAWLoader());
|
||||
|
||||
if(GeneralConfig.enableSoundExtension) {
|
||||
SoundSystemConfig.setNumberNormalChannels(GeneralConfig.normalSoundChannels);
|
||||
@ -312,7 +309,6 @@ 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());
|
||||
@ -444,6 +440,7 @@ 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
|
||||
@ -1817,7 +1814,6 @@ 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);
|
||||
|
||||
@ -1841,7 +1837,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, gibType));
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ 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;
|
||||
@ -28,6 +27,7 @@ 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,6 +220,7 @@ 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() });
|
||||
@ -614,10 +615,17 @@ 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() });
|
||||
@ -635,11 +643,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.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.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.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() });
|
||||
|
||||
@ -727,8 +735,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', 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_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_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() });
|
||||
@ -867,6 +875,7 @@ 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 });
|
||||
|
||||
@ -1070,6 +1079,11 @@ 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,20 +1471,6 @@ 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,6 +36,7 @@ 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;
|
||||
@ -504,7 +505,7 @@ public class ModEventHandler {
|
||||
|
||||
ItemStack[] prevArmor = event.entityLiving.previousEquipment;
|
||||
|
||||
if(event.entityLiving instanceof EntityPlayerMP && prevArmor != null && event.entityLiving.getHeldItem() != null
|
||||
if(event.entityLiving instanceof EntityPlayer && prevArmor != null && event.entityLiving.getHeldItem() != null
|
||||
&& (prevArmor[0] == null || prevArmor[0].getItem() != event.entityLiving.getHeldItem().getItem())
|
||||
&& event.entityLiving.getHeldItem().getItem() instanceof IEquipReceiver) {
|
||||
|
||||
@ -1070,21 +1071,6 @@ 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
|
||||
@ -1124,6 +1110,8 @@ 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,15 +224,6 @@ 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;
|
||||
|
||||
@ -830,7 +821,8 @@ public class ModEventHandlerClient {
|
||||
//@SubscribeEvent
|
||||
public void onRenderStorm(RenderHandEvent event) {
|
||||
|
||||
if(BlockAshes.ashes <= 0) return;
|
||||
if(BlockAshes.ashes == 0)
|
||||
return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -904,7 +896,7 @@ public class ModEventHandlerClient {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ArmorNo9.updateWorldHook(mc.theWorld);
|
||||
|
||||
boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded(Compat.MOD_ANG);
|
||||
boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded("angelica");
|
||||
|
||||
if(mc.gameSettings.renderDistanceChunks > 16 && GeneralConfig.enableRenderDistCheck && !supportsHighRenderDistance) {
|
||||
mc.gameSettings.renderDistanceChunks = 16;
|
||||
@ -934,13 +926,6 @@ 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,7 +13,6 @@ 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;
|
||||
@ -88,7 +87,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo(player)) {
|
||||
if(renderGun.isAkimbo()) {
|
||||
partsHidden[EnumPlayerPart.LEFT_ARM.ordinal()] = true;
|
||||
ModelRenderer box = getBoxFromType(renderer, EnumPlayerPart.LEFT_ARM);
|
||||
box.isHidden = true;
|
||||
@ -139,7 +138,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo(player)) akimbo = true;
|
||||
if(renderGun.isAkimbo()) akimbo = true;
|
||||
if(renderGun.isLeftHanded()) leftHand = true;
|
||||
}
|
||||
}
|
||||
@ -233,7 +232,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo(player)) {
|
||||
if(renderGun.isAkimbo()) {
|
||||
ModelBiped biped = renderer.modelBipedMain;
|
||||
renderer.modelArmorChestplate.bipedLeftArm.rotateAngleY = renderer.modelArmor.bipedLeftArm.rotateAngleY = biped.bipedLeftArm.rotateAngleY = 0.1F + biped.bipedHead.rotateAngleY;
|
||||
}
|
||||
@ -258,7 +257,7 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderWeapon = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderWeapon.isAkimbo(player) || renderWeapon.isLeftHanded()) {
|
||||
if(renderWeapon.isAkimbo() || renderWeapon.isLeftHanded()) {
|
||||
GL11.glPushMatrix();
|
||||
renderer.modelBipedMain.bipedLeftArm.isHidden = false;
|
||||
renderer.modelBipedMain.bipedLeftArm.postRender(0.0625F);
|
||||
@ -280,10 +279,10 @@ public class ModEventHandlerRenderer {
|
||||
if(renderWeapon.isLeftHanded()) {
|
||||
GL11.glTranslatef(0.1875F, 0F, 0.0F);
|
||||
renderWeapon.setupThirdPerson(held);
|
||||
renderWeapon.renderEquippedAkimbo(held, player);
|
||||
renderWeapon.renderEquippedAkimbo(held);
|
||||
} else {
|
||||
renderWeapon.setupThirdPersonAkimbo(held);
|
||||
renderWeapon.renderEquippedAkimbo(held, player);
|
||||
renderWeapon.renderEquippedAkimbo(held);
|
||||
}
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
@ -571,11 +570,6 @@ 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;
|
||||
@ -587,7 +581,7 @@ public class ModEventHandlerRenderer {
|
||||
@SubscribeEvent
|
||||
public void onRenderHand(RenderHandEvent event) {
|
||||
|
||||
//can't use player.getHeldItem() here because the item rendering persists for a few frames after hitting the switch key
|
||||
//can't use plaxer.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,6 +69,7 @@ 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,10 +105,9 @@ 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("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();
|
||||
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();
|
||||
|
||||
//Cooling Tower
|
||||
public static final IModelCustom tower_small = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/tower_small.obj")).asVBO();
|
||||
@ -119,13 +118,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")).asVBO();
|
||||
public static final IModelCustom wood_burner = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/wood_burner.obj"));
|
||||
|
||||
//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")).asVBO();
|
||||
public static final IModelCustom dieselgen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/dieselgen.obj"));
|
||||
public static final IModelCustom combustion_engine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/combustion_engine.obj")).asVBO();
|
||||
|
||||
//Press
|
||||
@ -160,7 +159,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")).asVBO();
|
||||
public static final IModelCustom mixer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mixer.obj"));
|
||||
|
||||
//Arc Welder
|
||||
public static final IModelCustom arc_welder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/arc_welder.obj"), false).asVBO();
|
||||
@ -184,7 +183,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 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/autosaw.obj"), false).asVBO();
|
||||
public static final IModelCustom autosaw = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/autosaw.obj"));
|
||||
|
||||
//Mining Drill
|
||||
public static final IModelCustom mining_drill = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_drill.obj")).asVBO();
|
||||
@ -302,6 +301,13 @@ 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"));
|
||||
|
||||
@ -327,52 +333,48 @@ 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();
|
||||
|
||||
//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();
|
||||
//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");
|
||||
|
||||
//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();
|
||||
|
||||
@ -547,7 +549,6 @@ 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
|
||||
@ -820,6 +821,7 @@ 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");
|
||||
@ -915,7 +917,6 @@ 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();
|
||||
@ -968,7 +969,6 @@ 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,8 +1041,6 @@ 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");
|
||||
@ -1155,11 +1153,6 @@ 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");
|
||||
|
||||
@ -69,8 +69,6 @@ public class PacketDispatcher {
|
||||
wrapper.registerMessage(SerializableRecipePacket.Handler.class, SerializableRecipePacket.class, i++, Side.CLIENT);
|
||||
//Syncing of NBT for guns
|
||||
wrapper.registerMessage(HeldItemNBTPacket.Handler.class, HeldItemNBTPacket.class, i++, Side.CLIENT);
|
||||
//Syncs muzzle flashes of SEDNA guns for clients from other entities/players
|
||||
wrapper.registerMessage(MuzzleFlashPacket.Handler.class, MuzzleFlashPacket.class, i++, Side.CLIENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,60 +0,0 @@
|
||||
package com.hbm.packet.toclient;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.render.item.weapon.sedna.ItemRenderWeaponBase;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MuzzleFlashPacket implements IMessage {
|
||||
|
||||
private int entityID;
|
||||
//private int gunIndex; //e.g. akimbo
|
||||
|
||||
public MuzzleFlashPacket() { }
|
||||
|
||||
//public MuzzleFlashPacket(EntityLivingBase entity) { this(entity, 0); }
|
||||
|
||||
public MuzzleFlashPacket(EntityLivingBase entity) {
|
||||
this.entityID = entity.getEntityId();
|
||||
//this.gunIndex = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(entityID);
|
||||
//buf.writeInt(gunIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.entityID = buf.readInt();
|
||||
//this.gunIndex = buf.readInt();
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<MuzzleFlashPacket, IMessage> {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IMessage onMessage(MuzzleFlashPacket m, MessageContext ctx) {
|
||||
EntityLivingBase entity = (EntityLivingBase) Minecraft.getMinecraft().theWorld.getEntityByID(m.entityID);
|
||||
if(entity == null || entity == Minecraft.getMinecraft().thePlayer) return null; //packets are sent to the player who fired
|
||||
ItemStack stack = entity.getHeldItem();
|
||||
if(stack == null) return null;
|
||||
|
||||
if(stack.getItem() instanceof ItemGunBaseNT) {
|
||||
ItemRenderWeaponBase.flashMap.put(entity, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.packet.toclient;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityBlastDoor;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@ -21,7 +22,9 @@ public class TEVaultPacket implements IMessage {
|
||||
long sysTime;
|
||||
int type;
|
||||
|
||||
public TEVaultPacket() { }
|
||||
public TEVaultPacket() {
|
||||
|
||||
}
|
||||
|
||||
public TEVaultPacket(int x, int y, int z, boolean isOpening, int state, long sysTime, int type) {
|
||||
this.x = x;
|
||||
@ -63,11 +66,23 @@ public class TEVaultPacket implements IMessage {
|
||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||
|
||||
try {
|
||||
if (te != null && te instanceof TileEntityVaultDoor) {
|
||||
|
||||
TileEntityVaultDoor vault = (TileEntityVaultDoor) te;
|
||||
vault.isOpening = m.isOpening;
|
||||
vault.state = m.state;
|
||||
if(m.sysTime == 1)
|
||||
vault.sysTime = System.currentTimeMillis();
|
||||
vault.type = m.type;
|
||||
}
|
||||
|
||||
if (te != null && te instanceof TileEntityBlastDoor) {
|
||||
|
||||
TileEntityBlastDoor vault = (TileEntityBlastDoor) te;
|
||||
vault.isOpening = m.isOpening;
|
||||
vault.state = m.state;
|
||||
if(m.sysTime == 1) vault.sysTime = System.currentTimeMillis();
|
||||
if(m.sysTime == 1)
|
||||
vault.sysTime = System.currentTimeMillis();
|
||||
}
|
||||
} catch (Exception x) {
|
||||
}
|
||||
|
||||
@ -21,17 +21,14 @@ import net.minecraft.world.World;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleGiblet extends EntityFX {
|
||||
|
||||
private static final ResourceLocation textureMeat = new ResourceLocation(RefStrings.MODID + ":textures/particle/meat.png");
|
||||
private static final ResourceLocation textureSlime = new ResourceLocation(RefStrings.MODID + ":textures/particle/slime.png");
|
||||
private static final ResourceLocation textureMetal = new ResourceLocation(RefStrings.MODID + ":textures/particle/metal.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/meat.png");
|
||||
|
||||
private TextureManager theRenderEngine;
|
||||
|
||||
private float momentumYaw;
|
||||
private float momentumPitch;
|
||||
private int gibType;
|
||||
|
||||
public ParticleGiblet(TextureManager texman, World world, double x, double y, double z, double mX, double mY, double mZ, int gibType) {
|
||||
public ParticleGiblet(TextureManager texman, World world, double x, double y, double z, double mX, double mY, double mZ) {
|
||||
super(world, x, y, z);
|
||||
this.motionX = mX;
|
||||
this.motionY = mY;
|
||||
@ -39,9 +36,6 @@ public class ParticleGiblet extends EntityFX {
|
||||
this.theRenderEngine = texman;
|
||||
this.particleMaxAge = 140 + rand.nextInt(20);
|
||||
this.particleGravity = 2F;
|
||||
this.gibType = gibType;
|
||||
|
||||
if(gibType == 2) this.particleGravity *= 2;
|
||||
|
||||
this.momentumYaw = (float) rand.nextGaussian() * 15F;
|
||||
this.momentumPitch = (float) rand.nextGaussian() * 15F;
|
||||
@ -63,9 +57,7 @@ public class ParticleGiblet extends EntityFX {
|
||||
this.rotationPitch += this.momentumPitch;
|
||||
this.rotationYaw += this.momentumYaw;
|
||||
|
||||
if(gibType == 2) return;
|
||||
|
||||
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(worldObj, posX, posY, posZ, 0, 0, 0, gibType == 1 ? Blocks.melon_block : Blocks.redstone_block, 0);
|
||||
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(worldObj, posX, posY, posZ, 0, 0, 0, Blocks.redstone_block, 0);
|
||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 20 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
@ -77,8 +69,7 @@ public class ParticleGiblet extends EntityFX {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
this.theRenderEngine.bindTexture(gibType == 2 ? textureMetal : gibType == 1 ? textureSlime : textureMeat);
|
||||
this.theRenderEngine.bindTexture(texture);
|
||||
|
||||
/* use this instead of EntityFX.interpPosN since interpPosN isn't set up correctly for the current tick for layer 3 particles */
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
@ -8,7 +8,6 @@ import java.util.Random;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
@ -70,9 +69,6 @@ public class ParticleSpentCasing extends EntityFX {
|
||||
this.motionY = my;
|
||||
this.motionZ = mz;
|
||||
|
||||
// i am at a loss for words as to what the fuck is going on here, but this is needed, stop asking, fuck you
|
||||
this.setPosition(x, y, z);
|
||||
|
||||
particleGravity = 1F;
|
||||
}
|
||||
|
||||
@ -132,26 +128,16 @@ public class ParticleSpentCasing extends EntityFX {
|
||||
|
||||
rotationPitch += momentumPitch;
|
||||
rotationYaw += momentumYaw;
|
||||
|
||||
if(Math.abs(prevRotationPitch - rotationPitch) > 180) {
|
||||
if(prevRotationPitch < rotationPitch) prevRotationPitch += 360;
|
||||
if(prevRotationPitch > rotationPitch) prevRotationPitch -= 360;
|
||||
}
|
||||
|
||||
if(Math.abs(prevRotationYaw - rotationYaw) > 180) {
|
||||
if(prevRotationYaw < rotationYaw) prevRotationYaw += 360;
|
||||
if(prevRotationYaw > rotationYaw) prevRotationYaw -= 360;
|
||||
}
|
||||
}
|
||||
|
||||
public void moveEntity(double motionX, double motionY, double motionZ) {
|
||||
this.worldObj.theProfiler.startSection("move");
|
||||
this.ySize *= 0.4F;
|
||||
|
||||
if(this.isInWeb) {
|
||||
if (this.isInWeb) {
|
||||
this.isInWeb = false;
|
||||
motionX *= 0.25D;
|
||||
motionY *= 0.05D;
|
||||
motionY *= 0.05000000074505806D;
|
||||
motionZ *= 0.25D;
|
||||
this.motionX = 0.0D;
|
||||
this.motionY = 0.0D;
|
||||
@ -165,7 +151,7 @@ public class ParticleSpentCasing extends EntityFX {
|
||||
|
||||
List list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(motionX, motionY, motionZ));
|
||||
|
||||
for(int i = 0; i < list.size(); ++i) {
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
motionY = ((AxisAlignedBB)list.get(i)).calculateYOffset(this.boundingBox, motionY);
|
||||
}
|
||||
|
||||
@ -173,13 +159,13 @@ public class ParticleSpentCasing extends EntityFX {
|
||||
|
||||
int j;
|
||||
|
||||
for(j = 0; j < list.size(); ++j) {
|
||||
for (j = 0; j < list.size(); ++j) {
|
||||
motionX = ((AxisAlignedBB)list.get(j)).calculateXOffset(this.boundingBox, motionX);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(motionX, 0.0D, 0.0D);
|
||||
|
||||
for(j = 0; j < list.size(); ++j) {
|
||||
for (j = 0; j < list.size(); ++j) {
|
||||
motionZ = ((AxisAlignedBB)list.get(j)).calculateZOffset(this.boundingBox, motionZ);
|
||||
}
|
||||
|
||||
@ -229,10 +215,6 @@ public class ParticleSpentCasing extends EntityFX {
|
||||
momentumYaw = (float) rand.nextGaussian() * 10F * this.config.getBounceYaw();
|
||||
}
|
||||
|
||||
if(this.config.getSound() != null && isCollidedVertically && Math.abs(initMoY) >= 0.2) {
|
||||
MainRegistry.proxy.playSoundClient(posX, posY, posZ, this.config.getSound(), this.config.PLINK_LARGE.equals(this.config.getSound()) ? 1F : 0.5F, 1F + this.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
this.worldObj.theProfiler.endSection();
|
||||
}
|
||||
|
||||
@ -280,8 +262,8 @@ public class ParticleSpentCasing extends EntityFX {
|
||||
|
||||
GL11.glScalef(dScale, dScale, dScale);
|
||||
|
||||
GL11.glRotatef(180 - (float) BobMathUtil.interp(prevRotationYaw, rotationYaw, interp), 0, 1, 0);
|
||||
GL11.glRotatef((float) -BobMathUtil.interp(prevRotationPitch, rotationPitch, interp), 1, 0, 0);
|
||||
GL11.glRotatef(180 - rotationYaw, 0, 1, 0);
|
||||
GL11.glRotatef(-rotationPitch, 1, 0, 0);
|
||||
|
||||
GL11.glScalef(config.getScaleX(), config.getScaleY(), config.getScaleZ());
|
||||
|
||||
|
||||
@ -23,7 +23,8 @@ public class SpentCasing implements Cloneable {
|
||||
public enum CasingType {
|
||||
STRAIGHT("Straight"),
|
||||
BOTTLENECK("Bottleneck"),
|
||||
SHOTGUN("Shotgun", "ShotgunCase"); //plastic shell, brass case
|
||||
SHOTGUN("Shotgun", "ShotgunCase"), //plastic shell, brass case
|
||||
AR2("AR2", "AR2Highlight"); //plug, back detailing
|
||||
|
||||
public final String[] partNames;
|
||||
|
||||
@ -43,19 +44,8 @@ public class SpentCasing implements Cloneable {
|
||||
private float bouncePitch = 1F;
|
||||
private int maxAge = 240;
|
||||
|
||||
public static final String PLINK_SHELL = "hbm:weapon.casing.shell";
|
||||
public static final String PLINK_SMALL = "hbm:weapon.casing.small";
|
||||
public static final String PLINK_MEDIUM = "hbm:weapon.casing.medium";
|
||||
public static final String PLINK_LARGE = "hbm:weapon.casing.large";
|
||||
|
||||
public SpentCasing(CasingType type) {
|
||||
this.type = type;
|
||||
|
||||
if(type == CasingType.SHOTGUN) {
|
||||
this.setSound(PLINK_SHELL);
|
||||
} else {
|
||||
this.setSound(PLINK_SMALL);
|
||||
}
|
||||
}
|
||||
|
||||
/** Separated from the ctor to allow for easy creation of new casings from templates that don't need to be registered */
|
||||
@ -66,15 +56,16 @@ public class SpentCasing implements Cloneable {
|
||||
}
|
||||
|
||||
public SpentCasing setScale(float scale) {
|
||||
return setScale(scale, scale, scale);
|
||||
this.scaleX = scale;
|
||||
this.scaleY = scale;
|
||||
this.scaleZ = scale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SpentCasing setScale(float x, float y, float z) {
|
||||
this.scaleX = x;
|
||||
this.scaleY = y;
|
||||
this.scaleZ = z;
|
||||
if(x * y * z >= 3 && this.type != CasingType.SHOTGUN) this.setSound(PLINK_MEDIUM);
|
||||
if(x * y * z >= 100 && this.type != CasingType.SHOTGUN) this.setSound(PLINK_LARGE);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@ -32,34 +32,6 @@ public class CasingCreator implements IParticleCreator {
|
||||
composeEffect(world, player, frontOffset, heightOffset, sideOffset, frontMotion, heightMotion, sideMotion, motionVariance, 5F, 10F, casing, false, 0, 0, 0);
|
||||
}
|
||||
|
||||
public static void composeEffect(World world, double x, double y, double z, float yaw, float pitch, double frontMotion, double heightMotion, double sideMotion, double motionVariance, float mPitch, float mYaw, String casing, boolean smoking, int smokeLife, double smokeLift, int nodeLife) {
|
||||
|
||||
Vec3 motion = Vec3.createVectorHelper(sideMotion, heightMotion, frontMotion);
|
||||
motion.rotateAroundX(-pitch / 180F * (float) Math.PI);
|
||||
motion.rotateAroundY(-yaw / 180F * (float) Math.PI);
|
||||
|
||||
double mX = motion.xCoord + world.rand.nextGaussian() * motionVariance;
|
||||
double mY = motion.yCoord + world.rand.nextGaussian() * motionVariance;
|
||||
double mZ = motion.zCoord + world.rand.nextGaussian() * motionVariance;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "casingNT");
|
||||
data.setDouble("mX", mX);
|
||||
data.setDouble("mY", mY);
|
||||
data.setDouble("mZ", mZ);
|
||||
data.setFloat("yaw", yaw);
|
||||
data.setFloat("pitch", pitch);
|
||||
data.setFloat("mPitch", mPitch);
|
||||
data.setFloat("mYaw", mYaw);
|
||||
data.setString("name", casing);
|
||||
data.setBoolean("smoking", smoking);
|
||||
data.setInteger("smokeLife", smokeLife);
|
||||
data.setDouble("smokeLift", smokeLift);
|
||||
data.setInteger("nodeLife", nodeLife);
|
||||
|
||||
IParticleCreator.sendPacket(world, x, y, z, 50, data);
|
||||
}
|
||||
|
||||
public static void composeEffect(World world, EntityLivingBase player, double frontOffset, double heightOffset, double sideOffset, double frontMotion, double heightMotion, double sideMotion, double motionVariance, float mPitch, float mYaw, String casing, boolean smoking, int smokeLife, double smokeLift, int nodeLife) {
|
||||
|
||||
if(player.isSneaking()) heightOffset -= 0.075F;
|
||||
|
||||
@ -135,7 +135,7 @@ public class BusAnimationSequence {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(millis >= endTime || currentFrame.duration == 0) {
|
||||
if(millis >= endTime) {
|
||||
transform[i] = currentFrame.value;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.render.anim;
|
||||
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.util.Clock;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -8,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@NotableComments
|
||||
public class HbmAnimations {
|
||||
|
||||
//in flans mod and afaik also MW, there's an issue that there is only one
|
||||
@ -20,7 +18,6 @@ public class HbmAnimations {
|
||||
//animation is playing, though this will cancel the animation entirely.
|
||||
public static final Animation[][] hotbar = new Animation[9][8]; //now with 8 parallel rails per slot! time to get railed!
|
||||
|
||||
/** Keyframe-based animation system primarily used for guns, not to be confused with Drillgon's animloader system. */
|
||||
public static class Animation {
|
||||
|
||||
//the "name" of the animation slot. if the item has a different key than
|
||||
|
||||
@ -25,7 +25,6 @@ public class ItemRenderLibrary {
|
||||
public static HashMap<Item, ItemRenderBase> renderers = new HashMap();
|
||||
|
||||
public static void init() {
|
||||
ItemRenderLibraryDoors.init();
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.obj_tester), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
@ -595,6 +594,154 @@ public class ItemRenderLibrary {
|
||||
bindTexture(ResourceManager.satdock_tex); ResourceManager.satDock.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.vault_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.vault_cog_tex); ResourceManager.vault_cog.renderAll();
|
||||
bindTexture(ResourceManager.vault_label_101_tex); ResourceManager.vault_label.renderAll();
|
||||
}});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.secure_access_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(2.4, 2.4, 2.4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.secure_access_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.secure_access_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.large_vehicle_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(1.8, 1.8, 1.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.large_vehicle_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.large_vehicle_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.water_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(4, 4, 4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.water_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.water_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(2, 2, 2);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -1.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 1.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch_large), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_large_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -2.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 2.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.qe_containment), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.5, 0);
|
||||
GL11.glScaled(3.8, 3.8, 3.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.qe_containment_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.qe_containment.renderAllExcept("decal");
|
||||
bindTexture(ResourceManager.qe_containment_decal);
|
||||
ResourceManager.qe_containment.renderPart("decal");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.qe_sliding_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.5, 0);
|
||||
GL11.glScaled(6, 6, 6);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.qe_sliding_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.qe_sliding_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.round_airlock_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.round_airlock_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.round_airlock_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.sliding_seal_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(7, 7, 7);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.sliding_seal_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.sliding_seal_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.blast_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.blast_door_base_tex); ResourceManager.blast_door_base.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_tooth_tex); ResourceManager.blast_door_tooth.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_slider_tex); ResourceManager.blast_door_slider.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_block_tex); ResourceManager.blast_door_block.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_microwave), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 4);
|
||||
|
||||
@ -1,229 +0,0 @@
|
||||
package com.hbm.render.item;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.util.Clock;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
// the ItemRenderLibrary system sucks and is ugly as hell but it's the quickest way of doing it
|
||||
// due to the sheer size if this stupid fucking class i just janked this part out into its own thing
|
||||
// that way, code hotswap doesn't take 5 years to work while vomitting out error messages like
|
||||
// i vomitted out that 20 pack of soggy chicken nuggets last year
|
||||
// still a better use of €15 than hollow knight
|
||||
@NotableComments
|
||||
public class ItemRenderLibraryDoors {
|
||||
|
||||
public static void init() {
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.vault_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
int index = (int) ((Clock.get_ms() % (DoorDecl.VAULT_DOOR.getSkinCount() * 1000)) / 1000);
|
||||
|
||||
ResourceLocation doorTex = ResourceManager.pheo_vault_door_3;
|
||||
ResourceLocation labelTex = ResourceManager.pheo_label_101;
|
||||
|
||||
switch(index) {
|
||||
case 1: labelTex = ResourceManager.pheo_label_87; break;
|
||||
case 2: labelTex = ResourceManager.pheo_label_106; break;
|
||||
case 3: doorTex = ResourceManager.pheo_vault_door_4; labelTex = ResourceManager.pheo_label_81; break;
|
||||
case 4: doorTex = ResourceManager.pheo_vault_door_4; labelTex = ResourceManager.pheo_label_111; break;
|
||||
case 5: doorTex = ResourceManager.pheo_vault_door_s; labelTex = ResourceManager.pheo_label_2; break;
|
||||
case 6: doorTex = ResourceManager.pheo_vault_door_s; labelTex = ResourceManager.pheo_label_99; break;
|
||||
}
|
||||
|
||||
bindTexture(doorTex);
|
||||
ResourceManager.pheo_vault_door.renderPart("Door");
|
||||
bindTexture(labelTex);
|
||||
ResourceManager.pheo_vault_door.renderPart("Label");
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.secure_access_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.75, 0);
|
||||
GL11.glScaled(2.4, 2.4, 2.4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.SECURE_ACCESS_DOOR.getCyclingSkins());
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_secure_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.fire_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.FIRE_DOOR.getCyclingSkins());
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_fire_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.sliding_blast_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2.75, 0);
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_blast_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_blast_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.large_vehicle_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(1.8, 1.8, 1.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_vehicle_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_vehicle_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.water_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(4, 4, 4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_water_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_water_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(2, 2, 2);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -1.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 1.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch_large), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_large_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -2.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 2.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.qe_containment), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.5, 0);
|
||||
GL11.glScaled(3.8, 3.8, 3.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_containment_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_containment_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.qe_sliding_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_sliding_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_sliding_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.round_airlock_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.75, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.ROUND_AIRLOCK_DOOR.getCyclingSkins());
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_airlock_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.sliding_seal_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(7, 7, 7);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_seal_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_seal_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.blast_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.blast_door_base_tex); ResourceManager.blast_door_base.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_tooth_tex); ResourceManager.blast_door_tooth.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_slider_tex); ResourceManager.blast_door_slider.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_block_tex); ResourceManager.blast_door_block.renderAll();
|
||||
}});
|
||||
}
|
||||
|
||||
private static void bindTexture(ResourceLocation res) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(res);
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,6 @@ import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
@ -195,7 +194,7 @@ public class ItemRenderAberrator extends ItemRenderWeaponBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type, Object... data) {
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
@ -209,34 +208,6 @@ public class ItemRenderAberrator extends ItemRenderWeaponBase {
|
||||
ResourceManager.aberrator.renderPart("Slide");
|
||||
ResourceManager.aberrator.renderPart("Sight");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(type == ItemRenderType.EQUIPPED) {
|
||||
EntityLivingBase ent = (EntityLivingBase) data[1];
|
||||
long shot;
|
||||
double shotRand = 0;
|
||||
if(ent == Minecraft.getMinecraft().thePlayer) {
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
shot = gun.lastShot[0];
|
||||
shotRand = gun.shotRand;
|
||||
} else {
|
||||
shot = ItemRenderWeaponBase.flashMap.getOrDefault(ent, (long) -1);
|
||||
if(shot < 0) return;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2, 4);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * shotRand, 1, 0, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderMuzzleFlash(shot, 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2, -1.5);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
this.renderFireball(shot);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderFireball(long lastShot) {
|
||||
@ -247,7 +218,6 @@ public class ItemRenderAberrator extends ItemRenderWeaponBase {
|
||||
if(System.currentTimeMillis() - lastShot < flash) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
double fire = (System.currentTimeMillis() - lastShot) / (double) flash;
|
||||
@ -274,7 +244,6 @@ public class ItemRenderAberrator extends ItemRenderWeaponBase {
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@ import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderAm180 extends ItemRenderWeaponBase {
|
||||
@ -148,7 +147,7 @@ public class ItemRenderAm180 extends ItemRenderWeaponBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type, Object... data) {
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
@ -160,30 +159,6 @@ public class ItemRenderAm180 extends ItemRenderWeaponBase {
|
||||
ResourceManager.am180.renderPart("Mag");
|
||||
ResourceManager.am180.renderPart("MagPlate");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(type == ItemRenderType.EQUIPPED) {
|
||||
EntityLivingBase ent = (EntityLivingBase) data[1];
|
||||
long shot;
|
||||
double shotRand = 0;
|
||||
if(ent == Minecraft.getMinecraft().thePlayer) {
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
shot = gun.lastShot[0];
|
||||
shotRand = gun.shotRand;
|
||||
} else {
|
||||
shot = ItemRenderWeaponBase.flashMap.getOrDefault(ent, (long) -1);
|
||||
if(shot < 0) return;
|
||||
}
|
||||
boolean silenced = this.hasSilencer(stack);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.875, silenced ? 16.75 : 12);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * shotRand, 1, 0, 0);
|
||||
double flashScale = silenced ? 0.5 : 0.75;
|
||||
GL11.glScaled(flashScale, flashScale, flashScale);
|
||||
this.renderMuzzleFlash(shot, silenced ? 75 : 50, silenced ? 5 : 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasSilencer(ItemStack stack) {
|
||||
|
||||
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