diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 9e756318e..d6022d022 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -1590,7 +1590,6 @@ public class ModBlocks { brick_forgotten = new BlockGeneric(Material.rock).setBlockName("brick_forgotten").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(1000000).setBlockTextureName(RefStrings.MODID + ":brick_forgotten"); deco_computer = new BlockDecoModel(Material.iron, DecoComputerEnum.class, true, false).setBlockBoundsTo(.160749F, 0F, 0F, .839251F, .867849F, .622184F).setBlockName("deco_computer").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_computer"); - filing_cabinet = new BlockDecoContainer(Material.iron, DecoCabinetEnum.class, true, false, TileEntityFileCabinet.class).setBlockBoundsTo(.1875F, 0F, 0F, .8125F, 1F, .75F).setBlockName("filing_cabinet").setCreativeTab(MainRegistry.blockTab).setHardness(10.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":block_steel"); tape_recorder = new DecoTapeRecorder(Material.iron).setBlockName("tape_recorder").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_tape_recorder"); diff --git a/src/main/java/com/hbm/blocks/generic/BlockGrate.java b/src/main/java/com/hbm/blocks/generic/BlockGrate.java index 76200b9fa..441775bb1 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockGrate.java +++ b/src/main/java/com/hbm/blocks/generic/BlockGrate.java @@ -2,8 +2,10 @@ package com.hbm.blocks.generic; import java.util.List; +import com.hbm.blocks.ITooltipProvider; import com.hbm.blocks.ModBlocks; import com.hbm.lib.RefStrings; +import com.hbm.util.I18nUtil; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; @@ -14,13 +16,15 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -public class BlockGrate extends Block { +public class BlockGrate extends Block implements ITooltipProvider { @SideOnly(Side.CLIENT) private IIcon sideIcon; @@ -105,4 +109,9 @@ public class BlockGrate extends Block { entity.setPosition(entity.posX, entity.posY - 0.125, entity.posZ); } } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + list.add(I18nUtil.resolveKey(this.getUnlocalizedName() + ".desc")); + } } diff --git a/src/main/java/com/hbm/items/weapon/ItemAmmoArty.java b/src/main/java/com/hbm/items/weapon/ItemAmmoArty.java index 0898913b9..8a96ce169 100644 --- a/src/main/java/com/hbm/items/weapon/ItemAmmoArty.java +++ b/src/main/java/com/hbm/items/weapon/ItemAmmoArty.java @@ -265,7 +265,7 @@ public class ItemAmmoArty extends Item { this.itemTypes[PHOSPHORUS] = new ArtilleryShell("ammo_arty_phosphorus", SpentCasing.COLOR_CASE_16INCH_PHOS) { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 10F, 3F, false); - shell.worldObj.playSoundEffect(shell.posX, shell.posY, shell.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + shell.worldObj.rand.nextFloat() * 0.2F); + //shell.worldObj.playSoundEffect(shell.posX, shell.posY, shell.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + shell.worldObj.rand.nextFloat() * 0.2F); ExplosionLarge.spawnShrapnels(shell.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 15); ExplosionChaos.burn(shell.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 12); int radius = 15; diff --git a/src/main/java/com/hbm/items/weapon/ItemAmmoHIMARS.java b/src/main/java/com/hbm/items/weapon/ItemAmmoHIMARS.java index 1af138e0a..c020bc29a 100644 --- a/src/main/java/com/hbm/items/weapon/ItemAmmoHIMARS.java +++ b/src/main/java/com/hbm/items/weapon/ItemAmmoHIMARS.java @@ -3,6 +3,9 @@ package com.hbm.items.weapon; import java.util.List; import com.hbm.entity.projectile.EntityArtilleryRocket; +import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionLarge; +import com.hbm.explosion.ExplosionNukeSmall; import com.hbm.explosion.vanillant.ExplosionVNT; import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard; import com.hbm.explosion.vanillant.standard.BlockProcessorStandard; @@ -11,22 +14,38 @@ import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard; import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; +import com.hbm.packet.AuxParticlePacketNT; +import com.hbm.packet.PacketDispatcher; +import com.hbm.potion.HbmPotion; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Vec3; public class ItemAmmoHIMARS extends Item { - public static HIMARSRocket[] itemTypes = new HIMARSRocket[ /* >>> */ 2 /* <<< */ ]; - + public static HIMARSRocket[] itemTypes = new HIMARSRocket[ /* >>> */ 7 /* <<< */ ]; + public final int SMALL = 0; public final int LARGE = 1; + public final int SMALL_HE = 2; + public final int SMALL_WP = 3; + public final int SMALL_TB = 4; + public final int LARGE_TB = 5; + public final int SMALL_MINI_NUKE = 6; public ItemAmmoHIMARS() { this.setHasSubtypes(true); @@ -40,7 +59,59 @@ public class ItemAmmoHIMARS extends Item { @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs tab, List list) { list.add(new ItemStack(item, 1, SMALL)); + list.add(new ItemStack(item, 1, SMALL_HE)); + list.add(new ItemStack(item, 1, SMALL_WP)); + list.add(new ItemStack(item, 1, SMALL_TB)); + list.add(new ItemStack(item, 1, SMALL_MINI_NUKE)); list.add(new ItemStack(item, 1, LARGE)); + list.add(new ItemStack(item, 1, LARGE_TB)); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + + String r = EnumChatFormatting.RED + ""; + String y = EnumChatFormatting.YELLOW + ""; + String b = EnumChatFormatting.BLUE + ""; + + switch(stack.getItemDamage()) { + case SMALL: + list.add(y + "Strength: 20"); + list.add(y + "Damage modifier: 3x"); + list.add(b + "Does not destroy blocks"); + break; + case SMALL_HE: + list.add(y + "Strength: 20"); + list.add(y + "Damage modifier: 3x"); + list.add(r + "Destroys blocks"); + break; + case SMALL_WP: + list.add(y + "Strength: 20"); + list.add(y + "Damage modifier: 3x"); + list.add(r + "Phosphorus splash"); + list.add(b + "Does not destroy blocks"); + break; + case SMALL_TB: + list.add(y + "Strength: 20"); + list.add(y + "Damage modifier: 10x"); + list.add(r + "Destroys blocks"); + break; + case SMALL_MINI_NUKE: + list.add(y + "Strength: 20"); + list.add(r + "Deals nuclear damage"); + list.add(r + "Destroys blocks"); + break; + case LARGE: + list.add(y + "Strength: 50"); + list.add(y + "Damage modifier: 5x"); + list.add(r + "Destroys blocks"); + break; + case LARGE_TB: + list.add(y + "Strength: 50"); + list.add(y + "Damage modifier: 12x"); + list.add(r + "Destroys blocks"); + break; + } } @Override @@ -55,10 +126,10 @@ public class ItemAmmoHIMARS extends Item { public final int amount; public final int modelType; /* 0 = sixfold/standard ; 1 = single */ - public HIMARSRocket(String name, String texture, int type, int amount) { + public HIMARSRocket(String name, String texture, int type) { this.name = name; this.texture = new ResourceLocation(RefStrings.MODID + ":textures/models/projectiles/" + texture + ".png"); - this.amount = amount; + this.amount = type == 0 ? 6 : 1; this.modelType = type; } @@ -81,9 +152,62 @@ public class ItemAmmoHIMARS extends Item { rocket.killAndClear(); } + public static void standardMush(EntityArtilleryRocket rocket, MovingObjectPosition mop, float size) { + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "rbmkmush"); + data.setFloat("scale", size); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord), new TargetPoint(rocket.dimension, rocket.posX, rocket.posY, rocket.posZ, 250)); + } + private void init() { /* STANDARD ROCKETS */ - this.itemTypes[SMALL] = new HIMARSRocket("standard", "himars_standard", 0, 6) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 25F, 3F, true); }}; - this.itemTypes[LARGE] = new HIMARSRocket("single", "himars_single", 1, 1) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 50F, 5F, true); }}; - } + this.itemTypes[SMALL] = new HIMARSRocket("standard", "himars_standard", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, false); }}; + this.itemTypes[SMALL_HE] = new HIMARSRocket("standard_he", "himars_standard_he", 0) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 20F, 3F, true); }}; + this.itemTypes[LARGE] = new HIMARSRocket("single", "himars_single", 1) { public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { standardExplosion(rocket, mop, 50F, 5F, true); }}; + + this.itemTypes[SMALL_MINI_NUKE] = new HIMARSRocket("standard_mini_nuke", "himars_standard_mini_nuke", 0) { + public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { + rocket.killAndClear(); + Vec3 vec = Vec3.createVectorHelper(rocket.motionX, rocket.motionY, rocket.motionZ).normalize(); + ExplosionNukeSmall.explode(rocket.worldObj, mop.hitVec.xCoord - vec.xCoord, mop.hitVec.yCoord - vec.yCoord, mop.hitVec.zCoord - vec.zCoord, ExplosionNukeSmall.PARAMS_MEDIUM); + } + }; + + this.itemTypes[SMALL_WP] = new HIMARSRocket("standard_he", "himars_standard_he", 0) { + public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { + standardExplosion(rocket, mop, 20F, 3F, false); + ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30); + ExplosionChaos.burn(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 20); + int radius = 30; + List hit = rocket.worldObj.getEntitiesWithinAABBExcludingEntity(rocket, AxisAlignedBB.getBoundingBox(rocket.posX - radius, rocket.posY - radius, rocket.posZ - radius, rocket.posX + radius, rocket.posY + radius, rocket.posZ + radius)); + for(Entity e : hit) { + e.setFire(5); + if(e instanceof EntityLivingBase) { + PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 30 * 20, 0, true); + eff.getCurativeItems().clear(); + ((EntityLivingBase)e).addPotionEffect(eff); + } + } + for(int i = 0; i < 10; i++) { + NBTTagCompound haze = new NBTTagCompound(); + haze.setString("type", "haze"); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(haze, mop.hitVec.xCoord + rocket.worldObj.rand.nextGaussian() * 15, mop.hitVec.yCoord, mop.hitVec.zCoord + rocket.worldObj.rand.nextGaussian() * 15), new TargetPoint(rocket.dimension, rocket.posX, rocket.posY, rocket.posZ, 150)); + } + standardMush(rocket, mop, 15); + }}; + + this.itemTypes[SMALL_TB] = new HIMARSRocket("standard_tb", "himars_standard_tb", 0) { + public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { + standardExplosion(rocket, mop, 20F, 10F, true); + ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30); + standardMush(rocket, mop, 20); + }}; + + this.itemTypes[LARGE_TB] = new HIMARSRocket("standard_tb", "himars_standard_tb", 0) { + public void onImpact(EntityArtilleryRocket rocket, MovingObjectPosition mop) { + standardExplosion(rocket, mop, 50F, 12F, true); + ExplosionLarge.spawnShrapnels(rocket.worldObj, (int) mop.hitVec.xCoord, (int) mop.hitVec.yCoord, (int) mop.hitVec.zCoord, 30); + standardMush(rocket, mop, 35); + }}; + } } diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index d63b923e3..0d0dfeeae 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -448,6 +448,8 @@ public class CraftingManager { addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_beam), 8), new Object[] { "S", "S", "S", 'S', ModBlocks.steel_scaffold }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.chain), 8), new Object[] { "S", "S", "S", 'S', ModBlocks.steel_beam }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 4), new Object[] { "SS", "SS", 'S', ModBlocks.steel_beam }); + addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate_wide), 4), new Object[] { "SS", 'S', ModBlocks.steel_grate }); + addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 1), new Object[] { "SS", 'S', ModBlocks.steel_grate_wide }); addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 0), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeGray" }); diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 065a09faf..bc47daaf1 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -947,8 +947,13 @@ item.ammo_grenade_phosphorus.name=40mm Granate (WP) item.ammo_grenade_sleek.name=40mm Granate (IF-F&E) item.ammo_grenade_toxic.name=40mm Granate (Chemisch) item.ammo_grenade_tracer.name=40mm Übungsgranate -item.ammo_himars_standard.name=M28 gelenkte Artillerierakete -item.ammo_himars_single.name=M39A1 gelenkte Artillerierakete +item.ammo_himars_standard.name=227mm gelenkte Artillerierakete +item.ammo_himars_standard_he.name=227mm Artillerielenkrakete (HE) +item.ammo_himars_standard_mini_nuke.name=227mm Artillerielenkrakete (Miniatombombe) +item.ammo_himars_standard_tb.name=227mm Artillerielenkrakete (Thermobarisch) +item.ammo_himars_standard_wp.name=227mm Artillerielenkrakete (WP) +item.ammo_himars_single.name=610mm Artillerielenkrakete +item.ammo_himars_single_tb.name=610mm Artillerielenkrakete (Thermobarisch) item.ammo_luna.name=Lunatic Sniper Sabot item.ammo_luna_explosive.name=Lunatic Sniper Explosivgeschoss item.ammo_luna_incendiary.name=Lunatic Sniper Brandgeschoss @@ -4139,6 +4144,8 @@ tile.stalagmite.sulfur.name=Schwefelhaltiger Stalagmit tile.steel_beam.name=Stahlträger tile.steel_corner.name=Stahlwand (Ecke) tile.steel_grate.name=Stahlgitter +tile.steel_grate_wide.name=Itemgitter +tile.steel_grate_wide.desc=Lässt Gegenstände und XP durchfallen tile.steel_poles.name=Stahlmasten tile.steel_roof.name=Flaches Stachldach tile.steel_scaffold.name=Stahlgerüst diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 2dac0fbe3..83d268e83 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -1512,8 +1512,13 @@ item.ammo_grenade_phosphorus.name=40mm Grenade (WP) item.ammo_grenade_sleek.name=40mm Grenade (IF-R&D) item.ammo_grenade_toxic.name=40mm Grenade (Chemical) item.ammo_grenade_tracer.name=40mm Training Grenade -item.ammo_himars_standard.name=M28 Guided Artillery Rocket Pod -item.ammo_himars_single.name=M39A1 Guided Artillery Rocket Pod +item.ammo_himars_standard.name=227mm Guided Artillery Rocket Pod +item.ammo_himars_standard_he.name=227mm Guided Artillery Rocket Pod (HE) +item.ammo_himars_standard_mini_nuke.name=227mm Guided Artillery Rocket Pod (Mini Nuke) +item.ammo_himars_standard_tb.name=227mm Guided Artillery Rocket Pod (Thermobaric) +item.ammo_himars_standard_wp.name=227mm Guided Artillery Rocket Pod (WP) +item.ammo_himars_single.name=610mm Guided Artillery Rocket Pod +item.ammo_himars_single_tb.name=610mm Guided Artillery Rocket Pod (Thermobaric) item.ammo_luna.name=Lunatic Sniper Sabot Round item.ammo_luna_explosive.name=Lunatic Sniper Explosive Round item.ammo_luna_incendiary.name=Lunatic Sniper Incendiary Round @@ -4942,6 +4947,8 @@ tile.stalagmite.sulfur.name=Sulfurous Stalagmite tile.steel_beam.name=Steel Beam tile.steel_corner.name=Steel Wall Corner tile.steel_grate.name=Steel Grate +tile.steel_grate_wide.name=Item Grate +tile.steel_grate_wide.desc=Lets dropped items and XP fall through tile.steel_poles.name=Steel Pole tile.steel_roof.name=Flat Steel Roof tile.steel_scaffold.name=Steel Scaffold diff --git a/src/main/resources/assets/hbm/textures/models/projectiles/himars_single_tb.png b/src/main/resources/assets/hbm/textures/models/projectiles/himars_single_tb.png new file mode 100644 index 000000000..b5c2ab1ce Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/projectiles/himars_single_tb.png differ diff --git a/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_he.png b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_he.png new file mode 100644 index 000000000..9005970f4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_he.png differ diff --git a/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_mini_nuke.png b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_mini_nuke.png new file mode 100644 index 000000000..3f5e868f4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_mini_nuke.png differ diff --git a/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_tb.png b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_tb.png new file mode 100644 index 000000000..33b061c0f Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_tb.png differ diff --git a/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_wp.png b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_wp.png new file mode 100644 index 000000000..b7f995323 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/projectiles/himars_standard_wp.png differ