Merge branch 'master' into master

This commit is contained in:
HbmMods 2023-02-06 08:02:31 +01:00 committed by GitHub
commit dac27bbfb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
339 changed files with 13857 additions and 19713 deletions

View File

@ -1,8 +1,19 @@
# Hbm-s-Nuclear-Tech-GIT
# HBM's Nuclear Tech Mod for Minecraft 1.7.10
https://minecraft.curseforge.com/projects/hbms-nuclear-tech-mod?gameCategorySlug=mc-mods&projectID=235439
[NTM on Modrinth](https://modrinth.com/mod/ntm)
For a 1.12 fork, check this link: https://github.com/Drillgon200/Hbm-s-Nuclear-Tech-GIT/releases
[NTM on CurseForge](https://minecraft.curseforge.com/projects/hbms-nuclear-tech-mod?gameCategorySlug=mc-mods&projectID=235439)
**This is for 1.7.10!** For 1.12, check out these projects:
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
* NTM Alcater Edition: https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
For 1.18, try Martin's remake: https://github.com/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
## Downloading pre-compiled versions from GitHub
Simply navigate to "Releases" on the right side of the page, download links for the compiled JAR as well as the corresponding source code are under the "Assets" category below the changelog. Make sure to review all changelogs when updating!
## Building from source
@ -81,4 +92,4 @@ If you want to make some changes to the mod, follow this guide:
10. Code!
# License
This software is licensed under the GNU Public License version 3. In short: This software is free, you may run the software freely, create modified versions, distribute this software and distribute modified versions, as long as the modified software too has a free software license. You win this round, Stallman. The full license can be found in the `LICENSE` file.
This software is licensed under the GNU Lesser General Public License version 3. In short: This software is free, you may run the software freely, create modified versions, distribute this software and distribute modified versions, as long as the modified software too has a free software license (with an exception for linking to this software, as stated by the "Lesser" part of the LGPL, where this may not be required). You win this round, Stallman. The full license can be found in the `LICENSE` and `LICENSE.LESSER` files.

View File

@ -5,17 +5,19 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {changing = true}
}
}
apply plugin: 'forge'
def jsonFile = file('./src/main/resources/mcmod.info')
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text)
version = parsedJson.version
def version_name = version = mod_version
if(!mod_build_number.isEmpty()) {
version_name = mod_version + "_X" + mod_build_number
version = "[${version_name}]"
}
group = "com.hbm" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "HBM-NTM"
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
@ -62,17 +64,17 @@ repositories {
}
dependencies {
compile 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev'
implementation 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev'
compileOnly 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:src'
compile 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev'
implementation 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev'
compileOnly 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:src'
compile 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:dev'
implementation 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:dev'
compileOnly 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:src'
//compileOnly 'inventory-tweaks:InventoryTweaks:1.62+beta.84:api'
compile "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api"
implementation "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api"
}
processResources {
@ -85,7 +87,13 @@ processResources {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
filesMatching('mcmod.info') {
// replace version, mcversion and credits
expand([
version: version_name,
credits: project.credits
])
}
}
// copy everything else, thats not the mcmod.info

13
gradle.properties Normal file
View File

@ -0,0 +1,13 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4501
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting),\
\ UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization),\
\ Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines, weapons), Vær (fibrosis, gas centrifuges,\
\ ZIRNOX, CP-1 parts, starter guide), Adam29 (liquid petroleum, ethanol, electric furnace),\
\ Pashtet (russian localization), MartinTheDragon (calculator, chunk-based fallout), haru315 (spiral point algorithm),\
\ Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Aionoso (GUI textures), impbk2002 (project settings),\
\ OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (improved satellite loot system), Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration), Pvndols (thorium fuel recipe)

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip

View File

@ -1,6 +1,8 @@
package api.hbm.energy;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public interface IBatteryItem {
@ -11,4 +13,31 @@ public interface IBatteryItem {
public long getMaxCharge();
public long getChargeRate();
public long getDischargeRate();
/** Returns a string for the NBT tag name of the long storing power */
public default String getChargeTagName() {
return "charge";
}
/** Returns a string for the NBT tag name of the long storing power */
public static String getChargeTagName(ItemStack stack) {
return ((IBatteryItem) stack.getItem()).getChargeTagName();
}
/** Returns an empty battery stack from the passed ItemStack, the original won't be modified */
public static ItemStack emptyBattery(ItemStack stack) {
if(stack != null && stack.getItem() instanceof IBatteryItem) {
String keyName = getChargeTagName(stack);
ItemStack stackOut = stack.copy();
stackOut.stackTagCompound = new NBTTagCompound();
stackOut.stackTagCompound.setLong(keyName, 0);
return stackOut.copy();
}
return null;
}
/** Returns an empty battery stack from the passed Item */
public static ItemStack emptyBattery(Item item) {
return item instanceof IBatteryItem ? emptyBattery(new ItemStack(item)) : null;
}
}

View File

@ -125,10 +125,10 @@ public class PowerNet implements IPowerNet {
@Override
public long transferPower(long power) {
if(lastCleanup + 45 < System.currentTimeMillis()) {
/*if(lastCleanup + 45 < System.currentTimeMillis()) {
cleanup(this.subscribers);
lastCleanup = System.currentTimeMillis();
}
}*/
return fairTransfer(this.subscribers, power);
}
@ -145,6 +145,8 @@ public class PowerNet implements IPowerNet {
if(subscribers.isEmpty())
return power;
cleanup(subscribers);
ConnectionPriority[] priorities = new ConnectionPriority[] {ConnectionPriority.HIGH, ConnectionPriority.NORMAL, ConnectionPriority.LOW};
for(ConnectionPriority p : priorities) {

View File

@ -79,6 +79,7 @@ public class ModBlocks {
public static Block ore_alexandrite;
public static Block ore_random;
public static Block ore_bedrock;
public static Block ore_bedrock_coltan;
@ -244,6 +245,7 @@ public class ModBlocks {
public static Block block_red_phosphorus;
public static Block block_fallout;
public static Block block_foam;
public static Block block_coke;
public static Block block_graphite;
public static Block block_graphite_drilled;
public static Block block_graphite_fuel;
@ -1028,6 +1030,7 @@ public class ModBlocks {
public static Block machine_chemplant;
public static final int guiID_machine_chemplant = 49;
public static Block machine_chemfac;
public static Block machine_mixer;
public static Block machine_fluidtank;
public static Block machine_bat9000;
@ -1137,6 +1140,7 @@ public class ModBlocks {
public static final int guiID_brandon = 122;
public static Block turret_arty;
public static Block turret_himars;
public static Block turret_sentry;
public static Block rbmk_rod;
public static Block rbmk_rod_mod;
@ -1395,6 +1399,7 @@ public class ModBlocks {
ore_alexandrite = new BlockDepthOre().setBlockName("ore_alexandrite").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ore_alexandrite");
ore_random = new BlockMotherOfAllOres().setBlockName("ore_random").setCreativeTab(MainRegistry.blockTab);
ore_bedrock = new BlockBedrockOreTE().setBlockName("ore_bedrock").setCreativeTab(null);
depth_brick = new BlockDepth().setBlockName("depth_brick").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":depth_brick");
depth_tiles = new BlockDepth().setBlockName("depth_tiles").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":depth_tiles");
@ -1432,7 +1437,7 @@ public class ModBlocks {
ore_cinnebar = new BlockOre(Material.rock).setBlockName("ore_cinnebar").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_cinnebar");
ore_coltan = new BlockOre(Material.rock).setBlockName("ore_coltan").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_coltan");
ore_bedrock_coltan = new BlockBedrockOre().setBlockName("ore_bedrock_coltan").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(1_000_000).setBlockTextureName(RefStrings.MODID + ":ore_bedrock_coltan");
ore_bedrock_coltan = new BlockBedrockOre().setBlockName("ore_bedrock_coltan").setCreativeTab(null).setBlockUnbreakable().setResistance(1_000_000).setBlockTextureName(RefStrings.MODID + ":ore_bedrock_coltan");
ore_oil = new BlockOre(Material.rock).setBlockName("ore_oil").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_oil");
ore_oil_empty = new BlockGeneric(Material.rock).setBlockName("ore_oil_empty").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_oil_empty");
@ -1516,6 +1521,7 @@ public class ModBlocks {
block_red_phosphorus = new BlockHazardFalling().makeBeaconable().setStepSound(Block.soundTypeSand).setBlockName("block_red_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_phosphorus");
block_fallout = new BlockHazardFalling().setStepSound(Block.soundTypeGravel).setBlockName("block_fallout").setCreativeTab(MainRegistry.blockTab).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":ash");
block_foam = new BlockGeneric(Material.craftedSnow).setBlockName("block_foam").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSnow).setHardness(0.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":foam");
block_coke = new BlockCoke().setBlockName("block_coke").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F);
block_graphite = new BlockGraphite(Material.iron, 30, 5).setBlockName("block_graphite").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F);
block_graphite_drilled = new BlockGraphiteDrilled().setBlockName("block_graphite_drilled");
block_graphite_fuel = new BlockGraphiteFuel().setBlockName("block_graphite_fuel");
@ -2147,18 +2153,19 @@ public class ModBlocks {
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_friendly = new TurretFriendly(Material.iron).setBlockName("turret_friendly").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_jeremy = new TurretJeremy(Material.iron).setBlockName("turret_jeremy").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_tauon = new TurretTauon(Material.iron).setBlockName("turret_tauon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_tauon = new TurretTauon(Material.iron).setBlockName("turret_tauon").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_richard = new TurretRichard(Material.iron).setBlockName("turret_richard").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_howard = new TurretHoward(Material.iron).setBlockName("turret_howard").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_howard = new TurretHoward(Material.iron).setBlockName("turret_howard").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_howard_damaged = new TurretHowardDamaged(Material.iron).setBlockName("turret_howard_damaged").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_rust");
turret_maxwell = new TurretMaxwell(Material.iron).setBlockName("turret_maxwell").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_fritz = new TurretFritz(Material.iron).setBlockName("turret_fritz").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_maxwell = new TurretMaxwell(Material.iron).setBlockName("turret_maxwell").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_fritz = new TurretFritz(Material.iron).setBlockName("turret_fritz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_brandon = new TurretBrandon(Material.iron).setBlockName("turret_brandon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_arty = new TurretArty(Material.iron).setBlockName("turret_arty").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_himars = new TurretHIMARS(Material.iron).setBlockName("turret_himars").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_sentry = new TurretSentry().setBlockName("turret_sentry").setHardness(5.0F).setResistance(5.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
rbmk_rod = new RBMKRod(false).setBlockName("rbmk_rod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_element");
rbmk_rod_mod = new RBMKRod(true).setBlockName("rbmk_rod_mod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_element_mod");
@ -2229,8 +2236,9 @@ public class ModBlocks {
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chemplant");
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_chemfac = new MachineChemfac(Material.iron).setBlockName("machine_chemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_mixer = new MachineMixer(Material.iron).setBlockName("machine_mixer").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank");
machine_bat9000 = new MachineBigAssTank9000(Material.iron).setBlockName("machine_bat9000").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -2527,6 +2535,9 @@ public class ModBlocks {
//It's a meme you dip
GameRegistry.registerBlock(ore_random, ItemRandomOreBlock.class, ore_random.getUnlocalizedName());
//Bedrock ore
register(ore_bedrock);
//Crystals
GameRegistry.registerBlock(crystal_power, crystal_power.getUnlocalizedName());
GameRegistry.registerBlock(crystal_energy, crystal_energy.getUnlocalizedName());
@ -2603,6 +2614,7 @@ public class ModBlocks {
GameRegistry.registerBlock(block_fallout, block_fallout.getUnlocalizedName());
GameRegistry.registerBlock(block_foam, block_foam.getUnlocalizedName());
GameRegistry.registerBlock(block_graphite, block_graphite.getUnlocalizedName());
register(block_coke);
GameRegistry.registerBlock(block_graphite_drilled, block_graphite_drilled.getUnlocalizedName());
GameRegistry.registerBlock(block_graphite_fuel, block_graphite_fuel.getUnlocalizedName());
GameRegistry.registerBlock(block_graphite_rod, block_graphite_rod.getUnlocalizedName());
@ -2928,6 +2940,7 @@ public class ModBlocks {
GameRegistry.registerBlock(turret_brandon, turret_brandon.getUnlocalizedName());
GameRegistry.registerBlock(turret_arty, turret_arty.getUnlocalizedName());
GameRegistry.registerBlock(turret_himars, turret_himars.getUnlocalizedName());
GameRegistry.registerBlock(turret_sentry, turret_sentry.getUnlocalizedName());
//Wall-mounted Explosives
GameRegistry.registerBlock(charge_dynamite, ItemBlockBase.class, charge_dynamite.getUnlocalizedName());
@ -3227,6 +3240,7 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_assemfac, machine_assemfac.getUnlocalizedName());
GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName());
GameRegistry.registerBlock(machine_chemfac, machine_chemfac.getUnlocalizedName());
register(machine_mixer);
register(machine_fluidtank);
register(machine_bat9000);
register(machine_orbus);

View File

@ -118,10 +118,10 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
if(this.shouldGrow()) {
worldObj.setBlock(xCoord, yCoord + 1, zCoord, this.getBlockType(), this.getBlockMetadata(), 3);
worldObj.setBlock(xCoord, yCoord + 1, zCoord, ModBlocks.volcanic_lava_block);
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.volcanic_lava_block);
return;
} else if(this.isExtinguishing()) {
worldObj.setBlock(xCoord, yCoord + 1, zCoord, ModBlocks.volcanic_lava_block);
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.volcanic_lava_block);
return;
}
}

View File

@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
import java.util.ArrayList;
import java.util.Random;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
@ -17,19 +18,16 @@ import net.minecraft.world.World;
public class BlockAmmoCrate extends Block {
@SideOnly(Side.CLIENT)
private IIcon iconTop;
@SideOnly(Side.CLIENT)
private IIcon iconBottom;
@SideOnly(Side.CLIENT) private IIcon iconTop;
@SideOnly(Side.CLIENT) private IIcon iconBottom;
public BlockAmmoCrate(Material p_i45394_1_) {
super(p_i45394_1_);
public BlockAmmoCrate(Material mat) {
super(mat);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":crate_ammo_top");
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":crate_ammo_bottom");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":crate_ammo_side");
@ -42,35 +40,37 @@ public class BlockAmmoCrate extends Block {
}
Random rand = new Random();
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(ModItems.cap_nuka, 12 + rand.nextInt(21)));
ret.add(new ItemStack(ModItems.syringe_metal_stimpak, 1 + rand.nextInt(3)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_22lr, 16 + rand.nextInt(17)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_9mm, 6 + rand.nextInt(13)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_12gauge, 6 + rand.nextInt(4)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_20gauge, 3 + rand.nextInt(4)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.gun_revolver_ammo, 10 + rand.nextInt(11)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.gun_revolver_iron_ammo, 12 + rand.nextInt(15)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_50bmg, 2 + rand.nextInt(7)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_rocket, 1));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_grenade, 1 + rand.nextInt(2)));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_12gauge_incendiary, 3));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge_incendiary, 3));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge_caustic, 3));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge_flechette, 3));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_9mm_ap, 7));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_rocket_incendiary, 1));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_rocket_sleek, 1));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade_he, 1));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade_incendiary, 1));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade_sleek, 1));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.syringe_metal_super, 2));
return ret;
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(ModItems.cap_nuka, 12 + rand.nextInt(21)));
ret.add(new ItemStack(ModItems.syringe_metal_stimpak, 1 + rand.nextInt(3)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_22lr, 16 + rand.nextInt(17)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_9mm, 6 + rand.nextInt(13)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_12gauge, 6 + rand.nextInt(4)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_20gauge, 3 + rand.nextInt(4)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_357, 10 + rand.nextInt(11)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_357, 12 + rand.nextInt(15), Ammo357Magnum.IRON.ordinal()));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_50bmg, 2 + rand.nextInt(7)));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_rocket, 1));
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_grenade, 1 + rand.nextInt(2)));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_12gauge, 3, Ammo12Gauge.INCENDIARY.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge, 3, Ammo20Gauge.INCENDIARY.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge, 3, Ammo20Gauge.CAUSTIC.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge, 3, Ammo20Gauge.FLECHETTE.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_9mm, 7, Ammo9mm.AP.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_rocket, 1, AmmoRocket.INCENDIARY.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_rocket, 1, AmmoRocket.SLEEK.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade, 1, AmmoGrenade.HE.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade, 1, AmmoGrenade.INCENDIARY.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade, 1, AmmoGrenade.SLEEK.ordinal()));
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.syringe_metal_super, 2));
return ret;
}
}

View File

@ -0,0 +1,223 @@
package com.hbm.blocks.generic;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.IBlockMultiPass;
import com.hbm.blocks.ILookOverlay;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.render.block.RenderBlockMultipass;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
public class BlockBedrockOreTE extends BlockContainer implements ILookOverlay, IBlockMultiPass {
public BlockBedrockOreTE() {
super(Material.rock);
this.setBlockTextureName("bedrock");
this.setBlockUnbreakable();
this.setResistance(1_000_000);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityBedrockOre();
}
@Override
public Item getItemDropped(int meta, Random rand, int fortune) {
return null;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
super.onBlockPlacedBy(world, x, y, z, entity, stack);
world.markBlockForUpdate(x, y, z);
}
@Override
public int getRenderType(){
return IBlockMultiPass.getRenderType();
}
@Override
public int getPasses() {
return 2;
}
private IIcon[] overlays = new IIcon[10];
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon("bedrock");
for(int i = 0; i < overlays.length; i++) {
overlays[i] = reg.registerIcon(RefStrings.MODID + ":ore_random_" + (i + 1));
}
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
if(RenderBlockMultipass.currentPass == 0)
return Blocks.bedrock.getIcon(0, 0);
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityBedrockOre) {
TileEntityBedrockOre ore = (TileEntityBedrockOre) te;
int index = ore.shape % overlays.length;
return overlays[index];
}
return Blocks.bedrock.getIcon(0, 0);
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(RenderBlockMultipass.currentPass == 0)
return Blocks.bedrock.getIcon(0, 0);
int index = meta % overlays.length;
return overlays[index];
}
@Override
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
if(RenderBlockMultipass.currentPass == 0)
return 0xffffff;
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityBedrockOre) {
TileEntityBedrockOre ore = (TileEntityBedrockOre) te;
return ore.color;
}
return super.colorMultiplier(world, x, y, z);
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if(!(te instanceof TileEntityBedrockOre))
return;
TileEntityBedrockOre ore = (TileEntityBedrockOre) te;
List<String> text = new ArrayList();
if(ore.resource != null) {
text.add(ore.resource.getDisplayName());
}
text.add("Tier: " + ore.tier);
if(ore.acidRequirement != null) {
text.add("Requires: " + ore.acidRequirement.fill + "mB " + I18nUtil.resolveKey(ore.acidRequirement.type.getUnlocalizedName()));
}
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
}
public static class TileEntityBedrockOre extends TileEntity {
public ItemStack resource;
public FluidStack acidRequirement;
public int tier;
public int color;
public int shape;
public TileEntityBedrockOre setStyle(int color, int shape) {
this.color = color;
this.shape = shape;
return this;
}
@Override
public boolean canUpdate() {
return false;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.resource = new ItemStack(Item.getItemById(nbt.getInteger("0id")), nbt.getByte("size"), nbt.getShort("meta"));
if(this.resource.getItem() == null) this.resource = new ItemStack(ModItems.powder_iron);
FluidType type = Fluids.fromID(nbt.getInteger("fluid"));
if(type != Fluids.NONE) {
this.acidRequirement = new FluidStack(type, nbt.getInteger("amount"));
}
this.tier = nbt.getInteger("tier");
this.color = nbt.getInteger("color");
this.shape = nbt.getInteger("shape");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
if(this.resource != null) {
nbt.setInteger("0id", Item.getIdFromItem(this.resource.getItem()));
nbt.setByte("size", (byte) this.resource.stackSize);
nbt.setShort("meta", (short) this.resource.getItemDamage());
}
if(this.acidRequirement != null) {
nbt.setInteger("fluid", this.acidRequirement.type.getID());
nbt.setInteger("amount", this.acidRequirement.fill);
}
nbt.setInteger("tier", this.tier);
nbt.setInteger("color", this.color);
nbt.setInteger("shape", this.shape);
}
@Override
public Packet getDescriptionPacket() {
NBTTagCompound nbt = new NBTTagCompound();
this.writeToNBT(nbt);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
this.readFromNBT(pkt.func_148857_g());
}
}
}

View File

@ -0,0 +1,25 @@
package com.hbm.blocks.generic;
import com.hbm.blocks.BlockEnumMulti;
import com.hbm.items.ItemEnums;
import net.minecraft.block.material.Material;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockCoke extends BlockEnumMulti {
public BlockCoke() {
super(Material.iron, ItemEnums.EnumCokeType.class, true, true);
}
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) {
return 5;
}
@Override
public int getFireSpreadSpeed(IBlockAccess world, int x, int y, int z, ForgeDirection face) {
return 10;
}
}

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ItemAmmoEnums.Ammo44Magnum;
import com.hbm.items.ModItems;
import net.minecraft.block.BlockFalling;
@ -18,219 +19,219 @@ import net.minecraft.world.World;
public class BlockCrate extends BlockFalling {
List<Item> crateList;
List<Item> weaponList;
List<Item> leadList;
List<Item> metalList;
List<Item> redList;
List<ItemStack> crateList;
List<ItemStack> weaponList;
List<ItemStack> leadList;
List<ItemStack> metalList;
List<ItemStack> redList;
public BlockCrate(Material p_i45394_1_) {
super(p_i45394_1_);
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return null;
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
return null;
}
@Override
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar))
{
dropItems(world, x, y, z);
world.setBlockToAir(x, y, z);
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
return true;
} else {
if(world.isRemote)
{
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
dropItems(world, x, y, z);
world.setBlockToAir(x, y, z);
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
return true;
} else {
if(world.isRemote) {
player.addChatMessage(new ChatComponentText("I'll need a crate opening device to get the loot, smashing the whole thing won't work..."));
}
}
return true;
}
public void setDrops() {
}
crateList = new ArrayList<Item>();
weaponList = new ArrayList<Item>();
leadList = new ArrayList<Item>();
metalList = new ArrayList<Item>();
redList = new ArrayList<Item>();
return true;
}
//Supply Crate
BlockCrate.addToListWithWeight(crateList, ModItems.syringe_metal_stimpak, 10);
BlockCrate.addToListWithWeight(crateList, ModItems.syringe_antidote, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_iron, 9);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_gold, 4);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_lead, 6);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_cursed, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_rpg, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_fatman, 1);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_mp40, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_uzi, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_uboinik, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_lever_action, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_bolt_action, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_generic, 8);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_strong, 6);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_mk2, 4);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_flare, 4);
BlockCrate.addToListWithWeight(crateList, ModItems.ammo_container, 2);
//Weapon Crate
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_iron, 10);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver, 9);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_gold, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_lead, 8);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_cursed, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_calamity, 3);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_rpg, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_karl, 4);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 6);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_hk69, 8);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_stinger, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi, 6);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_bolt_action, 7);
//Lead Crate
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium, 10);
//BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u235, 5);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u238, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium, 7);
//BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu238, 5);
//BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu239, 4);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu240, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_neptunium, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium_fuel, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium_fuel, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_mox_fuel, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium, 10);
//BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u235, 5);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u238, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_plutonium, 7);
//BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu238, 5);
//BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu239, 4);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu240, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_neptunium, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium_fuel, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_plutonium_fuel, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_mox_fuel, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_deuterium, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_tritium, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_uf6, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_puf6, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg_weak, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.tritium_deuterium_cake, 5);
BlockCrate.addToListWithWeight(leadList, ModItems.powder_yellowcake, 10);
//Metal Crate
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_press), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 9);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_reactor_breeding), 6);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 7);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_coal_off), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_selenium), 7);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.red_pylon), 9);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_battery), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_lithium_battery), 5);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembler), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_drill), 4);
BlockCrate.addToListWithWeight(metalList, ModItems.centrifuge_element, 6);
BlockCrate.addToListWithWeight(metalList, ModItems.motor, 8);
BlockCrate.addToListWithWeight(metalList, ModItems.coil_tungsten, 7);
BlockCrate.addToListWithWeight(metalList, ModItems.photo_panel, 3);
BlockCrate.addToListWithWeight(metalList, ModItems.coil_copper, 10);
BlockCrate.addToListWithWeight(metalList, ModItems.tank_steel, 9);
BlockCrate.addToListWithWeight(metalList, ModItems.blade_titanium, 3);
BlockCrate.addToListWithWeight(metalList, ModItems.bolt_compound, 2);
BlockCrate.addToListWithWeight(metalList, ModItems.piston_selenium, 6);
//Red Crate
BlockCrate.addToListWithWeight(redList, ModItems.mysteryshovel, 1);
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_pip, 1);
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_blackjack, 1);
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_silver, 1);
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44_pip, 1);
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44_bj, 1);
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44_silver, 1);
BlockCrate.addToListWithWeight(redList, ModItems.battery_spark, 1);
BlockCrate.addToListWithWeight(redList, ModItems.bottle_sparkle, 1);
BlockCrate.addToListWithWeight(redList, ModItems.bottle_rad, 1);
BlockCrate.addToListWithWeight(redList, ModItems.ring_starmetal, 1);
BlockCrate.addToListWithWeight(redList, ModItems.flame_pony, 1);
BlockCrate.addToListWithWeight(redList, Item.getItemFromBlock(ModBlocks.ntm_dirt), 1);
BlockCrate.addToListWithWeight(redList, Item.getItemFromBlock(ModBlocks.broadcaster_pc), 1);
}
public void dropItems(World world, int x, int y, int z) {
Random rand = new Random();
setDrops();
public void setDrops() {
List<Item> list = new ArrayList<Item>();
int i = rand.nextInt(3) + 3;
if(this == ModBlocks.crate_weapon) {
i = 1 + rand.nextInt(2);
if(rand.nextInt(100) == 34)
i = 25;
}
for(int j = 0; j < i; j++) {
crateList = new ArrayList();
weaponList = new ArrayList();
leadList = new ArrayList();
metalList = new ArrayList();
redList = new ArrayList();
if(this == ModBlocks.crate)
list.add(crateList.get(rand.nextInt(crateList.size())));
if(this == ModBlocks.crate_weapon)
list.add(weaponList.get(rand.nextInt(weaponList.size())));
if(this == ModBlocks.crate_lead)
list.add(leadList.get(rand.nextInt(leadList.size())));
if(this == ModBlocks.crate_metal)
list.add(metalList.get(rand.nextInt(metalList.size())));
if(this == ModBlocks.crate_red)
list.add(redList.get(rand.nextInt(redList.size())));
}
if(this == ModBlocks.crate_red) {
list.clear();
for(int k = 0; k < redList.size(); k++) {
list.add(redList.get(k));
}
}
for(Item stack : list) {
float f = rand.nextFloat() * 0.8F + 0.1F;
float f1 = rand.nextFloat() * 0.8F + 0.1F;
float f2 = rand.nextFloat() * 0.8F + 0.1F;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(stack));
// Supply Crate
BlockCrate.addToListWithWeight(crateList, ModItems.syringe_metal_stimpak, 10);
BlockCrate.addToListWithWeight(crateList, ModItems.syringe_antidote, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_iron, 9);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_gold, 4);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_lead, 6);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_cursed, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_rpg, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_fatman, 1);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_mp40, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_uzi, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_uboinik, 7);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_lever_action, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.clip_bolt_action, 5);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_generic, 8);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_strong, 6);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_mk2, 4);
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_flare, 4);
BlockCrate.addToListWithWeight(crateList, ModItems.ammo_container, 2);
float f3 = 0.05F;
entityitem.motionX = (float)rand.nextGaussian() * f3;
entityitem.motionY = (float)rand.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)rand.nextGaussian() * f3;
if(!world.isRemote)
world.spawnEntityInWorld(entityitem);
}
}
public static void addToListWithWeight(List<Item> list, Item item, int weight) {
for(int i = 0; i < weight; i++)
list.add(item);
}
// Weapon Crate
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_iron, 10);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver, 9);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_gold, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_lead, 8);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_cursed, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_calamity, 3);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_rpg, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_karl, 4);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 6);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_hk69, 8);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_stinger, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi, 6);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7);
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_bolt_action, 7);
// Lead Crate
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium, 10);
// BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u235, 5);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u238, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium, 7);
// BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu238, 5);
// BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu239, 4);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu240, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_neptunium, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium_fuel, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium_fuel, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_mox_fuel, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium, 10);
// BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u235, 5);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u238, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_plutonium, 7);
// BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu238, 5);
// BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu239, 4);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu240, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_neptunium, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium_fuel, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_plutonium_fuel, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_mox_fuel, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_deuterium, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_tritium, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_uf6, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.cell_puf6, 8);
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg, 6);
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg_weak, 7);
BlockCrate.addToListWithWeight(leadList, ModItems.tritium_deuterium_cake, 5);
BlockCrate.addToListWithWeight(leadList, ModItems.powder_yellowcake, 10);
// Metal Crate
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_press), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 9);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_reactor_breeding), 6);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 7);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_coal_off), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_selenium), 7);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.red_pylon), 9);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_battery), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_lithium_battery), 5);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembler), 10);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_drill), 4);
BlockCrate.addToListWithWeight(metalList, ModItems.centrifuge_element, 6);
BlockCrate.addToListWithWeight(metalList, ModItems.motor, 8);
BlockCrate.addToListWithWeight(metalList, ModItems.coil_tungsten, 7);
BlockCrate.addToListWithWeight(metalList, ModItems.photo_panel, 3);
BlockCrate.addToListWithWeight(metalList, ModItems.coil_copper, 10);
BlockCrate.addToListWithWeight(metalList, ModItems.tank_steel, 9);
BlockCrate.addToListWithWeight(metalList, ModItems.blade_titanium, 3);
BlockCrate.addToListWithWeight(metalList, ModItems.bolt_compound, 2);
BlockCrate.addToListWithWeight(metalList, ModItems.piston_selenium, 6);
// Red Crate
BlockCrate.addToListWithWeight(redList, ModItems.mysteryshovel, 1);
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_pip, 1);
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_blackjack, 1);
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_silver, 1);
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PIP), 1);
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44.stackFromEnum(Ammo44Magnum.BJ), 1);
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44.stackFromEnum(Ammo44Magnum.SILVER), 1);
BlockCrate.addToListWithWeight(redList, ModItems.battery_spark, 1);
BlockCrate.addToListWithWeight(redList, ModItems.bottle_sparkle, 1);
BlockCrate.addToListWithWeight(redList, ModItems.bottle_rad, 1);
BlockCrate.addToListWithWeight(redList, ModItems.ring_starmetal, 1);
BlockCrate.addToListWithWeight(redList, ModItems.flame_pony, 1);
BlockCrate.addToListWithWeight(redList, Item.getItemFromBlock(ModBlocks.ntm_dirt), 1);
BlockCrate.addToListWithWeight(redList, Item.getItemFromBlock(ModBlocks.broadcaster_pc), 1);
}
public void dropItems(World world, int x, int y, int z) {
Random rand = new Random();
setDrops();
List<ItemStack> list = new ArrayList();
int i = rand.nextInt(3) + 3;
if(this == ModBlocks.crate_weapon) {
i = 1 + rand.nextInt(2);
if(rand.nextInt(100) == 34)
i = 25;
}
for(int j = 0; j < i; j++) {
if(this == ModBlocks.crate)
list.add(crateList.get(rand.nextInt(crateList.size())));
if(this == ModBlocks.crate_weapon)
list.add(weaponList.get(rand.nextInt(weaponList.size())));
if(this == ModBlocks.crate_lead)
list.add(leadList.get(rand.nextInt(leadList.size())));
if(this == ModBlocks.crate_metal)
list.add(metalList.get(rand.nextInt(metalList.size())));
if(this == ModBlocks.crate_red)
list.add(redList.get(rand.nextInt(redList.size())));
}
if(this == ModBlocks.crate_red) {
list.clear();
for(int k = 0; k < redList.size(); k++) {
list.add(redList.get(k));
}
}
for(ItemStack stack : list) {
float f = rand.nextFloat() * 0.8F + 0.1F;
float f1 = rand.nextFloat() * 0.8F + 0.1F;
float f2 = rand.nextFloat() * 0.8F + 0.1F;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, stack.copy());
float f3 = 0.05F;
entityitem.motionX = (float) rand.nextGaussian() * f3;
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float) rand.nextGaussian() * f3;
if(!world.isRemote)
world.spawnEntityInWorld(entityitem);
}
}
public static void addToListWithWeight(List<ItemStack> list, Item item, int weight) {
for(int i = 0; i < weight; i++) list.add(new ItemStack(item));
}
public static void addToListWithWeight(List<ItemStack> list, ItemStack item, int weight) {
for(int i = 0; i < weight; i++) list.add(item);
}
}

View File

@ -2,7 +2,6 @@ package com.hbm.blocks.generic;
import com.hbm.blocks.BlockBase;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;

View File

@ -13,7 +13,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

View File

@ -140,10 +140,8 @@ public class BlockOre extends Block {
return ModItems.rtg_unit;
case 30:
return ModItems.gun_spark_ammo;
case 31:
return ModItems.ammo_nuke_low;
case 32:
return ModItems.ammo_mirv;
case 31: case 32:
return ModItems.ammo_nuke;
case 33:
return ModItems.gun_defabricator_ammo;
case 34:

View File

@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityMachineExcavator;
import net.minecraft.block.material.Material;
@ -18,8 +19,9 @@ public class MachineExcavator extends BlockDummyable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityMachineExcavator();
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
return null;
}
@ -62,5 +64,11 @@ public class MachineExcavator extends BlockDummyable {
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {-1, 3, 3, -2, 3, -2}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {-1, 3, 3, -2, -2, 3}, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] {-1, 3, -2, 3, 3, 3}, this, dir);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX, y + 1, z + dir.offsetZ * 3 + rot.offsetZ);
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX, y + 1, z + dir.offsetZ * 3 - rot.offsetZ);
this.makeExtra(world, x + rot.offsetX * 3, y + 1, z + rot.offsetZ * 3);
this.makeExtra(world, x - rot.offsetX * 3, y + 1, z - rot.offsetZ * 3);
}
}

View File

@ -18,6 +18,8 @@ import com.hbm.util.I18nUtil;
import api.hbm.block.IToolable;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
@ -40,9 +42,9 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12)
return new TileEntityMachineFluidTank();
return new TileEntityProxyCombo().fluid();
if(meta >= 12) return new TileEntityMachineFluidTank();
if(meta >= 6) return new TileEntityProxyCombo().fluid();
return null;
}
@Override
@ -80,13 +82,11 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
@Override
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
this.makeExtra(world, x - rot.offsetX, y, z - rot.offsetZ);
this.makeExtra(world, x - dir.offsetX + rot.offsetX, y, z - dir.offsetZ + rot.offsetZ);
this.makeExtra(world, x - dir.offsetX - rot.offsetX, y, z - dir.offsetZ - rot.offsetZ);
this.makeExtra(world, x - dir.offsetX + 1, y, z - dir.offsetZ + 1);
this.makeExtra(world, x - dir.offsetX + 1, y, z - dir.offsetZ - 1);
this.makeExtra(world, x - dir.offsetX - 1, y, z - dir.offsetZ + 1);
this.makeExtra(world, x - dir.offsetX - 1, y, z - dir.offsetZ - 1);
}
@Override
@ -145,10 +145,11 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
if(tool != ToolType.TORCH) return false;
return IRepairable.tryRepairMultiblock(world, x, y, z, this, Minecraft.getMinecraft().thePlayer);
return IRepairable.tryRepairMultiblock(world, x, y, z, this, player);
}
@Override
@SideOnly(Side.CLIENT)
public void printHook(Pre event, World world, int x, int y, int z) {
List<AStack> materials = IRepairable.getRepairMaterials(world, x, y, z, this, Minecraft.getMinecraft().thePlayer);

View File

@ -0,0 +1,40 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.machine.TileEntityMachineMixer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineMixer extends BlockDummyable {
public MachineMixer(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12)
return new TileEntityMachineMixer();
return null;
}
@Override
public int[] getDimensions() {
return new int[] {2, 0, 0, 0, 0, 0};
}
@Override
public int getOffset() {
return 0;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return this.standardOpenBehavior(world, x, y, z, player, 0);
}
}

View File

@ -63,6 +63,7 @@ public class ReactorZirnox extends BlockDummyable {
return 2;
}
@Override
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);

View File

@ -10,9 +10,7 @@ import api.hbm.block.IToolable;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

View File

@ -0,0 +1,102 @@
package com.hbm.blocks.turret;
import java.util.Random;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.turret.TileEntityTurretSentry;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TurretSentry extends BlockContainer {
public TurretSentry() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityTurretSentry();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote) {
return true;
} else if(!player.isSneaking()) {
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;
} else {
return true;
}
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
Random rand = new Random();
@Override
public void breakBlock(World world, int x, int y, int z, Block b, int meta) {
TileEntityTurretSentry sentry = (TileEntityTurretSentry) world.getTileEntity(x, y, z);
if(sentry != null) {
for(int i = 0; i < sentry.getSizeInventory(); ++i) {
ItemStack itemstack = sentry.getStackInSlot(i);
if(itemstack != null) {
float oX = this.rand.nextFloat() * 0.8F + 0.1F;
float oY = this.rand.nextFloat() * 0.8F + 0.1F;
float oZ = this.rand.nextFloat() * 0.8F + 0.1F;
while(itemstack.stackSize > 0) {
int toDrop = this.rand.nextInt(21) + 10;
if(toDrop > itemstack.stackSize) {
toDrop = itemstack.stackSize;
}
itemstack.stackSize -= toDrop;
EntityItem entityitem = new EntityItem(world, x + oX, y + oY, z + oZ, new ItemStack(itemstack.getItem(), toDrop, itemstack.getItemDamage()));
if(itemstack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
}
float jump = 0.05F;
entityitem.motionX = (float) this.rand.nextGaussian() * jump;
entityitem.motionY = (float) this.rand.nextGaussian() * jump + 0.2F;
entityitem.motionZ = (float) this.rand.nextGaussian() * jump;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, b);
}
super.breakBlock(world, x, y, z, b, meta);
}
}

View File

@ -309,10 +309,10 @@ public class FalloutConfigJSON {
if(obj.has("primarySubstitution")) entry.prim(readMetaArray(obj.get("primarySubstitution")));
if(obj.has("secondarySubstitutions")) entry.sec(readMetaArray(obj.get("secondarySubstitutions")));
if(obj.has("chance")) entry.c(obj.get("chance").getAsInt());
if(obj.has("chance")) entry.c(obj.get("chance").getAsDouble());
if(obj.has("minimumDistancePercent")) entry.min(obj.get("minimumDistancePercent").getAsDouble());
if(obj.has("maximumDistancePercent")) entry.min(obj.get("maximumDistancePercent").getAsDouble());
if(obj.has("maximumDistancePercent")) entry.max(obj.get("maximumDistancePercent").getAsDouble());
return entry;
}

View File

@ -33,13 +33,21 @@ public class WorldConfig {
public static int bedrockOilSpawn = 200;
public static int meteoriteSpawn = 500;
public static int bedrockIronSpawn = 200;
public static int bedrockCopperSpawn = 200;
public static int bedrockBoraxSpawn = 300;
public static int bedrockAsbestosSpawn = 300;
public static int bedrockNiobiumSpawn = 300;
public static int bedrockTitaniumSpawn = 400;
public static int bedrockTungstenSpawn = 300;
public static int bedrockGoldSpawn = 500;
public static int ironClusterSpawn = 4;
public static int titaniumClusterSpawn = 2;
public static int aluminiumClusterSpawn = 3;
public static int copperClusterSpawn = 4;
public static int alexandriteSpawn = 100;
public static int hematiteSpawn = 2;
public static int malachiteSpawn = 1;
public static int netherUraniumuSpawn = 8;
@ -124,12 +132,20 @@ public class WorldConfig {
bedrockOilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.22_bedrockOilSpawnRate", "Spawns a bedrock oil node every nTH chunk", 200);
meteoriteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.23_meteoriteSpawnRate", "Spawns a fallen meteorite every nTH chunk", 200);
bedrockIronSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B00_bedrockIronSpawn", "Spawns a bedrock iron deposit every nTH chunk", 200);
bedrockCopperSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B01_bedrockCopperSpawn", "Spawns a bedrock copper deposit every nTH chunk", 200);
bedrockBoraxSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B02_bedrockBoraxSpawn", "Spawns a bedrock borax deposit every nTH chunk", 300);
bedrockAsbestosSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B03_bedrockAsbestosSpawn", "Spawns a bedrock asbestos deposit every nTH chunk", 300);
bedrockNiobiumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B04_bedrockNiobiumSpawn", "Spawns a bedrock niobium deposit every nTH chunk", 300);
bedrockTitaniumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B05_bedrockTitaniumSpawn", "Spawns a bedrock titanium deposit every nTH chunk", 500);
bedrockTungstenSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B06_bedrockTungstenSpawn", "Spawns a bedrock tungsten deposit every nTH chunk", 300);
bedrockGoldSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B07_bedrockGoldSpawn", "Spawns a bedrock gold deposit every nTH chunk", 500);
ironClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C00_ironClusterSpawn", "Amount of iron cluster veins per chunk", 4);
titaniumClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C01_titaniumClusterSpawn", "Amount of titanium cluster veins per chunk", 2);
aluminiumClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C02_aluminiumClusterSpawn", "Amount of aluminium cluster veins per chunk", 3);
copperClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C03_copperClusterSpawn", "Amount of copper cluster veins per chunk", 4);
hematiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.L00_hematiteSpawn", "Amount of hematite block veins per chunk", 2);
malachiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.L01_malachiteSpawn", "Amount of malachite block veins per chunk", 1);
netherUraniumuSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N00_uraniumSpawnrate", "Amount of nether uranium per chunk", 8);

View File

@ -3,6 +3,7 @@ package com.hbm.crafting;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import com.hbm.items.ItemEnums;
import com.hbm.items.ModItems;
import com.hbm.main.CraftingManager;
@ -28,7 +29,7 @@ public class ConsumableRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 1), new Object[] { "TTT", "TRT", "TTT", 'T', ModItems.grenade_gascan, 'R', ModItems.detonator_laser });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 2), new Object[] { "TTT", "TRT", "TTT", 'T', ModItems.pellet_gas, 'R', ModItems.detonator_laser });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 3), new Object[] { "TRT", 'T', ModItems.grenade_cloud, 'R', ModItems.detonator_laser });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 4), new Object[] { "TR", 'T', ModItems.ammo_nuke_high, 'R', ModItems.detonator_laser });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 4), new Object[] { "TR", 'T', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH), 'R', ModItems.detonator_laser });
//Food
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_waffle, 1), new Object[] { "WEW", "MPM", "WEW", 'W', Items.wheat, 'E', Items.egg, 'M', Items.milk_bucket, 'P', ModItems.man_core });
@ -58,6 +59,7 @@ public class ConsumableRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.coffee_radium), new Object[] { ModItems.coffee, RA226.nugget() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_smore), new Object[] { Items.wheat, new ItemStack(ModItems.marshmallow, 1, 1), new ItemStack(Items.dye, 1, 3) });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.marshmallow), new Object[] { Items.stick, Items.sugar, Items.wheat_seeds });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.quesadilla, 3), new Object[] { ModItems.cheese, ModItems.cheese, Items.bread });
//Peas
CraftingManager.addRecipeAuto(new ItemStack(ModItems.peas), new Object[] { " S ", "SNS", " S ", 'S', Items.wheat_seeds, 'N', GOLD.nugget() });

View File

@ -1,6 +1,7 @@
package com.hbm.crafting;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
import com.hbm.items.special.ItemWasteLong;
@ -49,6 +50,10 @@ public class MineralRecipes {
add1To9Pair(ModBlocks.block_polymer, ModItems.ingot_polymer);
add1To9Pair(ModBlocks.block_bakelite, ModItems.ingot_bakelite);
add1To9Pair(ModBlocks.block_rubber, ModItems.ingot_rubber);
for(int i = 0; i < EnumCokeType.values().length; i++) {
add1To9PairSameMeta(Item.getItemFromBlock(ModBlocks.block_coke), ModItems.coke, i);
}
addMineralSet(ModItems.nugget_bismuth, ModItems.ingot_bismuth, ModBlocks.block_bismuth);
addMineralSet(ModItems.nugget_tantalium, ModItems.ingot_tantalium, ModBlocks.block_tantalium);

View File

@ -5,6 +5,8 @@ import com.hbm.inventory.OreDictManager;
import com.hbm.inventory.fluid.Fluids;
import static com.hbm.inventory.OreDictManager.*;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.GunB92Cell;
import com.hbm.main.CraftingManager;
@ -24,7 +26,7 @@ public class WeaponRecipes {
//Missiles
CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_taint, 1), new Object[] { ModItems.missile_assembly, ModItems.bucket_mud, ModItems.powder_spark_mix, ModItems.powder_magic });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.ammo_nuke_high });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH) });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_bhole, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_black_hole });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_aschrab });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.cell_sas3, ModItems.circuit_targeting_tier4 });
@ -63,6 +65,9 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_4, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier4, 'S', ModBlocks.steel_scaffold });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_5, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier5, 'S', ModBlocks.steel_scaffold });
//Turrets
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', ModItems.circuit_red_copper, 'D', ModItems.crt_display });
//Guns
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', IRON.plate(), 'M', ModItems.mechanism_launcher_1 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "SSS", " MW", 'S', ModItems.hull_small_steel, 'W', CU.plate(), 'M', ModItems.mechanism_launcher_1 });
@ -171,8 +176,9 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_smg, 32), new Object[] { " I", "GC", " P", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_smg, 32), new Object[] { " I", "GC", " P", 'I', PB.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_556, 32), new Object[] { " I", "GC", " P", 'I', STEEL.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_556_k, 32), new Object[] { "G", "C", "P", 'G', Items.gunpowder, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_556_k, 32), new Object[] { "G", "C", "P", 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(ModItems.ammo_556.stackFromEnum(30, Ammo556mm.K), new Object[] { "G", "C", "P", 'G', ANY_GUNPOWDER.dust(), 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_uzi, 32), new Object[] { " I", "GC", " P", 'I', IRON.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_uzi, 32), new Object[] { " I", "GC", " P", 'I', IRON.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_uzi, 32), new Object[] { " I", "GC", " P", 'I', IRON.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_uzi, 32), new Object[] { " I", "GC", " P", 'I', IRON.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_lacunae, 32), new Object[] { " I", "GC", " P", 'I', CU.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
@ -180,33 +186,28 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_nopip, 24), new Object[] { " I", "GC", " P", 'I', PB.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_44, 'P', ModItems.primer_44 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(ModItems.ammo_12gauge.stackFromEnum(12, Ammo12Gauge.PERCUSSION), new Object[] { "G", "C", "P", 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', PB.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_flechette, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_flechette, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_explosive, 6), new Object[] { " I ", "GCL", " P ", 'I', ANY_HIGHEXPLOSIVE.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_explosive, 6), new Object[] { " I ", "GCL", " P ", 'I', ANY_HIGHEXPLOSIVE.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_semtex, 4), new Object[] { " I ", "GCL", " P ", 'I', ModBlocks.det_miner, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge_semtex, 4), new Object[] { " I ", "GCL", " P ", 'I', ModBlocks.det_miner, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_4gauge_titan, 1), new Object[] { ModItems.ammo_4gauge, ModItems.nugget_bismuth, ModItems.nugget_tantalium, ModItems.ball_dynamite });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', PB.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge_explosive, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge_explosive, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge_flechette, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_20gauge_flechette, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 6), new Object[] { "I", "C", "P", 'I', ModItems.powder_power, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot });
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(12, Ammo4Gauge.SLUG), new Object[] { " I ", "GCL", " P ", 'I', PB.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(12, Ammo4Gauge.FLECHETTE), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", " P ", 'I', ModBlocks.tnt, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(6, Ammo4Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", " P ", 'I', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.MINING), new Object[] { " I ", "GCL", " P ", 'I', ModBlocks.det_miner, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
CraftingManager.addShapelessAuto(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.QUACK), new Object[] { ModItems.ammo_4gauge, ModItems.nugget_bismuth, ModItems.nugget_tantalium, ModItems.ball_dynamite });
CraftingManager.addRecipeAuto(ModItems.ammo_20gauge.stackFromEnum(12, Ammo20Gauge.STOCK), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(ModItems.ammo_20gauge.stackFromEnum(12, Ammo20Gauge.SLUG), new Object[] { " I ", "GCL", " P ", 'I', PB.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(ModItems.ammo_20gauge.stackFromEnum(12, Ammo20Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.FLECHETTE), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', CU.plate() });
CraftingManager.addRecipeAuto(ModItems.ammo_357.stackFromEnum(6, Ammo357Magnum.NIGHTMARE2), new Object[] { "I", "C", "P", 'I', ModItems.powder_power, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_calamity, 12), new Object[] { " I ", "GCG", " P ", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_actionexpress, 12), new Object[] { " I", "GC", " P", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_nuke, 1), new Object[] { " WP", "SEP", " WP", 'W', ModItems.wire_aluminium, 'P', STEEL.plate(), 'S', ModItems.hull_small_steel, 'E', ANY_HIGHEXPLOSIVE.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_dart, 16), new Object[] { "IPI", "ICI", "IPI", 'I', ModItems.plate_polymer, 'P', IRON.plate(), 'C', new ItemStack(ModItems.fluid_tank_lead_full, 1, Fluids.WATZ.ordinal()) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_dart_nerf, 16), new Object[] { "I", "I", 'I', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.GPS), new Object[] { "IPI", "ICI", "IPI", 'I', ModItems.plate_polymer, 'P', IRON.plate(), 'C', new ItemStack(ModItems.fluid_tank_lead_full, 1, Fluids.WATZ.getID()) });
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.NERF), new Object[] { "I", "I", 'I', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_45, 32), " I", "GC", " P", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_44, 'P', ModItems.primer_44);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_762, 32), " I", "GC", " P", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_9);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_luna, 4), 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 });
@ -218,60 +219,58 @@ public class WeaponRecipes {
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 ", "GCG", " P ", 'T', Blocks.tnt, 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ANY_HIGHEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 3), new Object[] { " T ", "GCG", " P ", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_he, 1), new Object[] { "G", "R", 'G', ANY_HIGHEXPLOSIVE.ingot(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_incendiary, 1), new Object[] { "G", "R", 'G', P_RED.dust(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_phosphorus, 1), new Object[] { "G", "R", 'G', P_WHITE.ingot(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_emp, 1), new Object[] { "G", "R", 'G', DIAMOND.dust(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_shrapnel, 1), new Object[] { "G", "R", 'G', ModItems.pellet_buckshot, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_glare, 1), new Object[] { "GGG", "GRG", "GGG", 'G', REDSTONE.dust(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_toxic, 1), new Object[] { "G", "R", 'G', ModItems.pellet_gas, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_canister, 1), new Object[] { "G", "R", 'G', ModItems.pellet_canister, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_nuclear, 1), new Object[] { " P ", "NRN", " P ", 'P', PU239.nugget(), 'N', OreDictManager.getReflector(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.DIESEL.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.DIESEL_CRACK.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.PETROIL.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.PETROIL_LEADED.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.GASOLINE.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.GASOLINE_LEADED.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket_rpc, 2), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.BIOFUEL.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { " T ", "GCG", " P ", 'T', ModItems.ball_dynamite, 'G', ModItems.rocket_fuel, 'C', ModItems.hull_small_aluminium, 'P', ModItems.primer_50 });// I got tired of changing *all* of them, the stock one is always the first one anyway
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.hull_small_aluminium, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE), new Object[] { "G", "R", 'G', ANY_PLASTICEXPLOSIVE.ingot(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY), new Object[] { "G", "R", 'G', P_RED.dust(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS), new Object[] { "G", "R", 'G', P_WHITE.ingot(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.EMP), new Object[] { "G", "R", 'G', "dustDiamond", 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SHRAPNEL), new Object[] { "G", "R", 'G', ModItems.pellet_buckshot, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE), new Object[] { "GGG", "GRG", "GGG", 'G', REDSTONE.dust(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CHLORINE), new Object[] { "G", "R", 'G', ModItems.pellet_gas, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CANISTER), new Object[] { "G", "R", 'G', ModItems.pellet_canister, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.NUCLEAR), new Object[] { " P ", "NRN", " P ", 'P', PU239.nugget(), 'N', OreDictManager.getReflector(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.DIESEL.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.DIESEL_CRACK.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.PETROIL.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.PETROIL_LEADED.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.GASOLINE.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.GASOLINE_LEADED.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', Fluids.BIOFUEL.getDict(1000), 'H', ModItems.hull_small_steel, 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket });
//Stinger Rockets
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket_he, 1), new Object[] { "S", "R", 'S', ANY_HIGHEXPLOSIVE.ingot(), 'R', ModItems.ammo_stinger_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket_incendiary, 1), new Object[] { "S", "R", 'S', P_RED.dust(), 'R', ModItems.ammo_stinger_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket_nuclear, 1), new Object[] { "RPR", "PSP", "RPR", 'R', ModItems.neutron_reflector, 'P', PU239.nugget(), 'S', ModItems.ammo_stinger_rocket });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket_bones, 1), new Object[] { " C ", "SKR", " P ", 'C', ModItems.fallout, 'S', SR90.dust(), 'K', ModItems.ammo_stinger_rocket, 'R', RA226.dust(), 'P', PU.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket, 2), "CE ", "FSF", " P ", 'C', ModItems.circuit_aluminium, 'E', ANY_PLASTICEXPLOSIVE.ingot(), 'F', ModItems.rocket_fuel, 'S', ModItems.hull_small_aluminium, 'P', ModItems.primer_50);
CraftingManager.addRecipeAuto(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.HE), new Object[] { "S", "R", 'S', ANY_PLASTICEXPLOSIVE.ingot(), 'R', ModItems.ammo_stinger_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.INCENDIARY), new Object[] { "S", "R", 'S', P_RED.dust(), 'R', ModItems.ammo_stinger_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.NUCLEAR), new Object[] { "RPR", "PSP", "RPR", 'R', ModItems.neutron_reflector, 'P', PU239.nugget(), 'S', ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.HE) });
CraftingManager.addRecipeAuto(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.BONES), new Object[] { " C ", "SKR", " P ", 'C', ModItems.fallout, 'S', SR90.dust(), 'K', ModItems.ammo_stinger_rocket, 'R', RA226.dust(), 'P', PU.dust() });
//40mm grenades
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', IRON.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', IRON.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', LAPIS.dust(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', IRON.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', LAPIS.dust(), 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', IRON.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_he, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ANY_HIGHEXPLOSIVE.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_incendiary, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', P_RED.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_phosphorus, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', P_WHITE.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_toxic, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_poison });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_concussion, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Items.glowstone_dust });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_nuclear, 2), new Object[] { " P ", "GIG", " P ", 'G', ModItems.ammo_grenade, 'I', ModItems.neutron_reflector, 'P', PU239.nugget() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_finned, 1), new Object[] { "G", "R", 'G', Items.feather, 'R', ModItems.ammo_grenade });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade_kampf, 2), new Object[] { "G", "R", 'G', ModItems.ammo_rocket, 'R', ModItems.ammo_grenade });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', ANY_HIGHEXPLOSIVE.dust(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', IRON.plate() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.TRACER), new Object[] { " T ", "GCI", " P ", 'T', LAPIS.dust(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', IRON.plate() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.HE), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ANY_PLASTICEXPLOSIVE.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.INCENDIARY), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', P_RED.dust() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.PHOSPHORUS), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', P_WHITE.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.CHLORINE), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_poison });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.CONCUSSION), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Items.glowstone_dust });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(2, AmmoGrenade.NUCLEAR), new Object[] { " P ", "GIG", " P ", 'G', ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.HE), 'I', ModItems.neutron_reflector, 'P', PU239.nugget() });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.FINNED), new Object[] { "G", "R", 'G', Items.feather, 'R', ModItems.ammo_grenade });
CraftingManager.addRecipeAuto(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.KAMPF), new Object[] { "G", "R", 'G', ModItems.ammo_rocket, 'R', ModItems.ammo_grenade });
//240mm Shells
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', ModItems.ballistite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 6), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_explosive, 4), new Object[] { " T ", "GHG", "CCC", 'T', ANY_HIGHEXPLOSIVE.ingot(), 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_explosive, 4), new Object[] { " T ", "GHG", "CCC", 'T', ANY_HIGHEXPLOSIVE.ingot(), 'G', ModItems.ballistite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_explosive, 6), new Object[] { " T ", "GHG", "CCC", 'T', ANY_HIGHEXPLOSIVE.ingot(), 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_apfsds_t, 4), new Object[] { " I ", "GIG", "CCC", 'I', W.ingot(), 'G', Items.gunpowder, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_apfsds_t, 4), new Object[] { " I ", "GIG", "CCC", 'I', W.ingot(), 'G', ModItems.ballistite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_apfsds_t, 6), new Object[] { " I ", "GIG", "CCC", 'I', W.ingot(), 'G', ModItems.cordite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_apfsds_du, 4), new Object[] { " I ", "GIG", "CCC", 'I', U238.ingot(), 'G', Items.gunpowder, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_apfsds_du, 4), new Object[] { " I ", "GIG", "CCC", 'I', U238.ingot(), 'G', ModItems.ballistite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_apfsds_du, 6), new Object[] { " I ", "GIG", "CCC", 'I', U238.ingot(), 'G', ModItems.cordite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell_w9, 1), new Object[] { " P ", "NSN", " P ", 'P', PU239.nugget(), 'N', OreDictManager.getReflector(), 'S', ModItems.ammo_shell_explosive });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModBlocks.tnt, 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModBlocks.tnt, 'G', ModItems.ballistite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 6), new Object[] { " T ", "GHG", "CCC", 'T', ModBlocks.tnt, 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(4, Ammo240Shell.EXPLOSIVE), new Object[] { " T ", "GHG", "CCC", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(4, Ammo240Shell.EXPLOSIVE), new Object[] { " T ", "GHG", "CCC", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.ballistite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(6, Ammo240Shell.EXPLOSIVE), new Object[] { " T ", "GHG", "CCC", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(4, Ammo240Shell.APFSDS_T), new Object[] { " I ", "GIG", "CCC", 'I', W.ingot(), 'G', Items.gunpowder, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(4, Ammo240Shell.APFSDS_T), new Object[] { " I ", "GIG", "CCC", 'I', W.ingot(), 'G', ModItems.ballistite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(6, Ammo240Shell.APFSDS_T), new Object[] { " I ", "GIG", "CCC", 'I', W.ingot(), 'G', ModItems.cordite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(4, Ammo240Shell.APFSDS_DU), new Object[] { " I ", "GIG", "CCC", 'I', U238.ingot(), 'G', Items.gunpowder, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(4, Ammo240Shell.APFSDS_DU), new Object[] { " I ", "GIG", "CCC", 'I', U238.ingot(), 'G', ModItems.ballistite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(6, Ammo240Shell.APFSDS_DU), new Object[] { " I ", "GIG", "CCC", 'I', U238.ingot(), 'G', ModItems.cordite, 'C', CU.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.W9), new Object[] { " P ", "NSN", " P ", 'P', PU239.nugget(), 'N', OreDictManager.getReflector(), 'S', ModItems.ammo_shell.stackFromEnum(Ammo240Shell.EXPLOSIVE) });
//Artillery Shells
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_arty, 1, 0), new Object[] { "CIC", "CSC", "CCC", 'C', ModItems.cordite, 'I', IRON.block(), 'S', ModItems.hull_small_steel });
@ -290,38 +289,37 @@ public class WeaponRecipes {
//Mini Nuke
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke, 1), new Object[] { "P", "S", "P", 'P', PU239.nugget(), 'S', ModItems.assembly_nuke });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke_low, 1), new Object[] { "P", "S", 'P', PU239.nugget(), 'S', ModItems.assembly_nuke });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke_high, 1), new Object[] { "PPP", "PSP", "PPP", 'P', PU239.nugget(), 'S', ModItems.assembly_nuke });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke_tots, 1), new Object[] { "PPP", "PIP", "PPP", 'P', ModItems.pellet_cluster, 'I', PU239.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke_safe, 1), new Object[] { "G", "N", 'G', Items.glowstone_dust, 'N', ModItems.ammo_nuke_low });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke_pumpkin, 1), new Object[] { " T ", "TST", " T ", 'T', Blocks.tnt, 'S', ModItems.assembly_nuke });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke_barrel, 1), new Object[] { ModItems.nuclear_waste_pearl, ModItems.tank_steel });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW), new Object[] { "P", "S", 'P', PU239.nugget(), 'S', ModItems.assembly_nuke });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH), new Object[] { "PPP", "PSP", "PPP", 'P', PU239.nugget(), 'S', ModItems.assembly_nuke });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.TOTS), new Object[] { "PPP", "PIP", "PPP", 'P', ModItems.pellet_cluster, 'I', PU239.ingot() });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.SAFE), new Object[] { "G", "N", 'G', Items.glowstone_dust, 'N', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW) });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.PUMPKIN), new Object[] { " T ", "TST", " T ", 'T', ModBlocks.tnt, 'S', ModItems.assembly_nuke });
//MIRV recycling
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke, 6), new Object[] { ModItems.ammo_mirv });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke_low, 6), new Object[] { ModItems.ammo_mirv_low });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke_high, 6), new Object[] { ModItems.ammo_mirv_high });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke_safe, 6), new Object[] { ModItems.ammo_mirv_safe });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_nuke, 6), new Object[] { ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV) });
CraftingManager.addShapelessAuto(ModItems.ammo_nuke.stackFromEnum(6, AmmoFatman.LOW), new Object[] { ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_LOW) });
CraftingManager.addShapelessAuto(ModItems.ammo_nuke.stackFromEnum(6, AmmoFatman.HIGH), new Object[] { ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_HIGH) });
CraftingManager.addShapelessAuto(ModItems.ammo_nuke.stackFromEnum(6, AmmoFatman.SAFE), new Object[] { ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SAFE) });
//MIRV
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_mirv, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke, 'C', ModItems.plate_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_mirv_low, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke_low, 'C', ModItems.plate_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_mirv_high, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke_high, 'C', ModItems.plate_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_mirv_safe, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke_safe, 'C', ModItems.plate_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
//since the milk part of the recipe isn't realy present in the MIRV's effect, it might as well be replaced with something more sensible, i.e. duct tape
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_mirv_special, 1), new Object[] { "CBC", "MCM", "CBC", 'C', ModItems.canned_jizz, 'B', ModItems.gun_bf_ammo, 'M', ModItems.ammo_mirv });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke, 'C', AL.plate(), 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_LOW), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW), 'C', AL.plate(), 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_HIGH), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH), 'C', AL.plate(), 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SAFE), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.SAFE), 'C', AL.plate(), 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
//since the milk part of the recipe isn't really present in the MIRV's effect, it might as well be replaced with something more sensible, i.e. duct tape
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SPECIAL), new Object[] { "CBC", "MCM", "CBC", 'C', ModItems.canned_jizz, 'B', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BALEFIRE), 'M', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV) });
//Flamer fuel
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fuel, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', Fluids.DIESEL.getDict(1000) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fuel_napalm, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_napalm });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fuel_phosphorus, 1), new Object[] { "CPC", "CDC", "CPC", 'C', COAL.dust(), 'P', P_WHITE.ingot(), 'D', ModItems.ammo_fuel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fuel_gas, 1), new Object[] { "PDP", "BDB", "PDP", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', ModItems.pellet_gas });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fuel_vaporizer, 1), new Object[] { "PSP", "SNS", "PSP", 'P', P_WHITE.ingot(), 'S', ModItems.crystal_sulfur, 'N', ModItems.ammo_fuel_napalm });
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.DIESEL), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', Fluids.DIESEL.getDict(1000) });
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_napalm });
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.PHOSPHORUS), new Object[] { "CPC", "CDC", "CPC", 'C', COAL.dust(), 'P', P_WHITE.ingot(), 'D', ModItems.ammo_fuel });
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.CHLORINE), new Object[] { "PDP", "BDB", "PDP", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', ModItems.pellet_gas });
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.VAPORIZER), new Object[] { "PSP", "SNS", "PSP", 'P', P_WHITE.ingot(), 'S', ModItems.crystal_sulfur, 'N', ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM) });
//Fire Extingusisher Tanks
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', new ItemStack(ModItems.fluid_tank_full, 1, Fluids.WATER.ordinal()) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext_foam, 1), new Object[] { " N ", "NFN", " N ", 'N', KNO.dust(), 'F', ModItems.ammo_fireext });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext_sand, 1), new Object[] { "NNN", "NFN", "NNN", 'N', ModBlocks.sand_boron, 'F', ModItems.ammo_fireext });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', new ItemStack(ModItems.fluid_tank_full, 1, Fluids.WATER.getID()) });
CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.FOAM), new Object[] { " N ", "NFN", " N ", 'N', KNO.dust(), 'F', ModItems.ammo_fireext });
CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.SAND), new Object[] { "NNN", "NFN", "NNN", 'N', ModBlocks.sand_boron, 'F', ModItems.ammo_fireext });
//Grenades
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_generic, 4), new Object[] { "RS ", "ITI", " I ", 'I', IRON.plate(), 'R', ModItems.wire_red_copper, 'S', STEEL.plate(), 'T', Item.getItemFromBlock(Blocks.tnt) });

View File

@ -15,11 +15,7 @@ public class NukeTab extends CreativeTabs {
@Override
public Item getTabIconItem() {
if(ModBlocks.float_bomb != null)
{
return Item.getItemFromBlock(ModBlocks.float_bomb);
}
if(ModBlocks.nuke_man != null) return Item.getItemFromBlock(ModBlocks.nuke_man);
return Items.iron_pickaxe;
}

View File

@ -171,7 +171,7 @@ public class EntityFalloutRain extends Entity {
}
float hardness = b.getBlockHardness(worldObj, x, y, z);
if(dist < 65 && hardness <= Blocks.stonebrick.getExplosionResistance(null) && hardness >= 0) {
if(dist < 65 && hardness <= Blocks.stonebrick.getExplosionResistance(null) && hardness >= 0/* && !b.hasTileEntity(worldObj.getBlockMetadata(x, y, z))*/) {
Block bl = worldObj.getBlock(x, y - 1, z);
if(bl == Blocks.air) {

View File

@ -264,10 +264,10 @@ public class EntityNukeExplosionMK3 extends Entity {
}
public static class ATEntry {
int dim;
int x;
int y;
int z;
public int dim;
public int x;
public int y;
public int z;
public ATEntry(int dim, int x, int y, int z) {
this.dim = dim;

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import com.hbm.items.ModItems;
import net.minecraft.item.ItemStack;
@ -42,7 +43,7 @@ public class EntityMissileMicro extends EntityMissileBaseAdvanced {
@Override
public ItemStack getDebrisRareDrop() {
return new ItemStack(ModItems.ammo_nuke_high, 1);
return ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH);
}
@Override

View File

@ -7,6 +7,7 @@ import com.hbm.entity.mob.ai.EntityAIMaskmanLasergun;
import com.hbm.entity.mob.ai.EntityAIMaskmanMinigun;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.util.ArmorUtil;
import api.hbm.entity.IRadiationImmune;
import net.minecraft.entity.SharedMonsterAttributes;
@ -21,6 +22,7 @@ import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityEgg;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.world.World;
@ -118,8 +120,12 @@ public class EntityMaskMan extends EntityMob implements IBossDisplayData, IRadia
protected void dropFewItems(boolean bool, int i) {
if(!worldObj.isRemote) {
ItemStack mask = new ItemStack(ModItems.gas_mask_m65);
ArmorUtil.installGasMaskFilter(mask, new ItemStack(ModItems.gas_mask_filter_combo));
this.entityDropItem(mask, 0F);
this.dropItem(ModItems.coin_maskman, 1);
this.dropItem(ModItems.gas_mask_m65, 1);
this.dropItem(ModItems.v1, 1);
this.dropItem(Items.skull, 1);
}

View File

@ -7,6 +7,7 @@ import com.hbm.entity.mob.ai.EntityAINuclearCreeperSwell;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
@ -241,7 +242,7 @@ public class EntityNuclearCreeper extends EntityMob {
this.dropItem(ModItems.fusion_core, 1);
}
if(i == 10)
this.dropItem(ModItems.ammo_nuke_high, 1);
this.entityDropItem(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH), 1);
}
}

View File

@ -14,6 +14,8 @@ import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
@ -32,6 +34,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
@ -80,14 +83,29 @@ public class EntityBulletBase extends Entity implements IProjectile {
this.config = BulletConfigSyncingUtil.pullConfig(config);
this.dataWatcher.updateObject(18, config);
shooter = entity;
ItemStack gun = entity.getHeldItem();
boolean offsetShot = true;
if(gun != null && gun.getItem() instanceof ItemGunBase) {
GunConfiguration cfg = ((ItemGunBase) gun.getItem()).mainConfig;
if(cfg != null && cfg.hasSights && entity.isSneaking()) {
offsetShot = false;
}
}
this.setLocationAndAngles(entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ, entity.rotationYaw, entity.rotationPitch);
double sideOffset = 0.16D;
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * sideOffset;
this.posY -= 0.1D;
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * sideOffset;
if(offsetShot) {
double sideOffset = 0.16D;
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * sideOffset;
this.posY -= 0.1D;
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * sideOffset;
} else {
this.posY -= 0.1D;
}
this.setPosition(this.posX, this.posY, this.posZ);
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
@ -97,7 +115,7 @@ public class EntityBulletBase extends Entity implements IProjectile {
this.renderDistanceWeight = 10.0D;
this.setSize(0.5F, 0.5F);
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.0F, this.config.spread);
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.0F, this.config.spread * (offsetShot ? 1F : 0.25F));
this.dataWatcher.updateObject(16, (byte)this.config.style);
this.dataWatcher.updateObject(17, (byte)this.config.trail);
@ -233,6 +251,10 @@ public class EntityBulletBase extends Entity implements IProjectile {
}
if(config.maxAge == 0) {
if(this.config.bUpdate != null)
this.config.bUpdate.behaveUpdate(this);
this.setDead();
return;
}
@ -292,10 +314,10 @@ public class EntityBulletBase extends Entity implements IProjectile {
boolean didBounce = false;
if (movement != null) {
//handle entity collision
if(movement.entityHit != null) {
if(movement != null) {
//handle entity collision
if(movement.entityHit != null) {
DamageSource damagesource = this.config.getDamage(this, shooter);
@ -325,7 +347,7 @@ public class EntityBulletBase extends Entity implements IProjectile {
}
}
if(!victim.attackEntityFrom(damagesource, damage)) {
if(victim != null && !victim.attackEntityFrom(damagesource, damage)) {
try {
Field lastDamage = ReflectionHelper.findField(EntityLivingBase.class, "lastDamage", "field_110153_bc");
@ -337,12 +359,12 @@ public class EntityBulletBase extends Entity implements IProjectile {
}
} catch (Exception x) { }
}
if(!worldObj.isRemote && headshot) {
if(victim instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) victim;
double head = living.height - living.getEyeHeight();
}
if(!worldObj.isRemote && headshot) {
if(victim instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) victim;
double head = living.height - living.getEyeHeight();
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaburst");
data.setInteger("count", 15);

View File

@ -0,0 +1,18 @@
package com.hbm.entity.projectile;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
public class EntityCombineBallNT extends EntityBulletBase {
public EntityCombineBallNT(World world, int config, EntityLivingBase shooter) {
super(world, config, shooter);
overrideDamage = 1000;
}
@Override
public void setDead() {
super.setDead();
worldObj.createExplosion(shooter, posX, posY, posZ, 2, false);
}
}

View File

@ -97,18 +97,22 @@ public class ExplosionNukeRayBatched {
float y0 = (float) (posY + (vec.yCoord * i));
float z0 = (float) (posZ + (vec.zCoord * i));
int iX = (int) Math.floor(x0);
int iY = (int) Math.floor(y0);
int iZ = (int) Math.floor(z0);
double fac = 100 - ((double) i) / ((double) length) * 100;
fac *= 0.07D;
if(!world.getBlock((int)x0, (int)y0, (int)z0).getMaterial().isLiquid())
res -= Math.pow(world.getBlock((int)x0, (int)y0, (int)z0).getExplosionResistance(null), 7.5D - fac);
else
res -= Math.pow(Blocks.air.getExplosionResistance(null), 7.5D - fac);
if(!world.getBlock(iX, iY, iZ).getMaterial().isLiquid())
res -= Math.pow(world.getBlock(iX, iY, iZ).getExplosionResistance(null), 7.5D - fac);
//else
// res -= Math.pow(Blocks.air.getExplosionResistance(null), 7.5D - fac); // air is 0, might want to raise that is necessary
if(res > 0 && world.getBlock((int)x0, (int)y0, (int)z0) != Blocks.air) {
if(res > 0 && world.getBlock(iX, iY, iZ) != Blocks.air) {
lastPos = new FloatTriplet(x0, y0, z0);
//all-air chunks don't need to be buffered at all
ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(((int) x0) >> 4, ((int) z0) >> 4);
ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(iX >> 4, iZ >> 4);
chunkCoords.add(chunkPos);
}
@ -185,9 +189,9 @@ public class ExplosionNukeRayBatched {
boolean inChunk = false;
for(int i = enter; i < vec.lengthVector(); i++) {
int x0 = (int)(posX + pX * i);
int y0 = (int)(posY + pY * i);
int z0 = (int)(posZ + pZ * i);
int x0 = (int) Math.floor(posX + pX * i);
int y0 = (int) Math.floor(posY + pY * i);
int z0 = (int) Math.floor(posZ + pZ * i);
if(x0 >> 4 != chunkX || z0 >> 4 != chunkZ) {
if(inChunk) {

View File

@ -0,0 +1,125 @@
package com.hbm.explosion.vanillant.standard;
import java.util.HashMap;
import java.util.List;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.interfaces.ICustomDamageHandler;
import com.hbm.explosion.vanillant.interfaces.IEntityProcessor;
import com.hbm.explosion.vanillant.interfaces.IEntityRangeMutator;
import net.minecraft.enchantment.EnchantmentProtection;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.ForgeEventFactory;
/** The amount of good decisions in NTM is few and far between, but the VNT explosion surely is one of them. */
public class EntityProcessorCross implements IEntityProcessor {
protected double nodeDist = 2D;
protected IEntityRangeMutator range;
protected ICustomDamageHandler damage;
public EntityProcessorCross(double nodeDist) {
this.nodeDist = nodeDist;
}
@Override
public HashMap<EntityPlayer, Vec3> process(ExplosionVNT explosion, World world, double x, double y, double z, float size) {
HashMap<EntityPlayer, Vec3> affectedPlayers = new HashMap();
size *= 2.0F;
if(range != null) {
size = range.mutateRange(explosion, size);
}
double minX = x - (double) size - 1.0D;
double maxX = x + (double) size + 1.0D;
double minY = y - (double) size - 1.0D;
double maxY = y + (double) size + 1.0D;
double minZ = z - (double) size - 1.0D;
double maxZ = z + (double) size + 1.0D;
List list = world.getEntitiesWithinAABBExcludingEntity(explosion.exploder, AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ));
ForgeEventFactory.onExplosionDetonate(world, explosion.compat, list, size);
Vec3[] nodes = new Vec3[7];
for(int i = 0; i < 7; i++) {
ForgeDirection dir = ForgeDirection.getOrientation(i);
nodes[i] = Vec3.createVectorHelper(x + dir.offsetX * nodeDist, y + dir.offsetY * nodeDist, z + dir.offsetZ * nodeDist);
}
for(int index = 0; index < list.size(); ++index) {
Entity entity = (Entity) list.get(index);
double distanceScaled = entity.getDistance(x, y, z) / size;
if(distanceScaled <= 1.0D) {
double deltaX = entity.posX - x;
double deltaY = entity.posY + entity.getEyeHeight() - y;
double deltaZ = entity.posZ - z;
double distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ);
if(distance != 0.0D) {
deltaX /= distance;
deltaY /= distance;
deltaZ /= distance;
double density = 0;
for(Vec3 vec : nodes) {
double d = world.getBlockDensity(vec, entity.boundingBox);
if(d > density) {
density = d;
}
}
double knockback = (1.0D - distanceScaled) * density;
entity.attackEntityFrom(DamageSource.setExplosionSource(explosion.compat), (float) ((int) ((knockback * knockback + knockback) / 2.0D * 8.0D * size + 1.0D)));
double enchKnockback = EnchantmentProtection.func_92092_a(entity, knockback);
entity.motionX += deltaX * enchKnockback;
entity.motionY += deltaY * enchKnockback;
entity.motionZ += deltaZ * enchKnockback;
if(entity instanceof EntityPlayer) {
affectedPlayers.put((EntityPlayer) entity, Vec3.createVectorHelper(deltaX * knockback, deltaY * knockback, deltaZ * knockback));
}
if(damage != null) {
damage.handleAttack(explosion, entity, distanceScaled);
}
}
}
}
return affectedPlayers;
}
public EntityProcessorCross withRangeMod(float mod) {
range = new IEntityRangeMutator() {
@Override
public float mutateRange(ExplosionVNT explosion, float range) {
return range * mod;
}
};
return this;
}
public EntityProcessorCross withDamageMod(ICustomDamageHandler damage) {
this.damage = damage;
return this;
}
}

View File

@ -7,6 +7,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.gui.GUIScreenBobmazon.Offer;
import com.hbm.inventory.gui.GUIScreenBobmazon.Requirement;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.items.special.ItemKitCustom;
@ -122,25 +123,24 @@ public class BobmazonOfferFactory {
weapons.add(new Offer(new ItemStack(ModItems.gun_uzi), Requirement.OIL, 80 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.gun_lever_action), Requirement.ASSEMBLY, 60 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.gun_bolt_action), Requirement.ASSEMBLY, 35 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.gun_revolver_ammo, 6), Requirement.OIL, 12 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_357_desh, 6), Requirement.OIL, 36 * inflation));
weapons.add(new Offer(ModItems.ammo_357.stackFromEnum(6, Ammo357Magnum.LEAD), Requirement.OIL, 12 * inflation));
weapons.add(new Offer(ModItems.ammo_357.stackFromEnum(6, Ammo357Magnum.DESH), Requirement.OIL, 36 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_44, 6), Requirement.OIL, 12 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_44_ap, 6), Requirement.OIL, 18 * inflation));
weapons.add(new Offer(ModItems.ammo_44.stackFromEnum(6, Ammo44Magnum.AP), Requirement.OIL, 18 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_5mm, 50), Requirement.OIL, 50 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_5mm_du, 50), Requirement.OIL, 75 * inflation));
weapons.add(new Offer(ModItems.ammo_5mm.stackFromEnum(50, Ammo5mm.DU), Requirement.OIL, 75 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_rocket), Requirement.OIL, 5 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_rocket_incendiary), Requirement.OIL, 8 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_rocket_sleek), Requirement.OIL, 12 * inflation));
weapons.add(new Offer(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY), Requirement.OIL, 8 * inflation));
weapons.add(new Offer(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SLEEK), Requirement.OIL, 12 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_grenade), Requirement.OIL, 4 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_grenade_incendiary), Requirement.OIL, 6 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_grenade_sleek), Requirement.OIL, 10 * inflation));
weapons.add(new Offer(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.INCENDIARY), Requirement.OIL, 6 * inflation));
weapons.add(new Offer(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.SLEEK), Requirement.OIL, 10 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_22lr, 32), Requirement.OIL, 24 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_22lr_ap, 32), Requirement.OIL, 32 * inflation));
weapons.add(new Offer(ModItems.ammo_22lr.stackFromEnum(32, Ammo22LR.AP), Requirement.OIL, 32 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_20gauge, 6), Requirement.OIL, 18 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_20gauge_slug, 6), Requirement.OIL, 20 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.ammo_20gauge_flechette, 6), Requirement.OIL, 22 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.grenade_if_generic, 3), Requirement.CHEMICS, 15 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.grenade_if_he, 3), Requirement.CHEMICS, 25 * inflation));
weapons.add(new Offer(ModItems.ammo_20gauge.stackFromEnum(6, Ammo20Gauge.SLUG), Requirement.OIL, 20 * inflation));
weapons.add(new Offer(ModItems.ammo_20gauge.stackFromEnum(6, Ammo20Gauge.FLECHETTE), Requirement.OIL, 22 * inflation));
weapons.add(new Offer(new ItemStack(ModItems.gun_hp_ammo, 1), Requirement.ASSEMBLY, 1000 * inflation));
tools.add(new Offer(new ItemStack(ModBlocks.crate_can, 1), Requirement.STEEL, 20 * inflation));
tools.add(new Offer(new ItemStack(ModBlocks.machine_keyforge), Requirement.STEEL, 10 * inflation));
@ -244,23 +244,23 @@ public class BobmazonOfferFactory {
special.add(new Offer(ItemKitCustom.create("Maid's Cleaning Utensils", "For the hard to reach spots", 0x00ff00, 0x008000,
new ItemStack(ModItems.gun_calamity),
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
new ItemStack(ModItems.ammo_50bmg_star, 64),
new ItemStack(ModItems.ammo_50bmg_star, 64),
ModItems.ammo_50bmg.stackFromEnum(64, Ammo50BMG.CHLOROPHYTE),
ModItems.ammo_50bmg.stackFromEnum(64, Ammo50BMG.CHLOROPHYTE),
ModItems.ammo_50bmg.stackFromEnum(64, Ammo50BMG.CHLOROPHYTE),
ModItems.ammo_50ae.stackFromEnum(64, Ammo50AE.STAR),
ModItems.ammo_50ae.stackFromEnum(64, Ammo50AE.STAR),
new ItemStack(ModItems.gun_supershotgun),
new ItemStack(ModItems.ammo_12gauge_du, 64),
new ItemStack(ModItems.ammo_12gauge_du, 64),
new ItemStack(ModItems.ammo_12gauge_shrapnel, 64),
new ItemStack(ModItems.ammo_12gauge_shrapnel, 64),
new ItemStack(ModItems.ammo_12gauge_marauder, 4),
ModItems.ammo_12gauge.stackFromEnum(64, Ammo12Gauge.DU),
ModItems.ammo_12gauge.stackFromEnum(64, Ammo12Gauge.DU),
ModItems.ammo_12gauge.stackFromEnum(64, Ammo12Gauge.SHRAPNEL),
ModItems.ammo_12gauge.stackFromEnum(64, Ammo12Gauge.SHRAPNEL),
ModItems.ammo_12gauge.stackFromEnum(4, Ammo12Gauge.MARAUDER),
new ItemStack(ModItems.gun_sauer),
new ItemStack(ModItems.ammo_4gauge, 64),
new ItemStack(ModItems.ammo_4gauge_claw, 64),
new ItemStack(ModItems.ammo_4gauge_kampf, 64),
new ItemStack(ModItems.ammo_4gauge_flechette, 64),
new ItemStack(ModItems.ammo_4gauge_void, 64)
ModItems.ammo_4gauge.stackFromEnum(64, Ammo4Gauge.CLAW),
ModItems.ammo_4gauge.stackFromEnum(64, Ammo4Gauge.KAMPF),
ModItems.ammo_4gauge.stackFromEnum(64, Ammo4Gauge.FLECHETTE),
ModItems.ammo_4gauge.stackFromEnum(64, Ammo4Gauge.VOID)
), Requirement.HIDDEN, 64));
special.add(new Offer(ItemKitNBT.create(
@ -276,13 +276,13 @@ public class BobmazonOfferFactory {
new ItemStack(ModItems.rpa_legs),
new ItemStack(ModItems.rpa_boots),
new ItemStack(ModItems.gun_lacunae),
new ItemStack(ModItems.ammo_5mm_star, 64),
new ItemStack(ModItems.ammo_5mm_star, 64),
new ItemStack(ModItems.ammo_5mm_star, 64),
new ItemStack(ModItems.ammo_5mm_star, 64),
new ItemStack(ModItems.ammo_5mm_star, 64),
new ItemStack(ModItems.ammo_5mm_star, 64),
new ItemStack(ModItems.ammo_5mm_star, 64)
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR),
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR),
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR),
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR),
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR),
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR),
ModItems.ammo_5mm.stackFromEnum(64, Ammo5mm.STAR)
).setStackDisplayName("Frenchman's Reward"), Requirement.HIDDEN, 32));
special.add(new Offer(new ItemStack(ModItems.gun_detonator, 1), Requirement.HIDDEN, 32));

View File

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map.Entry;
import com.hbm.handler.guncfg.*;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
public class BulletConfigSyncingUtil {
@ -73,6 +74,7 @@ public class BulletConfigSyncingUtil {
public static int G12_DU = i++;
public static int G12_AM = i++;
public static int G12_SLEEK = i++;
public static int G12_PERCUSSION = i++;
public static int LR22_NORMAL = i++;
public static int LR22_AP = i++;
@ -94,6 +96,10 @@ public class BulletConfigSyncingUtil {
public static int P9_DU = i++;
public static int P9_ROCKET = i++;
public static int ACP_45 = i++;
public static int ACP_45_AP = i++;
public static int ACP_45_DU = i++;
public static int BMG50_NORMAL = i++;
public static int BMG50_INCENDIARY = i++;
public static int BMG50_EXPLOSIVE = i++;
@ -105,6 +111,10 @@ public class BulletConfigSyncingUtil {
public static int BMG50_FLECHETTE_NORMAL = i++;
public static int BMG50_FLECHETTE_AM = i++;
public static int BMG50_FLECHETTE_PO = i++;
public static int ROUND_LUNA_SNIPER_SABOT = i++;
public static int ROUND_LUNA_SNIPER_INCENDIARY = i++;
public static int ROUND_LUNA_SNIPER_EXPLOSIVE = i++;
public static int R5_NORMAL = i++;
public static int R5_EXPLOSIVE = i++;
@ -165,6 +175,8 @@ public class BulletConfigSyncingUtil {
public static int R556_FLECHETTE_DU = i++;
public static int R556_FLECHETTE_SLEEK = i++;
public static int R556_K = i++;
public static int W308 = i++;
public static int B75_NORMAL = i++;
public static int B75_INCENDIARY = i++;
@ -229,6 +241,10 @@ public class BulletConfigSyncingUtil {
public static int NUKE_MIRV_SPECIAL = i++;
public static int NUKE_AMAT = i++;
public static int TWR_RAY = i++;
public static int HLR_NORMAL = i++;
public static int HLR_ALT = i++;
public static int ZOMG_BOLT = i++;
public static int DET_BOLT = i++;
@ -271,18 +287,18 @@ public class BulletConfigSyncingUtil {
configSet.put(TEST_CONFIG, BulletConfigFactory.getTestConfig());
configSet.put(IRON_REVOLVER, Gun357MagnumFactory.getRevIronConfig());
configSet.put(STEEL_REVOLVER, Gun357MagnumFactory.getRevSteelConfig());
configSet.put(LEAD_REVOLVER, Gun357MagnumFactory.getRevLeadConfig());
configSet.put(STEEL_REVOLVER, Gun357MagnumFactory.getRevLeadConfig());
configSet.put(LEAD_REVOLVER, Gun357MagnumFactory.getRevNuclearConfig());
configSet.put(GOLD_REVOLVER, Gun357MagnumFactory.getRevGoldConfig());
configSet.put(CURSED_REVOLVER, Gun357MagnumFactory.getRevCursedConfig());
configSet.put(SCHRABIDIUM_REVOLVER, Gun357MagnumFactory.getRevSchrabidiumConfig());
configSet.put(NIGHT_REVOLVER, Gun357MagnumFactory.getRevNightmareConfig());
configSet.put(NIGHT_REVOLVER, Gun357MagnumFactory.getRevNightmare1Config());
configSet.put(NIGHT2_REVOLVER, Gun357MagnumFactory.getRevNightmare2Config());
configSet.put(SATURNITE_REVOLVER, Gun357MagnumFactory.getRevSteelConfig().setToFire(3));
configSet.put(SATURNITE_REVOLVER, Gun357MagnumFactory.getRevLeadConfig().setToFire(3));
configSet.put(DESH_REVOLVER, Gun357MagnumFactory.getRevDeshConfig());
configSet.put(IRON_HS, Gun357MagnumFactory.getRevIronConfig().setHeadshot(3F));
configSet.put(STEEL_HS, Gun357MagnumFactory.getRevSteelConfig().setHeadshot(3F));
configSet.put(STEEL_HS, Gun357MagnumFactory.getRevCursedConfig().setHeadshot(3F));
configSet.put(GOLD_HS, Gun357MagnumFactory.getRevGoldConfig().setHeadshot(3F));
configSet.put(DESH_HS, Gun357MagnumFactory.getRevDeshConfig().setHeadshot(3F));
@ -335,6 +351,7 @@ public class BulletConfigSyncingUtil {
configSet.put(G12_DU, Gun12GaugeFactory.get12GaugeDUConfig());
configSet.put(G12_AM, Gun12GaugeFactory.get12GaugeAMConfig());
configSet.put(G12_SLEEK, Gun12GaugeFactory.get12GaugeSleekConfig());
configSet.put(G12_PERCUSSION, Gun12GaugeFactory.get12GaugePercussionConfig());
configSet.put(LR22_NORMAL, Gun22LRFactory.get22LRConfig());
configSet.put(LR22_AP, Gun22LRFactory.get22LRAPConfig());
@ -356,6 +373,10 @@ public class BulletConfigSyncingUtil {
configSet.put(P9_DU, Gun9mmFactory.get9mmDUConfig());
configSet.put(P9_ROCKET, Gun9mmFactory.get9mmRocketConfig());
configSet.put(ACP_45, Gun45ACPFactory.get45AutoConfig());
configSet.put(ACP_45_AP, Gun45ACPFactory.get45AutoAPConfig());
configSet.put(ACP_45_DU, Gun45ACPFactory.get45AutoDUConfig());
configSet.put(BMG50_NORMAL, Gun50BMGFactory.get50BMGConfig());
configSet.put(BMG50_INCENDIARY, Gun50BMGFactory.get50BMGFireConfig());
configSet.put(BMG50_PHOSPHORUS, Gun50BMGFactory.get50BMGPhosphorusConfig());
@ -368,6 +389,10 @@ public class BulletConfigSyncingUtil {
configSet.put(BMG50_FLECHETTE_AM, Gun50BMGFactory.get50BMGFlechetteAMConfig());
configSet.put(BMG50_FLECHETTE_PO, Gun50BMGFactory.get50BMGFlechettePOConfig());
configSet.put(ROUND_LUNA_SNIPER_SABOT, Gun50BMGFactory.getLunaticSabotRound());
configSet.put(ROUND_LUNA_SNIPER_INCENDIARY, Gun50BMGFactory.getLunaticIncendiaryRound());
configSet.put(ROUND_LUNA_SNIPER_EXPLOSIVE, Gun50BMGFactory.getLunaticExplosiveRound());
configSet.put(R5_NORMAL, Gun5mmFactory.get5mmConfig());
configSet.put(R5_EXPLOSIVE, Gun5mmFactory.get5mmExplosiveConfig());
configSet.put(R5_DU, Gun5mmFactory.get5mmDUConfig());
@ -428,6 +453,8 @@ public class BulletConfigSyncingUtil {
configSet.put(R556_FLECHETTE_SLEEK, Gun556mmFactory.get556FlechetteSleekConfig());
configSet.put(R556_K, Gun556mmFactory.get556KConfig());
configSet.put(W308, Gun762mmFactory.get762NATOConfig());
configSet.put(B75_NORMAL, Gun75BoltFactory.get75BoltConfig());
configSet.put(B75_INCENDIARY, Gun75BoltFactory.get75BoltIncConfig());
configSet.put(B75_HE, Gun75BoltFactory.get75BoltHEConfig());
@ -485,6 +512,10 @@ public class BulletConfigSyncingUtil {
configSet.put(NUKE_MIRV_SPECIAL, GunFatmanFactory.getMirvSpecialConfig());
configSet.put(NUKE_AMAT, GunFatmanFactory.getBalefireConfig());
//configSet.put(TWR_RAY, GunEnergyFactory.getSingConfig());
//configSet.put(HLR_NORMAL, GunEnergyFactory.getHLRPrecisionConfig());
//configSet.put(HLR_ALT, GunEnergyFactory.getHLRScatterConfig());
configSet.put(ZOMG_BOLT, GunEnergyFactory.getZOMGBoltConfig());
configSet.put(DET_BOLT, GunDetonatorFactory.getLaserConfig());
@ -500,16 +531,16 @@ public class BulletConfigSyncingUtil {
configSet.put(GLASS_EMGAMMA, GunPoweredFactory.getEMGammaConfig());
configSet.put(CHL_LR22, Gun22LRFactory.get22LRConfig().setToHoming(ModItems.ammo_22lr_chlorophyte));
configSet.put(CHL_LR22_FIRE, Gun22LRFactory.get22LRConfig().setToFire(3).setToHoming(ModItems.ammo_22lr_chlorophyte));
configSet.put(CHL_M44, Gun44MagnumFactory.getNoPipConfig().setToHoming(ModItems.ammo_44_chlorophyte));
configSet.put(CHL_P9, Gun9mmFactory.get9mmConfig().setToHoming(ModItems.ammo_9mm_chlorophyte));
configSet.put(CHL_BMG50, Gun50BMGFactory.get50BMGConfig().setToHoming(ModItems.ammo_50bmg_chlorophyte));
configSet.put(CHL_R5, Gun5mmFactory.get5mmConfig().setToHoming(ModItems.ammo_5mm_chlorophyte));
configSet.put(CHL_R5_BOLT, Gun5mmFactory.get5mmConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE).setToHoming(ModItems.ammo_5mm_chlorophyte));
configSet.put(CHL_AE50, Gun50AEFactory.get50AEConfig().setToHoming(ModItems.ammo_50ae_chlorophyte));
configSet.put(CHL_R556, Gun556mmFactory.get556Config().setToHoming(ModItems.ammo_556_chlorophyte));
configSet.put(CHL_R556_FLECHETTE, Gun556mmFactory.get556FlechetteConfig().setToHoming(ModItems.ammo_556_flechette_chlorophyte));
configSet.put(CHL_LR22, Gun22LRFactory.get22LRConfig().setToHoming(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.CHLOROPHYTE)));
configSet.put(CHL_LR22_FIRE, Gun22LRFactory.get22LRConfig().setToFire(3).setToHoming(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.CHLOROPHYTE)));
configSet.put(CHL_M44, Gun44MagnumFactory.getNoPipConfig().setToHoming(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.CHLOROPHYTE)));
configSet.put(CHL_P9, Gun9mmFactory.get9mmConfig().setToHoming(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.CHLOROPHYTE)));
configSet.put(CHL_BMG50, Gun50BMGFactory.get50BMGConfig().setToHoming(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.CHLOROPHYTE)));
configSet.put(CHL_R5, Gun5mmFactory.get5mmConfig().setToHoming(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.CHLOROPHYTE)));
configSet.put(CHL_R5_BOLT, Gun5mmFactory.get5mmConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE).setToHoming(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.CHLOROPHYTE)));
configSet.put(CHL_AE50, Gun50AEFactory.get50AEConfig().setToHoming(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.CHLOROPHYTE)));
configSet.put(CHL_R556, Gun556mmFactory.get556Config().setToHoming(ModItems.ammo_556.stackFromEnum(Ammo556mm.CHLOROPHYTE)));
configSet.put(CHL_R556_FLECHETTE, Gun556mmFactory.get556FlechetteConfig().setToHoming(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_CHLOROPHYTE)));
configSet.put(MASKMAN_BULLET, GunNPCFactory.getMaskmanBullet());
configSet.put(MASKMAN_ORB, GunNPCFactory.getMaskmanOrb());

View File

@ -10,19 +10,22 @@ import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletRicochetBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.interfaces.Untested;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasing;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.EnumChatFormatting;
public class BulletConfiguration {
public class BulletConfiguration implements Cloneable {
//what item this specific configuration consumes
public Item ammo;
public ComparableStack ammo;
//how many ammo units one item restores
public int ammoCount = 1;
//how fast the bullet is (in sanics per second, or sps)
@ -98,6 +101,7 @@ public class BulletConfiguration {
public int plink;
//vanilla particle FX
public String vPFX = "";
public SpentCasing spentCasing;
//energy projectiles
//power consumed per shot
@ -173,9 +177,7 @@ public class BulletConfiguration {
return this;
}
public BulletConfiguration setToHoming(Item ammo) {
this.ammo = ammo;
public BulletConfiguration getChlorophyte() {
this.bUpdate = BulletConfigFactory.getHomingBehavior(200, 45);
this.dmgMin *= 1.5F;
this.dmgMax *= 1.5F;
@ -183,9 +185,27 @@ public class BulletConfiguration {
this.doesRicochet = false;
this.doesPenetrate = false;
this.vPFX = "greendust";
if(this.spentCasing != null) {
int[] colors = this.spentCasing.getColors();
this.spentCasing = this.spentCasing.clone();
if(colors != null && colors.length > 0) {
int[] colorClone = new int[colors.length];
for(int i = 0; i < colors.length; i++) colorClone[i] = colors[i];
colorClone[colorClone.length - 1] = 0x659750; // <- standard chlorophyte coloring in last place
this.spentCasing.setColor(colorClone).register(this.spentCasing.getName() + "Cl");
}
}
return this;
}
public BulletConfiguration setToHoming(ItemStack ammo) {
this.ammo = new ComparableStack(ammo);
return getChlorophyte();
}
public BulletConfiguration accuracyMod(float mod) {
this.spread *= mod;
@ -214,4 +234,14 @@ public class BulletConfiguration {
return dmg;
}
@Override
public BulletConfiguration clone() {
try {
return (BulletConfiguration) super.clone();
} catch(CloneNotSupportedException e) {
MainRegistry.logger.catching(e);
return new BulletConfiguration();
}
}
}

View File

@ -0,0 +1,163 @@
package com.hbm.handler;
import java.util.HashMap;
import java.util.Random;
import org.lwjgl.util.vector.Matrix4f;
import org.lwjgl.util.vector.Vector3f;
import org.lwjgl.util.vector.Vector4f;
import com.hbm.particle.ParticleSpentCasing;
import com.hbm.particle.SpentCasing;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
/**
* Config for the guns themselves on where to spawn casings and at what angle
* @author uffr, hbm
*/
public class CasingEjector implements Cloneable {
public static HashMap<Integer, CasingEjector> mappings = new HashMap();
public static final Random rand = new Random();
private int id;
private static int nextId = 0;
private Vec3 posOffset = Vec3.createVectorHelper(0, 0, 0);
private Vec3 initialMotion = Vec3.createVectorHelper(0, 0, 0);
private int casingAmount = 1;
private boolean afterReload = false;
private int delay = 0;
private float randomYaw = 0F;
private float randomPitch = 0F;
public CasingEjector() {
this.id = nextId;
nextId++;
mappings.put(id, this);
}
public CasingEjector setOffset(double x, double y, double z) {
return setOffset(Vec3.createVectorHelper(x, y, z));
}
public CasingEjector setOffset(Vec3 vec) {
this.posOffset = vec;
return this;
}
public CasingEjector setMotion(double x, double y, double z) {
return setMotion(Vec3.createVectorHelper(x, y, z));
}
public CasingEjector setMotion(Vec3 vec) {
this.initialMotion = vec;
return this;
}
public CasingEjector setAmount(int am) {
this.casingAmount = am;
return this;
}
public CasingEjector setAfterReload() {
this.afterReload = true;
return this;
}
public CasingEjector setDelay(int delay) {
this.delay = delay;
return this;
}
public CasingEjector setAngleRange(float yaw, float pitch) {
this.randomYaw = yaw;
this.randomPitch = pitch;
return this;
}
public int getId() { return this.id; }
public Vec3 getOffset() { return this.posOffset; }
public Vec3 getMotion() { return this.initialMotion; }
public int getAmount() { return this.casingAmount; }
public boolean getAfterReload() { return this.afterReload; }
public int getDelay() { return this.delay; }
public float getYawFactor() { return this.randomYaw; }
public float getPitchFactor() { return this.randomPitch; }
@SideOnly(Side.CLIENT)
public void spawnCasing(TextureManager textureManager, SpentCasing config, World world, double x, double y, double z, float pitch, float yaw, boolean crouched) {
Vec3 rotatedMotionVec = rotateVector(getMotion(), pitch + (float) rand.nextGaussian() * getPitchFactor(), yaw + (float) rand.nextGaussian() * getPitchFactor(), getPitchFactor(), getPitchFactor());
ParticleSpentCasing casing = new ParticleSpentCasing(textureManager, world, x, y, z, rotatedMotionVec.xCoord, rotatedMotionVec.yCoord, rotatedMotionVec.zCoord, (float) (getPitchFactor() * rand.nextGaussian()), (float) (getYawFactor() * rand.nextGaussian()), config);
offsetCasing(casing, getOffset(), pitch, yaw, crouched);
casing.rotationPitch = (float) Math.toDegrees(pitch);
casing.rotationYaw = (float) Math.toDegrees(yaw);
Minecraft.getMinecraft().effectRenderer.addEffect(casing);
}
// Rotate a position
@SideOnly(Side.CLIENT)
private static void offsetCasing(ParticleSpentCasing casing, Vec3 offset, float pitch, float yaw, boolean crouched) {
// x-axis offset, 0 if crouched to center
final float oX = (float) (crouched ? 0 : offset.xCoord);
// Create rotation matrices for pitch and yaw
final Matrix4f pitchMatrix = new Matrix4f(), yawMatrix = new Matrix4f();
pitchMatrix.rotate(pitch, new Vector3f(1, 0, 0)); // modify axis of rotation
yawMatrix.rotate(-yaw, new Vector3f(0, 1, 0));
// Multiply matrices to get combined rotation matrix
final Matrix4f rotMatrix = Matrix4f.mul(yawMatrix, pitchMatrix, null);
// Create vector representing the offset and apply rotation
final Vector4f offsetVector = new Vector4f(oX, (float) offset.yCoord, (float) offset.zCoord, 1); // set fourth coordinate to 1
Matrix4f.transform(rotMatrix, offsetVector, offsetVector);
final Vector3f result = new Vector3f(); // create result vector
result.set(offsetVector.x, offsetVector.y, offsetVector.z); // set result vector using transformed coordinates
// Apply rotation
casing.setPosition(casing.posX + result.x, casing.posY + result.y, casing.posZ + result.z);
}
private static Vec3 rotateVector(Vec3 vector, float pitch, float yaw, float pitchFactor, float yawFactor) {
// Apply randomness to vector
vector.xCoord += rand.nextGaussian() * yawFactor;
vector.yCoord += rand.nextGaussian() * pitchFactor;
vector.zCoord += rand.nextGaussian() * yawFactor;
final Matrix4f pitchMatrix = new Matrix4f(), yawMatrix = new Matrix4f();
pitchMatrix.setIdentity();
pitchMatrix.rotate(-pitch, new Vector3f(1, 0, 0));
yawMatrix.setIdentity();
yawMatrix.rotate(-yaw, new Vector3f(0, 1, 0));
final Vector4f vector4f = new Vector4f((float) vector.xCoord, (float) vector.yCoord, (float) vector.zCoord, 1);
Matrix4f.transform(pitchMatrix, vector4f, vector4f);
Matrix4f.transform(yawMatrix, vector4f, vector4f);
return Vec3.createVectorHelper(vector4f.x, vector4f.y, vector4f.z);
}
public static CasingEjector fromId(int id) {
return mappings.get(id);
}
@Override
public CasingEjector clone() {
try {
return (CasingEjector) super.clone();
} catch(CloneNotSupportedException e) {
return new CasingEjector();
}
}
}

View File

@ -35,7 +35,8 @@ public class FuelHandler implements IFuelHandler {
if(fuel.getItem() == ModItems.powder_fire) return 6400;
if(fuel.getItem() == ModItems.lignite) return 1200;
if(fuel.getItem() == ModItems.powder_lignite) return 1200;
if(fuel.getItem() == ModItems.coke) return 3200;
if(fuel.getItem() == ModItems.coke) return single * 16;
if(fuel.getItem() == Item.getItemFromBlock(ModBlocks.block_coke)) return single * 160;
if(fuel.getItem() == ModItems.book_guide) return single;
if(fuel.getItem() == ModItems.coal_infernal) return 4800;
if(fuel.getItem() == ModItems.crystal_coal) return 6400;

View File

@ -4,11 +4,14 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class GunConfiguration {
import net.minecraft.util.ResourceLocation;
public class GunConfiguration implements Cloneable {
/**
* alt function restrictions:
@ -31,8 +34,14 @@ public class GunConfiguration {
//animations!
public HashMap<AnimType, BusAnimation> animations = new HashMap();
//whether ot not to disable crosshais when sneaking
//whether or not to disable crosshair when sneaking
public boolean hasSights;
//texture overlay when sneaking
public ResourceLocation scopeTexture;
//whether the FOV multiplier should be absolute or multiplicative to other modifiers, multiplicative mode is experimental!
public boolean absoluteFOV = true;
//the target FOV/multiplied FOV modifier when sneaking
public float zoomFOV = 0.0F;
//how long the reload animation will play
//MUST BE GREATER THAN ZERO ! ! !
@ -46,6 +55,7 @@ public class GunConfiguration {
public float firingPitch = 1.0F;
//whether the reload sound should be played at the beginning or at the end of the reload
public boolean reloadSoundEnd = true;
public String equipSound = "";
//how much ammo the clip can hold, 0 if drawn from inventory
public int ammoCap;
@ -58,14 +68,14 @@ public class GunConfiguration {
//for electrically powered weapons:
//the Maximum capacity of the gun
public int maxCharge;
public long maxCharge;
//the rate at which the gun is charged
public int chargeRate;
public long chargeRate;
//how much energy is discharged per shot
public int dischargePerShot;
public long dischargePerShot;
public String name = "";
public String manufacturer = "";
public EnumGunManufacturer manufacturer = EnumGunManufacturer.NONE;
public List<String> comment = new ArrayList();
//bullet configs for main and alt fire
@ -73,6 +83,9 @@ public class GunConfiguration {
//crosshair
public Crosshair crosshair;
//casing eject behavior
public CasingEjector ejector = null;
public static final int MODE_NORMAL = 0;
public static final int MODE_RELEASE = 1;

View File

@ -1,10 +1,21 @@
package com.hbm.handler;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map.Entry;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ItemModCladding;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import com.hbm.util.Compat;
@ -15,7 +26,7 @@ import net.minecraft.item.ItemStack;
public class HazmatRegistry {
public static void registerHazmats() {
public static void initDefault() {
//assuming coefficient of 10
//real coefficient turned out to be 5
@ -249,4 +260,80 @@ public class HazmatRegistry {
}
public static final Gson gson = new Gson();
public static void registerHazmats() {
File folder = MainRegistry.configHbmDir;
File config = new File(folder.getAbsolutePath() + File.separatorChar + "hbmRadResist.json");
File template = new File(folder.getAbsolutePath() + File.separatorChar + "_hbmRadResist.json");
initDefault();
if(!config.exists()) {
writeDefault(template);
} else {
HashMap<Item, Double> conf = readConfig(config);
if(conf != null) {
entries.clear();
entries.putAll(conf);
}
}
}
private static void writeDefault(File file) {
try {
JsonWriter writer = new JsonWriter(new FileWriter(file));
writer.setIndent(" "); //pretty formatting
writer.beginObject(); //initial '{'
writer.name("comment").value("Template file, remove the underscore ('_') from the name to enable the config.");
writer.name("entries").beginArray(); //all recipes are stored in an array called "entries"
for(Entry<Item, Double> entry : entries.entrySet()) {
writer.beginObject(); //begin object for a single recipe
writer.name("item").value(Item.itemRegistry.getNameForObject(entry.getKey()));
writer.name("resistance").value(entry.getValue());
writer.endObject(); //end recipe object
}
writer.endArray(); //end recipe array
writer.endObject(); //final '}'
writer.close();
} catch(IOException e) {
e.printStackTrace();
}
}
private static HashMap<Item, Double> readConfig(File config) {
try {
JsonObject json = gson.fromJson(new FileReader(config), JsonObject.class);
JsonArray array = json.get("entries").getAsJsonArray();
HashMap<Item, Double> conf = new HashMap();
for(JsonElement element : array) {
JsonObject object = (JsonObject) element;
try {
String name = object.get("item").getAsString();
Item item = (Item) Item.itemRegistry.getObject(name);
double resistance = object.get("resistance").getAsDouble();
if(item != null) {
conf.put(item, resistance);
} else {
MainRegistry.logger.error("Tried loading unknown item " + name + " for hazmat entry.");
}
} catch(Exception ex) {
MainRegistry.logger.error("Encountered " + ex + " trying to read hazmat entry " + element.toString());
}
}
return conf;
} catch(Exception ex) {
ex.printStackTrace();
}
return null;
}
}

View File

@ -11,6 +11,7 @@ import com.hbm.explosion.ExplosionNT;
import com.hbm.explosion.ExplosionNT.ExAttrib;
import com.hbm.inventory.recipes.CentrifugeRecipes;
import com.hbm.inventory.recipes.CrystallizerRecipes;
import com.hbm.inventory.recipes.CrystallizerRecipes.CrystallizerRecipe;
import com.hbm.inventory.recipes.ShredderRecipes;
import com.hbm.items.ModItems;
import com.hbm.items.tool.IItemAbility;
@ -439,11 +440,11 @@ public abstract class ToolAbility {
block = Blocks.redstone_ore;
ItemStack stack = new ItemStack(block, 1, meta);
ItemStack result = CrystallizerRecipes.getOutput(stack);
CrystallizerRecipe result = CrystallizerRecipes.getOutput(stack);
if(result != null) {
world.setBlockToAir(x, y, z);
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, result.copy()));
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, result.output.copy()));
player.getHeldItem().damageItem(1, player);
}

View File

@ -2,6 +2,7 @@ package com.hbm.handler;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockBobble.BobbleType;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
import com.hbm.items.tool.IItemAbility;
import com.hbm.packet.AuxParticlePacketNT;
@ -206,38 +207,27 @@ public abstract class WeaponAbility {
if(living.getHealth() <= 0.0F) {
WeightedRandomObject[] ammo = new WeightedRandomObject[] {
new WeightedRandomObject(ModItems.ammo_12gauge, 10),
new WeightedRandomObject(ModItems.ammo_12gauge_shrapnel, 5),
new WeightedRandomObject(ModItems.ammo_12gauge_du, 3),
new WeightedRandomObject(ModItems.ammo_20gauge, 10),
new WeightedRandomObject(ModItems.ammo_20gauge_flechette, 5),
new WeightedRandomObject(ModItems.ammo_20gauge_slug, 5),
new WeightedRandomObject(ModItems.ammo_9mm, 10),
new WeightedRandomObject(ModItems.ammo_9mm_ap, 5),
new WeightedRandomObject(ModItems.ammo_5mm, 10),
new WeightedRandomObject(ModItems.ammo_5mm_du, 3),
new WeightedRandomObject(ModItems.ammo_556, 10),
new WeightedRandomObject(ModItems.ammo_556_phosphorus, 5),
new WeightedRandomObject(ModItems.ammo_556_flechette, 10),
new WeightedRandomObject(ModItems.ammo_556_flechette_phosphorus, 5),
new WeightedRandomObject(ModItems.ammo_50bmg, 10),
new WeightedRandomObject(ModItems.ammo_50bmg_incendiary, 5),
new WeightedRandomObject(ModItems.ammo_50bmg_ap, 5),
new WeightedRandomObject(ModItems.ammo_grenade, 5),
new WeightedRandomObject(ModItems.ammo_grenade_concussion, 3),
new WeightedRandomObject(ModItems.ammo_grenade_phosphorus, 3),
new WeightedRandomObject(ModItems.ammo_rocket, 5),
new WeightedRandomObject(ModItems.ammo_rocket_glare, 5),
new WeightedRandomObject(ModItems.ammo_rocket_phosphorus, 5),
new WeightedRandomObject(ModItems.ammo_rocket_rpc, 1),
new WeightedRandomObject(ModItems.syringe_metal_stimpak, 25),
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.STOCK), 10),
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SHRAPNEL), 5),
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.STOCK), 10),
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.FLECHETTE), 5),
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLUG), 5),
new WeightedRandomObject(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.STOCK), 10),
new WeightedRandomObject(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STOCK), 10),
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.STOCK), 10),
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE), 10),
new WeightedRandomObject(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK), 3),
new WeightedRandomObject(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK), 3),
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK), 1),
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE), 1),
new WeightedRandomObject(new ItemStack(ModItems.syringe_metal_stimpak), 20),
};
int count = Math.min((int)Math.ceil(living.getMaxHealth() / divider), 250); //safeguard to prevent funnies from bosses with obscene health
for(int i = 0; i < count; i++) {
living.dropItem(((WeightedRandomObject)WeightedRandom.getRandomItem(living.getRNG(), ammo)).asItem(), 1);
living.entityDropItem(((WeightedRandomObject)WeightedRandom.getRandomItem(living.getRNG(), ammo)).asStack(), 1);
world.spawnEntityInWorld(new EntityXPOrb(world, living.posX, living.posY, living.posZ, 1));
}

View File

@ -10,6 +10,8 @@ import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.packet.AuxParticlePacketNT;
@ -37,8 +39,8 @@ public class BulletConfigFactory {
public static BulletConfiguration getTestConfig() {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.gun_revolver_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.LEAD));
bullet.velocity = 5.0F;
bullet.spread = 0.05F;
bullet.wear = 10;
@ -62,6 +64,8 @@ public class BulletConfigFactory {
}
public static final float defaultSpread = 0.005F;
/// STANDARD CONFIGS ///
//do not include damage or ammo
public static BulletConfiguration standardBulletConfig() {
@ -69,7 +73,7 @@ public class BulletConfigFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 5.0F;
bullet.spread = 0.005F;
bullet.spread = defaultSpread;
bullet.wear = 10;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
@ -101,9 +105,9 @@ public class BulletConfigFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 5.0F;
bullet.spread = 0.05F;
bullet.spread = defaultSpread * 10F;
bullet.wear = 10;
bullet.bulletsMin = 5;
bullet.bulletsMin = 6;
bullet.bulletsMax = 8;
bullet.gravity = 0D;
bullet.maxAge = 100;
@ -181,7 +185,7 @@ public class BulletConfigFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 2.0F;
bullet.spread = 0.005F;
bullet.spread = defaultSpread;
bullet.wear = 10;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
@ -207,7 +211,7 @@ public class BulletConfigFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 2.0F;
bullet.spread = 0.005F;
bullet.spread = defaultSpread;
bullet.wear = 10;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
@ -233,7 +237,7 @@ public class BulletConfigFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 3.0F;
bullet.spread = 0.005F;
bullet.spread = defaultSpread;
bullet.wear = 10;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
@ -258,7 +262,7 @@ public class BulletConfigFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 3.0F;
bullet.spread = 0.005F;
bullet.spread = defaultSpread;
bullet.wear = 10;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;

View File

@ -1,13 +1,22 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.List;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHurtBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.Ammo12Gauge;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -15,12 +24,31 @@ import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
public class Gun12GaugeFactory {
private static final CasingEjector EJECTOR_SPAS, EJECTOR_SPAS_ALT, EJECTOR_BENELLI, EJECTOR_UBOINIK, EJECTOR_SSG;
private static final SpentCasing CASING12GAUGE;
static {
EJECTOR_SPAS = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, 0, 0.5).setAngleRange(0.01F, 0.03F).setDelay(12);
EJECTOR_SPAS_ALT = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, 0, 0.5).setAngleRange(0.01F, 0.03F).setDelay(12).setAmount(2);
EJECTOR_BENELLI = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.3, 1, 0).setAngleRange(0.01F, 0.03F);
EJECTOR_UBOINIK = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.3, 0.5).setAngleRange(0.01F, 0.03F);
EJECTOR_SSG = new CasingEjector().setMotion(0.2, 0, -0.2).setOffset(0.8, 0, 0).setAngleRange(0.05F, 0.02F).setDelay(20).setAmount(2);
CASING12GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(1.5F).setBounceMotion(0.05F, 0.02F).setupSmoke(0.5F, 0.5D, 60, 20);
}
public static GunConfiguration getSpas12Config() {
GunConfiguration config = new GunConfiguration();
@ -39,18 +67,12 @@ public class Gun12GaugeFactory {
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
config.firingSound = "hbm:weapon.shotgunPump";
config.name = "Franchi SPAS-12";
config.manufacturer = "Black Mesa Armory";
config.name = "spas12";
config.manufacturer = EnumGunManufacturer.BLACK_MESA;
config.comment.add("\"Here, I have a more suitable gun for you. You'll need it - Catch!\"");
config.comment.add("Alt-fire with Mouse 2 (Right-click) to fire 2 shells at once");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G12_NORMAL);
config.config.add(BulletConfigSyncingUtil.G12_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.G12_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G12_DU);
config.config.add(BulletConfigSyncingUtil.G12_AM);
config.config.add(BulletConfigSyncingUtil.G12_SLEEK);
config.config = HbmCollection.twelveGauge;
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("SPAS_RECOIL_TRANSLATE", new BusAnimationSequence()
@ -68,10 +90,12 @@ public class Gun12GaugeFactory {
)
);
config.ejector = EJECTOR_SPAS;
return config;
}
public static GunConfiguration getSpas12AltConfig() {
public static GunConfiguration getSpas12AltConfig() {
GunConfiguration config = new GunConfiguration();
@ -85,14 +109,9 @@ public static GunConfiguration getSpas12AltConfig() {
config.firingSound = "hbm:weapon.shotgunPump";
config.reloadType = GunConfiguration.RELOAD_SINGLE;
config.config = HbmCollection.twelveGauge;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G12_NORMAL);
config.config.add(BulletConfigSyncingUtil.G12_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.G12_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G12_DU);
config.config.add(BulletConfigSyncingUtil.G12_AM);
config.config.add(BulletConfigSyncingUtil.G12_SLEEK);
config.ejector = EJECTOR_SPAS_ALT;
return config;
}
@ -115,16 +134,12 @@ public static GunConfiguration getSpas12AltConfig() {
config.reloadSound = GunConfiguration.RSOUND_REVOLVER;
config.firingSound = "hbm:weapon.shotgunShoot";
config.name = "Uboinik Revolving Shotgun";
config.manufacturer = "Metro Gunsmiths";
config.name = "uboinik";
config.manufacturer = EnumGunManufacturer.METRO;
config.config = HbmCollection.twelveGauge;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G12_NORMAL);
config.config.add(BulletConfigSyncingUtil.G12_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.G12_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G12_DU);
config.config.add(BulletConfigSyncingUtil.G12_AM);
config.config.add(BulletConfigSyncingUtil.G12_SLEEK);
config.ejector = EJECTOR_UBOINIK;
return config;
}
@ -171,17 +186,13 @@ public static GunConfiguration getSpas12AltConfig() {
)
);
config.name = "Double-Barreled Combat Shotgun";
config.manufacturer = "Union Aerospace Corporation";
config.name = "supershotty";
config.manufacturer = EnumGunManufacturer.UAC;
config.comment.add("God-damned ARCH-VILES!");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G12_NORMAL);
config.config.add(BulletConfigSyncingUtil.G12_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.G12_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G12_DU);
config.config.add(BulletConfigSyncingUtil.G12_AM);
config.config.add(BulletConfigSyncingUtil.G12_SLEEK);
config.config = HbmCollection.twelveGauge;
config.ejector = EJECTOR_SSG;
return config;
}
@ -190,31 +201,35 @@ public static GunConfiguration getSpas12AltConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_12gauge;
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.STOCK));
bullet.dmgMin = 5;
bullet.dmgMax = 7;
bullet.spentCasing = CASING12GAUGE.clone().register("12GaStock").setColor(0x2847FF, SpentCasing.COLOR_CASE_12GA);
return bullet;
}
public static BulletConfiguration get12GaugeFireConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_12gauge_incendiary;
BulletConfiguration bullet = get12GaugeConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.INCENDIARY));
bullet.wear = 15;
bullet.dmgMin = 5;
bullet.dmgMax = 7;
bullet.incendiary = 5;
bullet.spentCasing = CASING12GAUGE.clone().register("12GaInc").setColor(0xFF6329, SpentCasing.COLOR_CASE_12GA).setupSmoke(1F, 0.5D, 60, 40);
return bullet;
}
public static BulletConfiguration get12GaugeShrapnelConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_12gauge_shrapnel;
BulletConfiguration bullet = get12GaugeConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SHRAPNEL));
bullet.wear = 15;
bullet.dmgMin = 10;
bullet.dmgMax = 17;
@ -222,6 +237,8 @@ public static GunConfiguration getSpas12AltConfig() {
bullet.HBRC = 80;
bullet.LBRC = 95;
bullet.spentCasing = CASING12GAUGE.clone().register("12GaShrap").setColor(0xF0E800, SpentCasing.COLOR_CASE_12GA);
return bullet;
}
@ -229,13 +246,15 @@ public static GunConfiguration getSpas12AltConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_12gauge_du;
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.DU));
bullet.wear = 20;
bullet.dmgMin = 18;
bullet.dmgMax = 22;
bullet.doesPenetrate = true;
bullet.leadChance = 50;
bullet.spentCasing = CASING12GAUGE.clone().register("12GaDU").setColor(0x62A362, SpentCasing.COLOR_CASE_12GA);
return bullet;
}
@ -243,7 +262,7 @@ public static GunConfiguration getSpas12AltConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_12gauge_marauder;
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.MARAUDER));
bullet.wear = 20;
bullet.dmgMin = 100;
bullet.dmgMax = 500;
@ -260,6 +279,8 @@ public static GunConfiguration getSpas12AltConfig() {
};
bullet.spentCasing = CASING12GAUGE.clone().register("12GaAM").setColor(0x416645, SpentCasing.COLOR_CASE_12GA);
return bullet;
}
@ -267,7 +288,61 @@ public static GunConfiguration getSpas12AltConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig();
bullet.ammo = ModItems.ammo_12gauge_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SLEEK));
bullet.spentCasing = CASING12GAUGE.clone().register("12GaIF").setColor(0x2A2A2A, SpentCasing.COLOR_CASE_12GA);
return bullet;
}
public static BulletConfiguration get12GaugePercussionConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.PERCUSSION));
bullet.velocity = 2F;
bullet.spread = 0F;
bullet.wear = 10;
bullet.dmgMin = 30F;
bullet.dmgMax = 30F;
bullet.maxAge = 0;
bullet.spentCasing = CASING12GAUGE.clone().register("12GaPerc").setColor(0x9E1616, SpentCasing.COLOR_CASE_12GA).setupSmoke(1F, 0.5D, 60, 40);
bullet.bUpdate = new IBulletUpdateBehavior() {
@Override
public void behaveUpdate(EntityBulletBase bullet) {
if(!bullet.worldObj.isRemote) {
Vec3 vec = Vec3.createVectorHelper(bullet.motionX, bullet.motionY, bullet.motionZ);
double radius = 4;
double x = bullet.posX + vec.xCoord;
double y = bullet.posY + vec.yCoord;
double z = bullet.posZ + vec.zCoord;
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(x, y, z, x, y, z).expand(radius, radius, radius);
List<Entity> list = bullet.worldObj.getEntitiesWithinAABBExcludingEntity(bullet.shooter, aabb);
for(Entity e : list) {
DamageSource source = bullet.shooter instanceof EntityPlayer ? DamageSource.causePlayerDamage((EntityPlayer) bullet.shooter) : DamageSource.magic;
e.attackEntityFrom(source, 30F);
}
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "plasmablast");
data.setFloat("r", 0.75F);
data.setFloat("g", 0.75F);
data.setFloat("b", 0.75F);
data.setFloat("pitch", (float) -bullet.rotationPitch + 90);
data.setFloat("yaw", (float) bullet.rotationYaw);
data.setFloat("scale", 2F);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(bullet.dimension, x, y, z, 100));
bullet.setDead();
}
}
};
return bullet;
}

View File

@ -2,10 +2,16 @@ package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo20Gauge;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
@ -14,9 +20,18 @@ import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
public class Gun20GaugeFactory {
private static final CasingEjector EJECTOR_SHOTGUN;
private static final SpentCasing CASING20GAUGE;
static {
EJECTOR_SHOTGUN = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.95, 0)).setOffset(Vec3.createVectorHelper(-0.55, 0, 0.5)).setAngleRange(0.01F, 0.05F);
CASING20GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(1.25F).setBounceMotion(0.01F, 0.05F).setupSmoke(0.25F, 0.5D, 60, 20);
}
public static GunConfiguration getShotgunConfig() {
GunConfiguration config = new GunConfiguration();
@ -48,17 +63,9 @@ public class Gun20GaugeFactory {
)
);
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK);
config.config.add(BulletConfigSyncingUtil.G20_WITHER);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.config = HbmCollection.twentyGauge;
config.ejector = EJECTOR_SHOTGUN;
return config;
}
@ -72,20 +79,10 @@ public class Gun20GaugeFactory {
config.firingSound = "hbm:weapon.revolverShootAlt";
config.firingPitch = 0.75F;
config.name = "Winchester Model 1887";
config.manufacturer = "Winchester Repeating Arms Company";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK);
config.config.add(BulletConfigSyncingUtil.G20_WITHER);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.name = "win1887";
config.manufacturer = EnumGunManufacturer.WINCHESTER;
config.config = HbmCollection.twentyGauge;
return config;
}
@ -99,20 +96,10 @@ public class Gun20GaugeFactory {
config.firingSound = "hbm:weapon.revolverShootAlt";
config.firingPitch = 0.75F;
config.name = "Winchester Model 1887 Inox";
config.manufacturer = "Winchester Repeating Arms Company";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK);
config.config.add(BulletConfigSyncingUtil.G20_WITHER);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.name = "win1887Inox";
config.manufacturer = EnumGunManufacturer.WINCHESTER;
config.config = HbmCollection.twentyGauge;
return config;
}
@ -145,20 +132,10 @@ public class Gun20GaugeFactory {
)
);
config.name = "Remington Model 700";
config.manufacturer = "Remington Arms Company";
config.name = "win20Inox";
config.manufacturer = EnumGunManufacturer.WINCHESTER;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK);
config.config.add(BulletConfigSyncingUtil.G20_WITHER);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.config = HbmCollection.twentyGauge;
return config;
}
@ -191,20 +168,10 @@ public class Gun20GaugeFactory {
)
);
config.name = "Winchester Model 20 Polymer";
config.manufacturer = "Winchester Repeating Arms Company";
config.name = "win20Poly";
config.manufacturer = EnumGunManufacturer.WINCHESTER;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK);
config.config.add(BulletConfigSyncingUtil.G20_WITHER);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.config = HbmCollection.twentyGauge;
return config;
}
@ -237,20 +204,10 @@ public class Gun20GaugeFactory {
)
);
config.name = "Winchester Model 20 D-25A";
config.manufacturer = "Winchester Repeating Arms Company / Big MT";
config.name = "win20Satur";
config.manufacturer = EnumGunManufacturer.WINCHESTER_BIGMT;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_SLUG_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_NORMAL_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_WITHER_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.config = HbmCollection.twentyGauge;
return config;
}
@ -259,10 +216,12 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.STOCK));
bullet.dmgMin = 3;
bullet.dmgMax = 5;
bullet.spentCasing = CASING20GAUGE.clone().register("20GaStock").setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -270,12 +229,14 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_20gauge_slug;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLUG));
bullet.dmgMin = 18;
bullet.dmgMax = 22;
bullet.wear = 7;
bullet.style = BulletConfiguration.STYLE_NORMAL;
bullet.spentCasing = CASING20GAUGE.clone().register("20GaSlug").setColor(0x2A2A2A, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -283,7 +244,7 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_flechette;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.FLECHETTE));
bullet.dmgMin = 8;
bullet.dmgMax = 15;
bullet.wear = 15;
@ -291,6 +252,8 @@ public class Gun20GaugeFactory {
bullet.HBRC = 2;
bullet.LBRC = 95;
bullet.spentCasing = CASING20GAUGE.clone().register("20GaFlech").setColor(0x2847FF, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -298,12 +261,14 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.INCENDIARY));
bullet.dmgMin = 3;
bullet.dmgMax = 6;
bullet.wear = 15;
bullet.incendiary = 5;
bullet.spentCasing = CASING20GAUGE.clone().register("20GaInc").setColor(0xFF6329, SpentCasing.COLOR_CASE_BRASS).setupSmoke(1F, 0.5D, 60, 40);
return bullet;
}
@ -311,7 +276,7 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_shrapnel;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SHRAPNEL));
bullet.wear = 15;
bullet.dmgMin = 7;
bullet.dmgMax = 12;
@ -319,6 +284,8 @@ public class Gun20GaugeFactory {
bullet.HBRC = 80;
bullet.LBRC = 95;
bullet.spentCasing = CASING20GAUGE.clone().register("20GaShrap").setColor(0xF0E800, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -326,12 +293,14 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_explosive;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.EXPLOSIVE));
bullet.dmgMin = 7;
bullet.dmgMax = 12;
bullet.wear = 25;
bullet.explosive = 0.5F;
bullet.spentCasing = CASING20GAUGE.clone().register("20GaExp").setColor(0xF0E800, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -339,7 +308,7 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_caustic;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.CAUSTIC));
bullet.dmgMin = 3;
bullet.dmgMax = 7;
bullet.wear = 25;
@ -351,6 +320,8 @@ public class Gun20GaugeFactory {
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(Potion.poison.id, 10 * 20, 1));
bullet.spentCasing = CASING20GAUGE.clone().register("20GaCaus").setColor(0x64E800, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -358,7 +329,7 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_shock;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SHOCK));
bullet.dmgMin = 4;
bullet.dmgMax = 8;
bullet.wear = 25;
@ -371,6 +342,8 @@ public class Gun20GaugeFactory {
bullet.effects.add(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 1));
bullet.effects.add(new PotionEffect(Potion.weakness.id, 10 * 20, 4));
bullet.spentCasing = CASING20GAUGE.clone().register("20GaShock").setColor(0x00EFEF, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -378,13 +351,15 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_20gauge_wither;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.WITHER));
bullet.dmgMin = 4;
bullet.dmgMax = 8;
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(Potion.wither.id, 10 * 20, 2));
bullet.spentCasing = CASING20GAUGE.clone().register("20GaWith").setColor(0x391717, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}
@ -392,7 +367,9 @@ public class Gun20GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig();
bullet.ammo = ModItems.ammo_20gauge_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLEEK));
bullet.spentCasing = CASING20GAUGE.clone().register("20GaIF").setColor(0x2A2A2A, SpentCasing.COLOR_CASE_BRASS);
return bullet;
}

View File

@ -1,15 +1,27 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo22LR;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class Gun22LRFactory {
private static final CasingEjector EJECTOR_22LR;
private static final SpentCasing CASING22LR;
static {
EJECTOR_22LR = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.2, 0.35).setAngleRange(0.01F, 0.03F);
CASING22LR = new SpentCasing(CasingType.STRAIGHT).setScale(0.8F).setBounceMotion(0.05F, 0.02F).setColor(SpentCasing.COLOR_CASE_BRASS);
}
public static GunConfiguration getUziConfig() {
GunConfiguration config = new GunConfiguration();
@ -29,14 +41,13 @@ public class Gun22LRFactory {
config.firingSound = "hbm:weapon.uziShoot";
config.reloadSoundEnd = false;
config.name = "IMI Uzi";
config.manufacturer = "Israel Military Industries";
config.name = "uzi";
config.manufacturer = EnumGunManufacturer.IMI;
config.comment.add("Mom, where are my mittens?");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.LR22_NORMAL);
config.config.add(BulletConfigSyncingUtil.LR22_AP);
config.config.add(BulletConfigSyncingUtil.CHL_LR22);
config.config = HbmCollection.twentyTwoLR;
config.ejector = EJECTOR_22LR;
return config;
}
@ -47,13 +58,10 @@ public class Gun22LRFactory {
config.durability = 4500;
config.name = "IMI Uzi D-25A";
config.manufacturer = "IMI / Big MT";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.LR22_NORMAL_FIRE);
config.config.add(BulletConfigSyncingUtil.LR22_AP_FIRE);
config.config.add(BulletConfigSyncingUtil.CHL_LR22_FIRE);
config.name = "uziSatur";
config.manufacturer = EnumGunManufacturer.IMI_BIGMT;
config.config = HbmCollection.twentyTwoLRFire;
return config;
}
@ -63,11 +71,13 @@ public class Gun22LRFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_22lr;
bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 6;
bullet.dmgMax = 8;
bullet.spentCasing = CASING22LR.clone().register("22LRStock");
return bullet;
}
@ -75,13 +85,15 @@ public class Gun22LRFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_22lr_ap;
bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.AP));
bullet.spread *= inaccuracy;
bullet.dmgMin = 12;
bullet.dmgMax = 16;
bullet.leadChance = 10;
bullet.wear = 15;
bullet.spentCasing = CASING22LR.clone().register("22LRAP");
return bullet;
}

View File

@ -4,16 +4,33 @@ import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo357Magnum;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
public class Gun357MagnumFactory {
private static final CasingEjector EJECTOR_REVOLVER;
private static final SpentCasing CASING357;
private static final SpentCasing CASINGNM;
static {
EJECTOR_REVOLVER = new CasingEjector().setMotion(Vec3.createVectorHelper(0, 0, -0.03)).setOffset(Vec3.createVectorHelper(0, -0.15, 0)).setAngleRange(0.01F, 0.05F).setAfterReload().setAmount(6);
CASING357 = new SpentCasing(CasingType.STRAIGHT).setBounceMotion(0.01F, 0.05F);
CASINGNM = new SpentCasing(CasingType.SHOTGUN).setScale(1.25F).setBounceMotion(0.01F, 0.05F).setColor(0xC7AB1C, 0x6D63A6).register("357N2");
}
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
@ -32,6 +49,8 @@ public class Gun357MagnumFactory {
config.firingSound = "hbm:weapon.revolverShoot";
config.reloadSoundEnd = false;
config.ejector = EJECTOR_REVOLVER;
return config;
}
@ -41,8 +60,8 @@ public class Gun357MagnumFactory {
config.durability = 2000;
config.name = "FFI Viper";
config.manufacturer = "FlimFlam Industries";
config.name = "ffiV";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.IRON_REVOLVER);
@ -57,8 +76,8 @@ public class Gun357MagnumFactory {
config.durability = 3500;
config.name = "FFI Viper Inox";
config.manufacturer = "FlimFlam Industries";
config.name = "ffiVInox";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER);
@ -73,8 +92,8 @@ public class Gun357MagnumFactory {
config.durability = 3500;
config.name = "FFI Viper D-25A";
config.manufacturer = "FlimFlam Industries";
config.name = "ffivSatur";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SATURNITE_REVOLVER);
@ -89,8 +108,8 @@ public class Gun357MagnumFactory {
config.durability = 2000;
config.name = "FFI Viper Lead";
config.manufacturer = "FlimFlam Industries";
config.name = "ffiVLead";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.LEAD_REVOLVER);
@ -105,8 +124,8 @@ public class Gun357MagnumFactory {
config.durability = 2500;
config.name = "FFI Viper Bling";
config.manufacturer = "FlimFlam Industries";
config.name = "ffivBling";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.GOLD_REVOLVER);
@ -124,8 +143,8 @@ public class Gun357MagnumFactory {
config.durability = 5000;
config.firingSound = "hbm:weapon.heavyShoot";
config.name = "Britannia Standard Issue Motorized Handgun";
config.manufacturer = "BAE Systems plc";
config.name = "revolverCursed";
config.manufacturer = EnumGunManufacturer.BAE;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.CURSED_REVOLVER);
@ -141,8 +160,8 @@ public class Gun357MagnumFactory {
config.durability = 7500;
config.firingSound = "hbm:weapon.schrabidiumShoot";
config.name = "FFI Viper Ultra";
config.manufacturer = "FlimFlam Industries";
config.name = "ffiVUltra";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SCHRABIDIUM_REVOLVER);
@ -158,8 +177,8 @@ public class Gun357MagnumFactory {
config.durability = 4000;
config.firingSound = "hbm:weapon.schrabidiumShoot";
config.name = "FFI Viper N1";
config.manufacturer = "FlimFlam Industries";
config.name = "ffiVN1";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NIGHT_REVOLVER);
@ -176,8 +195,8 @@ public class Gun357MagnumFactory {
config.firingSound = "hbm:weapon.schrabidiumShoot";
config.crosshair = Crosshair.NONE;
config.name = "FFI Viper N2";
config.manufacturer = "FlimFlam Industries";
config.name = "ffiVN2";
config.manufacturer = EnumGunManufacturer.FLIMFLAM;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NIGHT2_REVOLVER);
@ -185,27 +204,6 @@ public class Gun357MagnumFactory {
return config;
}
public static GunConfiguration getRevolverBioConfig() {
GunConfiguration config = getBaseConfig();
config.durability = 100000;
config.firingSound = "hbm:weapon.deagleShoot";
config.reloadDuration = 53;
config.crosshair = Crosshair.CIRCLE;
config.name = "RI No. 2 Mark 1";
config.manufacturer = "Ryan Industries";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.IRON_HS);
config.config.add(BulletConfigSyncingUtil.STEEL_HS);
config.config.add(BulletConfigSyncingUtil.GOLD_HS);
config.config.add(BulletConfigSyncingUtil.DESH_HS);
return config;
}
//// // // // // ////// ////// //////
// // // // // // // // //
//// // // // // //// // //////
@ -216,20 +214,11 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_iron_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.IRON));
bullet.dmgMin = 8;
bullet.dmgMax = 10;
return bullet;
}
public static BulletConfiguration getRevSteelConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_ammo;
bullet.dmgMin = 18;
bullet.dmgMax = 22;
bullet.spentCasing = CASING357.clone().register("357Iron").setColor(0xA8A8A8);
return bullet;
}
@ -238,13 +227,28 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_lead_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.LEAD));
bullet.dmgMin = 18;
bullet.dmgMax = 22;
bullet.spentCasing = CASING357.clone().register("357Lead").setColor(0x646470);
return bullet;
}
public static BulletConfiguration getRevNuclearConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NUCLEAR));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(HbmPotion.radiation.id, 10 * 20, 4));
bullet.spentCasing = CASING357.clone().register("357Nuc").setColor(0xFEFEFE);
return bullet;
}
@ -252,10 +256,12 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_gold_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.GOLD));
bullet.dmgMin = 25;
bullet.dmgMax = 28;
bullet.spentCasing = CASING357.clone().register("357Gold").setColor(0xF9FF3E);
return bullet;
}
@ -263,10 +269,12 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_357_desh;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.DESH));
bullet.dmgMin = 30;
bullet.dmgMax = 33;
bullet.spentCasing = CASING357.clone().register("357Desh").setColor(0xF22929);
return bullet;
}
@ -274,11 +282,13 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_schrabidium_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.SCHRABIDIUM));
bullet.dmgMin = 10000;
bullet.dmgMax = 100000;
bullet.instakill = true;
bullet.spentCasing = CASING357.clone().register("357Schrab").setColor(0x32FFFF);
return bullet;
}
@ -286,21 +296,25 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_cursed_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.STEEL));
bullet.dmgMin = 18;
bullet.dmgMax = 25;
bullet.spentCasing = CASING357.clone().register("357Cursed").setColor(0x565656);
return bullet;
}
public static BulletConfiguration getRevNightmareConfig() {
public static BulletConfiguration getRevNightmare1Config() {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.gun_revolver_nightmare_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE1));
bullet.dmgMin = 1;
bullet.dmgMax = 100;
bullet.spentCasing = CASING357.clone().register("357N1").setColor(0x3A3A3A);
return bullet;
}
@ -308,7 +322,7 @@ public class Gun357MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.gun_revolver_nightmare2_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE2));
bullet.spread *= 10;
bullet.bulletsMin = 4;
bullet.bulletsMax = 6;
@ -321,6 +335,8 @@ public class Gun357MagnumFactory {
bullet.damageType = ModDamageSource.s_laser;
bullet.spentCasing = CASINGNM;
return bullet;
}

View File

@ -9,12 +9,20 @@ import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.entity.projectile.EntityDuchessGambit;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHitBehavior;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo44Magnum;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.RefStrings;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -22,9 +30,19 @@ import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
public class Gun44MagnumFactory {
private static final CasingEjector EJECTOR_PIP;
private static final SpentCasing CASING44;
static {
EJECTOR_PIP = new CasingEjector().setMotion(Vec3.createVectorHelper(0, 0, -0.05)).setOffset(Vec3.createVectorHelper(0, -0.15, 0)).setAngleRange(0.01F, 0.05F).setAfterReload().setAmount(6);
CASING44 = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F, 1.0F, 1.5F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_44);
}
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
@ -43,6 +61,10 @@ public class Gun44MagnumFactory {
config.firingSound = "hbm:weapon.revolverShootAlt";
config.reloadSoundEnd = false;
config.config.addAll(HbmCollection.fourtyFourMagBasic);
config.ejector = EJECTOR_PIP;
return config;
}
@ -52,41 +74,33 @@ public class Gun44MagnumFactory {
config.durability = 2500;
config.name = "IF-18 Horseshoe";
config.manufacturer = "Ironshod Firearms";
config.name = "ifHorseshoe";
config.manufacturer = EnumGunManufacturer.IF;
config.comment.add("Fallout New Vegas wasn't THAT good.");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.M44_NORMAL);
config.config.add(BulletConfigSyncingUtil.M44_AP);
config.config.add(BulletConfigSyncingUtil.M44_DU);
config.config.add(BulletConfigSyncingUtil.M44_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.M44_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_M44);
config.config.add(BulletConfigSyncingUtil.M44_ROCKET);
return config;
}
public static final ResourceLocation scope_lilmac = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_44.png");
public static GunConfiguration getMacintoshConfig() {
GunConfiguration config = getBaseConfig();
config.durability = 4000;
config.name = "IF-18 Horseshoe Scoped";
config.manufacturer = "Ironshod Firearms";
config.name = "ifScope";
config.manufacturer = EnumGunManufacturer.IF;
config.comment.add("Poppin' mentats like tic tacs");
config.hasSights = true;
config.absoluteFOV = true;
config.zoomFOV = 0.25F;
config.scopeTexture = scope_lilmac;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.M44_PIP);
config.config.add(BulletConfigSyncingUtil.M44_NORMAL);
config.config.add(BulletConfigSyncingUtil.M44_AP);
config.config.add(BulletConfigSyncingUtil.M44_DU);
config.config.add(BulletConfigSyncingUtil.M44_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.M44_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_M44);
config.config.add(BulletConfigSyncingUtil.M44_ROCKET);
config.config.addAll(HbmCollection.fourtyFourMagBasic);
return config;
}
@ -98,19 +112,15 @@ public class Gun44MagnumFactory {
config.durability = 4000;
config.ammoCap = 5;
config.name = "IF-18 Horseshoe Vanity";
config.manufacturer = "Ironshod Firearms";
config.name = "ifVanity";
config.manufacturer = EnumGunManufacturer.IF;
config.comment.add("Alcoholism is cool!");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.M44_BJ);
config.config.add(BulletConfigSyncingUtil.M44_NORMAL);
config.config.add(BulletConfigSyncingUtil.M44_AP);
config.config.add(BulletConfigSyncingUtil.M44_DU);
config.config.add(BulletConfigSyncingUtil.M44_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.M44_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_M44);
config.config.add(BulletConfigSyncingUtil.M44_ROCKET);
config.config.addAll(HbmCollection.fourtyFourMagBasic);
config.ejector = EJECTOR_PIP.clone().setAmount(5);
return config;
}
@ -122,20 +132,14 @@ public class Gun44MagnumFactory {
config.durability = 4000;
config.ammoCap = 6;
config.name = "IF-18 Horseshoe Silver Storm";
config.manufacturer = "Ironshod Firearms";
config.name = "ifStorm";
config.manufacturer = EnumGunManufacturer.IF;
config.comment.add("Our friendship is based on abusive behaviour");
config.comment.add("and mutual hate. It's not that complicated.");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.M44_SILVER);
config.config.add(BulletConfigSyncingUtil.M44_NORMAL);
config.config.add(BulletConfigSyncingUtil.M44_AP);
config.config.add(BulletConfigSyncingUtil.M44_DU);
config.config.add(BulletConfigSyncingUtil.M44_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.M44_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_M44);
config.config.add(BulletConfigSyncingUtil.M44_ROCKET);
config.config.addAll(HbmCollection.fourtyFourMagBasic);
return config;
}
@ -147,22 +151,15 @@ public class Gun44MagnumFactory {
config.durability = 4000;
config.ammoCap = 64;
config.name = "IF-18 Horseshoe Bottomless Pit";
config.manufacturer = "Ironshod Firearms R&D";
config.name = "ifPit";
config.manufacturer = EnumGunManufacturer.IF;
config.comment.add("Explore the other side");
config.comment.add("...from afar!");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.M44_NORMAL);
config.config.add(BulletConfigSyncingUtil.M44_AP);
config.config.add(BulletConfigSyncingUtil.M44_DU);
config.config.add(BulletConfigSyncingUtil.M44_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.M44_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_M44);
config.config.add(BulletConfigSyncingUtil.M44_PIP);
config.config.add(BulletConfigSyncingUtil.M44_BJ);
config.config.add(BulletConfigSyncingUtil.M44_SILVER);
config.config.add(BulletConfigSyncingUtil.M44_ROCKET);
config.config.addAll(HbmCollection.fourtyFourMagAll);
config.ejector = EJECTOR_PIP.clone().setAmount(64);
return config;
}
@ -171,10 +168,12 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.STOCK));
bullet.dmgMin = 18;
bullet.dmgMax = 26;
bullet.spentCasing = CASING44.clone().register("44NoPip");
return bullet;
}
@ -182,12 +181,14 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_ap;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.AP));
bullet.dmgMin = 25;
bullet.dmgMax = 32;
bullet.wear = 15;
bullet.leadChance = 10;
bullet.spentCasing = CASING44.clone().register("44AP");
return bullet;
}
@ -195,12 +196,14 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_du;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.DU));
bullet.dmgMin = 28;
bullet.dmgMax = 40;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.spentCasing = CASING44.clone().register("44DU");
return bullet;
}
@ -208,7 +211,7 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PHOSPHORUS));
bullet.dmgMin = 18;
bullet.dmgMax = 26;
bullet.wear = 15;
@ -235,6 +238,8 @@ public class Gun44MagnumFactory {
}
};
bullet.spentCasing = CASING44.clone().register("44Phos");
return bullet;
}
@ -242,12 +247,14 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_star;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.STAR));
bullet.dmgMin = 42;
bullet.dmgMax = 50;
bullet.wear = 25;
bullet.leadChance = 100;
bullet.spentCasing = CASING44.clone().register("44Star");
return bullet;
}
@ -255,7 +262,7 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_pip;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PIP));
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.wear = 25;
@ -285,6 +292,8 @@ public class Gun44MagnumFactory {
}
};
bullet.spentCasing = CASING44.clone().register("44Pip").setColor(0x532C64);
return bullet;
}
@ -292,7 +301,7 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_bj;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.BJ));
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.wear = 25;
@ -323,6 +332,8 @@ public class Gun44MagnumFactory {
};
bullet.spentCasing = CASING44.clone().register("44BJ").setColor(0x632B2C);
return bullet;
}
@ -330,7 +341,7 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_44_silver;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.SILVER));
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.wear = 25;
@ -361,6 +372,8 @@ public class Gun44MagnumFactory {
};
bullet.spentCasing = CASING44.clone().register("44Silver").setColor(0x2B5963);
return bullet;
}
@ -368,11 +381,13 @@ public class Gun44MagnumFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_44_rocket;
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.ROCKET));
bullet.velocity = 5;
bullet.explosive = 15F;
bullet.trail = 1;
bullet.spentCasing = CASING44.clone().register("44Rocket");
return bullet;
}

View File

@ -0,0 +1,207 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo45ACP;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.util.Vec3;
public class Gun45ACPFactory {
private static final CasingEjector EJECTOR_REVOLVER;
private static final SpentCasing CASING45;
static {
EJECTOR_REVOLVER = new CasingEjector().setMotion(Vec3.createVectorHelper(0, 0, -0.03)).setOffset(Vec3.createVectorHelper(0, -0.15, 0)).setAngleRange(0.01F, 0.05F).setAfterReload().setAmount(6);
CASING45 = new SpentCasing(CasingType.STRAIGHT).setBounceMotion(0.01F, 0.05F).setScale(1.25F, 1.25F, 1F).setColor(SpentCasing.COLOR_CASE_BRASS).register("45ACP");
}
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 10;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_MANUAL;
config.reloadDuration = 10;
config.firingDuration = 0;
config.ammoCap = 6;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CLASSIC;
config.reloadSound = GunConfiguration.RSOUND_REVOLVER;
config.firingSound = "hbm:weapon.revolverShoot";
config.reloadSoundEnd = false;
config.ejector = EJECTOR_REVOLVER;
return config;
}
public static GunConfiguration getThompsonConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 2;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadDuration = 20;
config.firingDuration = 0;
config.ammoCap = 30;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_SPLIT;
config.durability = 5000;
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:weapon.rifleShoot";
config.reloadSoundEnd = false;
config.name = "tommy";
config.manufacturer = EnumGunManufacturer.AUTO_ORDINANCE;
config.config = new ArrayList<Integer>();
config.config.addAll(HbmCollection.fourtyFiveACP);
return config;
}
public static GunConfiguration getRevolverBioConfig() {
GunConfiguration config = getBaseConfig();
config.durability = 100000;
config.firingSound = "hbm:weapon.deagleShoot";
config.reloadDuration = 53;
config.crosshair = Crosshair.CIRCLE;
config.name = "bio";
config.manufacturer = EnumGunManufacturer.RYAN;
config.config = HbmCollection.fourtyFiveACP;
return config;
}
public static GunConfiguration getUACPistolConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 4;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_MANUAL;
config.reloadDuration = 10;
config.firingDuration = 8;
config.ammoCap = 16;
config.durability = 10000;
config.reloadType = 1;
config.allowsInfinity = true;
config.hasSights = true;
config.crosshair = Crosshair.CROSS;
config.reloadSound = "hbm:weapon.pistolReloadPB3";
config.firingSound = "hbm:weapon.pistolFirePB3";
config.reloadSoundEnd = true;
config.name = "uacPistol";
config.manufacturer = EnumGunManufacturer.UAC;
config.config.addAll(HbmCollection.fourtyFiveACP);
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("SLIDE", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 10))// Wait for hammer
.addKeyframe(new BusAnimationKeyframe(0, 0, -3.5, 40))// Slide back
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 40)))// Return
.addBus("HAMMER", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(15, 0, 0, 10))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 40))));
return config;
}
public static GunConfiguration getUACSMGConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 1;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadDuration = 10;
config.firingDuration = 4;
config.ammoCap = 40;
config.durability = 40000;
config.reloadType = 1;
config.allowsInfinity = true;
config.hasSights = true;
config.crosshair = Crosshair.CROSS;
config.reloadSound = "hbm:weapon.SMGMagInPB3";
config.firingSound = "hbm:weapon.SMGFirePB3";
config.firingPitch = 1.15F;
config.reloadSoundEnd = true;
config.name = "uacSMG";
config.manufacturer = EnumGunManufacturer.UAC;
config.config.addAll(HbmCollection.fourtyFiveACP);
return config;
}
static float inaccuracy = 5;
public static BulletConfiguration get45AutoConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMax = 12;
bullet.dmgMin = 16;
bullet.spentCasing = CASING45;
return bullet;
}
public static BulletConfiguration get45AutoAPConfig() {
BulletConfiguration bullet = get45AutoConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.AP));
bullet.dmgMax = 18;
bullet.dmgMin = 26;
bullet.wear = 15;
bullet.leadChance = 10;
bullet.spentCasing = CASING45;
return bullet;
}
public static BulletConfiguration get45AutoDUConfig() {
BulletConfiguration bullet = get45AutoConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.DU));
bullet.dmgMax = 30;
bullet.dmgMin = 44;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.spentCasing = CASING45;
return bullet;
}
}

View File

@ -1,6 +1,5 @@
package com.hbm.handler.guncfg;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
@ -11,14 +10,21 @@ import com.hbm.explosion.ExplosionNT.ExAttrib;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHurtBehavior;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo4Gauge;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -27,17 +33,25 @@ import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.IExtendedEntityProperties;
public class Gun4GaugeFactory {
private static final CasingEjector EJECTOR_SHOTGUN;
private static final SpentCasing CASING4GAUGE;
static {
EJECTOR_SHOTGUN = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.4, 0)).setOffset(Vec3.createVectorHelper(-0.5, 0, 0.5)).setAngleRange(0.01F, 0.03F);
CASING4GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(2.5F).setBounceMotion(0.01F, 0.03F);
}
private static GunConfiguration getShotgunConfig() {
GunConfiguration config = new GunConfiguration();
@ -52,9 +66,13 @@ public class Gun4GaugeFactory {
config.reloadType = GunConfiguration.RELOAD_SINGLE;
config.allowsInfinity = true;
config.hasSights = true;
config.absoluteFOV = true;
config.zoomFOV = 0.5F;
config.crosshair = Crosshair.L_CIRCLE;
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
config.ejector = EJECTOR_SHOTGUN;
return config;
}
@ -67,24 +85,10 @@ public class Gun4GaugeFactory {
config.firingSound = "hbm:weapon.revolverShootAlt";
config.firingPitch = 0.65F;
config.name = "KS-23";
config.manufacturer = "Tulsky Oruzheiny Zavod";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G4_NORMAL);
config.config.add(BulletConfigSyncingUtil.G4_SLUG);
config.config.add(BulletConfigSyncingUtil.G4_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G4_FLECHETTE_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.G4_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G4_SEMTEX);
config.config.add(BulletConfigSyncingUtil.G4_BALEFIRE);
config.config.add(BulletConfigSyncingUtil.G4_KAMPF);
config.config.add(BulletConfigSyncingUtil.G4_CANISTER);
config.config.add(BulletConfigSyncingUtil.G4_CLAW);
config.config.add(BulletConfigSyncingUtil.G4_VAMPIRE);
config.config.add(BulletConfigSyncingUtil.G4_VOID);
config.config.add(BulletConfigSyncingUtil.G4_TITAN);
config.config.add(BulletConfigSyncingUtil.G4_SLEEK);
config.name = "ks23";
config.manufacturer = EnumGunManufacturer.TULSKY;
config.config = HbmCollection.fourGauge;
return config;
}
@ -102,8 +106,10 @@ public class Gun4GaugeFactory {
config.firingSound = "hbm:weapon.sauergun";
config.firingPitch = 1.0F;
config.name = "Sauer Shotgun";
config.manufacturer = "Cube 2: Sauerbraten";
config.ejector = EJECTOR_SHOTGUN.clone().setDelay(12);
config.name = "sauer";
config.manufacturer = EnumGunManufacturer.CUBE;
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("SAUER_RECOIL", new BusAnimationSequence()
@ -129,21 +135,7 @@ public class Gun4GaugeFactory {
)
);
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G4_NORMAL);
config.config.add(BulletConfigSyncingUtil.G4_SLUG);
config.config.add(BulletConfigSyncingUtil.G4_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.G4_FLECHETTE_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.G4_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.G4_SEMTEX);
config.config.add(BulletConfigSyncingUtil.G4_BALEFIRE);
config.config.add(BulletConfigSyncingUtil.G4_KAMPF);
config.config.add(BulletConfigSyncingUtil.G4_CANISTER);
config.config.add(BulletConfigSyncingUtil.G4_CLAW);
config.config.add(BulletConfigSyncingUtil.G4_VAMPIRE);
config.config.add(BulletConfigSyncingUtil.G4_VOID);
config.config.add(BulletConfigSyncingUtil.G4_TITAN);
config.config.add(BulletConfigSyncingUtil.G4_SLEEK);
config.config = HbmCollection.fourGauge;
return config;
}
@ -152,12 +144,14 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_4gauge;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.STOCK));
bullet.dmgMin = 5;
bullet.dmgMax = 8;
bullet.bulletsMin *= 2;
bullet.bulletsMax *= 2;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaStock").setColor(0xFFD800, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -165,12 +159,14 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_4gauge_slug;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLUG));
bullet.dmgMin = 25;
bullet.dmgMax = 32;
bullet.wear = 7;
bullet.style = BulletConfiguration.STYLE_NORMAL;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaSlug").setColor(0xE01A1A, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -178,7 +174,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_4gauge_flechette;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.FLECHETTE));
bullet.dmgMin = 8;
bullet.dmgMax = 15;
bullet.bulletsMin *= 2;
@ -188,6 +184,8 @@ public class Gun4GaugeFactory {
bullet.HBRC = 2;
bullet.LBRC = 95;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaFlech").setColor(0x1537FF, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -195,7 +193,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_4gauge_flechette;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.FLECHETTE_PHOSPHORUS));
bullet.dmgMin = 8;
bullet.dmgMax = 15;
bullet.bulletsMin *= 2;
@ -204,8 +202,6 @@ public class Gun4GaugeFactory {
bullet.style = BulletConfiguration.STYLE_FLECHETTE;
bullet.HBRC = 2;
bullet.LBRC = 95;
bullet.ammo = ModItems.ammo_4gauge_flechette_phosphorus;
bullet.incendiary = 5;
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
@ -228,6 +224,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaPhos").setColor(0xF6871A, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -235,7 +233,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_4gauge_explosive;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.EXPLOSIVE));
bullet.velocity *= 2;
bullet.gravity *= 2;
bullet.dmgMin = 20;
@ -243,6 +241,8 @@ public class Gun4GaugeFactory {
bullet.wear = 25;
bullet.trail = 1;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaExp").setColor(0x3F8243, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -250,7 +250,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_4gauge_semtex;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.MINING));
bullet.velocity *= 2;
bullet.gravity *= 2;
bullet.dmgMin = 10;
@ -277,6 +277,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaSem").setColor(0x5C5C5C, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -284,7 +286,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_4gauge_balefire;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.BALEFIRE));
bullet.velocity *= 2;
bullet.gravity *= 2;
bullet.dmgMin = 50;
@ -310,6 +312,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaBale").setColor(0x7BFF44, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -317,7 +321,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_4gauge_kampf;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.KAMPF));
bullet.spread = 0.0F;
bullet.gravity = 0.0D;
bullet.wear = 15;
@ -326,6 +330,8 @@ public class Gun4GaugeFactory {
bullet.trail = 4;
bullet.vPFX = "smoke";
bullet.spentCasing = CASING4GAUGE.clone().register("4GaKampf").setColor(0xE7BA48, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -333,7 +339,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_4gauge_canister;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.CANISTER));
bullet.spread = 0.0F;
bullet.gravity = 0.0D;
bullet.wear = 15;
@ -364,6 +370,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaCan").setColor(0xCACACA, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -371,16 +379,18 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig();
bullet.ammo = ModItems.ammo_4gauge_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLEEK));
bullet.spentCasing = CASING4GAUGE.clone().register("4GaIF").setColor(0x1D1D1D, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
public static BulletConfiguration get4GaugeClawConfig() {
BulletConfiguration bullet = get4GaugeConfig();
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_4gauge_claw;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.CLAW));
bullet.dmgMin = 6;
bullet.dmgMax = 9;
bullet.bulletsMin *= 2;
@ -410,14 +420,16 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaClaw").setColor(0x5E38CC, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
public static BulletConfiguration get4GaugeVampireConfig() {
BulletConfiguration bullet = get4GaugeConfig();
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_4gauge_vampire;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VAMPIRE));
bullet.dmgMin = 6;
bullet.dmgMax = 9;
bullet.bulletsMin *= 2;
@ -448,14 +460,16 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaVamp").setColor(0x278400, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
public static BulletConfiguration get4GaugeVoidConfig() {
BulletConfiguration bullet = get4GaugeConfig();
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = ModItems.ammo_4gauge_void;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VOID));
bullet.dmgMin = 6;
bullet.dmgMax = 9;
bullet.bulletsMin *= 2;
@ -479,6 +493,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaVoid").setColor(0x3F3F3F, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -486,7 +502,7 @@ public class Gun4GaugeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_4gauge_titan;
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.QUACK));
bullet.velocity *= 2D;
bullet.spread = 0.0F;
bullet.gravity = 0.0D;
@ -514,13 +530,6 @@ public class Gun4GaugeFactory {
bullet.worldObj.removeEntity(creature);
bullet.worldObj.unloadEntities(new ArrayList() {{ add(creature); }});
//creature.isDead = true;
/*try {
Method m = Class.forName("net.minecraft.entity.deity.EntityDeity").getDeclaredMethod("setTitanHealth", double.class);
m.setAccessible(true);
m.invoke(creature, 0.0D);
} catch (Exception ex) { }*/
}
}
@ -529,6 +538,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaDucc").setColor(0x1E1E1E, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
}

View File

@ -1,15 +1,27 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo50AE;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class Gun50AEFactory {
private static final CasingEjector EJECTOR_PISTOL;
private static final SpentCasing CASING50AE;
static {
EJECTOR_PISTOL = new CasingEjector().setMotion(-0.3, 0.7, 0).setOffset(-0.5, 0, 0.5).setAngleRange(0.01F, 0.03F);
CASING50AE = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F).setBounceMotion(0.01F, 0.03F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.25F, 0.5D, 60, 20);
}
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
@ -37,30 +49,32 @@ public class Gun50AEFactory {
config.durability = 2500;
config.name = "IMI Desert Eagle";
config.manufacturer = "Magnum Research / Israel Military Industries";
config.name = "deagle";
config.manufacturer = EnumGunManufacturer.MAGNUM_R_IMI;
config.absoluteFOV = true;
config.zoomFOV = 0.5F;
config.hasSights = true;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.AE50_NORMAL);
config.config.add(BulletConfigSyncingUtil.AE50_AP);
config.config.add(BulletConfigSyncingUtil.AE50_DU);
config.config.add(BulletConfigSyncingUtil.AE50_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_AE50);
config.config = HbmCollection.fiftyAE;
config.ejector = EJECTOR_PISTOL;
return config;
}
static float inaccuracy = 0.0005F;
private static float inaccuracy = 0.0005F;
public static BulletConfiguration get50AEConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_50ae;
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 28;
bullet.dmgMax = 32;
bullet.spentCasing = CASING50AE.clone().register("50AEStock");
return bullet;
}
@ -68,13 +82,15 @@ public class Gun50AEFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_50ae_ap;
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.AP));
bullet.spread *= inaccuracy;
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.leadChance = 10;
bullet.wear = 15;
bullet.spentCasing = CASING50AE.clone().register("50AEAP");
return bullet;
}
@ -82,13 +98,15 @@ public class Gun50AEFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_50ae_du;
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.DU));
bullet.spread *= inaccuracy;
bullet.dmgMin = 38;
bullet.dmgMax = 46;
bullet.leadChance = 50;
bullet.wear = 25;
bullet.spentCasing = CASING50AE.clone().register("50AEDU");
return bullet;
}
@ -96,13 +114,15 @@ public class Gun50AEFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_50ae_star;
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.STAR));
bullet.spread *= inaccuracy;
bullet.dmgMin = 52;
bullet.dmgMax = 60;
bullet.leadChance = 100;
bullet.wear = 25;
bullet.spentCasing = CASING50AE.clone().register("50AEStar");
return bullet;
}

View File

@ -5,12 +5,20 @@ import java.util.ArrayList;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHitBehavior;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo50BMG;
import com.hbm.items.ItemAmmoEnums.AmmoLunaticSniper;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -29,6 +37,18 @@ import net.minecraft.potion.PotionEffect;
public class Gun50BMGFactory {
private static final CasingEjector EJECTOR_BMG;
private static final CasingEjector EJECTOR_SNIPER;
private static final SpentCasing CASING50BMG;
private static final SpentCasing CASINGLUNA;
static {
EJECTOR_BMG = new CasingEjector().setMotion(-0.35, 0.9, 0).setOffset(-0.45, -0.2, 0.35).setAngleRange(0.01F, 0.05F);
EJECTOR_SNIPER = new CasingEjector().setMotion(-2, 0.15, 0).setOffset(-0.45, -0.2, 0.35).setAngleRange(0.02F, 0.05F);
CASING50BMG = new SpentCasing(CasingType.BOTTLENECK).setScale(3F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.125F, 0.5D, 60, 20);
CASINGLUNA = new SpentCasing(CasingType.BOTTLENECK).setScale(4F).setBounceMotion(0.02F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.125F, 0.5D, 60, 30);
}
public static GunConfiguration getCalamityConfig() {
GunConfiguration config = new GunConfiguration();
@ -62,19 +82,12 @@ public class Gun50BMGFactory {
)
);
config.name = "Universal-Maschinengewehr Modell 42 - .50 Mod";
config.manufacturer = "Wilhelm-Gustloff-Werke";
config.name = "mg42";
config.manufacturer = EnumGunManufacturer.WGW;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.BMG50_NORMAL);
config.config.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.BMG50_AP);
config.config.add(BulletConfigSyncingUtil.BMG50_DU);
config.config.add(BulletConfigSyncingUtil.BMG50_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_BMG50);
config.config.add(BulletConfigSyncingUtil.BMG50_SLEEK);
config.config = HbmCollection.fiftyBMG;
config.ejector = EJECTOR_BMG;
return config;
}
@ -97,22 +110,64 @@ public class Gun50BMGFactory {
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:weapon.calShoot";
config.name = "Double Maxim gun";
config.manufacturer = "???";
config.name = "maximDouble";
config.manufacturer = EnumGunManufacturer.UNKNOWN;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.BMG50_NORMAL);
config.config.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.BMG50_AP);
config.config.add(BulletConfigSyncingUtil.BMG50_DU);
config.config.add(BulletConfigSyncingUtil.BMG50_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_BMG50);
config.config.add(BulletConfigSyncingUtil.BMG50_SLEEK);
config.config = HbmCollection.fiftyBMG;
config.ejector = EJECTOR_BMG;
return config;
}
public static BulletConfiguration getLunaticSabotRound() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT));
bullet.spread = 0.0F;
bullet.dmgMax = 500F;
bullet.dmgMin = 450F;
bullet.headshotMult = 2.5f;
bullet.wear = 2000;
bullet.velocity = 100;
bullet.doesPenetrate = true;
bullet.leadChance = 20;
bullet.incendiary = 10;
bullet.blockDamage = true;
bullet.bImpact = (projectile, x, y, z) -> projectile.worldObj.newExplosion(projectile, x, y, z, 5.0F, true, false);
bullet.spentCasing = CASINGLUNA.clone().register("LunaStock");
return bullet;
}
public static BulletConfiguration getLunaticIncendiaryRound() {
BulletConfiguration bullet = getLunaticSabotRound().clone();
bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.INCENDIARY));
bullet.ammo.meta = 1;
bullet.incendiary = 50;
bullet.spentCasing = CASINGLUNA.clone().register("LunaInc");
return bullet;
}
public static BulletConfiguration getLunaticExplosiveRound() {
BulletConfiguration bullet = getLunaticSabotRound().clone();
bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.EXPLOSIVE));
bullet.ammo.meta = 2;
bullet.explosive = 25;
bullet.bImpact = (projectile, x, y, z) -> projectile.worldObj.newExplosion(projectile, x, y, z, 25.0F, true, false);
bullet.spentCasing = CASINGLUNA.clone().register("LunaExp");
return bullet;
}
public static GunConfiguration getAR15Config() {
@ -132,8 +187,8 @@ public class Gun50BMGFactory {
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:turret.howard_fire";
config.name = "AR-15 .50 BMG Mod";
config.manufacturer = "Armalite";
config.name = "ar15_50";
config.manufacturer = EnumGunManufacturer.ARMALITE;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.BMG50_FLECHETTE_AM);
@ -149,6 +204,8 @@ public class Gun50BMGFactory {
config.config.add(BulletConfigSyncingUtil.CHL_BMG50);
config.config.add(BulletConfigSyncingUtil.BMG50_SLEEK);
config.ejector = EJECTOR_BMG;
return config;
}
@ -157,11 +214,13 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.spentCasing = CASING50BMG.clone().register("50BMGStock");
return bullet;
}
@ -169,13 +228,15 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.INCENDIARY));
bullet.spread *= inaccuracy;
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.wear = 15;
bullet.incendiary = 5;
bullet.spentCasing = CASING50BMG.clone().register("50BMGInc");
return bullet;
}
@ -183,7 +244,7 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.PHOSPHORUS));
bullet.spread *= inaccuracy;
bullet.dmgMin = 30;
bullet.dmgMax = 36;
@ -211,6 +272,8 @@ public class Gun50BMGFactory {
}
};
bullet.spentCasing = CASING50BMG.clone().register("50BMGPhos");
return bullet;
}
@ -218,13 +281,15 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_explosive;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.EXPLOSIVE));
bullet.spread *= inaccuracy;
bullet.dmgMin = 60;
bullet.dmgMax = 64;
bullet.wear = 25;
bullet.explosive = 1;
bullet.spentCasing = CASING50BMG.clone().register("50BMGExp");
return bullet;
}
@ -232,13 +297,15 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_ap;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.AP));
bullet.spread *= inaccuracy;
bullet.dmgMin = 62;
bullet.dmgMax = 68;
bullet.wear = 15;
bullet.leadChance = 10;
bullet.spentCasing = CASING50BMG.clone().register("50BMGAP");
return bullet;
}
@ -246,13 +313,15 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_du;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.DU));
bullet.spread *= inaccuracy;
bullet.dmgMin = 80;
bullet.dmgMax = 86;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.spentCasing = CASING50BMG.clone().register("50BMGDU");
return bullet;
}
@ -260,13 +329,15 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_star;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STAR));
bullet.spread *= inaccuracy;
bullet.dmgMin = 98;
bullet.dmgMax = 102;
bullet.wear = 25;
bullet.leadChance = 100;
bullet.spentCasing = CASING50BMG.clone().register("50BMGStar");
return bullet;
}
@ -274,7 +345,7 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.SLEEK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 50;
bullet.dmgMax = 70;
@ -317,6 +388,8 @@ public class Gun50BMGFactory {
}
};
bullet.spentCasing = CASING50BMG.clone().register("50BMGIF");
return bullet;
}
@ -324,20 +397,22 @@ public class Gun50BMGFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_flechette;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE));
bullet.spread *= inaccuracy;
bullet.dmgMin = 50;
bullet.dmgMax = 54;
bullet.style = bullet.STYLE_FLECHETTE;
bullet.spentCasing = CASING50BMG.clone().register("50BMGFlech");
return bullet;
}
public static BulletConfiguration get50BMGFlechetteAMConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_flechette_am;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE_AM));
bullet.spread *= inaccuracy;
bullet.dmgMin = 60;
bullet.dmgMax = 64;
@ -357,14 +432,16 @@ public class Gun50BMGFactory {
}
};
bullet.spentCasing = CASING50BMG.clone().register("50BMGAM");
return bullet;
}
public static BulletConfiguration get50BMGFlechettePOConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_flechette_po;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE_PO));
bullet.spread *= inaccuracy;
bullet.dmgMin = 60;
bullet.dmgMax = 64;
@ -384,6 +461,8 @@ public class Gun50BMGFactory {
}
};
bullet.spentCasing = CASING50BMG.clone().register("50BMGPO");
return bullet;
}
}

View File

@ -5,12 +5,19 @@ import java.util.ArrayList;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHitBehavior;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.Ammo556mm;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -25,6 +32,16 @@ import net.minecraft.potion.PotionEffect;
public class Gun556mmFactory {
private static final CasingEjector EJECTOR_RIFLE;
private static final CasingEjector EJECTOR_GRENADE;
private static final SpentCasing CASING556;
static {
EJECTOR_RIFLE = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F);
EJECTOR_GRENADE = new CasingEjector().setAngleRange(0.02F, 0.03F).setDelay(30);
CASING556 = new SpentCasing(CasingType.BOTTLENECK).setScale(1.25F).setBounceMotion(0.01F, 0.03F).setColor(SpentCasing.COLOR_CASE_BRASS);
}
public static GunConfiguration getEuphieConfig() {
GunConfiguration config = new GunConfiguration();
@ -45,22 +62,15 @@ public class Gun556mmFactory {
config.firingSound = "hbm:weapon.hksShoot";
config.reloadSoundEnd = false;
config.name = "Britannian Standard Issue Assault Rifle";
config.manufacturer = "BAE Systems plc";
config.name = "baeAR";
config.manufacturer = EnumGunManufacturer.BAE;
config.comment.add("Why is this gun so sticky?");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R556_NORMAL);
config.config.add(BulletConfigSyncingUtil.R556_GOLD);
config.config.add(BulletConfigSyncingUtil.R556_TRACER);
config.config.add(BulletConfigSyncingUtil.R556_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.R556_AP);
config.config.add(BulletConfigSyncingUtil.R556_DU);
config.config.add(BulletConfigSyncingUtil.R556_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_R556);
config.config.add(BulletConfigSyncingUtil.R556_SLEEK);
config.config.add(BulletConfigSyncingUtil.R556_K);
//config.config = new ArrayList();
//config.config.add(BulletConfigSyncingUtil.R556_GOLD);
config.config = HbmCollection.NATO;
return config;
}
@ -92,21 +102,16 @@ public class Gun556mmFactory {
)
);
config.name = "H&R SPIW";
config.manufacturer = "Harrington & Richardson";
config.name = "spiw";
config.manufacturer = EnumGunManufacturer.H_AND_R;
config.comment.add("Launch some flechettes in the breeze");
config.comment.add("Find his arms nailed to the trees");
config.comment.add("Napalm sticks to kids");
config.config = HbmCollection.NATOFlechette;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_DU);
config.config.add(BulletConfigSyncingUtil.CHL_R556_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_SLEEK);
config.config.add(BulletConfigSyncingUtil.R556_K);
config.ejector = EJECTOR_RIFLE;
return config;
}
@ -130,32 +135,25 @@ public class Gun556mmFactory {
config.reloadSound = GunConfiguration.RSOUND_GRENADE;
config.reloadSoundEnd = false;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.GRENADE_NORMAL);
config.config.add(BulletConfigSyncingUtil.GRENADE_HE);
config.config.add(BulletConfigSyncingUtil.GRENADE_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.GRENADE_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.GRENADE_CHEMICAL);
config.config.add(BulletConfigSyncingUtil.GRENADE_CONCUSSION);
config.config.add(BulletConfigSyncingUtil.GRENADE_FINNED);
config.config.add(BulletConfigSyncingUtil.GRENADE_SLEEK);
config.config.add(BulletConfigSyncingUtil.GRENADE_NUCLEAR);
config.config.add(BulletConfigSyncingUtil.GRENADE_TRACER);
config.config.add(BulletConfigSyncingUtil.GRENADE_KAMPF);
config.config = HbmCollection.grenade;
config.ejector = EJECTOR_GRENADE;
return config;
}
static float inaccuracy = 2.5F;
private static float inaccuracy = 2.5F;
public static BulletConfiguration get556Config() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_556;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 16;
bullet.dmgMax = 20;
bullet.spentCasing = CASING556.clone().register("556Stock");
return bullet;
}
@ -163,11 +161,13 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_566_gold;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.GOLD));
bullet.dmgMin = 250;
bullet.dmgMax = 320;
bullet.spread = 0.0F;
bullet.spentCasing = null;
return bullet;
}
@ -175,7 +175,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.PHOSPHORUS));
bullet.wear = 15;
bullet.incendiary = 5;
bullet.doesPenetrate = false;
@ -200,6 +200,8 @@ public class Gun556mmFactory {
}
};
bullet.spentCasing = CASING556.clone().register("556Phos");
return bullet;
}
@ -207,12 +209,14 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_ap;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.AP));
bullet.dmgMin = 20;
bullet.dmgMax = 26;
bullet.wear = 15;
bullet.leadChance = 10;
bullet.spentCasing = CASING556.clone().register("556AP");
return bullet;
}
@ -220,12 +224,14 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_du;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.DU));
bullet.dmgMin = 24;
bullet.dmgMax = 32;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.spentCasing = CASING556.clone().register("556DU");
return bullet;
}
@ -233,12 +239,14 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_star;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.STAR));
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.wear = 25;
bullet.leadChance = 100;
bullet.spentCasing = CASING556.clone().register("556Star");
return bullet;
}
@ -246,7 +254,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.SLEEK));
bullet.dmgMin = 45;
bullet.dmgMax = 50;
bullet.wear = 10;
@ -288,6 +296,8 @@ public class Gun556mmFactory {
}
};
bullet.spentCasing = CASING556.clone().register("556IF");
return bullet;
}
@ -295,9 +305,11 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_tracer;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.TRACER));
bullet.vPFX = "reddust";
bullet.spentCasing = CASING556.clone().register("556Trac");
return bullet;
}
@ -305,7 +317,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_flechette;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE));
bullet.dmgMin = 26;
bullet.dmgMax = 32;
bullet.HBRC = 2;
@ -314,6 +326,8 @@ public class Gun556mmFactory {
bullet.style = BulletConfiguration.STYLE_FLECHETTE;
bullet.doesPenetrate = false;
bullet.spentCasing = CASING556.clone().register("556Flec");
return bullet;
}
@ -321,9 +335,11 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_INCENDIARY));
bullet.incendiary = 5;
bullet.spentCasing = CASING556.clone().register("556FlecInc");
return bullet;
}
@ -331,7 +347,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_PHOSPHORUS));
bullet.incendiary = 5;
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
@ -354,6 +370,8 @@ public class Gun556mmFactory {
}
};
bullet.spentCasing = CASING556.clone().register("556FlecPhos");
return bullet;
}
@ -361,13 +379,15 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_du;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_DU));
bullet.dmgMin = 46;
bullet.dmgMax = 52;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.doesPenetrate = true;
bullet.spentCasing = CASING556.clone().register("556FlecDU");
return bullet;
}
@ -375,7 +395,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_SLEEK));
bullet.dmgMin = 45;
bullet.dmgMax = 50;
bullet.wear = 10;
@ -417,6 +437,8 @@ public class Gun556mmFactory {
}
};
bullet.spentCasing = CASING556.clone().register("556FlecIF");
return bullet;
}
@ -424,7 +446,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_556_k;
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.K));
bullet.dmgMin = 0;
bullet.dmgMax = 0;
bullet.maxAge = 0;

View File

@ -1,15 +1,27 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.Ammo5mm;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class Gun5mmFactory {
private static final CasingEjector EJECTOR_MINIGUN;
private static final SpentCasing CASING5MM;
static {
EJECTOR_MINIGUN = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.2, 0.35).setAngleRange(0.01F, 0.03F).setAmount(5);
CASING5MM = new SpentCasing(CasingType.STRAIGHT).setScale(1.25F).setBounceMotion(0.05F, 0.02F).setColor(SpentCasing.COLOR_CASE_BRASS).setMaxAge(100);
}
public static GunConfiguration getMinigunConfig() {
GunConfiguration config = new GunConfiguration();
@ -27,12 +39,9 @@ public class Gun5mmFactory {
config.durability = 10000;
config.firingSound = "hbm:weapon.lacunaeShoot";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R5_NORMAL);
config.config.add(BulletConfigSyncingUtil.R5_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.R5_DU);
config.config.add(BulletConfigSyncingUtil.R5_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_R5);
config.config = HbmCollection.fiveMM;
config.ejector = EJECTOR_MINIGUN;
return config;
}
@ -41,8 +50,8 @@ public class Gun5mmFactory {
GunConfiguration config = getMinigunConfig();
config.name = "CZ53 Personal Minigun";
config.manufacturer = "Rockwell International Corporation";
config.name = "cz53";
config.manufacturer = EnumGunManufacturer.ROCKWELL;
return config;
}
@ -52,8 +61,8 @@ public class Gun5mmFactory {
GunConfiguration config = getMinigunConfig();
config.durability = 15000;
config.name = "CZ57 Avenger Minigun";
config.manufacturer = "Rockwell International Corporation";
config.name = "cz57";
config.manufacturer = EnumGunManufacturer.ROCKWELL;
return config;
}
@ -63,29 +72,26 @@ public class Gun5mmFactory {
GunConfiguration config = getMinigunConfig();
config.durability = 25000;
config.name = "Auntie Lacunae";
config.manufacturer = "Rockwell International Corporation?";
config.name = "lacunae";
config.manufacturer = EnumGunManufacturer.ROCKWELL_U;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R5_NORMAL_BOLT);
config.config.add(BulletConfigSyncingUtil.R5_EXPLOSIVE_BOLT);
config.config.add(BulletConfigSyncingUtil.R5_DU_BOLT);
config.config.add(BulletConfigSyncingUtil.R5_STAR_BOLT);
config.config.add(BulletConfigSyncingUtil.CHL_R5_BOLT);
config.config = HbmCollection.fiveMMBolt;
return config;
}
static float inaccuracy = 10;
private static float inaccuracy = 10;
public static BulletConfiguration get5mmConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_5mm;
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 12;
bullet.dmgMax = 14;
bullet.spentCasing = CASING5MM.clone().register("5mmStock");
return bullet;
}
@ -93,13 +99,15 @@ public class Gun5mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_5mm_explosive;
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.EXPLOSIVE));
bullet.spread *= inaccuracy;
bullet.dmgMin = 30;
bullet.dmgMax = 32;
bullet.explosive = 1F;
bullet.wear = 25;
bullet.spentCasing = CASING5MM.clone().register("5mmExp");
return bullet;
}
@ -107,13 +115,15 @@ public class Gun5mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_5mm_du;
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.DU));
bullet.spread *= inaccuracy;
bullet.dmgMin = 36;
bullet.dmgMax = 40;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.spentCasing = CASING5MM.clone().register("5mmDU");
return bullet;
}
@ -121,13 +131,15 @@ public class Gun5mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_5mm_star;
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STAR));
bullet.spread *= inaccuracy;
bullet.dmgMin = 46;
bullet.dmgMax = 50;
bullet.wear = 25;
bullet.leadChance = 100;
bullet.spentCasing = CASING5MM.clone().register("5mmStar");
return bullet;
}

View File

@ -3,12 +3,15 @@ package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHurtBehavior;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.Ammo75Bolt;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
@ -72,23 +75,20 @@ public class Gun75BoltFactory {
)
);
config.name = "Manticora Pattern Boltgun";
config.manufacturer = "Cerix Magnus";
config.config = new ArrayList();
config.config.add(BulletConfigSyncingUtil.B75_NORMAL);
config.config.add(BulletConfigSyncingUtil.B75_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.B75_HE);
config.name = "bolter";
config.manufacturer = EnumGunManufacturer.CERIX;
config.config = HbmCollection.seventyFive;
return config;
}
static float inaccuracy = 0.5F;
private static float inaccuracy = 0.5F;
public static BulletConfiguration get75BoltConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_75bolt;
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.STOCK));
bullet.ammoCount = 30;
bullet.spread *= inaccuracy;
bullet.dmgMin = 74;
@ -126,7 +126,7 @@ public class Gun75BoltFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_75bolt_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.INCENDIARY));
bullet.ammoCount = 30;
bullet.spread *= inaccuracy;
bullet.dmgMin = 72;
@ -164,7 +164,7 @@ public class Gun75BoltFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_75bolt_he;
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.HE));
bullet.ammoCount = 30;
bullet.spread *= inaccuracy;
bullet.dmgMin = 94;

View File

@ -0,0 +1,192 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo762NATO;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.potion.PotionEffect;
public class Gun762mmFactory {
private static final CasingEjector EJECTOR_RIFLE;
private static final SpentCasing CASING762NATO;
static {
EJECTOR_RIFLE = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F);
CASING762NATO = new SpentCasing(CasingType.BOTTLENECK).setScale(1.7F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS);
}
public static GunConfiguration getUACDMRConfig() {
final GunConfiguration config = new GunConfiguration();
config.rateOfFire = 4;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadDuration = 30;
config.firingDuration = 8;
config.ammoCap = 30;
config.durability = 30000;
config.reloadType = 1;
config.allowsInfinity = true;
config.hasSights = true;
config.crosshair = Crosshair.CROSS;
config.reloadSound = "hbm:weapon.DMRMagInPB3";
config.firingSound = "hbm:weapon.DMRShootPB3Alt";
config.reloadSoundEnd = true;
config.name = "uacDMR";
config.manufacturer = EnumGunManufacturer.UAC;
config.config.addAll(HbmCollection.threeZeroEight);
config.ejector = EJECTOR_RIFLE;
return config;
}
public static GunConfiguration getUACCarbineConfig() {
final GunConfiguration config = getUACDMRConfig();
config.rateOfFire = 2;
config.reloadDuration = 20;
config.ammoCap = 40;
config.durability = 40000;
config.crosshair = Crosshair.SPLIT;
config.reloadSound = "hbm:weapon.carbineMagInPB3";
config.firingSound = "hbm:weapon.carbineShootPB3";
config.name = "uacCarbine";
return config;
}
public static GunConfiguration getUACLMGConfig() {
final GunConfiguration config = getUACCarbineConfig();
config.ammoCap = 60;
config.durability = 50000;
config.crosshair = Crosshair.BOX;
config.reloadSound = "hbm:weapon.LMGMagInPB3";
config.firingSound = "hbm:weapon.LMGShootPB3Alt";
config.name = "uacLMG";
return config;
}
public static GunConfiguration getM60Config() {
final GunConfiguration config = new GunConfiguration();
config.rateOfFire = 2;
config.durability = 10000;
config.roundsPerCycle = 1;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadType = GunConfiguration.RELOAD_NONE;
config.ammoCap = 0;
config.allowsInfinity = true;
config.hasSights = true;
config.crosshair = Crosshair.L_BOX;
config.firingSound = "hbm:weapon.LMGShootPB3";
config.name = "m60";
config.manufacturer = EnumGunManufacturer.SACO;
config.comment.add("\"Get some!\"");
config.comment.add(" ~ Stuart Brown (aka Ahoy)");
config.config.addAll(HbmCollection.threeZeroEight);
config.ejector = EJECTOR_RIFLE;
return config;
}
public static BulletConfiguration get762NATOConfig() {
final BulletConfiguration bullet = Gun556mmFactory.get556Config().clone();
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.STOCK));
bullet.dmgMax *= 2;
bullet.dmgMin *= 2;
bullet.velocity *= 2.5;
bullet.maxAge *= 2;
bullet.spread /= 2;
bullet.spentCasing = CASING762NATO.clone().register("762NATOStock");
return bullet;
}
public static BulletConfiguration get762APConfig() {
final BulletConfiguration bullet = get762NATOConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.AP));
bullet.dmgMax *= 1.5;
bullet.dmgMin *= 1.5;
bullet.spentCasing = CASING762NATO.clone().register("762NATOAP");
return bullet;
}
public static BulletConfiguration get762DUConfig() {
final BulletConfiguration bullet = get762NATOConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.DU));
bullet.dmgMax *= 2;
bullet.dmgMin *= 2;
bullet.spentCasing = CASING762NATO.clone().register("762NATODU");
return bullet;
}
public static BulletConfiguration get762TracerConfig() {
final BulletConfiguration bullet = get762NATOConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.TRACER));
bullet.vPFX = "reddust";
bullet.spentCasing = CASING762NATO.clone().register("762NATOTrac");
return bullet;
}
public static BulletConfiguration get762WPConfig() {
final BulletConfiguration bullet = get762NATOConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.PHOSPHORUS));
bullet.setToFire(20 * 5);
bullet.vPFX = "reddust";
final PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
eff.getCurativeItems().clear();
bullet.effects = new ArrayList<PotionEffect>();
bullet.effects.add(new PotionEffect(eff));
bullet.spentCasing = CASING762NATO.clone().register("762NATOPhos");
return bullet;
}
public static BulletConfiguration get762BlankConfig() {
final BulletConfiguration bullet = get762NATOConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.BLANK));
bullet.dmgMax = 0;
bullet.dmgMin = 0;
bullet.maxAge = 0;
bullet.spentCasing = CASING762NATO.clone().register("762NATOK");
return bullet;
}
}

View File

@ -4,12 +4,26 @@ import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.Ammo9mm;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class Gun9mmFactory {
private static final CasingEjector EJECTOR_SMG;
private static final SpentCasing CASING9MM;
static {
EJECTOR_SMG = new CasingEjector().setMotion(-0.3, 0.6, 0).setOffset(-0.35, -0.2, 0.55).setAngleRange(0.01F, 0.03F);
CASING9MM = new SpentCasing(CasingType.STRAIGHT).setScale(1F, 1F, 0.6F).setBounceMotion(0.01F, 0.03F).setColor(SpentCasing.COLOR_CASE_BRASS);
}
public static GunConfiguration getMP40Config() {
GunConfiguration config = new GunConfiguration();
@ -29,8 +43,8 @@ public class Gun9mmFactory {
config.firingSound = "hbm:weapon.rifleShoot";
config.reloadSoundEnd = false;
config.name = "Maschinenpistole 40";
config.manufacturer = "Erfurter Maschinenfabrik Geipel";
config.name = "mp40";
config.manufacturer = EnumGunManufacturer.NAZI;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.P9_NORMAL);
@ -39,10 +53,13 @@ public class Gun9mmFactory {
config.config.add(BulletConfigSyncingUtil.CHL_P9);
config.config.add(BulletConfigSyncingUtil.P9_ROCKET);
config.ejector = EJECTOR_SMG;
return config;
}
public static GunConfiguration getThompsonConfig() {
//rechambered to .45
/*public static GunConfiguration getThompsonConfig() {
GunConfiguration config = new GunConfiguration();
@ -61,8 +78,8 @@ public class Gun9mmFactory {
config.firingSound = "hbm:weapon.rifleShoot";
config.reloadSoundEnd = false;
config.name = "M1A1 Submachine Gun 9mm Mod";
config.manufacturer = "Auto-Ordnance Corporation";
config.name = "tommy9";
config.manufacturer = EnumGunManufacturer.AUTO_ORDINANCE;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.P9_NORMAL);
@ -72,18 +89,20 @@ public class Gun9mmFactory {
config.config.add(BulletConfigSyncingUtil.P9_ROCKET);
return config;
}
}*/
static float inaccuracy = 5;
public static BulletConfiguration get9mmConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_9mm;
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.STOCK));
bullet.spread *= inaccuracy;
bullet.dmgMin = 10;
bullet.dmgMax = 14;
bullet.spentCasing = CASING9MM.clone().register("9MMStock");
return bullet;
}
@ -91,13 +110,15 @@ public class Gun9mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_9mm_ap;
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.AP));
bullet.spread *= inaccuracy;
bullet.dmgMin = 18;
bullet.dmgMax = 20;
bullet.leadChance = 10;
bullet.wear = 15;
bullet.spentCasing = CASING9MM.clone().register("9MMAP");
return bullet;
}
@ -105,13 +126,15 @@ public class Gun9mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
bullet.ammo = ModItems.ammo_9mm_du;
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.DU));
bullet.spread *= inaccuracy;
bullet.dmgMin = 22;
bullet.dmgMax = 26;
bullet.leadChance = 50;
bullet.wear = 25;
bullet.spentCasing = CASING9MM.clone().register("9MMDU");
return bullet;
}
@ -119,11 +142,13 @@ public class Gun9mmFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_9mm_rocket;
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.ROCKET));
bullet.velocity = 5;
bullet.explosive = 7.5F;
bullet.trail = 5;
bullet.spentCasing = CASING9MM.clone().register("9MMRocket");
return bullet;
}

View File

@ -3,20 +3,32 @@ package com.hbm.handler.guncfg;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.Ammo240Shell;
import com.hbm.items.ModItems;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
public class GunCannonFactory {
protected static SpentCasing CASINNG240MM;
static {
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 BulletConfiguration getShellConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
bullet.ammo = ModItems.ammo_shell;
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.STOCK));
bullet.dmgMin = 25;
bullet.dmgMax = 35;
bullet.explosive = 4F;
bullet.blockDamage = false;
bullet.spentCasing = CASINNG240MM.register("240MM"); //same instance everywhere, only register once
return bullet;
}
@ -24,12 +36,14 @@ public class GunCannonFactory {
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
bullet.ammo = ModItems.ammo_shell_explosive;
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.EXPLOSIVE));
bullet.dmgMin = 35;
bullet.dmgMax = 45;
bullet.explosive = 4F;
bullet.blockDamage = true;
bullet.spentCasing = CASINNG240MM;
return bullet;
}
@ -37,12 +51,14 @@ public class GunCannonFactory {
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
bullet.ammo = ModItems.ammo_shell_apfsds_t;
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.APFSDS_T));
bullet.dmgMin = 50;
bullet.dmgMax = 55;
bullet.doesPenetrate = true;
bullet.style = BulletConfiguration.STYLE_APDS;
bullet.spentCasing = CASINNG240MM;
return bullet;
}
@ -50,12 +66,14 @@ public class GunCannonFactory {
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
bullet.ammo = ModItems.ammo_shell_apfsds_du;
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.APFSDS_DU));
bullet.dmgMin = 70;
bullet.dmgMax = 80;
bullet.doesPenetrate = true;
bullet.style = BulletConfiguration.STYLE_APDS;
bullet.spentCasing = CASINNG240MM;
return bullet;
}
@ -63,7 +81,7 @@ public class GunCannonFactory {
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
bullet.ammo = ModItems.ammo_shell_w9;
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.W9));
bullet.dmgMin = 100;
bullet.dmgMax = 150;
@ -75,6 +93,8 @@ public class GunCannonFactory {
}
};
bullet.spentCasing = CASINNG240MM;
return bullet;
}

View File

@ -1,14 +1,24 @@
package com.hbm.handler.guncfg;
import com.hbm.handler.BulletConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
public class GunDGKFactory {
public static final SpentCasing CASINGDGK;
static {
CASINGDGK = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F).setBounceMotion(0.05F, 0.02F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.02F, 0.5D, 60, 20).setMaxAge(60); //3 instead of 12 seconds
}
public static BulletConfiguration getDGKConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_dgk;
bullet.ammo = new ComparableStack(ModItems.ammo_dgk);
bullet.spentCasing = CASINGDGK.register("DGK");
return bullet;
}

View File

@ -8,8 +8,11 @@ import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHurtBehavior;
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.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.main.MainRegistry;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -42,8 +45,8 @@ public class GunDartFactory {
config.reloadSoundEnd = false;
config.showAmmo = true;
config.name = "Needle Gun";
config.manufacturer = "-";
config.name = "dart";
config.manufacturer = EnumGunManufacturer.NONE;
config.config = new ArrayList();
config.config.add(BulletConfigSyncingUtil.NEEDLE_GPS);
@ -73,8 +76,8 @@ public class GunDartFactory {
config.reloadSoundEnd = false;
config.showAmmo = true;
config.name = "NERF blaster of unknown design";
config.manufacturer = "Hasbro";
config.name = "nerf";
config.manufacturer = EnumGunManufacturer.HASBRO;
config.config = new ArrayList();
config.config.add(BulletConfigSyncingUtil.DART_NORMAL);
@ -87,7 +90,7 @@ public class GunDartFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_dart;
bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.GPS));
bullet.velocity = 5.0F;
bullet.spread = 0;
bullet.dmgMin = 1;
@ -133,7 +136,7 @@ public class GunDartFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_dart_nuclear;
bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.NUCLEAR));
bullet.velocity = 5.0F;
bullet.spread = 0;
bullet.dmgMin = 1;
@ -170,7 +173,7 @@ public class GunDartFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_dart_nerf;
bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.NERF));
bullet.velocity = 1.0F;
bullet.gravity = 0.04D;
bullet.dmgMin = 0;

View File

@ -10,6 +10,8 @@ import com.hbm.interfaces.IBomb;
import com.hbm.interfaces.IBomb.BombReturnCode;
import com.hbm.main.MainRegistry;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.PlayerInformPacket;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -44,8 +46,8 @@ public class GunDetonatorFactory {
config.reloadSoundEnd = false;
config.showAmmo = true;
config.name = "Hopeville Laser Detonator";
config.manufacturer = "WestTek";
config.name = "laserDet";
config.manufacturer = EnumGunManufacturer.WESTTEK;
config.config = new ArrayList();
config.config.add(BulletConfigSyncingUtil.DET_BOLT);
@ -79,7 +81,7 @@ public class GunDetonatorFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = Items.redstone;
bullet.ammo = new ComparableStack(Items.redstone);
bullet.spread = 0.0F;
bullet.maxAge = 100;
bullet.dmgMin = 0;

View File

@ -11,7 +11,11 @@ import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.AmmoFireExt;
import com.hbm.items.ItemAmmoEnums.AmmoFlamethrower;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
@ -42,7 +46,7 @@ public class GunEnergyFactory {
config.crosshair = Crosshair.CIRCLE;
config.name = "Chemical Thrower";
config.manufacturer = "Langford Research Laboratories";
config.manufacturer = EnumGunManufacturer.LANGFORD;
config.config = new ArrayList<Integer>();
@ -67,7 +71,7 @@ public class GunEnergyFactory {
config.firingSound = "hbm:weapon.teslaShoot";
config.name = "EMP Orb Projector";
config.manufacturer = "MWT Prototype Labs";
config.manufacturer = EnumGunManufacturer.MWT;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SPECIAL_EMP);
@ -95,7 +99,7 @@ public class GunEnergyFactory {
config.reloadSound = "hbm:weapon.flamerReload";
config.name = "Heavy Duty Flamer";
config.manufacturer = "MWT Prototype Labs";
config.manufacturer = EnumGunManufacturer.MWT;
config.comment.add("Dragon-slaying: Advanced techniques, part 1:");
config.comment.add("Try not to get eaten by the dragon.");
@ -132,7 +136,7 @@ public class GunEnergyFactory {
config.reloadSound = "hbm:weapon.b92Reload";
config.name = "EMC101 Prismatic Negative Energy Cannon";
config.manufacturer = "MWT Prototype Labs";
config.manufacturer = EnumGunManufacturer.MWT;
config.comment.add("Taste the rainbow!");
@ -162,7 +166,7 @@ public class GunEnergyFactory {
config.reloadSound = "hbm:weapon.flamerReload";
config.name = "PROTEX Fire Exinguisher 6kg";
config.manufacturer = "Gloria GmbH";
config.manufacturer = EnumGunManufacturer.GLORIA;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.FEXT_NORMAL);
@ -184,7 +188,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.gun_emp_ammo;
bullet.ammo = new ComparableStack(ModItems.gun_emp_ammo);
bullet.velocity = 1F;
bullet.spread = 0.0F;
@ -217,7 +221,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.ammo_fuel;
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.DIESEL));
bullet.ammoCount = 100;
bullet.velocity = 0.75F;
@ -265,7 +269,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = getFlameConfig();
bullet.ammo = ModItems.ammo_fuel_napalm;
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM));
bullet.wear = 2;
bullet.dmgMin = 4;
bullet.dmgMax = 6;
@ -278,7 +282,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = getFlameConfig();
bullet.ammo = ModItems.ammo_fuel_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.PHOSPHORUS));
bullet.wear = 2;
bullet.spread = 0.0F;
bullet.bulletsMin = 1;
@ -297,7 +301,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = getFlameConfig();
bullet.ammo = ModItems.ammo_fuel_vaporizer;
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.VAPORIZER));
bullet.wear = 4;
bullet.spread = 0.25F;
bullet.bulletsMin = 8;
@ -322,7 +326,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = getFlameConfig();
bullet.ammo = ModItems.ammo_fuel_gas;
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.CHLORINE));
bullet.wear = 1;
bullet.spread = 0.05F;
bullet.gravity = 0D;
@ -344,7 +348,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.ammo_fireext;
bullet.ammo = new ComparableStack(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.WATER));
bullet.ammoCount = 300;
bullet.velocity = 0.75F;
@ -432,7 +436,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = getFextConfig();
bullet.ammo = ModItems.ammo_fireext_foam;
bullet.ammo = new ComparableStack(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.FOAM));
bullet.spread = 0.05F;
bullet.bImpact = new IBulletImpactBehavior() {
@ -513,7 +517,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = getFextConfig();
bullet.ammo = ModItems.ammo_fireext_sand;
bullet.ammo = new ComparableStack(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.SAND));
bullet.spread = 0.1F;
bullet.bImpact = new IBulletImpactBehavior() {
@ -578,7 +582,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.nugget_euphemium;
bullet.ammo = new ComparableStack(ModItems.nugget_euphemium);
bullet.ammoCount = 1000;
bullet.wear = 1;
bullet.velocity = 1F;
@ -621,7 +625,7 @@ public class GunEnergyFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.nothing;
bullet.ammo = new ComparableStack(ModItems.nothing);
bullet.dmgMin = 100;
bullet.dmgMax = 150;
bullet.velocity = 1F;

View File

@ -13,7 +13,10 @@ import com.hbm.handler.GunConfiguration;
import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -43,8 +46,8 @@ public class GunFatmanFactory {
config.reloadSound = GunConfiguration.RSOUND_FATMAN;
config.reloadSoundEnd = false;
config.name = "M-42 Tactical Nuclear Catapult";
config.manufacturer = "Fort Strong";
config.name = "m42";
config.manufacturer = EnumGunManufacturer.F_STRONG;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NUKE_NORMAL);
@ -63,8 +66,8 @@ public class GunFatmanFactory {
GunConfiguration config = getFatmanConfig();
config.name = "M-42 Experimental MIRV";
config.manufacturer = "Fort Strong";
config.name = "m42MIRV";
config.manufacturer = EnumGunManufacturer.F_STRONG;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_NORMAL);
@ -81,8 +84,8 @@ public class GunFatmanFactory {
GunConfiguration config = getFatmanConfig();
config.name = "Balefire Egg Launcher";
config.manufacturer = "Fort Strong";
config.name = "bel";
config.manufacturer = EnumGunManufacturer.F_STRONG;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NUKE_AMAT);
@ -108,8 +111,8 @@ public class GunFatmanFactory {
config.reloadSound = GunConfiguration.RSOUND_FATMAN;
config.reloadSoundEnd = false;
config.name = "M-42 Tactical Nuclear Catapult";
config.manufacturer = "Fort Strong";
config.name = "m42";
config.manufacturer = EnumGunManufacturer.F_STRONG;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_NORMAL);
@ -127,7 +130,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukeConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.STOCK));
bullet.bImpact = new IBulletImpactBehavior() {
@ -143,7 +146,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukeLowConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke_low;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW));
bullet.bImpact = new IBulletImpactBehavior() {
@ -159,7 +162,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukeHighConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke_high;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH));
bullet.bImpact = new IBulletImpactBehavior() {
@ -175,7 +178,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukeTotsConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke_tots;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.TOTS));
bullet.bulletsMin = 8;
bullet.bulletsMax = 8;
bullet.spread = 0.1F;
@ -195,7 +198,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukeSafeConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke_safe;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.SAFE));
bullet.bImpact = new IBulletImpactBehavior() {
@ -211,7 +214,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukePumpkinConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke_pumpkin;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.PUMPKIN));
bullet.explosive = 10F;
bullet.bImpact = new IBulletImpactBehavior() {
@ -242,7 +245,7 @@ public class GunFatmanFactory {
public static BulletConfiguration getNukeBarrelConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.ammo_nuke_barrel;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BARREL));
bullet.explosive = 3F;
bullet.style = bullet.STYLE_BARREL;
@ -300,7 +303,7 @@ public class GunFatmanFactory {
BulletConfiguration bullet = getNukeConfig();
bullet.ammo = ModItems.ammo_mirv;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV));
bullet.style = BulletConfiguration.STYLE_MIRV;
bullet.velocity *= 3;
@ -337,7 +340,7 @@ public class GunFatmanFactory {
BulletConfiguration bullet = getNukeLowConfig();
bullet.ammo = ModItems.ammo_mirv_low;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_LOW));
bullet.style = BulletConfiguration.STYLE_MIRV;
bullet.velocity *= 3;
@ -374,7 +377,7 @@ public class GunFatmanFactory {
BulletConfiguration bullet = getNukeHighConfig();
bullet.ammo = ModItems.ammo_mirv_high;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_HIGH));
bullet.style = BulletConfiguration.STYLE_MIRV;
bullet.velocity *= 3;
@ -411,7 +414,7 @@ public class GunFatmanFactory {
BulletConfiguration bullet = getNukeSafeConfig();
bullet.ammo = ModItems.ammo_mirv_safe;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SAFE));
bullet.style = BulletConfiguration.STYLE_MIRV;
bullet.velocity *= 3;
@ -448,7 +451,7 @@ public class GunFatmanFactory {
BulletConfiguration bullet = getNukeConfig();
bullet.ammo = ModItems.ammo_mirv_special;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SPECIAL));
bullet.style = BulletConfiguration.STYLE_MIRV;
bullet.velocity *= 3;
@ -496,7 +499,7 @@ public class GunFatmanFactory {
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
bullet.ammo = ModItems.gun_bf_ammo;
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BALEFIRE));
bullet.style = BulletConfiguration.STYLE_BF;
bullet.bImpact = new IBulletImpactBehavior() {

View File

@ -5,7 +5,9 @@ import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class GunGaussFactory {
@ -27,8 +29,8 @@ public class GunGaussFactory {
config.durability = 6000;
config.firingSound = "hbm:weapon.tauShoot";
config.name = "XVL1456 Tau Cannon";
config.manufacturer = "Black Mesa Research Facility";
config.name = "tau";
config.manufacturer = EnumGunManufacturer.BLACK_MESA;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SPECIAL_GAUSS);
@ -60,7 +62,7 @@ public class GunGaussFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.gun_xvl1456_ammo;
bullet.ammo = new ComparableStack(ModItems.gun_xvl1456_ammo);
bullet.dmgMin = 6;
bullet.dmgMax = 9;
bullet.trail = 1;

View File

@ -5,13 +5,27 @@ import java.util.ArrayList;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.AmmoGrenade;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class GunGrenadeFactory {
private static final CasingEjector EJECTOR_LAUNCHER;
private static final SpentCasing CASING40MM;
static {
EJECTOR_LAUNCHER = new CasingEjector().setAngleRange(0.02F, 0.03F).setAfterReload();
CASING40MM = new SpentCasing(CasingType.STRAIGHT).setScale(4F, 4F, 3F).setBounceMotion(0.02F, 0.03F).setColor(0x777777).setupSmoke(1F, 0.5D, 60, 40);
}
public static GunConfiguration getHK69Config() {
GunConfiguration config = new GunConfiguration();
@ -31,8 +45,8 @@ public class GunGrenadeFactory {
config.reloadSound = GunConfiguration.RSOUND_GRENADE;
config.reloadSoundEnd = false;
config.name = "Granatpistole HK69";
config.manufacturer = "Heckler & Koch";
config.name = "gPistol";
config.manufacturer = EnumGunManufacturer.H_AND_K;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.GRENADE_NORMAL);
@ -48,6 +62,8 @@ public class GunGrenadeFactory {
config.config.add(BulletConfigSyncingUtil.GRENADE_KAMPF);
config.durability = 300;
config.ejector = EJECTOR_LAUNCHER;
return config;
}
@ -55,13 +71,15 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK));
bullet.velocity = 2.0F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.wear = 10;
bullet.trail = 0;
bullet.spentCasing = CASING40MM.clone().register("40MMStock");
return bullet;
}
@ -69,7 +87,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_he;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.HE));
bullet.velocity = 2.0F;
bullet.dmgMin = 20;
bullet.dmgMax = 15;
@ -77,6 +95,8 @@ public class GunGrenadeFactory {
bullet.explosive = 5.0F;
bullet.trail = 1;
bullet.spentCasing = CASING40MM.clone().register("40MMHE");
return bullet;
}
@ -84,7 +104,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.INCENDIARY));
bullet.velocity = 2.0F;
bullet.dmgMin = 15;
bullet.dmgMax = 15;
@ -92,6 +112,8 @@ public class GunGrenadeFactory {
bullet.trail = 0;
bullet.incendiary = 2;
bullet.spentCasing = CASING40MM.clone().register("40MMInc");
return bullet;
}
@ -99,7 +121,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.PHOSPHORUS));
bullet.velocity = 2.0F;
bullet.dmgMin = 15;
bullet.dmgMax = 15;
@ -109,6 +131,8 @@ public class GunGrenadeFactory {
bullet.bImpact = BulletConfigFactory.getPhosphorousEffect(10, 60 * 20, 100, 0.5D, 1F);
bullet.spentCasing = CASING40MM.clone().register("40MMPhos");
return bullet;
}
@ -116,7 +140,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_toxic;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CHLORINE));
bullet.velocity = 2.0F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
@ -125,6 +149,8 @@ public class GunGrenadeFactory {
bullet.explosive = 0;
bullet.chlorine = 50;
bullet.spentCasing = CASING40MM.clone().register("40MMTox");
return bullet;
}
@ -132,7 +158,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.SLEEK));
bullet.velocity = 2.0F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
@ -141,6 +167,8 @@ public class GunGrenadeFactory {
bullet.explosive = 7.5F;
bullet.jolt = 6.5D;
bullet.spentCasing = CASING40MM.clone().register("40MMIF");
return bullet;
}
@ -148,7 +176,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_concussion;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CONCUSSION));
bullet.velocity = 2.0F;
bullet.dmgMin = 15;
bullet.dmgMax = 20;
@ -156,6 +184,8 @@ public class GunGrenadeFactory {
bullet.explosive = 10.0F;
bullet.trail = 3;
bullet.spentCasing = CASING40MM.clone().register("40MMCon");
return bullet;
}
@ -163,11 +193,13 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = getGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_finned;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.FINNED));
bullet.gravity = 0.02;
bullet.explosive = 1.5F;
bullet.trail = 5;
bullet.spentCasing = CASING40MM.clone().register("40MMFin");
return bullet;
}
@ -175,7 +207,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = getGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_nuclear;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.NUCLEAR));
bullet.velocity = 4;
bullet.explosive = 0.0F;
@ -187,6 +219,8 @@ public class GunGrenadeFactory {
}
};
bullet.spentCasing = CASING40MM.clone().register("40MMNuke");
return bullet;
}
@ -194,13 +228,15 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_tracer;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.TRACER));
bullet.velocity = 2.0F;
bullet.wear = 10;
bullet.explosive = 0F;
bullet.trail = 5;
bullet.vPFX = "bluedust";
bullet.spentCasing = CASING40MM.clone().register("40MMTrac").setColor(0xEEEEEE);
return bullet;
}
@ -208,7 +244,7 @@ public class GunGrenadeFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_grenade_kampf;
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.KAMPF));
bullet.spread = 0.0F;
bullet.gravity = 0.0D;
bullet.wear = 15;
@ -217,6 +253,8 @@ public class GunGrenadeFactory {
bullet.trail = 4;
bullet.vPFX = "smoke";
//bullet.spentCasing = CASING40MM.clone().register("40MMKampf").setColor(0xEBC35E); //does not eject, whole cartridge leaves the gun
return bullet;
}
}

View File

@ -9,6 +9,7 @@ import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
@ -29,7 +30,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.coin_maskman;
bullet.ammo = new ComparableStack(ModItems.coin_maskman);
bullet.velocity = 0.25F;
bullet.spread = 0.000F;
bullet.wear = 10;
@ -84,7 +85,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.coin_maskman;
bullet.ammo = new ComparableStack(ModItems.coin_maskman);
bullet.spread = 0.0F;
bullet.dmgMin = 15;
bullet.dmgMax = 20;
@ -102,7 +103,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.coin_maskman;
bullet.ammo = new ComparableStack(ModItems.coin_maskman);
bullet.spread = 0.0F;
bullet.dmgMin = 5;
bullet.dmgMax = 10;
@ -118,7 +119,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.coin_maskman;
bullet.ammo = new ComparableStack(ModItems.coin_maskman);
bullet.spread = 0.0F;
bullet.dmgMin = 15;
bullet.dmgMax = 20;
@ -151,7 +152,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.coin_maskman;
bullet.ammo = new ComparableStack(ModItems.coin_maskman);
bullet.gravity = 0.1D;
bullet.velocity = 1.0F;
bullet.dmgMin = 15;
@ -167,7 +168,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.coin_maskman;
bullet.ammo = new ComparableStack(ModItems.coin_maskman);
bullet.gravity = 0.1D;
bullet.velocity = 1.0F;
bullet.dmgMin = 20;
@ -205,7 +206,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.coin_worm;
bullet.ammo = new ComparableStack(ModItems.coin_worm);
bullet.spread = 0.0F;
bullet.maxAge = 60;
bullet.dmgMin = 15;
@ -222,7 +223,7 @@ public class GunNPCFactory {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.coin_worm;
bullet.ammo = new ComparableStack(ModItems.coin_worm);
bullet.spread = 0.0F;
bullet.maxAge = 100;
bullet.dmgMin = 35;

View File

@ -2,12 +2,21 @@ package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.blocks.generic.RedBarrel;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.PotionEffect;
public class GunOSIPRFactory {
public static GunConfiguration getOSIPRConfig() {
@ -24,13 +33,13 @@ public class GunOSIPRFactory {
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_ARROWS;
config.durability = 10000;
config.durability = 50_000;
config.reloadSound = "hbm:weapon.osiprReload";
config.firingSound = "hbm:weapon.osiprShoot";
config.reloadSoundEnd = false;
config.name = "Overwatch Standard Issue Pulse Rifle";
config.manufacturer = "The Universal Union";
config.name = "osipr";
config.manufacturer = EnumGunManufacturer.COMBINE;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SPECIAL_OSIPR);
@ -59,24 +68,71 @@ public class GunOSIPRFactory {
return config;
}
static float inaccuracy = 5;
static float inaccuracy = 1.25F;
public static BulletConfiguration getPulseConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.gun_osipr_ammo;
bullet.ammo = new ComparableStack(ModItems.gun_osipr_ammo);
bullet.ammoCount = 30;
bullet.doesRicochet = false;
bullet.spread *= inaccuracy;
bullet.dmgMin = 3;
bullet.dmgMax = 5;
bullet.dmgMin = 15;
bullet.dmgMax = 21;
bullet.trail = 2;
return bullet;
}
public static BulletConfiguration getPulseChargedConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.gun_osipr_ammo2;
bullet.ammo = new ComparableStack(ModItems.gun_osipr_ammo2);
bullet.ricochetAngle = 360;
bullet.LBRC = 100;
bullet.HBRC = 100;
bullet.bounceMod = 1;
bullet.style = BulletConfiguration.STYLE_ORB;
bullet.damageType = ModDamageSource.s_combineball;
bullet.liveAfterImpact = true;
bullet.spread = 0;
bullet.gravity = 0;
bullet.maxAge = 150;
bullet.velocity = 2;
bullet.bHurt = (ball, entity) -> {
if(entity instanceof EntityLivingBase) {
EntityLivingBase entityLiving = (EntityLivingBase) entity;
entity.addVelocity(ball.motionX / 2, ball.motionY / 2, ball.motionZ / 2);
if(entity == ball.shooter)
return;
if(entityLiving.getHealth() <= 1000) {
entityLiving.addPotionEffect(new PotionEffect(HbmPotion.bang.id, 1, 0));
entityLiving.setLastAttacker(ball.shooter);
} else if(entityLiving.getHealth() > 1000) {
ball.setDead();
return;
}
}
};
bullet.bRicochet = (ball, x, y, z) -> {
Block block = ball.worldObj.getBlock(x, y, z);
if(block instanceof RedBarrel)
((RedBarrel) block).explode(ball.worldObj, x, y, z);
};
bullet.bImpact = (ball, x, y, z) -> {
final Block block = ball.worldObj.getBlock(x, y, z);
if(block instanceof RedBarrel)
((RedBarrel) block).explode(ball.worldObj, x, y, z);
};
return bullet;
}

View File

@ -5,6 +5,7 @@ import java.util.ArrayList;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.util.EnumChatFormatting;
@ -27,7 +28,7 @@ public class GunPoweredFactory {
config.chargeRate = 2500;
config.name = "LIY2001 Anti-Material Electromagnetic Rifle Prototype";
config.manufacturer = "OxfordEM technologies";
config.manufacturer = EnumGunManufacturer.OXFORD;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.GLASS_EMRADIO);
@ -41,35 +42,6 @@ public class GunPoweredFactory {
return config;
}
/*public static BulletConfiguration getGlassBoltConfig() {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 2.0F;
bullet.spread = 0F;
bullet.dmgMin = 30;
bullet.dmgMax = 40;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
bullet.gravity = 0D;
bullet.maxAge = 100;
bullet.doesRicochet = true;
bullet.ricochetAngle = 90;
bullet.HBRC = 2;
bullet.LBRC = 90;
bullet.bounceMod = 1;
bullet.doesPenetrate = true;
bullet.style = BulletConfiguration.STYLE_BOLT;
bullet.plink = BulletConfiguration.PLINK_ENERGY;
bullet.trail = BulletConfiguration.BOLT_LASER;
bullet.dischargePerShot = 1000;
bullet.firingRate = 5;
bullet.modeName = "testMode";
bullet.chatColour = EnumChatFormatting.RED;
return bullet;
}*/
public static BulletConfiguration getEMRadioConfig() {
BulletConfiguration bullet = new BulletConfiguration();

View File

@ -10,7 +10,10 @@ import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletRicochetBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.ItemAmmoEnums.AmmoRocket;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
@ -40,8 +43,8 @@ public class GunRocketFactory {
config.reloadSound = GunConfiguration.RSOUND_LAUNCHER;
config.reloadSoundEnd = false;
config.name = "Carl Gustav Recoilless Rifle M1";
config.manufacturer = "Saab Bofors Dynamics";
config.name = "gustav";
config.manufacturer = EnumGunManufacturer.SAAB;
config.comment.add("Fun fact of the day: Recoilless");
config.comment.add("rifles don't actually fire rockets.");
@ -103,8 +106,8 @@ public class GunRocketFactory {
)
);
config.name = "OpenQuadro Guided Man-Portable Missile Launcher";
config.manufacturer = "Open Mann Co.";
config.name = "quadro";
config.manufacturer = EnumGunManufacturer.MANN;
config.comment.add("For the next three hundred years, people who needed to get to the second");
config.comment.add("floor used the only method available to them, which was rocket jumping.");
config.comment.add("This persisted until 1857, when the young bearded inventor named");
@ -134,8 +137,8 @@ public class GunRocketFactory {
config.reloadDuration = 20;
config.name = "M1 Karl-Gerät";
config.manufacturer = "???";
config.name = "karl";
config.manufacturer = EnumGunManufacturer.UNKNOWN;
config.comment.clear();
config.config = new ArrayList<Integer>();
@ -159,8 +162,8 @@ public class GunRocketFactory {
config.reloadDuration = 25;
config.hasSights = true;
config.name = "Raketenpanzerbüchse 54";
config.manufacturer = "Enzinger Union";
config.name = "panz";
config.manufacturer = EnumGunManufacturer.ENZINGER;
config.comment.clear();
config.comment.add("Panzer-Shrek");
@ -173,7 +176,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 4F;
@ -186,7 +189,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_he;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.wear = 15;
@ -200,7 +203,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.wear = 15;
@ -215,7 +218,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_emp;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.EMP));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 2.5F;
@ -229,7 +232,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_sleek;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SLEEK));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 10F;
@ -244,7 +247,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_shrapnel;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SHRAPNEL));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 4F;
@ -258,7 +261,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_glare;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE));
bullet.velocity = 5.0F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
@ -274,7 +277,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_nuclear;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.NUCLEAR));
bullet.velocity = 1.5F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
@ -298,7 +301,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_toxic;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CHLORINE));
bullet.velocity = 1.5F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
@ -314,7 +317,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_rpc;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.RPC));
bullet.velocity = 3.0F;
bullet.dmgMin = 20;
bullet.dmgMax = 25;
@ -328,7 +331,8 @@ public class GunRocketFactory {
bullet.doesPenetrate = true;
bullet.bRicochet = new IBulletRicochetBehavior() {
@Override
public void behaveBlockRicochet(EntityBulletBase bullet, int bX, int bY, int bZ) {
World worldObj = bullet.worldObj;
if(!worldObj.isRemote &&
@ -347,7 +351,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_phosphorus;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.wear = 15;
@ -364,7 +368,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_canister;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CANISTER));
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 2F;
@ -399,7 +403,7 @@ public class GunRocketFactory {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_digamma;
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.DIGAMMA));
bullet.velocity = 0.5F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
@ -422,22 +426,6 @@ public class GunRocketFactory {
spear.posY = bullet.posY + 100;
bullet.worldObj.spawnEntityInWorld(spear);
/*for(int i = 0; i < 250; i++) {
double ix = bullet.posX + bullet.worldObj.rand.nextGaussian() * 15;
double iy = bullet.posY + bullet.worldObj.rand.nextGaussian() * 2;
double iz = bullet.posZ + bullet.worldObj.rand.nextGaussian() * 15;
ExAttrib at = Vec3.createVectorHelper(ix - bullet.posX, 0, iz - bullet.posZ).lengthVector() < 20 ? ExAttrib.DIGAMMA_CIRCUIT : ExAttrib.DIGAMMA;
new ExplosionNT(bullet.worldObj, bullet, ix, iy, iz, 7.5F)
.addAttrib(ExAttrib.NOHURT)
.addAttrib(ExAttrib.NOPARTICLE)
.addAttrib(ExAttrib.NODROP)
.addAttrib(ExAttrib.NOSOUND)
.addAttrib(at).explode();
}*/
}
};

View File

@ -3,13 +3,15 @@ package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.entity.projectile.EntityRocket;
import com.hbm.entity.projectile.EntityRocketHoming;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums.AmmoStinger;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.entity.player.EntityPlayer;
@ -34,8 +36,8 @@ public class GunRocketHomingFactory {
config.reloadSound = GunConfiguration.RSOUND_LAUNCHER;
config.reloadSoundEnd = false;
config.name = "FIM-92 Stinger man-portable air-defense system";
config.manufacturer = "Raytheon Missile Systems";
config.name = "stinger";
config.manufacturer = EnumGunManufacturer.RAYTHEON;
config.comment.add("Woosh, beep-beep-beep!");
config.config = new ArrayList<Integer>();
@ -66,8 +68,8 @@ GunConfiguration config = new GunConfiguration();
config.reloadSound = GunConfiguration.RSOUND_LAUNCHER;
config.reloadSoundEnd = false;
config.name = "The One Sky Stinger";
config.manufacturer = "Equestria Missile Systems";
config.name = "stingerOneSky";
config.manufacturer = EnumGunManufacturer.EQUESTRIA;
config.comment.add("Oh, I get it, because of the...nyeees!");
config.comment.add("It all makes sense now!");
config.comment.add("");
@ -90,7 +92,7 @@ GunConfiguration config = new GunConfiguration();
public static BulletConfiguration getRocketStingerConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_stinger_rocket;
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.STOCK));
bullet.dmgMin = 20;
bullet.dmgMax = 25;
bullet.explosive = 4F;
@ -126,7 +128,7 @@ GunConfiguration config = new GunConfiguration();
public static BulletConfiguration getRocketStingerHEConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_stinger_rocket_he;
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.HE));
bullet.dmgMin = 30;
bullet.dmgMax = 35;
bullet.explosive = 8F;
@ -163,7 +165,7 @@ GunConfiguration config = new GunConfiguration();
public static BulletConfiguration getRocketStingerIncendiaryConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_stinger_rocket_incendiary;
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.INCENDIARY));
bullet.dmgMin = 15;
bullet.dmgMax = 20;
bullet.explosive = 4F;
@ -200,7 +202,7 @@ GunConfiguration config = new GunConfiguration();
public static BulletConfiguration getRocketStingerNuclearConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_stinger_rocket_nuclear;
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.NUCLEAR));
bullet.dmgMin = 50;
bullet.dmgMax = 55;
bullet.explosive = 15F;
@ -214,18 +216,21 @@ GunConfiguration config = new GunConfiguration();
if(!bullet.worldObj.isRemote) {
EntityPlayer player = bullet.worldObj.getClosestPlayerToEntity(bullet, -1.0D);
EntityRocketHoming rocket = new EntityRocketHoming(bullet.worldObj, player, 1.0F, 5.0F, 4);
if(player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
EntityRocketHoming rocket2 = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 4);
rocket = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 4);
rocket.setIsCritical(true);
rocket2.setIsCritical(true);
bullet.worldObj.spawnEntityInWorld(rocket2);
EntityPlayer player = bullet.worldObj.getClosestPlayerToEntity(bullet, -1.0D);
if(player.getDistanceToEntity(bullet) < 16) {
EntityRocketHoming rocket = new EntityRocketHoming(bullet.worldObj, player, 1.0F, 5.0F, 4);
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
EntityRocketHoming rocket2 = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 4);
rocket = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 4);
rocket.setIsCritical(true);
rocket2.setIsCritical(true);
bullet.worldObj.spawnEntityInWorld(rocket2);
}
rocket.homingMod = 5;
rocket.homingRadius = 25;
bullet.worldObj.spawnEntityInWorld(rocket);
}
rocket.homingMod = 5;
rocket.homingRadius = 25;
bullet.worldObj.spawnEntityInWorld(rocket);
bullet.setDead();
}
@ -237,7 +242,7 @@ GunConfiguration config = new GunConfiguration();
public static BulletConfiguration getRocketStingerBonesConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_stinger_rocket_bones;
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.BONES));
bullet.dmgMin = 20;
bullet.dmgMax = 25;
bullet.explosive = 8F;
@ -250,18 +255,21 @@ GunConfiguration config = new GunConfiguration();
if(!bullet.worldObj.isRemote) {
EntityPlayer player = bullet.worldObj.getClosestPlayerToEntity(bullet, -1.0D);
EntityRocketHoming rocket = new EntityRocketHoming(bullet.worldObj, player, 1.0F, 5.0F, 42);
if(player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
EntityRocketHoming rocket2 = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 42);
rocket = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 42);
rocket.setIsCritical(true);
rocket2.setIsCritical(true);
bullet.worldObj.spawnEntityInWorld(rocket2);
EntityPlayer player = bullet.worldObj.getClosestPlayerToEntity(bullet, -1.0D);
if(player.getDistanceToEntity(bullet) < 16) {
EntityRocketHoming rocket = new EntityRocketHoming(bullet.worldObj, player, 1.0F, 5.0F, 42);
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
EntityRocketHoming rocket2 = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 42);
rocket = new EntityRocketHoming(bullet.worldObj, player, 1.5F, 15.0F, 42);
rocket.setIsCritical(true);
rocket2.setIsCritical(true);
bullet.worldObj.spawnEntityInWorld(rocket2);
}
rocket.homingMod = 5;
rocket.homingRadius = 25;
bullet.worldObj.spawnEntityInWorld(rocket);
}
rocket.homingMod = 5;
rocket.homingRadius = 25;
bullet.worldObj.spawnEntityInWorld(rocket);
bullet.setDead();
}

View File

@ -2,7 +2,10 @@ package com.hbm.handler.imc;
import java.util.HashMap;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.recipes.CrystallizerRecipes.CrystallizerRecipe;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import net.minecraft.item.ItemStack;
@ -10,7 +13,7 @@ import net.minecraft.nbt.NBTTagCompound;
public class IMCCrystallizer extends IMCHandler {
public static HashMap<Object, ItemStack> buffer = new HashMap();
public static HashMap<Object, CrystallizerRecipe> buffer = new HashMap();
@Override
public void process(IMCMessage message) {
@ -28,13 +31,24 @@ public class IMCCrystallizer extends IMCHandler {
NBTTagCompound input = data.getCompoundTag("input");
ItemStack in = ItemStack.loadItemStackFromNBT(input);
int time = data.getInteger("duration");
FluidStack acid = new FluidStack(Fluids.fromID(data.getInteger("acid")), data.getInteger("amount"));
if(time <= 0)
time = 600;
if(acid.type == Fluids.NONE)
acid = new FluidStack(Fluids.ACID, 500);
CrystallizerRecipe recipe = new CrystallizerRecipe(out, time, acid);
if(in != null) {
buffer.put(new RecipesCommon.ComparableStack(in), out);
buffer.put(new RecipesCommon.ComparableStack(in), recipe);
} else {
String dict = data.getString("oredict");
if(!dict.isEmpty()) {
buffer.put(dict, out);
buffer.put(dict, recipe);
} else {
this.printError(message, "Input stack could not be read!");
}

View File

@ -20,9 +20,14 @@ package com.hbm.handler.imc;
- Set another tag compound like the output called "output". This will make the input a fixed item.
- Set a string called "oredict". This will make the input an ore dict entry and allow processing of genericized items.
[OPTIONAL]
The input has a few parameters that can be added:
- Setting an integer "acid" will change the acid requirement to the fluid with that ID, in this case "amount" also has to be set to determine the fluid amount in mB. The default uses 500mB of hydrogen peroxide.
- Setting an integer "duration" will change the base process time of this recipe in ticks, the default is 600 (30s).
EXAMPLES:
Recipe with fixed item, acidizing an alloy chestplate into 8 ingots:
Recipe with fixed item, acidizing an alloy chestplate into 8 ingots, taking 500 ticks and using 50mB of steam:
NBTTagCompound msg0 = new NBTTagCompound();
NBTTagCompound ing0 = new NBTTagCompound();
new ItemStack(ModItems.alloy_plate).writeToNBT(ing0);
@ -30,9 +35,12 @@ package com.hbm.handler.imc;
NBTTagCompound out0 = new NBTTagCompound();
new ItemStack(ModItems.ingot_advanced_alloy, 8).writeToNBT(out0);
msg0.setTag("output", out0);
msg0.setInteger("acid", 2);
msg0.setInteger("amount", 50);
msg0.setInteger("duration", 500);
FMLInterModComms.sendMessage("hbm", "crystallizer", msg0);
Recipe with an ore dict item, acidizing all "plateSteel" into a steel ingot:
Recipe with an ore dict item, acidizing all "plateSteel" into a steel ingot, with all optional values omitted:
NBTTagCompound msg1 = new NBTTagCompound();
msg1.setString("oredict", "plateSteel");
NBTTagCompound out1 = new NBTTagCompound();

View File

@ -1,191 +1,27 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.gui.GUICrystallizer;
import com.hbm.inventory.recipes.CrystallizerRecipes;
import com.hbm.inventory.recipes.MachineRecipes;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class CrystallizerRecipeHandler extends NEIUniversalHandler {
public class CrystallizerRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> batteries;
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack acid;
PositionedStack result;
public RecipeSet(Object input, ItemStack result) {
this.input = new PositionedStack(input, 75, 24);
this.acid = new PositionedStack(ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, Fluids.ACID.getID()), TileEntityMachineCrystallizer.acidRequired), 39, 24);
this.result = new PositionedStack(result, 135, 24);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(input, acid));
}
@Override
public PositionedStack getOtherStack() {
return batteries.get((cycleticks / 48) % batteries.size()).stack;
}
@Override
public PositionedStack getResult() {
return result;
}
}
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 3, 42, false);
}
public PositionedStack stack;
}
@Override
public String getRecipeName() {
return "Ore Acidizer";
public CrystallizerRecipeHandler() {
super("Acidizer", ModBlocks.machine_crystallizer, CrystallizerRecipes.getRecipes());
}
@Override
public String getGuiTexture() {
return GUICrystallizer.texture.toString();
public String getKey() {
return "ntmCrystallizer";
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("hbm_crystallizer")) && getClass() == CrystallizerRecipeHandler.class) {
Map<Object, Object> recipes = CrystallizerRecipes.getRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if(recipe.getKey() instanceof ItemStack && ((ItemStack)recipe.getKey()).getItem() == ModItems.scrap_plastic)
continue;
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object> recipes = CrystallizerRecipes.getRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameTypeCrafting((ItemStack)recipe.getValue(), result)) {
if(recipe.getKey() instanceof ItemStack && ((ItemStack)recipe.getKey()).getItem() == ModItems.scrap_plastic)
continue;
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
}
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("hbm_crystallizer")) && getClass() == CrystallizerRecipeHandler.class) {
loadCraftingRecipes("hbm_crystallizer", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
if(ingredient.getItem() == ModItems.scrap_plastic)
return;
Map<Object, Object> recipes = CrystallizerRecipes.getRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameTypeCrafting(ingredient, ItemFluidIcon.addQuantity(
new ItemStack(ModItems.fluid_icon, 1, Fluids.ACID.getID()), TileEntityMachineCrystallizer.acidRequired))) {
if(recipe.getKey() instanceof ItemStack) {
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
} else if (recipe.getKey() instanceof ArrayList) {
for(Object o : (ArrayList)recipe.getKey()) {
ItemStack stack = (ItemStack)o;
this.arecipes.add(new RecipeSet(stack, (ItemStack) recipe.getValue()));
}
}
} else if(recipe.getKey() instanceof ItemStack) {
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
} else if (recipe.getKey() instanceof ArrayList) {
for(Object o : (ArrayList)recipe.getKey()) {
ItemStack stack = (ItemStack)o;
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack))
this.arecipes.add(new RecipeSet(stack, (ItemStack) recipe.getValue()));
}
}
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUICrystallizer.class;
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(104 - 5, 34 - 11, 24, 18), "hbm_crystallizer"));
super.loadTransferRects();
transferRectsGui.add(new RecipeTransferRect(new Rectangle(80 - 5, 47 - 11, 27, 12), "ntmCrystallizer"));
guiGui.add(GUICrystallizer.class);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(99, 23, 192, 0, 22, 16, 600, 0);
drawProgressBar(3, 6, 176, 0, 16, 34, 60, 7);
}
@Override
public TemplateRecipeHandler newInstance() {
if(batteries == null)
batteries = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBatteries()) {
batteries.add(new Fuel(i));
}
return super.newInstance();
}
}

View File

@ -0,0 +1,27 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.gui.GUIMixer;
import com.hbm.inventory.recipes.MixerRecipes;
public class MixerHandler extends NEIUniversalHandler {
public MixerHandler() {
super("Mixer", ModBlocks.machine_mixer, MixerRecipes.getRecipes());
}
@Override
public String getKey() {
return "ntmMixer";
}
@Override
public void loadTransferRects() {
super.loadTransferRects();
transferRectsGui.add(new RecipeTransferRect(new Rectangle(57, 25, 52, 44), "ntmMixer"));
guiGui.add(GUIMixer.class);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
}

View File

@ -225,9 +225,13 @@ public class HazardSystem {
public static void updateDroppedItem(EntityItem entity) {
List<HazardEntry> hazards = getHazardsFromStack(entity.getEntityItem());
ItemStack stack = entity.getEntityItem();
if(entity.isDead || stack == null || stack.getItem() == null || stack.stackSize <= 0) return;
List<HazardEntry> hazards = getHazardsFromStack(stack);
for(HazardEntry entry : hazards) {
entry.type.updateEntity(entity, HazardModifier.evalAllModifiers(entity.getEntityItem(), null, entry.baseLevel, entry.mods));
entry.type.updateEntity(entity, HazardModifier.evalAllModifiers(stack, null, entry.baseLevel, entry.mods));
}
}

View File

@ -19,9 +19,11 @@ import com.hbm.hazard.HazardEntry;
import com.hbm.hazard.HazardRegistry;
import com.hbm.hazard.HazardSystem;
import com.hbm.inventory.material.MaterialShapes;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumBriquetteType;
import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.ItemEnums.EnumTarType;
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -359,9 +361,9 @@ public class OreDictManager {
KNO .dust(niter) .block(block_niter) .ore(ore_niter);
F .dust(fluorite) .block(block_fluorite) .ore(ore_fluorite, basalt_fluorite);
LIGNITE .gem(lignite) .dust(powder_lignite) .ore(ore_lignite);
COALCOKE .gem(fromOne(coke, EnumCokeType.COAL));
PETCOKE .gem(fromOne(coke, EnumCokeType.PETROLEUM));
LIGCOKE .gem(fromOne(coke, EnumCokeType.LIGNITE));
COALCOKE .gem(fromOne(coke, EnumCokeType.COAL)) .block(fromOne(block_coke, EnumCokeType.COAL));
PETCOKE .gem(fromOne(coke, EnumCokeType.PETROLEUM)) .block(fromOne(block_coke, EnumCokeType.PETROLEUM));
LIGCOKE .gem(fromOne(coke, EnumCokeType.LIGNITE)) .block(fromOne(block_coke, EnumCokeType.LIGNITE));
CINNABAR .crystal(cinnebar) .gem(cinnebar) .ore(ore_cinnebar, ore_depth_cinnebar);
BORAX .dust(powder_borax) .ore(ore_depth_borax);
VOLCANIC .gem(gem_volcanic) .ore(basalt_gem);
@ -426,7 +428,7 @@ public class OreDictManager {
ANY_HIGHEXPLOSIVE .ingot(ball_tnt);
ANY_CONCRETE .any(concrete, concrete_smooth, concrete_asbestos, ducrete, ducrete_smooth);
for(int i = 0; i < 16; i++) { ANY_CONCRETE.any(new ItemStack(ModBlocks.concrete_colored, 1, i)); }
ANY_COKE .gem(fromAll(coke, EnumCokeType.class));
ANY_COKE .gem(fromAll(coke, EnumCokeType.class)).block(fromAll(block_coke, EnumCokeType.class));
ANY_BISMOID .ingot(ingot_bismuth, ingot_arsenic).nugget(nugget_bismuth, nugget_arsenic).block(block_bismuth);
OreDictionary.registerOre(KEY_OIL_TAR, fromOne(oil_tar, EnumTarType.CRUDE));
@ -447,6 +449,10 @@ public class OreDictManager {
OreDictionary.registerOre(KEY_CIRCUIT_BISMUTH, circuit_bismuth);
OreDictionary.registerOre(KEY_CIRCUIT_BISMUTH, circuit_arsenic);
for(EnumBedrockOre ore : EnumBedrockOre.values()) {
OreDictionary.registerOre("ore" + ore.oreName, new ItemStack(ModItems.ore_enriched, 1, ore.ordinal()));
}
OreDictionary.registerOre("itemRubber", ingot_rubber);
@ -624,6 +630,15 @@ public class OreDictManager {
}
return stacks;
}
public static Object[] fromAll(Block block, Class<? extends Enum> en) {
Enum[] vals = en.getEnumConstants();
Object[] stacks = new Object[vals.length];
for(int i = 0; i < vals.length; i++) {
stacks[i] = new ItemStack(block, 1, vals[i].ordinal());
}
return stacks;
}
public DictFrame any(Object... thing) {
return makeObject(ANY, thing);

View File

@ -2,8 +2,10 @@ package com.hbm.inventory.container;
import com.hbm.inventory.SlotMachineOutput;
import com.hbm.inventory.SlotUpgrade;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
import api.hbm.energy.IBatteryItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@ -17,22 +19,29 @@ public class ContainerCrystallizer extends Container {
public ContainerCrystallizer(InventoryPlayer invPlayer, TileEntityMachineCrystallizer tedf) {
diFurnace = tedf;
this.addSlotToContainer(new Slot(tedf, 0, 80, 35));
this.addSlotToContainer(new Slot(tedf, 1, 8, 53));
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 140, 35));
this.addSlotToContainer(new Slot(tedf, 3, 26, 17));
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 26, 53));
this.addSlotToContainer(new SlotUpgrade(tedf, 5, 98, 17));
this.addSlotToContainer(new SlotUpgrade(tedf, 6, 116, 17));
//Input
this.addSlotToContainer(new Slot(tedf, 0, 62, 45));
//Battery
this.addSlotToContainer(new Slot(tedf, 1, 152, 72));
//Output
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 113, 45));
//Fluid slots
this.addSlotToContainer(new Slot(tedf, 3, 17, 18));
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 17, 54));
//Upgrades
this.addSlotToContainer(new SlotUpgrade(tedf, 5, 80, 18));
this.addSlotToContainer(new SlotUpgrade(tedf, 6, 98, 18));
//Fluid ID
this.addSlotToContainer(new Slot(tedf, 7, 35, 72));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 122 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 180));
}
}
@ -51,11 +60,20 @@ public class ContainerCrystallizer extends Container {
return null;
}
} else {
if(!this.mergeItemStack(var5, 0, 2, false))
if(!this.mergeItemStack(var5, 3, 4, false))
if(!this.mergeItemStack(var5, 5, 7, false))
return null;
if(var3.getItem() instanceof IBatteryItem) {
if(!this.mergeItemStack(var5, 1, 2, false)) {
return null;
}
} else if(var3.getItem() instanceof IItemFluidIdentifier) {
if(!this.mergeItemStack(var5, 7, 8, false)) {
return null;
}
} else {
if(!this.mergeItemStack(var5, 0, 1, false)) {
return null;
}
}
}
if(var5.stackSize == 0) {

View File

@ -18,15 +18,16 @@ public class ContainerMachineExcavator extends Container {
public ContainerMachineExcavator(InventoryPlayer invPlayer, TileEntityMachineExcavator tile) {
this.excavator = tile;
//Battery
//Battery: 0
this.addSlotToContainer(new Slot(tile, 0, 220, 72));
//Fluid ID
//Fluid ID: 1
this.addSlotToContainer(new Slot(tile, 1, 202, 72));
//Upgrades
//Upgrades: 2-4
for(int i = 0; i < 3; i++) {
this.addSlotToContainer(new Slot(tile, 2 + i, 136 + i * 18, 75));
}
//Buffer: 5-13
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
this.addSlotToContainer(new SlotMachineOutput(tile, 5 + j + i * 3, 136 + j * 18, 5 + i * 18));

View File

@ -0,0 +1,90 @@
package com.hbm.inventory.container;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.tileentity.machine.TileEntityMachineMixer;
import api.hbm.energy.IBatteryItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerMixer extends Container {
private TileEntityMachineMixer mixer;
public ContainerMixer(InventoryPlayer player, TileEntityMachineMixer mixer) {
this.mixer = mixer;
//Battery
this.addSlotToContainer(new Slot(mixer, 0, 23, 77));
//Item Input
this.addSlotToContainer(new Slot(mixer, 1, 43, 77));
//Fluid ID
this.addSlotToContainer(new Slot(mixer, 2, 117, 77));
//Upgrades
this.addSlotToContainer(new Slot(mixer, 3, 137, 24));
this.addSlotToContainer(new Slot(mixer, 4, 137, 42));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 122 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 180));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
if(var4 != null && var4.getHasStack()) {
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if(par2 <= 4) {
if(!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true)) {
return null;
}
} else {
if(var3.getItem() instanceof IBatteryItem) {
if(!this.mergeItemStack(var5, 0, 1, false)) {
return null;
}
} else if(var3.getItem() instanceof IItemFluidIdentifier) {
if(!this.mergeItemStack(var5, 2, 3, false)) {
return null;
}
} else if(var3.getItem() instanceof ItemMachineUpgrade) {
if(!this.mergeItemStack(var5, 3, 4, false)) {
return null;
}
} else {
if(!this.mergeItemStack(var5, 1, 2, false)) {
return null;
}
}
}
if(var5.stackSize == 0) {
var4.putStack((ItemStack) null);
} else {
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return mixer.isUseableByPlayer(player);
}
}

View File

@ -14,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
public class GUICrystallizer extends GuiInfoContainer {
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_crystallizer.png");
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_crystallizer_alt.png");
private TileEntityMachineCrystallizer acidomatic;
public GUICrystallizer(InventoryPlayer invPlayer, TileEntityMachineCrystallizer acidomatic) {
@ -22,22 +22,22 @@ public class GUICrystallizer extends GuiInfoContainer {
this.acidomatic = acidomatic;
this.xSize = 176;
this.ySize = 168;
this.ySize = 204;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 51 - 34, 16, 34, acidomatic.power, acidomatic.maxPower);
acidomatic.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 17, 16, 52);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 52, acidomatic.power, acidomatic.maxPower);
acidomatic.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 35, guiTop + 18, 16, 52);
String[] upgradeText = new String[4];
upgradeText[0] = I18nUtil.resolveKey("desc.gui.upgrade");
upgradeText[1] = I18nUtil.resolveKey("desc.gui.upgrade.speed");
upgradeText[2] = I18nUtil.resolveKey("desc.gui.upgrade.effectiveness");
upgradeText[3] = I18nUtil.resolveKey("desc.gui.upgrade.overdrive");
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 87, guiTop + 21, 8, 8, guiLeft + 200, guiTop + 45, upgradeText);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 117, guiTop + 22, 8, 8, guiLeft + 200, guiTop + 45, upgradeText);
}
@Override
@ -54,14 +54,14 @@ public class GUICrystallizer extends GuiInfoContainer {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int i = (int)acidomatic.getPowerScaled(34);
drawTexturedModalRect(guiLeft + 8, guiTop + 51 - i, 176, 34 - i, 16, i);
int i = (int)acidomatic.getPowerScaled(52);
drawTexturedModalRect(guiLeft + 152, guiTop + 70 - i, 176, 64 - i, 16, i);
int j = acidomatic.getProgressScaled(23);
drawTexturedModalRect(guiLeft + 104, guiTop + 34, 192, 0, j, 16);
int j = acidomatic.getProgressScaled(28);
drawTexturedModalRect(guiLeft + 80, guiTop + 47, 176, 0, j, 12);
this.drawInfoPanel(guiLeft + 87, guiTop + 21, 8, 8, 8);
this.drawInfoPanel(guiLeft + 117, guiTop + 22, 8, 8, 8);
acidomatic.tank.renderTank(guiLeft + 44, guiTop + 69, this.zLevel, 16, 52);
acidomatic.tank.renderTank(guiLeft + 35, guiTop + 70, this.zLevel, 16, 52);
}
}

View File

@ -69,9 +69,20 @@ public class GUIMachineExcavator extends GuiInfoContainer {
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 242, 96);
drawTexturedModalRect(guiLeft + 33, guiTop + 104, 33, 104, 176, 100);
int i = (int) (drill.getPower() * 52 / drill.getMaxPower());
drawTexturedModalRect(guiLeft + 220, guiTop + 70 - i, 229, 156 - i, 16, i);
if(drill.getPower() > drill.getPowerConsumption()) {
drawTexturedModalRect(guiLeft + 224, guiTop + 4, 239, 156, 9, 12);
}
if(drill.getInstalledDrill() == null && System.currentTimeMillis() % 1000 < 500) {
drawTexturedModalRect(guiLeft + 171, guiTop + 74, 209, 154, 18, 18);
}
if(drill.enableDrill) {
drawTexturedModalRect(guiLeft + 6, guiTop + 42, 209, 114, 20, 40);
if(drill.getInstalledDrill() != null) drawTexturedModalRect(guiLeft + 11, guiTop + 5, 209, 104, 10, 10);
if(drill.getInstalledDrill() != null && drill.getPower() >= drill.getPowerConsumption()) drawTexturedModalRect(guiLeft + 11, guiTop + 5, 209, 104, 10, 10);
else if(System.currentTimeMillis() % 1000 < 500) drawTexturedModalRect(guiLeft + 11, guiTop + 5, 219, 104, 10, 10);
}
@ -97,5 +108,7 @@ public class GUIMachineExcavator extends GuiInfoContainer {
if(drill.canSilkTouch()) drawTexturedModalRect(guiLeft + 107, guiTop + 5, 209, 104, 10, 10);
else if(System.currentTimeMillis() % 1000 < 500) drawTexturedModalRect(guiLeft + 107, guiTop + 5, 219, 104, 10, 10);
}
drill.tank.renderTank(guiLeft + 202, guiTop + 70, this.zLevel, 16, 52);
}
}

View File

@ -0,0 +1,64 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerMixer;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineMixer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIMixer extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_mixer.png");
private TileEntityMachineMixer mixer;
public GUIMixer(InventoryPlayer player, TileEntityMachineMixer mixer) {
super(new ContainerMixer(player, mixer));
this.mixer = mixer;
this.xSize = 176;
this.ySize = 204;
}
@Override
public void drawScreen(int x, int y, float interp) {
super.drawScreen(x, y, interp);
this.drawElectricityInfo(this, x, y, guiLeft + 23, guiTop + 23, 16, 52, mixer.getPower(), mixer.getMaxPower());
mixer.tanks[0].renderTankInfo(this, x, y, guiLeft + 43, guiTop + 23, 7, 52);
mixer.tanks[1].renderTankInfo(this, x, y, guiLeft + 52, guiTop + 23, 7, 52);
mixer.tanks[2].renderTankInfo(this, x, y, guiLeft + 117, guiTop + 23, 16, 52);
}
@Override
protected void drawGuiContainerForegroundLayer( int i, int j) {
String name = this.mixer.hasCustomInventoryName() ? this.mixer.getInventoryName() : I18n.format(this.mixer.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int i = (int) (mixer.getPower() * 53 / mixer.getMaxPower());
drawTexturedModalRect(guiLeft + 23, guiTop + 75 - i, 176, 52 - i, 16, i);
if(mixer.processTime > 0 && mixer.progress > 0) {
int j = mixer.progress * 53 / mixer.processTime;
drawTexturedModalRect(guiLeft + 62, guiTop + 36, 192, 0, j, 44);
}
mixer.tanks[0].renderTank(guiLeft + 43, guiTop + 75, this.zLevel, 7, 52);
mixer.tanks[1].renderTank(guiLeft + 52, guiTop + 75, this.zLevel, 7, 52);
mixer.tanks[2].renderTank(guiLeft + 117, guiTop + 75, this.zLevel, 16, 52);
}
}

View File

@ -0,0 +1,20 @@
package com.hbm.inventory.gui;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.turret.TileEntityTurretBaseNT;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUITurretSentry extends GUITurretBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_turret_sentry.png");
public GUITurretSentry(InventoryPlayer invPlayer, TileEntityTurretBaseNT tedf) {
super(invPlayer, tedf);
}
protected ResourceLocation getTexture() {
return texture;
}
}

View File

@ -26,8 +26,10 @@ import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ItemAmmoEnums;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemAssemblyTemplate;
import com.hbm.items.machine.ItemDrillbit.EnumDrillType;
import com.hbm.items.machine.ItemPistons.EnumPistonType;
import com.hbm.main.MainRegistry;
@ -196,8 +198,8 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModItems.warhead_thermo_endo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_endo, 2), new OreDictStack(TI.plate(), 12), new OreDictStack(STEEL.plate(), 6), },300);
makeRecipe(new ComparableStack(ModItems.warhead_thermo_exo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_exo, 2), new OreDictStack(TI.plate(), 12), new OreDictStack(STEEL.plate(), 6), },300);
makeRecipe(new ComparableStack(ModItems.fuel_tank_small, 1), new AStack[] {new ComparableStack(ModItems.canister_full, 6, Fluids.ETHANOL.getID()), new OreDictStack(TI.plate(), 6), new OreDictStack(STEEL.plate(), 2), },100);
makeRecipe(new ComparableStack(ModItems.fuel_tank_medium, 1), new AStack[] {new ComparableStack(ModItems.canister_full, 12, Fluids.KEROSENE.getID()), new OreDictStack(TI.plate(), 12), new OreDictStack(STEEL.plate(), 4), },150);
makeRecipe(new ComparableStack(ModItems.fuel_tank_large, 1), new AStack[] {new ComparableStack(ModItems.canister_full, 36, Fluids.KEROSENE.getID()), new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 8), },200);
makeRecipe(new ComparableStack(ModItems.fuel_tank_medium, 1), new AStack[] {new ComparableStack(ModItems.canister_full, 8, Fluids.KEROSENE.getID()), new OreDictStack(TI.plate(), 12), new OreDictStack(STEEL.plate(), 4), },150);
makeRecipe(new ComparableStack(ModItems.fuel_tank_large, 1), new AStack[] {new ComparableStack(ModItems.canister_full, 12, Fluids.KEROSENE.getID()), new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 8), },200);
makeRecipe(new ComparableStack(ModItems.thruster_small, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new OreDictStack(W.ingot(), 4), new ComparableStack(ModItems.wire_aluminium, 4), },100);
makeRecipe(new ComparableStack(ModItems.thruster_medium, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(W.ingot(), 8), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.wire_copper, 16), },150);
makeRecipe(new ComparableStack(ModItems.thruster_large, 1), new AStack[] {new OreDictStack(DURA.ingot(), 16), new OreDictStack(W.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.wire_gold, 32), new ComparableStack(ModItems.circuit_red_copper, 1), },200);
@ -498,6 +500,45 @@ public class AssemblerRecipes {
new OreDictStack(NB.ingot(), 16),
new ComparableStack(ModItems.bolt_compound, 16)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_excavator, 1), new AStack[] {
new ComparableStack(Blocks.stonebrick, 8),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(IRON.ingot(), 16),
new ComparableStack(ModBlocks.steel_scaffold, 16),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.tank_steel, 1),
new ComparableStack(ModItems.circuit_red_copper, 1)
}, 300);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.STEEL.ordinal()), new AStack[] {
new OreDictStack(STEEL.ingot(), 12),
new OreDictStack(W.ingot(), 4)
}, 200);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.STEEL_DIAMOND.ordinal()), new AStack[] {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.STEEL.ordinal()),
new OreDictStack(DIAMOND.dust(), 16)
}, 100);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.HSS.ordinal()), new AStack[] {
new OreDictStack(DURA.ingot(), 12),
new OreDictStack(ANY_PLASTIC.ingot(), 12),
new OreDictStack(TI.ingot(), 8)
}, 200);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.HSS_DIAMOND.ordinal()), new AStack[] {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.HSS.ordinal()),
new OreDictStack(DIAMOND.dust(), 24)
}, 100);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.DESH.ordinal()), new AStack[] {
new OreDictStack(DESH.ingot(), 16),
new OreDictStack(RUBBER.ingot(), 12),
new OreDictStack(NB.ingot(), 4)
}, 200);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.DESH_DIAMOND.ordinal()), new AStack[] {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.DESH.ordinal()),
new OreDictStack(DIAMOND.dust(), 32)
}, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_large_turbine, 1), new AStack[] {
new OreDictStack(STEEL.plate(), 12),
new OreDictStack(RUBBER.ingot(), 4),
@ -572,7 +613,7 @@ public class AssemblerRecipes {
new OreDictStack(ASBESTOS.ingot(), 8)
}, 200);
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2), new AStack[] {
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.STOCK.ordinal()), new AStack[] {
new OreDictStack(STEEL.plate(), 2),
new OreDictStack(CU.plate(), 1),
new ComparableStack(ModItems.primer_50, 5),
@ -582,7 +623,7 @@ public class AssemblerRecipes {
new OreDictStack(U238.ingot(), 1)
}, 60);
makeRecipe(new ComparableStack(ModItems.ammo_75bolt_incendiary, 2), new AStack[] {
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.INCENDIARY.ordinal()), new AStack[] {
new OreDictStack(STEEL.plate(), 2),
new OreDictStack(CU.plate(), 1),
new ComparableStack(ModItems.primer_50, 5),
@ -592,7 +633,7 @@ public class AssemblerRecipes {
new OreDictStack(P_WHITE.ingot(), 3)
}, 60);
makeRecipe(new ComparableStack(ModItems.ammo_75bolt_he, 2), new AStack[] {
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.HE.ordinal()), new AStack[] {
new OreDictStack(STEEL.plate(), 2),
new OreDictStack(CU.plate(), 1),
new ComparableStack(ModItems.primer_50, 5),

View File

@ -18,6 +18,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
import com.hbm.main.MainRegistry;
import net.minecraft.init.Blocks;
@ -298,6 +299,28 @@ public class CentrifugeRecipes extends SerializableRecipe {
new ItemStack(Items.dye, 1, 15), //temp
new ItemStack(ModItems.dust) });
for(EnumBedrockOre ore : EnumBedrockOre.values()) {
int i = ore.ordinal();
recipes.put(new ComparableStack(ModItems.ore_bedrock, 1, i), new ItemStack[] {
new ItemStack(ModItems.ore_centrifuged, 1, i),
new ItemStack(ModItems.ore_centrifuged, 1, i),
new ItemStack(ModItems.ore_centrifuged, 1, i),
new ItemStack(ModItems.ore_centrifuged, 1, i) });
recipes.put(new ComparableStack(ModItems.ore_cleaned, 1, i), new ItemStack[] {
new ItemStack(ModItems.ore_separated, 1, i),
new ItemStack(ModItems.ore_separated, 1, i),
new ItemStack(ModItems.ore_separated, 1, i),
new ItemStack(ModItems.ore_separated, 1, i) });
recipes.put(new ComparableStack(ModItems.ore_purified, 1, i), new ItemStack[] {
new ItemStack(ModItems.ore_enriched, 1, i),
new ItemStack(ModItems.ore_enriched, 1, i),
new ItemStack(ModItems.ore_enriched, 1, i),
new ItemStack(ModItems.ore_enriched, 1, i) });
}
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");
if(quartz != null && !quartz.isEmpty()) {
@ -425,6 +448,6 @@ public class CentrifugeRecipes extends SerializableRecipe {
@Override
public String getComment() {
return "Outputs have to be an array of four item stacks. The centrifuge can't handle recipes with a smaller output as of now.";
return "Outputs have to be an array of up to four item stacks. Fewer aren't used by default recipes, but should work anyway.";
}
}

View File

@ -2,19 +2,25 @@ package com.hbm.inventory.recipes;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import static com.hbm.inventory.OreDictManager.*;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.imc.IMCCrystallizer;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
import com.hbm.main.MainRegistry;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@ -23,66 +29,76 @@ import net.minecraftforge.oredict.OreDictionary;
public class CrystallizerRecipes {
//'Object' is either a ComparableStack or the key for the ore dict
private static HashMap<Object, ItemStack> recipes = new HashMap();
private static HashMap<Object, CrystallizerRecipe> recipes = new HashMap();
public static void register() {
recipes.put(COAL.ore(), new ItemStack(ModItems.crystal_coal));
recipes.put(IRON.ore(), new ItemStack(ModItems.crystal_iron));
recipes.put(GOLD.ore(), new ItemStack(ModItems.crystal_gold));
recipes.put(REDSTONE.ore(), new ItemStack(ModItems.crystal_redstone));
recipes.put(LAPIS.ore(), new ItemStack(ModItems.crystal_lapis));
recipes.put(DIAMOND.ore(), new ItemStack(ModItems.crystal_diamond));
recipes.put(U.ore(), new ItemStack(ModItems.crystal_uranium));
recipes.put(TH232.ore(), new ItemStack(ModItems.crystal_thorium));
recipes.put(PU.ore(), new ItemStack(ModItems.crystal_plutonium));
recipes.put(TI.ore(), new ItemStack(ModItems.crystal_titanium));
recipes.put(S.ore(), new ItemStack(ModItems.crystal_sulfur));
recipes.put(KNO.ore(), new ItemStack(ModItems.crystal_niter));
recipes.put(CU.ore(), new ItemStack(ModItems.crystal_copper));
recipes.put(W.ore(), new ItemStack(ModItems.crystal_tungsten));
recipes.put(AL.ore(), new ItemStack(ModItems.crystal_aluminium));
recipes.put(F.ore(), new ItemStack(ModItems.crystal_fluorite));
recipes.put(BE.ore(), new ItemStack(ModItems.crystal_beryllium));
recipes.put(PB.ore(), new ItemStack(ModItems.crystal_lead));
recipes.put(SA326.ore(), new ItemStack(ModItems.crystal_schrabidium));
recipes.put(LI.ore(), new ItemStack(ModItems.crystal_lithium));
recipes.put(STAR.ore(), new ItemStack(ModItems.crystal_starmetal));
recipes.put(CO.ore(), new ItemStack(ModItems.crystal_cobalt));
recipes.put("oreRareEarth", new ItemStack(ModItems.crystal_rare));
recipes.put("oreCinnabar", new ItemStack(ModItems.crystal_cinnebar));
recipes.put(new ComparableStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.crystal_phosphorus));
recipes.put(new ComparableStack(ModBlocks.ore_tikite), new ItemStack(ModItems.crystal_trixite));
recipes.put(new ComparableStack(ModBlocks.gravel_diamond), new ItemStack(ModItems.crystal_diamond));
recipes.put(SRN.ingot(), new ItemStack(ModItems.crystal_schraranium));
recipes.put("sand", new ItemStack(ModItems.ingot_fiberglass));
recipes.put(REDSTONE.block(), new ItemStack(ModItems.ingot_mercury));
recipes.put(CINNABAR.crystal(), new ItemStack(ModItems.ingot_mercury, 3));
recipes.put(BORAX.dust(), new ItemStack(ModItems.powder_boron_tiny, 3));
recipes.put(COAL.block(), new ItemStack(ModBlocks.block_graphite));
int baseTime = 600;
int utilityTime = 100;
FluidStack sulfur = new FluidStack(Fluids.SULFURIC_ACID, 500);
recipes.put(new ComparableStack(Blocks.cobblestone), new ItemStack(ModBlocks.reinforced_stone));
recipes.put(new ComparableStack(ModBlocks.gravel_obsidian), new ItemStack(ModBlocks.brick_obsidian));
recipes.put(new ComparableStack(Items.rotten_flesh), new ItemStack(Items.leather));
recipes.put(new ComparableStack(ModItems.coal_infernal), new ItemStack(ModItems.solid_fuel));
recipes.put(new ComparableStack(ModBlocks.stone_gneiss), new ItemStack(ModItems.powder_lithium));
registerRecipe(COAL.ore(), new CrystallizerRecipe(ModItems.crystal_coal, baseTime));
registerRecipe(IRON.ore(), new CrystallizerRecipe(ModItems.crystal_iron, baseTime));
registerRecipe(GOLD.ore(), new CrystallizerRecipe(ModItems.crystal_gold, baseTime));
registerRecipe(REDSTONE.ore(), new CrystallizerRecipe(ModItems.crystal_redstone, baseTime));
registerRecipe(LAPIS.ore(), new CrystallizerRecipe(ModItems.crystal_lapis, baseTime));
registerRecipe(DIAMOND.ore(), new CrystallizerRecipe(ModItems.crystal_diamond, baseTime));
registerRecipe(U.ore(), new CrystallizerRecipe(ModItems.crystal_uranium, baseTime, sulfur));
registerRecipe(TH232.ore(), new CrystallizerRecipe(ModItems.crystal_thorium, baseTime, sulfur));
registerRecipe(PU.ore(), new CrystallizerRecipe(ModItems.crystal_plutonium, baseTime, sulfur));
registerRecipe(TI.ore(), new CrystallizerRecipe(ModItems.crystal_titanium, baseTime, sulfur));
registerRecipe(S.ore(), new CrystallizerRecipe(ModItems.crystal_sulfur, baseTime));
registerRecipe(KNO.ore(), new CrystallizerRecipe(ModItems.crystal_niter, baseTime));
registerRecipe(CU.ore(), new CrystallizerRecipe(ModItems.crystal_copper, baseTime));
registerRecipe(W.ore(), new CrystallizerRecipe(ModItems.crystal_tungsten, baseTime, sulfur));
registerRecipe(AL.ore(), new CrystallizerRecipe(ModItems.crystal_aluminium, baseTime));
registerRecipe(F.ore(), new CrystallizerRecipe(ModItems.crystal_fluorite, baseTime));
registerRecipe(BE.ore(), new CrystallizerRecipe(ModItems.crystal_beryllium, baseTime));
registerRecipe(PB.ore(), new CrystallizerRecipe(ModItems.crystal_lead, baseTime));
registerRecipe(SA326.ore(), new CrystallizerRecipe(ModItems.crystal_schrabidium, baseTime, sulfur));
registerRecipe(LI.ore(), new CrystallizerRecipe(ModItems.crystal_lithium, baseTime, sulfur));
registerRecipe(STAR.ore(), new CrystallizerRecipe(ModItems.crystal_starmetal, baseTime, sulfur));
registerRecipe(CO.ore(), new CrystallizerRecipe(ModItems.crystal_cobalt, baseTime, sulfur));
recipes.put(DIAMOND.dust(), new ItemStack(Items.diamond));
recipes.put(EMERALD.dust(), new ItemStack(Items.emerald));
recipes.put(LAPIS.dust(), new ItemStack(Items.dye, 1, 4));
recipes.put(new ComparableStack(ModItems.powder_semtex_mix), new ItemStack(ModItems.ingot_semtex));
recipes.put(new ComparableStack(ModItems.powder_desh_ready), new ItemStack(ModItems.ingot_desh));
recipes.put(new ComparableStack(ModItems.powder_meteorite), new ItemStack(ModItems.fragment_meteorite, 1));
registerRecipe("oreRareEarth", new CrystallizerRecipe(ModItems.crystal_rare, baseTime, sulfur));
registerRecipe("oreCinnabar", new CrystallizerRecipe(ModItems.crystal_cinnebar, baseTime));
recipes.put(new ComparableStack(ModItems.meteorite_sword_treated), new ItemStack(ModItems.meteorite_sword_etched, 1));
registerRecipe(new ComparableStack(ModBlocks.ore_nether_fire), new CrystallizerRecipe(ModItems.crystal_phosphorus, baseTime));
registerRecipe(new ComparableStack(ModBlocks.ore_tikite), new CrystallizerRecipe(ModItems.crystal_trixite, baseTime, sulfur));
registerRecipe(new ComparableStack(ModBlocks.gravel_diamond), new CrystallizerRecipe(ModItems.crystal_diamond, baseTime));
registerRecipe(SRN.ingot(), new CrystallizerRecipe(ModItems.crystal_schraranium, baseTime));
recipes.put(new ComparableStack(ModItems.powder_impure_osmiridium), new ItemStack(ModItems.crystal_osmiridium));
registerRecipe("sand", new CrystallizerRecipe(ModItems.ingot_fiberglass, utilityTime));
registerRecipe(REDSTONE.block(), new CrystallizerRecipe(ModItems.ingot_mercury, baseTime));
registerRecipe(CINNABAR.crystal(), new CrystallizerRecipe(new ItemStack(ModItems.ingot_mercury, 3), baseTime));
registerRecipe(BORAX.dust(), new CrystallizerRecipe(new ItemStack(ModItems.powder_boron_tiny, 3), baseTime, sulfur));
registerRecipe(COAL.block(), new CrystallizerRecipe(ModBlocks.block_graphite, baseTime));
registerRecipe(new ComparableStack(Blocks.cobblestone), new CrystallizerRecipe(ModBlocks.reinforced_stone, utilityTime));
registerRecipe(new ComparableStack(ModBlocks.gravel_obsidian), new CrystallizerRecipe(ModBlocks.brick_obsidian, utilityTime));
registerRecipe(new ComparableStack(Items.rotten_flesh), new CrystallizerRecipe(Items.leather, utilityTime));
registerRecipe(new ComparableStack(ModItems.coal_infernal), new CrystallizerRecipe(ModItems.solid_fuel, utilityTime));
registerRecipe(new ComparableStack(ModBlocks.stone_gneiss), new CrystallizerRecipe(ModItems.powder_lithium, utilityTime));
registerRecipe(DIAMOND.dust(), new CrystallizerRecipe(Items.diamond, utilityTime));
registerRecipe(EMERALD.dust(), new CrystallizerRecipe(Items.emerald, utilityTime));
registerRecipe(LAPIS.dust(), new CrystallizerRecipe(new ItemStack(Items.dye, 1, 4), utilityTime));
registerRecipe(new ComparableStack(ModItems.powder_semtex_mix), new CrystallizerRecipe(ModItems.ingot_semtex, baseTime));
registerRecipe(new ComparableStack(ModItems.powder_desh_ready), new CrystallizerRecipe(ModItems.ingot_desh, baseTime));
registerRecipe(new ComparableStack(ModItems.powder_meteorite), new CrystallizerRecipe(ModItems.fragment_meteorite, utilityTime));
registerRecipe(new ComparableStack(ModItems.meteorite_sword_treated), new CrystallizerRecipe(ModItems.meteorite_sword_etched, baseTime));
registerRecipe(new ComparableStack(ModItems.powder_impure_osmiridium), new CrystallizerRecipe(ModItems.crystal_osmiridium, baseTime, new FluidStack(Fluids.SCHRABIDIC, 1_000)));
for(int i = 0; i < ScrapType.values().length; i++) {
recipes.put(new ComparableStack(ModItems.scrap_plastic, 1, i), new ItemStack(ModItems.circuit_star_piece, 1, i));
registerRecipe(new ComparableStack(ModItems.scrap_plastic, 1, i), new CrystallizerRecipe(new ItemStack(ModItems.circuit_star_piece, 1, i), baseTime));
}
for(EnumBedrockOre ore : EnumBedrockOre.values()) {
int i = ore.ordinal();
registerRecipe(new ComparableStack(ModItems.ore_centrifuged, 1, i), new CrystallizerRecipe(new ItemStack(ModItems.ore_cleaned, 1, i), baseTime, sulfur));
registerRecipe(new ComparableStack(ModItems.ore_separated, 1, i), new CrystallizerRecipe(new ItemStack(ModItems.ore_purified, 1, i), baseTime));
}
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");
@ -90,7 +106,7 @@ public class CrystallizerRecipes {
if(quartz != null && !quartz.isEmpty()) {
ItemStack qItem = quartz.get(0).copy();
qItem.stackSize = 12;
recipes.put("oreCertusQuartz", qItem);
registerRecipe("oreCertusQuartz", new CrystallizerRecipe(qItem, baseTime));
}
if(!IMCCrystallizer.buffer.isEmpty()) {
@ -100,7 +116,7 @@ public class CrystallizerRecipes {
}
}
public static ItemStack getOutput(ItemStack stack) {
public static CrystallizerRecipe getOutput(ItemStack stack) {
if(stack == null || stack.getItem() == null)
return null;
@ -108,34 +124,60 @@ public class CrystallizerRecipes {
ComparableStack comp = new ComparableStack(stack.getItem(), 1, stack.getItemDamage());
if(recipes.containsKey(comp))
return recipes.get(comp).copy();
return recipes.get(comp);
String[] dictKeys = comp.getDictKeys();
for(String key : dictKeys) {
if(recipes.containsKey(key))
return recipes.get(key).copy();
return recipes.get(key);
}
return null;
}
public static Map<Object, Object> getRecipes() {
public static HashMap getRecipes() {
Map<Object, Object> recipes = new HashMap<Object, Object>();
HashMap<Object, Object> recipes = new HashMap<Object, Object>();
for(Entry<Object, ItemStack> entry : CrystallizerRecipes.recipes.entrySet()) {
for(Entry<Object, CrystallizerRecipe> entry : CrystallizerRecipes.recipes.entrySet()) {
CrystallizerRecipe recipe = entry.getValue();
if(entry.getKey() instanceof String) {
List<ItemStack> ingredients = OreDictionary.getOres((String)entry.getKey());
recipes.put(ingredients, entry.getValue());
OreDictStack stack = new OreDictStack((String) entry.getKey());
recipes.put(new Object[] {ItemFluidIcon.make(recipe.acid), stack}, recipe.output);
} else {
recipes.put(((ComparableStack)entry.getKey()).toStack(), entry.getValue());
ComparableStack stack = (ComparableStack) entry.getKey();
if(stack.item == ModItems.scrap_plastic) continue;
recipes.put(new Object[] {ItemFluidIcon.make(recipe.acid), stack}, recipe.output);
}
}
return recipes;
}
// NYI
public static void registerRecipe(Object input, CrystallizerRecipe recipe) {
recipes.put(input, recipe);
}
public static class CrystallizerRecipe {
public FluidStack acid;
public int duration;
public ItemStack output;
public CrystallizerRecipe(Block output, int duration) { this(new ItemStack(output), duration, new FluidStack(Fluids.ACID, 500)); }
public CrystallizerRecipe(Item output, int duration) { this(new ItemStack(output), duration, new FluidStack(Fluids.ACID, 500)); }
public CrystallizerRecipe(ItemStack output, int duration) { this(output, duration, new FluidStack(Fluids.ACID, 500)); }
public CrystallizerRecipe(Block output, int duration, FluidStack acid) { this(new ItemStack(output), duration, acid); }
public CrystallizerRecipe(Item output, int duration, FluidStack acid) { this(new ItemStack(output), duration, acid); }
public CrystallizerRecipe(ItemStack output, int duration, FluidStack acid) {
this.output = output;
this.duration = duration;
this.acid = acid;
}
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ItemAmmoEnums;
import com.hbm.items.ModItems;
import net.minecraft.init.Items;
@ -44,17 +45,17 @@ public class MagicRecipes {
recipes.add(new MagicRecipe(new ItemStack(ModItems.mysteryshovel), new ComparableStack(Items.iron_shovel), new ComparableStack(Items.bone), new ComparableStack(ModItems.ingot_starmetal), new ComparableStack(ModItems.ducttape)));
recipes.add(new MagicRecipe(new ItemStack(ModItems.ingot_electronium), new ComparableStack(ModItems.pellet_charged), new ComparableStack(ModItems.pellet_charged), new ComparableStack(ModItems.ingot_dineutronium), new ComparableStack(ModItems.ingot_dineutronium)));
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_44_pip),
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_44, 1, ItemAmmoEnums.Ammo44Magnum.PIP.ordinal()),
new ComparableStack(ModItems.ammo_44),
new ComparableStack(ModItems.powder_magic),
new ComparableStack(ModItems.powder_magic),
new ComparableStack(ModItems.powder_magic)));
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_44_bj),
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_44, 1, ItemAmmoEnums.Ammo44Magnum.BJ.ordinal()),
new ComparableStack(ModItems.ammo_44),
new ComparableStack(ModItems.powder_magic),
new ComparableStack(ModItems.powder_magic),
new ComparableStack(ModItems.powder_desh)));
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_44_silver),
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_44, 1, ItemAmmoEnums.Ammo44Magnum.SILVER.ordinal()),
new ComparableStack(ModItems.ammo_44),
new ComparableStack(ModItems.powder_magic),
new ComparableStack(ModItems.powder_magic),
@ -90,7 +91,7 @@ public class MagicRecipes {
new ComparableStack(ModItems.ingot_polymer),
new OreDictStack("plateGold")));
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_dart_nuclear, 4),
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_dart, 4, ItemAmmoEnums.AmmoDart.NUCLEAR.ordinal()),
new ComparableStack(ModItems.plate_polymer),
new ComparableStack(ModItems.nugget_pu239),
new ComparableStack(ModItems.circuit_aluminium)));

View File

@ -0,0 +1,80 @@
package com.hbm.inventory.recipes;
import static com.hbm.inventory.OreDictManager.KNO;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.OreDictManager;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
public class MixerRecipes {
public static HashMap<FluidType, MixerRecipe> recipes = new HashMap();
public static void register() {
recipes.put(Fluids.COOLANT, new MixerRecipe(2_000, 50).setStack1(new FluidStack(Fluids.WATER, 1_800)).setSolid(new OreDictStack(KNO.dust())));
recipes.put(Fluids.CRYOGEL, new MixerRecipe(2_000, 50).setStack1(new FluidStack(Fluids.COOLANT, 1_800)).setSolid(new ComparableStack(ModItems.powder_ice)));
recipes.put(Fluids.NITAN, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.KEROSENE, 600)).setStack2(new FluidStack(Fluids.MERCURY, 200)).setSolid(new ComparableStack(ModItems.powder_nitan_mix)));
recipes.put(Fluids.FRACKSOL, new MixerRecipe(1_000, 20).setStack1(new FluidStack(Fluids.WATER, 1_000)).setStack2(new FluidStack(Fluids.PETROLEUM, 100)).setSolid(new OreDictStack(OreDictManager.S.dust())));
recipes.put(Fluids.ENDERJUICE, new MixerRecipe(100, 100).setStack1(new FluidStack(Fluids.XPJUICE, 500)).setSolid(new OreDictStack(OreDictManager.DIAMOND.dust())));
recipes.put(Fluids.LUBRICANT, new MixerRecipe(1_000, 20).setStack1(new FluidStack(Fluids.HEATINGOIL, 500)).setStack2(new FluidStack(Fluids.UNSATURATEDS, 500)));
recipes.put(Fluids.PETROIL, new MixerRecipe(1_000, 30).setStack1(new FluidStack(Fluids.RECLAIMED, 800)).setStack2(new FluidStack(Fluids.LUBRICANT, 200)));
recipes.put(Fluids.PETROIL_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.PETROIL, 800)).setSolid(new ComparableStack(ModItems.antiknock)));
recipes.put(Fluids.GASOLINE_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.GASOLINE, 800)).setSolid(new ComparableStack(ModItems.antiknock)));
recipes.put(Fluids.COALGAS_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.COALGAS, 800)).setSolid(new ComparableStack(ModItems.antiknock)));
}
public static MixerRecipe getOutput(FluidType type) {
return recipes.get(type);
}
public static HashMap getRecipes() {
HashMap<Object[], Object> recipes = new HashMap<Object[], Object>();
for(Entry<FluidType, MixerRecipe> entry : MixerRecipes.recipes.entrySet()) {
FluidType type = entry.getKey();
MixerRecipe recipe = entry.getValue();
FluidStack output = new FluidStack(type, recipe.output);
List<Object> objects = new ArrayList();
if(recipe.input1 != null) objects.add(ItemFluidIcon.make(recipe.input1));
if(recipe.input2 != null) objects.add(ItemFluidIcon.make(recipe.input2));
if(recipe.solidInput != null) objects.add(recipe.solidInput);
recipes.put(objects.toArray(), ItemFluidIcon.make(output));
}
return recipes;
}
public static class MixerRecipe {
public FluidStack input1;
public FluidStack input2;
public AStack solidInput;
public int processTime;
public int output;
protected MixerRecipe(int output, int processTime) {
this.output = output;
this.processTime = processTime;
}
protected MixerRecipe setStack1(FluidStack stack) { input1 = stack; return this; }
protected MixerRecipe setStack2(FluidStack stack) { input2 = stack; return this; }
protected MixerRecipe setSolid(AStack stack) { solidInput = stack; return this; }
}
}

View File

@ -8,6 +8,9 @@ import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.items.ItemEnums.EnumBriquetteType;
import com.hbm.items.ItemAmmoEnums.Ammo357Magnum;
import com.hbm.items.ItemAmmoEnums.Ammo556mm;
import com.hbm.items.ItemAmmoEnums.AmmoLunaticSniper;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemStamp;
import com.hbm.items.machine.ItemStamp.StampType;
@ -76,30 +79,33 @@ public class PressRecipes {
makeRecipe(StampType.WIRE, new OreDictStack(ALLOY.ingot()), new ItemStack(ModItems.wire_advanced_alloy, 8));
makeRecipe(StampType.WIRE, new OreDictStack(MAGTUNG.ingot()), new ItemStack(ModItems.wire_magnetized_tungsten, 8));
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_raw), ModItems.circuit_aluminium);
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_bismuth_raw), ModItems.circuit_bismuth);
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_arsenic_raw), ModItems.circuit_arsenic);
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_raw), ModItems.circuit_aluminium);
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_bismuth_raw), ModItems.circuit_bismuth);
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_arsenic_raw), ModItems.circuit_arsenic);
makeRecipe(StampType.CIRCUIT, new ComparableStack(ModItems.circuit_tantalium_raw), ModItems.circuit_tantalium);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_iron), ModItems.gun_revolver_iron_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_steel), ModItems.gun_revolver_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_lead), ModItems.gun_revolver_lead_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_gold), ModItems.gun_revolver_gold_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_schrabidium), ModItems.gun_revolver_schrabidium_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_nightmare), ModItems.gun_revolver_nightmare_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_desh), ModItems.ammo_357_desh);
makeRecipe(StampType.C357, new OreDictStack(STEEL.ingot()), ModItems.gun_revolver_cursed_ammo);
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_iron), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.IRON));
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_steel), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.LEAD));
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_lead), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NUCLEAR));
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_gold), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.GOLD));
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_schrabidium), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.SCHRABIDIUM));
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_nightmare), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE1));
makeRecipe(StampType.C357, new ComparableStack(ModItems.assembly_desh), ModItems.ammo_357.stackFromEnum(Ammo357Magnum.DESH));
makeRecipe(StampType.C357, new OreDictStack(STEEL.ingot()), ModItems.ammo_357.stackFromEnum(24, Ammo357Magnum.STEEL));
makeRecipe(StampType.C44, new ComparableStack(ModItems.assembly_nopip), ModItems.ammo_44);
makeRecipe(StampType.C44, new ComparableStack(ModItems.assembly_nopip), ModItems.ammo_44);
makeRecipe(StampType.C44, new ComparableStack(ModItems.assembly_45), ModItems.ammo_45);
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_smg), ModItems.ammo_9mm);
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_uzi), ModItems.ammo_22lr);
makeRecipe(StampType.C9, new OreDictStack(GOLD.ingot()), ModItems.ammo_566_gold);
makeRecipe(StampType.C9, new OreDictStack(GOLD.ingot()), ModItems.ammo_556.stackFromEnum(32, Ammo556mm.GOLD));
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_lacunae), ModItems.ammo_5mm);
makeRecipe(StampType.C9, new ComparableStack(ModItems.assembly_556), ModItems.ammo_556);
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_calamity), ModItems.ammo_50bmg);
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_actionexpress), ModItems.ammo_50ae);
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_luna), ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT));
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_762), ModItems.ammo_762);
}
public static void makeRecipe(StampType type, AStack in, Item out) {

View File

@ -15,6 +15,7 @@ import com.hbm.interfaces.Untested;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
import com.hbm.main.MainRegistry;
import com.hbm.util.Compat;
@ -213,6 +214,15 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2));
}
for(EnumBedrockOre ore : EnumBedrockOre.values()) {
int i = ore.ordinal();
ShredderRecipes.setRecipe(new ItemStack(ModItems.ore_bedrock, 1, i), new ItemStack(ModItems.ore_enriched, 1, i));
ShredderRecipes.setRecipe(new ItemStack(ModItems.ore_centrifuged, 1, i), new ItemStack(ModItems.ore_enriched, 1, i));
ShredderRecipes.setRecipe(new ItemStack(ModItems.ore_cleaned, 1, i), new ItemStack(ModItems.ore_enriched, 1, i));
ShredderRecipes.setRecipe(new ItemStack(ModItems.ore_separated, 1, i), new ItemStack(ModItems.ore_enriched, 1, i));
ShredderRecipes.setRecipe(new ItemStack(ModItems.ore_purified, 1, i), new ItemStack(ModItems.ore_enriched, 1, i));
}
for(int i = 0; i < 5; i++) ShredderRecipes.setRecipe(new ItemStack(Items.skull, 1, i), new ItemStack(ModItems.biomass, 4));
/* Crystal processing */

View File

@ -11,6 +11,7 @@ import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.recipes.AssemblerRecipes;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ModItems;
import com.hbm.items.food.ItemFlask.EnumInfusion;
@ -493,86 +494,95 @@ public class AnvilRecipes {
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack(IRON.plate()), new ComparableStack(Items.redstone)}, new AnvilOutput(new ItemStack(ModItems.primer_buckshot))).setTier(1));
Object[][] recs = new Object[][] {
{ModItems.ammo_12gauge, P_RED.dust(), ModItems.ammo_12gauge_incendiary, 20, 2},
{ModItems.ammo_12gauge, Item.getItemFromBlock(ModBlocks.gravel_obsidian), ModItems.ammo_12gauge_shrapnel, 20, 2},
{ModItems.ammo_12gauge, U238.ingot(), ModItems.ammo_12gauge_du, 20, 3},
{ModItems.ammo_12gauge, ModItems.coin_maskman, ModItems.ammo_12gauge_sleek, 100, 4},
{ModItems.ammo_20gauge, P_RED.dust(), ModItems.ammo_20gauge_incendiary, 20, 2},
{ModItems.ammo_20gauge, Item.getItemFromBlock(ModBlocks.gravel_obsidian), ModItems.ammo_20gauge_shrapnel, 20, 2},
{ModItems.ammo_20gauge, ModItems.powder_poison, ModItems.ammo_20gauge_caustic, 20, 2},
{ModItems.ammo_20gauge, DIAMOND.dust(), ModItems.ammo_20gauge_shock, 20, 2},
{ModItems.ammo_20gauge, Item.getItemFromBlock(Blocks.soul_sand), ModItems.ammo_20gauge_wither, 10, 3},
{ModItems.ammo_20gauge, ModItems.coin_maskman, ModItems.ammo_20gauge_sleek, 100, 4},
{ModItems.ammo_12gauge.stackFromEnum(20, Ammo12Gauge.STOCK), P_RED.dust(), ModItems.ammo_12gauge.stackFromEnum(20, Ammo12Gauge.INCENDIARY), 2},
{ModItems.ammo_12gauge.stackFromEnum(20, Ammo12Gauge.STOCK), Item.getItemFromBlock(ModBlocks.gravel_obsidian), ModItems.ammo_12gauge.stackFromEnum(20, Ammo12Gauge.SHRAPNEL), 2},
{ModItems.ammo_12gauge.stackFromEnum(20, Ammo12Gauge.STOCK), U238.ingot(), ModItems.ammo_12gauge.stackFromEnum(20, Ammo12Gauge.DU), 3},
{ModItems.ammo_12gauge.stackFromEnum(100, Ammo12Gauge.STOCK), ModItems.coin_maskman, ModItems.ammo_12gauge.stackFromEnum(100, Ammo12Gauge.SLEEK), 4},
{ModItems.ammo_4gauge_flechette, P_WHITE.ingot(), ModItems.ammo_4gauge_flechette_phosphorus, 20, 2},
{ModItems.ammo_4gauge_explosive, ModItems.egg_balefire_shard, ModItems.ammo_4gauge_balefire, 10, 4},
{ModItems.ammo_4gauge_explosive, ModItems.ammo_rocket, ModItems.ammo_4gauge_kampf, 4, 2},
{ModItems.ammo_4gauge_kampf, ModItems.pellet_canister, ModItems.ammo_4gauge_canister, 10, 3},
{ModItems.ammo_4gauge, ModItems.pellet_claws, ModItems.ammo_4gauge_claw, 4, 5},
{ModItems.ammo_4gauge, ModItems.toothpicks, ModItems.ammo_4gauge_vampire, 4, 5},
{ModItems.ammo_4gauge, ModItems.pellet_charged, ModItems.ammo_4gauge_void, 1, 5},
{ModItems.ammo_4gauge, ModItems.coin_maskman, ModItems.ammo_4gauge_sleek, 100, 4},
{ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.STOCK), P_RED.dust(), ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.INCENDIARY), 2},
{ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.STOCK), Item.getItemFromBlock(ModBlocks.gravel_obsidian), ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.SHRAPNEL), 2},
{ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.STOCK), ModItems.powder_poison, ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.CAUSTIC), 2},
{ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.STOCK), DIAMOND.dust(), ModItems.ammo_20gauge.stackFromEnum(20, Ammo20Gauge.SHOCK), 2},
{ModItems.ammo_20gauge.stackFromEnum(10, Ammo20Gauge.STOCK), Item.getItemFromBlock(Blocks.soul_sand), ModItems.ammo_20gauge.stackFromEnum(10, Ammo20Gauge.WITHER), 3},
{ModItems.ammo_20gauge.stackFromEnum(100, Ammo20Gauge.STOCK), ModItems.coin_maskman, ModItems.ammo_20gauge.stackFromEnum(100, Ammo20Gauge.SLEEK), 4},
{ModItems.ammo_44, DURA.ingot(), ModItems.ammo_44_ap, 20, 2},
{ModItems.ammo_44, U238.ingot(), ModItems.ammo_44_du, 20, 2},
{ModItems.ammo_44, P_WHITE.ingot(), ModItems.ammo_44_phosphorus, 20, 2},
{ModItems.ammo_44_du, STAR.ingot(), ModItems.ammo_44_star, 10, 3},
{ModItems.ammo_44, ModItems.pellet_chlorophyte, ModItems.ammo_44_chlorophyte, 10, 3},
{ModItems.ammo_4gauge.stackFromEnum(20, Ammo4Gauge.FLECHETTE), P_WHITE.ingot(), ModItems.ammo_4gauge.stackFromEnum(20, Ammo4Gauge.FLECHETTE_PHOSPHORUS), 2},
{ModItems.ammo_4gauge.stackFromEnum(10, Ammo4Gauge.EXPLOSIVE), ModItems.egg_balefire_shard, ModItems.ammo_4gauge.stackFromEnum(10, Ammo4Gauge.BALEFIRE), 4},
{ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.EXPLOSIVE), ModItems.ammo_rocket, ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.KAMPF), 2},
{ModItems.ammo_4gauge.stackFromEnum(10, Ammo4Gauge.KAMPF), ModItems.pellet_canister, ModItems.ammo_4gauge.stackFromEnum(10, Ammo4Gauge.CANISTER), 3},
{ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.STOCK), ModItems.pellet_claws, ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.CLAW), 5},
{ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.STOCK), ModItems.toothpicks, ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.VAMPIRE), 5},
{ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.STOCK), ModItems.pellet_charged, ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VOID), 5},
{ModItems.ammo_4gauge.stackFromEnum(100, Ammo4Gauge.STOCK), ModItems.coin_maskman, ModItems.ammo_4gauge.stackFromEnum(100, Ammo4Gauge.SLEEK), 4},
{ModItems.ammo_5mm, ANY_HIGHEXPLOSIVE.ingot(), ModItems.ammo_5mm_explosive, 20, 2},
{ModItems.ammo_5mm, U238.ingot(), ModItems.ammo_5mm_du, 20, 2},
{ModItems.ammo_5mm, STAR.ingot(), ModItems.ammo_5mm_star, 10, 3},
{ModItems.ammo_5mm, ModItems.pellet_chlorophyte, ModItems.ammo_5mm_chlorophyte, 10, 3},
{ModItems.ammo_44.stackFromEnum(20, Ammo44Magnum.STOCK), DURA.ingot(), ModItems.ammo_44.stackFromEnum(20, Ammo44Magnum.AP), 2},
{ModItems.ammo_44.stackFromEnum(20, Ammo44Magnum.STOCK), U238.ingot(), ModItems.ammo_44.stackFromEnum(20, Ammo44Magnum.DU), 2},
{ModItems.ammo_44.stackFromEnum(20, Ammo44Magnum.STOCK), P_WHITE.ingot(), ModItems.ammo_44.stackFromEnum(20, Ammo44Magnum.PHOSPHORUS), 2},
{ModItems.ammo_44.stackFromEnum(10, Ammo44Magnum.DU), STAR.ingot(), ModItems.ammo_44.stackFromEnum(10, Ammo44Magnum.STAR), 3},
{ModItems.ammo_44.stackFromEnum(10, Ammo44Magnum.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_44.stackFromEnum(10, Ammo44Magnum.CHLOROPHYTE), 3},
{ModItems.ammo_9mm, DURA.ingot(), ModItems.ammo_9mm_ap, 20, 2},
{ModItems.ammo_9mm, U238.ingot(), ModItems.ammo_9mm_du, 20, 2},
{ModItems.ammo_9mm, ModItems.pellet_chlorophyte, ModItems.ammo_9mm_chlorophyte, 10, 3},
{ModItems.ammo_22lr, DURA.ingot(), ModItems.ammo_22lr_ap, 20, 2},
{ModItems.ammo_22lr, ModItems.pellet_chlorophyte, ModItems.ammo_22lr_chlorophyte, 10, 3},
{ModItems.ammo_45.stackFromEnum(20, Ammo45ACP.STOCK), DURA.ingot(), ModItems.ammo_45.stackFromEnum(20, Ammo45ACP.AP), 3},
{ModItems.ammo_45.stackFromEnum(10, Ammo45ACP.DU), U238.ingot(), ModItems.ammo_45.stackFromEnum(10, Ammo45ACP.DU), 3},
{ModItems.ammo_50bmg, P_RED.dust(), ModItems.ammo_50bmg_incendiary, 20, 2},
{ModItems.ammo_50bmg, P_WHITE.ingot(), ModItems.ammo_50bmg_phosphorus, 20, 2},
{ModItems.ammo_50bmg, ANY_HIGHEXPLOSIVE.ingot(), ModItems.ammo_50bmg_explosive, 20, 2},
{ModItems.ammo_50bmg, DURA.ingot(), ModItems.ammo_50bmg_ap, 20, 2},
{ModItems.ammo_50bmg, U238.ingot(), ModItems.ammo_50bmg_du, 20, 2},
{ModItems.ammo_50bmg_du, STAR.ingot(), ModItems.ammo_50bmg_star, 10, 3},
{ModItems.ammo_50bmg, ModItems.pellet_chlorophyte, ModItems.ammo_50bmg_chlorophyte, 10, 3},
{ModItems.ammo_50bmg, ModItems.coin_maskman, ModItems.ammo_50bmg_sleek, 100, 4},
{ModItems.ammo_50bmg, ModItems.pellet_flechette, ModItems.ammo_50bmg_flechette, 20, 2},
{ModItems.ammo_50bmg_flechette, ModItems.nugget_am_mix, ModItems.ammo_50bmg_flechette_am, 10, 3},
{ModItems.ammo_50bmg_flechette, ModItems.powder_polonium, ModItems.ammo_50bmg_flechette_po, 20, 3},
{ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.STOCK), ModItems.ingot_semtex, ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.EXPLOSIVE), 2},
{ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.STOCK), U238.ingot(), ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.DU), 2},
{ModItems.ammo_5mm.stackFromEnum(25, Ammo5mm.DU), STAR.ingot(), ModItems.ammo_5mm.stackFromEnum(25, Ammo5mm.STAR), 3},
{ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.CHLOROPHYTE), 3},
{ModItems.ammo_50ae, DURA.ingot(), ModItems.ammo_50ae_ap, 20, 2},
{ModItems.ammo_50ae, U238.ingot(), ModItems.ammo_50ae_du, 20, 2},
{ModItems.ammo_50ae_du, STAR.ingot(), ModItems.ammo_50ae_star, 10, 3},
{ModItems.ammo_50ae, ModItems.pellet_chlorophyte, ModItems.ammo_50ae_chlorophyte, 10, 3},
{ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.STOCK), DURA.ingot(), ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.AP), 2},
{ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.STOCK), U238.ingot(), ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.DU), 2},
{ModItems.ammo_9mm.stackFromEnum(10, Ammo9mm.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_9mm.stackFromEnum(10, Ammo9mm.CHLOROPHYTE), 3},
{ModItems.ammo_556, P_WHITE.ingot(), ModItems.ammo_556_phosphorus, 20, 2},
{ModItems.ammo_556, DURA.ingot(), ModItems.ammo_556_ap, 20, 2},
{ModItems.ammo_556, U238.ingot(), ModItems.ammo_556_du, 20, 2},
{ModItems.ammo_556_du, STAR.ingot(), ModItems.ammo_556_star, 10, 3},
{ModItems.ammo_556, ModItems.pellet_chlorophyte, ModItems.ammo_556_chlorophyte, 10, 3},
{ModItems.ammo_556, ModItems.coin_maskman, ModItems.ammo_556_sleek, 100, 4},
{ModItems.ammo_556, Items.redstone, ModItems.ammo_556_tracer, 20, 2},
{ModItems.ammo_556, ModItems.pellet_flechette, ModItems.ammo_556_flechette, 20, 2},
{ModItems.ammo_556_flechette, P_RED.dust(), ModItems.ammo_556_flechette_incendiary, 20, 2},
{ModItems.ammo_556_flechette, P_WHITE.ingot(), ModItems.ammo_556_flechette_phosphorus, 20, 2},
{ModItems.ammo_556_flechette, U238.ingot(), ModItems.ammo_556_flechette_du, 20, 2},
{ModItems.ammo_556_flechette, ModItems.coin_maskman, ModItems.ammo_556_flechette_sleek, 100, 4},
{ModItems.ammo_556_flechette, ModItems.pellet_chlorophyte, ModItems.ammo_556_flechette_chlorophyte, 10, 3},
{ModItems.ammo_22lr.stackFromEnum(20, Ammo22LR.STOCK), DURA.ingot(), ModItems.ammo_22lr.stackFromEnum(20, Ammo22LR.AP), 2},
{ModItems.ammo_22lr.stackFromEnum(10, Ammo22LR.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_22lr.stackFromEnum(10, Ammo22LR.CHLOROPHYTE), 3},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.STOCK), P_RED.dust(), ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.INCENDIARY), 2},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.STOCK), P_WHITE.ingot(), ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.PHOSPHORUS), 2},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.STOCK), ModItems.ingot_semtex, ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.EXPLOSIVE), 2},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.STOCK), DURA.ingot(), ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.AP), 2},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.STOCK), U238.ingot(), ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.DU), 2},
{ModItems.ammo_50bmg.stackFromEnum(10, Ammo50BMG.DU), STAR.ingot(), ModItems.ammo_50bmg.stackFromEnum(10, Ammo50BMG.STAR), 3},
{ModItems.ammo_50bmg.stackFromEnum(10, Ammo50BMG.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_50bmg.stackFromEnum(10, Ammo50BMG.CHLOROPHYTE), 3},
{ModItems.ammo_50bmg.stackFromEnum(100, Ammo50BMG.STOCK), ModItems.coin_maskman, ModItems.ammo_50bmg.stackFromEnum(100, Ammo50BMG.SLEEK), 4},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.STOCK), ModItems.pellet_flechette, ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.FLECHETTE), 2},
{ModItems.ammo_50bmg.stackFromEnum(10, Ammo50BMG.FLECHETTE), ModItems.nugget_am_mix, ModItems.ammo_50bmg.stackFromEnum(10, Ammo50BMG.FLECHETTE_AM), 3},
{ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.FLECHETTE), ModItems.powder_polonium, ModItems.ammo_50bmg.stackFromEnum(20, Ammo50BMG.FLECHETTE_PO), 3},
{ModItems.ammo_50ae.stackFromEnum(20, Ammo50AE.STOCK), DURA.ingot(), ModItems.ammo_50ae.stackFromEnum(20, Ammo50AE.AP), 2},
{ModItems.ammo_50ae.stackFromEnum(20, Ammo50AE.STOCK), U238.ingot(), ModItems.ammo_50ae.stackFromEnum(20, Ammo50AE.DU), 2},
{ModItems.ammo_50ae.stackFromEnum(10, Ammo50AE.DU), STAR.ingot(), ModItems.ammo_50ae.stackFromEnum(10, Ammo50AE.STAR), 3},
{ModItems.ammo_50ae.stackFromEnum(10, Ammo50AE.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_50ae.stackFromEnum(10, Ammo50AE.CHLOROPHYTE), 3},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.STOCK), P_WHITE.ingot(), ModItems.ammo_556.stackFromEnum(20, Ammo556mm.PHOSPHORUS), 2},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.STOCK), DURA.ingot(), ModItems.ammo_556.stackFromEnum(20, Ammo556mm.AP), 2},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.STOCK), U238.ingot(), ModItems.ammo_556.stackFromEnum(20, Ammo556mm.DU), 2},
{ModItems.ammo_556.stackFromEnum(10, Ammo556mm.DU), STAR.ingot(), ModItems.ammo_556.stackFromEnum(10, Ammo556mm.STAR), 3},
{ModItems.ammo_556.stackFromEnum(10, Ammo556mm.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_556.stackFromEnum(10, Ammo556mm.CHLOROPHYTE), 3},
{ModItems.ammo_556.stackFromEnum(100, Ammo556mm.STOCK), ModItems.coin_maskman, ModItems.ammo_556.stackFromEnum(100, Ammo556mm.SLEEK), 4},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.STOCK), Items.redstone, ModItems.ammo_556.stackFromEnum(20, Ammo556mm.TRACER), 2},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.STOCK), ModItems.pellet_flechette, ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE), 2},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE), P_RED.dust(), ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE_INCENDIARY), 2},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE), P_WHITE.ingot(), ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE_PHOSPHORUS), 2},
{ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE), U238.ingot(), ModItems.ammo_556.stackFromEnum(20, Ammo556mm.FLECHETTE_DU), 2},
{ModItems.ammo_556.stackFromEnum(100, Ammo556mm.FLECHETTE), ModItems.coin_maskman, ModItems.ammo_556.stackFromEnum(100, Ammo556mm.FLECHETTE_SLEEK), 4},
{ModItems.ammo_556.stackFromEnum(10, Ammo556mm.FLECHETTE), ModItems.pellet_chlorophyte, ModItems.ammo_556.stackFromEnum(10, Ammo556mm.FLECHETTE_CHLOROPHYTE), 3},
{ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.STOCK), Items.redstone, ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.TRACER), 2},
{ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.STOCK), DURA.ingot(), ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.AP), 2},
{ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.STOCK), P_WHITE.ingot(), ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.PHOSPHORUS), 2},
{ModItems.ammo_762.stackFromEnum(10, Ammo762NATO.STOCK), U238.ingot(), ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.DU), 2}
};
for(Object[] objs : recs) {
ComparableStack ammoIn = new ComparableStack((ItemStack) objs[0]);
ItemStack out = (ItemStack) objs[2];
if(objs[1] instanceof Item) {
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] { new ComparableStack((Item)objs[0], (int)objs[3]), new ComparableStack((Item)objs[1], 1) },
new AnvilOutput(new ItemStack((Item)objs[2], (int)objs[3]))).setTier((int)objs[4]));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] { ammoIn, new ComparableStack((Item)objs[1], 1) }, new AnvilOutput(out)).setTier((int)objs[3]));
} else if(objs[1] instanceof String) {
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] { new ComparableStack((Item)objs[0], (int)objs[3]), new OreDictStack((String)objs[1], 1) },
new AnvilOutput(new ItemStack((Item)objs[2], (int)objs[3]))).setTier((int)objs[4]));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] { ammoIn, new OreDictStack((String)objs[1], 1) }, new AnvilOutput(out)).setTier((int)objs[3]));
}
}
}

View File

@ -60,6 +60,9 @@ public abstract class SerializableRecipe {
}
}
File info = new File(recDir.getAbsolutePath() + File.separatorChar + "REMOVE UNDERSCORE TO ENABLE RECIPE LOADING - RECIPES WILL RESET TO DEFAULT OTHERWISE");
try { info.createNewFile(); } catch(IOException e) { }
MainRegistry.logger.info("Starting recipe init!");
for(SerializableRecipe recipe : recipeHandlers) {

View File

@ -0,0 +1,759 @@
package com.hbm.items;
import java.util.Set;
import com.google.common.collect.ImmutableSet;
import com.hbm.items.weapon.ItemAmmo.AmmoItemTrait;
import com.hbm.lib.HbmCollection;
public class ItemAmmoEnums {
public enum AmmoLunaticSniper implements IAmmoItemEnum {
SABOT("ammo_luna"),
INCENDIARY("ammo_luna_incendiary"),
EXPLOSIVE("ammo_luna_explosive");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoLunaticSniper(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoFireExt implements IAmmoItemEnum {
WATER("ammo_fireext"),
FOAM("ammo_fireext_foam"),
SAND("ammo_fireext_sand");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoFireExt(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoFlamethrower implements IAmmoItemEnum {
DIESEL("ammo_fuel"),
NAPALM("ammo_fuel_napalm", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.CON_HEAVY_WEAR),
PHOSPHORUS("ammo_fuel_phosphorus", AmmoItemTrait.PRO_PHOSPHORUS_SPLASH, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.PRO_ACCURATE1, AmmoItemTrait.NEU_WARCRIME1, AmmoItemTrait.CON_SING_PROJECTILE, AmmoItemTrait.CON_HEAVY_WEAR),
VAPORIZER("ammo_fuel_vaporizer", AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.PRO_FLAMES, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_ERASER, AmmoItemTrait.CON_ACCURACY2, AmmoItemTrait.CON_RANGE2, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_LING_FIRE),
CHLORINE("ammo_fuel_gas", AmmoItemTrait.PRO_NO_GRAVITY, AmmoItemTrait.PRO_POISON_GAS, AmmoItemTrait.CON_NO_DAMAGE, AmmoItemTrait.CON_NO_FIRE);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoFlamethrower(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoMisc implements IAmmoItemEnum {
//LUNA_SNIPER("ammo_lunar", Gun50BMGFactory.getLunaticSabotRound(), AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.PRO_ACCURATE2, AmmoItemTrait.NEU_HEAVY_METAL),
DGK("ammo_dkg");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoMisc(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoStinger implements IAmmoItemEnum {
STOCK("ammo_stinger_rocket"),
HE("ammo_stinger_rocket_he", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_WEAR),
INCENDIARY("ammo_stinger_rocket_incendiary", HbmCollection.IncendiaryType),
NUCLEAR("ammo_stinger_rocket_nuclear", AmmoItemTrait.PRO_NUCLEAR, AmmoItemTrait.CON_SUPER_WEAR),
BONES("ammo_stinger_rocket_bones");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoStinger(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private AmmoStinger(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoRocket implements IAmmoItemEnum {
STOCK("ammo_rocket"),
HE("ammo_rocket_he", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_WEAR),
INCENDIARY("ammo_rocket_incendiary", HbmCollection.IncendiaryType),
EMP("ammo_rocket_emp", AmmoItemTrait.PRO_EMP, AmmoItemTrait.CON_RADIUS),
SLEEK("ammo_rocket_sleek", AmmoItemTrait.PRO_RADIUS_HIGH, AmmoItemTrait.PRO_NO_GRAVITY, AmmoItemTrait.CON_SPEED),
SHRAPNEL("ammo_rocket_shrapnel", AmmoItemTrait.PRO_SHRAPNEL),
GLARE("ammo_rocket_glare", AmmoItemTrait.PRO_SPEED, AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR),
NUCLEAR("ammo_rocket_nuclear", AmmoItemTrait.PRO_NUCLEAR, AmmoItemTrait.CON_SUPER_WEAR, AmmoItemTrait.CON_SPEED),
CHLORINE("ammo_rocket_toxic", AmmoItemTrait.PRO_CHLORINE, AmmoItemTrait.CON_NO_EXPLODE1, AmmoItemTrait.CON_SPEED),
RPC("ammo_rocket_rpc", AmmoItemTrait.PRO_CHAINSAW, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.PRO_NO_GRAVITY, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_NO_EXPLODE1, AmmoItemTrait.NEU_UHH ),
PHOSPHORUS("ammo_rocket_phosphorus", HbmCollection.PhosphorusTypeSpecial),
CANISTER("ammo_rocket_canister"),
DIGAMMA("ammo_rocket_digamma");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoRocket(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private AmmoRocket(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoGrenade implements IAmmoItemEnum {
STOCK("ammo_grenade"),
HE("ammo_grenade_he", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_WEAR),
INCENDIARY("ammo_grenade_incendiary", AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR),
PHOSPHORUS("ammo_grenade_phosphorus", AmmoItemTrait.PRO_PHOSPHORUS_SPLASH, AmmoItemTrait.NEU_WARCRIME1, AmmoItemTrait.CON_WEAR),
CHLORINE("ammo_grenade_toxic", AmmoItemTrait.PRO_CHLORINE, AmmoItemTrait.CON_NO_EXPLODE1),
SLEEK("ammo_grenade_sleek", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.NEU_JOLT),
CONCUSSION("ammo_grenade_concussion", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_NO_EXPLODE2),
FINNED("ammo_grenade_finned", AmmoItemTrait.PRO_GRAVITY, AmmoItemTrait.CON_RADIUS),
NUCLEAR("ammo_grenade_nuclear", AmmoItemTrait.PRO_NUCLEAR, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.CON_HEAVY_WEAR),
TRACER("ammo_grenade_tracer", AmmoItemTrait.NEU_BLANK),
KAMPF("ammo_grenade_kampf", AmmoItemTrait.PRO_ROCKET_PROPELLED, AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.PRO_ACCURATE1, AmmoItemTrait.CON_WEAR);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoGrenade(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoFatman implements IAmmoItemEnum {
STOCK("ammo_nuke"),
LOW("ammo_nuke_low", AmmoItemTrait.CON_RADIUS),
HIGH("ammo_nuke_high", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.PRO_FALLOUT),
TOTS("ammo_nuke_tots", AmmoItemTrait.PRO_BOMB_COUNT, AmmoItemTrait.NEU_FUN, AmmoItemTrait.CON_ACCURACY2, AmmoItemTrait.CON_RADIUS, AmmoItemTrait.CON_NO_MIRV),
SAFE("ammo_nuke_safe", AmmoItemTrait.CON_RADIUS, AmmoItemTrait.CON_NO_EXPLODE2),
PUMPKIN("ammo_nuke_pumpkin", AmmoItemTrait.CON_NN),
MIRV("ammo_mirv"),
MIRV_LOW("ammo_mirv_low", AmmoItemTrait.CON_RADIUS),
MIRV_HIGH("ammo_mirv_high", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.PRO_FALLOUT),
MIRV_SAFE("ammo_mirv_safe", AmmoItemTrait.CON_RADIUS, AmmoItemTrait.CON_NO_EXPLODE2),
MIRV_SPECIAL("ammo_mirv_special"),
BALEFIRE("gun_bf_ammo"),
BARREL("ammo_nuke_barrel");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoFatman(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum AmmoDart implements IAmmoItemEnum {
GPS("ammo_dart"),
NUCLEAR("ammo_dart_nuclear"),
NERF("ammo_dart_nerf");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private AmmoDart(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo240Shell implements IAmmoItemEnum {
STOCK("ammo_shell"),
EXPLOSIVE("ammo_shell_explosive"),
APFSDS_T("ammo_shell_apfsds_t"),
APFSDS_DU("ammo_shell_apfsds_du"),
W9("ammo_shell_w9");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo240Shell(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo9mm implements IAmmoItemEnum {
STOCK("ammo_9mm"),
AP("ammo_9mm_ap", HbmCollection.APType),
DU("ammo_9mm_du", HbmCollection.DUType),
CHLOROPHYTE("ammo_9mm_chlorophyte", HbmCollection.ChlorophyteType),
ROCKET("ammo_9mm_rocket", AmmoItemTrait.PRO_ROCKET, AmmoItemTrait.NEU_UHH);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo9mm(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo9mm(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo762NATO implements IAmmoItemEnum {
STOCK("ammo_762"),
AP("ammo_762_ap", HbmCollection.APType),
DU("ammo_762_du", HbmCollection.DUType),
TRACER("ammo_762_tracer", AmmoItemTrait.NEU_TRACER),
PHOSPHORUS("ammo_762_phosphorus", HbmCollection.PhosphorusType),
BLANK("ammo_762_k", AmmoItemTrait.NEU_BLANK);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo762NATO(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo762NATO(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo75Bolt implements IAmmoItemEnum {
STOCK("ammo_75bolt"),
INCENDIARY("ammo_75bolt_incendiary"),
HE("ammo_75bolt_he");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo75Bolt(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo5mm implements IAmmoItemEnum {
STOCK("ammo_5mm"),
EXPLOSIVE("ammo_5mm_explosive", HbmCollection.ExplosiveType),
DU("ammo_5mm_du", HbmCollection.DUType),
STAR("ammo_5mm_star", HbmCollection.StarmetalType),
CHLOROPHYTE("ammo_5mm_chlorophyte", HbmCollection.ChlorophyteType);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo5mm(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo5mm(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo556mm implements IAmmoItemEnum {
STOCK("ammo_556"),
GOLD("gun_pm_ammo"),
PHOSPHORUS("ammo_556_phosphorus", HbmCollection.PhosphorusType),
AP("ammo_556_ap", HbmCollection.APType),
DU("ammo_556_du", HbmCollection.DUType),
STAR("ammo_556_star", HbmCollection.StarmetalType),
CHLOROPHYTE("ammo_556_chlorophyte", HbmCollection.ChlorophyteType),
SLEEK("ammo_556_sleek", AmmoItemTrait.NEU_MASKMAN_METEORITE),
TRACER("ammo_556_tracer", AmmoItemTrait.NEU_TRACER),
FLECHETTE("ammo_556_flechette", HbmCollection.FlechetteType),
FLECHETTE_INCENDIARY("ammo_556_flechette_incendiary", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_PENETRATION),
FLECHETTE_PHOSPHORUS("ammo_556_flechette_phosphorus", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.NEU_WARCRIME2, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_PENETRATION),
FLECHETTE_DU("ammo_556_flechette_du", AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.NEU_HEAVY_METAL, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_HEAVY_WEAR),
FLECHETTE_CHLOROPHYTE("ammo_556_flechette_chlorophyte", HbmCollection.ChlorophyteType),
FLECHETTE_SLEEK("ammo_556_flechette_sleek", AmmoItemTrait.NEU_MASKMAN_METEORITE),
K("ammo_556_k", AmmoItemTrait.NEU_BLANK);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo556mm(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo556mm(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo50BMG implements IAmmoItemEnum {
STOCK("ammo_50bmg"),
INCENDIARY("ammo_50bmg_incendiary", HbmCollection.IncendiaryType),
PHOSPHORUS("ammo_50bmg_phosphorus", HbmCollection.PhosphorusType),
EXPLOSIVE("ammo_50bmg_explosive", HbmCollection.ExplosiveType),
AP("ammo_50bmg_ap", HbmCollection.APType),
DU("ammo_50bmg_du", HbmCollection.DUType),
STAR("ammo_50bmg_star", HbmCollection.StarmetalType),
CHLOROPHYTE("ammo_50bmg_chlorophyte", HbmCollection.ChlorophyteType),
SLEEK("ammo_50bmg_sleek", AmmoItemTrait.NEU_MASKMAN_METEORITE),
FLECHETTE("ammo_50bmg_flechette", AmmoItemTrait.PRO_DAMAGE),
FLECHETTE_AM("ammo_50bmg_flechette_am", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_UHH),
FLECHETTE_PO("ammo_50bmg_flechette_po", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_UHH);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo50BMG(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo50BMG(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo50AE implements IAmmoItemEnum {
STOCK("ammo_50ae"),
AP("ammo_50ae_ap", HbmCollection.APType),
DU("ammo_50ae_du", HbmCollection.DUType),
STAR("ammo_50ae_star", HbmCollection.StarmetalType),
CHLOROPHYTE("ammo_50ae_chlorophyte", HbmCollection.ChlorophyteType);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo50AE(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo50AE(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo4Gauge implements IAmmoItemEnum {
STOCK("ammo_4gauge"),
SLUG("ammo_4gauge_slug", AmmoItemTrait.PRO_ACCURATE2, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WEAR, AmmoItemTrait.CON_SING_PROJECTILE),
FLECHETTE("ammo_4gauge_flechette", HbmCollection.FlechetteType),
FLECHETTE_PHOSPHORUS("ammo_4gauge_flechette_phosphorus", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.NEU_WARCRIME2, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR),
EXPLOSIVE("ammo_4gauge_explosive", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_40MM, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_SING_PROJECTILE),
MINING("ammo_4gauge_semtex", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_MINING, AmmoItemTrait.CON_NO_EXPLODE3, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_SING_PROJECTILE),
BALEFIRE("ammo_4gauge_balefire", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_BALEFIRE, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_SING_PROJECTILE),
KAMPF("ammo_4gauge_kampf", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_ROCKET_PROPELLED, AmmoItemTrait.PRO_ACCURATE1, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_SING_PROJECTILE),
CANISTER("ammo_4gauge_canister"),
SLEEK("ammo_4gauge_sleek", AmmoItemTrait.NEU_MASKMAN_FLECHETTE),
CLAW("ammo_4gauge_claw"),
VAMPIRE("ammo_4gauge_vampire"),
VOID("ammo_4gauge_void"),
QUACK("ammo_4gauge_titan", AmmoItemTrait.PRO_MARAUDER, AmmoItemTrait.NEU_NO_CON);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo4Gauge(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo4Gauge(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo45ACP implements IAmmoItemEnum {
STOCK("ammo_45"),
AP("ammo_45_ap", HbmCollection.APType),
DU("ammo_45_du", HbmCollection.DUType);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo45ACP(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo45ACP(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo44Magnum implements IAmmoItemEnum {
STOCK("ammo_44"),
AP("ammo_44_ap", HbmCollection.APType),
DU("ammo_44_du", HbmCollection.DUType),
PHOSPHORUS("ammo_44_phosphorus", HbmCollection.PhosphorusType),
STAR("ammo_44_star", HbmCollection.StarmetalType),
CHLOROPHYTE("ammo_44_chlorophyte", HbmCollection.ChlorophyteType),
PIP("ammo_44_pip", AmmoItemTrait.NEU_BOXCAR, AmmoItemTrait.CON_DAMAGE),
BJ("ammo_44_bj", AmmoItemTrait.NEU_BOAT, AmmoItemTrait.CON_DAMAGE),
SILVER("ammo_44_silver", AmmoItemTrait.NEU_BUILDING, AmmoItemTrait.CON_DAMAGE),
ROCKET("ammo_44_rocket", AmmoItemTrait.PRO_ROCKET, AmmoItemTrait.NEU_UHH);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo44Magnum(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo44Magnum(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo357Magnum implements IAmmoItemEnum {
IRON("gun_revolver_iron_ammo"),
LEAD("gun_revolver_ammo"),
NUCLEAR("gun_revolver_lead_ammo"),
GOLD("gun_revolver_gold_ammo"),
DESH("ammo_357_desh", AmmoItemTrait.PRO_FIT_357, AmmoItemTrait.PRO_DAMAGE_SLIGHT),
SCHRABIDIUM("gun_revolver_schrabidium_ammo"),
STEEL("gun_revolver_cursed_ammo"),
NIGHTMARE1("gun_revolver_nightmare_ammo"),
NIGHTMARE2("gun_revolver_nightmare2_ammo");
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo357Magnum(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo22LR implements IAmmoItemEnum {
STOCK("ammo_22lr"),
AP("ammo_22lr_ap", HbmCollection.APType),
CHLOROPHYTE("ammo_22lr_chlorophyte", HbmCollection.ChlorophyteType);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo22LR(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo22LR(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo20Gauge implements IAmmoItemEnum {
STOCK("ammo_20gauge"),
SLUG("ammo_20gauge_slug", AmmoItemTrait.PRO_ACCURATE2, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WEAR, AmmoItemTrait.CON_SING_PROJECTILE),
FLECHETTE("ammo_20gauge_flechette", HbmCollection.FlechetteType),
INCENDIARY("ammo_20gauge_incendiary", AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR),
SHRAPNEL("ammo_20gauge_shrapnel", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_MORE_BOUNCY, AmmoItemTrait.CON_WEAR),
EXPLOSIVE("ammo_20gauge_explosive", HbmCollection.ExplosiveType),
CAUSTIC("ammo_20gauge_caustic", AmmoItemTrait.PRO_TOXIC, AmmoItemTrait.PRO_CAUSTIC, AmmoItemTrait.NEU_NO_BOUNCE, AmmoItemTrait.CON_HEAVY_WEAR),
SHOCK("ammo_20gauge_shock", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_STUNNING, AmmoItemTrait.PRO_EMP, AmmoItemTrait.NEU_NO_BOUNCE, AmmoItemTrait.CON_HEAVY_WEAR),
WITHER("ammo_20gauge_wither", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WITHERING),
SLEEK("ammo_20gauge_sleek", AmmoItemTrait.NEU_MASKMAN_FLECHETTE);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo20Gauge(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
private Ammo20Gauge(String unloc, Set<AmmoItemTrait> traits) {
this.traits = traits;
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public enum Ammo12Gauge implements IAmmoItemEnum {
STOCK("ammo_12gauge"),
INCENDIARY("ammo_12gauge_incendiary", AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR),
SHRAPNEL("ammo_12gauge_shrapnel", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_MORE_BOUNCY, AmmoItemTrait.CON_WEAR),
DU("ammo_12gauge_du", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.NEU_HEAVY_METAL, AmmoItemTrait.CON_HEAVY_WEAR),
MARAUDER("ammo_12gauge_marauder", AmmoItemTrait.PRO_MARAUDER, AmmoItemTrait.NEU_NO_CON),
SLEEK("ammo_12gauge_sleek", AmmoItemTrait.NEU_MASKMAN_FLECHETTE),
PERCUSSION("ammo_12gauge_percussion", AmmoItemTrait.PRO_PERCUSSION, AmmoItemTrait.CON_NO_PROJECTILE);
private final Set<AmmoItemTrait> traits;
private final String unloc;
private Ammo12Gauge(String unloc, AmmoItemTrait... traits) {
this.traits = safeAssign(traits);
this.unloc = unloc;
}
@Override
public Set<AmmoItemTrait> getTraits() {
return traits;
}
@Override
public String getInternalName() {
return unloc;
}
}
public interface IAmmoItemEnum {
public Set<AmmoItemTrait> getTraits();
public String getInternalName();
}
static Set<AmmoItemTrait> safeAssign(AmmoItemTrait[] traits) {
return traits == null ? ImmutableSet.of() : ImmutableSet.copyOf(traits);
}
}

View File

@ -3,9 +3,8 @@ package com.hbm.items;
import java.util.List;
import java.util.Random;
import com.hbm.config.GeneralConfig;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.util.ArmorUtil;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.relauncher.Side;
@ -74,30 +73,32 @@ public class ItemCustomLore extends Item {
static int setSize = 0;
@Override
public EnumRarity getRarity(ItemStack p_77613_1_) {
return this.rarity != null ? rarity : super.getRarity(p_77613_1_);
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return this.rarity != null ? rarity : super.getRarity(stack);
}
@Override
@Override
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack p_77636_1_)
{
if(this == ModItems.rune_isa ||
this == ModItems.rune_dagaz ||
this == ModItems.rune_hagalaz ||
this == ModItems.rune_jera ||
this == ModItems.rune_thurisaz ||
this == ModItems.egg_balefire_shard ||
this == ModItems.egg_balefire) {
return true;
}
return false;
}
public ItemCustomLore setRarity(EnumRarity rarity) {
this.rarity = rarity;
public boolean hasEffect(ItemStack p_77636_1_) {
if(this == ModItems.rune_isa || this == ModItems.rune_dagaz ||
this == ModItems.rune_hagalaz || this == ModItems.rune_jera ||
this == ModItems.rune_thurisaz || this == ModItems.egg_balefire_shard ||
this == ModItems.egg_balefire) {
return true;
}
return false;
}
public ItemCustomLore setRarity(EnumRarity rarity) {
this.rarity = rarity;
return this;
}
}
@Override
public Item setUnlocalizedName(String uloc) {
setTextureName(RefStrings.MODID + ':' + uloc);
return super.setUnlocalizedName(uloc);
}
}

View File

@ -71,9 +71,7 @@ public class ItemEnumMulti extends Item {
}
}
/*
* Returns null when the wrong enum is passed. Only really used for recipes anyway so it's good.
*/
/** Returns null when the wrong enum is passed. Only really used for recipes anyway so it's good. */
public ItemStack stackFromEnum(int count, Enum num) {
if(num.getClass() != this.theEnum)

View File

@ -0,0 +1,41 @@
package com.hbm.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class ItemRemap extends Item {
Item remapItem;
int remapMeta;
public ItemRemap(Item item, int meta) {
this.remapItem = item;
this.remapMeta = meta;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return this.remapItem.getIconFromDamage(this.remapMeta);
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean held) {
if(!(entity instanceof EntityPlayer)) return;
EntityPlayer player = (EntityPlayer) entity;
player.inventory.setInventorySlotContents(slot, new ItemStack(this.remapItem, stack.stackSize, this.remapMeta));
}
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass) {
return 0xFF8080;
}
}

View File

@ -9,6 +9,7 @@ import com.hbm.handler.WeaponAbility;
import com.hbm.handler.guncfg.*;
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ItemAmmoEnums.*;
import com.hbm.items.ItemEnums.*;
import com.hbm.items.armor.*;
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
@ -186,6 +187,13 @@ public class ModItems {
public static Item ingot_mercury; //It's to prevent any ambiguity, as it was treated as a full ingot in the past anyway
public static Item bottle_mercury;
public static Item ore_bedrock;
public static Item ore_centrifuged;
public static Item ore_cleaned;
public static Item ore_separated;
public static Item ore_purified;
public static Item ore_enriched;
public static Item billet_uranium;
public static Item billet_u233;
public static Item billet_u235;
@ -595,11 +603,14 @@ public class ModItems {
public static Item assembly_nopip;
public static Item assembly_smg;
public static Item assembly_556;
public static Item assembly_762;
public static Item assembly_45;
public static Item assembly_uzi;
public static Item assembly_actionexpress;
public static Item assembly_calamity;
public static Item assembly_lacunae;
public static Item assembly_nuke;
public static Item assembly_luna;
public static Item folly_shell;
public static Item folly_bullet;
@ -857,6 +868,7 @@ public class ModItems {
public static Item particle_lutece;
public static Item pellet_antimatter;
public static Item singularity_micro;
public static Item singularity;
public static Item singularity_counter_resonant;
public static Item singularity_super_heated;
@ -1454,8 +1466,35 @@ public class ModItems {
public static Item sat_interface;
public static Item sat_coord;
public static Item sat_designator;
public static ItemEnumMulti ammo_misc;
public static ItemEnumMulti ammo_12gauge;
public static ItemEnumMulti ammo_20gauge;
public static ItemEnumMulti ammo_4gauge;
public static ItemEnumMulti ammo_357;
public static ItemEnumMulti ammo_44;
public static ItemEnumMulti ammo_5mm;
public static ItemEnumMulti ammo_9mm;
public static ItemEnumMulti ammo_45;
public static ItemEnumMulti ammo_556;
public static ItemEnumMulti ammo_762;
public static ItemEnumMulti ammo_22lr;
public static ItemEnumMulti ammo_50ae;
public static ItemEnumMulti ammo_50bmg;
public static ItemEnumMulti ammo_75bolt;
public static ItemEnumMulti ammo_rocket;
public static ItemEnumMulti ammo_grenade;
public static ItemEnumMulti ammo_shell;
public static ItemEnumMulti ammo_nuke;
public static ItemEnumMulti ammo_fuel;
public static ItemEnumMulti ammo_fireext;
public static ItemEnumMulti ammo_dart;
public static ItemEnumMulti ammo_stinger_rocket;
public static ItemEnumMulti ammo_luna_sniper;
public static Item ammo_12gauge;
public static Item ammo_cell;
/*public static Item ammo_12gauge;
public static Item ammo_12gauge_incendiary;
public static Item ammo_12gauge_shrapnel;
public static Item ammo_12gauge_du;
@ -1544,11 +1583,11 @@ public class ModItems {
public static Item ammo_50bmg_sleek;
public static Item ammo_75bolt;
public static Item ammo_75bolt_incendiary;
public static Item ammo_75bolt_he;
public static Item ammo_75bolt_he;*/
public static Item ammo_folly;
public static Item ammo_folly_nuclear;
public static Item ammo_folly_du;
public static Item ammo_rocket;
/*public static Item ammo_rocket;
public static Item ammo_rocket_he;
public static Item ammo_rocket_incendiary;
public static Item ammo_rocket_phosphorus;
@ -1576,11 +1615,11 @@ public class ModItems {
public static Item ammo_shell_explosive;
public static Item ammo_shell_apfsds_t;
public static Item ammo_shell_apfsds_du;
public static Item ammo_shell_w9;
public static Item ammo_shell_w9;*/
public static Item ammo_dgk;
public static Item ammo_arty;
public static Item ammo_himars;
public static Item ammo_nuke;
/*public static Item ammo_nuke;
public static Item ammo_nuke_low;
public static Item ammo_nuke_high;
public static Item ammo_nuke_tots;
@ -1608,7 +1647,7 @@ public class ModItems {
public static Item ammo_stinger_rocket_he;
public static Item ammo_stinger_rocket_incendiary;
public static Item ammo_stinger_rocket_nuclear;
public static Item ammo_stinger_rocket_bones;
public static Item ammo_stinger_rocket_bones;*/
public static Item gun_rpg;
//public static Item gun_rpg_ammo;
@ -1621,21 +1660,21 @@ public class ModItems {
//public static Item gun_stinger_ammo;
public static Item gun_revolver;
public static Item gun_revolver_saturnite;
public static Item gun_revolver_ammo;
//public static Item gun_revolver_ammo;
public static Item gun_revolver_iron;
public static Item gun_revolver_iron_ammo;
//public static Item gun_revolver_iron_ammo;
public static Item gun_revolver_gold;
public static Item gun_revolver_gold_ammo;
//public static Item gun_revolver_gold_ammo;
public static Item gun_revolver_lead;
public static Item gun_revolver_lead_ammo;
//public static Item gun_revolver_lead_ammo;
public static Item gun_revolver_schrabidium;
public static Item gun_revolver_schrabidium_ammo;
//public static Item gun_revolver_schrabidium_ammo;
public static Item gun_revolver_cursed;
public static Item gun_revolver_cursed_ammo;
//public static Item gun_revolver_cursed_ammo;
public static Item gun_revolver_nightmare;
public static Item gun_revolver_nightmare_ammo;
//public static Item gun_revolver_nightmare_ammo;
public static Item gun_revolver_nightmare2;
public static Item gun_revolver_nightmare2_ammo;
//public static Item gun_revolver_nightmare2_ammo;
public static Item gun_revolver_pip;
//public static Item gun_revolver_pip_ammo;
public static Item gun_revolver_nopip;
@ -1703,7 +1742,6 @@ public class ModItems {
public static Item gun_mp;
public static Item gun_bolter;
public static Item gun_bolter_digamma;
public static Item gun_brimstone;
public static Item gun_zomg;
public static Item gun_super_shotgun;
public static Item gun_moist_nugget;
@ -1731,6 +1769,11 @@ public class ModItems {
public static Item gun_detonator;
public static Item gun_glass_cannon;
// We'll figure this part out later
//public static Item gun_llr, gun_mlr, gun_hlr, gun_twr, gun_lunatic, gun_lunatic_shotty, gun_lunatic_marksman;
//public static Item gun_uac_pistol, gun_uac_dmr, gun_uac_carbine, gun_uac_lmg;
//public static Item gun_m2, gun_benelli, gun_benelli_mod, gun_g36, spear_bishamonten, pagoda;
public static Item crucible;
public static Item stick_dynamite;
@ -1811,6 +1854,7 @@ public class ModItems {
public static Item peas;
public static Item marshmallow;
public static Item cheese;
public static Item quesadilla;
public static Item med_ipecac;
public static Item med_ptsd;
@ -2789,6 +2833,13 @@ public class ModItems {
ingot_mercury = new ItemCustomLore().setUnlocalizedName("nugget_mercury").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_mercury");
bottle_mercury = new ItemCustomLore().setUnlocalizedName("bottle_mercury").setContainerItem(Items.glass_bottle).setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bottle_mercury");
ore_bedrock = new ItemBedrockOre().setUnlocalizedName("ore_bedrock").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_bedrock");
ore_centrifuged = new ItemBedrockOre().setUnlocalizedName("ore_centrifuged").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_centrifuged");
ore_cleaned = new ItemBedrockOre().setUnlocalizedName("ore_cleaned").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_cleaned");
ore_separated = new ItemBedrockOre().setUnlocalizedName("ore_separated").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_separated");
ore_purified = new ItemBedrockOre().setUnlocalizedName("ore_purified").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_purified");
ore_enriched = new ItemBedrockOre().setUnlocalizedName("ore_enriched").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ore_enriched");
ingot_lanthanium = new ItemCustomLore().setUnlocalizedName("ingot_lanthanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_lanthanium");
ingot_actinium = new ItemCustomLore().setUnlocalizedName("ingot_actinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_actinium");
@ -3206,11 +3257,14 @@ public class ModItems {
assembly_nopip = new Item().setUnlocalizedName("assembly_nopip").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nopip");
assembly_smg = new Item().setUnlocalizedName("assembly_smg").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_smg");
assembly_556 = new Item().setUnlocalizedName("assembly_556").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_556");
assembly_762 = new Item().setUnlocalizedName("assembly_762").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_762");
assembly_45 = new Item().setUnlocalizedName("assembly_45").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_45");
assembly_uzi = new Item().setUnlocalizedName("assembly_uzi").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_uzi");
assembly_actionexpress = new Item().setUnlocalizedName("assembly_actionexpress").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_actionexpress");
assembly_calamity = new Item().setUnlocalizedName("assembly_calamity").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_calamity");
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");
@ -3294,6 +3348,7 @@ public class ModItems {
particle_sparkticle = new Item().setUnlocalizedName("particle_sparkticle").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_sparkticle");
particle_digamma = new ItemDigamma(60).setUnlocalizedName("particle_digamma").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_digamma");
particle_lutece = new Item().setUnlocalizedName("particle_lutece").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_lutece");
singularity_micro = new ItemDrop().setUnlocalizedName("singularity_micro").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.nuclear_waste).setTextureName(RefStrings.MODID + ":singularity_micro");
singularity = new ItemDrop().setUnlocalizedName("singularity").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.nuclear_waste).setTextureName(RefStrings.MODID + ":singularity");
singularity_counter_resonant = new ItemDrop().setUnlocalizedName("singularity_counter_resonant").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.nuclear_waste).setTextureName(RefStrings.MODID + ":singularity_alt");
@ -3415,7 +3470,7 @@ public class ModItems {
iv_xp_empty = new ItemSimpleConsumable().setUseActionServer((stack, user) -> {
if(user.experienceTotal >= 100) {
ItemSimpleConsumable.giveSoundAndDecrement(stack, user, "hbm:item.syringe", new ItemStack(ModItems.iv_xp));
EnchantmentUtil.setExperience(user, user.experienceTotal - 100);
EnchantmentUtil.setExperience(user, EnchantmentUtil.getTotalExperience(user) - 100);
}
}).setUnlocalizedName("iv_xp_empty").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":iv_xp_empty");
@ -4207,7 +4262,34 @@ public class ModItems {
missile_skin_soviet_stank = new ItemCustomLore().setUnlocalizedName("missile_skin_soviet_stank").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_soviet_stank");
missile_skin_metal = new ItemCustomLore().setUnlocalizedName("missile_skin_metal").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_metal");
ammo_12gauge = new ItemAmmo().setUnlocalizedName("ammo_12gauge");
ammo_12gauge = new ItemAmmo(Ammo12Gauge.class).setUnlocalizedName("ammo_12gauge");
ammo_20gauge = new ItemAmmo(Ammo20Gauge.class).setUnlocalizedName("ammo_20gauge");
ammo_4gauge = new ItemAmmo(Ammo4Gauge.class).setUnlocalizedName("ammo_4gauge");
ammo_5mm = new ItemAmmo(Ammo5mm.class).setUnlocalizedName("ammo_5mm");
ammo_9mm = new ItemAmmo(Ammo9mm.class).setUnlocalizedName("ammo_9mm");
ammo_45 = new ItemAmmo(Ammo45ACP.class).setUnlocalizedName("ammo_45");
ammo_556 = new ItemAmmo(Ammo556mm.class).setUnlocalizedName("ammo_556");
ammo_762 = new ItemAmmo(Ammo762NATO.class).setUnlocalizedName("ammo_762");
ammo_50ae = new ItemAmmo(Ammo50AE.class).setUnlocalizedName("ammo_50ae");
ammo_50bmg = new ItemAmmo(Ammo50BMG.class).setUnlocalizedName("ammo_50bmg");
ammo_75bolt = new ItemAmmo(Ammo75Bolt.class).setUnlocalizedName("ammo_75bolt");
ammo_357 = new ItemAmmo(Ammo357Magnum.class).setUnlocalizedName("ammo_357");
ammo_44 = new ItemAmmo(Ammo44Magnum.class).setUnlocalizedName("ammo_44");
ammo_22lr = new ItemAmmo(Ammo22LR.class).setUnlocalizedName("ammo_22lr");
ammo_rocket = new ItemAmmo(AmmoRocket.class).setUnlocalizedName("ammo_rocket");
ammo_grenade = new ItemAmmo(AmmoGrenade.class).setUnlocalizedName("ammo_grenade");
ammo_shell = new ItemAmmo(Ammo240Shell.class).setUnlocalizedName("ammo_shell");
ammo_dgk = new ItemCustomLore().setUnlocalizedName("ammo_dgk").setCreativeTab(MainRegistry.weaponTab);
ammo_nuke = new ItemAmmo(AmmoFatman.class).setUnlocalizedName("ammo_nuke");
ammo_fuel = new ItemAmmo(AmmoFlamethrower.class).setUnlocalizedName("ammo_fuel");
ammo_fireext = new ItemAmmo(AmmoFireExt.class).setUnlocalizedName("ammo_fireext");
ammo_cell = new ItemCustomLore().setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_cell").setMaxStackSize(16);
ammo_dart = (ItemEnumMulti) new ItemAmmo(AmmoDart.class).setUnlocalizedName("ammo_dart").setMaxStackSize(16);
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_12gauge = new ItemAmmo().setUnlocalizedName("ammo_12gauge");
ammo_12gauge_incendiary = new ItemAmmo().setUnlocalizedName("ammo_12gauge_incendiary");
ammo_12gauge_shrapnel = new ItemAmmo().setUnlocalizedName("ammo_12gauge_shrapnel");
ammo_12gauge_du = new ItemAmmo().setUnlocalizedName("ammo_12gauge_du");
@ -4327,11 +4409,14 @@ public class ModItems {
ammo_shell_explosive = new ItemAmmo().setUnlocalizedName("ammo_shell_explosive");
ammo_shell_apfsds_t = new ItemAmmo().setUnlocalizedName("ammo_shell_apfsds_t");
ammo_shell_apfsds_du = new ItemAmmo().setUnlocalizedName("ammo_shell_apfsds_du");
ammo_shell_w9 = new ItemAmmo().setUnlocalizedName("ammo_shell_w9");
ammo_dgk = new ItemAmmo().setUnlocalizedName("ammo_dgk");
ammo_shell_w9 = new ItemAmmo().setUnlocalizedName("ammo_shell_w9");*/
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_dgk = new ItemCustomLore().setUnlocalizedName("ammo_dgk");
ammo_arty = new ItemAmmoArty().setUnlocalizedName("ammo_arty");
ammo_himars = new ItemAmmoHIMARS().setUnlocalizedName("ammo_himars");
ammo_nuke = new ItemAmmo().setUnlocalizedName("ammo_nuke");
/*ammo_nuke = new ItemAmmo().setUnlocalizedName("ammo_nuke");
ammo_nuke_low = new ItemAmmo().setUnlocalizedName("ammo_nuke_low");
ammo_nuke_high = new ItemAmmo().setUnlocalizedName("ammo_nuke_high");
ammo_nuke_tots = new ItemAmmo().setUnlocalizedName("ammo_nuke_tots");
@ -4359,7 +4444,7 @@ public class ModItems {
ammo_stinger_rocket_he = new ItemAmmo().setUnlocalizedName("ammo_stinger_rocket_he");
ammo_stinger_rocket_incendiary = new ItemAmmo().setUnlocalizedName("ammo_stinger_rocket_incendiary");
ammo_stinger_rocket_nuclear = new ItemAmmo().setUnlocalizedName("ammo_stinger_rocket_nuclear");
ammo_stinger_rocket_bones = new ItemAmmo().setUnlocalizedName("ammo_stinger_rocket_bones");
ammo_stinger_rocket_bones = new ItemAmmo().setUnlocalizedName("ammo_stinger_rocket_bones");*/
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");
@ -4370,22 +4455,22 @@ public class ModItems {
gun_stinger = new ItemGunBase(GunRocketHomingFactory.getStingerConfig()).setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
gun_skystinger = new ItemGunBase(GunRocketHomingFactory.getSkyStingerConfig()).setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
//gun_stinger_ammo = new Item().setUnlocalizedName("gun_stinger_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_stinger_ammo");
gun_revolver_ammo = new Item().setUnlocalizedName("gun_revolver_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_ammo");
//gun_revolver_ammo = new Item().setUnlocalizedName("gun_revolver_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_ammo");
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_iron_ammo = new Item().setUnlocalizedName("gun_revolver_iron_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_iron_ammo");
//gun_revolver_iron_ammo = new Item().setUnlocalizedName("gun_revolver_iron_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_iron_ammo");
gun_revolver_iron = new ItemGunBase(Gun357MagnumFactory.getRevolverIronConfig()).setUnlocalizedName("gun_revolver_iron").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_iron");
gun_revolver_gold_ammo = new Item().setUnlocalizedName("gun_revolver_gold_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_gold_ammo");
//gun_revolver_gold_ammo = new Item().setUnlocalizedName("gun_revolver_gold_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_gold_ammo");
gun_revolver_gold = new ItemGunBase(Gun357MagnumFactory.getRevolverGoldConfig()).setUnlocalizedName("gun_revolver_gold").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_gold");
gun_revolver_lead_ammo = new Item().setUnlocalizedName("gun_revolver_lead_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_lead_ammo");
//gun_revolver_lead_ammo = new Item().setUnlocalizedName("gun_revolver_lead_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_lead_ammo");
gun_revolver_lead = new ItemGunBase(Gun357MagnumFactory.getRevolverLeadConfig()).setUnlocalizedName("gun_revolver_lead").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_lead");
gun_revolver_schrabidium_ammo = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("gun_revolver_schrabidium_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_schrabidium_ammo");
//gun_revolver_schrabidium_ammo = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("gun_revolver_schrabidium_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_schrabidium_ammo");
gun_revolver_schrabidium = new ItemGunBase(Gun357MagnumFactory.getRevolverSchrabidiumConfig()).setUnlocalizedName("gun_revolver_schrabidium").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_schrabidium");
gun_revolver_cursed_ammo = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("gun_revolver_cursed_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed_ammo");
//gun_revolver_cursed_ammo = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("gun_revolver_cursed_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed_ammo");
gun_revolver_cursed = new ItemGunBase(Gun357MagnumFactory.getRevolverCursedConfig()).setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed");
gun_revolver_nightmare_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare_ammo");
//gun_revolver_nightmare_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare_ammo");
gun_revolver_nightmare = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmareConfig()).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
gun_revolver_nightmare2_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare2_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2_ammo");
//gun_revolver_nightmare2_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare2_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2_ammo");
gun_revolver_nightmare2 = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmare2Config()).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
//gun_revolver_pip_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_pip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_pip_ammo");
gun_revolver_pip = new ItemGunBase(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
@ -4395,7 +4480,7 @@ public class ModItems {
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_bio_revolver = new ItemGunBio(Gun45ACPFactory.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()).setUnlocalizedName("gun_ar15").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_ar15");
//gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
@ -4416,7 +4501,7 @@ public class ModItems {
gun_chemthrower = new ItemGunChemthrower().setUnlocalizedName("gun_chemthrower").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
//gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mp40_ammo");
gun_mp40 = new ItemGunBase(Gun9mmFactory.getMP40Config()).setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
gun_thompson = new ItemGunBase(Gun9mmFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
gun_thompson = new ItemGunBase(Gun45ACPFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
//gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_ammo");
gun_uzi = new ItemGunBase(Gun22LRFactory.getUziConfig()).setUnlocalizedName("gun_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi");
gun_uzi_silencer = new ItemGunBase(Gun22LRFactory.getUziConfig().silenced()).setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
@ -4451,11 +4536,10 @@ public class ModItems {
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_fireext = new ItemGunBase(GunEnergyFactory.getExtConfig()).setUnlocalizedName("gun_fireext").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fireext");
ammo_566_gold = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
//ammo_566_gold = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
gun_mp = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
gun_bolter = new ItemGunBase(Gun75BoltFactory.getBolterConfig()).setUnlocalizedName("gun_bolter").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolter");
gun_bolter_digamma = new ItemGunBase(Gun75BoltFactory.getBolterConfig()).setUnlocalizedName("gun_bolter_digamma").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolter_digamma");
gun_brimstone = new GunBrimstone().setUnlocalizedName("gun_brimstone").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_brimstone");
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_emp_ammo = new Item().setUnlocalizedName("gun_emp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp_ammo");
@ -4568,6 +4652,7 @@ public class ModItems {
peas = new ItemPeas().setUnlocalizedName("peas").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":peas");
marshmallow = new ItemMarshmallow().setUnlocalizedName("marshmallow").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":marshmallow");
cheese = new ItemLemon(5, 10, false).setUnlocalizedName("cheese").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cheese");
quesadilla = new ItemLemon(8, 10, false).setUnlocalizedName("cheese_quesadilla").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":quesadilla");
mucho_mango = new ItemMuchoMango(10).setUnlocalizedName("mucho_mango").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":mucho_mango");
defuser = new ItemTooling(ToolType.DEFUSER, 100).setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser");
@ -4775,39 +4860,39 @@ public class ModItems {
loot_15 = new ItemLootCrate().setUnlocalizedName("loot_15").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":loot_15");
loot_misc = new ItemLootCrate().setUnlocalizedName("loot_misc").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":loot_misc");
clip_revolver_iron = new ItemClip().setUnlocalizedName("clip_revolver_iron").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_iron");
clip_revolver = new ItemClip().setUnlocalizedName("clip_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver");
clip_revolver_gold = new ItemClip().setUnlocalizedName("clip_revolver_gold").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_gold");
clip_revolver_lead = new ItemClip().setUnlocalizedName("clip_revolver_lead").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_lead");
clip_revolver_schrabidium = new ItemClip().setUnlocalizedName("clip_revolver_schrabidium").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_schrabidium");
clip_revolver_cursed = new ItemClip().setUnlocalizedName("clip_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_cursed");
clip_revolver_nightmare = new ItemClip().setUnlocalizedName("clip_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_nightmare");
clip_revolver_nightmare2 = new ItemClip().setUnlocalizedName("clip_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_nightmare2");
clip_revolver_pip = new ItemClip().setUnlocalizedName("clip_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_pip");
clip_revolver_nopip = new ItemClip().setUnlocalizedName("clip_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_nopip");
clip_rpg = new ItemClip().setUnlocalizedName("clip_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_rpg_alt");
clip_stinger = new ItemClip().setUnlocalizedName("clip_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_stinger");
clip_fatman = new ItemClip().setUnlocalizedName("clip_fatman").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_fatman");
clip_mirv = new ItemClip().setUnlocalizedName("clip_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mirv");
clip_bf = new ItemClip().setUnlocalizedName("clip_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":clip_bf");
clip_mp40 = new ItemClip().setUnlocalizedName("clip_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mp40");
clip_uzi = new ItemClip().setUnlocalizedName("clip_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_uzi");
clip_uboinik = new ItemClip().setUnlocalizedName("clip_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_uboinik");
clip_lever_action = new ItemClip().setUnlocalizedName("clip_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_lever_action");
clip_bolt_action = new ItemClip().setUnlocalizedName("clip_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_bolt_action");
clip_osipr = new ItemClip().setUnlocalizedName("clip_osipr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_osipr");
clip_immolator = new ItemClip().setUnlocalizedName("clip_immolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_immolator");
clip_cryolator = new ItemClip().setUnlocalizedName("clip_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_cryolator");
clip_mp = new ItemClip().setUnlocalizedName("clip_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mp");
clip_xvl1456 = new ItemClip().setUnlocalizedName("clip_xvl1456").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_xvl1456");
clip_emp = new ItemClip().setUnlocalizedName("clip_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_emp");
clip_jack = new ItemClip().setUnlocalizedName("clip_jack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_jack");
clip_spark = new ItemClip().setUnlocalizedName("clip_spark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_spark");
clip_hp = new ItemClip().setUnlocalizedName("clip_hp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_hp");
clip_euthanasia = new ItemClip().setUnlocalizedName("clip_euthanasia").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_euthanasia");
clip_defabricator = new ItemClip().setUnlocalizedName("clip_defabricator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_defabricator");
clip_revolver_iron = new ItemClip(ammo_357.stackFromEnum(20, Ammo357Magnum.IRON)).setUnlocalizedName("clip_revolver_iron").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_iron");
clip_revolver = new ItemClip(ammo_357.stackFromEnum(12, Ammo357Magnum.LEAD)).setUnlocalizedName("clip_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver");
clip_revolver_gold = new ItemClip(ammo_357.stackFromEnum(6, Ammo357Magnum.GOLD)).setUnlocalizedName("clip_revolver_gold").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_gold");
clip_revolver_lead = new ItemClip(ammo_357.stackFromEnum(6, Ammo357Magnum.NUCLEAR)).setUnlocalizedName("clip_revolver_lead").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_lead");
clip_revolver_schrabidium = new ItemClip(ammo_357.stackFromEnum(2, Ammo357Magnum.SCHRABIDIUM)).setUnlocalizedName("clip_revolver_schrabidium").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_schrabidium");
clip_revolver_cursed = new ItemClip(ammo_357.stackFromEnum(17, Ammo357Magnum.STEEL)).setUnlocalizedName("clip_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_cursed");
clip_revolver_nightmare = new ItemClip(ammo_357.stackFromEnum(6, Ammo357Magnum.NIGHTMARE1)).setUnlocalizedName("clip_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_nightmare");
clip_revolver_nightmare2 = new ItemClip(ammo_357.stackFromEnum(6, Ammo357Magnum.NIGHTMARE2)).setUnlocalizedName("clip_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_nightmare2");
clip_revolver_pip = new ItemClip(ammo_44.stackFromEnum(6, Ammo44Magnum.PIP)).setUnlocalizedName("clip_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_pip");
clip_revolver_nopip = new ItemClip(ammo_44.stackFromEnum(6, Ammo44Magnum.STOCK)).setUnlocalizedName("clip_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_revolver_nopip");
clip_rpg = new ItemClip(ammo_rocket.stackFromEnum(4, AmmoRocket.STOCK)).setUnlocalizedName("clip_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_rpg_alt");
clip_stinger = new ItemClip(ammo_stinger_rocket.stackFromEnum(4, AmmoStinger.STOCK)).setUnlocalizedName("clip_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_stinger");
clip_fatman = new ItemClip(ammo_nuke.stackFromEnum(6, AmmoFatman.STOCK)).setUnlocalizedName("clip_fatman").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_fatman");
clip_mirv = new ItemClip(ammo_nuke.stackFromEnum(3, AmmoFatman.MIRV)).setUnlocalizedName("clip_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mirv");
clip_bf = new ItemClip(ammo_nuke.stackFromEnum(2, AmmoFatman.BALEFIRE)).setUnlocalizedName("clip_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":clip_bf");
clip_mp40 = new ItemClip(ammo_9mm.stackFromEnum(32, Ammo9mm.STOCK)).setUnlocalizedName("clip_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mp40");
clip_uzi = new ItemClip(ammo_22lr.stackFromEnum(32, Ammo22LR.STOCK)).setUnlocalizedName("clip_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_uzi");
clip_uboinik = new ItemClip(ammo_12gauge.stackFromEnum(12, Ammo12Gauge.STOCK)).setUnlocalizedName("clip_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_uboinik");
clip_lever_action = new ItemClip(ammo_20gauge.stackFromEnum(12, Ammo20Gauge.STOCK)).setUnlocalizedName("clip_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_lever_action");
clip_bolt_action = new ItemClip(ammo_20gauge.stackFromEnum(12, Ammo20Gauge.SLUG)).setUnlocalizedName("clip_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_bolt_action");
clip_osipr = new ItemClip(new ItemStack(gun_osipr_ammo, 3)).setUnlocalizedName("clip_osipr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_osipr");
clip_immolator = new ItemClip(new ItemStack(gun_immolator_ammo, 60)).setUnlocalizedName("clip_immolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_immolator");
clip_cryolator = new ItemClip(new ItemStack(gun_cryolator_ammo, 60)).setUnlocalizedName("clip_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_cryolator");
clip_mp = new ItemClip(ammo_556.stackFromEnum(2, Ammo556mm.GOLD)).setUnlocalizedName("clip_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_mp");
clip_xvl1456 = new ItemClip(new ItemStack(gun_xvl1456_ammo, 50)).setUnlocalizedName("clip_xvl1456").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_xvl1456");
clip_emp = new ItemClip(new ItemStack(gun_emp_ammo, 12)).setUnlocalizedName("clip_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_emp");
clip_jack = new ItemClip(new ItemStack(gun_jack_ammo, 12)).setUnlocalizedName("clip_jack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_jack");
clip_spark = new ItemClip(new ItemStack(gun_spark_ammo, 12)).setUnlocalizedName("clip_spark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_spark");
clip_hp = new ItemClip(new ItemStack(gun_hp_ammo, 24)).setUnlocalizedName("clip_hp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_hp");
clip_euthanasia = new ItemClip(new ItemStack(gun_euthanasia_ammo, 32)).setUnlocalizedName("clip_euthanasia").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_euthanasia");
clip_defabricator = new ItemClip(new ItemStack(gun_defabricator_ammo, 50)).setUnlocalizedName("clip_defabricator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":clip_defabricator");
ammo_container = new ItemClip().setUnlocalizedName("ammo_container").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_container");
ammo_container = new ItemAmmoContainer().setUnlocalizedName("ammo_container").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_container");
ingot_euphemium = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("ingot_euphemium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_euphemium");
nugget_euphemium = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("nugget_euphemium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_euphemium");
@ -6045,6 +6130,14 @@ public class ModItems {
GameRegistry.registerItem(ball_tnt, ball_tnt.getUnlocalizedName());
GameRegistry.registerItem(ball_fireclay, ball_fireclay.getUnlocalizedName());
//Ores
GameRegistry.registerItem(ore_bedrock, ore_bedrock.getUnlocalizedName());
GameRegistry.registerItem(ore_centrifuged, ore_centrifuged.getUnlocalizedName());
GameRegistry.registerItem(ore_cleaned, ore_cleaned.getUnlocalizedName());
GameRegistry.registerItem(ore_separated, ore_separated.getUnlocalizedName());
GameRegistry.registerItem(ore_purified, ore_purified.getUnlocalizedName());
GameRegistry.registerItem(ore_enriched, ore_enriched.getUnlocalizedName());
//Crystals
GameRegistry.registerItem(crystal_coal, crystal_coal.getUnlocalizedName());
GameRegistry.registerItem(crystal_iron, crystal_iron.getUnlocalizedName());
@ -6392,11 +6485,14 @@ public class ModItems {
GameRegistry.registerItem(assembly_nopip, assembly_nopip.getUnlocalizedName());
GameRegistry.registerItem(assembly_smg, assembly_smg.getUnlocalizedName());
GameRegistry.registerItem(assembly_556, assembly_556.getUnlocalizedName());
GameRegistry.registerItem(assembly_762, assembly_762.getUnlocalizedName());
GameRegistry.registerItem(assembly_45, assembly_45.getUnlocalizedName());
GameRegistry.registerItem(assembly_uzi, assembly_uzi.getUnlocalizedName());
GameRegistry.registerItem(assembly_lacunae, assembly_lacunae.getUnlocalizedName());
GameRegistry.registerItem(assembly_actionexpress, assembly_actionexpress.getUnlocalizedName());
GameRegistry.registerItem(assembly_calamity, assembly_calamity.getUnlocalizedName());
GameRegistry.registerItem(assembly_nuke, assembly_nuke.getUnlocalizedName());
GameRegistry.registerItem(assembly_luna, assembly_luna.getUnlocalizedName());
//Folly Parts
GameRegistry.registerItem(folly_shell, folly_shell.getUnlocalizedName());
@ -6490,7 +6586,8 @@ public class ModItems {
GameRegistry.registerItem(particle_digamma, particle_digamma.getUnlocalizedName());
GameRegistry.registerItem(particle_lutece, particle_lutece.getUnlocalizedName());
//OMG how the hell is that even possible!?
//Singularities, black holes and other cosmic horrors
GameRegistry.registerItem(singularity_micro, singularity_micro.getUnlocalizedName());
GameRegistry.registerItem(singularity, singularity.getUnlocalizedName());
GameRegistry.registerItem(singularity_counter_resonant, singularity_counter_resonant.getUnlocalizedName());
GameRegistry.registerItem(singularity_super_heated, singularity_super_heated.getUnlocalizedName());
@ -7234,7 +7331,6 @@ public class ModItems {
GameRegistry.registerItem(gun_mp, gun_mp.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter_digamma, gun_bolter_digamma.getUnlocalizedName());
GameRegistry.registerItem(gun_brimstone, gun_brimstone.getUnlocalizedName());
GameRegistry.registerItem(gun_zomg, gun_zomg.getUnlocalizedName());
GameRegistry.registerItem(gun_emp, gun_emp.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_inverted, gun_revolver_inverted.getUnlocalizedName());
@ -7256,7 +7352,7 @@ public class ModItems {
GameRegistry.registerItem(gun_glass_cannon, gun_glass_cannon.getUnlocalizedName());
//Ammo
GameRegistry.registerItem(gun_revolver_iron_ammo, gun_revolver_iron_ammo.getUnlocalizedName());
/*GameRegistry.registerItem(gun_revolver_iron_ammo, gun_revolver_iron_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_ammo, gun_revolver_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_gold_ammo, gun_revolver_gold_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_lead_ammo, gun_revolver_lead_ammo.getUnlocalizedName());
@ -7264,7 +7360,7 @@ public class ModItems {
GameRegistry.registerItem(gun_revolver_cursed_ammo, gun_revolver_cursed_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_nightmare_ammo, gun_revolver_nightmare_ammo.getUnlocalizedName());
GameRegistry.registerItem(ammo_357_desh, ammo_357_desh.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_nightmare2_ammo, gun_revolver_nightmare2_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_nightmare2_ammo, gun_revolver_nightmare2_ammo.getUnlocalizedName());*/
//GameRegistry.registerItem(gun_revolver_pip_ammo, gun_revolver_pip_ammo.getUnlocalizedName());
//GameRegistry.registerItem(gun_revolver_nopip_ammo, gun_revolver_nopip_ammo.getUnlocalizedName());
//GameRegistry.registerItem(gun_calamity_ammo, gun_calamity_ammo.getUnlocalizedName());
@ -7293,6 +7389,31 @@ public class ModItems {
GameRegistry.registerItem(gun_euthanasia_ammo, gun_euthanasia_ammo.getUnlocalizedName());
GameRegistry.registerItem(ammo_12gauge, ammo_12gauge.getUnlocalizedName());
GameRegistry.registerItem(ammo_20gauge, ammo_20gauge.getUnlocalizedName());
GameRegistry.registerItem(ammo_4gauge, ammo_4gauge.getUnlocalizedName());
GameRegistry.registerItem(ammo_357, ammo_357.getUnlocalizedName());
GameRegistry.registerItem(ammo_44, ammo_44.getUnlocalizedName());
GameRegistry.registerItem(ammo_45, ammo_45.getUnlocalizedName());
GameRegistry.registerItem(ammo_5mm, ammo_5mm.getUnlocalizedName());
GameRegistry.registerItem(ammo_9mm, ammo_9mm.getUnlocalizedName());
GameRegistry.registerItem(ammo_556, ammo_556.getUnlocalizedName());
GameRegistry.registerItem(ammo_762, ammo_762.getUnlocalizedName());
GameRegistry.registerItem(ammo_22lr, ammo_22lr.getUnlocalizedName());
GameRegistry.registerItem(ammo_50ae, ammo_50ae.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg, ammo_50bmg.getUnlocalizedName());
GameRegistry.registerItem(ammo_75bolt, ammo_75bolt.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke, ammo_nuke.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel, ammo_fuel.getUnlocalizedName());
GameRegistry.registerItem(ammo_fireext, ammo_fireext.getUnlocalizedName());
GameRegistry.registerItem(ammo_cell, ammo_cell.getUnlocalizedName());
GameRegistry.registerItem(ammo_dart, ammo_dart.getUnlocalizedName());
GameRegistry.registerItem(ammo_rocket, ammo_rocket.getUnlocalizedName());
GameRegistry.registerItem(ammo_stinger_rocket, ammo_stinger_rocket.getUnlocalizedName());
GameRegistry.registerItem(ammo_luna_sniper, ammo_luna_sniper.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade, ammo_grenade.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell, ammo_shell.getUnlocalizedName());
/*GameRegistry.registerItem(ammo_12gauge, ammo_12gauge.getUnlocalizedName());
GameRegistry.registerItem(ammo_12gauge_incendiary, ammo_12gauge_incendiary.getUnlocalizedName());
GameRegistry.registerItem(ammo_12gauge_shrapnel, ammo_12gauge_shrapnel.getUnlocalizedName());
GameRegistry.registerItem(ammo_12gauge_du, ammo_12gauge_du.getUnlocalizedName());
@ -7426,11 +7547,11 @@ public class ModItems {
GameRegistry.registerItem(ammo_shell_explosive, ammo_shell_explosive.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell_apfsds_t, ammo_shell_apfsds_t.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell_apfsds_du, ammo_shell_apfsds_du.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell_w9, ammo_shell_w9.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell_w9, ammo_shell_w9.getUnlocalizedName());*/
GameRegistry.registerItem(ammo_dgk, ammo_dgk.getUnlocalizedName());
GameRegistry.registerItem(ammo_arty, ammo_arty.getUnlocalizedName());
GameRegistry.registerItem(ammo_himars, ammo_himars.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke, ammo_nuke.getUnlocalizedName());
/*GameRegistry.registerItem(ammo_nuke, ammo_nuke.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke_low, ammo_nuke_low.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke_high, ammo_nuke_high.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke_tots, ammo_nuke_tots.getUnlocalizedName());
@ -7441,7 +7562,7 @@ public class ModItems {
GameRegistry.registerItem(ammo_mirv_low, ammo_mirv_low.getUnlocalizedName());
GameRegistry.registerItem(ammo_mirv_high, ammo_mirv_high.getUnlocalizedName());
GameRegistry.registerItem(ammo_mirv_safe, ammo_mirv_safe.getUnlocalizedName());
GameRegistry.registerItem(ammo_mirv_special, ammo_mirv_special.getUnlocalizedName());
GameRegistry.registerItem(ammo_mirv_special, ammo_mirv_special.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());
@ -7713,6 +7834,7 @@ public class ModItems {
GameRegistry.registerItem(peas, peas.getUnlocalizedName());
GameRegistry.registerItem(marshmallow, marshmallow.getUnlocalizedName());
GameRegistry.registerItem(cheese, cheese.getUnlocalizedName());
GameRegistry.registerItem(quesadilla, quesadilla.getUnlocalizedName());
GameRegistry.registerItem(med_ipecac, med_ipecac.getUnlocalizedName());
GameRegistry.registerItem(med_ptsd, med_ptsd.getUnlocalizedName());
GameRegistry.registerItem(canteen_13, canteen_13.getUnlocalizedName());
@ -8277,5 +8399,151 @@ public class ModItems {
GameRegistry.registerItem(digamma_up_on_top, digamma_up_on_top.getUnlocalizedName());
GameRegistry.registerItem(mysteryshovel, mysteryshovel.getUnlocalizedName());
GameRegistry.registerItem(memory, memory.getUnlocalizedName());
addRemap("ammo_nuke_tots", 5594, ammo_nuke, AmmoFatman.TOTS);
addRemap("ammo_12gauge_incendiary", 5455, ammo_12gauge, Ammo12Gauge.INCENDIARY);
addRemap("ammo_12gauge_shrapnel", 5456, ammo_12gauge, Ammo12Gauge.SHRAPNEL);
addRemap("ammo_stinger_rocket_bones", 5572, ammo_stinger_rocket, AmmoStinger.BONES);
addRemap("ammo_556_flechette_phosphorus", 5515, ammo_556, Ammo556mm.FLECHETTE_PHOSPHORUS);
addRemap("ammo_50ae_chlorophyte", 5527, ammo_50ae, Ammo50AE.CHLOROPHYTE);
addRemap("gun_revolver_nightmare2_ammo", 5440, ammo_357, Ammo357Magnum.NIGHTMARE2);
addRemap("gun_revolver_iron_ammo", 5432, ammo_357, Ammo357Magnum.IRON);
addRemap("ammo_50bmg_star", 5534, ammo_50bmg, Ammo50BMG.STAR);
addRemap("ammo_556_star", 5509, ammo_556, Ammo556mm.STAR);
addRemap("ammo_556_flechette", 5513, ammo_556, Ammo556mm.FLECHETTE);
addRemap("ammo_12gauge_du", 5457, ammo_12gauge, Ammo12Gauge.DU);
addRemap("ammo_shell_apfsds_t", 5586, ammo_shell, Ammo240Shell.APFSDS_T);
addRemap("ammo_4gauge_void", 5481, ammo_4gauge, Ammo4Gauge.VOID);
addRemap("ammo_shell_apfsds_du", 5587, ammo_shell, Ammo240Shell.APFSDS_DU);
addRemap("ammo_fireext_foam", 5549, ammo_fireext, AmmoFireExt.FOAM);
addRemap("ammo_556_flechette_chlorophyte", 5517, ammo_556, Ammo556mm.FLECHETTE_CHLOROPHYTE);
addRemap("ammo_fuel_vaporizer", 5546, ammo_fuel, AmmoFlamethrower.VAPORIZER);
addRemap("ammo_4gauge_titan", 5482, ammo_4gauge, Ammo4Gauge.QUACK);
addRemap("ammo_556_phosphorus", 5506, ammo_556, Ammo556mm.PHOSPHORUS);
addRemap("ammo_4gauge_flechette_phosphorus", 5473, ammo_4gauge, Ammo4Gauge.FLECHETTE_PHOSPHORUS);
addRemap("ammo_shell_w9", 5588, ammo_shell, Ammo240Shell.W9);
addRemap("gun_revolver_gold_ammo", 5434, ammo_357, Ammo357Magnum.GOLD);
addRemap("ammo_556_flechette_du", 5516, ammo_556, Ammo556mm.FLECHETTE_DU);
addRemap("ammo_20gauge_incendiary", 5463, ammo_20gauge, Ammo20Gauge.INCENDIARY);
addRemap("ammo_shell_explosive", 5585, ammo_shell, Ammo240Shell.EXPLOSIVE);
addRemap("ammo_20gauge_explosive", 5465, ammo_20gauge, Ammo20Gauge.EXPLOSIVE);
addRemap("ammo_556_k", 5519, ammo_556, Ammo556mm.K);
addRemap("ammo_44_phosphorus", 5487, ammo_44, Ammo44Magnum.PHOSPHORUS);
addRemap("gun_revolver_cursed_ammo", 5437, ammo_357, Ammo357Magnum.STEEL);
addRemap("ammo_556_flechette_incendiary", 5514, ammo_556, Ammo556mm.FLECHETTE_INCENDIARY);
addRemap("ammo_75bolt_he", 5542, ammo_75bolt, Ammo75Bolt.HE);
addRemap("ammo_20gauge_flechette", 5462, ammo_20gauge, Ammo20Gauge.FLECHETTE);
addRemap("ammo_rocket_shrapnel", 5559, ammo_rocket, AmmoRocket.SHRAPNEL);
addRemap("ammo_556_chlorophyte", 5510, ammo_556, Ammo556mm.CHLOROPHYTE);
addRemap("ammo_12gauge_marauder", 5459, ammo_12gauge, Ammo12Gauge.MARAUDER);
addRemap("ammo_50bmg_chlorophyte", 5535, ammo_50bmg, Ammo50BMG.CHLOROPHYTE);
addRemap("ammo_rocket_emp", 5560, ammo_rocket, AmmoRocket.EMP);
addRemap("ammo_4gauge_vampire", 5480, ammo_4gauge, Ammo4Gauge.VAMPIRE);
addRemap("ammo_5mm_du", 5496, ammo_5mm, Ammo5mm.DU);
addRemap("ammo_9mm_rocket", 5503, ammo_9mm, Ammo9mm.ROCKET);
addRemap("gun_revolver_ammo", 5433, ammo_357, Ammo357Magnum.LEAD);
addRemap("ammo_grenade_sleek", 5580, ammo_grenade, AmmoGrenade.SLEEK);
addRemap("ammo_4gauge_slug", 5471, ammo_4gauge, Ammo4Gauge.SLUG);
addRemap("ammo_4gauge_kampf", 5477, ammo_4gauge, Ammo4Gauge.KAMPF);
addRemap("ammo_20gauge_shrapnel", 5464, ammo_20gauge, Ammo20Gauge.SHRAPNEL);
addRemap("ammo_5mm_explosive", 5495, ammo_5mm, Ammo5mm.EXPLOSIVE);
addRemap("gun_revolver_nightmare_ammo", 5438, ammo_357, Ammo357Magnum.NIGHTMARE1);
addRemap("ammo_stinger_rocket_he", 5569, ammo_stinger_rocket, AmmoStinger.HE);
addRemap("ammo_20gauge_caustic", 5466, ammo_20gauge, Ammo20Gauge.CAUSTIC);
addRemap("ammo_4gauge_semtex", 5475, ammo_4gauge, Ammo4Gauge.MINING);
addRemap("ammo_grenade_kampf", 5583, ammo_grenade, AmmoGrenade.KAMPF);
addRemap("ammo_556_flechette_sleek", 5518, ammo_556, Ammo556mm.FLECHETTE_SLEEK);
addRemap("ammo_mirv_special", 5602, ammo_nuke, AmmoFatman.MIRV_SPECIAL);
addRemap("ammo_50bmg_flechette", 5536, ammo_50bmg, Ammo50BMG.FLECHETTE);
addRemap("ammo_556_sleek", 5511, ammo_556, Ammo556mm.SLEEK);
addRemap("ammo_9mm_chlorophyte", 5502, ammo_9mm, Ammo9mm.CHLOROPHYTE);
addRemap("ammo_nuke_barrel", 5597, ammo_nuke, AmmoFatman.BARREL);
addRemap("ammo_nuke_low", 5592, ammo_nuke, AmmoFatman.LOW);
addRemap("ammo_fireext_sand", 5550, ammo_fireext, AmmoFireExt.SAND);
addRemap("ammo_44_silver", 5492, ammo_44, Ammo44Magnum.SILVER);
addRemap("ammo_grenade_concussion", 5578, ammo_grenade, AmmoGrenade.CONCUSSION);
addRemap("ammo_20gauge_shock", 5467, ammo_20gauge, Ammo20Gauge.SHOCK);
addRemap("ammo_4gauge_flechette", 5472, ammo_4gauge, Ammo4Gauge.FLECHETTE);
addRemap("ammo_rocket_toxic", 5562, ammo_rocket, AmmoRocket.CHLORINE);
addRemap("ammo_50bmg_explosive", 5531, ammo_50bmg, Ammo50BMG.EXPLOSIVE);
addRemap("ammo_grenade_finned", 5579, ammo_grenade, AmmoGrenade.FINNED);
addRemap("ammo_dart_nuclear", 5553, ammo_dart, AmmoDart.NUCLEAR);
addRemap("ammo_grenade_phosphorus", 5576, ammo_grenade, AmmoGrenade.PHOSPHORUS);
addRemap("ammo_5mm_star", 5497, ammo_5mm, Ammo5mm.STAR);
addRemap("ammo_4gauge_sleek", 5483, ammo_4gauge, Ammo4Gauge.SLEEK);
addRemap("ammo_mirv_high", 5600, ammo_nuke, AmmoFatman.MIRV_HIGH);
addRemap("ammo_5mm_chlorophyte", 5498, ammo_5mm, Ammo5mm.CHLOROPHYTE);
addRemap("ammo_50bmg_flechette_po", 5538, ammo_50bmg, Ammo50BMG.FLECHETTE_PO);
addRemap("ammo_50ae_star", 5526, ammo_50ae, Ammo50AE.STAR);
addRemap("ammo_50bmg_flechette_am", 5537, ammo_50bmg, Ammo50BMG.FLECHETTE_AM);
addRemap("ammo_9mm_ap", 5500, ammo_9mm, Ammo9mm.AP);
addRemap("ammo_mirv", 5598, ammo_nuke, AmmoFatman.MIRV);
addRemap("ammo_4gauge_claw", 5479, ammo_4gauge, Ammo4Gauge.CLAW);
addRemap("ammo_rocket_glare", 5561, ammo_rocket, AmmoRocket.GLARE);
addRemap("ammo_stinger_rocket_incendiary", 5570, ammo_stinger_rocket, AmmoStinger.INCENDIARY);
addRemap("ammo_rocket_incendiary", 5557, ammo_rocket, AmmoRocket.INCENDIARY);
addRemap("ammo_50ae_ap", 5524, ammo_50ae, Ammo50AE.AP);
addRemap("ammo_mirv_safe", 5601, ammo_nuke, AmmoFatman.MIRV_SAFE);
addRemap("ammo_4gauge_canister", 5478, ammo_4gauge, Ammo4Gauge.CANISTER);
addRemap("ammo_50ae_du", 5525, ammo_50ae, Ammo50AE.DU);
addRemap("ammo_44_ap", 5485, ammo_44, Ammo44Magnum.AP);
addRemap("ammo_44_bj", 5491, ammo_44, Ammo44Magnum.BJ);
addRemap("ammo_rocket_sleek", 5564, ammo_rocket, AmmoRocket.SLEEK);
addRemap("ammo_nuke_high", 5593, ammo_nuke, AmmoFatman.HIGH);
addRemap("ammo_grenade_incendiary", 5575, ammo_grenade, AmmoGrenade.INCENDIARY);
addRemap("ammo_44_du", 5486, ammo_44, Ammo44Magnum.DU);
addRemap("ammo_50bmg_ap", 5532, ammo_50bmg, Ammo50BMG.AP);
addRemap("ammo_50bmg_du", 5533, ammo_50bmg, Ammo50BMG.DU);
addRemap("ammo_9mm_du", 5501, ammo_9mm, Ammo9mm.DU);
addRemap("ammo_20gauge_slug", 5461, ammo_20gauge, Ammo20Gauge.SLUG);
addRemap("ammo_grenade_tracer", 5582, ammo_grenade, AmmoGrenade.TRACER);
addRemap("ammo_fuel_phosphorus", 5545, ammo_fuel, AmmoFlamethrower.PHOSPHORUS);
addRemap("ammo_44_pip", 5490, ammo_44, Ammo44Magnum.PIP);
addRemap("ammo_grenade_toxic", 5577, ammo_grenade, AmmoGrenade.CHLORINE);
addRemap("ammo_nuke_safe", 5595, ammo_nuke, AmmoFatman.SAFE);
addRemap("gun_mp_ammo", 5505, ammo_556, Ammo556mm.GOLD);
addRemap("gun_revolver_lead_ammo", 5435, ammo_357, Ammo357Magnum.NUCLEAR);
addRemap("ammo_stinger_rocket_nuclear", 5571, ammo_stinger_rocket, AmmoStinger.NUCLEAR);
addRemap("ammo_grenade_nuclear", 5581, ammo_grenade, AmmoGrenade.NUCLEAR);
addRemap("ammo_rocket_digamma", 5567, ammo_rocket, AmmoRocket.DIGAMMA);
addRemap("ammo_rocket_nuclear", 5565, ammo_rocket, AmmoRocket.NUCLEAR);
addRemap("ammo_mirv_low", 5599, ammo_nuke, AmmoFatman.MIRV_LOW);
addRemap("ammo_44_chlorophyte", 5489, ammo_44, Ammo44Magnum.CHLOROPHYTE);
addRemap("ammo_22lr_chlorophyte", 5522, ammo_22lr, Ammo22LR.CHLOROPHYTE);
addRemap("ammo_12gauge_sleek", 5458, ammo_12gauge, Ammo12Gauge.SLEEK);
addRemap("ammo_20gauge_sleek", 5469, ammo_20gauge, Ammo20Gauge.SLEEK);
addRemap("ammo_4gauge_explosive", 5474, ammo_4gauge, Ammo4Gauge.EXPLOSIVE);
addRemap("ammo_50bmg_incendiary", 5529, ammo_50bmg, Ammo50BMG.INCENDIARY);
addRemap("ammo_556_du", 5508, ammo_556, Ammo556mm.DU);
addRemap("ammo_fuel_napalm", 5544, ammo_fuel, AmmoFlamethrower.NAPALM);
addRemap("gun_revolver_schrabidium_ammo", 5436, ammo_357, Ammo357Magnum.SCHRABIDIUM);
addRemap("ammo_556_ap", 5507, ammo_556, Ammo556mm.AP);
addRemap("ammo_20gauge_wither", 5468, ammo_20gauge, Ammo20Gauge.WITHER);
addRemap("ammo_rocket_rpc", 5566, ammo_rocket, AmmoRocket.RPC);
addRemap("ammo_fuel_gas", 5547, ammo_fuel, AmmoFlamethrower.CHLORINE);
addRemap("ammo_22lr_ap", 5521, ammo_22lr, Ammo22LR.AP);
addRemap("ammo_grenade_he", 5574, ammo_grenade, AmmoGrenade.HE);
addRemap("ammo_4gauge_balefire", 5476, ammo_4gauge, Ammo4Gauge.BALEFIRE);
addRemap("ammo_357_desh", 5439, ammo_357, Ammo357Magnum.DESH);
addRemap("ammo_nuke_pumpkin", 5596, ammo_nuke, AmmoFatman.PUMPKIN);
addRemap("ammo_44_star", 5488, ammo_44, Ammo44Magnum.STAR);
addRemap("ammo_50bmg_sleek", 5539, ammo_50bmg, Ammo50BMG.SLEEK);
addRemap("ammo_dart_nerf", 5554, ammo_dart, AmmoDart.NERF);
addRemap("ammo_50bmg_phosphorus", 5530, ammo_50bmg, Ammo50BMG.PHOSPHORUS);
addRemap("ammo_44_rocket", 5493, ammo_44, Ammo44Magnum.ROCKET);
addRemap("ammo_rocket_he", 5556, ammo_rocket, AmmoRocket.HE);
addRemap("ammo_556_tracer", 5512, ammo_556, Ammo556mm.TRACER);
addRemap("ammo_75bolt_incendiary", 5541, ammo_75bolt, Ammo75Bolt.INCENDIARY);
addRemap("ammo_rocket_canister", 5563, ammo_rocket, AmmoRocket.CANISTER);
addRemap("ammo_rocket_phosphorus", 5558, ammo_rocket, AmmoRocket.PHOSPHORUS);
}
public static void addRemap(String unloc, int removoingTheseWouldTakeForever, Item item, Enum sub) {
addRemap(unloc, item, sub.ordinal());
}
public static void addRemap(String unloc, Item item, int meta) {
Item remap = new ItemRemap(item, meta).setUnlocalizedName(unloc).setTextureName(RefStrings.MODID + ":plate_armor_titanium");
GameRegistry.registerItem(remap, remap.getUnlocalizedName());
}
}

Some files were not shown because too many files have changed in this diff Show More