mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
stack jetpack tanks to 16, and don't consume them if jetpack is already full
This commit is contained in:
parent
7f0c483cb1
commit
c1a2f8d270
@ -3076,7 +3076,7 @@ public class ModItems {
|
|||||||
gas_mask_filter_combo = new ItemFilter().setUnlocalizedName("gas_mask_filter_combo").setTextureName(RefStrings.MODID + ":gas_mask_filter_combo");
|
gas_mask_filter_combo = new ItemFilter().setUnlocalizedName("gas_mask_filter_combo").setTextureName(RefStrings.MODID + ":gas_mask_filter_combo");
|
||||||
gas_mask_filter_rag = new ItemFilter().setUnlocalizedName("gas_mask_filter_rag").setTextureName(RefStrings.MODID + ":gas_mask_filter_rag");
|
gas_mask_filter_rag = new ItemFilter().setUnlocalizedName("gas_mask_filter_rag").setTextureName(RefStrings.MODID + ":gas_mask_filter_rag");
|
||||||
gas_mask_filter_piss = new ItemFilter().setUnlocalizedName("gas_mask_filter_piss").setTextureName(RefStrings.MODID + ":gas_mask_filter_piss");
|
gas_mask_filter_piss = new ItemFilter().setUnlocalizedName("gas_mask_filter_piss").setTextureName(RefStrings.MODID + ":gas_mask_filter_piss");
|
||||||
jetpack_tank = new ItemSyringe().setUnlocalizedName("jetpack_tank").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":jetpack_tank");
|
jetpack_tank = new ItemSyringe().setUnlocalizedName("jetpack_tank").setMaxStackSize(16).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":jetpack_tank");
|
||||||
gun_kit_1 = new ItemRepairKit(10).setUnlocalizedName("gun_kit_1").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gun_kit_1");
|
gun_kit_1 = new ItemRepairKit(10).setUnlocalizedName("gun_kit_1").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gun_kit_1");
|
||||||
gun_kit_2 = new ItemRepairKit(100).setUnlocalizedName("gun_kit_2").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gun_kit_2");
|
gun_kit_2 = new ItemRepairKit(100).setUnlocalizedName("gun_kit_2").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gun_kit_2");
|
||||||
cbt_device = new ItemSyringe().setUnlocalizedName("cbt_device").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":cbt_device");
|
cbt_device = new ItemSyringe().setUnlocalizedName("cbt_device").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":cbt_device");
|
||||||
|
|||||||
@ -287,14 +287,13 @@ public class ItemSyringe extends Item {
|
|||||||
if(!fillable.acceptsFluid(Fluids.KEROSENE, jetpack))
|
if(!fillable.acceptsFluid(Fluids.KEROSENE, jetpack))
|
||||||
return stack;
|
return stack;
|
||||||
|
|
||||||
fillable.tryFill(Fluids.KEROSENE, 1000, jetpack);
|
if(fillable.tryFill(Fluids.KEROSENE, 1000, jetpack) < 1000) {
|
||||||
|
world.playSoundAtEntity(player, "hbm:item.jetpackTank", 1.0F, 1.0F);
|
||||||
|
stack.stackSize--;
|
||||||
|
}
|
||||||
|
|
||||||
if(jetpack.getItem() != player.inventory.armorInventory[2].getItem())
|
if(jetpack.getItem() != player.inventory.armorInventory[2].getItem())
|
||||||
ArmorModHandler.applyMod(player.inventory.armorInventory[2], jetpack);
|
ArmorModHandler.applyMod(player.inventory.armorInventory[2], jetpack);
|
||||||
|
|
||||||
world.playSoundAtEntity(player, "hbm:item.jetpackTank", 1.0F, 1.0F);
|
|
||||||
|
|
||||||
stack.stackSize--;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user