finished fstbmb, extra slots for launchpads, guided rockets
@ -273,6 +273,9 @@ item.solinium_core.name=Semistabiler Soliniumkern
|
||||
|
||||
item.n2_charge.name=Große Sprengladung
|
||||
|
||||
item.egg_balefire_shard.name=Balefire-Scherbe
|
||||
item.egg_balefire.name=Balefire-Ei
|
||||
|
||||
item.custom_tnt.name=AB - Sprengladung
|
||||
item.custom_nuke.name=AB - Nukleares Element
|
||||
item.custom_hydro.name=AB - Wasserstoffelement
|
||||
@ -378,7 +381,7 @@ tile.struct_launcher.name=Startrampe-Komponentenblock
|
||||
tile.struct_scaffold.name=Startrampe-Gerüstblock
|
||||
tile.struct_launcher_core.name=Kompaktrampe-Kernkomponente
|
||||
tile.struct_launcher_core_large.name=Startrampe-Kernkomponente
|
||||
tile.struct_soyuz_launcher.name=Soyuz-Startrampe-Kernkomponente
|
||||
tile.struct_soyuz_core.name=Soyuz-Startrampe-Kernkomponente
|
||||
|
||||
tile.machine_difurnace_off.name=Hochofen
|
||||
tile.machine_difurnace_on.name=Hochofen
|
||||
@ -1296,6 +1299,7 @@ item.gun_stinger.name=FIM-92 Stinger
|
||||
item.gun_skystinger.name=The One Sky Stinger
|
||||
item.gun_stinger_ammo.name=Stinger-Rakete
|
||||
item.gun_hk69.name=Granatenpistole
|
||||
item.gun_quadro.name=Quattro Formaggi
|
||||
|
||||
item.flame_pony.name=Bild eines Cartoon Ponys
|
||||
item.flame_conspiracy.name=Verschwörungstheorie
|
||||
@ -1457,6 +1461,8 @@ item.apple_schrabidium.name=Schrabidiumapfel
|
||||
item.cotton_candy.name=Radioaktive Zuckerwatte
|
||||
item.tem_flakes.name=Tem Flakes
|
||||
item.glowing_stew.name=Leuchtende Pilzsuppe
|
||||
item.balefire_scrambled.name=Rühr-Balefire-Ei
|
||||
item.balefire_and_ham.name=Ham and Balefire-Eggs
|
||||
item.lemon.name="Zitrone"
|
||||
item.definitelyfood.name=GarantiertKeinDreck-Marken Feldration
|
||||
item.loops.name=Lüüps
|
||||
@ -1555,7 +1561,7 @@ item.gun_calamity_ammo.name=.50 BMG Patrone (LEGACY)
|
||||
item.gun_lacunae_ammo.name=5mm Patrone (LEGACY)
|
||||
item.gun_fatman_ammo.name=Miniatombombe
|
||||
item.gun_mirv_ammo.name=Achtfaches MIRV
|
||||
item.gun_bf_ammo.name=Mk.V kompaktes AMAT-Artilleriegeschoss - Typ B.F.
|
||||
item.gun_bf_ammo.name=Balefire-Geschoss
|
||||
item.gun_mp40_ammo.name=SMG-Patrone (LEGACY)
|
||||
item.gun_uzi_ammo.name=.22 lfB Patrone (LEGACY)
|
||||
item.gun_uboinik_ammo.name=12x70 Schrotmunition (LEGACY)
|
||||
|
||||
@ -273,6 +273,9 @@ item.solinium_core.name=Semi-Stable Solinium Core
|
||||
|
||||
item.n2_charge.name=Large Explosive Charge
|
||||
|
||||
item.egg_balefire_shard.name=Balefire Shard
|
||||
item.egg_balefire.name=Balefire Egg
|
||||
|
||||
item.custom_tnt.name=Custom Nuke Explosive Charge
|
||||
item.custom_nuke.name=Custom Nuke Nuclear Rod
|
||||
item.custom_hydro.name=Custom Nuke Hydrogen Rod
|
||||
@ -378,7 +381,7 @@ tile.struct_launcher.name=Launch Pad Component Block
|
||||
tile.struct_scaffold.name=Launch Pad Scaffold Block
|
||||
tile.struct_launcher_core.name=Compact Launcher Core Component
|
||||
tile.struct_launcher_core_large.name=Launch Table Core Component
|
||||
tile.struct_soyuz_launcher.name=Soyuz Launcher Core Component
|
||||
tile.struct_soyuz_core.name=Soyuz Launcher Core Component
|
||||
|
||||
tile.machine_difurnace_off.name=Blast Furnace
|
||||
tile.machine_difurnace_on.name=Blast Furnace
|
||||
@ -1302,6 +1305,7 @@ item.gun_stinger.name=FIM-92 Stinger
|
||||
item.gun_skystinger.name=The One Sky Stinger
|
||||
item.gun_stinger_ammo.name=Stinger Rocket
|
||||
item.gun_hk69.name=Grenade Pistol
|
||||
item.gun_quadro.name=Quattro Formaggi
|
||||
|
||||
item.flame_pony.name=Painting of a Cartoon Pony
|
||||
item.flame_conspiracy.name=Conspiracy Theory
|
||||
@ -1463,6 +1467,8 @@ item.apple_schrabidium.name=Schrabidium Apple
|
||||
item.cotton_candy.name=Radioactive Cotton Candy
|
||||
item.tem_flakes.name=Tem Flakes
|
||||
item.glowing_stew.name=Glowing Mushroom Stew
|
||||
item.balefire_scrambled.name=Scrambled Balefire Egg
|
||||
item.balefire_and_ham.name=Ham and Balefire Eggs
|
||||
item.lemon.name="Lemon"
|
||||
item.definitelyfood.name=TotallyNotDirt-Brand MRE
|
||||
item.loops.name=Lööps
|
||||
@ -1561,7 +1567,7 @@ item.gun_calamity_ammo.name=.50 BMG Round (LEGACY)
|
||||
item.gun_lacunae_ammo.name=5mm Round (LEGACY)
|
||||
item.gun_fatman_ammo.name=Mini Nuke
|
||||
item.gun_mirv_ammo.name=Eightfold MIRV
|
||||
item.gun_bf_ammo.name=Mk.V Compact AMAT-Artillery Shell - Type B.F.
|
||||
item.gun_bf_ammo.name=Balefire Shell
|
||||
item.gun_mp40_ammo.name=Submachine Gun Round (LEGACY)
|
||||
item.gun_uzi_ammo.name=.22 LR Round (LEGACY)
|
||||
item.gun_uboinik_ammo.name=12x70 Buckshot (LEGACY)
|
||||
|
||||
2499
src/main/java/assets/hbm/models/machines/refinery_small.obj
Normal file
@ -132,6 +132,8 @@
|
||||
"weapon.glauncher": {"category": "player", "sounds": ["weapon/glauncher1", "weapon/glauncher2"]},
|
||||
"weapon.bodysplat": {"category": "player", "sounds": [{"name": "weapon/bodysplat", "stream": false}]},
|
||||
"weapon.quadroReload": {"category": "player", "sounds": [{"name": "weapon/quadroReload", "stream": false}]},
|
||||
"weapon.fstbmbStart": {"category": "player", "sounds": [{"name": "weapon/fstbmbStart", "stream": false}]},
|
||||
"weapon.fstbmbPing": {"category": "player", "sounds": [{"name": "weapon/fstbmbPing", "stream": false}]},
|
||||
|
||||
"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
|
||||
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},
|
||||
|
||||
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 4.4 KiB |
BIN
src/main/java/assets/hbm/textures/items/balefire_and_ham.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
src/main/java/assets/hbm/textures/items/balefire_scrambled.png
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
src/main/java/assets/hbm/textures/items/egg_balefire_shard.png
Normal file
|
After Width: | Height: | Size: 277 B |
BIN
src/main/java/assets/hbm/textures/items/gun_quadro.png
Normal file
|
After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 297 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 194 B |
|
After Width: | Height: | Size: 109 B |
BIN
src/main/java/assets/hbm/textures/models/machines/hatch.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 13 KiB |
@ -6,12 +6,15 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityCrashedBomb;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
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.tileentity.TileEntity;
|
||||
@ -71,6 +74,25 @@ public class BlockCrashedBomb extends BlockContainer implements IBomb {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float fx, float fy, float fz) {
|
||||
|
||||
if(world.isRemote)
|
||||
return true;
|
||||
|
||||
if (player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.defuser) {
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.egg_balefire_shard)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.plate_steel, 10 + world.rand.nextInt(15))));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.plate_titanium, 2 + world.rand.nextInt(7))));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(World world, int x, int y, int z) {
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.blocks.machine.BlockMachineBase;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeBalefire;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class NukeBalefire extends BlockMachineBase {
|
||||
public class NukeBalefire extends BlockMachineBase implements IBomb {
|
||||
|
||||
public NukeBalefire(Material mat, int guiID) {
|
||||
super(mat, guiID);
|
||||
@ -34,4 +36,23 @@ public class NukeBalefire extends BlockMachineBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
|
||||
|
||||
if (world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||
explode(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(World world, int x, int y, int z) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntityNukeBalefire bomb = (TileEntityNukeBalefire) world.getTileEntity(x, y, z);
|
||||
|
||||
if(bomb.isLoaded())
|
||||
bomb.explode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -80,6 +80,50 @@ public class ExplosionBalefire
|
||||
}
|
||||
|
||||
private void breakColumn(int x, int z)
|
||||
{
|
||||
int dist = (int) (radius - Math.sqrt(x * x + z * z));
|
||||
|
||||
if (dist > 0) {
|
||||
int pX = posX + x;
|
||||
int pZ = posZ + z;
|
||||
|
||||
int y = worldObj.getHeightValue(pX, pZ);
|
||||
int maxdepth = (int) (10 + radius * 0.25);
|
||||
int depth = (int) ((maxdepth * dist / radius) + (Math.sin(dist * 0.15 + 2) * 2));//
|
||||
|
||||
depth = Math.max(y - depth, 0);
|
||||
|
||||
while(y > depth) {
|
||||
|
||||
if(worldObj.getBlock(pX, y, pZ) == ModBlocks.block_schrabidium_cluster) {
|
||||
|
||||
if(worldObj.rand.nextInt(10) == 0) {
|
||||
worldObj.setBlock(pX, y + 1, pZ, ModBlocks.balefire);
|
||||
worldObj.setBlock(pX, y, pZ, ModBlocks.block_euphemium_cluster, worldObj.getBlockMetadata(pX, y, pZ), 3);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
worldObj.setBlockToAir(pX, y, pZ);
|
||||
|
||||
y--;
|
||||
}
|
||||
|
||||
if(worldObj.rand.nextInt(10) == 0) {
|
||||
worldObj.setBlock(pX, depth + 1, pZ, ModBlocks.balefire);
|
||||
|
||||
if(worldObj.getBlock(pX, y, pZ) == ModBlocks.block_schrabidium_cluster)
|
||||
worldObj.setBlock(pX, y, pZ, ModBlocks.block_euphemium_cluster, worldObj.getBlockMetadata(pX, y, pZ), 3);
|
||||
}
|
||||
|
||||
for(int i = depth; i > depth - 5; i--) {
|
||||
if(worldObj.getBlock(pX, i, pZ) == Blocks.stone)
|
||||
worldObj.setBlock(pX, i, pZ, ModBlocks.sellafield_slaked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*private void breakColumn(int x, int z)
|
||||
{
|
||||
int dist = this.radius2 - (x * x + z * z);
|
||||
if (dist > 0)
|
||||
@ -87,7 +131,7 @@ public class ExplosionBalefire
|
||||
int pX = posX + x;
|
||||
int pZ = posZ + z;
|
||||
|
||||
int y = worldObj.getHeightValue(pX, pZ);
|
||||
int y = worldObj.getHeightValue(pX, pZ);
|
||||
float strength = (float)dist / (float) this.radius;
|
||||
|
||||
while(y > 0) {
|
||||
@ -126,5 +170,5 @@ public class ExplosionBalefire
|
||||
y--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@ -277,6 +277,9 @@ public class BulletConfigFactory {
|
||||
if(bullet.shooter == null || !(bullet.shooter instanceof EntityPlayer))
|
||||
return;
|
||||
|
||||
if(Vec3.createVectorHelper(bullet.posX - bullet.shooter.posX, bullet.posY - bullet.shooter.posY, bullet.posZ - bullet.shooter.posZ).lengthVector() > 100)
|
||||
return;
|
||||
|
||||
MovingObjectPosition mop = Library.rayTrace((EntityPlayer)bullet.shooter, 200, 1);
|
||||
|
||||
if(mop == null || mop.hitVec == null)
|
||||
|
||||
@ -18,10 +18,12 @@ public class ContainerCompactLauncher extends Container {
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 26, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 26, 72));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 134, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 90 - 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 134, 90 - 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 152, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 5, 116, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 6, 116, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 7, 134, 90));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
@ -48,13 +50,13 @@ public class ContainerCompactLauncher extends Container {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 1) {
|
||||
if (!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true))
|
||||
if (par2 <= 7) {
|
||||
if (!this.mergeItemStack(var5, 8, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
else if (!this.mergeItemStack(var5, 0, 8, false))
|
||||
return null;
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
|
||||
@ -18,10 +18,12 @@ public class ContainerLaunchTable extends Container {
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 26, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 26, 72));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 134, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 90 - 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 134, 90 - 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 152, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 5, 116, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 6, 116, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 7, 134, 90));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
@ -48,13 +50,13 @@ public class ContainerLaunchTable extends Container {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 1) {
|
||||
if (!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true))
|
||||
if (par2 <= 7) {
|
||||
if (!this.mergeItemStack(var5, 8, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
else if (!this.mergeItemStack(var5, 0, 8, false))
|
||||
return null;
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
|
||||
@ -32,8 +32,8 @@ public class GUIMachineCompactLauncher extends GuiInfoContainer {
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 88 - 52, 16, 52);
|
||||
launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 88 - 52, 16, 52);
|
||||
launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 36, 16, 34);
|
||||
launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 36, 16, 34);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 88 - 52, 16, 52, new String[] { "Solid Fuel: " + launcher.solid + "l" });
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 113, 34, 6, launcher.power, launcher.maxPower);
|
||||
|
||||
@ -89,10 +89,10 @@ public class GUIMachineCompactLauncher extends GuiInfoContainer {
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 11);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(launcher.tanks[0].getSheet());
|
||||
launcher.tanks[0].renderTank(this, guiLeft + 116, guiTop + 88, launcher.tanks[0].getTankType().textureX() * FluidTank.x, launcher.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
launcher.tanks[0].renderTank(this, guiLeft + 116, guiTop + 70, launcher.tanks[0].getTankType().textureX() * FluidTank.x, launcher.tanks[0].getTankType().textureY() * FluidTank.y, 16, 34);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(launcher.tanks[1].getSheet());
|
||||
launcher.tanks[1].renderTank(this, guiLeft + 134, guiTop + 88, launcher.tanks[1].getTankType().textureX() * FluidTank.x, launcher.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
launcher.tanks[1].renderTank(this, guiLeft + 134, guiTop + 70, launcher.tanks[1].getTankType().textureX() * FluidTank.x, launcher.tanks[1].getTankType().textureY() * FluidTank.y, 16, 34);
|
||||
|
||||
/// DRAW MISSILE START
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -37,8 +37,8 @@ public class GUIMachineLaunchTable extends GuiInfoContainer {
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 88 - 52, 16, 52);
|
||||
launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 88 - 52, 16, 52);
|
||||
launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 36, 16, 34);
|
||||
launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 36, 16, 34);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 88 - 52, 16, 52, new String[] { "Solid Fuel: " + launcher.solid + "l" });
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 113, 34, 6, launcher.power, launcher.maxPower);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 7, guiTop + 98, 18, 18, new String[] { "Size 10 & 10/15" });
|
||||
@ -135,10 +135,10 @@ public class GUIMachineLaunchTable extends GuiInfoContainer {
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 11);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(launcher.tanks[0].getSheet());
|
||||
launcher.tanks[0].renderTank(this, guiLeft + 116, guiTop + 88, launcher.tanks[0].getTankType().textureX() * FluidTank.x, launcher.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
launcher.tanks[0].renderTank(this, guiLeft + 116, guiTop + 70, launcher.tanks[0].getTankType().textureX() * FluidTank.x, launcher.tanks[0].getTankType().textureY() * FluidTank.y, 16, 34);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(launcher.tanks[1].getSheet());
|
||||
launcher.tanks[1].renderTank(this, guiLeft + 134, guiTop + 88, launcher.tanks[1].getTankType().textureX() * FluidTank.x, launcher.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
launcher.tanks[1].renderTank(this, guiLeft + 134, guiTop + 70, launcher.tanks[1].getTankType().textureX() * FluidTank.x, launcher.tanks[1].getTankType().textureY() * FluidTank.y, 16, 34);
|
||||
|
||||
/// DRAW MISSILE START
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -1,21 +1,27 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerNukeFstbmb;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeBalefire;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUINukeFstbmb extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/fstbmbSchematic.png");
|
||||
private TileEntityNukeBalefire bomb;
|
||||
private GuiTextField timer;
|
||||
|
||||
public GUINukeFstbmb(InventoryPlayer invPlayer, TileEntityNukeBalefire bomb) {
|
||||
super(new ContainerNukeFstbmb(invPlayer, bomb));
|
||||
@ -25,6 +31,19 @@ public class GUINukeFstbmb extends GuiInfoContainer {
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
|
||||
super.initGui();
|
||||
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
this.timer = new GuiTextField(this.fontRendererObj, guiLeft + 94, guiTop + 40, 29, 12);
|
||||
this.timer.setTextColor(0xff0000);
|
||||
this.timer.setDisabledTextColour(0x800000);
|
||||
this.timer.setEnableBackgroundDrawing(false);
|
||||
this.timer.setMaxStringLength(3);
|
||||
this.timer.setText(String.valueOf(bomb.timer / 20));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
@ -32,12 +51,15 @@ public class GUINukeFstbmb extends GuiInfoContainer {
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
this.timer.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 61 <= x && guiLeft + 61 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
//PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(laser.xCoord, laser.yCoord, laser.zCoord, 0, 0));
|
||||
}
|
||||
|
||||
if(!bomb.started) {
|
||||
if(guiLeft + 142 <= x && guiLeft + 142 + 18 > x && guiTop + 35 < y && guiTop + 35 + 18 >= y) {
|
||||
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(bomb.xCoord, bomb.yCoord, bomb.zCoord, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -69,5 +91,24 @@ public class GUINukeFstbmb extends GuiInfoContainer {
|
||||
|
||||
if(bomb.hasBattery())
|
||||
drawTexturedModalRect(guiLeft + 88, guiTop + 93, 176, 16, 18, 10);
|
||||
|
||||
if(bomb.started)
|
||||
drawTexturedModalRect(guiLeft + 142, guiTop + 35, 176, 26, 18, 18);
|
||||
|
||||
this.timer.drawTextBox();
|
||||
}
|
||||
|
||||
protected void keyTyped(char p_73869_1_, int p_73869_2_) {
|
||||
|
||||
if (this.timer.textboxKeyTyped(p_73869_1_, p_73869_2_)) {
|
||||
|
||||
if(NumberUtils.isNumber(timer.getText())) {
|
||||
int j = MathHelper.clamp_int(Integer.parseInt(timer.getText()), 1, 999);
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(bomb.xCoord, bomb.yCoord, bomb.zCoord, j, 1));
|
||||
}
|
||||
|
||||
} else {
|
||||
super.keyTyped(p_73869_1_, p_73869_2_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1352,6 +1352,8 @@ public class ModItems {
|
||||
public static Item apple_schrabidium;
|
||||
public static Item tem_flakes;
|
||||
public static Item glowing_stew;
|
||||
public static Item balefire_scrambled;
|
||||
public static Item balefire_and_ham;
|
||||
public static Item lemon;
|
||||
public static Item definitelyfood;
|
||||
public static Item loops;
|
||||
@ -1399,6 +1401,7 @@ public class ModItems {
|
||||
public static Item solinium_propellant;
|
||||
public static Item solinium_core;
|
||||
public static Item n2_charge;
|
||||
public static Item egg_balefire_shard;
|
||||
public static Item egg_balefire;
|
||||
|
||||
public static Item custom_tnt;
|
||||
@ -3148,6 +3151,8 @@ public class ModItems {
|
||||
apple_schrabidium = new ItemAppleSchrabidium(20, 100, false).setUnlocalizedName("apple_schrabidium").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":apple_schrabidium");
|
||||
tem_flakes = new ItemTemFlakes(0, 0, false).setUnlocalizedName("tem_flakes").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tem_flakes");
|
||||
glowing_stew = new ItemSoup(6).setUnlocalizedName("glowing_stew").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glowing_stew");
|
||||
balefire_scrambled = new ItemSoup(6).setUnlocalizedName("balefire_scrambled").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":balefire_scrambled");
|
||||
balefire_and_ham = new ItemSoup(6).setUnlocalizedName("balefire_and_ham").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":balefire_and_ham");
|
||||
lemon = new ItemLemon(3, 5, false).setUnlocalizedName("lemon").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":lemon");
|
||||
definitelyfood = new ItemLemon(2, 5, false).setUnlocalizedName("definitelyfood").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":definitelyfood");
|
||||
med_ipecac = new ItemLemon(0, 0, false).setUnlocalizedName("med_ipecac").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":med_ipecac_new");
|
||||
@ -3201,7 +3206,8 @@ public class ModItems {
|
||||
|
||||
n2_charge = new ItemN2().setUnlocalizedName("n2_charge").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":n2_charge");
|
||||
|
||||
egg_balefire = new ItemCustomLore().setUnlocalizedName("egg_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":egg_balefire");
|
||||
egg_balefire_shard = new ItemRadioactive(1500F, true).setUnlocalizedName("egg_balefire_shard").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":egg_balefire_shard");
|
||||
egg_balefire = new ItemRadioactive(10000F, true).setUnlocalizedName("egg_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":egg_balefire");
|
||||
|
||||
custom_tnt = new ItemCustomLore().setUnlocalizedName("custom_tnt").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_tnt");
|
||||
custom_nuke = new ItemCustomLore().setUnlocalizedName("custom_nuke").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_nuke");
|
||||
@ -3211,32 +3217,32 @@ public class ModItems {
|
||||
custom_schrab = new ItemCustomLore().setUnlocalizedName("custom_schrab").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_schrab");
|
||||
custom_fall = new ItemCustomLore().setUnlocalizedName("custom_fall").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":custom_fall");
|
||||
|
||||
battery_generic = new ItemBattery(50, 1, 1).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_generic_new");
|
||||
battery_advanced = new ItemBattery(200, 5, 5).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_new");
|
||||
battery_lithium = new ItemBattery(2500, 10, 10).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium");
|
||||
battery_schrabidium = new ItemBattery(10000, 50, 50).setUnlocalizedName("battery_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_new");
|
||||
battery_spark = new ItemBattery(1000000, 20000, 20000).setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark");
|
||||
battery_generic = new ItemBattery(5000, 100, 100).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_generic_new");
|
||||
battery_advanced = new ItemBattery(20000, 500, 500).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_new");
|
||||
battery_lithium = new ItemBattery(250000, 1000, 1000).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium");
|
||||
battery_schrabidium = new ItemBattery(1000000, 5000, 5000).setUnlocalizedName("battery_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_new");
|
||||
battery_spark = new ItemBattery(100000000, 2000000, 2000000).setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark");
|
||||
battery_creative = new Item().setUnlocalizedName("battery_creative").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_creative_new");
|
||||
|
||||
battery_red_cell = new ItemBattery(150, 1, 1).setUnlocalizedName("battery_red_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell");
|
||||
battery_red_cell_6 = new ItemBattery(150 * 6, 1, 1).setUnlocalizedName("battery_red_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell_6");
|
||||
battery_red_cell_24 = new ItemBattery(150 * 24, 1, 1).setUnlocalizedName("battery_red_cell_24").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell_24");
|
||||
battery_advanced_cell = new ItemBattery(600, 5, 5).setUnlocalizedName("battery_advanced_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell");
|
||||
battery_advanced_cell_4 = new ItemBattery(600 * 4, 5, 5).setUnlocalizedName("battery_advanced_cell_4").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell_4");
|
||||
battery_advanced_cell_12 = new ItemBattery(600 * 12, 5, 5).setUnlocalizedName("battery_advanced_cell_12").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell_12");
|
||||
battery_lithium_cell = new ItemBattery(7500, 10, 10).setUnlocalizedName("battery_lithium_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell");
|
||||
battery_lithium_cell_3 = new ItemBattery(7500 * 3, 10, 10).setUnlocalizedName("battery_lithium_cell_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell_3");
|
||||
battery_lithium_cell_6 = new ItemBattery(7500 * 6, 10, 10).setUnlocalizedName("battery_lithium_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell_6");
|
||||
battery_schrabidium_cell = new ItemBattery(30000, 50, 50).setUnlocalizedName("battery_schrabidium_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell");
|
||||
battery_schrabidium_cell_2 = new ItemBattery(30000 * 2, 50, 50).setUnlocalizedName("battery_schrabidium_cell_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_2");
|
||||
battery_schrabidium_cell_4 = new ItemBattery(30000 * 4, 50, 50).setUnlocalizedName("battery_schrabidium_cell_4").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_4");
|
||||
battery_spark_cell_6 = new ItemBattery(1000000 * 6, 20000, 20000).setUnlocalizedName("battery_spark_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_6");
|
||||
battery_spark_cell_25 = new ItemBattery(1000000 * 25, 20000, 20000).setUnlocalizedName("battery_spark_cell_25").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_25");
|
||||
battery_spark_cell_100 = new ItemBattery(1000000L * 100L, 20000, 20000).setUnlocalizedName("battery_spark_cell_100").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_100");
|
||||
battery_spark_cell_1000 = new ItemBattery(1000000L * 1000L, 200000, 200000).setUnlocalizedName("battery_spark_cell_1000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_1000");
|
||||
battery_spark_cell_2500 = new ItemBattery(1000000L * 2500L, 200000, 200000).setUnlocalizedName("battery_spark_cell_2500").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_2500");
|
||||
battery_spark_cell_10000 = new ItemBattery(1000000L * 10000L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_10000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_10000");
|
||||
battery_spark_cell_power = new ItemBattery(1000000L * 1000000L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_power").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_power");
|
||||
battery_red_cell = new ItemBattery(15000, 100, 100).setUnlocalizedName("battery_red_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell");
|
||||
battery_red_cell_6 = new ItemBattery(15000 * 6, 100, 100).setUnlocalizedName("battery_red_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell_6");
|
||||
battery_red_cell_24 = new ItemBattery(15000 * 24, 100, 100).setUnlocalizedName("battery_red_cell_24").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_red_cell_24");
|
||||
battery_advanced_cell = new ItemBattery(60000, 500, 500).setUnlocalizedName("battery_advanced_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell");
|
||||
battery_advanced_cell_4 = new ItemBattery(60000 * 4, 500, 500).setUnlocalizedName("battery_advanced_cell_4").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell_4");
|
||||
battery_advanced_cell_12 = new ItemBattery(60000 * 12, 500, 500).setUnlocalizedName("battery_advanced_cell_12").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_advanced_cell_12");
|
||||
battery_lithium_cell = new ItemBattery(750000, 1000, 1000).setUnlocalizedName("battery_lithium_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell");
|
||||
battery_lithium_cell_3 = new ItemBattery(750000 * 3, 1000, 1000).setUnlocalizedName("battery_lithium_cell_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell_3");
|
||||
battery_lithium_cell_6 = new ItemBattery(750000 * 6, 1000, 1000).setUnlocalizedName("battery_lithium_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_lithium_cell_6");
|
||||
battery_schrabidium_cell = new ItemBattery(3000000, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell");
|
||||
battery_schrabidium_cell_2 = new ItemBattery(3000000 * 2, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_2");
|
||||
battery_schrabidium_cell_4 = new ItemBattery(3000000 * 4, 5000, 5000).setUnlocalizedName("battery_schrabidium_cell_4").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_schrabidium_cell_4");
|
||||
battery_spark_cell_6 = new ItemBattery(100000000L * 6L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_6").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_6");
|
||||
battery_spark_cell_25 = new ItemBattery(100000000L * 25L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_25").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_25");
|
||||
battery_spark_cell_100 = new ItemBattery(100000000L * 100L, 2000000, 2000000).setUnlocalizedName("battery_spark_cell_100").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_100");
|
||||
battery_spark_cell_1000 = new ItemBattery(100000000L * 1000L, 20000000, 20000000).setUnlocalizedName("battery_spark_cell_1000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_1000");
|
||||
battery_spark_cell_2500 = new ItemBattery(100000000L * 2500L, 20000000, 20000000).setUnlocalizedName("battery_spark_cell_2500").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_2500");
|
||||
battery_spark_cell_10000 = new ItemBattery(100000000L * 10000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_10000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_10000");
|
||||
battery_spark_cell_power = new ItemBattery(100000000L * 1000000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_power").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_power");
|
||||
|
||||
battery_potato = new ItemBattery(1, 0, 1).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
|
||||
battery_potatos = new ItemPotatos(50, 0, 1).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
|
||||
@ -5380,6 +5386,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(apple_schrabidium, apple_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(tem_flakes, tem_flakes.getUnlocalizedName());
|
||||
GameRegistry.registerItem(glowing_stew, glowing_stew.getUnlocalizedName());
|
||||
GameRegistry.registerItem(balefire_scrambled, balefire_scrambled.getUnlocalizedName());
|
||||
GameRegistry.registerItem(balefire_and_ham, balefire_and_ham.getUnlocalizedName());
|
||||
GameRegistry.registerItem(lemon, lemon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(definitelyfood, definitelyfood.getUnlocalizedName());
|
||||
GameRegistry.registerItem(loops, loops.getUnlocalizedName());
|
||||
@ -5512,6 +5520,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(n2_charge, n2_charge.getUnlocalizedName());
|
||||
|
||||
//FSTBMB
|
||||
GameRegistry.registerItem(egg_balefire_shard, egg_balefire_shard.getUnlocalizedName());
|
||||
GameRegistry.registerItem(egg_balefire, egg_balefire.getUnlocalizedName());
|
||||
|
||||
//Conventional Armor
|
||||
|
||||
@ -40,14 +40,14 @@ public class ItemBattery extends Item implements IBatteryItem {
|
||||
itemstack.getItem() != ModItems.dynosphere_euphemium &&
|
||||
itemstack.getItem() != ModItems.dynosphere_dineutronium)
|
||||
{
|
||||
list.add("Energy stored: " + Library.getShortNumber(charge * 100) + "/" + Library.getShortNumber(maxCharge * 100) + "HE");
|
||||
list.add("Energy stored: " + Library.getShortNumber(charge) + "/" + Library.getShortNumber(maxCharge) + "HE");
|
||||
} else {
|
||||
String charge1 = Library.getShortNumber((charge * 100) / this.maxCharge);
|
||||
String charge1 = Library.getShortNumber((charge * 100) / this.maxCharge);
|
||||
list.add("Charge: " + charge1 + "%");
|
||||
list.add("(" + Library.getShortNumber(charge * 100) + "/" + Library.getShortNumber(maxCharge * 100) + "HE)");
|
||||
list.add("(" + Library.getShortNumber(charge) + "/" + Library.getShortNumber(maxCharge) + "HE)");
|
||||
}
|
||||
list.add("Charge rate: " + Library.getShortNumber(chargeRate * 100) + "HE/t");
|
||||
list.add("Discharge rate: " + Library.getShortNumber(dischargeRate * 100) + "HE/t");
|
||||
list.add("Charge rate: " + Library.getShortNumber(chargeRate) + "HE/t");
|
||||
list.add("Discharge rate: " + Library.getShortNumber(dischargeRate) + "HE/t");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.bomb.BlockCrashedBomb;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -47,6 +48,9 @@ public class ItemCell extends Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Library.applyRadDirect(player, 50F);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@ -28,7 +28,7 @@ public class ItemCladding extends Item {
|
||||
|
||||
for(ItemStack armor : player.inventory.armorInventory) {
|
||||
|
||||
if(armor != null && HazmatRegistry.instance.getCladding(armor) == 0) {
|
||||
if(armor != null && HazmatRegistry.instance.getCladding(armor) < rad) {
|
||||
|
||||
if(!armor.hasTagCompound())
|
||||
armor.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
@ -587,7 +587,12 @@ public class ItemCustomLore extends Item {
|
||||
|
||||
if(this == ModItems.egg_balefire)
|
||||
{
|
||||
list.add("Doubles as a crappy lander!");
|
||||
list.add("What kind of bird lays a radioactive egg?");
|
||||
}
|
||||
|
||||
if(this == ModItems.ingot_schraranium)
|
||||
{
|
||||
list.add("Made from uranium in a schrabidium transmutator");
|
||||
}
|
||||
}
|
||||
|
||||
@ -645,8 +650,8 @@ public class ItemCustomLore extends Item {
|
||||
this == ModItems.rune_hagalaz ||
|
||||
this == ModItems.rune_jera ||
|
||||
this == ModItems.rune_thurisaz ||
|
||||
this == ModItems.egg_balefire)
|
||||
{
|
||||
this == ModItems.egg_balefire_shard ||
|
||||
this == ModItems.egg_balefire) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ public class Library {
|
||||
}
|
||||
|
||||
float rad = e.getEntityData().getFloat("hfr_radiation");
|
||||
e.getEntityData().setFloat("hfr_radiation", rad + f);
|
||||
e.getEntityData().setFloat("hfr_radiation", Math.min(rad + f, 2500));
|
||||
}
|
||||
|
||||
public static void applyRadDirect(Entity e, float f) {
|
||||
@ -105,7 +105,7 @@ public class Library {
|
||||
return;
|
||||
|
||||
float rad = e.getEntityData().getFloat("hfr_radiation");
|
||||
e.getEntityData().setFloat("hfr_radiation", rad + f);
|
||||
e.getEntityData().setFloat("hfr_radiation", Math.min(rad + f, 2500));
|
||||
}
|
||||
|
||||
public static boolean checkForHeld(EntityPlayer player, Item item) {
|
||||
@ -379,9 +379,9 @@ public class Library {
|
||||
long batRate = battery.getChargeRate();
|
||||
|
||||
//in hHE
|
||||
long toCharge = Math.min(Math.min(power / 100, batRate), batMax - batCharge);
|
||||
long toCharge = Math.min(Math.min(power, batRate), batMax - batCharge);
|
||||
|
||||
power -= toCharge * 100;
|
||||
power -= toCharge;
|
||||
|
||||
battery.chargeBattery(slots[index], toCharge);
|
||||
|
||||
@ -402,9 +402,9 @@ public class Library {
|
||||
long batRate = ((ItemToolAbilityPower)slots[index].getItem()).getChargeRate();
|
||||
|
||||
//in hHE
|
||||
long toCharge = Math.min(Math.min(power / 100, batRate), batMax - batCharge);
|
||||
long toCharge = Math.min(Math.min(power, batRate), batMax - batCharge);
|
||||
|
||||
power -= toCharge * 100;
|
||||
power -= toCharge;
|
||||
|
||||
((ItemToolAbilityPower)slots[index].getItem()).chargeBattery(slots[index], toCharge);
|
||||
|
||||
@ -433,10 +433,10 @@ public class Library {
|
||||
long batRate = battery.getDischargeRate();
|
||||
|
||||
//in hHe
|
||||
long toDischarge = Math.min(Math.min((maxPower - power) / 100, batRate), batCharge);
|
||||
long toDischarge = Math.min(Math.min((maxPower - power), batRate), batCharge);
|
||||
|
||||
battery.dischargeBattery(slots[index], toDischarge);
|
||||
power += toDischarge * 100;
|
||||
power += toDischarge;
|
||||
}
|
||||
|
||||
return power;
|
||||
|
||||
@ -260,6 +260,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nuclear_waste_tiny, 9), new Object[] { "#", '#', ModItems.nuclear_waste });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bottle_mercury, 1), new Object[] { "###", "#B#", "###", '#', ModItems.nugget_mercury, 'B', Items.glass_bottle });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nugget_mercury, 8), new Object[] { "#", '#', ModItems.bottle_mercury });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire, 1), new Object[] { "###", "###", "###", '#', ModItems.egg_balefire_shard });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire_shard, 9), new Object[] { "#", '#', ModItems.egg_balefire });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.rod_empty, 16), new Object[] { "SSS", "L L", "SSS", 'S', "plateSteel", 'L', "plateLead" }));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_th232, 1), new Object[] { ModItems.rod_empty, ModItems.nugget_th232, ModItems.nugget_th232, ModItems.nugget_th232, ModItems.nugget_th232, ModItems.nugget_th232, ModItems.nugget_th232 });
|
||||
@ -458,7 +460,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.deco_titanium), new Object[] { "ingotTitanium", ModBlocks.steel_scaffold }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.deco_tungsten), new Object[] { "ingotTungsten", ModBlocks.steel_scaffold }));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nugget_euphemium, 1), new Object[] { "##", "##", '#', ModItems.rod_quad_euphemium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nugget_euphemium, 1), new Object[] { "#", '#', ModItems.rod_quad_euphemium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ingot_euphemium, 1), new Object[] { "###", "###", "###", '#', ModItems.rod_quad_euphemium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ingot_euphemium, 1), new Object[] { "###", "###", "###", '#', ModItems.nugget_euphemium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nugget_euphemium, 9), new Object[] { "#", '#', ModItems.ingot_euphemium });
|
||||
|
||||
@ -681,6 +684,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', "plateIron", 'M', ModItems.mechanism_launcher_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "SSS", " MW", 'S', ModItems.hull_small_steel, 'W', "plateCopper", 'M', ModItems.mechanism_launcher_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_karl, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', "plateAdvanced", 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', ModItems.hull_small_steel, 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', "ingotIron", 'M', ModItems.mechanism_launcher_1, 'B', ModItems.bolt_tungsten }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', "plateSteel", 'W', "plateTitanium", 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger_ammo, 4), new Object[] { "SS ", "STI", " IR", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateAluminum", 'R', "dustRedstone" }));
|
||||
@ -698,7 +702,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', "plateSteel", 'L', "plateLead", 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_polymer, 'L', ModItems.plate_desh, 'W', ModItems.wire_tungsten, 'F', ModItems.gun_fatman });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bf, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_paa, 'L', "plateDenseLead", 'W', ModItems.wire_advanced_alloy, 'F', ModItems.gun_mirv }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_bf_ammo, 1), new Object[] { "AEA", "SHS", "AEA", 'H', ModItems.hull_small_steel, 'A', ModItems.cell_antimatter, 'S', ModItems.cell_anti_schrabidium, 'E', ModItems.powder_power });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_bf_ammo, 1), new Object[] { " S ", "EBE", " S ", 'S', ModItems.hull_small_steel, 'E', ModItems.powder_power, 'B', ModItems.egg_balefire_shard });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp40, 1), new Object[] { "IIM", " SW", " S ", 'S', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'M', ModItems.mechanism_rifle_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_flechette, 1), new Object[] { "PPM", "TIS", "G ", 'P', "plateSteel", 'M', ModItems.mechanism_rifle_2, 'T', ModItems.hull_small_steel, 'I', "ingotSteel", 'S', ModItems.ingot_polymer, 'G', ModItems.mechanism_launcher_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uboinik, 1), new Object[] { "IIM", "SPW", 'P', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'S', Items.stick, 'M', ModItems.mechanism_revolver_2 }));
|
||||
@ -738,7 +742,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action, 1), new Object[] { "PPI", "SWD", 'P', "plateSteel", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_green, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_saturnite, 1), new Object[] { "PPI", "SWD", 'P', "plateSaturnite", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_tungsten }));
|
||||
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 ItemStack(ModItems.gun_b92, 1), new Object[] { "DDD", "SSC", " R", 'D', ModItems.plate_dineutronium, 'S', ModItems.ingot_starmetal, 'S', ModItems.circuit_targeting_tier6, 'R', ModItems.gun_revolver_schrabidium });
|
||||
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.gun_uzi, 1), new Object[] { "SMS", " PB", " P ", 'S', "ingotSteel", 'M', ModItems.mechanism_rifle_2, 'P', "plateSteel", 'B', ModItems.bolt_dura_steel }));
|
||||
@ -957,6 +961,8 @@ public class CraftingManager {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 1), new Object[] { Items.gold_nugget, Items.gold_nugget, Items.gold_nugget, Items.paper });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tem_flakes, 1, 2), new Object[] { Items.gold_ingot, Items.gold_ingot, Items.gold_nugget, Items.gold_nugget, Items.paper });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.glowing_stew, 1), new Object[] { Items.bowl, Item.getItemFromBlock(ModBlocks.mush), Item.getItemFromBlock(ModBlocks.mush) });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.balefire_scrambled, 1), new Object[] { Items.bowl, ModItems.egg_balefire });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.balefire_and_ham, 1), new Object[] { ModItems.balefire_scrambled, Items.cooked_beef });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.med_ipecac, 1), new Object[] { Items.glass_bottle, Items.nether_wart });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.med_ptsd, 1), new Object[] { ModItems.med_ipecac });
|
||||
|
||||
@ -1483,6 +1489,7 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.struct_launcher_core, 1), new Object[] { "SCS", "SIS", "BEB", 'S', ModBlocks.steel_scaffold, 'I', Blocks.iron_bars, 'C', ModItems.circuit_targeting_tier3, 'B', ModBlocks.struct_launcher, 'E', ModBlocks.machine_battery });
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.struct_launcher_core_large, 1), new Object[] { "SIS", "ICI", "BEB", 'S', ModItems.circuit_red_copper, 'I', Blocks.iron_bars, 'C', ModItems.circuit_targeting_tier4, 'B', ModBlocks.struct_launcher, 'E', ModBlocks.machine_battery });
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.struct_soyuz_core, 1), new Object[] { "CUC", "TST", "TBT", 'C', ModItems.circuit_targeting_tier4, 'U', ModItems.upgrade_power_3, 'T', ModBlocks.barrel_steel, 'S', ModBlocks.steel_scaffold, 'B', ModBlocks.machine_lithium_battery });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.obj_tester, 1), new Object[] { "P", "I", "S", 'P', ModItems.polaroid, 'I', ModItems.flame_pony, 'S', "plateSteel" }));
|
||||
|
||||
@ -1528,6 +1535,10 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_crystallizer, 1), new Object[] { "PMP", "STS", "DMD", 'P', "ingotPolymer", 'M', ModItems.motor, 'S', ModItems.blades_advanced_alloy, 'T', ModItems.tank_steel, 'D', "ingotDesh" }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.upgrade_nullifier, 1), new Object[] { "SPS", "PUP", "SPS", 'S', "plateSteel", 'P', ModItems.powder_fire, 'U', ModItems.upgrade_template }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.upgrade_smelter, 1), new Object[] { "PHP", "CUC", "DTD", 'P', "plateCopper", 'H', Blocks.hopper, 'C', ModItems.coil_tungsten, 'U', ModItems.upgrade_template, 'D', ModItems.coil_copper, 'T', ModBlocks.machine_transformer }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.upgrade_shredder, 1), new Object[] { "PHP", "CUC", "DTD", 'P', ModItems.motor, 'H', Blocks.hopper, 'C', ModItems.blades_advanced_alloy, 'U', ModItems.upgrade_smelter, 'D', "plateTitanium", 'T', ModBlocks.machine_transformer }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.upgrade_centrifuge, 1), new Object[] { "PHP", "PUP", "DTD", 'P', ModItems.centrifuge_element, 'H', Blocks.hopper, 'U', ModItems.upgrade_shredder, 'D', "ingotPolymer", 'T', ModBlocks.machine_transformer }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.upgrade_crystallizer, 1), new Object[] { "PHP", "CUC", "DTD", 'P', new ItemStack(ModItems.fluid_barrel_full, 1, FluidType.ACID.ordinal()), 'H', ModItems.circuit_targeting_tier4, 'C', ModBlocks.barrel_steel, 'U', ModItems.upgrade_centrifuge, 'D', ModItems.motor, 'T', ModBlocks.machine_transformer }));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1473,15 +1473,15 @@ public class MainRegistry
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.alloy_legs, 0.12F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.alloy_boots, 0.04F);
|
||||
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_helmet, 1F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_plate, 2.2F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_legs, 1.6F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_boots, 0.5F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_helmet, 0.5F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_plate, 1.1F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_legs, 0.8F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.cmb_boots, 0.2F);
|
||||
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_helmet, 1.2F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_plate, 2.4F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_legs, 1.8F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_boots, 0.6F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_helmet, 0.6F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_plate, 1.2F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_legs, 0.9F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.schrabidium_boots, 0.3F);
|
||||
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.euphemium_helmet, 6F);
|
||||
HazmatRegistry.instance.registerHazmat(ModItems.euphemium_plate, 12F);
|
||||
|
||||
@ -292,12 +292,12 @@ public class ModEventHandler
|
||||
if(eRad < 200 || entity instanceof EntityNuclearCreeper || entity instanceof EntityMooshroom || entity instanceof EntityZombie || entity instanceof EntitySkeleton)
|
||||
continue;
|
||||
|
||||
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)
|
||||
continue;
|
||||
|
||||
if(eRad > 2500)
|
||||
entity.getEntityData().setFloat("hfr_radiation", 2500);
|
||||
|
||||
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)
|
||||
continue;
|
||||
|
||||
if(eRad >= 1000) {
|
||||
if(entity.attackEntityFrom(ModDamageSource.radiation, entity.getMaxHealth() * 100)) {
|
||||
entity.getEntityData().setFloat("hfr_radiation", 0);
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.packet;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.items.weapon.ItemMissile.PartSize;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchTable;
|
||||
import com.hbm.tileentity.machine.TileEntityBarrel;
|
||||
import com.hbm.tileentity.machine.TileEntityCoreEmitter;
|
||||
@ -266,6 +267,12 @@ public class AuxButtonPacket implements IMessage {
|
||||
laser.isOn = !laser.isOn;
|
||||
}
|
||||
|
||||
/// yes ///
|
||||
if(te instanceof TileEntityMachineBase) {
|
||||
TileEntityMachineBase base = (TileEntityMachineBase)te;
|
||||
base.handleButtonPacket(m.value, m.id);
|
||||
}
|
||||
|
||||
//} catch (Exception x) { }
|
||||
|
||||
return null;
|
||||
|
||||
@ -130,19 +130,20 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_flechette) {
|
||||
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(1.0F, -1.0F, -0.0F);
|
||||
GL11.glRotatef(170F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScaled(0.25, 0.25, 0.25);
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
|
||||
if(player.isSneaking()) {
|
||||
GL11.glRotatef(5F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-2F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-2.0F, 1.2F, 3.7F);
|
||||
}
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
|
||||
@ -41,12 +41,10 @@ public class RenderNukeFstbmb extends TileEntitySpecialRenderer {
|
||||
|
||||
TileEntityNukeBalefire bf = (TileEntityNukeBalefire)tileEntity;
|
||||
|
||||
if(bf.hasEgg()) {
|
||||
if(bf.loaded) {
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/misc/glintBF.png"));
|
||||
RenderMiscEffects.renderClassicGlint(tileEntity.getWorldObj(), f, ResourceManager.fstbmb, "Balefire", 0.0F, 0.8F, 0.15F, 5, 2F);
|
||||
}
|
||||
|
||||
if(bf.hasBattery()) {
|
||||
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
float f3 = 0.04F;
|
||||
GL11.glTranslatef(0.815F, 0.9275F, 0.5F);
|
||||
|
||||
@ -163,6 +163,8 @@ public abstract class TileEntityMachineBase extends TileEntity implements ISided
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) { }
|
||||
|
||||
public void handleButtonPacket(int value, int meta) { }
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
@ -53,7 +53,7 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
private String customName;
|
||||
|
||||
public TileEntityCompactLauncher() {
|
||||
slots = new ItemStack[6];
|
||||
slots = new ItemStack[8];
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(FluidType.NONE, 25000, 0);
|
||||
tanks[1] = new FluidTank(FluidType.NONE, 25000, 1);
|
||||
@ -164,8 +164,8 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
|
||||
updateTypes();
|
||||
|
||||
tanks[0].loadTank(2, 3, slots);
|
||||
tanks[1].loadTank(2, 3, slots);
|
||||
tanks[0].loadTank(2, 6, slots);
|
||||
tanks[1].loadTank(3, 7, slots);
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
@ -52,7 +52,7 @@ public class TileEntityLaunchTable extends TileEntity implements ISidedInventory
|
||||
private String customName;
|
||||
|
||||
public TileEntityLaunchTable() {
|
||||
slots = new ItemStack[6];
|
||||
slots = new ItemStack[8];
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(FluidType.NONE, 100000, 0);
|
||||
tanks[1] = new FluidTank(FluidType.NONE, 100000, 1);
|
||||
@ -165,8 +165,8 @@ public class TileEntityLaunchTable extends TileEntity implements ISidedInventory
|
||||
|
||||
updateTypes();
|
||||
|
||||
tanks[0].loadTank(2, 3, slots);
|
||||
tanks[1].loadTank(2, 3, slots);
|
||||
tanks[0].loadTank(2, 6, slots);
|
||||
tanks[1].loadTank(3, 7, slots);
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityNukeBalefire extends TileEntityMachineBase {
|
||||
|
||||
@ -14,6 +20,7 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase {
|
||||
|
||||
public TileEntityNukeBalefire() {
|
||||
super(2);
|
||||
timer = 18000;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -26,15 +33,24 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(started)
|
||||
timer--;
|
||||
if(!this.isLoaded()) {
|
||||
started = false;
|
||||
}
|
||||
|
||||
if(timer <= 0)
|
||||
if(started) {
|
||||
timer--;
|
||||
|
||||
if(timer % 20 == 0)
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.fstbmbPing", 5.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(timer <= 0) {
|
||||
explode();
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("timer", timer);
|
||||
data.setBoolean("loaded", loaded);
|
||||
data.setBoolean("loaded", this.isLoaded());
|
||||
data.setBoolean("started", started);
|
||||
networkPack(data, 250);
|
||||
}
|
||||
@ -47,6 +63,17 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase {
|
||||
loaded = data.getBoolean("loaded");
|
||||
}
|
||||
|
||||
public void handleButtonPacket(int value, int meta) {
|
||||
|
||||
if(meta == 0 && this.isLoaded()) {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.fstbmbStart", 5.0F, 1.0F);
|
||||
started = true;
|
||||
}
|
||||
|
||||
if(meta == 1)
|
||||
timer = value * 20;
|
||||
}
|
||||
|
||||
public boolean isLoaded() {
|
||||
|
||||
return hasEgg() && hasBattery();
|
||||
@ -73,11 +100,23 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase {
|
||||
|
||||
public void explode() {
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
slots[i] = null;
|
||||
|
||||
worldObj.func_147480_a(xCoord, yCoord, zCoord, false);
|
||||
|
||||
EntityBalefire bf = new EntityBalefire(worldObj);
|
||||
bf.posX = xCoord + 0.5;
|
||||
bf.posY = yCoord + 0.5;
|
||||
bf.posZ = zCoord + 0.5;
|
||||
bf.destructionRange = (int) 250;
|
||||
worldObj.spawnEntityInWorld(bf);
|
||||
worldObj.spawnEntityInWorld(EntityNukeCloudSmall.statFacBale(worldObj, xCoord + 0.5, yCoord + 5, zCoord + 0.5, 250 * 1.5F, 1000));
|
||||
}
|
||||
|
||||
public String getMinutes() {
|
||||
|
||||
String mins = "" + (timer / 60);
|
||||
String mins = "" + (timer / 1200);
|
||||
|
||||
if(mins.length() == 1)
|
||||
mins = "0" + mins;
|
||||
@ -87,12 +126,39 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase {
|
||||
|
||||
public String getSeconds() {
|
||||
|
||||
String mins = "" + (timer % 60);
|
||||
String mins = "" + ((timer / 20) % 60);
|
||||
|
||||
if(mins.length() == 1)
|
||||
mins = "0" + mins;
|
||||
|
||||
return mins;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
started = nbt.getBoolean("started");
|
||||
timer = nbt.getInteger("timer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setBoolean("started", started);
|
||||
nbt.setInteger("timer", timer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
|
||||