diff --git a/assets/hbm/models/epress_body.obj b/assets/hbm/models/epress_body.obj index a8c49fcd0..cd20eba6b 100644 --- a/assets/hbm/models/epress_body.obj +++ b/assets/hbm/models/epress_body.obj @@ -131,236 +131,236 @@ v 0.450000 2.825000 -0.032500 v 0.450000 2.825000 0.032500 v 0.350000 2.825000 -0.281667 v 0.350000 2.175000 -0.281667 -vt 0.657280 0.519248 -vt 0.657280 0.629673 -vt 0.491641 0.629673 -vt 0.436429 0.016646 -vt 0.602067 0.016646 -vt 0.602067 0.182285 -vt 0.403136 0.519248 -vt 0.403136 0.684886 -vt 0.237498 0.684886 -vt 0.292710 0.016646 -vt 0.292710 0.127072 -vt 0.127072 0.127072 -vt 0.237497 0.519248 -vt 0.182285 0.684886 -vt 0.458349 0.519248 -vt 0.458349 0.684886 -vt 0.182285 0.519248 -vt 0.016646 0.684886 -vt 0.263724 0.156059 -vt 0.156059 0.156059 -vt 0.292710 0.292710 -vt 0.292710 0.403136 -vt 0.127072 0.403136 -vt 0.182285 0.767705 -vt 0.403136 0.209891 -vt 0.292710 0.485955 -vt 0.127072 0.485955 -vt 0.237498 0.784422 -vt 0.458349 0.767705 -vt 0.127072 0.292710 -vt 0.016646 0.292710 -vt 0.016646 0.209891 -vt 0.830994 0.527529 -vt 0.830994 0.579291 -vt 0.779232 0.579292 -vt 0.819797 0.364817 -vt 0.819797 0.416579 -vt 0.768035 0.416579 -vt 0.444710 0.466270 -vt 0.444710 0.414508 -vt 0.496472 0.414508 -vt 0.776317 0.076690 -vt 0.776317 0.024928 -vt 0.828079 0.024928 -vt 0.223694 0.941944 -vt 0.306514 0.941944 -vt 0.347923 0.983353 -vt 0.223694 0.859125 -vt 0.182285 0.817715 -vt 0.347923 0.817715 -vt 0.182285 0.983354 -vt 0.140875 0.941944 -vt 0.071859 0.983354 -vt 0.140875 0.859125 -vt 0.058056 0.859125 -vt 0.016646 0.817715 -vt 0.058056 0.941944 -vt 0.016646 0.983354 -vt 0.637790 0.941944 -vt 0.679200 0.983353 -vt 0.513562 0.983353 -vt 0.554971 0.859125 -vt 0.513561 0.817715 -vt 0.679200 0.817715 -vt 0.554971 0.941944 -vt 0.458349 0.983353 -vt 0.389333 0.941944 -vt 0.472152 0.941944 -vt 0.472152 0.859125 -vt 0.389333 0.859125 -vt 0.734743 0.107747 -vt 0.726461 0.107747 -vt 0.726461 0.024928 -vt 0.768035 0.076690 -vt 0.768035 0.024928 -vt 0.726461 0.016646 -vt 0.643641 0.024928 -vt 0.635359 0.024928 -vt 0.643641 0.107747 -vt 0.718179 0.215577 -vt 0.718179 0.223859 -vt 0.635360 0.223859 -vt 0.635360 0.314960 -vt 0.635360 0.306678 -vt 0.718179 0.306678 -vt 0.496472 0.466270 -vt 0.496472 0.474552 -vt 0.444710 0.474552 -vt 0.444710 0.406226 -vt 0.496472 0.406226 -vt 0.759753 0.416579 -vt 0.759753 0.364817 -vt 0.828079 0.364817 -vt 0.828079 0.416579 -vt 0.491641 0.671248 -vt 0.499923 0.671248 -vt 0.499923 0.754067 -vt 0.591024 0.754067 -vt 0.582742 0.754067 -vt 0.582742 0.671248 -vt 0.779232 0.527530 -vt 0.779232 0.519248 -vt 0.830994 0.519248 -vt 0.830994 0.587573 -vt 0.779232 0.587573 -vt 0.627078 0.356535 -vt 0.635360 0.356535 -vt 0.635360 0.439354 -vt 0.726461 0.439354 -vt 0.718179 0.439354 -vt 0.718179 0.356535 -vt 0.702650 0.291150 -vt 0.650888 0.239388 -vt 0.650888 0.291150 -vt 0.702650 0.239388 -vt 0.726461 0.306678 -vt 0.436429 0.466270 -vt 0.436429 0.414508 -vt 0.504754 0.414508 -vt 0.504754 0.466270 -vt 0.627078 0.223859 -vt 0.515452 0.738538 -vt 0.515452 0.686776 -vt 0.567214 0.686776 -vt 0.582742 0.662966 -vt 0.499923 0.762349 -vt 0.819797 0.424861 -vt 0.768035 0.424861 -vt 0.768035 0.364817 -vt 0.768035 0.356535 -vt 0.819797 0.356535 -vt 0.702650 0.372063 -vt 0.650888 0.372063 -vt 0.702650 0.423825 -vt 0.650888 0.423825 -vt 0.635360 0.447636 -vt 0.718179 0.348253 -vt 0.839276 0.527529 -vt 0.839276 0.579291 -vt 0.770950 0.579292 -vt 0.770950 0.527530 -vt 0.710932 0.092219 -vt 0.659170 0.040457 -vt 0.828079 0.076690 -vt 0.828079 0.084972 -vt 0.776317 0.084972 -vt 0.836361 0.024928 -vt 0.836361 0.076690 -vt 0.643641 0.116029 -vt 0.776317 0.016646 -vt 0.828079 0.016646 -vt 0.436429 0.240423 -vt 0.461274 0.240423 -vt 0.461274 0.348088 -vt 0.156059 0.263724 -vt 0.263724 0.263724 -vt 0.729376 0.626913 -vt 0.729376 0.519248 -vt 0.737658 0.519248 -vt 0.593785 0.348088 -vt 0.568939 0.348088 -vt 0.568939 0.240423 -vt 0.719498 0.626913 -vt 0.719498 0.519248 -vt 0.461274 0.215577 -vt 0.708732 0.626913 -vt 0.698854 0.519248 -vt 0.698854 0.626913 -vt 0.690572 0.626913 -vt 0.798557 0.323242 -vt 0.798557 0.215577 -vt 0.806839 0.215577 -vt 0.768035 0.215577 -vt 0.768035 0.323242 -vt 0.759753 0.323242 -vt 0.729376 0.767870 -vt 0.729376 0.660205 -vt 0.737658 0.660205 -vt 0.698854 0.660205 -vt 0.698854 0.767870 -vt 0.690572 0.767870 -vt 0.708732 0.519248 -vt 0.788679 0.215577 -vt 0.788679 0.323242 -vt 0.777913 0.323242 -vt 0.777913 0.215577 -vt 0.719498 0.660205 -vt 0.719498 0.767870 -vt 0.708732 0.767870 -vt 0.708732 0.660205 -vt 0.461274 0.372934 -vt 0.491641 0.519248 -vt 0.436429 0.182285 -vt 0.127072 0.016646 -vt 0.016646 0.519248 -vt 0.403136 0.127072 -vt 0.403136 0.292710 -vt 0.403136 0.784422 -vt 0.016646 0.127072 -vt 0.306514 0.859125 -vt 0.637790 0.859124 -vt 0.734743 0.024928 -vt 0.643641 0.016646 -vt 0.635359 0.107747 -vt 0.635360 0.215577 -vt 0.718179 0.314960 -vt 0.491641 0.754067 -vt 0.591024 0.671248 -vt 0.627078 0.439354 -vt 0.726461 0.356535 -vt 0.726461 0.223859 -vt 0.627078 0.306678 -vt 0.567214 0.738538 -vt 0.499923 0.662966 -vt 0.582742 0.762349 -vt 0.718179 0.447636 -vt 0.635360 0.348253 -vt 0.659170 0.092219 -vt 0.710932 0.040457 -vt 0.726461 0.116029 -vt 0.436429 0.348088 -vt 0.737658 0.626913 -vt 0.593785 0.240423 -vt 0.568939 0.215577 -vt 0.690572 0.519248 -vt 0.806839 0.323242 -vt 0.759753 0.215577 -vt 0.737658 0.767870 -vt 0.690572 0.660205 -vt 0.568939 0.372934 +vt 0.645833 0.520833 +vt 0.645833 0.635417 +vt 0.489583 0.635417 +vt 0.427083 0.020833 +vt 0.593750 0.020833 +vt 0.593750 0.187500 +vt 0.395833 0.520833 +vt 0.395833 0.687500 +vt 0.229167 0.687500 +vt 0.291667 0.020833 +vt 0.291667 0.135417 +vt 0.125000 0.135417 +vt 0.229167 0.520833 +vt 0.177083 0.687500 +vt 0.447917 0.520833 +vt 0.447917 0.687500 +vt 0.177083 0.520833 +vt 0.010417 0.687500 +vt 0.260417 0.166667 +vt 0.156250 0.166667 +vt 0.291667 0.302083 +vt 0.291667 0.416667 +vt 0.125000 0.416667 +vt 0.177083 0.770833 +vt 0.406250 0.218750 +vt 0.291667 0.500000 +vt 0.125000 0.500000 +vt 0.229167 0.791667 +vt 0.447917 0.770833 +vt 0.125000 0.302083 +vt 0.010417 0.302083 +vt 0.010417 0.218750 +vt 0.822917 0.531250 +vt 0.822917 0.583333 +vt 0.770833 0.583333 +vt 0.812500 0.375000 +vt 0.812500 0.427083 +vt 0.760417 0.427083 +vt 0.437500 0.468750 +vt 0.437500 0.416667 +vt 0.489583 0.416667 +vt 0.770833 0.083333 +vt 0.770833 0.031250 +vt 0.822917 0.031250 +vt 0.218750 0.947917 +vt 0.302083 0.947917 +vt 0.343750 0.989583 +vt 0.218750 0.864583 +vt 0.177083 0.822917 +vt 0.343750 0.822917 +vt 0.177083 0.989583 +vt 0.135417 0.947917 +vt 0.062500 0.989583 +vt 0.135417 0.864583 +vt 0.052083 0.864583 +vt 0.010417 0.822917 +vt 0.052083 0.947917 +vt 0.010417 0.989583 +vt 0.635417 0.947917 +vt 0.677083 0.989583 +vt 0.510417 0.989583 +vt 0.552083 0.864583 +vt 0.510417 0.822917 +vt 0.677083 0.822917 +vt 0.552083 0.947917 +vt 0.458333 0.989583 +vt 0.385417 0.947917 +vt 0.468750 0.947917 +vt 0.468750 0.864583 +vt 0.385417 0.864583 +vt 0.729167 0.114583 +vt 0.718750 0.114583 +vt 0.718750 0.031250 +vt 0.760417 0.083333 +vt 0.760417 0.031250 +vt 0.718750 0.020833 +vt 0.635417 0.031250 +vt 0.625000 0.031250 +vt 0.635417 0.114583 +vt 0.718750 0.218750 +vt 0.718750 0.229167 +vt 0.635417 0.229167 +vt 0.635417 0.322917 +vt 0.635417 0.312500 +vt 0.718750 0.312500 +vt 0.489583 0.468750 +vt 0.489583 0.479167 +vt 0.437500 0.479167 +vt 0.437500 0.406250 +vt 0.489583 0.406250 +vt 0.750000 0.427083 +vt 0.750000 0.375000 +vt 0.822917 0.375000 +vt 0.822917 0.427083 +vt 0.489583 0.677083 +vt 0.500000 0.677083 +vt 0.500000 0.760417 +vt 0.593750 0.760417 +vt 0.583333 0.760417 +vt 0.583333 0.677083 +vt 0.770833 0.531250 +vt 0.770833 0.520833 +vt 0.822917 0.520833 +vt 0.822917 0.593750 +vt 0.770833 0.593750 +vt 0.625000 0.364583 +vt 0.635417 0.364583 +vt 0.635417 0.447917 +vt 0.729167 0.447917 +vt 0.718750 0.447917 +vt 0.718750 0.364583 +vt 0.708333 0.302083 +vt 0.645833 0.239583 +vt 0.645833 0.302083 +vt 0.708333 0.239583 +vt 0.729167 0.312500 +vt 0.427083 0.468750 +vt 0.427083 0.416667 +vt 0.500000 0.416667 +vt 0.500000 0.468750 +vt 0.625000 0.229167 +vt 0.510417 0.750000 +vt 0.510417 0.687500 +vt 0.572917 0.687500 +vt 0.583333 0.666667 +vt 0.500000 0.770833 +vt 0.812500 0.437500 +vt 0.760417 0.437500 +vt 0.760417 0.375000 +vt 0.760417 0.364583 +vt 0.812500 0.364583 +vt 0.708333 0.375000 +vt 0.645833 0.375000 +vt 0.708333 0.437500 +vt 0.645833 0.437500 +vt 0.635417 0.458333 +vt 0.718750 0.354167 +vt 0.833333 0.531250 +vt 0.833333 0.583333 +vt 0.760417 0.583333 +vt 0.760417 0.531250 +vt 0.708333 0.104167 +vt 0.645833 0.041667 +vt 0.822917 0.083333 +vt 0.822917 0.093750 +vt 0.770833 0.093750 +vt 0.833333 0.031250 +vt 0.833333 0.083333 +vt 0.635417 0.125000 +vt 0.770833 0.020833 +vt 0.822917 0.020833 +vt 0.427083 0.250000 +vt 0.458333 0.250000 +vt 0.458333 0.354167 +vt 0.156250 0.270833 +vt 0.260417 0.270833 +vt 0.718750 0.635417 +vt 0.718750 0.520833 +vt 0.729167 0.520833 +vt 0.593750 0.354167 +vt 0.562500 0.354167 +vt 0.562500 0.250000 +vt 0.708333 0.635417 +vt 0.708333 0.520833 +vt 0.458333 0.218750 +vt 0.697917 0.635417 +vt 0.687500 0.520833 +vt 0.687500 0.635417 +vt 0.677083 0.635417 +vt 0.791667 0.333333 +vt 0.791667 0.218750 +vt 0.802083 0.218750 +vt 0.760417 0.218750 +vt 0.760417 0.333333 +vt 0.750000 0.333333 +vt 0.718750 0.770833 +vt 0.718750 0.666667 +vt 0.729167 0.666667 +vt 0.687500 0.666667 +vt 0.687500 0.770833 +vt 0.677083 0.770833 +vt 0.697917 0.520833 +vt 0.781250 0.218750 +vt 0.781250 0.333333 +vt 0.770833 0.333333 +vt 0.770833 0.218750 +vt 0.708333 0.666667 +vt 0.708333 0.770833 +vt 0.697917 0.770833 +vt 0.697917 0.666667 +vt 0.458333 0.385417 +vt 0.489583 0.520833 +vt 0.427083 0.187500 +vt 0.125000 0.020833 +vt 0.010417 0.520833 +vt 0.406250 0.135417 +vt 0.406250 0.302083 +vt 0.395833 0.791667 +vt 0.010417 0.135417 +vt 0.302083 0.864583 +vt 0.635417 0.864583 +vt 0.729167 0.031250 +vt 0.635417 0.020833 +vt 0.625000 0.114583 +vt 0.635417 0.218750 +vt 0.718750 0.322917 +vt 0.489583 0.760417 +vt 0.593750 0.677083 +vt 0.625000 0.447917 +vt 0.729167 0.364583 +vt 0.729167 0.229167 +vt 0.625000 0.312500 +vt 0.572917 0.750000 +vt 0.500000 0.666667 +vt 0.583333 0.770833 +vt 0.718750 0.458333 +vt 0.635417 0.354167 +vt 0.645833 0.104167 +vt 0.708333 0.041667 +vt 0.718750 0.125000 +vt 0.427083 0.354167 +vt 0.729167 0.635417 +vt 0.593750 0.250000 +vt 0.562500 0.218750 +vt 0.677083 0.520833 +vt 0.802083 0.333333 +vt 0.750000 0.218750 +vt 0.729167 0.770833 +vt 0.677083 0.666667 +vt 0.562500 0.385417 vn 0.000000 1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn -1.000000 0.000000 0.000000 diff --git a/assets/hbm/textures/items/gun_kit_1.png b/assets/hbm/textures/items/gun_kit_1.png new file mode 100644 index 000000000..9de5d6c8f Binary files /dev/null and b/assets/hbm/textures/items/gun_kit_1.png differ diff --git a/assets/hbm/textures/items/gun_kit_2.png b/assets/hbm/textures/items/gun_kit_2.png new file mode 100644 index 000000000..445c8d0bf Binary files /dev/null and b/assets/hbm/textures/items/gun_kit_2.png differ diff --git a/assets/hbm/textures/models/epress_body.png b/assets/hbm/textures/models/epress_body.png new file mode 100644 index 000000000..6ad4e22b2 Binary files /dev/null and b/assets/hbm/textures/models/epress_body.png differ diff --git a/assets/hbm/textures/models/epress_head.png b/assets/hbm/textures/models/epress_head.png new file mode 100644 index 000000000..57a068d08 Binary files /dev/null and b/assets/hbm/textures/models/epress_head.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index dbde356b4..67eed9791 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -503,6 +503,9 @@ public class ModBlocks { public static Block machine_press; public static final int guiID_machine_press = 53; + public static Block machine_epress; + public static final int guiID_machine_epress = 81; + public static Block machine_siren; public static final int guiID_siren = 57; @@ -1009,6 +1012,7 @@ public class ModBlocks { machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank"); machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbofan"); machine_press = new MachinePress(Material.iron).setBlockName("machine_press").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_press"); + machine_epress = new MachineEPress(Material.iron).setBlockName("machine_epress").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_epress"); machine_selenium = new MachineSeleniumEngine(Material.iron).setBlockName("machine_selenium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_selenium"); machine_reactor_small = new MachineReactorSmall(Material.iron).setBlockName("machine_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small"); machine_controller = new MachineReactorControl(Material.iron).setBlockName("machine_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); @@ -1361,6 +1365,7 @@ public class ModBlocks { //Machines GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName()); + GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName()); GameRegistry.registerBlock(machine_difurnace_off, machine_difurnace_off.getUnlocalizedName()); GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName()); GameRegistry.registerBlock(machine_centrifuge, machine_centrifuge.getUnlocalizedName()); diff --git a/com/hbm/blocks/machine/MachineEPress.java b/com/hbm/blocks/machine/MachineEPress.java new file mode 100644 index 000000000..4727a1e75 --- /dev/null +++ b/com/hbm/blocks/machine/MachineEPress.java @@ -0,0 +1,37 @@ +package com.hbm.blocks.machine; + +import com.hbm.tileentity.machine.TileEntityMachineEPress; +import com.hbm.tileentity.machine.TileEntityMachinePress; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class MachineEPress extends BlockContainer { + + public MachineEPress(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityMachineEPress(); + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + +} diff --git a/com/hbm/handler/BulletConfigFactory.java b/com/hbm/handler/BulletConfigFactory.java index 06b104742..4aac83091 100644 --- a/com/hbm/handler/BulletConfigFactory.java +++ b/com/hbm/handler/BulletConfigFactory.java @@ -18,6 +18,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.gun_revolver_ammo; bullet.velocity = 5.0F; bullet.spread = 0.05F; + bullet.wear = 10; bullet.dmgMin = 15; bullet.dmgMax = 17; bullet.bulletsMin = 1; @@ -46,6 +47,7 @@ public class BulletConfigFactory { bullet.velocity = 5.0F; bullet.spread = 0.005F; + bullet.wear = 10; bullet.bulletsMin = 1; bullet.bulletsMax = 1; bullet.gravity = 0D; @@ -70,6 +72,7 @@ public class BulletConfigFactory { bullet.velocity = 5.0F; bullet.spread = 0.05F; + bullet.wear = 10; bullet.bulletsMin = 5; bullet.bulletsMax = 8; bullet.gravity = 0D; @@ -93,6 +96,7 @@ public class BulletConfigFactory { bullet.velocity = 2.0F; bullet.spread = 0.005F; + bullet.wear = 10; bullet.bulletsMin = 1; bullet.bulletsMax = 1; bullet.gravity = 0.005D; @@ -212,6 +216,7 @@ public class BulletConfigFactory { BulletConfiguration bullet = standardBuckshotConfig(); bullet.ammo = ModItems.ammo_12gauge_incendiary; + bullet.wear = 15; bullet.dmgMin = 1; bullet.dmgMax = 4; bullet.incendiary = 5; @@ -238,6 +243,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_20gauge_slug; bullet.dmgMin = 10; bullet.dmgMax = 15; + bullet.wear = 7; bullet.style = BulletConfiguration.STYLE_NORMAL; return bullet; @@ -250,6 +256,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_20gauge_flechette; bullet.dmgMin = 3; bullet.dmgMax = 6; + bullet.wear = 15; bullet.style = BulletConfiguration.STYLE_FLECHETTE; bullet.HBRC = 2; bullet.LBRC = 95; @@ -264,6 +271,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_20gauge_incendiary; bullet.dmgMin = 1; bullet.dmgMax = 4; + bullet.wear = 15; bullet.incendiary = 5; return bullet; @@ -276,6 +284,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_20gauge_explosive; bullet.dmgMin = 2; bullet.dmgMax = 6; + bullet.wear = 25; bullet.explosive = 0.5F; return bullet; @@ -289,7 +298,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_rocket; bullet.dmgMin = 10; bullet.dmgMax = 15; - bullet.explosive = 3.5F; + bullet.explosive = 4F; bullet.trail = 0; return bullet; @@ -302,6 +311,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_rocket_he; bullet.dmgMin = 10; bullet.dmgMax = 15; + bullet.wear = 15; bullet.explosive = 6.5F; bullet.trail = 1; @@ -315,7 +325,8 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_rocket_incendiary; bullet.dmgMin = 10; bullet.dmgMax = 15; - bullet.explosive = 6.5F; + bullet.wear = 15; + bullet.explosive = 4F; bullet.incendiary = 5; bullet.trail = 2; @@ -345,6 +356,7 @@ public class BulletConfigFactory { bullet.dmgMax = 15; bullet.explosive = 10F; bullet.trail = 6; + bullet.gravity = 0; return bullet; } @@ -356,7 +368,7 @@ public class BulletConfigFactory { bullet.ammo = ModItems.ammo_rocket_shrapnel; bullet.dmgMin = 10; bullet.dmgMax = 15; - bullet.explosive = 6.5F; + bullet.explosive = 4F; bullet.shrapnel = 25; bullet.trail = 3; @@ -371,7 +383,8 @@ public class BulletConfigFactory { bullet.velocity = 5.0F; bullet.dmgMin = 10; bullet.dmgMax = 15; - bullet.explosive = 6.5F; + bullet.wear = 20; + bullet.explosive = 4F; bullet.incendiary = 5; bullet.trail = 5; diff --git a/com/hbm/handler/BulletConfiguration.java b/com/hbm/handler/BulletConfiguration.java index 4e350c580..026dc23c0 100644 --- a/com/hbm/handler/BulletConfiguration.java +++ b/com/hbm/handler/BulletConfiguration.java @@ -14,7 +14,7 @@ public class BulletConfiguration { //spread of bullets in gaussian range public float spread; //weapon durability reduced (centered around 10) - public float tear; + public int wear; //greatest amount of pellets created each shot public int bulletsMin; //least amount of pellets created each shot diff --git a/com/hbm/handler/GunConfigFactory.java b/com/hbm/handler/GunConfigFactory.java index e65d20b38..5f191389d 100644 --- a/com/hbm/handler/GunConfigFactory.java +++ b/com/hbm/handler/GunConfigFactory.java @@ -24,6 +24,7 @@ public class GunConfigFactory { config.reloadType = GunConfiguration.RELOAD_FULL; config.allowsInfinity = true; config.crosshair = Crosshair.L_CLASSIC; + config.durability = 350; config.config = new ArrayList(); config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER); @@ -49,6 +50,7 @@ public class GunConfigFactory { config.reloadType = GunConfiguration.RELOAD_SINGLE; config.allowsInfinity = true; config.crosshair = Crosshair.L_CIRCLE; + config.durability = 350; config.config = new ArrayList(); config.config.add(BulletConfigSyncingUtil.G20_NORMAL); @@ -86,6 +88,7 @@ public class GunConfigFactory { config.config.add(BulletConfigSyncingUtil.ROCKET_EMP); config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE); config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK); + config.durability = 140; return config; } diff --git a/com/hbm/handler/GunConfiguration.java b/com/hbm/handler/GunConfiguration.java index 61c02fb1d..8970ebde8 100644 --- a/com/hbm/handler/GunConfiguration.java +++ b/com/hbm/handler/GunConfiguration.java @@ -20,6 +20,8 @@ public class GunConfiguration { public int gunMode; //0 = manual, 1 = automatic public int firingMode; + //weapon won't fire after weapon breaks + public int durability; //whether or not there is a reload delay animation public boolean hasReloadAnim; diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index f09da1931..df8f4e9ac 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -2253,48 +2253,48 @@ public class ModItems { sat_chip = new ItemSatChip().setUnlocalizedName("sat_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_chip"); sat_interface = new ItemSatInterface().setUnlocalizedName("sat_interface").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_interface"); - ammo_12gauge = new Item().setUnlocalizedName("ammo_12gauge").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_12gauge"); - ammo_12gauge_incendiary = new Item().setUnlocalizedName("ammo_12gauge_incendiary").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_12gauge_incendiary"); - ammo_20gauge = new Item().setUnlocalizedName("ammo_20gauge").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge"); - ammo_20gauge_slug = new Item().setUnlocalizedName("ammo_20gauge_slug").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_slug"); - ammo_20gauge_flechette = new Item().setUnlocalizedName("ammo_20gauge_flechette").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_20gauge_flechette"); - ammo_20gauge_incendiary = new Item().setUnlocalizedName("ammo_20gauge_incendiary").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_20gauge_incendiary"); - ammo_20gauge_explosive = new Item().setUnlocalizedName("ammo_20gauge_explosive").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_20gauge_explosive"); - ammo_20gauge_caustic = new Item().setUnlocalizedName("ammo_20gauge_caustic").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_20gauge_caustic"); - ammo_20gauge_shock = new Item().setUnlocalizedName("ammo_20gauge_shock").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_20gauge_shock"); - ammo_20gauge_wither = new Item().setUnlocalizedName("ammo_20gauge_wither").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_20gauge_wither"); - ammo_5mm = new Item().setUnlocalizedName("ammo_5mm").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_5mm"); - ammo_5mm_explosive = new Item().setUnlocalizedName("ammo_5mm_explosive").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_5mm_explosive"); - ammo_5mm_du = new Item().setUnlocalizedName("ammo_5mm_du").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_5mm_du"); - ammo_9mm = new Item().setUnlocalizedName("ammo_9mm").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm"); - ammo_9mm_ap = new Item().setUnlocalizedName("ammo_9mm_ap").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_9mm_ap"); - ammo_9mm_du = new Item().setUnlocalizedName("ammo_9mm_du").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_9mm_du"); - ammo_50bmg = new Item().setUnlocalizedName("ammo_50bmg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg"); - ammo_50bmg_incendiary = new Item().setUnlocalizedName("ammo_50bmg_incendiary").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_50bmg_incendiary"); - ammo_50bmg_explosive = new Item().setUnlocalizedName("ammo_50bmg_explosive").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_50bmg_explosive"); - ammo_50bmg_du = new Item().setUnlocalizedName("ammo_50bmg_du").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_50bmg_du"); - ammo_44 = new Item().setUnlocalizedName("ammo_44").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44"); - ammo_44_ap = new Item().setUnlocalizedName("ammo_44_ap").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_44_ap"); - ammo_44_du = new Item().setUnlocalizedName("ammo_44_du").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_44_du"); - ammo_44_pip = new Item().setUnlocalizedName("ammo_44_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_pip"); - ammo_44_bj = new Item().setUnlocalizedName("ammo_44_bj").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_44_bj"); - ammo_22lr = new Item().setUnlocalizedName("ammo_22lr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr"); - ammo_22lr_ap = new Item().setUnlocalizedName("ammo_22lr_ap").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_22lr_ap"); - ammo_folly = new ItemCustomLore().setUnlocalizedName("ammo_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly"); - ammo_folly_nuclear = new ItemCustomLore().setUnlocalizedName("ammo_folly_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_nuclear"); - ammo_folly_du = new ItemCustomLore().setUnlocalizedName("ammo_folly_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_du"); - ammo_rocket = new Item().setUnlocalizedName("ammo_rocket").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket"); - ammo_rocket_he = new Item().setUnlocalizedName("ammo_rocket_he").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_rocket_he"); - ammo_rocket_incendiary = new Item().setUnlocalizedName("ammo_rocket_incendiary").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_rocket_incendiary"); - ammo_rocket_shrapnel = new Item().setUnlocalizedName("ammo_rocket_shrapnel").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_rocket_shrapnel"); - ammo_rocket_emp = new Item().setUnlocalizedName("ammo_rocket_emp").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_rocket_emp"); - ammo_rocket_glare = new Item().setUnlocalizedName("ammo_rocket_glare").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_rocket_glare"); - ammo_rocket_sleek = new Item().setUnlocalizedName("ammo_rocket_sleek").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ammo_rocket_sleek"); - ammo_grenade = new Item().setUnlocalizedName("ammo_grenade").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade"); - ammo_grenade_he = new Item().setUnlocalizedName("ammo_grenade_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_he"); - ammo_grenade_incendiary = new Item().setUnlocalizedName("ammo_grenade_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_incendiary"); - ammo_grenade_toxic = new Item().setUnlocalizedName("ammo_grenade_toxic").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_toxic"); - ammo_grenade_sleek = new Item().setUnlocalizedName("ammo_grenade_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_sleek"); + ammo_12gauge = new ItemAmmo().setUnlocalizedName("ammo_12gauge").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_12gauge"); + ammo_12gauge_incendiary = new ItemAmmo().setUnlocalizedName("ammo_12gauge_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_12gauge_incendiary"); + ammo_20gauge = new ItemAmmo().setUnlocalizedName("ammo_20gauge").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge"); + ammo_20gauge_slug = new ItemAmmo().setUnlocalizedName("ammo_20gauge_slug").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_slug"); + ammo_20gauge_flechette = new ItemAmmo().setUnlocalizedName("ammo_20gauge_flechette").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_flechette"); + ammo_20gauge_incendiary = new ItemAmmo().setUnlocalizedName("ammo_20gauge_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_incendiary"); + ammo_20gauge_explosive = new ItemAmmo().setUnlocalizedName("ammo_20gauge_explosive").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_explosive"); + ammo_20gauge_caustic = new ItemAmmo().setUnlocalizedName("ammo_20gauge_caustic").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_caustic"); + ammo_20gauge_shock = new ItemAmmo().setUnlocalizedName("ammo_20gauge_shock").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_shock"); + ammo_20gauge_wither = new ItemAmmo().setUnlocalizedName("ammo_20gauge_wither").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_20gauge_wither"); + ammo_5mm = new ItemAmmo().setUnlocalizedName("ammo_5mm").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_5mm"); + ammo_5mm_explosive = new ItemAmmo().setUnlocalizedName("ammo_5mm_explosive").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_5mm_explosive"); + ammo_5mm_du = new ItemAmmo().setUnlocalizedName("ammo_5mm_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_5mm_du"); + ammo_9mm = new ItemAmmo().setUnlocalizedName("ammo_9mm").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm"); + ammo_9mm_ap = new ItemAmmo().setUnlocalizedName("ammo_9mm_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm_ap"); + ammo_9mm_du = new ItemAmmo().setUnlocalizedName("ammo_9mm_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm_du"); + ammo_50bmg = new ItemAmmo().setUnlocalizedName("ammo_50bmg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg"); + ammo_50bmg_incendiary = new ItemAmmo().setUnlocalizedName("ammo_50bmg_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_incendiary"); + ammo_50bmg_explosive = new ItemAmmo().setUnlocalizedName("ammo_50bmg_explosive").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_explosive"); + ammo_50bmg_du = new ItemAmmo().setUnlocalizedName("ammo_50bmg_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_du"); + ammo_44 = new ItemAmmo().setUnlocalizedName("ammo_44").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44"); + ammo_44_ap = new ItemAmmo().setUnlocalizedName("ammo_44_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_ap"); + ammo_44_du = new ItemAmmo().setUnlocalizedName("ammo_44_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_du"); + ammo_44_pip = new ItemAmmo().setUnlocalizedName("ammo_44_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_pip"); + ammo_44_bj = new ItemAmmo().setUnlocalizedName("ammo_44_bj").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_bj"); + ammo_22lr = new ItemAmmo().setUnlocalizedName("ammo_22lr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr"); + ammo_22lr_ap = new ItemAmmo().setUnlocalizedName("ammo_22lr_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr_ap"); + ammo_folly = new ItemAmmo().setUnlocalizedName("ammo_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly"); + ammo_folly_nuclear = new ItemAmmo().setUnlocalizedName("ammo_folly_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_nuclear"); + ammo_folly_du = new ItemAmmo().setUnlocalizedName("ammo_folly_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_du"); + ammo_rocket = new ItemAmmo().setUnlocalizedName("ammo_rocket").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket"); + ammo_rocket_he = new ItemAmmo().setUnlocalizedName("ammo_rocket_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_he"); + ammo_rocket_incendiary = new ItemAmmo().setUnlocalizedName("ammo_rocket_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_incendiary"); + ammo_rocket_shrapnel = new ItemAmmo().setUnlocalizedName("ammo_rocket_shrapnel").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_shrapnel"); + ammo_rocket_emp = new ItemAmmo().setUnlocalizedName("ammo_rocket_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_emp"); + ammo_rocket_glare = new ItemAmmo().setUnlocalizedName("ammo_rocket_glare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_glare"); + ammo_rocket_sleek = new ItemAmmo().setUnlocalizedName("ammo_rocket_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_sleek"); + ammo_grenade = new ItemAmmo().setUnlocalizedName("ammo_grenade").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade"); + ammo_grenade_he = new ItemAmmo().setUnlocalizedName("ammo_grenade_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_he"); + ammo_grenade_incendiary = new ItemAmmo().setUnlocalizedName("ammo_grenade_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_incendiary"); + ammo_grenade_toxic = new ItemAmmo().setUnlocalizedName("ammo_grenade_toxic").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_toxic"); + ammo_grenade_sleek = new ItemAmmo().setUnlocalizedName("ammo_grenade_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_sleek"); gun_rpg = new ItemGunBase(GunConfigFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg"); gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt"); diff --git a/com/hbm/items/weapon/ItemAmmo.java b/com/hbm/items/weapon/ItemAmmo.java new file mode 100644 index 000000000..5d959dc63 --- /dev/null +++ b/com/hbm/items/weapon/ItemAmmo.java @@ -0,0 +1,182 @@ +package com.hbm.items.weapon; + +import java.util.List; + +import com.hbm.items.ModItems; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class ItemAmmo extends Item { + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) + { + //12 GAUGE + if(this == ModItems.ammo_12gauge_incendiary) { + list.add(EnumChatFormatting.BLUE + "+ Incendiary"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_20gauge_slug) { + list.add(EnumChatFormatting.BLUE + "+ Near-perfect accuracy"); + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.BLUE + "+ Decreased wear"); + list.add(EnumChatFormatting.RED + "- Single projectile"); + } + + //20 GAUGE + if(this == ModItems.ammo_20gauge_flechette) { + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.YELLOW + "* Less bouncy"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_20gauge_incendiary) { + list.add(EnumChatFormatting.BLUE + "+ Incendiary"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_20gauge_explosive) { + list.add(EnumChatFormatting.BLUE + "+ Explosive"); + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + if(this == ModItems.ammo_20gauge_caustic) { + list.add(EnumChatFormatting.BLUE + "+ Toxic"); + list.add(EnumChatFormatting.YELLOW + "* Not bouncy"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_20gauge_shock) { + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.BLUE + "+ Stunning"); + list.add(EnumChatFormatting.BLUE + "+ EMP"); + list.add(EnumChatFormatting.YELLOW + "* Not bouncy"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + if(this == ModItems.ammo_20gauge_wither) { + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.BLUE + "+ Withering"); + } + + //.44 MAGNUM + if(this == ModItems.ammo_44_ap) { + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_44_du) { + list.add(EnumChatFormatting.BLUE + "+ Highly increased damage"); + list.add(EnumChatFormatting.YELLOW + "* Heavy metal"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + if(this == ModItems.ammo_44_pip) { + list.add(EnumChatFormatting.BLUE + "+ Boxcar"); + list.add(EnumChatFormatting.RED + "- Highly decreased damage"); + } + if(this == ModItems.ammo_44_bj) { + list.add(EnumChatFormatting.BLUE + "+ Boat"); + list.add(EnumChatFormatting.RED + "- Highly decreased damage"); + } + + //5mm + if(this == ModItems.ammo_5mm_explosive) { + list.add(EnumChatFormatting.BLUE + "+ Explosive"); + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + if(this == ModItems.ammo_5mm_du) { + list.add(EnumChatFormatting.BLUE + "+ Highly increased damage"); + list.add(EnumChatFormatting.YELLOW + "* Heavy metal"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + + //9mm + if(this == ModItems.ammo_9mm_ap) { + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_9mm_du) { + list.add(EnumChatFormatting.BLUE + "+ Highly increased damage"); + list.add(EnumChatFormatting.YELLOW + "* Heavy metal"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + + //.22LR + if(this == ModItems.ammo_22lr_ap) { + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + + //.50 BMG + if(this == ModItems.ammo_50bmg_incendiary) { + list.add(EnumChatFormatting.BLUE + "+ Incendiary"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_50bmg_explosive) { + list.add(EnumChatFormatting.BLUE + "+ Explosive"); + list.add(EnumChatFormatting.BLUE + "+ Increased damage"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + if(this == ModItems.ammo_50bmg_du) { + list.add(EnumChatFormatting.BLUE + "+ Highly increased damage"); + list.add(EnumChatFormatting.YELLOW + "* Heavy metal"); + list.add(EnumChatFormatting.RED + "- Highly increased wear"); + } + + //84mm ROCKETS + if(this == ModItems.ammo_rocket_he) { + list.add(EnumChatFormatting.BLUE + "+ Increased blast radius"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_rocket_incendiary) { + list.add(EnumChatFormatting.BLUE + "+ Incendiary explosion"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_rocket_shrapnel) { + list.add(EnumChatFormatting.BLUE + "+ Shrapnel"); + } + if(this == ModItems.ammo_rocket_emp) { + list.add(EnumChatFormatting.BLUE + "+ EMP"); + list.add(EnumChatFormatting.RED + "- Decreased blast radius"); + } + if(this == ModItems.ammo_rocket_glare) { + list.add(EnumChatFormatting.BLUE + "+ Increased projectile speed"); + list.add(EnumChatFormatting.BLUE + "+ Incendiary explosion"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_rocket_sleek) { + list.add(EnumChatFormatting.BLUE + "+ Highly increased blast radius"); + list.add(EnumChatFormatting.BLUE + "+ Not affected by gravity"); + list.add(EnumChatFormatting.YELLOW + "* Jolt"); + } + + //40mm GRENADES + if(this == ModItems.ammo_grenade_he) { + list.add(EnumChatFormatting.BLUE + "+ Increased blast radius"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_grenade_incendiary) { + list.add(EnumChatFormatting.BLUE + "+ Incendiary explosion"); + list.add(EnumChatFormatting.RED + "- Increased wear"); + } + if(this == ModItems.ammo_grenade_toxic) { + list.add(EnumChatFormatting.BLUE + "+ Chlorine gas"); + list.add(EnumChatFormatting.RED + "- No explosion"); + } + if(this == ModItems.ammo_grenade_sleek) { + list.add(EnumChatFormatting.BLUE + "+ Increased blast radius"); + list.add(EnumChatFormatting.YELLOW + "* Jolt"); + } + + //FOLLY + if(this == ModItems.ammo_folly) { + list.add(EnumChatFormatting.BLUE + "+ Focused starmetal reaction blast"); + } + if(this == ModItems.ammo_folly_nuclear) { + list.add(EnumChatFormatting.BLUE + "+ Howitzer mini nuke shell"); + } + if(this == ModItems.ammo_folly_du) { + list.add(EnumChatFormatting.BLUE + "+ Howitzer 17kg U238 shell"); + } + } + +} diff --git a/com/hbm/items/weapon/ItemGunBase.java b/com/hbm/items/weapon/ItemGunBase.java index 352e4d843..03c159a01 100644 --- a/com/hbm/items/weapon/ItemGunBase.java +++ b/com/hbm/items/weapon/ItemGunBase.java @@ -42,11 +42,13 @@ public class ItemGunBase extends Item implements IHoldableWeapon { public ItemGunBase(GunConfiguration config) { mainConfig = config; + this.setMaxStackSize(1); } public ItemGunBase(GunConfiguration config, GunConfiguration alt) { mainConfig = config; altConfig = alt; + this.setMaxStackSize(1); } @Override @@ -104,7 +106,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon { if(mainConfig.reloadType != 0 || (altConfig != null && altConfig.reloadType != 0)) { - if(Keyboard.isKeyDown(Keyboard.KEY_R)) { + if(Keyboard.isKeyDown(Keyboard.KEY_R) && getMag(stack) < mainConfig.ammoCap) { PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(true, (byte) 2)); setIsReloading(stack, true); resetReloadCycle(stack); @@ -158,6 +160,9 @@ public class ItemGunBase extends Item implements IHoldableWeapon { EntityBulletBase bullet = new EntityBulletBase(world, mainConfig.config.get(getMagType(stack)), player); world.spawnEntityInWorld(bullet); } + + setItemWear(stack, getItemWear(stack) + config.wear); + //player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_gold_ammo)); } @@ -280,7 +285,13 @@ public class ItemGunBase extends Item implements IHoldableWeapon { list.add("Ammo: Belt"); list.add("Ammo Type: " + I18n.format(ammo.getUnlocalizedName() + ".name")); - //list.add("Reload DLAY: " + getReloadCycle(stack)); + + int dura = mainConfig.durability - getItemWear(stack); + + if(dura < 0) + dura = 0; + + list.add("Durability: " + dura + " / " + mainConfig.durability); } /*//returns main config from itemstack @@ -334,6 +345,15 @@ public class ItemGunBase extends Item implements IHoldableWeapon { return readNBT(stack, "dlay"); } + /// RoF cooldown /// + public static void setItemWear(ItemStack stack, int i) { + writeNBT(stack, "wear", i); + } + + public static int getItemWear(ItemStack stack) { + return readNBT(stack, "wear"); + } + /// R/W cycle animation timer /// public static void setCycleAnim(ItemStack stack, int i) { writeNBT(stack, "cycle", i); diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 62c7795d6..3d679d9fa 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -104,6 +104,7 @@ public class ClientProxy extends ServerProxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePumpjack.class, new RenderPumpjack()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineTurbofan.class, new RenderTurbofan()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePress.class, new RenderPress()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineEPress.class, new RenderEPress()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadGen.class, new RenderRadGen()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadar.class, new RenderRadar()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSeleniumEngine.class, new RenderSelenium()); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 1c45bdc53..7f0aefd0e 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -293,6 +293,7 @@ import com.hbm.tileentity.machine.TileEntityMachineCoal; import com.hbm.tileentity.machine.TileEntityMachineCyclotron; import com.hbm.tileentity.machine.TileEntityMachineDeuterium; import com.hbm.tileentity.machine.TileEntityMachineDiesel; +import com.hbm.tileentity.machine.TileEntityMachineEPress; import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace; import com.hbm.tileentity.machine.TileEntityMachineFluidTank; import com.hbm.tileentity.machine.TileEntityMachineGasCent; @@ -763,6 +764,7 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityWasteDrum.class, "tileentity_waste_drum"); GameRegistry.registerTileEntity(TileEntityDecon.class, "tileentity_decon"); GameRegistry.registerTileEntity(TileEntityMachineSatDock.class, "tileentity_miner_dock"); + GameRegistry.registerTileEntity(TileEntityMachineEPress.class, "tileentity_electric_press"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); diff --git a/com/hbm/main/ResourceManager.java b/com/hbm/main/ResourceManager.java index 8446204cc..2e5ba72d0 100644 --- a/com/hbm/main/ResourceManager.java +++ b/com/hbm/main/ResourceManager.java @@ -187,6 +187,8 @@ public class ResourceManager { //Press public static final ResourceLocation press_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/press_body.png"); public static final ResourceLocation press_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/press_head.png"); + public static final ResourceLocation epress_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/epress_body.png"); + public static final ResourceLocation epress_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/epress_head.png"); //Chemplant public static final ResourceLocation chemplant_new_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_main_new.png"); diff --git a/com/hbm/render/tileentity/RenderEPress.java b/com/hbm/render/tileentity/RenderEPress.java new file mode 100644 index 000000000..7639d1173 --- /dev/null +++ b/com/hbm/render/tileentity/RenderEPress.java @@ -0,0 +1,82 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.main.ResourceManager; +import com.hbm.tileentity.machine.TileEntityMachinePress; + +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +public class RenderEPress extends TileEntitySpecialRenderer { + + private RenderItem itemRenderer; + private RenderManager renderManager = RenderManager.instance; + + public RenderEPress() { } + + @Override + public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glRotatef(180, 0F, 1F, 0F); + + this.bindTexture(ResourceManager.epress_body_tex); + + ResourceManager.epress_body.renderAll(); + + GL11.glPopMatrix(); + + renderTileEntityAt2(tileentity, x, y, z, f); + } + + public void renderTileEntityAt2(TileEntity tileEntity, double x, double y, double z, float f) { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y + 1 + 1 - 0.125, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glRotatef(180, 0F, 1F, 0F); + + //TileEntityMachinePress press = (TileEntityMachinePress)tileEntity; + //float f1 = press.progress * (1 - 0.125F) / press.maxProgress; + //GL11.glTranslated(0, -f1, 0); + + this.bindTexture(ResourceManager.epress_head_tex); + + ResourceManager.epress_head.renderAll(); + + GL11.glPopMatrix(); + + //renderTileEntityAt3(tileEntity, x, y, z, f); + } + + public void renderTileEntityAt3(TileEntity tileEntity, double x, double y, double z, float f) { + itemRenderer = new RenderDecoItem(this); + itemRenderer.setRenderManager(renderManager); + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y + 1, z - 0.5); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glRotatef(180, 0F, 1F, 0F); + GL11.glRotatef(-90, 1F, 0F, 0F); + + TileEntityMachinePress press = (TileEntityMachinePress)tileEntity; + ItemStack stack = new ItemStack(Item.getItemById(press.item), 1, press.meta); + + if(!(stack.getItem() instanceof ItemBlock)) { + EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack); + + RenderItem.renderInFrame = true; + GL11.glTranslatef(0.0F, 1.0F - 0.0625F * 165/100, 0.0F); + this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); + RenderItem.renderInFrame = false; + } + + GL11.glPopMatrix(); + } +} diff --git a/com/hbm/tileentity/machine/TileEntityMachineEPress.java b/com/hbm/tileentity/machine/TileEntityMachineEPress.java new file mode 100644 index 000000000..491283acd --- /dev/null +++ b/com/hbm/tileentity/machine/TileEntityMachineEPress.java @@ -0,0 +1,7 @@ +package com.hbm.tileentity.machine; + +import net.minecraft.tileentity.TileEntity; + +public class TileEntityMachineEPress extends TileEntity { + +}