The world's sexiest stuff ever made

This commit is contained in:
HbmMods 2016-03-07 20:23:57 +01:00
parent 4bf5cb66c4
commit 0a8fa40773
89 changed files with 1154 additions and 1272 deletions

View File

@ -92,7 +92,7 @@ tile.machine_electric_furnace_on.name=Elektrischer Ofen
container.electricFurnace=Elektrischer Ofen
tile.machine_generator.name=Atomreaktor
container.generator=Atomreaktor
tile.red_wire_coated.name=Rotes Kupferkabel
tile.red_wire_coated.name=Geschirmtes rotes Kupferkabel
tile.machine_deuterium.name=Deuteriumextraktor
container.machine_deuterium=Deuteriumextraktor
tile.machine_battery.name=Energiespeicherblock
@ -584,4 +584,36 @@ item.thruster_small.name=Kleines Raketentriebwerk
item.thruster_medium.name=Mittleres Raketentriebwerk
item.thruster_large.name=Großes Raketentriebwerk
item.wand.name=Konstruktions-Zauberstab
item.wand.name=Konstruktions-Zauberstab
item.steel_helmet.name=Stahlhelm
item.steel_plate.name=Stahlbrustpanzer
item.steel_legs.name=Stahlbeinschutz
item.steel_boots.name=Stahlstiefel
item.titanium_helmet.name=Titanhelm
item.titanium_plate.name=Titanbrustpanzer
item.titanium_legs.name=Titanbeinschutz
item.titanium_boots.name=Titanstiefel
item.alloy_helmet.name=Legierungshelm
item.alloy_plate.name=Legierungsbrustpanzer
item.alloy_legs.name=Legierungsbeinschutz
item.alloy_boots.name=Legierungsstiefel
item.steel_sword.name=Stahlschwert
item.steel_pickaxe.name=Stahlspitzhacke
item.steel_axe.name=Stahlaxt
item.steel_shovel.name=Stahlschaufel
item.steel_hoe.name=Stahlfeldhacke
item.titanium_sword.name=Titanschwert
item.titanium_pickaxe.name=Titanspitzhacke
item.titanium_axe.name=Titanaxt
item.titanium_shovel.name=Titanschaufel
item.titanium_hoe.name=Titanfeldhacke
item.alloy_sword.name=Legierungsschwert
item.alloy_pickaxe.name=Legierungsspitzhacke
item.alloy_axe.name=Legierungsaxt
item.alloy_shovel.name=Legierungsschaufel
item.alloy_hoe.name=Legierungsfeldhacke
tile.red_cable.name=Rotes Kupferkabel
tile.meteor.name=Meteoritenblock

View File

@ -92,7 +92,7 @@ tile.machine_electric_furnace_on.name=Electric Furnace
container.electricFurnace=Electric Furnace
tile.machine_generator.name=Nuclear Reactor
container.generator=Nuclear Reactor
tile.red_wire_coated.name=Red Copper Cable
tile.red_wire_coated.name=Coated Red Copper Cable
tile.machine_deuterium.name=Deuterium Extractor
container.machine_deuterium=Deuterium Extractor
tile.machine_battery.name=Energy Storage Block
@ -585,4 +585,36 @@ item.thruster_small.name=Small Thruster
item.thruster_medium.name=Medium Thruster
item.thruster_large.name=Large Thruster
item.wand.name=Construction Wand
item.wand.name=Construction Wand
item.steel_helmet.name=Steel Helmet
item.steel_plate.name=Steel Chestplate
item.steel_legs.name=Steel Leggings
item.steel_boots.name=Steel Boots
item.titanium_helmet.name=Titanium Helmet
item.titanium_plate.name=Titanium Chestplate
item.titanium_legs.name=Titanium Leggings
item.titanium_boots.name=Titanium Boots
item.alloy_helmet.name=Advanced Alloy Helmet
item.alloy_plate.name=Advanced Alloy Chestplate
item.alloy_legs.name=Advanced Alloy Leggings
item.alloy_boots.name=Advanced Alloy Boots
item.steel_sword.name=Steel Sword
item.steel_pickaxe.name=Steel Pickaxe
item.steel_axe.name=Steel Axe
item.steel_shovel.name=Steel Shovel
item.steel_hoe.name=Steel Hoe
item.titanium_sword.name=Titanium Sword
item.titanium_pickaxe.name=Titanium Pickaxe
item.titanium_axe.name=Titanium Axe
item.titanium_shovel.name=Titanium Shovel
item.titanium_hoe.name=Titanium Hoe
item.alloy_sword.name=Advanced Alloy Sword
item.alloy_pickaxe.name=Advanced Alloy Pickaxe
item.alloy_axe.name=Advanced Alloy Axe
item.alloy_shovel.name=Advanced Alloy Shovel
item.alloy_hoe.name=Advanced Alloy Hoe
tile.red_cable.name=Red Cable
tile.meteor.name=Meteor Block

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

View File

@ -13,8 +13,10 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
@ -111,7 +113,13 @@ public class BlockOre extends Block {
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) {
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 60 * 20, 2));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 30 * 20, 0));
}
@ -141,7 +149,13 @@ public class BlockOre extends Block {
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) {
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 10 * 60 * 20, 4));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 4 * 60 * 20, 2));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 3 * 60 * 20, 2));
@ -164,7 +178,13 @@ public class BlockOre extends Block {
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) {
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 30 * 20, 1));
}
}

View File

@ -69,6 +69,8 @@ public class ModBlocks {
public static Block brick_concrete;
public static Block brick_obsidian;
public static Block brick_light;
public static Block block_meteor;
public static Block tape_recorder;
public static Block steel_poles;
@ -285,6 +287,8 @@ public class ModBlocks {
brick_obsidian = new BlockGeneric(Material.rock).setBlockName("brick_obsidian").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_obsidian");
brick_light = new BlockGeneric(Material.rock).setBlockName("brick_light").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(15).setHardness(15.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":brick_light");
block_meteor = new BlockGeneric(Material.rock).setBlockName("block_meteor").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_meteor");
tape_recorder = new DecoTapeRecorder(Material.rock).setBlockName("tape_recorder").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_tape_recorder");
steel_poles = new DecoSteelPoles(Material.rock).setBlockName("steel_poles").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel_poles");
pole_top = new DecoPoleTop(Material.rock).setBlockName("pole_top").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_pole_top");
@ -469,6 +473,7 @@ public class ModBlocks {
GameRegistry.registerBlock(brick_light, brick_light.getUnlocalizedName());
//Decoration Blocks
GameRegistry.registerBlock(block_meteor, block_meteor.getUnlocalizedName());
GameRegistry.registerBlock(tape_recorder, tape_recorder.getUnlocalizedName());
GameRegistry.registerBlock(steel_poles, steel_poles.getUnlocalizedName());
GameRegistry.registerBlock(pole_top, pole_top.getUnlocalizedName());

View File

@ -15,7 +15,6 @@ public class TestTicker extends Block {
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
{
if(world.getBlock(x + 1, y, z) != ModBlocks.test_ticker) {
world.setBlock(x + 1, y, z, ModBlocks.test_ticker);
@ -42,5 +41,4 @@ public class TestTicker extends Block {
}
}
}
}

View File

@ -3,8 +3,9 @@ package com.hbm.blocks;
import java.util.ArrayList;
import java.util.List;
import com.hbm.calc.PowerNet;
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.interfaces.IConductor;
import com.hbm.lib.Library;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
@ -14,8 +15,7 @@ public class TileEntityCable extends TileEntity implements IConductor {
public ForgeDirection[] connections = new ForgeDirection[6];
//Won't work as intended, shit.
//public List<PowerNet> globalPowerNet = new ArrayList<PowerNet>();
public List<UnionOfTileEntitiesAndBooleans> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleans>();
public TileEntityCable() {
@ -26,23 +26,22 @@ public class TileEntityCable extends TileEntity implements IConductor {
}
public void updateConnections() {
TileEntity e0 = this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(e0 instanceof IConductor) connections[0] = ForgeDirection.UP;
if(Library.checkConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP;
else connections[0] = null;
TileEntity e1 = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(e1 instanceof IConductor) connections[1] = ForgeDirection.DOWN;
if(Library.checkConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN;
else connections[1] = null;
TileEntity e2 = this.worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(e2 instanceof IConductor) connections[2] = ForgeDirection.NORTH;
if(Library.checkConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH;
else connections[2] = null;
TileEntity e3 = this.worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(e3 instanceof IConductor) connections[3] = ForgeDirection.EAST;
if(Library.checkConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST;
else connections[3] = null;
TileEntity e4 = this.worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(e4 instanceof IConductor) connections[4] = ForgeDirection.SOUTH;
if(Library.checkConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH;
else connections[4] = null;
TileEntity e5 = this.worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(e5 instanceof IConductor) connections[5] = ForgeDirection.WEST;
if(Library.checkConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST;
else connections[5] = null;
}

View File

@ -1,6 +1,7 @@
package com.hbm.blocks;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
@ -13,7 +14,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
public class TileEntityLaunchPad extends TileEntity implements ISidedInventory, IConductor {
public class TileEntityLaunchPad extends TileEntity implements ISidedInventory, IConsumer {
public ItemStack slots[];
@ -220,6 +221,12 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory,
slots[2].setItemDamage(slots[2].getItemDamage() + 1);
}
if(power + 100 <= maxPower && slots[2] != null && slots[2].getItem() == ModItems.energy_core && slots[2].getItemDamage() < 5000)
{
power += 100;
slots[2].setItemDamage(slots[2].getItemDamage() + 1);
}
this.preState = this.state;
if(this.slots[0] == null ||
@ -419,4 +426,21 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory,
return this.worldObj;
}
@Override
public void setPower(int i) {
power = i;
}
@Override
public int getPower() {
return power;
}
@Override
public int getMaxPower() {
return maxPower;
}
}

View File

@ -1,6 +1,8 @@
package com.hbm.blocks;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.ISource;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
@ -11,7 +13,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
public class TileEntityMachineBattery extends TileEntity implements ISidedInventory, IConductor {
public class TileEntityMachineBattery extends TileEntity implements ISidedInventory, IConsumer, ISource {
private ItemStack slots[];
@ -184,279 +186,8 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
public void updateEntity() {
if(this.conducts)
{
/*//Electric Furnace
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
//Empty.
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Wire
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Deuterium
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Batteries
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}*/
//Energy distributing algorithm V2.1
TileEntity entity0 = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
TileEntity entity1 = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
TileEntity entity2 = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
TileEntity entity3 = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity entity4 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
TileEntity entity5 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
TileEntity entity;
for(int i = 0; i < 6; i++)
{
entity = entity0;
if(i == 1) entity = entity1;
if(i == 2) entity = entity2;
if(i == 3) entity = entity3;
if(i == 4) entity = entity4;
if(i == 5) entity = entity5;
if(entity instanceof TileEntityMachineElectricFurnace ||
entity instanceof TileEntityWireCoated ||
entity instanceof TileEntityMachineDeuterium ||
entity instanceof TileEntityMachineBattery ||
entity instanceof TileEntityLaunchPad)
{
if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= TileEntityMachineElectricFurnace.maxPower)
{
((TileEntityMachineElectricFurnace)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityWireCoated && TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= TileEntityMachineDeuterium.maxPower)
{
((TileEntityMachineDeuterium)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower && !((TileEntityMachineBattery)entity).conducts)
{
((TileEntityMachineBattery)entity).power += 100;
this.power -= 100;
}
}
}
}
if(power - 100 >= 0 && slots[1] != null && slots[1].getItem() == ModItems.battery_generic && slots[1].getItemDamage() > 0)
{
@ -484,7 +215,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
slots[1].setItemDamage(slots[1].getItemDamage() - 1);
}
if(/*power + 100 <= maxPower && */slots[0] != null && slots[0].getItem() == ModItems.battery_creative)
if(slots[0] != null && slots[0].getItem() == ModItems.battery_creative)
{
power = maxPower;
}
@ -512,6 +243,39 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
power += 100;
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
}
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.energy_core && slots[0].getItemDamage() < 5000)
{
power += 100;
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
}
}
@Override
public void setPower(int i) {
power = i;
}
@Override
public int getPower() {
return power;
}
@Override
public void ffgeua(int x, int y, int z, boolean newTact) {
}
@Override
public void ffgeuaInit() {
}
@Override
public int getMaxPower() {
return maxPower;
}
}

View File

@ -10,10 +10,17 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import com.hbm.interfaces.IConductor;
import com.hbm.items.ModItems;
import java.util.ArrayList;
import java.util.List;
public class TileEntityMachineCoal extends TileEntity implements ISidedInventory, IConductor {
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.ISource;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
public class TileEntityMachineCoal extends TileEntity implements ISidedInventory, ISource {
private ItemStack slots[];
@ -22,6 +29,8 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
public int burnTime;
public static final int maxPower = 10000;
public static final int maxWater = 10000;
public int age = 0;
public List<IConsumer> list = new ArrayList();
private static final int[] slots_top = new int[] {1};
private static final int[] slots_bottom = new int[] {2};
@ -192,6 +201,15 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
@Override
public void updateEntity() {
age++;
if(age >= 20)
{
age = 0;
}
if(age == 9 || age == 19)
ffgeuaInit();
//Water
if(slots[0] != null && slots[0].getItem() == Items.water_bucket && this.water + 2500 <= maxWater)
{
@ -229,6 +247,10 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
this.slots[0] = this.slots[0].getItem().getContainerItem(this.slots[0]);
}
}
if(slots[0] != null && slots[0].getItem() == ModItems.inf_water)
{
this.water = this.maxWater;
}
//Battery Item
if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_generic && slots[2].getItemDamage() > 0)
@ -256,239 +278,6 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
power -= 100;
slots[2].setItemDamage(slots[2].getItemDamage() - 1);
}
//Electric Furnace
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= TileEntityMachineElectricFurnace.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Wire
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && this.power - 100 >= 0)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
}
}
//Deuterium
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= TileEntityMachineDeuterium.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Batteries
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof LaunchPad)
{
TileEntityLaunchPad entity = (TileEntityLaunchPad) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
boolean flag = this.burnTime > 0;
boolean flag1 = false;
@ -562,4 +351,84 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
return false;
}
@Override
public void ffgeua(int x, int y, int z, boolean newTact) {
TileEntity tileentity = this.worldObj.getTileEntity(x, y, z);
if(tileentity instanceof IConductor)
{
if(tileentity instanceof TileEntityCable)
{
if(Library.checkUnionList(((TileEntityCable)tileentity).uoteab, this))
{
for(int i = 0; i < ((TileEntityCable)tileentity).uoteab.size(); i++)
{
if(((TileEntityCable)tileentity).uoteab.get(i).source == this)
{
if(((TileEntityCable)tileentity).uoteab.get(i).ticked != newTact)
{
((TileEntityCable)tileentity).uoteab.get(i).ticked = newTact;
ffgeua(x, y + 1, z, getTact());
ffgeua(x, y - 1, z, getTact());
ffgeua(x - 1, y, z, getTact());
ffgeua(x + 1, y, z, getTact());
ffgeua(x, y, z - 1, getTact());
ffgeua(x, y, z + 1, getTact());
}
}
}
} else {
((TileEntityCable)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact));
}
}
if(tileentity instanceof TileEntityWireCoated)
{
if(Library.checkUnionList(((TileEntityWireCoated)tileentity).uoteab, this))
{
for(int i = 0; i < ((TileEntityWireCoated)tileentity).uoteab.size(); i++)
{
if(((TileEntityWireCoated)tileentity).uoteab.get(i).source == this)
{
if(((TileEntityWireCoated)tileentity).uoteab.get(i).ticked != newTact)
{
((TileEntityWireCoated)tileentity).uoteab.get(i).ticked = newTact;
ffgeua(x, y + 1, z, getTact());
ffgeua(x, y - 1, z, getTact());
ffgeua(x - 1, y, z, getTact());
ffgeua(x + 1, y, z, getTact());
ffgeua(x, y, z - 1, getTact());
ffgeua(x, y, z + 1, getTact());
}
}
}
} else {
((TileEntityWireCoated)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact));
}
}
}
if(tileentity instanceof IConsumer && newTact)
{
list.add((IConsumer)tileentity);
}
}
@Override
public void ffgeuaInit() {
ffgeua(this.xCoord, this.yCoord + 1, this.zCoord, getTact());
ffgeua(this.xCoord, this.yCoord - 1, this.zCoord, getTact());
ffgeua(this.xCoord - 1, this.yCoord, this.zCoord, getTact());
ffgeua(this.xCoord + 1, this.yCoord, this.zCoord, getTact());
ffgeua(this.xCoord, this.yCoord, this.zCoord - 1, getTact());
ffgeua(this.xCoord, this.yCoord, this.zCoord + 1, getTact());
}
public boolean getTact() {
if(age >= 0 && age < 10)
{
return true;
}
return false;
}
}

View File

@ -1,6 +1,7 @@
package com.hbm.blocks;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
@ -11,7 +12,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
public class TileEntityMachineDeuterium extends TileEntity implements ISidedInventory, IConductor {
public class TileEntityMachineDeuterium extends TileEntity implements ISidedInventory, IConsumer {
private ItemStack slots[];
@ -252,6 +253,10 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve
slots[2] = null;
}
}
if(slots[2] != null && slots[2].getItem() == ModItems.inf_sulfur)
{
sulfur = maxFill;
}
if(slots[1] != null && slots[1].getItem() == Items.water_bucket && water + 250 <= maxFill)
{
@ -293,6 +298,11 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve
}
}
if(slots[1] != null && slots[1].getItem() == ModItems.inf_water)
{
water = maxFill;
}
if(/*power + 100 <= maxPower && */slots[0] != null && slots[0].getItem() == ModItems.battery_creative)
{
power = maxPower;
@ -322,6 +332,12 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
}
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.energy_core && slots[0].getItemDamage() < 5000)
{
power += 100;
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
}
if(canProcess())
{
process();
@ -329,4 +345,21 @@ public class TileEntityMachineDeuterium extends TileEntity implements ISidedInve
process = 0;
}
}
@Override
public void setPower(int i) {
power = i;
}
@Override
public int getPower() {
return power;
}
@Override
public int getMaxPower() {
return maxPower;
}
}

View File

@ -1,6 +1,7 @@
package com.hbm.blocks;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
@ -12,7 +13,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
public class TileEntityMachineElectricFurnace extends TileEntity implements ISidedInventory, IConductor {
public class TileEntityMachineElectricFurnace extends TileEntity implements ISidedInventory, IConsumer {
private ItemStack slots[];
@ -320,9 +321,32 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
}
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.energy_core && slots[0].getItemDamage() < 5000)
{
power += 100;
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
}
if(flag1)
{
this.markDirty();
}
}
@Override
public void setPower(int i) {
power = i;
}
@Override
public int getPower() {
return power;
}
@Override
public int getMaxPower() {
return maxPower;
}
}

View File

@ -4,6 +4,7 @@ import java.util.Random;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.ISource;
import com.hbm.items.ItemFuelRod;
import com.hbm.items.ModItems;
@ -16,7 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
public class TileEntityMachineGenerator extends TileEntity implements ISidedInventory, IConductor {
public class TileEntityMachineGenerator extends TileEntity implements ISidedInventory, ISource {
private ItemStack slots[];
@ -267,6 +268,10 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
this.slots[9] = this.slots[9].getItem().getContainerItem(this.slots[9]);
}
}
if(slots[9] != null && slots[9].getItem() == ModItems.inf_water)
{
this.water = this.waterMax;
}
if(slots[10] != null && slots[10].getItem() == ModItems.rod_coolant && this.cool + 250000 <= coolMax)
{
@ -298,6 +303,11 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
}
}
if(slots[10] != null && slots[10].getItem() == ModItems.inf_coolant)
{
this.cool = coolMax;
}
for(int i = 0; i < 9; i++)
@ -494,278 +504,6 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
this.isLoaded = true;
}
}
/*//Electric Furnace
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Wire
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Deuterium
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Batteries
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}*/
//Energy distributing algorithm V2.1
TileEntity entity0 = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
TileEntity entity1 = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
TileEntity entity2 = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
TileEntity entity3 = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity entity4 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
TileEntity entity5 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
TileEntity entity;
for(int i = 0; i < 6; i++)
{
entity = entity0;
if(i == 1) entity = entity1;
if(i == 2) entity = entity2;
if(i == 3) entity = entity3;
if(i == 4) entity = entity4;
if(i == 5) entity = entity5;
if(entity instanceof TileEntityMachineElectricFurnace ||
entity instanceof TileEntityWireCoated ||
entity instanceof TileEntityMachineDeuterium ||
entity instanceof TileEntityMachineBattery ||
entity instanceof TileEntityLaunchPad)
{
if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= TileEntityMachineElectricFurnace.maxPower)
{
((TileEntityMachineElectricFurnace)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityWireCoated && TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower)
{
TileEntityWireCoated.power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= TileEntityMachineDeuterium.maxPower)
{
((TileEntityMachineDeuterium)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower && !((TileEntityMachineBattery)entity).conducts)
{
((TileEntityMachineBattery)entity).power += 100;
this.power -= 100;
}
}
}
//Batteries
if(power - 100 >= 0 && slots[11] != null && slots[11].getItem() == ModItems.battery_generic && slots[11].getItemDamage() > 0)
@ -826,4 +564,14 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35);
worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.flowing_lava);
}
@Override
public void ffgeua(int x, int y, int z, boolean newTact) {
}
@Override
public void ffgeuaInit() {
}
}

View File

@ -249,6 +249,10 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
this.slots[30] = this.slots[30].getItem().getContainerItem(this.slots[30]);
}
}
if(slots[30] != null && slots[30].getItem() == ModItems.inf_water)
{
this.water = waterMax;
}
if(slots[31] != null && slots[31].getItem() == ModItems.rod_coolant && this.cool + 250000 <= coolMax)
{
@ -280,6 +284,11 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
}
}
if(slots[31] != null && slots[31].getItem() == ModItems.inf_coolant)
{
this.cool = coolMax;
}
if(slots[33] != null && slots[33].getItem() == ModItems.fuse)
{

View File

@ -1,385 +1,16 @@
package com.hbm.blocks;
import java.util.ArrayList;
import java.util.List;
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.interfaces.IConductor;
import com.hbm.lib.Library;
import net.minecraft.tileentity.TileEntity;
public class TileEntityWireCoated extends TileEntity {
public class TileEntityWireCoated extends TileEntity implements IConductor {
public static int power;
public static final int maxPower = 600;
@Override
public void updateEntity() {
//Energy distribution algorithm
/*//Electric Furnace
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineElectricFurnace)
{
TileEntityMachineElectricFurnace entity = (TileEntityMachineElectricFurnace) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Wire
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof WireCoated)
{
TileEntityWireCoated entity = (TileEntityWireCoated) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Deuterium
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineDeuterium)
{
TileEntityMachineDeuterium entity = (TileEntityMachineDeuterium) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
//Batteries
if(worldObj.getBlock(xCoord + 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord - 1, yCoord, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord + 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}
if(worldObj.getBlock(xCoord, yCoord, zCoord - 1) instanceof MachineBattery)
{
TileEntityMachineBattery entity = (TileEntityMachineBattery) worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(entity.power + 100 <= entity.maxPower && this.power - 100 >= 0)
{
entity.power += 100;
this.power -= 100;
}
}*/
/*if(power == 600) {
TileEntity entity0 = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
TileEntity entity1 = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
TileEntity entity2 = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
TileEntity entity3 = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity entity4 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
TileEntity entity5 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
TileEntity entity;
for(int i = 0; i < 6; i++)
{
entity = entity0;
if(i == 1) entity = entity1;
if(i == 2) entity = entity2;
if(i == 3) entity = entity3;
if(i == 4) entity = entity4;
if(i == 5) entity = entity5;
if(entity instanceof TileEntityMachineElectricFurnace ||
entity instanceof TileEntityWireCoated ||
entity instanceof TileEntityMachineDeuterium ||
entity instanceof TileEntityMachineBattery)
{
if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= ((TileEntityMachineElectricFurnace)entity).maxPower)
{
((TileEntityMachineElectricFurnace)entity).power += 100;
} else
if(entity instanceof TileEntityWireCoated && ((TileEntityWireCoated)entity).power + 100 <= ((TileEntityWireCoated)entity).maxPower)
{
((TileEntityWireCoated)entity).power += 100;
} else
if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= ((TileEntityMachineDeuterium)entity).maxPower)
{
((TileEntityMachineDeuterium)entity).power += 100;
} else
if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower)
{
((TileEntityMachineBattery)entity).power += 100;
}
this.power -= 100;
}
}
}*/
//Energy distributing algorithm V2.0
/*TileEntity entity0 = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
TileEntity entity1 = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
TileEntity entity2 = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
TileEntity entity3 = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity entity4 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
TileEntity entity5 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
if(power == 600 && power != 0) {
TileEntity entity;
for(int i = 0; i < 6; i++)
{
entity = entity0;
if(i == 1) entity = entity1;
if(i == 2) entity = entity2;
if(i == 3) entity = entity3;
if(i == 4) entity = entity4;
if(i == 5) entity = entity5;
if(entity instanceof TileEntityMachineElectricFurnace ||
entity instanceof TileEntityWireCoated ||
entity instanceof TileEntityMachineDeuterium ||
entity instanceof TileEntityMachineBattery)
{
if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= ((TileEntityMachineElectricFurnace)entity).maxPower)
{
((TileEntityMachineElectricFurnace)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityWireCoated && ((TileEntityWireCoated)entity).power + 100 <= ((TileEntityWireCoated)entity).maxPower)
{
((TileEntityWireCoated)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= ((TileEntityMachineDeuterium)entity).maxPower)
{
((TileEntityMachineDeuterium)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower && !((TileEntityMachineBattery)entity).conducts)
{
((TileEntityMachineBattery)entity).power += 100;
this.power -= 100;
}
}
}
}*/
/*//Energy distributing algorithm V2.1
TileEntity entity0 = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
TileEntity entity1 = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
TileEntity entity2 = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
TileEntity entity3 = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity entity4 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
TileEntity entity5 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
TileEntity entity;
for(int i = 0; i < 6; i++)
{
entity = entity0;
if(i == 1) entity = entity1;
if(i == 2) entity = entity2;
if(i == 3) entity = entity3;
if(i == 4) entity = entity4;
if(i == 5) entity = entity5;
if(entity instanceof TileEntityMachineElectricFurnace ||
entity instanceof TileEntityWireCoated ||
entity instanceof TileEntityMachineDeuterium ||
entity instanceof TileEntityMachineBattery)
{
if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= ((TileEntityMachineElectricFurnace)entity).maxPower)
{
((TileEntityMachineElectricFurnace)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityWireCoated && ((TileEntityWireCoated)entity).power + 100 <= ((TileEntityWireCoated)entity).maxPower)
{
((TileEntityWireCoated)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= ((TileEntityMachineDeuterium)entity).maxPower)
{
((TileEntityMachineDeuterium)entity).power += 100;
this.power -= 100;
} else
if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower && !((TileEntityMachineBattery)entity).conducts)
{
((TileEntityMachineBattery)entity).power += 100;
this.power -= 100;
}
}
}*/
//Library.distributePower(this.worldObj, this.xCoord, this.yCoord, this.zCoord);
}
public List<UnionOfTileEntitiesAndBooleans> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleans>();
}

View File

@ -9,8 +9,10 @@ import com.hbm.lib.Library;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -74,7 +76,13 @@ public class TileEntityYellowBarrel extends TileEntity {
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(creep);
entity.setDead();
} else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom))
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(this.worldObj);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!this.worldObj.isRemote)
this.worldObj.spawnEntityInWorld(creep);
} else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie))
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 2 * 60 * 20, 2));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 20, 4));

View File

@ -16,8 +16,10 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -94,7 +96,13 @@ public class WasteEarth extends Block {
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) {
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 2 * 60 * 20, 2));
}
}
@ -128,7 +136,13 @@ public class WasteEarth extends Block {
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) {
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom && !(entity instanceof EntityZombie))) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 60 * 20, 4));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 1 * 60 * 20, 2));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 2 * 60 * 20, 2));

View File

@ -1,7 +0,0 @@
package com.hbm.calc;
public class PowerNet {
public int id;
public int requestedPower;
public int buffer;
}

View File

@ -0,0 +1,15 @@
package com.hbm.calc;
import net.minecraft.tileentity.TileEntity;
public class UnionOfTileEntitiesAndBooleans {
public UnionOfTileEntitiesAndBooleans(TileEntity tileentity, boolean bool)
{
source = tileentity;
ticked = bool;
}
public TileEntity source;
public boolean ticked = false;
}

View File

@ -1,6 +1,7 @@
package com.hbm.entity;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -53,7 +54,12 @@ public class EntityGrenadeNuclear extends EntityThrowable
entity0.coefficient = 10.0F;
this.worldObj.spawnEntityInWorld(entity0);
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 2, (int)this.posZ);
if(rand.nextInt(100) == 0)
{
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 2, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 2, (int)this.posZ);
}
}
}
}

View File

@ -3,6 +3,7 @@ package com.hbm.entity;
import java.util.List;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import com.hbm.items.ModItems;
import cpw.mods.fml.relauncher.Side;
@ -245,7 +246,12 @@ public class EntityMiniNuke extends Entity implements IProjectile
entity0.coefficient = 10.0F;
this.worldObj.spawnEntityInWorld(entity0);
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
if(rand.nextInt(100) == 0)
{
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
}
}
this.setDead();
}
@ -384,7 +390,12 @@ public class EntityMiniNuke extends Entity implements IProjectile
entity0.coefficient = 10.0F;
this.worldObj.spawnEntityInWorld(entity0);
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
if(rand.nextInt(100) == 0)
{
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
}
}
this.setDead();
}

View File

@ -4,6 +4,7 @@ import java.util.HashSet;
import java.util.List;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
@ -23,9 +24,11 @@ import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
@ -247,7 +250,13 @@ public class EntityNuclearCreeper extends EntityMob {
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(creep);
entity.setDead();
} else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper))
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(this.worldObj);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!this.worldObj.isRemote)
this.worldObj.spawnEntityInWorld(creep);
} else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie))
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 5 * 20, 1));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 15 * 20, 0));
@ -439,7 +448,12 @@ public class EntityNuclearCreeper extends EntityMob {
entity2.posZ = this.posZ;
this.worldObj.spawnEntityInWorld(entity2);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
if(rand.nextInt(100) == 0)
{
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
}
}
this.setDead();

View File

@ -0,0 +1,183 @@
package com.hbm.explosion;
import com.hbm.particles.EntityBSmokeFX;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
public class ExplosionParticleB {
public static void spawnMush(World world, int x, int y, int z)
{
x -= 6;
z -= 6;
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 0, z + 0,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 0, z + 0,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 0, z + 0,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 0, z + 0,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 0, y + 0, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 12, y + 0, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 0, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 0, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 0, y + 0, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 0, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 0, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 12, y + 0, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 0, y + 0, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 0, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 0, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 12, y + 0, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 0, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 0, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 0, y + 0, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 12, y + 0, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 0, z + 12,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 0, z + 12,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 0, z + 12,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 0, z + 12,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 1, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 1, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 1, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 1, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 1, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 1, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 1, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 1, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 1, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 1, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 1, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 1, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 1, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 2, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 2, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 2, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 2, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 2, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 2, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 2, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 2, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 4, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 4, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 4, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 4, z + 7,0.0, 0.0, 0.0));
y += 2;
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 4, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 4, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 4, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 4, z + 7,0.0, 0.0, 0.0));
y--;
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 7, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 7, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 7, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 7, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 8, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 9, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 9, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 9, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 9, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 9, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 9, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 9, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 9, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 9, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 10, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 10, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 10, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 10, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 10, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 10, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 10, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 10, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 10, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 11, z + 0,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 11, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 11, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 0, y + 11, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 12, y + 11, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 11, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 11, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 11, z + 12,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 12, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 12, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 12, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 12, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 12, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 12, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 12, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 12, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 12, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 12, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 12, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 12, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 12, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 12, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 12, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 12, z + 10,0.0, 0.0, 0.0));
//
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
//
y -= 2;
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 12, z + 2 - 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2 - 3, y + 12, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10 + 3, y + 12, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 12, z + 10 + 3,0.0, 0.0, 0.0));
y += 2;
//
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 13, z + 0,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 0, y + 13, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 12, y + 13, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 13, z + 12,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 14, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 14, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 14, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 14, z + 3,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 14, z + 5,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 5, y + 14, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 7, y + 14, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 14, z + 7,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 14, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 14, z + 9,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 3, y + 14, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 9, y + 14, z + 10,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 15, z + 2,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 15, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 15, z + 4,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 2, y + 15, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 10, y + 15, z + 6,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 4, y + 15, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 8, y + 15, z + 8,0.0, 0.0, 0.0));
world.spawnEntityInWorld(new EntityBSmokeFX(world, x + 6, y + 15, z + 10,0.0, 0.0, 0.0));
}
}

View File

@ -1,5 +1,5 @@
package com.hbm.interfaces;
public interface IConductor {
//This interface just exists for cables to connect onto machines
}

View File

@ -0,0 +1,10 @@
package com.hbm.interfaces;
public interface IConsumer {
void setPower(int i);
int getPower();
int getMaxPower();
}

View File

@ -0,0 +1,8 @@
package com.hbm.interfaces;
public interface ISource {
void ffgeuaInit();
void ffgeua(int x, int y, int z, boolean newTact);
}

View File

@ -6,6 +6,7 @@ import com.hbm.blocks.BlockCrashedBomb;
import com.hbm.blocks.LaunchPad;
import com.hbm.entity.EntityNukeExplosionAdvanced;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -34,7 +35,7 @@ public class ItemCell extends Item {
entity0.coefficient = 10.0F;
world.spawnEntityInWorld(entity0);
ExplosionParticle.spawnMush(world, p_77648_4_, p_77648_5_ - 3, p_77648_6_);
ExplosionParticleB.spawnMush(world, p_77648_4_, p_77648_5_ - 3, p_77648_6_);
}
} else if(i < 90)
{

View File

@ -22,7 +22,7 @@ public class ItemCustomLore extends Item {
}
if(this == ModItems.flame_politics)
{
list.add("Dolan Tremp 4 president!");
list.add("Donald Drumpf 4 president!");
}
if(this == ModItems.flame_opinion)
{

View File

@ -0,0 +1,39 @@
package com.hbm.items;
import com.hbm.lib.RefStrings;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class ModArmor extends ItemArmor {
public ModArmor(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
if(stack.getItem().equals(ModItems.steel_helmet) || stack.getItem().equals(ModItems.steel_plate) || stack.getItem().equals(ModItems.steel_boots)) {
return (RefStrings.MODID + ":textures/armor/steel_1.png");
}
if(stack.getItem().equals(ModItems.steel_legs)) {
return (RefStrings.MODID + ":textures/armor/steel_2.png");
}
if(stack.getItem().equals(ModItems.titanium_helmet) || stack.getItem().equals(ModItems.titanium_plate) || stack.getItem().equals(ModItems.titanium_boots)) {
return (RefStrings.MODID + ":textures/armor/titanium_1.png");
}
if(stack.getItem().equals(ModItems.titanium_legs)) {
return (RefStrings.MODID + ":textures/armor/titanium_2.png");
}
if(stack.getItem().equals(ModItems.alloy_helmet) || stack.getItem().equals(ModItems.alloy_plate) || stack.getItem().equals(ModItems.alloy_boots)) {
return (RefStrings.MODID + ":textures/armor/alloy_1.png");
}
if(stack.getItem().equals(ModItems.alloy_legs)) {
return (RefStrings.MODID + ":textures/armor/alloy_2.png");
}
else return null;
}
}

12
com/hbm/items/ModAxe.java Normal file
View File

@ -0,0 +1,12 @@
package com.hbm.items;
import net.minecraft.item.ItemAxe;
public class ModAxe extends ItemAxe {
protected ModAxe(ToolMaterial p_i45327_1_) {
super(p_i45327_1_);
// TODO Auto-generated constructor stub
}
}

12
com/hbm/items/ModHoe.java Normal file
View File

@ -0,0 +1,12 @@
package com.hbm.items;
import net.minecraft.item.ItemHoe;
public class ModHoe extends ItemHoe {
public ModHoe(ToolMaterial p_i45343_1_) {
super(p_i45343_1_);
// TODO Auto-generated constructor stub
}
}

View File

@ -165,8 +165,10 @@ public class ModItems {
public static Item cell_antimatter;
public static Item cell_anti_schrabidium;
public static Item inf_water;
public static Item inf_coolant;
public static Item inf_deuterium;
public static Item inf_tritium;
public static Item inf_sulfur;
public static Item canister_empty;
public static Item canister_fuel;
@ -396,17 +398,44 @@ public class ModItems {
public static Item t45_boots;
public static Item chainsaw;
public static Item schrabidium_helmet;
public static Item schrabidium_plate;
public static Item schrabidium_legs;
public static Item schrabidium_boots;
public static Item titanium_helmet;
public static Item titanium_plate;
public static Item titanium_legs;
public static Item titanium_boots;
public static Item steel_helmet;
public static Item steel_plate;
public static Item steel_legs;
public static Item steel_boots;
public static Item alloy_helmet;
public static Item alloy_plate;
public static Item alloy_legs;
public static Item alloy_boots;
public static Item schrabidium_sword;
public static Item schrabidium_pickaxe;
public static Item schrabidium_axe;
public static Item schrabidium_shovel;
public static Item schrabidium_hoe;
public static Item titanium_sword;
public static Item titanium_pickaxe;
public static Item titanium_axe;
public static Item titanium_shovel;
public static Item titanium_hoe;
public static Item steel_sword;
public static Item steel_pickaxe;
public static Item steel_axe;
public static Item steel_shovel;
public static Item steel_hoe;
public static Item alloy_sword;
public static Item alloy_pickaxe;
public static Item alloy_axe;
public static Item alloy_shovel;
public static Item alloy_hoe;
public static Item mask_of_infamy;
@ -435,7 +464,7 @@ public class ModItems {
public static Item euphemium_kit;
public static Item igniter;
public static Item smoke1;
public static Item smoke2;
public static Item smoke3;
@ -444,6 +473,14 @@ public class ModItems {
public static Item smoke6;
public static Item smoke7;
public static Item smoke8;
public static Item b_smoke1;
public static Item b_smoke2;
public static Item b_smoke3;
public static Item b_smoke4;
public static Item b_smoke5;
public static Item b_smoke6;
public static Item b_smoke7;
public static Item b_smoke8;
public static void initializeItem()
{
@ -604,8 +641,10 @@ public class ModItems {
cell_sas3 = new ItemCustomLore().setUnlocalizedName("cell_sas3").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_sas3");
cell_anti_schrabidium = new Item().setUnlocalizedName("cell_anti_schrabidium").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_anti_schrabidium");
inf_water = new Item().setUnlocalizedName("inf_water").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_water");
inf_coolant = new Item().setUnlocalizedName("inf_coolant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_coolant");
inf_deuterium = new Item().setUnlocalizedName("inf_deuterium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_deuterium");
inf_tritium = new Item().setUnlocalizedName("inf_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_tritium");
inf_sulfur = new Item().setUnlocalizedName("inf_sulfur").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_sulfur");
canister_empty = new ItemCustomLore().setUnlocalizedName("canister_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":canister_empty");
canister_fuel = new ItemCustomLore().setUnlocalizedName("canister_fuel").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fuel");
@ -846,17 +885,44 @@ public class ModItems {
t45_boots = new ArmorT45(MainRegistry.enumArmorMaterialT45, 2, 3).setUnlocalizedName("t45_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_boots");
chainsaw = new ItemModAxe(MainRegistry.enumToolMaterialChainsaw).setUnlocalizedName("chainsaw").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":chainsaw");
schrabidium_helmet = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("schrabidium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_helmet");
schrabidium_plate = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("schrabidium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_plate");
schrabidium_legs = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("schrabidium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_legs");
schrabidium_boots = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("schrabidium_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_boots");
titanium_helmet = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("titanium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_helmet");
titanium_plate = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("titanium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_plate");
titanium_legs = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("titanium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_legs");
titanium_boots = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("titanium_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_boots");
steel_helmet = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("steel_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_helmet");
steel_plate = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("steel_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_plate");
steel_legs = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("steel_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_legs");
steel_boots = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("steel_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_boots");
alloy_helmet = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("alloy_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_helmet");
alloy_plate = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("alloy_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_plate");
alloy_legs = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("alloy_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_legs");
alloy_boots = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("alloy_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_boots");
schrabidium_sword = new SwordSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_sword");
schrabidium_pickaxe = new PickaxeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_pickaxe");
schrabidium_axe = new AxeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_axe");
schrabidium_shovel = new SpadeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_shovel").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_shovel");
schrabidium_hoe = new HoeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_hoe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_hoe");
titanium_sword = new ModSword(MainRegistry.enumToolMaterialTitanium).setUnlocalizedName("titanium_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_sword");
titanium_pickaxe = new ModPickaxe(MainRegistry.enumToolMaterialTitanium).setUnlocalizedName("titanium_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_pickaxe");
titanium_axe = new ModAxe(MainRegistry.enumToolMaterialTitanium).setUnlocalizedName("titanium_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_axe");
titanium_shovel = new ModSpade(MainRegistry.enumToolMaterialTitanium).setUnlocalizedName("titanium_shovel").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_shovel");
titanium_hoe = new ModHoe(MainRegistry.enumToolMaterialTitanium).setUnlocalizedName("titanium_hoe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_hoe");
steel_sword = new ModSword(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("steel_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_sword");
steel_pickaxe = new ModPickaxe(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("steel_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_pickaxe");
steel_axe = new ModAxe(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("steel_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_axe");
steel_shovel = new ModSpade(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("steel_shovel").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_shovel");
steel_hoe = new ModHoe(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("steel_hoe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_hoe");
alloy_sword = new ModSword(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_sword");
alloy_pickaxe = new ModPickaxe(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_pickaxe");
alloy_axe = new ModAxe(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_axe");
alloy_shovel = new ModSpade(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_shovel").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_shovel");
alloy_hoe = new ModHoe(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_hoe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_hoe");
mask_of_infamy = new MaskOfInfamy(ArmorMaterial.IRON, 8, 0).setUnlocalizedName("mask_of_infamy").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mask_of_infamy");
@ -873,6 +939,14 @@ public class ModItems {
smoke6 = new Item().setUnlocalizedName("smoke6").setTextureName(RefStrings.MODID + ":smoke6");
smoke7 = new Item().setUnlocalizedName("smoke7").setTextureName(RefStrings.MODID + ":smoke7");
smoke8 = new Item().setUnlocalizedName("smoke8").setTextureName(RefStrings.MODID + ":smoke8");
b_smoke1 = new Item().setUnlocalizedName("b_smoke1").setTextureName(RefStrings.MODID + ":b_smoke1");
b_smoke2 = new Item().setUnlocalizedName("b_smoke2").setTextureName(RefStrings.MODID + ":b_smoke2");
b_smoke3 = new Item().setUnlocalizedName("b_smoke3").setTextureName(RefStrings.MODID + ":b_smoke3");
b_smoke4 = new Item().setUnlocalizedName("b_smoke4").setTextureName(RefStrings.MODID + ":b_smoke4");
b_smoke5 = new Item().setUnlocalizedName("b_smoke5").setTextureName(RefStrings.MODID + ":b_smoke5");
b_smoke6 = new Item().setUnlocalizedName("b_smoke6").setTextureName(RefStrings.MODID + ":b_smoke6");
b_smoke7 = new Item().setUnlocalizedName("b_smoke7").setTextureName(RefStrings.MODID + ":b_smoke7");
b_smoke8 = new Item().setUnlocalizedName("b_smoke8").setTextureName(RefStrings.MODID + ":b_smoke8");
}
private static void registerItem() {
@ -1057,8 +1131,10 @@ public class ModItems {
//Infinite Tanks
GameRegistry.registerItem(inf_water, inf_water.getUnlocalizedName());
GameRegistry.registerItem(inf_coolant, inf_coolant.getUnlocalizedName());
GameRegistry.registerItem(inf_deuterium, inf_deuterium.getUnlocalizedName());
GameRegistry.registerItem(inf_tritium, inf_tritium.getUnlocalizedName());
GameRegistry.registerItem(inf_sulfur, inf_sulfur.getUnlocalizedName());
//Canisters
GameRegistry.registerItem(canister_empty, canister_empty.getUnlocalizedName());
@ -1233,6 +1309,21 @@ public class ModItems {
GameRegistry.registerItem(schrabidium_axe, schrabidium_axe.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_shovel, schrabidium_shovel.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_hoe, schrabidium_hoe.getUnlocalizedName());
GameRegistry.registerItem(steel_sword, steel_sword.getUnlocalizedName());
GameRegistry.registerItem(steel_pickaxe, steel_pickaxe.getUnlocalizedName());
GameRegistry.registerItem(steel_axe, steel_axe.getUnlocalizedName());
GameRegistry.registerItem(steel_shovel, steel_shovel.getUnlocalizedName());
GameRegistry.registerItem(steel_hoe, steel_hoe.getUnlocalizedName());
GameRegistry.registerItem(titanium_sword, titanium_sword.getUnlocalizedName());
GameRegistry.registerItem(titanium_pickaxe, titanium_pickaxe.getUnlocalizedName());
GameRegistry.registerItem(titanium_axe, titanium_axe.getUnlocalizedName());
GameRegistry.registerItem(titanium_shovel, titanium_shovel.getUnlocalizedName());
GameRegistry.registerItem(titanium_hoe, titanium_hoe.getUnlocalizedName());
GameRegistry.registerItem(alloy_sword, alloy_sword.getUnlocalizedName());
GameRegistry.registerItem(alloy_pickaxe, alloy_pickaxe.getUnlocalizedName());
GameRegistry.registerItem(alloy_axe, alloy_axe.getUnlocalizedName());
GameRegistry.registerItem(alloy_shovel, alloy_shovel.getUnlocalizedName());
GameRegistry.registerItem(alloy_hoe, alloy_hoe.getUnlocalizedName());
//Syringes
GameRegistry.registerItem(syringe_empty, syringe_empty.getUnlocalizedName());
@ -1289,6 +1380,19 @@ public class ModItems {
GameRegistry.registerItem(goggles, goggles.getUnlocalizedName());
GameRegistry.registerItem(gas_mask, gas_mask.getUnlocalizedName());
GameRegistry.registerItem(steel_helmet, steel_helmet.getUnlocalizedName());
GameRegistry.registerItem(steel_plate, steel_plate.getUnlocalizedName());
GameRegistry.registerItem(steel_legs, steel_legs.getUnlocalizedName());
GameRegistry.registerItem(steel_boots, steel_boots.getUnlocalizedName());
GameRegistry.registerItem(titanium_helmet, titanium_helmet.getUnlocalizedName());
GameRegistry.registerItem(titanium_plate, titanium_plate.getUnlocalizedName());
GameRegistry.registerItem(titanium_legs, titanium_legs.getUnlocalizedName());
GameRegistry.registerItem(titanium_boots, titanium_boots.getUnlocalizedName());
GameRegistry.registerItem(alloy_helmet, alloy_helmet.getUnlocalizedName());
GameRegistry.registerItem(alloy_plate, alloy_plate.getUnlocalizedName());
GameRegistry.registerItem(alloy_legs, alloy_legs.getUnlocalizedName());
GameRegistry.registerItem(alloy_boots, alloy_boots.getUnlocalizedName());
//Power Armor
GameRegistry.registerItem(t45_helmet, t45_helmet.getUnlocalizedName());
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
@ -1347,5 +1451,13 @@ public class ModItems {
GameRegistry.registerItem(smoke6, smoke6.getUnlocalizedName());
GameRegistry.registerItem(smoke7, smoke7.getUnlocalizedName());
GameRegistry.registerItem(smoke8, smoke8.getUnlocalizedName());
GameRegistry.registerItem(b_smoke1, b_smoke1.getUnlocalizedName());
GameRegistry.registerItem(b_smoke2, b_smoke2.getUnlocalizedName());
GameRegistry.registerItem(b_smoke3, b_smoke3.getUnlocalizedName());
GameRegistry.registerItem(b_smoke4, b_smoke4.getUnlocalizedName());
GameRegistry.registerItem(b_smoke5, b_smoke5.getUnlocalizedName());
GameRegistry.registerItem(b_smoke6, b_smoke6.getUnlocalizedName());
GameRegistry.registerItem(b_smoke7, b_smoke7.getUnlocalizedName());
GameRegistry.registerItem(b_smoke8, b_smoke8.getUnlocalizedName());
}
}

View File

@ -0,0 +1,12 @@
package com.hbm.items;
import net.minecraft.item.ItemPickaxe;
public class ModPickaxe extends ItemPickaxe {
protected ModPickaxe(ToolMaterial p_i45347_1_) {
super(p_i45347_1_);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,12 @@
package com.hbm.items;
import net.minecraft.item.ItemSpade;
public class ModSpade extends ItemSpade {
public ModSpade(ToolMaterial p_i45353_1_) {
super(p_i45353_1_);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,12 @@
package com.hbm.items;
import net.minecraft.item.ItemSword;
public class ModSword extends ItemSword {
public ModSword(ToolMaterial p_i45356_1_) {
super(p_i45356_1_);
// TODO Auto-generated constructor stub
}
}

View File

@ -1,10 +1,17 @@
package com.hbm.lib;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.TileEntityLaunchPad;
import com.hbm.blocks.TileEntityMachineBattery;
import com.hbm.blocks.TileEntityMachineDeuterium;
import com.hbm.blocks.TileEntityMachineElectricFurnace;
import com.hbm.blocks.TileEntityWireCoated;
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.interfaces.IConductor;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.ISource;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
@ -170,70 +177,30 @@ public class Library {
return false;
}
public static void distributePower(World worldObj, int xCoord, int yCoord, int zCoord) {
TileEntity entity0 = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
TileEntity entity1 = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
TileEntity entity2 = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
TileEntity entity3 = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
TileEntity entity4 = worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
TileEntity entity5 = worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
TileEntity that = worldObj.getTileEntity(xCoord, yCoord, zCoord);
TileEntity entity;
for(int i = 0; i < 6; i++)
public static boolean checkConnectables(World world, int x, int y, int z)
{
TileEntity tileentity = world.getTileEntity(x, y, z);
if((tileentity != null && (tileentity instanceof IConductor ||
tileentity instanceof IConsumer ||
tileentity instanceof ISource)) ||
world.getBlock(x, y, z) == ModBlocks.fusion_center ||
world.getBlock(x, y, z) == ModBlocks.reactor_conductor)
{
entity = entity0;
if(i == 1) entity = entity1;
if(i == 2) entity = entity2;
if(i == 3) entity = entity3;
if(i == 4) entity = entity4;
if(i == 5) entity = entity5;
if(entity instanceof TileEntityMachineElectricFurnace ||
entity instanceof TileEntityWireCoated ||
entity instanceof TileEntityMachineDeuterium ||
entity instanceof TileEntityMachineBattery ||
entity instanceof TileEntityLaunchPad)
{
if(entity instanceof TileEntityMachineElectricFurnace && ((TileEntityMachineElectricFurnace)entity).power + 100 <= TileEntityMachineElectricFurnace.maxPower && TileEntityWireCoated.power >= 100)
{
((TileEntityMachineElectricFurnace)entity).power += 100;
if(that instanceof TileEntityWireCoated) {
TileEntityWireCoated.power -= 100;
}
} else
if(entity instanceof TileEntityWireCoated && TileEntityWireCoated.power + 100 <= TileEntityWireCoated.maxPower && TileEntityWireCoated.power >= 100)
{
TileEntityWireCoated.power += 100;
if(that instanceof TileEntityWireCoated) {
TileEntityWireCoated.power -= 100;
}
} else
if(entity instanceof TileEntityMachineDeuterium && ((TileEntityMachineDeuterium)entity).power + 100 <= TileEntityMachineDeuterium.maxPower && TileEntityWireCoated.power >= 100)
{
((TileEntityMachineDeuterium)entity).power += 100;
if(that instanceof TileEntityWireCoated) {
TileEntityWireCoated.power -= 100;
}
} else
if(entity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)entity).power + 100 <= ((TileEntityMachineBattery)entity).maxPower && !((TileEntityMachineBattery)entity).conducts && TileEntityWireCoated.power >= 100)
{
((TileEntityMachineBattery)entity).power += 100;
if(that instanceof TileEntityWireCoated) {
TileEntityWireCoated.power -= 100;
}
} else
if(entity instanceof TileEntityLaunchPad && ((TileEntityLaunchPad)entity).power + 100 <= ((TileEntityLaunchPad)entity).maxPower && TileEntityWireCoated.power >= 100)
{
((TileEntityLaunchPad)entity).power += 100;
if(that instanceof TileEntityWireCoated) {
TileEntityWireCoated.power -= 100;
}
}
}
return true;
}
return false;
}
public static boolean checkUnionList(List<UnionOfTileEntitiesAndBooleans> list, TileEntity that) {
for(UnionOfTileEntitiesAndBooleans union : list)
{
if(union.source == that)
{
return true;
}
}
return false;
}
}

View File

@ -74,9 +74,11 @@ import com.hbm.entity.EntityRocket;
import com.hbm.entity.EntitySchrab;
import com.hbm.entity.EntityTestMissile;
import com.hbm.items.ModItems;
import com.hbm.particles.EntityBSmokeFX;
import com.hbm.particles.EntitySmokeFX;
import com.hbm.render.ItemRenderRevolverCursed;
import com.hbm.render.ItemRenderRevolverIron;
import com.hbm.render.BSmokeRenderer;
import com.hbm.render.ItemRenderBigSword;
import com.hbm.render.ItemRenderDecoBlock;
import com.hbm.render.ItemRenderFatMan;
@ -269,6 +271,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityNuclearCreeper.class, new RenderNuclearCreeper());
RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new ModEffectRenderer(ModItems.nuclear_waste));
RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new BSmokeRenderer(ModItems.nuclear_waste));
RenderingRegistry.addNewArmourRendererPrefix("5");
RenderingRegistry.addNewArmourRendererPrefix("6");

View File

@ -106,6 +106,7 @@ import com.hbm.entity.EntityTestMissile;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmWorld;
import com.hbm.lib.RefStrings;
import com.hbm.particles.EntityBSmokeFX;
import com.hbm.particles.EntitySmokeFX;
import cpw.mods.fml.common.SidedProxy;
@ -131,6 +132,9 @@ public class MainRegistry
//Tool Materials
public static ToolMaterial enumToolMaterialSchrabidium = EnumHelper.addToolMaterial("SCHRABIDIUM", 3, 10000, 50.0F, 100.0F, 200);
public static ToolMaterial enumToolMaterialChainsaw = EnumHelper.addToolMaterial("CHAINSAW", 3, 5000, 50.0F, 47.0F, 0);
public static ToolMaterial enumToolMaterialSteel = EnumHelper.addToolMaterial("STEEL", 2, 500, 7.5F, 2.0F, 10);
public static ToolMaterial enumToolMaterialTitanium = EnumHelper.addToolMaterial("TITANIUM", 3, 750, 9.0F, 2.5F, 15);
public static ToolMaterial enumToolMaterialAlloy= EnumHelper.addToolMaterial("ALLOY", 3, 2000, 15.0F, 5.0F, 5);
//Armor Materials
public static ArmorMaterial enumArmorMaterialEmerald = EnumHelper.addArmorMaterial("TEST", 2500, new int[] {3, 8, 6, 3}, 30);
@ -138,6 +142,9 @@ public class MainRegistry
public static ArmorMaterial enumArmorMaterialEuphemium = EnumHelper.addArmorMaterial("EUPHEMIUM", 2147483647, new int[] {3, 8, 6, 3}, 100);
public static ArmorMaterial enumArmorMaterialHazmat = EnumHelper.addArmorMaterial("HAZMAT", 60, new int[] {2, 5, 4, 1}, 5);
public static ArmorMaterial enumArmorMaterialT45 = EnumHelper.addArmorMaterial("T45", 1000, new int[] {2, 5, 4, 1}, 0);
public static ArmorMaterial enumArmorMaterialSteel = EnumHelper.addArmorMaterial("STEEL", 20, new int[] {2, 6, 5, 2}, 5);
public static ArmorMaterial enumArmorMaterialTitanium = EnumHelper.addArmorMaterial("TITANIUM", 25, new int[] {3, 8, 6, 3}, 9);
public static ArmorMaterial enumArmorMaterialAlloy = EnumHelper.addArmorMaterial("ALLOY", 50, new int[] {3, 8, 6, 3}, 12);
//Creative Tabs
public static CreativeTabs tabTest = new TestTab(CreativeTabs.getNextID(), "tabTest");
@ -152,8 +159,8 @@ public class MainRegistry
public static int manRadius = 175;
public static int mikeRadius = 250;
public static int tsarRadius = 500;
public static int prototypeRadius = 50;
public static int fleijaRadius = 150;
public static int prototypeRadius = 150;
public static int fleijaRadius = 50;
@EventHandler
public void PreLoad(FMLPreInitializationEvent PreEvent)
@ -167,8 +174,14 @@ public class MainRegistry
enumArmorMaterialSchrabidium.customCraftingMaterial = ModItems.ingot_schrabidium;
enumArmorMaterialHazmat.customCraftingMaterial = ModItems.hazmat_cloth;
enumArmorMaterialT45.customCraftingMaterial = ModItems.plate_titanium;
enumArmorMaterialTitanium.customCraftingMaterial = ModItems.ingot_titanium;
enumArmorMaterialSteel.customCraftingMaterial = ModItems.ingot_steel;
enumArmorMaterialAlloy.customCraftingMaterial = ModItems.ingot_advanced_alloy;
enumToolMaterialSchrabidium.setRepairItem(new ItemStack(ModItems.ingot_schrabidium));
enumToolMaterialChainsaw.setRepairItem(new ItemStack(ModItems.ingot_steel));
enumToolMaterialTitanium.setRepairItem(new ItemStack(ModItems.ingot_titanium));
enumToolMaterialSteel.setRepairItem(new ItemStack(ModItems.ingot_steel));
enumToolMaterialAlloy.setRepairItem(new ItemStack(ModItems.ingot_advanced_alloy));
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GUIHandler());
GameRegistry.registerTileEntity(TileEntityTestBombAdvanced.class, "tilentity_testbombadvanced");
@ -253,6 +266,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntitySmokeFX.class, "entity_smoke_fx", 37, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityNukeCloudBig.class, "entity_nuke_cloud_big", 38, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityGrenadeNuclear.class, "entity_grenade_nuclear", 39, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityBSmokeFX.class, "entity_b_smoke_fx", 40, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
}

View File

@ -0,0 +1,81 @@
package com.hbm.particles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.World;
public class EntityBSmokeFX extends EntityModFX
{
float smokeParticleScale;
public int particleAge;
public int maxAge;
private static final String __OBFID = "CL_00000924";
public EntityBSmokeFX(World world) {
super(world, 0, 0, 0);
}
public EntityBSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
{
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
}
public EntityBSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
{
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i1226_8_;
this.motionY += p_i1226_10_;
this.motionZ += p_i1226_12_;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1226_14_;
this.smokeParticleScale = this.particleScale;
//this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D));
//this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_);
this.noClip = false;
}
/**
* Called to update the entity's position/logic.
*/
@Override
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if(maxAge < 100)
{
maxAge = rand.nextInt(21) + 65;
}
this.particleAge++;
if (this.particleAge >= maxAge)
{
this.setDead();
}
this.motionX *= 0.9599999785423279D;
this.motionY *= 0.9599999785423279D;
this.motionZ *= 0.9599999785423279D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float p_70070_1_)
{
return 15728880;
}
}

View File

@ -0,0 +1,155 @@
package com.hbm.render;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.Callable;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.particles.EntityBSmokeFX;
import com.hbm.particles.EntitySmokeFX;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.particle.EntityDiggingFX;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
import net.minecraft.entity.projectile.EntityPotion;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPotion;
import net.minecraft.potion.PotionHelper;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ReportedException;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class BSmokeRenderer extends Render
{
private Item field_94151_a;
private int field_94150_f;
private static final String __OBFID = "CL_00001008";
public BSmokeRenderer(Item p_i1259_1_, int p_i1259_2_)
{
this.field_94151_a = p_i1259_1_;
this.field_94150_f = p_i1259_2_;
}
public BSmokeRenderer(Item p_i1260_1_)
{
this(p_i1260_1_, 0);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
if(p_76986_1_ instanceof EntityBSmokeFX)
{
EntityBSmokeFX fx = (EntityBSmokeFX)p_76986_1_;
if(fx.particleAge < fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7)
{
field_94151_a = ModItems.b_smoke8;
}
if(fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6)
{
field_94151_a = ModItems.b_smoke7;
}
if(fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5)
{
field_94151_a = ModItems.b_smoke6;
}
if(fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4)
{
field_94151_a = ModItems.b_smoke5;
}
if(fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3)
{
field_94151_a = ModItems.b_smoke4;
}
if(fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2)
{
field_94151_a = ModItems.b_smoke3;
}
if(fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1)
{
field_94151_a = ModItems.b_smoke2;
}
if(fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0)
{
field_94151_a = ModItems.b_smoke1;
}
IIcon iicon = field_94151_a.getIconFromDamage(0);
if (iicon != null)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glScalef(7.5F, 7.5F, 7.5F);
this.bindEntityTexture(p_76986_1_);
Tessellator tessellator = Tessellator.instance;
this.func_77026_a(tessellator, iicon);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
}
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return TextureMap.locationItemsTexture;
}
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_)
{
float f = p_77026_2_.getMinU();
float f1 = p_77026_2_.getMaxU();
float f2 = p_77026_2_.getMinV();
float f3 = p_77026_2_.getMaxV();
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
p_77026_1_.startDrawingQuads();
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
p_77026_1_.draw();
}
}