hawk tuah 2: eagle tuah

This commit is contained in:
Boblet 2024-12-05 16:33:13 +01:00
parent 938d9935bf
commit 096c4f4941
48 changed files with 186 additions and 3926 deletions

View File

@ -19,7 +19,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockOreBasalt extends BlockEnumMulti {

View File

@ -101,87 +101,10 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.turret_sentry, 1), new Object[] { "PPL", " MD", " SC", 'P', STEEL.plate(), 'M', ModItems.motor, 'L', ModItems.mechanism_rifle_1, 'S', ModBlocks.steel_scaffold, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'D', ModItems.crt_display });
//Guns
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', STEEL.shell(), 'W', IRON.plate(), 'M', ModItems.mechanism_launcher_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_karl, 1), new Object[] { "SSW", " MW", 'S', STEEL.shell(), 'W', ALLOY.plate(), 'M', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', STEEL.shell(), 'I', IRON.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', STEEL.bolt() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', AL.wireFine(), 'M', ModItems.mechanism_revolver_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_saturnite, 1), new Object[] { "SSM", " RW", 'S', BIGMT.plate(), 'W', KEY_PLANKS, 'R', W.wireFine(), 'M', ModItems.mechanism_revolver_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_gold, 1), new Object[] { "SSM", " RW", 'S', GOLD.plate(), 'W', W.ingot(), 'R', GOLD.wireFine(), 'M', ModItems.mechanism_revolver_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_schrabidium, 1), new Object[] { "SSM", " RW", 'S', SA326.block(), 'W', W.ingot(), 'R', SA326.wireFine(), 'M', ModItems.mechanism_special });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_pip, 1), new Object[] { " G ", "SSP", " TI", 'G', KEY_ANYPANE, 'S', STEEL.plate(), 'P', ModItems.mechanism_revolver_2, 'T', W.wireFine(), 'I', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nopip, 1), new Object[] { "SSP", " TI", 'S', STEEL.plate(), 'P', ModItems.mechanism_revolver_2, 'T', W.wireFine(), 'I', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_blackjack, 1), new Object[] { "SSP", " TI", 'S', STEEL.plate(), 'P', ModItems.mechanism_revolver_2, 'T', W.wireFine(), 'I', KEY_PLANKS });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_silver, 1), new Object[] { "SSP", " TI", 'S', AL.plate(), 'P', ModItems.mechanism_revolver_2, 'T', W.wireFine(), 'I', KEY_PLANKS });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_red, 1), new Object[] { "R ", " B", 'R', ModItems.key_red, 'B', ModItems.gun_revolver_blackjack });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_deagle, 1), new Object[] { "PPM", " BI", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'I', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uac_pistol, 1), new Object[] { "IIM", " BI", 'B', DURA.bolt(), 'I', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'R', MINGRADE.wireFine(), 'T', TI.plate(), 'M', ModItems.mechanism_revolver_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare, 1), new Object[] { "SEM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', AL.wireFine(), 'E', ModItems.powder_power, 'M', ModItems.mechanism_revolver_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare2, 1), new Object[] { "SSM", "RRW", 'S', OreDictManager.getReflector(), 'W', W.ingot(), 'R', GOLD.wireFine(), 'M', ModItems.mechanism_special });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bio_revolver, 1), new Object[] { "SSM", "BTW", 'S', STEEL.plate(), 'M', ModItems.mechanism_revolver_2, 'B', B.ingot(), 'T', W.bolt(), 'W', KEY_LOG });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_chemthrower, 1), new Object[] { "RWC", "HHT", "RLC", 'R', RUBBER.ingot(), 'W', ModItems.wrench, 'C', CU.plate(), 'H', STEEL.shell(), 'T', ModItems.tank_steel, 'L', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', STEEL.plate(), 'L', PB.plate(), 'W', GOLD.wireFine(), 'F', ModItems.gun_fatman });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ANY_RUBBER.ingot(), 'L', ModItems.plate_desh, 'W', W.wireFine(), 'F', ModItems.gun_fatman });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke, 1, AmmoFatman.BALEFIRE.ordinal()), new Object[] { " S ", "EBE", " S ", 'S', STEEL.shell(), 'E', ModItems.powder_power, 'B', ModItems.egg_balefire_shard });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mp40, 1), new Object[] { "IIM", " SW", " S ", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'W', KEY_PLANKS, 'M', ModItems.mechanism_rifle_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_thompson, 1), new Object[] { "IIM", " SW", " S ", 'S', IRON.plate(), 'I', STEEL.plate(), 'W', KEY_PLANKS, 'M', ModItems.mechanism_rifle_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_flechette, 1), new Object[] { "PPM", "TIS", "G ", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_2, 'T', STEEL.shell(), 'I', STEEL.ingot(), 'S', ANY_PLASTIC.ingot(), 'G', ModItems.mechanism_launcher_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uboinik, 1), new Object[] { "IIM", "SPW", 'P', STEEL.plate(), 'I', STEEL.ingot(), 'W', KEY_PLANKS, 'S', KEY_STICK, 'M', ModItems.mechanism_revolver_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_supershotgun, 1), new Object[] { "BBM", "BBM", "AWL", 'B', STEEL.pipe(), 'M', ModItems.mechanism_rifle_2, 'A', ModItems.plate_dalekanium, 'W', GOLD.wireFine(), 'L', KEY_LOG });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_ks23, 1), new Object[] { "PPM", "SWL", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'W', W.wireFine(), 'L', KEY_LOG });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.gun_sauer, 1), new Object[] { ModItems.ducttape, ModItems.gun_ks23, Blocks.lever, ModItems.gun_ks23 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', STEEL.plate(), 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_natural_uranium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", "SRS", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_uranium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 20), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', ModItems.waste_plate_u235 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', ModItems.waste_u235 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', STEEL.plate(), 'R', U238.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', STEEL.plate(), 'R', U238.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_osipr, 1), new Object[] { "CCT", "WWI", "MCC", 'C', CMB.plate(), 'T', W.ingot(), 'W', MAGTUNG.wireFine(), 'I', ModItems.mechanism_rifle_2, 'M', ModItems.coil_magnetized_tungsten });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_immolator, 1), new Object[] { "WCC", "PMT", "WAA", 'W', GOLD.wireFine(), 'C', CU.plate(), 'P', ALLOY.plate(), 'M', ModItems.mechanism_launcher_1, 'T', ModItems.tank_steel, 'A', STEEL.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_immolator_ammo, 16), new Object[] { "SPS", "PCP", "SPS", 'S', STEEL.plate(), 'C', COAL.dust(), 'P', P_RED.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_immolator_ammo, 16), new Object[] { " F ", "SFS", " F ", 'S', STEEL.plate(), 'F', Fluids.DIESEL.getDict(1000) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_immolator_ammo, 24), new Object[] { " F ", "SFS", " F ", 'S', STEEL.plate(), 'F', ModItems.canister_napalm });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_cryolator, 1), new Object[] { "SSS", "IWL", "LMI", 'S', STEEL.plate(), 'I', IRON.plate(), 'L', Items.leather, 'M', ModItems.mechanism_launcher_1, 'W', AL.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_cryolator_ammo, 16), new Object[] { "SPS", "PCP", "SPS", 'S', STEEL.plate(), 'C', KNO.dust(), 'P', Items.snowball });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_cryolator_ammo, 16), new Object[] { " F ", "SFS", " F ", 'S', STEEL.plate(), 'F', ModItems.powder_ice });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mp, 1), new Object[] { "EEE", "SSM", "III", 'E', EUPH.ingot(), 'S', STEEL.plate(), 'I', STEEL.ingot(), 'M', ModItems.mechanism_rifle_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_emp, 1), new Object[] { "CPG", "CMF", "CPI", 'C', ModItems.coil_copper, 'P', PB.plate(), 'G', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'M', ModItems.magnetron, 'I', W.ingot(), 'F', ModItems.mechanism_special });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_emp_ammo, 8), new Object[] { "IGI", "IPI", "IPI", 'G', GOLD.plate(), 'I', IRON.plate(), 'P', ModItems.powder_power });
//CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_jack, 1), new Object[] { "WW ", "TSD", " TT", 'W', "ingotWeidanium", 'T', ModItems.toothpicks, 'S', ModItems.gun_uboinik, 'D', ModItems.ducttape });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.gun_jack_ammo, 1), new Object[] { ModItems.ammo_12gauge, ModItems.ammo_12gauge, ModItems.ammo_12gauge, ModItems.ammo_12gauge });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_euthanasia, 1), new Object[] { "TDT", "AAS", " T ", 'A', AUSTRALIUM.ingot(), 'T', ModItems.toothpicks, 'S', ModItems.gun_mp40, 'D', ModItems.ducttape });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_euthanasia_ammo, 12), new Object[] { "P", "S", "N", 'P', ModItems.powder_poison, 'N', KNO.dust(), 'S', ModItems.syringe_metal_empty });
//CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spark, 1), new Object[] { "TTD", "AAS", " T", 'A', "ingotDaffergon", 'T', ModItems.toothpicks, 'S', ModItems.gun_rpg, 'D', ModItems.ducttape });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spark_ammo, 4), new Object[] { "PCP", "DDD", "PCP", 'P', PB.plate(), 'C', ModItems.coil_gold, 'D', ModItems.powder_power });
//CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_skystinger, 1), new Object[] { "TTT", "AAS", " D ", 'A', "ingotUnobtainium", 'T', ModItems.toothpicks, 'S', ModItems.gun_stinger, 'D', ModItems.ducttape });
//CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hp, 1), new Object[] { "TDT", "ASA", " T ", 'A', "ingotReiium", 'T', ModItems.toothpicks, 'S', ModItems.gun_xvl1456, 'D', ModItems.ducttape });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hp_ammo, 8), new Object[] { " R ", "BSK", " Y ", 'S', STEEL.plate(), 'K', KEY_BLACK, 'R', KEY_RED, 'B', KEY_BLUE, 'Y', KEY_YELLOW });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_defabricator_ammo, 16), new Object[] { "PCP", "DDD", "PCP", 'P', STEEL.plate(), 'C', ModItems.coil_copper, 'D', LI.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lever_action, 1), new Object[] { "PPI", "SWD", 'P', IRON.plate(), 'I', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'D', KEY_PLANKS, 'W', STEEL.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lever_action_dark, 1), new Object[] { "PPI", "SWD", 'P', STEEL.plate(), 'I', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'D', KEY_PLANKS, 'W', STEEL.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bolt_action, 1), new Object[] { "PPI", "SWD", 'P', STEEL.plate(), 'I', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'D', KEY_PLANKS, 'W', CU.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bolt_action_green, 1), new Object[] { "PPI", "SWD", 'P', IRON.plate(), 'I', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'D', KEY_PLANKS, 'W', CU.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bolt_action_saturnite, 1), new Object[] { "PPI", "SWD", 'P', BIGMT.plate(), 'I', ModItems.mechanism_rifle_1, 'S', KEY_STICK, 'D', KEY_PLANKS, 'W', W.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b92), new Object[] { "DDD", "SSC", " R", 'D', ModItems.plate_dineutronium, 'S', STAR.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'R', ModItems.gun_revolver_schrabidium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b93), new Object[] { "PCE", "SEB", "PCE", 'P', ModItems.plate_dineutronium, 'C', ModItems.weaponized_starblaster_cell, 'E', ModItems.component_emitter, 'B', ModItems.gun_b92, 'S', ModItems.singularity_spark });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b92), new Object[] { "DDD", "SSC", " R", 'D', ModItems.plate_dineutronium, 'S', STAR.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'R', ModItems.gun_lasrifle });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b92_ammo, 1), new Object[] { "PSP", "ESE", "PSP", 'P', STEEL.plate(), 'S', STAR.ingot(), 'E', ModItems.powder_spark_mix });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.weaponized_starblaster_cell, 1), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.PEROXIDE.getID()), GunB92Cell.getFullCell(), CU.wireFine() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_silencer, 1), new Object[] { "P ", " P ", " U", 'P', ANY_PLASTIC.ingot(), 'U', ModItems.gun_uzi });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_saturnite, 1), new Object[] { "SMS", " PB", " P ", 'S', BIGMT.ingot(), 'M', ModItems.mechanism_rifle_2, 'P', BIGMT.plate(), 'B', W.bolt() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_saturnite_silencer, 1), new Object[] { "P ", " P ", " U", 'P', ANY_PLASTIC.ingot(), 'U', ModItems.gun_uzi_saturnite });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bolter, 1), new Object[] { "SSM", "PIP", " I ", 'S', BIGMT.plate(), 'I', BIGMT.ingot(), 'M', ModItems.mechanism_special, 'P', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_calamity, 1), new Object[] { " PI", "BBM", " PI", 'P', IRON.plate(), 'B', STEEL.pipe(), 'M', ModItems.mechanism_rifle_1, 'I', STEEL.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_m2, 1), new Object[] { " PI", "BBM", " PI", 'P', STEEL.plate(), 'B', STEEL.pipe(), 'M', ModItems.mechanism_rifle_2, 'I', STEEL.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lacunae, 1), new Object[] { "TIT", "ILI", "PRP", 'T', ModItems.syringe_taint, 'I', STAR.ingot(), 'L', ModItems.gun_minigun, 'P', ModItems.pellet_rtg, 'R', ModBlocks.machine_rtg_grey });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mymy, 1), new Object[] { "PP ", " WP", 'P', ANY_RUBBER.ingot(), 'W', STEEL.wireFine() });
//CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_darter, 1), new Object[] { "SST", " P", 'S', STEEL.plate(), 'T', ModItems.gas_empty, 'P', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fireext, 1), new Object[] { "HB", " T", 'H', STEEL.pipe(), 'B', STEEL.bolt(), 'T', ModItems.tank_steel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', STEEL.bolt(), 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', STEEL.pipe(), 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_glass_cannon, 1), new Object[] { "GGC", "GTM", 'G', Item.getItemFromBlock(ModBlocks.glass_quartz), 'C', ModItems.battery_lithium_cell, 'T', ModItems.crt_display, 'M', ModItems.mechanism_special });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_remington, 1), new Object[] { "PPM", "S L", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_SLAB, 'L', KEY_LOG });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_benelli), new Object[] { "HHP", "SSM", "AAP", 'H', ModItems.ingot_dura_steel, 'S', STEEL.pipe(), 'A', AL.pipe(), 'P', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lunatic_marksman), new Object[] { " GN", "SSM", " A", 'G', KEY_ANYPANE, 'N', ModItems.powder_nitan_mix, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'A', ANY_RESISTANTALLOY.plateCast() });
//TODO: somehow add more variance, 4 gauge is still missing
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_22lr, 16), new Object[] { ModItems.nitra_small });
@ -239,15 +162,6 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_762, 1), " I", "GC", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_luna, 1), new Object[] { " B ", "GCG", "GPG", 'B', FERRO.ingot(), 'G', ModItems.powder_nitan_mix, 'C', ModItems.casing_50, 'P', ModItems.powder_power});
//Folly shells
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet, 1), new Object[] { " S ", "STS", "SMS", 'S', STAR.ingot(), 'T', ModItems.powder_magic, 'M', ModBlocks.block_meteor });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.ammo_nuke, 'U', IRON.ingot(), 'T', W.block() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet_du, 1), new Object[] { " U ", "UDU", "UTU", 'U', U238.block(), 'D', DESH.block(), 'T', W.block() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_shell, 1), new Object[] { "IPI", "IPI", "IMI", 'I', IRON.ingot(), 'P', IRON.plate(), 'M', ANY_SMOKELESS.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly, 1), new Object[] { " B ", "MEM", " S ", 'B', ModItems.folly_bullet, 'M', ModItems.powder_magic, 'E', ModItems.powder_power, 'S', ModItems.folly_shell });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_nuclear, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_nuclear, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_du, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
//Rockets
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { "T", "C", "G", 'T', ModItems.ball_dynamite, 'G', ModItems.rocket_fuel, 'C', STEEL.shell() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { "T", "C", "G", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', STEEL.shell() });

View File

@ -61,6 +61,22 @@ public class EntityBulletBaseMK4 extends EntityThrowableInterp {
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.0F, this.config.spread + gunSpread);
}
/** For turrets - angles are in radians, andp itch is negative! */
public EntityBulletBaseMK4(World world, BulletConfig config, float baseDamage, float gunSpread, float yaw, float pitch) {
this(world);
this.setBulletConfig(config);
this.damage = baseDamage * this.config.damageMult;
this.prevRotationYaw = this.rotationYaw = yaw * 180F / (float) Math.PI;
this.prevRotationPitch = this.rotationPitch = -pitch * 180F / (float) Math.PI;
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.0F, this.config.spread + gunSpread);
}
@Override
protected void entityInit() {

View File

@ -9,13 +9,11 @@ import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.AmmoDart;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.ItemGunDart;
import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.main.MainRegistry;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -100,28 +98,6 @@ public class GunDartFactory {
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(Potion.wither.id, 60 * 20, 2));
bullet.bntHurt = (bulletnt, hit) -> {
if(bulletnt.worldObj.isRemote)
return;
if(hit instanceof EntityPlayer) {
if(((EntityPlayer) hit).inventory.hasItem(ModItems.ingot_meteorite_forged))
return;
if(bulletnt.getThrower() instanceof EntityPlayer) {
EntityPlayer shooter = (EntityPlayer) bulletnt.getThrower();
if(shooter.getHeldItem() != null && shooter.getHeldItem().getItem() == ModItems.gun_darter) {
ItemGunDart.writePlayer(shooter.getHeldItem(), (EntityPlayer) hit);
shooter.playSound("random.orb", 1.0F, 1.0F);
}
}
}
};
return bullet;
}

View File

@ -620,11 +620,6 @@ public class ModItems {
public static Item casing;
public static Item folly_shell;
public static Item folly_bullet;
public static Item folly_bullet_nuclear;
public static Item folly_bullet_du;
public static Item wiring_red_copper;
public static Item shell;
public static Item pipe;
@ -784,7 +779,6 @@ public class ModItems {
public static Item pellet_rtg_actinium;
public static Item pellet_rtg_polonium;
public static Item pellet_rtg_americium;
public static Item pellet_rtg_berkelium;
public static Item pellet_rtg_gold;
public static Item pellet_rtg_lead;
@ -1494,9 +1488,6 @@ public class ModItems {
public static Item ammo_cell;
public static Item ammo_folly;
public static Item ammo_folly_nuclear;
public static Item ammo_folly_du;
public static Item ammo_dgk;
public static Item ammo_arty;
public static Item ammo_himars;
@ -3031,10 +3022,6 @@ public class ModItems {
assembly_lacunae = new Item().setUnlocalizedName("assembly_lacunae").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_lacunae");
assembly_nuke = new Item().setUnlocalizedName("assembly_nuke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nuke");
assembly_luna = new Item().setUnlocalizedName("assembly_luna").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_luna");
folly_shell = new Item().setUnlocalizedName("folly_shell").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_shell");
folly_bullet = new Item().setUnlocalizedName("folly_bullet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet");
folly_bullet_nuclear = new Item().setUnlocalizedName("folly_bullet_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet_nuclear");
folly_bullet_du = new Item().setUnlocalizedName("folly_bullet_du").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet_du");
casing = new ItemEnumMulti(ItemEnums.EnumCasingType.class, true, true).setUnlocalizedName("casing").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":casing");
wiring_red_copper = new ItemWiring().setUnlocalizedName("wiring_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wiring_red_copper");
@ -3048,7 +3035,6 @@ public class ModItems {
pellet_rtg_cobalt = new ItemRTGPellet(15).setDecays(DepletedRTGMaterial.NICKEL, (long) (RTGUtil.getLifespan(5.3F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg_cobalt").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_cobalt");
pellet_rtg_actinium = new ItemRTGPellet(20).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(21.8F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg_actinium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_actinium");
pellet_rtg_americium = new ItemRTGPellet(20).setDecays(DepletedRTGMaterial.NEPTUNIUM, (long) (RTGUtil.getLifespan(4.7F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_americium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_americium");
pellet_rtg_berkelium = new ItemRTGPellet(20).setUnlocalizedName("pellet_rtg_berkelium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_berkelium");
pellet_rtg_polonium = new ItemRTGPellet(50).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(138.0F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_polonium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_polonium");
pellet_rtg_gold = new ItemRTGPellet(VersatileConfig.rtgDecay() ? 200 : 100).setDecays(DepletedRTGMaterial.MERCURY, (long) (RTGUtil.getLifespan(2.7F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_gold").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_gold");
pellet_rtg_lead = new ItemRTGPellet(VersatileConfig.rtgDecay() ? 600 : 200).setDecays(DepletedRTGMaterial.BISMUTH, (long) (RTGUtil.getLifespan(0.3F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_lead").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_lead");
@ -4038,94 +4024,89 @@ public class ModItems {
ammo_stinger_rocket = new ItemAmmo(AmmoStinger.class).setUnlocalizedName("ammo_stinger_rocket");
ammo_luna_sniper = new ItemAmmo(AmmoLunaticSniper.class).setUnlocalizedName("ammo_luna_sniper");
ammo_misc = new ItemAmmo(AmmoMisc.class).setUnlocalizedName("ammo_misc");
ammo_folly = new ItemCustomLore().setUnlocalizedName("ammo_folly");
ammo_folly_nuclear = new ItemCustomLore().setUnlocalizedName("ammo_folly_nuclear");
ammo_folly_du = new ItemCustomLore().setUnlocalizedName("ammo_folly_du");
ammo_arty = new ItemAmmoArty().setUnlocalizedName("ammo_arty");
ammo_himars = new ItemAmmoHIMARS().setUnlocalizedName("ammo_himars");
gun_rpg = new ItemGunBase(GunRocketFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
gun_karl = new ItemGunBase(GunRocketFactory.getKarlConfig()).setUnlocalizedName("gun_karl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_karl");
gun_panzerschreck = new ItemGunBase(GunRocketFactory.getPanzConfig()).setUnlocalizedName("gun_panzerschreck").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_panzerschreck");
gun_hk69 = new ItemGunBase(GunGrenadeFactory.getHK69Config()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
//gun_congolake = new ItemGunBase(GunGrenadeFactory.getCongoConfig()).setUnlocalizedName("gun_congolake").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_congolake");
gun_skystinger = new ItemGunBase(GunRocketHomingFactory.getSkyStingerConfig()).setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
gun_revolver = new ItemGunBase(Gun357MagnumFactory.getRevolverConfig()).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
gun_revolver_saturnite = new ItemGunBase(Gun357MagnumFactory.getRevolverSaturniteConfig()).setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite");
gun_revolver_gold = new ItemGunBase(Gun357MagnumFactory.getRevolverGoldConfig()).setUnlocalizedName("gun_revolver_gold").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_gold");
gun_revolver_schrabidium = new ItemGunBase(Gun357MagnumFactory.getRevolverSchrabidiumConfig()).setUnlocalizedName("gun_revolver_schrabidium").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_schrabidium");
gun_revolver_cursed = new ItemGunBase(Gun357MagnumFactory.getRevolverCursedConfig()).setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed");
gun_revolver_nightmare = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmareConfig()).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
gun_revolver_nightmare2 = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmare2Config()).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
gun_revolver_pip = new ItemGunPip(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
gun_revolver_nopip = new ItemGunBase(Gun44MagnumFactory.getNovacConfig()).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
gun_revolver_blackjack = new ItemGunBase(Gun44MagnumFactory.getBlackjackConfig()).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
gun_revolver_silver = new ItemGunBase(Gun44MagnumFactory.getSilverConfig()).setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
gun_revolver_red = new ItemGunBase(Gun44MagnumFactory.getRedConfig()).setUnlocalizedName("gun_revolver_red").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_red");
gun_deagle = new ItemGunBase(Gun50AEFactory.getDeagleConfig()).setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_deagle");
gun_bio_revolver = new ItemGunBio(Gun357MagnumFactory.getRevolverBioConfig()).setUnlocalizedName("gun_bio_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bio_revolver");
gun_flechette = new ItemGunBase(Gun556mmFactory.getSPIWConfig(), Gun556mmFactory.getGLauncherConfig()).setUnlocalizedName("gun_flechette").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flechette");
gun_ar15 = new ItemGunBase(Gun50BMGFactory.getAR15Config(), Gun50BMGFactory.getAR15BurstConfig()).setUnlocalizedName("gun_ar15").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_ar15");
gun_calamity = new ItemGunBase(Gun762mmFactory.getCalamityConfig()).setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
gun_lacunae = new ItemGunLacunae(Gun5mmFactory.getLacunaeConfig()).setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
gun_proto = new ItemGunBase(GunFatmanFactory.getProtoConfig()).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
gun_mirv = new ItemGunBase(GunFatmanFactory.getMIRVConfig()).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
gun_bf = new ItemGunBase(GunFatmanFactory.getBELConfig()).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
gun_mp40 = new ItemGunBase(Gun9mmFactory.getMP40Config()).setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
gun_thompson = new ItemGunBase(Gun45ACPFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
gun_uzi_silencer = new ItemGunBase(Gun22LRFactory.getUziConfig().silenced()).setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
gun_uzi_saturnite = new ItemGunBase(Gun22LRFactory.getSaturniteConfig()).setUnlocalizedName("gun_uzi_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite");
gun_uzi_saturnite_silencer = new ItemGunBase(Gun22LRFactory.getSaturniteConfig().silenced()).setUnlocalizedName("gun_uzi_saturnite_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite_silencer");
gun_uboinik = new ItemGunBase(Gun12GaugeFactory.getUboinikConfig()).setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_remington = new ItemGunBase(Gun12GaugeFactory.getRemington870Config()).setUnlocalizedName("gun_remington").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
gun_benelli = new ItemGunBase(Gun12GaugeFactory.getBenelliModConfig()).setUnlocalizedName("gun_benelli").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
gun_supershotgun = new ItemGunShotty(Gun12GaugeFactory.getShottyConfig()).setUnlocalizedName("gun_supershotgun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_ks23 = new ItemGunBase(Gun4GaugeFactory.getKS23Config()).setUnlocalizedName("gun_ks23").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_sauer = new ItemGunBase(Gun4GaugeFactory.getSauerConfig()).setUnlocalizedName("gun_sauer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_lever_action = new ItemGunBase(Gun20GaugeFactory.getMareConfig()).setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
gun_lever_action_dark = new ItemGunBase(Gun20GaugeFactory.getMareDarkConfig()).setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
gun_lever_action_sonata = new GunLeverActionS().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
gun_bolt_action = new ItemGunBase(Gun762mmFactory.getBoltConfig()).setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
gun_bolt_action_green = new ItemGunBase(Gun762mmFactory.getBoltGreenConfig()).setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
gun_bolt_action_saturnite = new ItemGunBase(Gun762mmFactory.getBoltSaturniteConfig()).setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
gun_mymy = new ItemGunBase(GunDartFactory.getMymyConfig()).setUnlocalizedName("gun_mymy").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mymy");
gun_rpg = new Item().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
gun_karl = new Item().setUnlocalizedName("gun_karl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_karl");
gun_hk69 = new Item().setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
gun_skystinger = new Item().setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
gun_revolver = new Item().setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
gun_revolver_saturnite = new Item().setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite");
gun_revolver_gold = new Item().setUnlocalizedName("gun_revolver_gold").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_gold");
gun_revolver_schrabidium = new Item().setUnlocalizedName("gun_revolver_schrabidium").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_schrabidium");
gun_revolver_cursed = new Item().setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed");
gun_revolver_nightmare = new Item().setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
gun_revolver_nightmare2 = new Item().setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
gun_revolver_pip = new Item().setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
gun_revolver_nopip = new Item().setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
gun_revolver_blackjack = new Item().setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
gun_revolver_silver = new Item().setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
gun_revolver_red = new Item().setUnlocalizedName("gun_revolver_red").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_red");
gun_deagle = new Item().setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_deagle");
gun_bio_revolver = new Item().setUnlocalizedName("gun_bio_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bio_revolver");
gun_flechette = new Item().setUnlocalizedName("gun_flechette").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flechette");
gun_ar15 = new Item().setUnlocalizedName("gun_ar15").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_ar15");
gun_calamity = new Item().setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
gun_lacunae = new Item().setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
gun_proto = new Item().setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
gun_mirv = new Item().setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
gun_bf = new Item().setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
gun_mp40 = new Item().setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
gun_thompson = new Item().setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
gun_uzi_silencer = new Item().setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
gun_uzi_saturnite = new Item().setUnlocalizedName("gun_uzi_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite");
gun_uzi_saturnite_silencer = new Item().setUnlocalizedName("gun_uzi_saturnite_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite_silencer");
gun_uboinik = new Item().setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_remington = new Item().setUnlocalizedName("gun_remington").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
gun_benelli = new Item().setUnlocalizedName("gun_benelli").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
gun_supershotgun = new Item().setUnlocalizedName("gun_supershotgun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_ks23 = new Item().setUnlocalizedName("gun_ks23").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_sauer = new Item().setUnlocalizedName("gun_sauer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
gun_lever_action = new Item().setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
gun_lever_action_dark = new Item().setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
gun_lever_action_sonata = new Item().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
gun_bolt_action = new Item().setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
gun_bolt_action_green = new Item().setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
gun_bolt_action_saturnite = new Item().setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
gun_mymy = new Item().setUnlocalizedName("gun_mymy").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mymy");
gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_alt");
gun_b92 = new GunB92().setUnlocalizedName("gun_b92").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92");
gun_b93 = new GunB93().setUnlocalizedName("gun_b93").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b93");
gun_b93 = new Item().setUnlocalizedName("gun_b93").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b93");
gun_xvl1456_ammo = new Item().setUnlocalizedName("gun_xvl1456_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_xvl1456_ammo");
gun_xvl1456 = new ItemGunGauss(GunGaussFactory.getXVLConfig(), GunGaussFactory.getChargedConfig()).setUnlocalizedName("gun_xvl1456").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_xvl1456");
gun_xvl1456 = new Item().setUnlocalizedName("gun_xvl1456").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_xvl1456");
gun_osipr_ammo = new Item().setUnlocalizedName("gun_osipr_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_osipr_ammo");
gun_osipr_ammo2 = new Item().setUnlocalizedName("gun_osipr_ammo2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_osipr_ammo2");
gun_osipr = new ItemGunOSIPR(GunOSIPRFactory.getOSIPRConfig(), GunOSIPRFactory.getAltConfig()).setUnlocalizedName("gun_osipr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_osipr");
gun_osipr = new Item().setUnlocalizedName("gun_osipr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_osipr");
gun_immolator_ammo = new Item().setUnlocalizedName("gun_immolator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_immolator_ammo");
gun_immolator = new Item().setUnlocalizedName("gun_immolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_immolator");
gun_cryolator_ammo = new Item().setUnlocalizedName("gun_cryolator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator_ammo");
gun_cryolator = new GunCryolator().setUnlocalizedName("gun_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator");
gun_cryolator = new Item().setUnlocalizedName("gun_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator");
gun_cryocannon = new ItemCryoCannon(GunEnergyFactory.getCryoCannonConfig()).setUnlocalizedName("gun_cryocannon").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryocannon");
gun_fireext = new ItemGunBase(GunEnergyFactory.getExtConfig()).setUnlocalizedName("gun_fireext").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fireext");
gun_mp = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
gun_bolter_digamma = new ItemGunBase(Gun75BoltFactory.getBolterConfig()).setUnlocalizedName("gun_bolter_digamma").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolter_digamma");
gun_zomg = new ItemGunBase(GunEnergyFactory.getZOMGConfig()).setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_zomg");
gun_revolver_inverted = new GunSuicide().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_inverted");
gun_mp = new Item().setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
gun_bolter_digamma = new Item().setUnlocalizedName("gun_bolter_digamma").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolter_digamma");
gun_zomg = new Item().setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_zomg");
gun_revolver_inverted = new Item().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_inverted");
gun_emp_ammo = new Item().setUnlocalizedName("gun_emp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp_ammo");
gun_emp = new ItemGunBase(GunEnergyFactory.getEMPConfig()).setUnlocalizedName("gun_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp");
gun_emp = new Item().setUnlocalizedName("gun_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp");
gun_jack_ammo = new Item().setUnlocalizedName("gun_jack_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_jack_ammo");
gun_jack = new GunJack().setUnlocalizedName("gun_jack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_jack");
gun_jack = new Item().setUnlocalizedName("gun_jack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_jack");
gun_spark_ammo = new Item().setUnlocalizedName("gun_spark_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spark_ammo");
gun_spark = new GunSpark().setUnlocalizedName("gun_spark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spark");
gun_spark = new Item().setUnlocalizedName("gun_spark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spark");
gun_hp_ammo = new Item().setUnlocalizedName("gun_hp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hp_ammo");
gun_hp = new GunHP().setUnlocalizedName("gun_hp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hp");
gun_hp = new Item().setUnlocalizedName("gun_hp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hp");
gun_euthanasia_ammo = new Item().setUnlocalizedName("gun_euthanasia_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_euthanasia_ammo");
gun_euthanasia = new GunEuthanasia().setUnlocalizedName("gun_euthanasia").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_euthanasia");
gun_euthanasia = new Item().setUnlocalizedName("gun_euthanasia").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_euthanasia");
gun_defabricator_ammo = new Item().setUnlocalizedName("gun_defabricator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_defabricator_ammo");
gun_defabricator = new GunDefabricator().setUnlocalizedName("gun_defabricator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_defabricator");
gun_vortex = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_vortex").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_vortex");
gun_super_shotgun = new ItemCustomLore().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_super_shotgun");
gun_moist_nugget = new ItemNugget(3, false).setUnlocalizedName("gun_moist_nugget").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_moist_nugget");
gun_darter = new ItemGunDart(GunDartFactory.getDarterConfig()).setFull3D().setUnlocalizedName("gun_darter").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
gun_glass_cannon = new ItemEnergyGunBase(GunPoweredFactory.getGlassCannonConfig()).setFull3D().setUnlocalizedName("gun_glass_cannon").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
gun_lunatic_marksman = new ItemGunBase(Gun50BMGFactory.getLunaticMarksman()).setFull3D().setUnlocalizedName("gun_lunatic_marksman").setCreativeTab(MainRegistry.weaponTab);
gun_uac_pistol = new ItemGunBase(Gun45ACPFactory.getUACPistolConfig(), Gun45ACPFactory.getUACPistolBurstConfig()).setFull3D().setUnlocalizedName("gun_uac_pistol").setCreativeTab(MainRegistry.weaponTab);
gun_defabricator = new Item().setUnlocalizedName("gun_defabricator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_defabricator");
gun_vortex = new Item().setUnlocalizedName("gun_vortex").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_vortex");
gun_super_shotgun = new Item().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_super_shotgun");
gun_moist_nugget = new Item().setUnlocalizedName("gun_moist_nugget").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_moist_nugget");
gun_darter = new Item().setFull3D().setUnlocalizedName("gun_darter").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
gun_glass_cannon = new Item().setFull3D().setUnlocalizedName("gun_glass_cannon").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
gun_lunatic_marksman = new Item().setFull3D().setUnlocalizedName("gun_lunatic_marksman").setCreativeTab(MainRegistry.weaponTab);
gun_uac_pistol = new Item().setFull3D().setUnlocalizedName("gun_uac_pistol").setCreativeTab(MainRegistry.weaponTab);
ToolMaterial matCrucible = EnumHelper.addToolMaterial("CRUCIBLE", 10, 3, 50.0F, 100.0F, 0);
crucible = new ItemCrucible(5000, 1F, matCrucible).setUnlocalizedName("crucible").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":crucible");
@ -6046,12 +6027,6 @@ public class ModItems {
GameRegistry.registerItem(assembly_nuke, assembly_nuke.getUnlocalizedName());
GameRegistry.registerItem(assembly_luna, assembly_luna.getUnlocalizedName());
//Folly Parts
GameRegistry.registerItem(folly_shell, folly_shell.getUnlocalizedName());
GameRegistry.registerItem(folly_bullet, folly_bullet.getUnlocalizedName());
GameRegistry.registerItem(folly_bullet_nuclear, folly_bullet_nuclear.getUnlocalizedName());
GameRegistry.registerItem(folly_bullet_du, folly_bullet_du.getUnlocalizedName());
//Wiring
GameRegistry.registerItem(wiring_red_copper, wiring_red_copper.getUnlocalizedName());
@ -6070,7 +6045,6 @@ public class ModItems {
GameRegistry.registerItem(pellet_rtg_actinium, pellet_rtg_actinium.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_polonium, pellet_rtg_polonium.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_americium, pellet_rtg_americium.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_berkelium, pellet_rtg_berkelium.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_gold, pellet_rtg_gold.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_lead, pellet_rtg_lead.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_depleted, pellet_rtg_depleted.getUnlocalizedName());
@ -6973,9 +6947,6 @@ public class ModItems {
GameRegistry.registerItem(ammo_dgk, ammo_dgk.getUnlocalizedName());
GameRegistry.registerItem(ammo_arty, ammo_arty.getUnlocalizedName());
GameRegistry.registerItem(ammo_himars, ammo_himars.getUnlocalizedName());
GameRegistry.registerItem(ammo_folly, ammo_folly.getUnlocalizedName());
GameRegistry.registerItem(ammo_folly_nuclear, ammo_folly_nuclear.getUnlocalizedName());
GameRegistry.registerItem(ammo_folly_du, ammo_folly_du.getUnlocalizedName());
//-C-l-i-p-s- Magazines
GameRegistry.registerItem(clip_revolver_iron, clip_revolver_iron.getUnlocalizedName());

View File

@ -1,270 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.entity.projectile.EntityModBeam;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunB93 extends Item {
Random rand = new Random();
public int dmgMin = 16;
public int dmgMax = 28;
public GunB93() {
this.maxStackSize = 1;
}
@Override
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) {
if (!p_77615_3_.isSneaking()) {
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
j = event.charge;
boolean flag = true;
if (flag) {
float f = j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if (j < 10.0D) {
return;
}
if (j > 10.0F) {
f = 10.0F;
}
if (!p_77615_2_.isRemote) {
EntityModBeam entityarrow1;
entityarrow1 = new EntityModBeam(p_77615_2_, p_77615_3_, 3.0F);
entityarrow1.mode = getPower(p_77615_1_) - 1;
p_77615_1_.damageItem(1, p_77615_3_);
p_77615_2_.spawnEntityInWorld(entityarrow1);
p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.sparkShoot", 5.0F, 1.0F);
}
setAnim(p_77615_1_, 1);
setPower(p_77615_1_, 0);
}
} else {
}
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) {
int j = getAnim(stack);
if (j > 0) {
if (j < 30)
setAnim(stack, j + 1);
else
setAnim(stack, 0);
if (j == 15) {
world.playSoundAtEntity(entity, "hbm:weapon.b92Reload", 2F, 0.9F);
setPower(stack, getPower(stack) + 1);
if(getPower(stack) > 10) {
setPower(stack, 0);
if(!world.isRemote) {
EntityNukeExplosionMK3 ex = EntityNukeExplosionMK3.statFacFleija(world, entity.posX, entity.posY, entity.posZ, 50);
if(!ex.isDead) {
world.playSoundEffect(entity.posX, entity.posY, entity.posZ, "random.explode", 100.0f, world.rand.nextFloat() * 0.1F + 0.9F);
world.spawnEntityInWorld(ex);
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(world, 50);
cloud.posX = entity.posX;
cloud.posY = entity.posY;
cloud.posZ = entity.posZ;
world.spawnEntityInWorld(cloud);
}
}
}
}
}
}
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
return p_77654_1_;
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
/**
* returns the action that specifies what animation to play when the items
* is being used
*/
@Override
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is
* pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
if (!p_77659_3_.isSneaking() && getPower(p_77659_1_) > 0) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
if (this.getAnim(p_77659_1_) == 0)
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
} else {
if (getAnim(p_77659_1_) == 0) {
setAnim(p_77659_1_, 1);
}
}
return p_77659_1_;
}
/**
* Return the enchantability factor of the item, most of the time is based
* on material.
*/
@Override
public int getItemEnchantability() {
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 3.5, 0));
return multimap;
}
private static int getAnim(ItemStack stack) {
if (stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
return 0;
}
return stack.stackTagCompound.getInteger("animation");
}
private static void setAnim(ItemStack stack, int i) {
if (stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
stack.stackTagCompound.setInteger("animation", i);
}
private static int getPower(ItemStack stack) {
if (stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
return 0;
}
return stack.stackTagCompound.getInteger("energy");
}
private static void setPower(ItemStack stack, int i) {
if (stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
stack.stackTagCompound.setInteger("energy", i);
}
public static float getRotationFromAnim(ItemStack stack) {
float rad = 0.0174533F;
rad *= 7.5F;
int i = getAnim(stack);
if (i < 10)
return 0;
i -= 10;
if (i < 6)
return rad * i;
if (i > 14)
return rad * (5 - (i - 15));
return rad * 5;
}
public static float getOffsetFromAnim(ItemStack stack) {
float i = getAnim(stack);
if (i < 10)
return 0;
i -= 10;
if (i < 10)
return i / 10;
else
return 2 - (i / 10);
}
public static float getTransFromAnim(ItemStack stack) {
float i = getAnim(stack);
if (i < 10)
return 0;
i -= 10;
if (i > 4 && i < 10)
return (i - 5) * 0.05F;
if (i > 9 && i < 15)
return (10 * 0.05F) - ((i - 5) * 0.05F);
return 0;
}
@Override
public EnumRarity getRarity(ItemStack p_77613_1_) {
return EnumRarity.uncommon;
}
}

View File

@ -1,95 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityLN2;
import com.hbm.items.ModItems;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunCryolator extends Item {
Random rand = new Random();
public GunCryolator() {
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
World world = player.worldObj;
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_cryolator_ammo))) {
EntityLN2 entityarrow = new EntityLN2(world, player, 3.0F);
if (flag) {
entityarrow.canBePickedUp = 2;
} else {
if (count % 10 == 0)
player.inventory.consumeInventoryItem(ModItems.gun_cryolator_ammo);
}
if (count % 5 == 0)
world.playSoundAtEntity(player, "hbm:weapon.cryolatorShoot", 1.0F, 1F);
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Ice to meet you!");
list.add("");
list.add("Ammo: Cryolator Ammo");
list.add("Damage: 5");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 4, 0));
return multimap;
}
}

View File

@ -1,103 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunDefabricator extends Item {
Random rand = new Random();
public GunDefabricator()
{
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
{
World world = player.worldObj;
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_defabricator_ammo))
&& count % 2 == 0) {
EntityBullet entitybullet = new EntityBullet(world, player, 3.0F, 40, 120, false, "tauDay");
entitybullet.setDamage(40 + rand.nextInt(120 - 40));
//world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4));
world.playSoundAtEntity(player, "hbm:weapon.defabShoot", 1.0F, 0.9F + (rand.nextFloat() * 0.2F));
if(count == this.getMaxItemUseDuration(stack))
world.playSoundAtEntity(player, "hbm:weapon.defabSpinup", 1.0F, 1.0F);
if(count % 20 == 0 && !flag)
player.inventory.consumeInventoryItem(ModItems.gun_defabricator_ammo);
if (!world.isRemote) {
world.spawnEntityInWorld(entitybullet);
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(MainRegistry.polaroidID == 11)
list.add("Did you set your alarm for volcano day?");
else
list.add("BAD WOLF");
list.add("");
list.add("Ammo: Defabricator Energy Cell");
list.add("Damage: 40 - 120");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 6.5, 0));
return multimap;
}
}

View File

@ -1,105 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.items.ModItems;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunEuthanasia extends Item {
Random rand = new Random();
public GunEuthanasia()
{
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
{
World world = player.worldObj;
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_euthanasia_ammo))
&& count % 8 == 0) {
int deadly = rand.nextInt(5);
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 2, 8, deadly == 0, false);
entityarrow.setDamage(1 + rand.nextInt(3));
entityarrow.antidote = true;
//world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4));
world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
if (flag) {
entityarrow.canBePickedUp = 2;
} else {
player.inventory.consumeInventoryItem(ModItems.gun_euthanasia_ammo);
}
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Say hello to my little syringe gun!");
list.add("");
list.add("Ammo: Syringe");
list.add("Damage: 1 - 4");
list.add("Syringes have a 20% chance to instakill the enemy.");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 3, 0));
return multimap;
}
}

View File

@ -1,135 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.entity.projectile.EntityBulletBaseNT;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.Crosshair;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class GunFolly extends Item implements IHoldableWeapon {
@Override
public Crosshair getCrosshair() {
return Crosshair.L_SPLIT;
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
int state = getState(stack);
if(state == 0) {
world.playSoundAtEntity(player, "hbm:weapon.follyOpen", 1.0F, 1.0F);
setState(stack, 1);
} else if(state == 1) {
if(player.inventory.hasItem(ModItems.ammo_folly)) {
world.playSoundAtEntity(player, "hbm:weapon.follyReload", 1.0F, 1.0F);
player.inventory.consumeInventoryItem(ModItems.ammo_folly);
setState(stack, 2);
} else {
world.playSoundAtEntity(player, "hbm:weapon.follyClose", 1.0F, 1.0F);
setState(stack, 0);
}
} else if(state == 2) {
world.playSoundAtEntity(player, "hbm:weapon.follyClose", 1.0F, 1.0F);
setState(stack, 3);
setTimer(stack, 100);
} else if(state == 3) {
if(getTimer(stack) == 0) {
setState(stack, 0);
world.playSoundAtEntity(player, "hbm:weapon.follyFire", 1.0F, 1.0F);
double mult = 1.75D;
player.motionX -= player.getLookVec().xCoord * mult;
player.motionY -= player.getLookVec().yCoord * mult;
player.motionZ -= player.getLookVec().zCoord * mult;
if (!world.isRemote) {
EntityBulletBaseNT bullet = new EntityBulletBaseNT(world, BulletConfigSyncingUtil.TEST_CONFIG, player);
world.spawnEntityInWorld(bullet);
}
}
}
return stack;
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) {
if(getState(stack) == 3) {
if(isCurrentItem) {
int timer = getTimer(stack);
if(timer > 0) {
timer--;
if(timer % 20 == 0 && timer != 0)
world.playSoundAtEntity(entity, "hbm:weapon.follyBuzzer", 1.0F, 1.0F);
if(timer == 0)
world.playSoundAtEntity(entity, "hbm:weapon.follyAquired", 1.0F, 1.0F);
setTimer(stack, timer);
}
} else {
setTimer(stack, 100);
}
}
}
//0: closed, empty,
//1: open, empty
//2: open, full
//3: closed, full
public static void setState(ItemStack stack, int i) {
writeNBT(stack, "state", i);
}
public static int getState(ItemStack stack) {
return readNBT(stack, "state");
}
public static void setTimer(ItemStack stack, int i) {
writeNBT(stack, "timer", i);
}
public static int getTimer(ItemStack stack) {
return readNBT(stack, "timer");
}
private static void writeNBT(ItemStack stack, String key, int value) {
if(!stack.hasTagCompound())
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setInteger(key, value);
}
private static int readNBT(ItemStack stack, String key) {
if(!stack.hasTagCompound())
return 0;
return stack.stackTagCompound.getInteger(key);
}
}

View File

@ -1,71 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
@Deprecated
public class GunHP extends Item {
Random rand = new Random();
public GunHP() {
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { }
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Rrrrt - rrrrt - rrrrt, weeee!");
list.add("");
list.add("Ammo: Ink Cartridge");
list.add("Damage: 25 - 45");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 4, 0));
return multimap;
}
}

View File

@ -1,150 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.items.ModItems;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunJack extends Item {
Random rand = new Random();
public int dmgMin = 12;
public int dmgMax = 24;
public GunJack() {
this.maxStackSize = 1;
}
/**
* called when the player releases the use item button. Args: itemstack,
* world, entityplayer, itemInUseCount
*/
@Override
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) {
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_jack_ammo)) {
float f = j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if (j < 10.0D) {
return;
}
if (j > 10.0F) {
f = 10.0F;
}
p_77615_1_.damageItem(1, p_77615_3_);
p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.shotgunShoot", 1.0F, 1.0F);
if (flag) { } else {
p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_jack_ammo);
}
int k = rand.nextInt(25) + 24;
for(int i = 0; i < k; i++) {
EntityBullet entityarrow1 = new EntityBullet(p_77615_2_, p_77615_3_, 3.0F);
entityarrow1.setDamage(dmgMin + rand.nextInt(dmgMax - dmgMin));
if(!p_77615_2_.isRemote)
p_77615_2_.spawnEntityInWorld(entityarrow1);
}
}
}
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
return p_77654_1_;
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
/**
* returns the action that specifies what animation to play when the items
* is being used
*/
@Override
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is
* pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ModItems.gun_jack_ammo)) {
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
/**
* Return the enchantability factor of the item, most of the time is based
* on material.
*/
@Override
public int getItemEnchantability() {
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("One barrel? Boring.");
list.add("Two barrels? Nah.");
list.add("Four barrels? Heck yes!");
list.add("");
list.add("Ammo: Quadruple Shotgun Shells");
list.add("Damage: 12 - 24");
list.add("Projectiles: 24 - 48");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 4.5, 0));
return multimap;
}
}

View File

@ -1,232 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunLeverActionS extends Item {
Random rand = new Random();
public int dmgMin = 8;
public int dmgMax = 16;
public GunLeverActionS() {
this.maxStackSize = 1;
this.setMaxDamage(500);
}
/**
* called when the player releases the use item button. Args: itemstack,
* world, entityplayer, itemInUseCount
*/
@Override
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) {
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
if (flag || p_77615_3_.inventory.hasItem(ModItems.ammo_20gauge)) {
float f = j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if (j < 10.0D) {
return;
}
if (j > 10.0F) {
f = 10.0F;
}
Vec3 vec = p_77615_3_.getLookVec();
vec.xCoord *= -1;
vec.yCoord *= -1;
vec.zCoord *= -1;
vec.normalize();
p_77615_3_.motionX += vec.xCoord * 0.75;
p_77615_3_.motionY += vec.yCoord * 0.75;
p_77615_3_.motionZ += vec.zCoord * 0.75;
p_77615_3_.inventory.consumeInventoryItem(ModItems.ammo_20gauge);
p_77615_1_.damageItem(1, p_77615_3_);
p_77615_3_.attackEntityFrom(ModDamageSource.suicide, 10000);
if(!p_77615_3_.capabilities.isCreativeMode)
p_77615_3_.setHealth(0.0F);
p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.revolverShootAlt", 5.0F, 0.75F);
setAnim(p_77615_1_, 1);
}
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) {
int j = getAnim(stack);
if(j > 0) {
if(j < 30)
setAnim(stack, j + 1);
else
setAnim(stack, 0);
if(j == 15)
world.playSoundAtEntity(entity, "hbm:weapon.leverActionReload", 2F, 0.85F);
}
}
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
return p_77654_1_;
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
/**
* returns the action that specifies what animation to play when the items
* is being used
*/
@Override
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is
* pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
if(this.getAnim(p_77659_1_) == 0)
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
return p_77659_1_;
}
/**
* Return the enchantability factor of the item, most of the time is based
* on material.
*/
@Override
public int getItemEnchantability() {
return 1;
}
public String getItemStackDisplayName(ItemStack stack)
{
if(MainRegistry.polaroidID == 11)
return ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + "_2.name")).trim();
else
return ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(MainRegistry.polaroidID == 11)
list.add("Vee guilt-tripped me into this.");
else
list.add("I hate your guts, Vee.");
list.add("");
list.add("Ammo: 12x74 Buckshot");
list.add("Damage: Infinite");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 3.5, 0));
return multimap;
}
private static int getAnim(ItemStack stack) {
if(stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
return 0;
}
return stack.stackTagCompound.getInteger("animation");
}
private static void setAnim(ItemStack stack, int i) {
if(stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
stack.stackTagCompound.setInteger("animation", i);
}
public static float getRotationFromAnim(ItemStack stack) {
float rad = 0.0174533F;
rad *= 7.5F;
int i = getAnim(stack);
if(i < 10)
return 0;
i -= 10;
if(i < 10)
return rad * i;
else
return (rad * 10) - (rad * (i - 10));
}
public static float getOffsetFromAnim(ItemStack stack) {
float i = getAnim(stack);
if(i < 10)
return 0;
i -= 10;
if(i < 10)
return i / 10;
else
return 2 - (i / 10);
}
}

View File

@ -1,141 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntitySparkBeam;
import com.hbm.items.ModItems;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunSpark extends Item {
Random rand = new Random();
public int dmgMin = 12;
public int dmgMax = 24;
public GunSpark() {
this.maxStackSize = 1;
}
/**
* called when the player releases the use item button. Args: itemstack,
* world, entityplayer, itemInUseCount
*/
@Override
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) {
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_spark_ammo)) {
float f = j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if (j < 10.0D) {
return;
}
if (j > 10.0F) {
f = 10.0F;
}
p_77615_1_.damageItem(1, p_77615_3_);
p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.sparkShoot", 1.0F, 1.0F);
if (flag) { } else {
p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_spark_ammo);
}
EntitySparkBeam beam = new EntitySparkBeam(p_77615_2_, p_77615_3_, 3F);
beam.setDamage(dmgMin + rand.nextInt(dmgMax - dmgMin));
if(!p_77615_2_.isRemote)
p_77615_2_.spawnEntityInWorld(beam);
}
}
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
return p_77654_1_;
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
/**
* returns the action that specifies what animation to play when the items
* is being used
*/
@Override
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is
* pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
return p_77659_1_;
}
/**
* Return the enchantability factor of the item, most of the time is based
* on material.
*/
@Override
public int getItemEnchantability() {
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("'magic does not compute'");
list.add("'aeiou'");
list.add("");
list.add("Ammo: Electromagnetic Cartridge");
list.add("Projectiles explode on impact.");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 4.5, 0));
return multimap;
}
}

View File

@ -1,158 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunSuicide extends Item {
public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"};
@SideOnly(Side.CLIENT)
private IIcon[] iconArray;
private Item ammo;
Random rand = new Random();
public GunSuicide()
{
this.maxStackSize = 1;
//if(this == ModItems.gun_revolver)
{
this.setMaxDamage(500);
}
this.ammo = ModItems.ammo_357;
}
/**
* called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount
*/
@Override
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_)
{
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
if (flag || p_77615_3_.inventory.hasItem(ammo))
{
float f = j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if (j < 10.0D)
{
return;
}
if (j > 10.0F)
{
f = 10.0F;
}
p_77615_1_.damageItem(1, p_77615_3_);
p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.revolverShoot", 1.0F, 1.0F);
if (flag)
{ }
else
{
p_77615_3_.inventory.consumeInventoryItem(ammo);
}
if (!p_77615_2_.isRemote)
{
p_77615_3_.attackEntityFrom(ModDamageSource.suicide, 10000);
if(!p_77615_3_.capabilities.isCreativeMode)
p_77615_3_.setHealth(0.0F);
}
}
}
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_)
{
return p_77654_1_;
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_)
{
return 72000;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
@Override
public EnumAction getItemUseAction(ItemStack p_77661_1_)
{
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
{
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
return p_77659_1_;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
@Override
public int getItemEnchantability()
{
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("I've seen things...");
list.add("...I shouldn't have seen.");
list.add("");
list.add("Ammo: Lead Bullets");
list.add("Damage: Infinite");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 2.5, 0));
return multimap;
}
}

View File

@ -1,40 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.handler.GunConfiguration;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.item.ItemStack;
public class ItemCoilgun extends ItemGunBase {
public ItemCoilgun(GunConfiguration config) {
super(config);
}
@Override
@SideOnly(Side.CLIENT)
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
if(type == AnimType.CYCLE) {
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addPos(1, 0, 0, 100)
.addPos(0, 0, 0, 200));
}
if(type == AnimType.RELOAD) {
return new BusAnimation()
.addBus("RELOAD", new BusAnimationSequence()
.addPos(1, 0, 0, 250)
.addPos(1, 0, 0, 500)
.addPos(0, 0, 0, 250));
}
GunConfiguration config = ((ItemGunBase) stack.getItem()).mainConfig;
return config.animations.get(type);
}
}

View File

@ -1,125 +0,0 @@
package com.hbm.items.weapon;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.GunConfiguration;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class ItemGunBio extends ItemGunBase {
public ItemGunBio(GunConfiguration config) {
super(config);
}
public static long lastShot;
public static List<double[]> smokeNodes = new ArrayList();
@Override
public void startActionClient(ItemStack stack, World world, EntityPlayer player, boolean main) { }
@Override
@SideOnly(Side.CLIENT)
protected void updateClient(ItemStack stack, World world, EntityPlayer entity, int slot, boolean isCurrentItem) {
super.updateClient(stack, world, entity, slot, isCurrentItem);
boolean smoking = lastShot + 2000 > System.currentTimeMillis();
if(!smoking && !smokeNodes.isEmpty()) {
smokeNodes.clear();
}
if(smoking) {
Vec3 prev = Vec3.createVectorHelper(-entity.motionX, -entity.motionY, -entity.motionZ);
prev.rotateAroundY((float) (entity.rotationYaw * Math.PI / 180D));
double accel = 15D;
double side = (entity.rotationYaw - entity.prevRotationYawHead) * 0.1D;
double waggle = 0.025D;
for(double[] node : smokeNodes) {
node[0] += prev.xCoord * accel + world.rand.nextGaussian() * waggle + side;
node[1] += prev.yCoord + 1.5D;
node[2] += prev.zCoord * accel + world.rand.nextGaussian() * waggle;
}
double alpha = (System.currentTimeMillis() - ItemGunBio.lastShot) / 2000D;
alpha = (1 - alpha) * 0.5D;
if(this.getIsReloading(stack)) alpha = 0;
smokeNodes.add(new double[] {0, 0, 0, alpha});
}
}
@Override
@SideOnly(Side.CLIENT)
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
if(type == AnimType.CYCLE) {
lastShot = System.currentTimeMillis();
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addPos(0, 0, 0, 50)
.addPos(0, 0, -3, 50)
.addPos(0, 0, 0, 250)
)
.addBus("HAMMER", new BusAnimationSequence()
.addPos(0, 0, 1, 50)
.addPos(0, 0, 1, 300)
.addPos(0, 0, 0, 200)
)
.addBus("DRUM", new BusAnimationSequence()
.addPos(0, 0, 1, 50)
);
}
if(type == AnimType.RELOAD) {
return new BusAnimation()
.addBus("LATCH", new BusAnimationSequence()
.addPos(0, 0, 90, 300)
.addPos(0, 0, 90, 2000)
.addPos(0, 0, 0, 150)
)
.addBus("FRONT", new BusAnimationSequence()
.addPos(0, 0, 0, 200)
.addPos(0, 0, 45, 150)
.addPos(0, 0, 45, 2000)
.addPos(0, 0, 0, 75)
)
.addBus("RELOAD_ROT", new BusAnimationSequence()
.addPos(0, 0, 0, 300)
.addPos(60, 0, 0, 500)
.addPos(60, 0, 0, 500)
.addPos(0, -90, -90, 0)
.addPos(0, -90, -90, 600)
.addPos(0, 0, 0, 300)
.addPos(0, 0, 0, 100)
.addPos(-45, 0, 0, 50)
.addPos(-45, 0, 0, 100)
.addPos(0, 0, 0, 300)
)
.addBus("RELOAD_MOVE", new BusAnimationSequence()
.addPos(0, 0, 0, 300)
.addPos(0, -15, 0, 1000)
.addPos(0, 0, 0, 450)
)
.addBus("DRUM_PUSH", new BusAnimationSequence()
.addPos(0, 0, 0, 1600)
.addPos(0, 0, -5, 0)
.addPos(0, 0, 0, 300)
);
}
return null;
}
}

View File

@ -1,226 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import com.hbm.config.GeneralConfig;
import com.hbm.entity.projectile.EntityChemical;
import com.hbm.handler.GunConfiguration;
import com.hbm.handler.guncfg.GunEnergyFactory;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.GunAnimationPacket;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay;
import api.hbm.fluid.IFillableItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
public class ItemGunChemthrower extends ItemGunBase implements IFillableItem {
public ItemGunChemthrower() {
super(GunEnergyFactory.getChemConfig());
}
@Override
protected void fire(ItemStack stack, World world, EntityPlayer player) {
if(!hasAmmo(stack, player, true))
return;
int bullets = 1;
for(int i = 0; i < bullets; i++) {
spawnProjectile(world, player, stack, 0);
}
if(player instanceof EntityPlayerMP)
PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.CYCLE.ordinal()), (EntityPlayerMP) player);
useUpAmmo(player, stack, true);
player.inventoryContainer.detectAndSendChanges();
int wear = (int) Math.ceil(10 / (1F + EnchantmentHelper.getEnchantmentLevel(Enchantment.unbreaking.effectId, stack)));
setItemWear(stack, getItemWear(stack) + wear);
}
@Override
public boolean hasAmmo(ItemStack stack, EntityPlayer player, boolean main) {
return getMag(stack) >= 0 + this.getConsumption(stack);
}
@Override
public void useUpAmmo(EntityPlayer player, ItemStack stack, boolean main) {
if(!main && altConfig == null)
return;
GunConfiguration config = mainConfig;
if(!main)
config = altConfig;
if(hasInfinity(stack, config))
return;
setMag(stack, getMag(stack) - this.getConsumption(stack));
}
@Override
public boolean canReload(ItemStack stack, World world, EntityPlayer player) {
return false;
}
@Override
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
//spawn fluid projectile
EntityChemical chem = new EntityChemical(world, player, 0, 0, 0);
chem.setFluid(this.getFluidType(stack));
world.spawnEntityInWorld(chem);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add("Ammo: " + getMag(stack) + " / " + mainConfig.ammoCap + "mB");
list.add("Ammo Type: " + this.getFluidType(stack).getLocalizedName());
int dura = mainConfig.durability - getItemWear(stack);
if(dura < 0)
dura = 0;
list.add("Durability: " + dura + " / " + mainConfig.durability);
list.add("");
list.add("Name: " + mainConfig.name);
list.add("Manufacturer: " + mainConfig.manufacturer);
if(!mainConfig.comment.isEmpty()) {
list.add("");
for(String s : mainConfig.comment)
list.add(EnumChatFormatting.ITALIC + s);
}
if(GeneralConfig.enableExtendedLogging) {
list.add("");
list.add("Type: " + getMagType(stack));
list.add("Is Reloading: " + getIsReloading(stack));
list.add("Reload Cycle: " + getReloadCycle(stack));
list.add("RoF Cooldown: " + getDelay(stack));
}
}
@Override
@SideOnly(Side.CLIENT)
public void renderHUD(Pre event, ElementType type, EntityPlayer player, ItemStack stack) {
ItemGunBase gun = ((ItemGunBase)stack.getItem());
GunConfiguration gcfg = gun.mainConfig;
if(type == ElementType.HOTBAR) {
FluidType fluid = this.getFluidType(stack);
ItemStack ammo = ItemFluidIcon.make(fluid, 1);
int count = ItemGunBase.getMag(stack);
int max = gcfg.ammoCap;
boolean showammo = gcfg.showAmmo;
int dura = ItemGunBase.getItemWear(stack) * 50 / gcfg.durability;
RenderScreenOverlay.renderAmmo(event.resolution, Minecraft.getMinecraft().ingameGUI, ammo, count, max, dura, showammo);
}
if(type == ElementType.CROSSHAIRS && GeneralConfig.enableCrosshairs) {
event.setCanceled(true);
if(!(gcfg.hasSights && player.isSneaking()))
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, ((IHoldableWeapon)player.getHeldItem().getItem()).getCrosshair());
else
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, Crosshair.NONE);
}
}
@Override
protected void reload2(ItemStack stack, World world, EntityPlayer player) {
this.setIsReloading(stack, false);
}
public FluidType getFluidType(ItemStack stack) {
return Fluids.fromID(this.getMagType(stack));
}
public int getConsumption(ItemStack stack) {
return 3;
}
@Override
public boolean acceptsFluid(FluidType type, ItemStack stack) {
return getFluidType(stack) == type || this.getMag(stack) == 0;
}
public static final int transferSpeed = 50;
@Override
public int tryFill(FluidType type, int amount, ItemStack stack) {
if(!acceptsFluid(type, stack))
return amount;
if(this.getMag(stack) == 0)
this.setMagType(stack, type.getID());
int fill = this.getMag(stack);
int req = this.mainConfig.ammoCap - fill;
int toFill = Math.min(amount, req);
toFill = Math.min(toFill, transferSpeed);
this.setMag(stack, fill + toFill);
return amount - toFill;
}
@Override
public boolean providesFluid(FluidType type, ItemStack stack) {
return getFluidType(stack) == type;
}
@Override
public int tryEmpty(FluidType type, int amount, ItemStack stack) {
int fill = this.getMag(stack);
int toUnload = Math.min(fill, amount);
toUnload = Math.min(toUnload, transferSpeed);
this.setMag(stack, fill - toUnload);
return toUnload;
}
@Override
public FluidType getFirstFluidType(ItemStack stack) {
return this.getFluidType(stack);
}
@Override
public int getFill(ItemStack stack) {
return this.getMag(stack);
}
}

View File

@ -1,78 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.handler.GunConfiguration;
import api.hbm.item.IDesignatorItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class ItemGunDart extends ItemGunBase implements IDesignatorItem {
public ItemGunDart(GunConfiguration config) {
super(config);
}
public static void writePlayer(ItemStack stack, EntityPlayer player) {
if(!stack.hasTagCompound())
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setString("player", player.getDisplayName());
stack.stackTagCompound.setLong("lease", player.worldObj.getTotalWorldTime() + 60 * 60 * 20);
}
public static EntityPlayer readPlayer(World world, ItemStack stack) {
if(!stack.hasTagCompound())
return null;
if(stack.stackTagCompound.getLong("lease") < world.getTotalWorldTime())
return null;
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(stack.stackTagCompound.getString("player"));
}
public void startAction(ItemStack stack, World world, EntityPlayer player, boolean main) {
if(main) {
super.startAction(stack, world, player, main);
} else {
EntityPlayer target = readPlayer(world, stack);
if(target != null) {
int dim = target.worldObj.provider.dimensionId;
int x = (int)target.posX;
int y = (int)target.posY;
int z = (int)target.posZ;
int dist = (int) target.getDistanceToEntity(player);
player.addChatComponentMessage(new ChatComponentText(target.getDisplayName()).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
player.addChatComponentMessage(new ChatComponentText("Dim: " + dim + " X:" + x + " Y:" + y + " Z:" + z + " (" + dist + " blocks away)").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
} else {
player.addChatComponentMessage(new ChatComponentText("No Target").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
}
}
}
@Override
public boolean isReady(World world, ItemStack stack, int x, int y, int z) {
EntityPlayer target = readPlayer(world, stack);
return target != null && target.dimension == world.provider.dimensionId;
}
@Override
public Vec3 getCoords(World world, ItemStack stack, int x, int y, int z) {
EntityPlayer target = readPlayer(world, stack);
return Vec3.createVectorHelper(target.posX, target.posY, target.posZ);
}
}

View File

@ -1,17 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.handler.GunConfiguration;
import net.minecraft.item.ItemStack;
public class ItemGunDetonator extends ItemGunBase {
public ItemGunDetonator(GunConfiguration config) {
super(config);
}
@Override
public boolean hasInfinity(ItemStack stack, GunConfiguration config) {
return true;
}
}

View File

@ -1,158 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.entity.projectile.EntityBulletBaseNT;
import com.hbm.handler.GunConfiguration;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.GunAnimationPacket;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.sound.AudioWrapper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemGunGauss extends ItemGunBase {
private AudioWrapper chargeLoop;
public ItemGunGauss(GunConfiguration config, GunConfiguration alt) {
super(config, alt);
}
public void endAction(ItemStack stack, World world, EntityPlayer player, boolean main) {
if(getHasShot(stack)) {
world.playSoundAtEntity(player, "hbm:weapon.sparkShoot", 2.0F, 1.0F);
setHasShot(stack, false);
}
if(!main && getStored(stack) > 0) {
EntityBulletBaseNT bullet = new EntityBulletBaseNT(world, altConfig.config.get(0), player);
bullet.overrideDamage = Math.max(getStored(stack), 1) * 10F;
world.spawnEntityInWorld(bullet);
world.playSoundAtEntity(player, "hbm:weapon.tauShoot", 0.5F, 0.75F);
setItemWear(stack, getItemWear(stack) + (getCharge(stack)) * 2);
setCharge(stack, 0);
if(player instanceof EntityPlayerMP)
PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.CYCLE.ordinal()), (EntityPlayerMP) player);
}
}
public void endActionClient(ItemStack stack, World world, EntityPlayer player, boolean main) {
if(chargeLoop != null) {
chargeLoop.stopSound();
chargeLoop = null;
}
}
protected void altFire(ItemStack stack, World world, EntityPlayer player) {
setCharge(stack, 1);
}
@Override
public void startActionClient(ItemStack stack, World world, EntityPlayer player, boolean main) {
if(!main && getItemWear(stack) < mainConfig.durability && player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) {
chargeLoop = MainRegistry.proxy.getLoopedSound("hbm:weapon.tauChargeLoop2", (float)player.posX, (float)player.posY, (float)player.posZ, 1.0F, 5F, 0.75F);
world.playSoundAtEntity(player, "hbm:weapon.tauChargeLoop2", 1.0F, 0.75F);
if(chargeLoop != null) {
chargeLoop.startSound();
}
}
}
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateServer(stack, world, player, slot, isCurrentItem);
if(getIsAltDown(stack) && getItemWear(stack) < mainConfig.durability) {
int c = getCharge(stack);
if(c > 200) {
setCharge(stack, 0);
setItemWear(stack, mainConfig.durability);
player.attackEntityFrom(ModDamageSource.tauBlast, 1000);
world.newExplosion(player, player.posX, player.posY + player.eyeHeight, player.posZ, 5.0F, true, true);
return;
}
if(c > 0) {
setCharge(stack, c + 1);
if(c % 10 == 1 && c < 140 && c > 2) {
if(player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) {
player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo);
setStored(stack, getStored(stack) + 1);
} else {
setCharge(stack, 0);
setStored(stack, 0);
}
}
} else {
setStored(stack, 0);
}
} else {
setCharge(stack, 0);
setStored(stack, 0);
}
}
protected void updateClient(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateClient(stack, world, player, slot, isCurrentItem);
if(chargeLoop != null) {
if(!chargeLoop.isPlaying()) {
chargeLoop = rebootAudio(chargeLoop, player);
}
chargeLoop.updatePosition((float)player.posX, (float)player.posY, (float)player.posZ);
chargeLoop.updatePitch(1 + (getCharge(stack)) * 0.01F);
}
}
public AudioWrapper rebootAudio(AudioWrapper wrapper, EntityPlayer player) {
wrapper.stopSound();
AudioWrapper audio = MainRegistry.proxy.getLoopedSound("hbm:weapon.tauChargeLoop2", (float)player.posX, (float)player.posY, (float)player.posZ, wrapper.getVolume(), wrapper.getRange(), wrapper.getPitch());
audio.startSound();
return audio;
}
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
super.spawnProjectile(world, player, stack, config);
setHasShot(stack, true);
}
public static void setHasShot(ItemStack stack, boolean b) {
writeNBT(stack, "hasShot", b ? 1 : 0);
}
public static boolean getHasShot(ItemStack stack) {
return readNBT(stack, "hasShot") == 1;
}
/// gauss charge state ///
public static void setCharge(ItemStack stack, int i) {
writeNBT(stack, "gauss_charge", i);
}
public static int getCharge(ItemStack stack) {
return readNBT(stack, "gauss_charge");
}
public static void setStored(ItemStack stack, int i) {
writeNBT(stack, "gauss_stored", i);
}
public static int getStored(ItemStack stack) {
return readNBT(stack, "gauss_stored");
}
}

View File

@ -1,42 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.handler.GunConfiguration;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemGunLacunae extends ItemGunBase {
public ItemGunLacunae(GunConfiguration config) {
super(config);
}
@Override
public void startAction(ItemStack stack, World world, EntityPlayer player, boolean main) {
if(main) {
setDelay(stack, 20);
world.playSoundAtEntity(player, "hbm:weapon.lacunaeSpinup", 1.0F, 1.0F);
}
}
@Override
public void endAction(ItemStack stack, World world, EntityPlayer player, boolean main) {
if(main)
world.playSoundAtEntity(player, "hbm:weapon.lacunaeSpindown", 1.0F, 1.0F);
}
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateServer(stack, world, player, slot, isCurrentItem);
if(getIsMouseDown(stack)) {
int rot = readNBT(stack, "rot") % 360;
rot += 25;
writeNBT(stack, "rot", rot);
}
}
}

View File

@ -1,62 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.entity.projectile.EntityCombineBallNT;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.GunConfiguration;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemGunOSIPR extends ItemGunBase {
public ItemGunOSIPR(GunConfiguration config, GunConfiguration alt) {
super(config, alt);
}
@Override
protected void altFire(ItemStack stack, World world, EntityPlayer player) {
setCharge(stack, 1);
world.playSoundAtEntity(player, "hbm:weapon.osiprCharging", 1.0F, 1F);
}
@Override
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateServer(stack, world, player, slot, isCurrentItem);
if(!isCurrentItem) {
setCharge(stack, 0);
return;
}
int i = getCharge(stack);
if(i >= 20) {
EntityCombineBallNT energyBall = new EntityCombineBallNT(world, BulletConfigSyncingUtil.SPECIAL_OSIPR_CHARGED, player);
world.spawnEntityInWorld(energyBall);
world.playSoundAtEntity(player, altConfig.firingSound, 1.0F, 1F);
setCharge(stack, 0);
setDelay(stack, altConfig.rateOfFire);
player.inventory.consumeInventoryItem(ModItems.gun_osipr_ammo2);
} else if(i > 0)
setCharge(stack, i + 1);
}
@Override
protected boolean tryShoot(ItemStack stack, World world, EntityPlayer player, boolean main) {
return super.tryShoot(stack, world, player, main) && getCharge(stack) == 0;
}
/// CMB charge state ///
public static void setCharge(ItemStack stack, int i) {
writeNBT(stack, "cmb_charge", i);
}
public static int getCharge(ItemStack stack) {
return readNBT(stack, "cmb_charge");
}
}

View File

@ -1,137 +0,0 @@
package com.hbm.items.weapon;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.GunConfiguration;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class ItemGunPip extends ItemGunBase {
public static long lastShot;
public static List<double[]> smokeNodes = new ArrayList();
public ItemGunPip(GunConfiguration config) {
super(config);
}
@Override
@SideOnly(Side.CLIENT)
protected void updateClient(ItemStack stack, World world, EntityPlayer entity, int slot, boolean isCurrentItem) {
super.updateClient(stack, world, entity, slot, isCurrentItem);
boolean smoking = lastShot + 2000 > System.currentTimeMillis();
if(!smoking && !smokeNodes.isEmpty()) {
smokeNodes.clear();
}
if(smoking) {
Vec3 prev = Vec3.createVectorHelper(-entity.motionX, -entity.motionY, -entity.motionZ);
prev.rotateAroundY((float) (entity.rotationYaw * Math.PI / 180D));
double accel = 15D;
double side = (entity.rotationYaw - entity.prevRotationYawHead) * 0.1D;
double waggle = 0.025D;
for(double[] node : smokeNodes) {
node[0] += -prev.zCoord * accel + world.rand.nextGaussian() * waggle;
node[1] += prev.yCoord + 1.5D;
node[2] += prev.xCoord * accel + world.rand.nextGaussian() * waggle + side;
}
double alpha = (System.currentTimeMillis() - lastShot) / 2000D;
alpha = (1 - alpha) * 0.5D;
if(this.getIsReloading(stack)) alpha = 0;
smokeNodes.add(new double[] {0, 0, 0, alpha});
}
}
@Override
@SideOnly(Side.CLIENT)
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
if(type == AnimType.EQUIP) {
return new BusAnimation()
.addBus("ROTATE", new BusAnimationSequence()
.addPos(-360, 0, 0, 350)
);
}
if(type == AnimType.CYCLE) {
lastShot = System.currentTimeMillis();
int s = 1;
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addPos(0, 0, 0, 50 * s)
.addPos(0, 0, -3, 50 * s)
.addPos(0, 0, 0, 250 * s)
)
.addBus("HAMMER", new BusAnimationSequence()
.addPos(0, 0, 1, 50 * s)
.addPos(0, 0, 1, 300 * s)
.addPos(0, 0, 0, 200 * s)
)
.addBus("DRUM", new BusAnimationSequence()
.addPos(0, 0, 1, 50 * s)
);
}
if(type == AnimType.RELOAD) {
int s = 1;
return new BusAnimation()
.addBus("RELAOD_TILT", new BusAnimationSequence()
.addPos(-15, 0, 0, 100 * s)
.addPos(65, 0, 0, 100 * s) //200
.addPos(45, 0, 0, 50 * s) //250
.addPos(0, 0, 0, 200 * s) //450
.addPos(0, 0, 0, 1450 * s) //1900
.addPos(-80, 0, 0, 100 * s) //2000
.addPos(-80, 0, 0, 100 * s) //2100
.addPos(0, 0, 0, 200 * s) //2300
)
.addBus("RELOAD_CYLINDER", new BusAnimationSequence()
.addPos(0, 0, 0, 200 * s)
.addPos(90, 0, 0, 100 * s) //300
.addPos(90, 0, 0, 1700 * s) //2000
.addPos(0, 0, 0, 70 * s) //2100
)
.addBus("RELOAD_LIFT", new BusAnimationSequence()
.addPos(0, 0, 0, 350 * s)
.addPos(-45, 0, 0, 250 * s) //600
.addPos(-45, 0, 0, 350 * s) //950
.addPos(-15, 0, 0, 200 * s) //1150
.addPos(-15, 0, 0, 1050 * s) //2200
.addPos(0, 0, 0, 100 * s) //2300
)
.addBus("RELOAD_JOLT", new BusAnimationSequence()
.addPos(0, 0, 0, 600 * s)
.addPos(2, 0, 0, 50 * s) //650
.addPos(0, 0, 0, 100 * s) //750
)
.addBus("RELOAD_BULLETS", new BusAnimationSequence()
.addPos(0, 0, 0, 650 * s)
.addPos(10, 0, 0, 300 * s) //950
.addPos(10, 0, 0, 200 * s) //1150
.addPos(0, 0, 0, 700 * s) //1850
)
.addBus("RELOAD_BULLETS_CON", new BusAnimationSequence()
.addPos(1, 0, 0, 0 * s)
.addPos(1, 0, 0, 950 * s)
.addPos(0, 0, 0, 1 * s)
);
}
return null;
}
}

View File

@ -1,24 +0,0 @@
package com.hbm.items.weapon;
import com.hbm.handler.GunConfiguration;
import com.hbm.util.ShadyUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemGunShotty extends ItemGunBase {
public ItemGunShotty(GunConfiguration config) {
super(config);
}
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateServer(stack, world, player, slot, isCurrentItem);
if((player.getUniqueID().toString().equals(ShadyUtil.Dr_Nostalgia) || player.getDisplayName().equals("Tankish") || player.getDisplayName().equals("Tankish020")) &&
this.getDelay(stack) < this.mainConfig.rateOfFire * 0.9)
this.setDelay(stack, 0);
}
}

View File

@ -22,6 +22,7 @@ import com.hbm.util.DamageResistanceHandler.DamageClass;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.MovingObjectPosition;
@ -94,6 +95,7 @@ public class BulletConfig implements Cloneable {
public BulletConfig setBeam() { this.pType = ProjectileType.BEAM; return this; }
public BulletConfig setChunkloading() { this.pType = ProjectileType.BULLET_CHUNKLOADING; return this; }
public BulletConfig setItem(Item ammo) { this.ammo = new ComparableStack(ammo); return this; }
public BulletConfig setItem(ItemStack ammo) { this.ammo = new ComparableStack(ammo); return this; }
public BulletConfig setItem(EnumAmmo ammo) { this.ammo = new ComparableStack(ModItems.ammo_standard, 1, ammo.ordinal()); return this; }
public BulletConfig setItem(EnumAmmoSecret ammo) { this.ammo = new ComparableStack(ModItems.ammo_secret, 1, ammo.ordinal()); return this; }
public BulletConfig setReloadCount(int ammoReloadCount) { this.ammoReloadCount = ammoReloadCount; return this; }

View File

@ -532,67 +532,8 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.chainsaw, new ItemRenderChainsaw());
MinecraftForgeClient.registerItemRenderer(ModItems.boltgun, new ItemRenderBoltgun());
//guns
MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg, new ItemRenderRpg());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_karl, new ItemRenderRpg());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_skystinger, new ItemRenderStinger());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver, new ItemRenderWeaponFFColt(ResourceManager.ff_gun_bright, ResourceManager.ff_iron, ResourceManager.ff_wood));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_saturnite, new ItemRenderWeaponFFColt(ResourceManager.ff_saturnite, ResourceManager.ff_iron, ResourceManager.ff_wood));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_gold, new ItemRenderWeaponFFColt(ResourceManager.ff_gold, ResourceManager.ff_gold, ResourceManager.ff_gun_dark));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_schrabidium, new ItemRenderWeaponFFColt(ResourceManager.ff_schrabidium, ResourceManager.ff_schrabidium, ResourceManager.ff_gun_dark));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_cursed, new ItemRenderWeaponFFCursed());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nightmare, new ItemRenderWeaponFFNightmare());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nightmare2, new ItemRenderWeaponFFNightmareDark());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_proto, new ItemRenderFatMan());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mirv, new ItemRenderMIRVLauncher());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bf, new ItemRenderBFLauncher());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_xvl1456, new ItemRenderWeaponTau());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_zomg, new ItemRenderZOMG());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_osipr, new ItemRenderOSIPR());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mp, new ItemRenderMP());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_inverted, new ItemRenderRevolverInverted());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mp40, new ItemRenderMP40());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_emp, new ItemRenderEMPRay());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_immolator, new ItemRenderImmolator());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_cryolator, new ItemRenderCryolator());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uboinik, new ItemRenderUboinik());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_jack, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_spark, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hp, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_euthanasia, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_defabricator, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action, new ItemRenderWeaponFFBolt(ResourceManager.rem700, ResourceManager.rem700_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action_green, new ItemRenderWeaponFFBolt(ResourceManager.rem700poly, ResourceManager.rem700poly_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action_saturnite, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action_saturnite, new ItemRenderWeaponFFBolt(ResourceManager.rem700sat, ResourceManager.rem700sat_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_b92, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_b93, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi_silencer, new ItemRenderUZI());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi_saturnite, new ItemRenderUZI());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi_saturnite_silencer, new ItemRenderUZI());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_calamity, new ItemRenderWeaponFFMG42());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lacunae, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hk69, new ItemRenderWeaponObj());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bio_revolver, new ItemRenderBioRevolver());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_deagle, new ItemRenderWeaponObj());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_supershotgun, new ItemRenderWeaponShotty());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_ks23, new ItemRenderWeaponKS23());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flechette, new ItemRenderWeaponObj());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_vortex, new ItemRenderWeaponVortex());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_thompson, new ItemRenderWeaponThompson());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter_digamma, new ItemRenderWeaponBolter());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fireext, new ItemRenderFireExt());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_ar15, new ItemRenderWeaponAR15());
MinecraftForgeClient.registerItemRenderer(ModItems.detonator_laser, new ItemRenderDetonatorLaser());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_remington, new ItemRenderWeaponRemington());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_glass_cannon, new ItemRenderWeaponGlass());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nopip, new ItemRenderWeaponNovac());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponLilMac());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_blackjack, new ItemRenderWeaponNovac());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_silver, new ItemRenderWeaponNovac());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_red, new ItemRenderWeaponNovac());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lunatic_marksman, new ItemRenderLunaticSniper());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_benelli, new ItemRenderBenelli());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uac_pistol, new ItemRenderUACPistol());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_cryocannon, new ItemRenderWeaponCryoCannon());
//multitool
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());

View File

@ -1459,6 +1459,14 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.powder_verticium");
ignoreMappings.add("hbm:tile.ore_random");
ignoreMappings.add("hbm:item.crate_caller");
ignoreMappings.add("hbm:item.pellet_rtg_berkelium");
ignoreMappings.add("hbm:item.folly_shell");
ignoreMappings.add("hbm:item.folly_bullet");
ignoreMappings.add("hbm:item.folly_bullet_nuclear");
ignoreMappings.add("hbm:item.folly_bullet_du");
ignoreMappings.add("hbm:item.ammo_folly");
ignoreMappings.add("hbm:item.ammo_folly_nuclear");
ignoreMappings.add("hbm:item.ammo_folly_du");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -1,185 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemGunBio;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderBioRevolver implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bio_revolver_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.1D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1.0, 0.25, -0.25);
GL11.glRotated(80, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double width = 0.5D;
GL11.glPushMatrix();
GL11.glTranslated(0.0, 1.75, 10.0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(0, -recoil[2] * 1.5, recoil[2]);
GL11.glShadeModel(GL11.GL_SMOOTH);
if(ItemGunBio.smokeNodes.size() > 1) {
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
tess.setNormal(0F, 1F, 0F);
for(int i = 0; i < ItemGunBio.smokeNodes.size() - 1; i++) {
double[] node = ItemGunBio.smokeNodes.get(i);
double[] past = ItemGunBio.smokeNodes.get(i + 1);
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
tess.addVertex(node[0], node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(node[0] + width, node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(past[0] + width, past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.addVertex(past[0], past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
tess.addVertex(node[0], node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(node[0] - width, node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(past[0] - width, past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.addVertex(past[0], past[1], past[2]);
}
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
tess.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
}
GL11.glPopMatrix();
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
GL11.glRotated(recoil[2] * 10, 1, 0, 0);
double[] reloadMove = HbmAnimations.getRelevantTransformation("RELOAD_MOVE");
GL11.glTranslated(reloadMove[0], reloadMove[1], reloadMove[2]);
double[] reloadRot = HbmAnimations.getRelevantTransformation("RELOAD_ROT");
GL11.glRotated(reloadRot[0], 1, 0, 0);
GL11.glRotated(reloadRot[2], 0, 0, 1);
GL11.glRotated(reloadRot[1], 0, 1, 0);
ResourceManager.bio_revolver.renderPart("Grip");
GL11.glPushMatrix(); /// FRONT PUSH ///
GL11.glRotated(HbmAnimations.getRelevantTransformation("FRONT")[2], 1, 0, 0);
ResourceManager.bio_revolver.renderPart("Barrel");
GL11.glPushMatrix(); /// LATCH PUSH ///
GL11.glTranslated(0, 2.3125, -0.875);
GL11.glRotated(HbmAnimations.getRelevantTransformation("LATCH")[2], 1, 0, 0);
GL11.glTranslated(0, -2.3125, 0.875);
ResourceManager.bio_revolver.renderPart("Latch");
GL11.glPopMatrix(); /// LATCH POP ///
GL11.glPushMatrix(); /// DRUM PUSH ///
GL11.glTranslated(0, 1, 0);
GL11.glRotated(HbmAnimations.getRelevantTransformation("DRUM")[2] * 60, 0, 0, 1);
GL11.glTranslated(0, -1, 0);
GL11.glTranslated(0, 0, HbmAnimations.getRelevantTransformation("DRUM_PUSH")[2]);
ResourceManager.bio_revolver.renderPart("Drum");
GL11.glPopMatrix(); /// DRUM POP ///
GL11.glPopMatrix(); /// FRONT POP ///
GL11.glPushMatrix(); /// HAMMER ///
GL11.glTranslated(0, 0, -4.5);
GL11.glRotated(-45 + 45 * HbmAnimations.getRelevantTransformation("HAMMER")[2], 1, 0, 0);
GL11.glTranslated(0, 0, 4.5);
ResourceManager.bio_revolver.renderPart("Hammer");
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
break;
case EQUIPPED:
double scale = 0.1D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(10, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(4F, 1F, 4F);
break;
case ENTITY:
double s1 = 0.075D;
GL11.glScaled(s1, s1, s1);
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0F, 1F, 0F);
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
double s = 0.8D;
GL11.glTranslated(8, 7, 0);
GL11.glRotated(-90, 0, 1, 0);
GL11.glRotated(-135, 1, 0, 0);
GL11.glScaled(s, s, -s);
break;
default: break;
}
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.bio_revolver.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}
GL11.glPopMatrix();
}
}

View File

@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.GunB92;
import com.hbm.items.weapon.GunLeverActionS;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelB92;
import com.hbm.render.model.ModelB93;
@ -71,12 +70,6 @@ public class ItemRenderGunAnim implements IItemRenderer {
GL11.glTranslatef(2.3F, 0.2F, 0.8F);
}
if((item.getItem() == ModItems.gun_lever_action_sonata) && GunLeverActionS.getRotationFromAnim(item) > 0) {
GL11.glRotatef(GunLeverActionS.getRotationFromAnim(item) * -25, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(GunLeverActionS.getOffsetFromAnim(item) * 1.5F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, GunLeverActionS.getOffsetFromAnim(item) * -1.5F, 0.0F);
}
if(item.getItem() == ModItems.gun_b92 && GunB92.getRotationFromAnim(item) > 0) {
float off = GunB92.getRotationFromAnim(item) * 2;
GL11.glRotatef(GunB92.getRotationFromAnim(item) * -90, 0.0F, 0.0F, 1.0F);
@ -88,9 +81,6 @@ public class ItemRenderGunAnim implements IItemRenderer {
GL11.glRotatef(GunB92.getRotationFromAnim(item) * -90, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(off * -0.5F, off * -0.5F, 0.0F);
}
if(item.getItem() == ModItems.gun_lever_action_sonata)
flippedGun.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunLeverActionS.getRotationFromAnim(item));
if(item.getItem() == ModItems.gun_b92)
b92.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunB92.getTransFromAnim(item));
if(item.getItem() == ModItems.gun_b93)
@ -131,8 +121,6 @@ public class ItemRenderGunAnim implements IItemRenderer {
GL11.glTranslatef(2.3F, 0.2F, 0.8F);
}
if(item.getItem() == ModItems.gun_lever_action_sonata)
flippedGun.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunLeverActionS.getRotationFromAnim(item));
if(item.getItem() == ModItems.gun_b92)
b92.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunB92.getTransFromAnim(item));
if(item.getItem() == ModItems.gun_b93)

View File

@ -1,105 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemGunChemthrower;
import com.hbm.main.ResourceManager;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponChemthrower implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.chemthrower_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.25D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1.0, 0.0, 0.0);
GL11.glRotated(170, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
break;
case EQUIPPED:
double scale = 0.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(100, 0, 1, 0);
GL11.glRotated(-10, 1, 0, 0);
GL11.glRotated(10, 0, 0, 1);
GL11.glTranslatef(-0.25F, -2.5F, 1.75F);
break;
case ENTITY:
double s1 = 0.25D;
GL11.glScaled(s1, s1, s1);
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
double s = 1.5D;
GL11.glTranslated(9, 9, 0);
GL11.glRotated(180, 1, 0, 0);
GL11.glRotated(45, 0, 0, -1);
GL11.glScaled(s, s, -s);
break;
default: break;
}
ItemGunChemthrower chem = (ItemGunChemthrower) item.getItem();
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.chemthrower.renderPart("Gun");
ResourceManager.chemthrower.renderPart("Hose");
ResourceManager.chemthrower.renderPart("Nozzle");
GL11.glTranslated(0, 0.875, 1.75);
double d = (double) chem.getMag(item) / (double) chem.mainConfig.ammoCap;
GL11.glRotated(135 - d * 270, 1, 0, 0);
GL11.glTranslated(0, -0.875, -1.75);
ResourceManager.chemthrower.renderPart("Gauge");
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

View File

@ -1,100 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponCoilgun implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.coilgun_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.25D;
GL11.glRotated(20, 0, 0, 1);
GL11.glTranslated(0.75, 0.3, -0.5);
GL11.glRotated(-10, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(-1.5 - recoil[0] * 0.5, 0, 0);
GL11.glRotated(recoil[0] * 45, 0, 0, 1);
GL11.glTranslated(1.5, 0, 0);
double[] reload = HbmAnimations.getRelevantTransformation("RELOAD");
GL11.glTranslated(-2.5, 0, 0);
GL11.glRotated(reload[0] * -45, 0, 0, 1);
GL11.glTranslated(2.5, 0, 0);
break;
case EQUIPPED:
double scale = 0.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-80, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-15F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(1.25F, 0.5F, -1.75F);
break;
case ENTITY:
double s1 = 0.2D;
GL11.glScaled(s1, s1, s1);
break;
case INVENTORY:
double s = 3.5D;
GL11.glTranslated(6, 8, 0);
GL11.glRotated(-135, 0, 0, 1);
GL11.glScaled(s, s, -s);
break;
default: break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.coilgun.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

View File

@ -1,164 +0,0 @@
package com.hbm.render.item.weapon;
import java.awt.Color;
import org.lwjgl.opengl.GL11;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponCongo implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.congolake_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.25D;
GL11.glRotated(20, 0, 0, 1);
GL11.glTranslated(0.5, 0.0, -0.5);
GL11.glRotated(-10, 0, 1, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
HbmAnimations.applyRelevantTransformation("Gun");
ResourceManager.congolake.renderPart("Gun");
GL11.glPushMatrix();
{
HbmAnimations.applyRelevantTransformation("Pump");
ResourceManager.congolake.renderPart("Pump");
}
GL11.glPopMatrix();
GL11.glPushMatrix();
{
HbmAnimations.applyRelevantTransformation("Sight");
ResourceManager.congolake.renderPart("Sight");
}
GL11.glPopMatrix();
GL11.glPushMatrix();
{
HbmAnimations.applyRelevantTransformation("Loop");
ResourceManager.congolake.renderPart("Loop");
}
GL11.glPopMatrix();
GL11.glPushMatrix();
{
HbmAnimations.applyRelevantTransformation("GuardOuter");
ResourceManager.congolake.renderPart("GuardOuter");
GL11.glPushMatrix();
{
HbmAnimations.applyRelevantTransformation("GuardInner");
ResourceManager.congolake.renderPart("GuardInner");
}
GL11.glPopMatrix();
}
GL11.glPopMatrix();
GL11.glPushMatrix();
{
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.casings_tex);
HbmAnimations.applyRelevantTransformation("Shell");
ItemGunBase gun = (ItemGunBase)item.getItem();
BulletConfiguration bullet = BulletConfigSyncingUtil.pullConfig(gun.mainConfig.config.get(ItemGunBase.getMagType(item)));
int[] colors = bullet.spentCasing != null ? bullet.spentCasing.getColors() : new int[] { SpentCasing.COLOR_CASE_40MM };
Color shellColor = new Color(colors[0]);
GL11.glColor3f(shellColor.getRed() / 255F, shellColor.getGreen() / 255F, shellColor.getBlue() / 255F);
ResourceManager.congolake.renderPart("Shell");
Color shellForeColor = new Color(colors.length > 1 ? colors[1] : colors[0]);
GL11.glColor3f(shellForeColor.getRed() / 255F, shellForeColor.getGreen() / 255F, shellForeColor.getBlue() / 255F);
ResourceManager.congolake.renderPart("ShellFore");
GL11.glColor3f(1F, 1F, 1F);
}
GL11.glPopMatrix();
break;
case EQUIPPED:
double scale = 0.35D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(15, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(1.25F, -1F, 1.5F);
break;
case ENTITY:
double s1 = 0.2D;
GL11.glScaled(s1, s1, s1);
break;
case INVENTORY:
double s = 2D;
GL11.glTranslated(6, 9, 0);
GL11.glRotated(-135, 0, 0, 1);
GL11.glRotated(-90, 0, 1, 0);
GL11.glScaled(s, s, -s);
break;
default: break;
}
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
ResourceManager.congolake.renderAll();
}
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

View File

@ -1,256 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.ItemGunPip;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponLilMac implements IItemRenderer {
public static final ResourceLocation lilmac_plume = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_plume.png");
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
//prevent rendering when using scope
if(item.getItem() == ModItems.gun_revolver_pip && type == ItemRenderType.EQUIPPED_FIRST_PERSON && MainRegistry.proxy.me().isSneaking()) return;
GL11.glPushMatrix();
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.1D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1.0, 0.25, -0.25);
GL11.glRotated(170, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double width = 0.5D;
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
double[] reloadLift = HbmAnimations.getRelevantTransformation("RELOAD_LIFT");
double[] reloadJolt = HbmAnimations.getRelevantTransformation("RELOAD_JOLT");
double[] equipSpin = HbmAnimations.getRelevantTransformation("ROTATE");
GL11.glTranslated(2, 0, 0);
GL11.glRotated(equipSpin[0], 0, 0, 1);
GL11.glTranslated(-2, 0, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glPushMatrix();
Tessellator tess = Tessellator.instance;
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
GL11.glTranslated(-10, 2.25, 0);
GL11.glTranslated(-recoil[2] * 3.5, -recoil[2] * 1.375, 0);
if(ItemGunPip.smokeNodes.size() > 1 && equipSpin[0] == 0) {
tess.startDrawingQuads();
tess.setNormal(0F, 1F, 0F);
for(int i = 0; i < ItemGunPip.smokeNodes.size() - 1; i++) {
double[] node = ItemGunPip.smokeNodes.get(i);
double[] past = ItemGunPip.smokeNodes.get(i + 1);
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
tess.addVertex(node[0], node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(node[0], node[1], node[2] + width);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(past[0], past[1], past[2] + width);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.addVertex(past[0], past[1], past[2]);
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
tess.addVertex(node[0], node[1], node[2]);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(node[0], node[1], node[2] - width);
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
tess.addVertex(past[0], past[1], past[2] - width);
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
tess.addVertex(past[0], past[1], past[2]);
}
GL11.glDepthMask(false);
tess.draw();
GL11.glDepthMask(true);
}
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
GL11.glTranslated(0, reloadLift[0] / -22D, 0);
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
GL11.glRotated(recoil[2] * 10, 0, 0, 1);
GL11.glRotated(reloadLift[0], 0, 0, 1);
GL11.glTranslated(reloadJolt[0], 0, 0);
double[] reloadTilt = HbmAnimations.getRelevantTransformation("RELAOD_TILT");
GL11.glRotated(reloadTilt[0], 1, 0, 0);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_scope_tex);
ResourceManager.lilmac.renderPart("Scope");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_tex);
ResourceManager.lilmac.renderPart("Gun");
double[] cylinderFlip = HbmAnimations.getRelevantTransformation("RELOAD_CYLINDER");
GL11.glPushMatrix(); /// DRUM PUSH ///
GL11.glRotated(cylinderFlip[0], 1, 0, 0);
ResourceManager.lilmac.renderPart("Pivot");
GL11.glTranslated(0, 1.75, 0);
GL11.glRotated(HbmAnimations.getRelevantTransformation("DRUM")[2] * -60, 1, 0, 0);
GL11.glTranslated(0, -1.75, 0);
ResourceManager.lilmac.renderPart("Cylinder");
double[] reloadBullets = HbmAnimations.getRelevantTransformation("RELOAD_BULLETS");
GL11.glTranslated(reloadBullets[0], reloadBullets[1], reloadBullets[2]);
if(HbmAnimations.getRelevantTransformation("RELOAD_BULLETS_CON")[0] != 1)
ResourceManager.lilmac.renderPart("Bullets");
ResourceManager.lilmac.renderPart("Casings");
GL11.glPopMatrix(); /// DRUM POP ///
GL11.glPushMatrix(); /// HAMMER ///
GL11.glTranslated(4, 1.25, 0);
GL11.glRotated(-30 + 30 * HbmAnimations.getRelevantTransformation("HAMMER")[2], 0, 0, 1);
GL11.glTranslated(-4, -1.25, 0);
ResourceManager.lilmac.renderPart("Hammer");
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
int flash = 75;
if(System.currentTimeMillis() - ItemGunPip.lastShot < flash) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glPushMatrix();
GL11.glTranslated(0.125, 2.25, 0);
double fire = (System.currentTimeMillis() - ItemGunPip.lastShot) / (double) flash;
double height = 4 * fire;
double length = 15 * fire;
double lift = 3 * fire;
double offset = 1 * fire;
double lengthOffset = 0.125;
Minecraft.getMinecraft().renderEngine.bindTexture(lilmac_plume);
tess.startDrawingQuads();
tess.setNormal(0F, 1F, 0F);
tess.setColorRGBA_F(1F, 1F, 1F, 1F);
tess.addVertexWithUV(0, -height, -offset, 1, 1);
tess.addVertexWithUV(0, height, -offset, 0, 1);
tess.addVertexWithUV(0, height + lift, length - offset, 0 ,0);
tess.addVertexWithUV(0, -height + lift, length - offset, 1, 0);
tess.addVertexWithUV(0, height, offset, 0, 1);
tess.addVertexWithUV(0, -height, offset, 1, 1);
tess.addVertexWithUV(0, -height + lift, -length + offset, 1, 0);
tess.addVertexWithUV(0, height + lift, -length + offset, 0 ,0);
tess.addVertexWithUV(0, -height, -offset, 1, 1);
tess.addVertexWithUV(0, height, -offset, 0, 1);
tess.addVertexWithUV(lengthOffset, height, length - offset, 0 ,0);
tess.addVertexWithUV(lengthOffset, -height, length - offset, 1, 0);
tess.addVertexWithUV(0, height, offset, 0, 1);
tess.addVertexWithUV(0, -height, offset, 1, 1);
tess.addVertexWithUV(lengthOffset, -height, -length + offset, 1, 0);
tess.addVertexWithUV(lengthOffset, height, -length + offset, 0 ,0);
tess.draw();
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_BLEND);
}
break;
case EQUIPPED:
double scale = 0.1D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(100, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-3F, 1F, 4F);
break;
case ENTITY:
double s1 = 0.075D;
GL11.glScaled(s1, s1, s1);
GL11.glTranslatef(0F, 1F, 0F);
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
GL11.glEnable(GL11.GL_ALPHA_TEST);
double s = 0.8D;
GL11.glTranslated(8, 8, 0);
GL11.glRotated(180, 0, 1, 0);
GL11.glRotated(135, 0, 0, 1);
GL11.glScaled(s, s, -s);
break;
default: break;
}
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_scope_tex);
ResourceManager.lilmac.renderPart("Scope");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_tex);
ResourceManager.lilmac.renderPart("Gun");
ResourceManager.lilmac.renderPart("Cylinder");
ResourceManager.lilmac.renderPart("Bullets");
ResourceManager.lilmac.renderPart("Casings");
ResourceManager.lilmac.renderPart("Pivot");
ResourceManager.lilmac.renderPart("Hammer");
GL11.glShadeModel(GL11.GL_FLAT);
}
GL11.glPopMatrix();
}
}

View File

@ -1,135 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponQuadro implements IItemRenderer {
public ItemRenderWeaponQuadro() { }
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
switch(type) {
case EQUIPPED_FIRST_PERSON:
if(item.getItem() == ModItems.gun_quadro) {
GL11.glTranslatef(0.75F, 0.0F, -0.15F);
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-25F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
GL11.glScaled(0.5, 0.5, 0.5);
if(player.isSneaking()) {
GL11.glRotatef(5F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(1.0F, 0.5F, 0.3F);
}
double[] recoil = HbmAnimations.getRelevantTransformation("QUADRO_RECOIL");
GL11.glTranslated(0, 0, recoil[2]);
double[] reload = HbmAnimations.getRelevantTransformation("QUADRO_RELOAD_ROTATE");
GL11.glRotated(reload[2], 1, 0, 0);
}
break;
case EQUIPPED:
if(item.getItem() == ModItems.gun_quadro) {
GL11.glRotatef(20F, 1.0F, 0.0F, 1.0F);
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.4F, -0.35F, -0.4F);
GL11.glScaled(0.75, 0.75, 0.75);
}
break;
case ENTITY:
if(item.getItem() == ModItems.gun_quadro) {
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.0F, 0.0F);
GL11.glScaled(0.75, 0.75, 0.75);
}
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
if(item.getItem() == ModItems.gun_quadro) {
GL11.glScaled(4.5, 4.5, -4.5);
GL11.glTranslatef(1.0F, 2.5F, 0.0F);
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-45F, 1.0F, 0.0F, 0.0F);
}
break;
default: break;
}
if(item.getItem() == ModItems.gun_quadro) {
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
ResourceManager.quadro.renderPart("Launcher");
if(ItemGunBase.getMag(item) > 0 || ItemGunBase.getIsReloading(item) && type != ItemRenderType.INVENTORY) {
GL11.glPushMatrix();
GL11.glTranslated(0, -1, 0);
double[] push = HbmAnimations.getRelevantTransformation("QUADRO_RELOAD_PUSH");
GL11.glTranslated(0, 3, 0);
GL11.glRotated(push[1] * 30, 1, 0, 0);
GL11.glTranslated(0, -3, 0);
GL11.glTranslated(0, 0, push[0] * 3);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_rocket_tex);
ResourceManager.quadro.renderPart("Rockets");
GL11.glPopMatrix();
}
GL11.glShadeModel(GL11.GL_FLAT);
}
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
}

View File

@ -1,131 +0,0 @@
package com.hbm.render.item.weapon;
import java.awt.Color;
import org.lwjgl.opengl.GL11;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponSpas12 implements IItemRenderer {
public ItemRenderWeaponSpas12() { }
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.spas_12_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.5D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(0, -0.8, 0.1);
GL11.glRotated(-100, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
HbmAnimations.applyRelevantTransformation("MainBody");
ResourceManager.spas_12.renderPart("MainBody");
GL11.glPushMatrix();
HbmAnimations.applyRelevantTransformation("PumpGrip");
ResourceManager.spas_12.renderPart("PumpGrip");
GL11.glPopMatrix();
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.casings_tex);
HbmAnimations.applyRelevantTransformation("Shell");
ItemGunBase gun = (ItemGunBase)item.getItem();
BulletConfiguration bullet = BulletConfigSyncingUtil.pullConfig(gun.mainConfig.config.get(ItemGunBase.getMagType(item)));
int[] colors = bullet.spentCasing.getColors();
Color shellColor = new Color(colors[1]);
GL11.glColor3f(shellColor.getRed() / 255F, shellColor.getGreen() / 255F, shellColor.getBlue() / 255F);
ResourceManager.spas_12.renderPart("Shell");
Color shellForeColor = new Color(colors[0]);
GL11.glColor3f(shellForeColor.getRed() / 255F, shellForeColor.getGreen() / 255F, shellForeColor.getBlue() / 255F);
ResourceManager.spas_12.renderPart("ShellFore");
GL11.glColor3f(1F, 1F, 1F);
GL11.glPopMatrix();
break;
case EQUIPPED:
double scale = 0.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(190, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-2F, -1F, 2F);
ResourceManager.spas_12.renderAll();
break;
case ENTITY:
double s1 = 0.25D;
GL11.glScaled(s1, s1, s1);
GL11.glTranslated(0, 0, 4);
ResourceManager.spas_12.renderAll();
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
double s = 1.6D;
GL11.glTranslated(12, 13.5, 0);
GL11.glRotated(-90, 0, 1, 0);
GL11.glRotated(-135, 1, 0, 0);
GL11.glScaled(s, s, s);
ResourceManager.spas_12.renderAll();
break;
default: break;
}
GL11.glPopMatrix();
}
}

View File

@ -1,116 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemGunGauss;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderWeaponTau implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.tau_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.35D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1.5, 0, 0.1);
GL11.glRotated(80, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(0, 0, recoil[0] * -1);
GL11.glTranslated(0, 0, -3);
GL11.glRotated(recoil[0] * -5, 1, 0, 0);
GL11.glTranslated(0, 0, 3);
ResourceManager.tau.renderPart("Body");
if(ItemGunGauss.getCharge(item) > 0) {
GL11.glTranslated(0, -0.2, 0);
GL11.glRotated(System.currentTimeMillis() % 360D, 0, 0, 1);
GL11.glTranslated(0, 0.2, 0);
}
ResourceManager.tau.renderPart("Rotor");
break;
case EQUIPPED:
double scale = 0.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(10, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(2F, 1F, 3F);
ResourceManager.tau.renderAll();
break;
case ENTITY:
double s1 = 0.25D;
GL11.glScaled(s1, s1, s1);
GL11.glTranslated(0, 1, 0);
ResourceManager.tau.renderAll();
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
double s = 1.6D;
GL11.glTranslated(8, 7, 0);
GL11.glRotated(-90, 0, 1, 0);
GL11.glRotated(-135, 1, 0, 0);
GL11.glScaled(s, s, -s);
ResourceManager.tau.renderAll();
break;
default: break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
}

View File

@ -9,10 +9,8 @@ import com.hbm.blocks.BlockDummyable;
import com.hbm.entity.logic.EntityBomber;
import com.hbm.entity.missile.EntityMissileBaseNT;
import com.hbm.entity.missile.EntityMissileCustom;
import com.hbm.entity.projectile.EntityBulletBaseNT;
import com.hbm.entity.projectile.EntityBulletBaseMK4;
import com.hbm.entity.train.EntityRailCarBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.CompatHandler;
import com.hbm.interfaces.IControlReceiver;
@ -20,6 +18,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.container.ContainerTurretBase;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemTurretBiometry;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.lib.Library;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
@ -331,7 +330,7 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
public boolean usesCasings() { return false; }
public int casingDelay() { return 0; }
public BulletConfiguration getFirstConfigLoaded() {
public BulletConfig getFirstConfigLoaded() {
List<Integer> list = getAmmoList();
@ -346,10 +345,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
for(Integer c : list) { //we can afford all this extra iteration trash on the count that a turret has at most like 4 bullet configs
BulletConfiguration conf = BulletConfigSyncingUtil.pullConfig(c);
if(conf.ammo != null && conf.ammo.matchesRecipe(slots[i], true))
return conf;
BulletConfig conf = BulletConfig.configs.get(c);
if(conf.ammo != null && conf.ammo.matchesRecipe(slots[i], true)) return conf;
}
}
}
@ -357,17 +354,15 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
return null;
}
public void spawnBullet(BulletConfiguration bullet) {
public void spawnBullet(BulletConfig bullet, float baseDamage) {
Vec3 pos = this.getTurretPos();
Vec3 vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
vec.rotateAroundZ((float) -this.rotationPitch);
vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5));
EntityBulletBaseNT proj = new EntityBulletBaseNT(worldObj, BulletConfigSyncingUtil.getKey(bullet));
proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, 0.0F, 0.0F);
proj.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, bullet.velocity, bullet.spread);
EntityBulletBaseMK4 proj = new EntityBulletBaseMK4(worldObj, bullet, baseDamage, bullet.spread, (float) rotationYaw, (float) rotationPitch);
proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, proj.rotationYaw, proj.rotationPitch);
worldObj.spawnEntityInWorld(proj);
if(usesCasings()) {
@ -809,7 +804,7 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
ammoStacks = new ArrayList();
for(Integer i : getAmmoList()) {
BulletConfiguration config = BulletConfigSyncingUtil.pullConfig(i);
BulletConfig config = BulletConfig.configs.get(i);
if(config != null && config.ammo != null) {
ammoStacks.add(config.ammo.toStack());

View File

@ -3,10 +3,10 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.inventory.gui.GUITurretChekhov;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.factory.XFactory50;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
@ -26,15 +26,11 @@ public class TileEntityTurretChekhov extends TileEntityTurretBaseNT {
//also having a floaty `static` like this looks fun
//idk if it's just me though
static {
configs.add(BulletConfigSyncingUtil.BMG50_NORMAL);
configs.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
configs.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
configs.add(BulletConfigSyncingUtil.BMG50_AP);
configs.add(BulletConfigSyncingUtil.BMG50_DU);
configs.add(BulletConfigSyncingUtil.BMG50_STAR);
configs.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
configs.add(BulletConfigSyncingUtil.BMG50_SLEEK);
configs.add(BulletConfigSyncingUtil.CHL_BMG50);
configs.add(XFactory50.bmg50_sp.id);
configs.add(XFactory50.bmg50_fmj.id);
configs.add(XFactory50.bmg50_jhp.id);
configs.add(XFactory50.bmg50_ap.id);
configs.add(XFactory50.bmg50_du.id);
}
@Override
@ -76,11 +72,11 @@ public class TileEntityTurretChekhov extends TileEntityTurretBaseNT {
if(timer > 20 && timer % getDelay() == 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
BulletConfig conf = this.getFirstConfigLoaded();
if(conf != null) {
this.cachedCasingConfig = conf.spentCasing;
this.spawnBullet(conf);
this.cachedCasingConfig = conf.casing;
this.spawnBullet(conf, 10F);
this.conusmeAmmo(conf.ammo);
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.chekhov_fire", 2.0F, 1.0F);

View File

@ -3,9 +3,9 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.CasingEjector;
import com.hbm.inventory.gui.GUITurretFriendly;
import com.hbm.items.weapon.sedna.factory.XFactory556mm;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -17,11 +17,10 @@ public class TileEntityTurretFriendly extends TileEntityTurretChekhov {
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.R5_NORMAL);
configs.add(BulletConfigSyncingUtil.R5_EXPLOSIVE);
configs.add(BulletConfigSyncingUtil.R5_DU);
configs.add(BulletConfigSyncingUtil.R5_STAR);
configs.add(BulletConfigSyncingUtil.CHL_R5);
configs.add(XFactory556mm.r556_sp.id);
configs.add(XFactory556mm.r556_fmj.id);
configs.add(XFactory556mm.r556_jhp.id);
configs.add(XFactory556mm.r556_ap.id);
}
@Override

View File

@ -4,11 +4,10 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.config.WeaponConfig;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.guncfg.GunDGKFactory;
import com.hbm.inventory.gui.GUITurretHoward;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
@ -25,10 +24,11 @@ import net.minecraft.world.World;
public class TileEntityTurretHoward extends TileEntityTurretBaseNT {
static BulletConfig dgk_normal = new BulletConfig();
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.DGK_NORMAL);
configs.add(dgk_normal.id);
}
@Override
@ -114,7 +114,7 @@ public class TileEntityTurretHoward extends TileEntityTurretBaseNT {
} else {
if(loaded <= 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
BulletConfig conf = this.getFirstConfigLoaded();
if(conf != null) {
this.conusmeAmmo(conf.ammo);

View File

@ -3,12 +3,23 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.handler.CasingEjector;
import com.hbm.inventory.gui.GUITurretJeremy;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo240Shell;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.factory.Lego;
import com.hbm.items.weapon.sedna.factory.XFactoryCatapult;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
@ -20,14 +31,31 @@ import net.minecraft.world.World;
public class TileEntityTurretJeremy extends TileEntityTurretBaseNT {
public static SpentCasing CASINNG240MM = new SpentCasing(CasingType.BOTTLENECK).setScale(7.5F).setBounceMotion(0.02F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(1F, 0.5D, 60, 20);
public static BulletConfig shell_normal = new BulletConfig().setItem(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.STOCK)).setDamage(1F).setCasing(CASINNG240MM).setOnImpact((bullet, mop) -> {
Lego.standardExplode(bullet, mop, 10F); bullet.setDead();
});
public static BulletConfig shell_explosive = new BulletConfig().setItem(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.EXPLOSIVE)).setDamage(1.5F).setCasing(CASINNG240MM).setOnImpact((bullet, mop) -> {
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 10F);
vnt.setBlockAllocator(new BlockAllocatorStandard());
vnt.setBlockProcessor(new BlockProcessorStandard());
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
vnt.explode();
bullet.setDead();
});
public static BulletConfig shell_ap = new BulletConfig().setItem(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.APFSDS_T)).setDamage(2F).setDoesPenetrate(true).setCasing(CASINNG240MM);
public static BulletConfig shell_du = new BulletConfig().setItem(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.APFSDS_DU)).setDamage(2.5F).setDoesPenetrate(true).setDamageFalloutByPen(false).setCasing(CASINNG240MM);
public static BulletConfig shell_w9 = new BulletConfig().setItem(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.W9)).setDamage(2.5F).setCasing(CASINNG240MM).setOnImpact(XFactoryCatapult.LAMBDA_NUKE_STANDARD);
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.SHELL_NORMAL);
configs.add(BulletConfigSyncingUtil.SHELL_EXPLOSIVE);
configs.add(BulletConfigSyncingUtil.SHELL_AP);
configs.add(BulletConfigSyncingUtil.SHELL_DU);
configs.add(BulletConfigSyncingUtil.SHELL_W9);
configs.add(shell_normal.id);
configs.add(shell_explosive.id);
configs.add(shell_ap.id);
configs.add(shell_du.id);
configs.add(shell_w9.id);
}
@Override
@ -87,11 +115,11 @@ public class TileEntityTurretJeremy extends TileEntityTurretBaseNT {
if(timer % 40 == 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
BulletConfig conf = this.getFirstConfigLoaded();
if(conf != null) {
this.cachedCasingConfig = conf.spentCasing;
this.spawnBullet(conf);
this.cachedCasingConfig = conf.casing;
this.spawnBullet(conf, 50F);
this.conusmeAmmo(conf.ammo);
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.jeremy_fire", 4.0F, 1.0F);
Vec3 pos = this.getTurretPos();

View File

@ -3,9 +3,7 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.entity.projectile.EntityBulletBaseNT;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.entity.projectile.EntityBulletBaseMK4;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.gui.GUITurretRichard;
import com.hbm.items.ItemAmmoEnums.AmmoRocket;
@ -14,6 +12,8 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.factory.XFactoryRocket;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
@ -25,18 +25,7 @@ public class TileEntityTurretRichard extends TileEntityTurretBaseNT {
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.ROCKET_NORMAL);
configs.add(BulletConfigSyncingUtil.ROCKET_HE);
configs.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY);
configs.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL);
configs.add(BulletConfigSyncingUtil.ROCKET_EMP);
configs.add(BulletConfigSyncingUtil.ROCKET_GLARE);
configs.add(BulletConfigSyncingUtil.ROCKET_SLEEK);
configs.add(BulletConfigSyncingUtil.ROCKET_NUKE);
configs.add(BulletConfigSyncingUtil.ROCKET_CHAINSAW);
configs.add(BulletConfigSyncingUtil.ROCKET_TOXIC);
configs.add(BulletConfigSyncingUtil.ROCKET_PHOSPHORUS);
configs.add(BulletConfigSyncingUtil.ROCKET_CANISTER);
for(BulletConfig cfg : XFactoryRocket.rocket_ml) configs.add(cfg.id);
}
@Override
@ -129,10 +118,10 @@ public class TileEntityTurretRichard extends TileEntityTurretBaseNT {
if(timer > 0 && timer % 10 == 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
BulletConfig conf = this.getFirstConfigLoaded();
if(conf != null) {
this.spawnBullet(conf);
this.spawnBullet(conf, 30F);
this.conusmeAmmo(conf.ammo);
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.richard_fire", 2.0F, 1.0F);
this.loaded--;
@ -147,17 +136,15 @@ public class TileEntityTurretRichard extends TileEntityTurretBaseNT {
}
@Override
public void spawnBullet(BulletConfiguration bullet) {
public void spawnBullet(BulletConfig bullet, float baseDamage) {
Vec3 pos = this.getTurretPos();
Vec3 vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
vec.rotateAroundZ((float) -this.rotationPitch);
vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5));
EntityBulletBaseNT proj = new EntityBulletBaseNT(worldObj, BulletConfigSyncingUtil.getKey(bullet));
proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, 0.0F, 0.0F);
proj.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, bullet.velocity * 0.75F, bullet.spread);
EntityBulletBaseMK4 proj = new EntityBulletBaseMK4(worldObj, bullet, baseDamage, bullet.spread, (float) rotationYaw, (float) rotationPitch);
proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, proj.rotationYaw, proj.rotationPitch);
worldObj.spawnEntityInWorld(proj);
}

View File

@ -3,11 +3,11 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.inventory.container.ContainerTurretBase;
import com.hbm.inventory.gui.GUITurretSentry;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.factory.XFactory9mm;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.tileentity.IGUIProvider;
@ -37,11 +37,10 @@ public class TileEntityTurretSentry extends TileEntityTurretBaseNT implements IG
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.R5_NORMAL);
configs.add(BulletConfigSyncingUtil.R5_EXPLOSIVE);
configs.add(BulletConfigSyncingUtil.R5_DU);
configs.add(BulletConfigSyncingUtil.R5_STAR);
configs.add(BulletConfigSyncingUtil.CHL_R5);
configs.add(XFactory9mm.p9_sp.id);
configs.add(XFactory9mm.p9_fmj.id);
configs.add(XFactory9mm.p9_jhp.id);
configs.add(XFactory9mm.p9_ap.id);
}
@Override
@ -161,11 +160,11 @@ public class TileEntityTurretSentry extends TileEntityTurretBaseNT implements IG
if(timer % 10 == 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
BulletConfig conf = this.getFirstConfigLoaded();
if(conf != null) {
this.cachedCasingConfig = conf.spentCasing;
this.spawnBullet(conf);
this.cachedCasingConfig = conf.casing;
this.spawnBullet(conf, 5F);
this.conusmeAmmo(conf.ammo);
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.sentry_fire", 2.0F, 1.0F);

View File

@ -1,7 +1,7 @@
package com.hbm.tileentity.turret;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.factory.XFactory9mm;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
@ -55,7 +55,7 @@ public class TileEntityTurretSentryDamaged extends TileEntityTurretSentry {
if(timer % 10 == 0) {
BulletConfiguration conf = BulletConfigSyncingUtil.pullConfig(BulletConfigSyncingUtil.R5_NORMAL);
BulletConfig conf = XFactory9mm.p9_fmj;
if(conf != null) {
@ -63,11 +63,11 @@ public class TileEntityTurretSentryDamaged extends TileEntityTurretSentry {
Vec3 vec = Vec3.createVectorHelper(0, 0, 0);
Vec3 side = Vec3.createVectorHelper(0, 0, 0);
this.cachedCasingConfig = conf.spentCasing;
this.cachedCasingConfig = conf.casing;
if(shotSide) {
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.sentry_fire", 2.0F, 1.0F);
this.spawnBullet(conf);
this.spawnBullet(conf, 5F);
vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
vec.rotateAroundZ((float) -this.rotationPitch);

View File

@ -3,9 +3,9 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.inventory.gui.GUITurretTauon;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.factory.XFactoryAccelerator;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
@ -23,7 +23,7 @@ public class TileEntityTurretTauon extends TileEntityTurretBaseNT {
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.SPECIAL_GAUSS);
configs.add(XFactoryAccelerator.tau_uranium.id);
}
@Override
@ -123,7 +123,7 @@ public class TileEntityTurretTauon extends TileEntityTurretBaseNT {
if(timer % 5 == 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
BulletConfig conf = this.getFirstConfigLoaded();
if(conf != null && this.target != null) {
this.target.attackEntityFrom(ModDamageSource.electricity, 30F + worldObj.rand.nextInt(11));

View File

@ -1161,6 +1161,7 @@ item.ammo_standard.bmg50_fmj.name=.50 BMG Patrone (Vollmantelgeschoss)
item.ammo_standard.bmg50_jhp.name=.50 BMG Patrone (Hohlspitz)
item.ammo_standard.bmg50_sp.name=.50 BMG Patrone (Teilmantelgeschoss)
item.ammo_standard.capacitor.name=Kondensator
item.ammo_standard.capacitor_ir.name=Capacitor (niedrige Wellenlänge)
item.ammo_standard.capacitor_overcharge.name=Kondensator (Überladung)
item.ammo_standard.flame_balefire.name=Flammenwerferbrennstoff, Balefire
item.ammo_standard.flame_diesel.name=Flammenwerferbrennstoff, Diesel

View File

@ -1884,6 +1884,7 @@ item.ammo_standard.bmg50_fmj.name=.50 BMG Round (Full Metal Jacket)
item.ammo_standard.bmg50_jhp.name=.50 BMG Round (Jacketed Hollow Point)
item.ammo_standard.bmg50_sp.name=.50 BMG Round (Soft Point)
item.ammo_standard.capacitor.name=Capacitor
item.ammo_standard.capacitor_ir.name=Capacitor (Low Wavelength)
item.ammo_standard.capacitor_overcharge.name=Capacitor (Overcharge)
item.ammo_standard.flame_balefire.name=Flamer Fuel, Balefire
item.ammo_standard.flame_diesel.name=Flamer Fuel, Diesel