Rigged power cell function, blaster cell retextured, recipes

This commit is contained in:
HbmMods 2018-02-10 23:38:51 +01:00
parent 9b9734b15e
commit d0a9a5cbf9
10 changed files with 103 additions and 5 deletions

View File

@ -1019,6 +1019,7 @@ item.gun_mp40_ammo.name=SMG-Patrone
item.gun_uboinik_ammo.name=12x70 Schrotmunition
item.gun_lever_action_ammo.name=12x74 Schrotmunition
item.gun_bolt_action_ammo.name=12x74 Brenneke
item.gun_b92_ammo.name=§9B92-Energiezelle§r
item.gun_xvl1456_ammo.name=Kiste mit erschöpftem Uran-235
item.gun_osipr_ammo.name=Dunkler Energiepuls-Plug
item.gun_osipr_ammo2.name=Combine Ball
@ -1032,6 +1033,8 @@ item.gun_hp_ammo.name=Tintenpatrone
item.gun_euthanasia_ammo.name=Spritze
item.gun_defabricator_ammo.name=Defabrikator-Energiezelle
item.weaponized_starblaster_cell.name=§cManipulierte Sternenblaster-Energiezelle§r
item.turret_light_ammo.name=Leichte MG Munitionskiste
item.turret_heavy_ammo.name=Schwere MG Munition
item.turret_rocket_ammo.name=Raketengeschütz 2x4 Munition

View File

@ -1022,6 +1022,7 @@ item.gun_mp40_ammo.name=Submachine Gun Round
item.gun_uboinik_ammo.name=12x70 Buckshot
item.gun_lever_action_ammo.name=12x74 Buckshot
item.gun_bolt_action_ammo.name=12x74 Slug
item.gun_b92_ammo.name=§9B92 Energy Cell§r
item.gun_xvl1456_ammo.name=Depleted Uranium-235 Box
item.gun_osipr_ammo.name=Dark Energy Pulse Plug
item.gun_osipr_ammo2.name=Combine Ball
@ -1035,6 +1036,8 @@ item.gun_hp_ammo.name=Ink Cartridge
item.gun_euthanasia_ammo.name=Syringe
item.gun_defabricator_ammo.name=Defabricator Energy Cell
item.weaponized_starblaster_cell.name=§cRigged Star Blaster Energy Cell§r
item.turret_light_ammo.name=Light MG Turret Ammo Box
item.turret_heavy_ammo.name=Heavy MG Turret Ammunition
item.turret_rocket_ammo.name=Rocket Turret 2x4 Ammunition

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

View File

@ -1,5 +1,7 @@
package com.hbm.handler;
import java.util.Arrays;
public class FluidTypeHandler {
public enum FluidType {
@ -110,6 +112,10 @@ public class FluidTypeHandler {
return FluidType.NONE;
}
public int getID() {
return Arrays.asList(FluidType.values()).indexOf(this);
}
public String getName() {
return this.toString();
}

View File

@ -752,6 +752,8 @@ public class ModItems {
public static Item grenade_black_hole;
public static Item ullapool_caber;
public static Item weaponized_starblaster_cell;
public static Item bomb_waffle;
public static Item schnitzel_vegan;
public static Item cotton_candy;
@ -1776,7 +1778,7 @@ public class ModItems {
gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
gun_bolt_action = new GunBoltAction().setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_bolt_action");
gun_bolt_action_green = new GunBoltAction().setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_b92_ammo");
gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_b92_ammo_alt");
gun_b92 = new GunB92().setUnlocalizedName("gun_b92").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_b92");
gun_xvl1456_ammo = new Item().setUnlocalizedName("gun_xvl1456_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_xvl1456_ammo");
gun_xvl1456 = new GunXVL1456().setUnlocalizedName("gun_xvl1456").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_xvl1456");
@ -1834,6 +1836,8 @@ public class ModItems {
grenade_zomg = new ItemGrenade().setUnlocalizedName("grenade_zomg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_zomg");
grenade_black_hole = new ItemGrenade().setUnlocalizedName("grenade_black_hole").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_black_hole");
ullapool_caber = new WeaponSpecial(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("ullapool_caber").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":ullapool_caber");
weaponized_starblaster_cell = new WeaponizedCell().setUnlocalizedName("weaponized_starblaster_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_b92_ammo_weaponized");
bomb_waffle = new ItemWaffle(20, false).setUnlocalizedName("bomb_waffle").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":bomb_waffle");
schnitzel_vegan = new ItemSchnitzelVegan(0, true).setUnlocalizedName("schnitzel_vegan").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":schnitzel_vegan");
@ -2025,9 +2029,9 @@ public class ModItems {
chemistry_icon = new ItemChemistryIcon().setUnlocalizedName("chemistry_icon").setMaxStackSize(1).setCreativeTab(null);
fluid_identifier = new ItemFluidIdentifier().setUnlocalizedName("fluid_identifier").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":fluid_identifier");
fluid_icon = new ItemFluidIcon().setUnlocalizedName("fluid_icon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":fluid_icon");
fluid_tank_full = new ItemFluidTank().setUnlocalizedName("fluid_tank_full").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_tank");
fluid_tank_full = new ItemFluidTank().setUnlocalizedName("fluid_tank_full").setContainerItem(ModItems.fluid_tank_empty).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_tank");
fluid_tank_empty = new Item().setUnlocalizedName("fluid_tank_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_tank");
fluid_barrel_full = new ItemFluidTank().setUnlocalizedName("fluid_barrel_full").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_barrel");
fluid_barrel_full = new ItemFluidTank().setUnlocalizedName("fluid_barrel_full").setContainerItem(ModItems.fluid_barrel_empty).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_barrel");
fluid_barrel_empty = new Item().setUnlocalizedName("fluid_barrel_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_barrel");
fluid_barrel_infinite = new Item().setUnlocalizedName("fluid_barrel_infinite").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fluid_barrel_infinite");
siren_track = new ItemCassette().setUnlocalizedName("siren_track").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":cassette");
@ -3117,6 +3121,7 @@ public class ModItems {
GameRegistry.registerItem(grenade_zomg, grenade_zomg.getUnlocalizedName());
GameRegistry.registerItem(grenade_black_hole, grenade_black_hole.getUnlocalizedName());
GameRegistry.registerItem(ullapool_caber, ullapool_caber.getUnlocalizedName());
GameRegistry.registerItem(weaponized_starblaster_cell, weaponized_starblaster_cell.getUnlocalizedName());
//Capes
GameRegistry.registerItem(cape_radiation, cape_radiation.getUnlocalizedName());

View File

@ -23,9 +23,11 @@ public class GunB92Cell extends Item {
for(int j = 0; j < player.inventory.mainInventory.length; j++) {
if(player.inventory.mainInventory[j] != null && player.inventory.mainInventory[j].getItem() == ModItems.gun_b92) {
int p = getPower(player.inventory.mainInventory[j]);
if(p > 0) {
if(p > 1) {
setPower(player.inventory.mainInventory[j], p - 1);
setPower(stack, getPower(stack) + 1);
if(getPower(stack) == 25)
stack.setItemDamage(1);
return;
}
}
@ -63,5 +65,11 @@ public class GunB92Cell extends Item {
stack.stackTagCompound.setInteger("energy", i);
}
public static ItemStack getFullCell() {
ItemStack stack = new ItemStack(ModItems.gun_b92_ammo, 1, 1);
setPower(stack, 25);
return stack.copy();
}
}

View File

@ -0,0 +1,69 @@
package com.hbm.items.weapon;
import java.util.List;
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class WeaponizedCell extends Item {
public boolean onEntityItemUpdate(EntityItem item)
{
World world = item.worldObj;
if(item.ticksExisted > 60 * 20 || item.isBurning()) {
if(!world.isRemote) {
world.playSoundEffect(item.posX, item.posY, item.posZ,
"random.explode", 100.0f, world.rand.nextFloat() * 0.1F + 0.9F);
EntityNukeExplosionMK3 exp = new EntityNukeExplosionMK3(world);
exp.posX = item.posX;
exp.posY = item.posY;
exp.posZ = item.posZ;
exp.destructionRange = 100;
exp.speed = 25;
exp.coefficient = 1.0F;
exp.waste = false;
world.spawnEntityInWorld(exp);
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(world, 100);
cloud.posX = item.posX;
cloud.posY = item.posY;
cloud.posZ = item.posZ;
world.spawnEntityInWorld(cloud);
}
}
int randy = (60 * 20) - item.ticksExisted;
System.out.println(randy);
if(randy < 1)
randy = 1;
if(item.worldObj.rand.nextInt(60 * 20) >= randy)
world.spawnParticle("reddust", item.posX + item.worldObj.rand.nextGaussian() * item.width / 2, item.posY + item.worldObj.rand.nextGaussian() * item.height, item.posZ + item.worldObj.rand.nextGaussian() * item.width / 2, 0.0, 0.0, 0.0);
else
world.spawnParticle("smoke", item.posX + item.worldObj.rand.nextGaussian() * item.width / 2, item.posY + item.worldObj.rand.nextGaussian() * item.height, item.posZ + item.worldObj.rand.nextGaussian() * item.width / 2, 0.0, 0.0, 0.0);
if(randy < 100)
world.spawnParticle("lava", item.posX + item.worldObj.rand.nextGaussian() * item.width / 2, item.posY + item.worldObj.rand.nextGaussian() * item.height, item.posZ + item.worldObj.rand.nextGaussian() * item.width / 2, 0.0, 0.0, 0.0);
return false;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("A charged energ cell, rigged to explode");
list.add("when left on the floor for too long.");
}
}

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (oof)";
public static final String VERSION = "1.0.27 BETA (Pistachio Sherbet)";
//HBM's Beta Naming Convention:
//V T (X-Y-Z)
//V -> next release version

View File

@ -1,8 +1,10 @@
package com.hbm.main;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemBattery;
import com.hbm.items.weapon.GunB92Cell;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.init.Blocks;
@ -709,6 +711,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_green, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', "ingotIron", 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_ammo, 2), new Object[] { "P", "S", "G", 'P', "nuggetLead", 'S', ModItems.plate_polymer, 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b92, 1), new Object[] { "SSS", " EP", 'P', "ingotPolymer", 'S', ModItems.ingot_starmetal, 'E', ModItems.powder_spark_mix }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b92_ammo, 1), new Object[] { "PSP", "ESE", "PSP", 'P', "plateSteel", 'S', ModItems.ingot_starmetal, 'E', ModItems.powder_spark_mix }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.weaponized_starblaster_cell, 1), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, FluidType.ACID.getID()), GunB92Cell.getFullCell(), ModItems.wire_copper });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_light_ammo, 1), new Object[] { " L ", "IGI", "ICI", 'L', "plateLead", 'I', "plateIron", 'C', "plateCopper", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_heavy_ammo, 1), new Object[] { "LGC", "LGC", "LGC", 'L', "plateLead", 'C', "plateCopper", 'G', Items.gunpowder }));