mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
two-smack jack's signature weapon
This commit is contained in:
parent
69fc93a432
commit
fe48a47c95
@ -199,6 +199,7 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.neutrino_lens, 1), new Object[] { "PSP", "SCS", "PSP", 'P', ANY_PLASTIC.ingot(), 'S', STAR.ingot(), 'C', KEY_CIRCUIT_BISMUTH });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_tester, 1), new Object[] { "G", "C", "I", 'G', GOLD.plate(), 'C', ModItems.circuit_aluminium, 'I', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.defuser_gold, 1), new Object[] { "GPG", "PRP", "GPG", 'G', Items.gunpowder, 'P', GOLD.plate(), 'R', "record" });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ballistic_gauntlet, 1), new Object[] { " WS", "WRS", " RS", 'W', ModItems.wire_copper, 'R', ModItems.ring_starmetal, 'S', STEEL.plate() });
|
||||
|
||||
//Stealth boy
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.stealth_boy, 1), new Object[] { " B", "LI", "LC", 'B', Blocks.stone_button, 'L', Items.leather, 'I', STEEL.ingot(), 'C', ModItems.circuit_red_copper });
|
||||
|
||||
@ -218,8 +218,8 @@ public class Fluids {
|
||||
SOLVENT = new FluidType("SOLVENT", 0xE4E3EF, 2, 3, 0, EnumSymbol.NONE).addContainers(0xE4E3EF, ExtContainer.CANISTER).addTraits(LIQUID);
|
||||
BLOOD = new FluidType("BLOOD", 0xB22424, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
BLOOD_HOT = new FluidType("BLOOD_HOT", 0xE4E3EF, 3, 0, 0, EnumSymbol.NONE).addTraits(LIQUID).setTemp(666); //it's funny because it's the satan number
|
||||
SYNGAS = new FluidType("SYNGAS", 0x131313, 3, 0, 0, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
OXYHYDROGEN = new FluidType(87, "OXYHYDROGEN", 0x483FC1, 3, 0, 0, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
SYNGAS = new FluidType("SYNGAS", 0x131313, 1, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
OXYHYDROGEN = new FluidType(87, "OXYHYDROGEN", 0x483FC1, 0, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
|
||||
@ -1,8 +1,15 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineTurbineGas;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -125,8 +132,16 @@ public class GUIMachineTurbineGas extends GuiInfoContainer {
|
||||
|
||||
String[] info = I18nUtil.resolveKeyArray("desc.gui.turbinegas.automode");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 34, 16, 16, guiLeft - 8, guiTop + 44 + 16, info);
|
||||
String[] fuels = I18nUtil.resolveKeyArray("desc.gui.turbinegas.fuels");
|
||||
|
||||
List<String> fuels = new ArrayList();
|
||||
fuels.add(I18nUtil.resolveKey("desc.gui.turbinegas.fuels"));
|
||||
for(FluidType type : Fluids.getInNiceOrder()) {
|
||||
if(type.hasTrait(FT_Combustible.class) && type.getTrait(FT_Combustible.class).getGrade() == FuelGrade.GAS) {
|
||||
fuels.add(" " + I18nUtil.resolveKey(type.getUnlocalizedName()));
|
||||
}
|
||||
}
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 34 + 16, 16, 16, guiLeft - 8, guiTop + 44 + 16, fuels);
|
||||
|
||||
String[] warning = I18nUtil.resolveKeyArray("desc.gui.turbinegas.warning");
|
||||
if(turbinegas.tanks[0].getFill() < 5000 || turbinegas.tanks[1].getFill() < 1000)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 34 + 32, 16, 16, guiLeft - 8, guiTop + 44 + 16, warning);
|
||||
|
||||
@ -2339,6 +2339,7 @@ public class ModItems {
|
||||
public static Item neutrino_lens;
|
||||
public static Item gas_tester;
|
||||
public static Item defuser_gold;
|
||||
public static Item ballistic_gauntlet;
|
||||
|
||||
public static Item hazmat_helmet;
|
||||
public static Item hazmat_plate;
|
||||
@ -3586,6 +3587,7 @@ public class ModItems {
|
||||
neutrino_lens = new ItemModLens().setUnlocalizedName("neutrino_lens").setTextureName(RefStrings.MODID + ":neutrino_lens");
|
||||
gas_tester = new ItemModSensor().setUnlocalizedName("gas_tester").setTextureName(RefStrings.MODID + ":gas_tester");
|
||||
defuser_gold = new ItemModDefuser().setUnlocalizedName("defuser_gold").setTextureName(RefStrings.MODID + ":defuser_gold");
|
||||
ballistic_gauntlet = new ItemModTwoKick().setUnlocalizedName("ballistic_gauntlet").setTextureName(RefStrings.MODID + ":ballistic_gauntlet");
|
||||
|
||||
cap_nuka = new Item().setUnlocalizedName("cap_nuka").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_nuka");
|
||||
cap_quantum = new Item().setUnlocalizedName("cap_quantum").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_quantum");
|
||||
@ -7953,6 +7955,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(neutrino_lens, neutrino_lens.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_tester, gas_tester.getUnlocalizedName());
|
||||
GameRegistry.registerItem(defuser_gold, defuser_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ballistic_gauntlet, ballistic_gauntlet.getUnlocalizedName());
|
||||
|
||||
//Chaos
|
||||
GameRegistry.registerItem(chocolate_milk, chocolate_milk.getUnlocalizedName());
|
||||
|
||||
30
src/main/java/com/hbm/items/armor/ItemModTwoKick.java
Normal file
30
src/main/java/com/hbm/items/armor/ItemModTwoKick.java
Normal file
@ -0,0 +1,30 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemModTwoKick extends ItemArmorMod {
|
||||
|
||||
public ItemModTwoKick() {
|
||||
super(ArmorModHandler.servos, false, true, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.ITALIC + "\"I've had worse\"");
|
||||
list.add(EnumChatFormatting.YELLOW + "Punches fire 12 gauge shells");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + " (Shotgun punches)");
|
||||
}
|
||||
}
|
||||
@ -317,11 +317,10 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
}
|
||||
|
||||
if(getReloadCycle(stack) <= 0) {
|
||||
|
||||
|
||||
BulletConfiguration prevCfg = BulletConfigSyncingUtil.pullConfig(mainConfig.config.get(getMagType(stack)));
|
||||
|
||||
if (getMag(stack) == 0)
|
||||
if(getMag(stack) == 0)
|
||||
resetAmmoType(stack, world, player);
|
||||
|
||||
BulletConfiguration cfg = BulletConfigSyncingUtil.pullConfig(mainConfig.config.get(getMagType(stack)));
|
||||
|
||||
@ -25,12 +25,15 @@ import com.hbm.entity.mob.EntityDuck;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.mob.EntityQuackos;
|
||||
import com.hbm.entity.mob.EntityTaintedCreeper;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.entity.projectile.EntityBurningFOEQ;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.BobmazonOfferFactory;
|
||||
import com.hbm.handler.BossSpawnHandler;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.EntityEffectHandler;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
@ -47,6 +50,7 @@ import com.hbm.items.armor.ItemModShackles;
|
||||
import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||
import com.hbm.items.tool.ItemGuideBook.BookType;
|
||||
import com.hbm.items.weapon.ItemGunBase;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -62,6 +66,7 @@ import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.EnchantmentUtil;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.world.generator.TimedGenerator;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
@ -125,6 +130,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
|
||||
import net.minecraftforge.event.entity.player.AttackEntityEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
|
||||
@ -788,6 +794,47 @@ public class ModEventHandler {
|
||||
((ArmorFSB)e.inventory.armorInventory[2].getItem()).handleFall(e);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerPunch(AttackEntityEvent event) {
|
||||
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
ItemStack chestplate = player.inventory.armorInventory[2];
|
||||
|
||||
if(player.getHeldItem() == null && chestplate != null && ArmorModHandler.hasMods(chestplate)) {
|
||||
ItemStack[] mods = ArmorModHandler.pryMods(chestplate);
|
||||
ItemStack servo = mods[ArmorModHandler.servos];
|
||||
|
||||
if(servo != null && servo.getItem() == ModItems.ballistic_gauntlet) {
|
||||
|
||||
BulletConfiguration firedConfig = null;
|
||||
|
||||
for(Integer config : HbmCollection.twelveGauge) {
|
||||
BulletConfiguration cfg = BulletConfigSyncingUtil.pullConfig(config);
|
||||
|
||||
if(InventoryUtil.doesPlayerHaveAStack(player, cfg.ammo, true, true)) {
|
||||
firedConfig = cfg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(firedConfig != null) {
|
||||
int bullets = firedConfig.bulletsMin;
|
||||
|
||||
if(firedConfig.bulletsMax > firedConfig.bulletsMin) {
|
||||
bullets += player.getRNG().nextInt(firedConfig.bulletsMax - firedConfig.bulletsMin);
|
||||
}
|
||||
|
||||
for(int i = 0; i < bullets; i++) {
|
||||
EntityBulletBase bullet = new EntityBulletBase(player.worldObj, BulletConfigSyncingUtil.getKey(firedConfig), player);
|
||||
player.worldObj.spawnEntityInWorld(bullet);
|
||||
}
|
||||
|
||||
player.worldObj.playSoundAtEntity(player, "hbm:weapon.shotgunShoot", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityJump(LivingJumpEvent event) {
|
||||
|
||||
|
||||
@ -57,24 +57,12 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
|
||||
public static HashMap<FluidType, Double> fuelMaxCons = new HashMap(); //fuel consumption per tick at max power
|
||||
|
||||
static {
|
||||
fuelMaxCons.put(Fluids.GAS, 50D);
|
||||
fuelMaxCons.put(Fluids.SYNGAS, 10D);
|
||||
fuelMaxCons.put(Fluids.OXYHYDROGEN, 100D);
|
||||
//fuelMaxCons.put(Fluids.PETROLEUM, 5D);
|
||||
//fuelMaxCons.put(Fluids.LPG, 5D);
|
||||
|
||||
fuelMaxCons.put(Fluids.GAS, 50D); // natgas doesn't burn well so it burns faster to compensate
|
||||
fuelMaxCons.put(Fluids.SYNGAS, 10D); // syngas just fucks
|
||||
fuelMaxCons.put(Fluids.OXYHYDROGEN, 100D); // oxyhydrogen is terrible so it needs to burn a ton for the bare minimum
|
||||
// default to 5 if not in list
|
||||
}
|
||||
|
||||
/*public static HashMap<FluidType, Integer> fuelMaxTemp = new HashMap(); //power production at maxT is half the normal production multiplied by (maxtemp - 300) / 500
|
||||
|
||||
static {
|
||||
fuelMaxTemp.put(Fluids.GAS, 600);
|
||||
fuelMaxTemp.put(Fluids.PETROLEUM, 800);
|
||||
fuelMaxTemp.put(Fluids.LPG, 400);
|
||||
//fuelMaxTemp.put(Fluids.BIOGAS, 500);
|
||||
}*/ //i don't think we need even more variance between fuel types - types already have a combustion value
|
||||
|
||||
//TODO particles from heat exchanger maybe? maybe in a future
|
||||
|
||||
public TileEntityMachineTurbineGas() {
|
||||
|
||||
@ -601,7 +601,7 @@ public class InventoryUtil {
|
||||
if(consumedStacks > requiredStacks)
|
||||
break;
|
||||
if(itemStack != null && stack.matchesRecipe(itemStack, true)) {
|
||||
final int toConsume = Math.min(itemStack.stackSize, requiredStacks - consumedStacks);
|
||||
int toConsume = Math.min(itemStack.stackSize, requiredStacks - consumedStacks);
|
||||
itemStack.stackSize -= toConsume;
|
||||
consumedStacks += toConsume;
|
||||
}
|
||||
|
||||
@ -1043,6 +1043,7 @@ item.balefire_scrambled.name=Rühr-Balefire-Ei
|
||||
item.ball_dynamite.name=Dynamit
|
||||
item.ball_fireclay.name=Schamott
|
||||
item.ball_tnt.name=TNT
|
||||
item.ballistitc_gauntlet.name=Ballistischer Panzerhandschuh
|
||||
item.ballistite.name=Ballistit
|
||||
item.bandaid.name=Samtenes Pflaster
|
||||
item.bathwater.name=Toxisches Seifenwasser
|
||||
|
||||
@ -815,7 +815,7 @@ desc.gui.rtg.pelletHeat=%s (%s heat)
|
||||
desc.gui.rtg.pelletPower=%s (%s HE/tick)
|
||||
desc.gui.template=§9Templates§r$Templates can be made by$using the Machine Template Folder.
|
||||
desc.gui.turbinegas.automode=§2Automatic Turbine Throttling Mode§r$By clicking the "AUTO" button, the turbine$will automatically adjust the power production$based on the power required from the network
|
||||
desc.gui.turbinegas.fuels=§6Accepted fuels:§r$ Natural Gas$ Petroleum Gas$ Biogas$ LPG
|
||||
desc.gui.turbinegas.fuels=§6Accepted fuels:§r
|
||||
desc.gui.turbinegas.warning=§cFuel or lubricant level low!§r
|
||||
desc.gui.upgrade=§lAcceptable Upgrades:§r
|
||||
desc.gui.upgrade.afterburner= * §dAfterburner§r: Stacks to level 3
|
||||
@ -1653,6 +1653,7 @@ item.balefire_scrambled.name=Scrambled Balefire Egg
|
||||
item.ball_dynamite.name=Dynamite
|
||||
item.ball_fireclay.name=Fireclay
|
||||
item.ball_tnt.name=TNT
|
||||
item.ballistitc_gauntlet.name=Ballistic Gauntlet
|
||||
item.ballistite.name=Ballistite
|
||||
item.bandaid.name=Velvet Band-Aid
|
||||
item.bathwater.name=Toxic Soapy Water
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user