diff --git a/assets/hbm/textures/items/ammo_20gauge_explosive.png b/assets/hbm/textures/items/ammo_20gauge_explosive.png index 6876673e0..ea4ea2557 100644 Binary files a/assets/hbm/textures/items/ammo_20gauge_explosive.png and b/assets/hbm/textures/items/ammo_20gauge_explosive.png differ diff --git a/assets/hbm/textures/items/book_of_.png b/assets/hbm/textures/items/book_of_.png new file mode 100644 index 000000000..08da95df5 Binary files /dev/null and b/assets/hbm/textures/items/book_of_.png differ diff --git a/com/hbm/calc/VectorUtil.java b/com/hbm/calc/VectorUtil.java new file mode 100644 index 000000000..47c335099 --- /dev/null +++ b/com/hbm/calc/VectorUtil.java @@ -0,0 +1,19 @@ +package com.hbm.calc; + +import net.minecraft.util.Vec3; + +public class VectorUtil { + + public static double getCrossAngle(Vec3 vel, Vec3 rel) { + + vel.normalize(); + rel.normalize(); + + double vecProd = rel.xCoord * vel.xCoord + rel.yCoord * vel.yCoord + rel.zCoord * vel.zCoord; + double bot = rel.lengthVector() * vel.lengthVector(); + double angle = Math.acos(vecProd / bot) * 180 / Math.PI; + + return angle; + } + +} diff --git a/com/hbm/entity/projectile/EntityBulletBase.java b/com/hbm/entity/projectile/EntityBulletBase.java index 1ee3fd1ca..730851b59 100644 --- a/com/hbm/entity/projectile/EntityBulletBase.java +++ b/com/hbm/entity/projectile/EntityBulletBase.java @@ -1,15 +1,35 @@ package com.hbm.entity.projectile; +import java.lang.reflect.Field; +import java.util.List; + +import com.hbm.calc.VectorUtil; +import com.hbm.entity.effect.EntityCloudFleijaRainbow; +import com.hbm.entity.effect.EntityEMPBlast; +import com.hbm.entity.logic.EntityNukeExplosionMK3; +import com.hbm.entity.logic.EntityNukeExplosionMK4; +import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.handler.BulletConfiguration; +import com.hbm.lib.ModDamageSource; +import com.hbm.main.MainRegistry; +import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; +import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; public class EntityBulletBase extends Entity implements IProjectile { @@ -126,11 +146,138 @@ public class EntityBulletBase extends Entity implements IProjectile { this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); } - + /// ZONE 1 START /// //entity and block collision, plinking + /// ZONE 2 START /// + //entity detection + Vec3 vecOrigin = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vecDestination = Vec3.createVectorHelper(this.posX + this.motionX * this.config.velocity, this.posY + this.motionY * this.config.velocity, this.posZ + this.motionZ * this.config.velocity); + MovingObjectPosition movement = this.worldObj.rayTraceBlocks(vecOrigin, vecDestination); + vecOrigin = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vecDestination = Vec3.createVectorHelper(this.posX + this.motionX * this.config.velocity, this.posY + this.motionY * this.config.velocity, this.posZ + this.motionZ * this.config.velocity); + + Entity victim = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX * this.config.velocity, this.motionY * this.config.velocity, this.motionZ * this.config.velocity).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) { + Entity entity1 = (Entity) list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shooter)) { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vecOrigin, vecDestination); + + if (movingobjectposition1 != null) { + double d1 = vecOrigin.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) { + victim = entity1; + d0 = d1; + } + } + } + } + + if (victim != null) { + movement = new MovingObjectPosition(victim); + } + + /// ZONE 2 END /// + + if (movement != null) { + + //handle entity collision + if(movement.entityHit != null) { + + DamageSource damagesource = null; + + if (this.shooter == null) { + damagesource = ModDamageSource.causeBulletDamage(this, this); + } else { + damagesource = ModDamageSource.causeBulletDamage(this, shooter); + } + + float damage = rand.nextFloat() * (config.dmgMax - config.dmgMin) + config.dmgMin; + + if(!victim.attackEntityFrom(damagesource, damage)) { + + try { + Field lastDamage = ReflectionHelper.findField(EntityLivingBase.class, "lastDamage", "field_110153_bc"); + + float dmg = (float) damage + lastDamage.getFloat(victim); + + victim.attackEntityFrom(damagesource, dmg); + } catch (Exception x) { } + } + + if(!config.doesPenetrate) + onEntityImpact(victim); + else + onEntityHurt(victim); + + //handle block collision + } else { + + if(!config.isSpectral && !config.doesRicochet) + this.setDead(); + + if(config.doesRicochet) { + + Vec3 face = null; + + switch(movement.sideHit) { + case 0: + face = Vec3.createVectorHelper(0, -1, 0); break; + case 1: + face = Vec3.createVectorHelper(0, 1, 0); break; + case 2: + face = Vec3.createVectorHelper(0, 0, 1); break; + case 3: + face = Vec3.createVectorHelper(0, 0, -1); break; + case 4: + face = Vec3.createVectorHelper(-1, 0, 0); break; + case 5: + face = Vec3.createVectorHelper(1, 0, 0); break; + } + + if(face != null) { + + Vec3 vel = Vec3.createVectorHelper(motionX, motionY, motionZ); + vel.normalize(); + + double angle = Math.abs(VectorUtil.getCrossAngle(vel, face) - 90); + + if(angle <= config.ricochetAngle) { + switch(movement.sideHit) { + case 0: + case 1: + motionY *= -1; break; + case 2: + case 3: + motionZ *= -1; break; + case 4: + case 5: + motionX *= -1; break; + } + System.out.println(angle); + } else { + onBlockImpact(movement.blockX, movement.blockY, movement.blockZ); + } + + this.posX += (movement.hitVec.xCoord - this.posX) * 0.6; + this.posY += (movement.hitVec.yCoord - this.posY) * 0.6; + this.posZ += (movement.hitVec.zCoord - this.posZ) * 0.6; + } + } + } + + } /// ZONE 1 END /// @@ -164,6 +311,122 @@ public class EntityBulletBase extends Entity implements IProjectile { //this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; //this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; } + + //for when a bullet dies by hitting a block + private void onBlockImpact(int bX, int bY, int bZ) { + + this.setDead(); + + if(config.incendiary > 0 && !this.worldObj.isRemote) { + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX, (int)posY, (int)posZ) == Blocks.air) worldObj.setBlock((int)posX, (int)posY, (int)posZ, Blocks.fire); + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX + 1, (int)posY, (int)posZ) == Blocks.air) worldObj.setBlock((int)posX + 1, (int)posY, (int)posZ, Blocks.fire); + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX - 1, (int)posY, (int)posZ) == Blocks.air) worldObj.setBlock((int)posX - 1, (int)posY, (int)posZ, Blocks.fire); + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX, (int)posY + 1, (int)posZ) == Blocks.air) worldObj.setBlock((int)posX, (int)posY + 1, (int)posZ, Blocks.fire); + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX, (int)posY - 1, (int)posZ) == Blocks.air) worldObj.setBlock((int)posX, (int)posY - 1, (int)posZ, Blocks.fire); + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX, (int)posY, (int)posZ + 1) == Blocks.air) worldObj.setBlock((int)posX, (int)posY, (int)posZ + 1, Blocks.fire); + if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock((int)posX, (int)posY, (int)posZ - 1) == Blocks.air) worldObj.setBlock((int)posX, (int)posY, (int)posZ - 1, Blocks.fire); + } + + if(config.emp > 0) + ExplosionNukeGeneric.empBlast(this.worldObj, (int)(this.posX + 0.5D), (int)(this.posY + 0.5D), (int)(this.posZ + 0.5D), config.emp); + + if(config.emp > 3) { + if (!this.worldObj.isRemote) { + + EntityEMPBlast cloud = new EntityEMPBlast(this.worldObj, config.emp); + cloud.posX = this.posX; + cloud.posY = this.posY + 0.5F; + cloud.posZ = this.posZ; + + this.worldObj.spawnEntityInWorld(cloud); + } + } + + if(config.explosive > 0 && !worldObj.isRemote) + worldObj.newExplosion(this, posX, posY, posZ, config.explosive, config.incendiary > 0, true); + + if(config.rainbow > 0 && !worldObj.isRemote) { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + + EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(this.worldObj); + entity.posX = this.posX; + entity.posY = this.posY; + entity.posZ = this.posZ; + entity.destructionRange = config.rainbow; + entity.speed = 25; + entity.coefficient = 1.0F; + entity.waste = false; + + this.worldObj.spawnEntityInWorld(entity); + + EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(this.worldObj, config.rainbow); + cloud.posX = this.posX; + cloud.posY = this.posY; + cloud.posZ = this.posZ; + this.worldObj.spawnEntityInWorld(cloud); + } + + if(config.nuke > 0 && !worldObj.isRemote) { + worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, config.nuke, posX, posY, posZ)); + } + + if(config.destroysBlocks && !worldObj.isRemote) { + if(worldObj.getBlock(bX, bY, bZ).getBlockHardness(worldObj, bX, bY, bZ) <= 120) + worldObj.func_147480_a(bX, bY, bZ, false); + } else if(config.doesBreakGlass && !worldObj.isRemote) { + if(worldObj.getBlock(bX, bY, bZ) == Blocks.glass || + worldObj.getBlock(bX, bY, bZ) == Blocks.glass_pane || + worldObj.getBlock(bX, bY, bZ) == Blocks.stained_glass || + worldObj.getBlock(bX, bY, bZ) == Blocks.stained_glass_pane) + worldObj.func_147480_a(bX, bY, bZ, false); + + } + } + + //for when a bullet dies by hitting an entity + private void onEntityImpact(Entity e) { + onBlockImpact(-1, -1, -1); + onEntityHurt(e); + + if(config.boxcar && !worldObj.isRemote) { + EntityBoxcar pippo = new EntityBoxcar(worldObj); + pippo.posX = e.posX; + pippo.posY = e.posY + 50; + pippo.posZ = e.posZ; + + for(int j = 0; j < 50; j++) { + EntityBSmokeFX fx = new EntityBSmokeFX(worldObj, pippo.posX + (rand.nextDouble() - 0.5) * 4, pippo.posY + (rand.nextDouble() - 0.5) * 12, pippo.posZ + (rand.nextDouble() - 0.5) * 4, 0, 0, 0); + worldObj.spawnEntityInWorld(fx); + } + worldObj.spawnEntityInWorld(pippo); + } + + if(config.boat && !worldObj.isRemote) { + EntityBoxcar pippo = new EntityBoxcar(worldObj); + pippo.posX = e.posX; + pippo.posY = e.posY + 50; + pippo.posZ = e.posZ; + + for(int j = 0; j < 50; j++) { + EntityBSmokeFX fx = new EntityBSmokeFX(worldObj, pippo.posX + (rand.nextDouble() - 0.5) * 4, pippo.posY + (rand.nextDouble() - 0.5) * 12, pippo.posZ + (rand.nextDouble() - 0.5) * 4, 0, 0, 0); + worldObj.spawnEntityInWorld(fx); + } + worldObj.spawnEntityInWorld(pippo); + } + } + + //for when a bullet hurts an entity, not necessarily dying + private void onEntityHurt(Entity e) { + + if(config.incendiary > 0) + e.setFire(config.incendiary); + + if(e instanceof EntityLivingBase && config.effects != null && !config.effects.isEmpty()) { + + for(PotionEffect effect : config.effects) + ((EntityLivingBase)e).addPotionEffect(effect); + } + } @Override protected void readEntityFromNBT(NBTTagCompound nbt) { diff --git a/com/hbm/handler/BulletConfigFactory.java b/com/hbm/handler/BulletConfigFactory.java index 49cb2a866..83fe8e8a0 100644 --- a/com/hbm/handler/BulletConfigFactory.java +++ b/com/hbm/handler/BulletConfigFactory.java @@ -18,7 +18,7 @@ public class BulletConfigFactory { bullet.gravity = 0D; bullet.maxAge = 100; bullet.doesRicochet = true; - bullet.ricochetAngle = 15; + bullet.ricochetAngle = 10; bullet.doesPenetrate = true; bullet.doesBreakGlass = true; bullet.incendiary = 0; diff --git a/com/hbm/handler/BulletConfiguration.java b/com/hbm/handler/BulletConfiguration.java index 2f98bb45a..d17e2236a 100644 --- a/com/hbm/handler/BulletConfiguration.java +++ b/com/hbm/handler/BulletConfiguration.java @@ -32,6 +32,8 @@ public class BulletConfiguration { //whether or not the bullet should penetrate mobs public boolean doesPenetrate; + //whether or not the bullet should phase through blocks + public boolean isSpectral; //whether or not the bullet should break glass public boolean doesBreakGlass; @@ -39,10 +41,11 @@ public class BulletConfiguration { public List effects; public int incendiary; public int emp; - public int explosive; + public float explosive; public int rainbow; public int nuke; public boolean boxcar; + public boolean boat; public boolean destroysBlocks; //appearance diff --git a/com/hbm/inventory/MachineRecipes.java b/com/hbm/inventory/MachineRecipes.java index 028b2c2ff..2618edcd8 100644 --- a/com/hbm/inventory/MachineRecipes.java +++ b/com/hbm/inventory/MachineRecipes.java @@ -632,28 +632,26 @@ public class MachineRecipes { if(stamp.getItem() == ModItems.stamp_44) { - if(input.getItem() == ModItems.assembly_pip) - return new ItemStack(ModItems.gun_revolver_pip_ammo); if(input.getItem() == ModItems.assembly_nopip) - return new ItemStack(ModItems.gun_revolver_nopip_ammo); + return new ItemStack(ModItems.ammo_44); } if(stamp.getItem() == ModItems.stamp_9) { if(input.getItem() == ModItems.assembly_smg) - return new ItemStack(ModItems.gun_mp40_ammo); + return new ItemStack(ModItems.ammo_9mm); if(input.getItem() == ModItems.assembly_uzi) - return new ItemStack(ModItems.gun_uzi_ammo); + return new ItemStack(ModItems.ammo_22lr); if(mODE(input, "ingotGold")) return new ItemStack(ModItems.gun_mp_ammo); if(input.getItem() == ModItems.assembly_lacunae) - return new ItemStack(ModItems.gun_lacunae_ammo); + return new ItemStack(ModItems.ammo_5mm); } if(stamp.getItem() == ModItems.stamp_50) { if(input.getItem() == ModItems.assembly_calamity) - return new ItemStack(ModItems.gun_calamity_ammo); + return new ItemStack(ModItems.ammo_50bmg); } return null; @@ -724,7 +722,7 @@ public class MachineRecipes { recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_nightmare) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_nightmare)); recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.assembly_nopip) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.assembly_nopip)); - recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.assembly_pip) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.assembly_pip)); + //recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.assembly_pip) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.assembly_pip)); recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_smg) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_smg)); recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_uzi) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_uzi)); diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 77f693a86..b0c0bad0c 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -311,7 +311,7 @@ public class ModItems { public static Item assembly_gold; public static Item assembly_schrabidium; public static Item assembly_nightmare; - public static Item assembly_pip; + //public static Item assembly_pip; public static Item assembly_nopip; public static Item assembly_smg; public static Item assembly_uzi; @@ -1869,7 +1869,7 @@ public class ModItems { assembly_gold = new Item().setUnlocalizedName("assembly_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_gold"); assembly_schrabidium = new Item().setUnlocalizedName("assembly_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_schrabidium"); assembly_nightmare = new Item().setUnlocalizedName("assembly_nightmare").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nightmare"); - assembly_pip = new Item().setUnlocalizedName("assembly_pip").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_pip"); + //assembly_pip = new Item().setUnlocalizedName("assembly_pip").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_pip"); 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_uzi = new Item().setUnlocalizedName("assembly_uzi").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_uzi"); @@ -3362,7 +3362,7 @@ public class ModItems { GameRegistry.registerItem(assembly_gold, assembly_gold.getUnlocalizedName()); GameRegistry.registerItem(assembly_schrabidium, assembly_schrabidium.getUnlocalizedName()); GameRegistry.registerItem(assembly_nightmare, assembly_nightmare.getUnlocalizedName()); - GameRegistry.registerItem(assembly_pip, assembly_pip.getUnlocalizedName()); + //GameRegistry.registerItem(assembly_pip, assembly_pip.getUnlocalizedName()); GameRegistry.registerItem(assembly_nopip, assembly_nopip.getUnlocalizedName()); GameRegistry.registerItem(assembly_smg, assembly_smg.getUnlocalizedName()); GameRegistry.registerItem(assembly_uzi, assembly_uzi.getUnlocalizedName()); diff --git a/com/hbm/lib/ModDamageSource.java b/com/hbm/lib/ModDamageSource.java index 4cead54bf..cf9646447 100644 --- a/com/hbm/lib/ModDamageSource.java +++ b/com/hbm/lib/ModDamageSource.java @@ -1,6 +1,7 @@ package com.hbm.lib; import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityBulletBase; import com.hbm.entity.projectile.EntityCombineBall; import com.hbm.entity.projectile.EntityDischarge; import com.hbm.entity.projectile.EntityFire; @@ -47,6 +48,10 @@ public class ModDamageSource extends DamageSource { { return (new EntityDamageSourceIndirect("revolverBullet", p_76353_0_, p_76353_1_)).setProjectile(); } + public static DamageSource causeBulletDamage(EntityBulletBase base, Entity ent) + { + return (new EntityDamageSourceIndirect("revolverBullet", base, ent)).setProjectile(); + } public static DamageSource causeDisplacementDamage(EntityBullet p_76353_0_, Entity p_76353_1_) { return (new EntityDamageSourceIndirect("chopperBullet", p_76353_0_, p_76353_1_)).setProjectile(); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 7e4a8272c..5d3f11918 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -836,6 +836,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_saturnite_silencer, 1), new Object[] { "P ", " P ", " U", 'P', "ingotPolymer", 'U', ModItems.gun_uzi_saturnite })); //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_ammo, 16), new Object[] { "L", "P", "G", 'P', "plateIron", 'L', "plateSteel", 'G', Items.gunpowder })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', "nuggetLead" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_iron, 16), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', Items.gunpowder, 'C', ModItems.casing_357, 'P', ModItems.primer_357 })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_steel, 16), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_357, 'P', ModItems.primer_357 })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 16), new Object[] { " I", "GC", " P", 'I', ModItems.ingot_u235, 'G', Items.gunpowder, 'C', "paneGlassColorless", 'P', ModItems.primer_357 })); @@ -849,13 +850,44 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_uzi, 24), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', Items.gunpowder, 'C', ModItems.casing_9, 'P', ModItems.primer_9 })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lacunae, 24), new Object[] { " I", "GC", " P", 'I', "ingotCopper", 'G', Items.gunpowder, 'C', ModItems.casing_9, 'P', ModItems.primer_9 })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nopip, 16), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_44, 'P', ModItems.primer_44 })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_pip, 16), new Object[] { " I ", "GCM", " P ", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_44, 'P', ModItems.primer_44, 'M', ModItems.powder_magic })); - GameRegistry.addRecipe(new ItemStack(ModItems.gun_uboinik_ammo, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action_ammo, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_ammo, 8), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); + //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_pip, 16), new Object[] { " I ", "GCM", " P ", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_44, 'P', ModItems.primer_44, 'M', ModItems.powder_magic })); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 8), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_explosive, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_flechette, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', Items.gunpowder, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" })); GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 8), new Object[] { "I", "C", "P", 'I', ModItems.powder_power, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_calamity, 8), new Object[] { " I ", "GCG", " P ", 'I', "ingotLead", 'G', Items.gunpowder, 'C', ModItems.casing_50, 'P', ModItems.primer_50 })); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_12gauge, 'A', ModItems.powder_fire }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_20gauge_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_20gauge, 'A', ModItems.powder_fire }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_20gauge_caustic, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_20gauge, 'A', ModItems.powder_poison }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_shock, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_20gauge, 'A', "dustDiamond" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_wither, 4), new Object[] { "BCB", "CAC", "BCB", 'B', ModItems.ammo_20gauge, 'A', Blocks.soul_sand, 'C', "dustCoal" })); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_44, 'A', ModItems.ingot_dura_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_pip, 1), new Object[] { " B ", "BAB", " B ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_44_bj, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', "dustDesh" })); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', Blocks.tnt }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_9mm_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_9mm, 'A', ModItems.ingot_dura_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_22lr_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_22lr, 'A', ModItems.ingot_dura_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.powder_fire }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', Blocks.tnt }); + + GameRegistry.addRecipe(new ItemStack(ModItems.folly_bullet, 1), new Object[] { " S ", "STS", "SMS", 'S', ModItems.ingot_starmetal, 'T', ModItems.powder_magic, 'M', ModBlocks.block_meteor }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.gun_fatman_ammo, 'U', "ingotIron", 'T', "blockTungsten" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_bullet_du, 1), new Object[] { " U ", "UDU", "UTU", 'U', "blockUranium", 'D', "blockDesh", 'T', "blockTungsten" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_shell, 1), new Object[] { "IPI", "IPI", "IMI", 'I', "ingotIron", 'P', "plateIron", 'M', ModItems.primer_50 })); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly, 1), new Object[] { " B ", "MEM", " S ", 'B', ModItems.folly_bullet, 'M', ModItems.powder_magic, 'E', ModItems.powder_power, 'S', ModItems.folly_shell }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly_nuclear, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_nuclear, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell }); + GameRegistry.addRecipe(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 }); + + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', Blocks.tnt, 'G', Items.gunpowder, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_he, 1), new Object[] { "G", "R", "G", 'G', Items.gunpowder, 'R', ModItems.ammo_rocket }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_incendiary, 1), new Object[] { "G", "R", 'G', ModItems.powder_fire, 'R', ModItems.ammo_rocket }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_rocket_emp, 1), new Object[] { "G", "R", 'G', "dustDiamond", 'R', ModItems.ammo_rocket })); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_shrapnel, 1), new Object[] { "G", "R", 'G', ModItems.pellet_buckshot, 'R', ModItems.ammo_rocket }); + GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_glare, 1), new Object[] { "GGG", "GRG", "GGG", 'G', Items.redstone, 'R', ModItems.ammo_rocket }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_357, 1), new Object[] { "RSR", "III", " C ", 'R', "dustRedstone", 'S', ModItems.stamp_iron_flat, 'I', ModItems.plate_polymer, 'C', ModItems.casing_357 })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_44, 1), new Object[] { "RSR", "III", " C ", 'R', "dustRedstone", 'S', ModItems.stamp_iron_flat, 'I', ModItems.plate_polymer, 'C', ModItems.casing_44 })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_9, 1), new Object[] { "RSR", "III", " C ", 'R', "dustRedstone", 'S', ModItems.stamp_iron_flat, 'I', ModItems.plate_polymer, 'C', ModItems.casing_9 })); @@ -1434,6 +1466,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_minigun, 1), new Object[] { "PIB", "PCM", "PIB", 'P', ModItems.pipes_steel, 'B', "blockSteel", 'I', "ingotPolymer", 'C', ModItems.mechanism_rifle_2, 'M', ModItems.motor })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_avenger, 1), new Object[] { "PIB", "PCM", "PIB", 'P', ModItems.pipes_steel, 'B', "blockBeryllium", 'I', "ingotDesh", 'C', ModItems.mechanism_rifle_2, 'M', ModItems.motor })); GameRegistry.addRecipe(new ItemStack(ModItems.gun_lacunae, 1), new Object[] { "TIT", "ILI", "PRP", 'T', ModItems.syringe_taint, 'I', ModItems.ingot_starmetal, 'L', ModItems.gun_minigun, 'P', ModItems.pellet_rtg, 'R', ModBlocks.machine_rtg_grey }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.containment_box, 1), new Object[] { "LLL", "LCL", "LLL", 'L', "plateLead", 'C', Blocks.chest })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.absorber, 1), new Object[] { "ICI", "CPC", "ICI", 'I', "ingotCopper", 'C', "dustCoal", 'P', "dustLead" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.absorber_red, 1), new Object[] { "ICI", "CPC", "ICI", 'I', "ingotTitanium", 'C', "dustCoal", 'P', ModBlocks.absorber }));