mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
finished substation, proxy TE shenanigans
This commit is contained in:
parent
8f1afce7b3
commit
e66397ca8a
@ -695,6 +695,7 @@ public class ModBlocks {
|
||||
public static Block red_connector;
|
||||
public static Block red_pylon;
|
||||
public static Block red_pylon_large;
|
||||
public static Block substation;
|
||||
public static Block cable_switch;
|
||||
public static Block machine_detector;
|
||||
public static Block rf_cable;
|
||||
@ -1152,10 +1153,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block volcano_core;
|
||||
|
||||
public static Block dummy_block_cyclotron;
|
||||
public static Block dummy_port_cyclotron;
|
||||
public static Block dummy_block_well;
|
||||
public static Block dummy_port_well;
|
||||
public static Block dummy_block_flare;
|
||||
public static Block dummy_port_flare;
|
||||
public static Block dummy_block_drill;
|
||||
@ -1792,6 +1789,7 @@ public class ModBlocks {
|
||||
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_large = new PylonLarge(Material.iron).setBlockName("red_pylon_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon_large");
|
||||
substation = new Substation(Material.iron).setBlockName("substation").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":substation");
|
||||
cable_switch = new CableSwitch(Material.iron).setBlockName("cable_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":cable_switch_off");
|
||||
machine_detector = new PowerDetector(Material.iron).setBlockName("machine_detector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_detector_off");
|
||||
oil_duct_solid = new OilDuctSolid(Material.iron).setBlockName("oil_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":oil_duct_solid_alt");
|
||||
@ -2149,10 +2147,6 @@ public class ModBlocks {
|
||||
FluidRegistry.registerFluid(volcanic_lava_fluid);
|
||||
volcanic_lava_block = new VolcanicBlock(volcanic_lava_fluid, Material.lava).setBlockName("volcanic_lava_block").setResistance(500F);
|
||||
|
||||
dummy_block_cyclotron = new DummyBlockCyclotron(Material.iron, false).setBlockName("dummy_block_cyclotron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||
dummy_port_cyclotron = new DummyBlockCyclotron(Material.iron, true).setBlockName("dummy_port_cyclotron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||
dummy_block_well = new BlockGeneric(Material.iron).setBlockName("dummy_block_well").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_well = new BlockGeneric(Material.iron).setBlockName("dummy_port_well").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_flare = new DummyBlockFlare(Material.iron, false).setBlockName("dummy_block_flare").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
dummy_port_flare = new DummyBlockFlare(Material.iron, true).setBlockName("dummy_port_flare").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
dummy_block_drill = new DummyBlockDrill(Material.iron, false).setBlockName("dummy_block_drill").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_lead");
|
||||
@ -2673,7 +2667,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(turret_brandon, turret_brandon.getUnlocalizedName());
|
||||
|
||||
//Wall-mounted Explosives
|
||||
GameRegistry.registerBlock(charge_dynamite, charge_dynamite.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(charge_dynamite, ItemBlockBase.class, charge_dynamite.getUnlocalizedName());
|
||||
|
||||
//Mines
|
||||
GameRegistry.registerBlock(mine_ap, mine_ap.getUnlocalizedName());
|
||||
@ -2870,6 +2864,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_pylon_large, ItemBlockBase.class, red_pylon_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(substation, ItemBlockBase.class, substation.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(cable_switch, cable_switch.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_detector, machine_detector.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rf_cable, rf_cable.getUnlocalizedName());
|
||||
@ -3109,10 +3104,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(volcanic_lava_block, volcanic_lava_block.getUnlocalizedName());
|
||||
|
||||
//Multiblock Dummy Blocks
|
||||
GameRegistry.registerBlock(dummy_block_cyclotron, dummy_block_cyclotron.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_cyclotron, dummy_port_cyclotron.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_well, dummy_block_well.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_well, dummy_port_well.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_flare, dummy_block_flare.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_flare, dummy_port_flare.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_drill, dummy_block_drill.getUnlocalizedName());
|
||||
|
||||
@ -7,23 +7,38 @@ import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.UP;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
||||
|
||||
import com.hbm.blocks.BlockBase;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockContainerBase;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.tileentity.bomb.TileEntityCharge;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public abstract class BlockChargeBase extends BlockBase implements IBomb, IToolable {
|
||||
public abstract class BlockChargeBase extends BlockContainerBase implements IBomb, IToolable, ITooltipProvider {
|
||||
|
||||
public static boolean safe = false;
|
||||
|
||||
public BlockChargeBase() {
|
||||
super(Material.tnt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityCharge();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
@ -34,7 +49,7 @@ public abstract class BlockChargeBase extends BlockBase implements IBomb, IToola
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float fX, float fY, float fZ, int meta) {
|
||||
return side;
|
||||
@ -50,7 +65,7 @@ public abstract class BlockChargeBase extends BlockBase implements IBomb, IToola
|
||||
(dir == WEST && world.isSideSolid(x + 1, y, z, WEST)) ||
|
||||
(dir == EAST && world.isSideSolid(x - 1, y, z, EAST));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
|
||||
@ -61,12 +76,12 @@ public abstract class BlockChargeBase extends BlockBase implements IBomb, IToola
|
||||
this.explode(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
@ -82,13 +97,81 @@ public abstract class BlockChargeBase extends BlockBase implements IBomb, IToola
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
if(tool != ToolType.DEFUSER)
|
||||
return false;
|
||||
|
||||
TileEntityCharge charge = (TileEntityCharge) world.getTileEntity(x, y, z);
|
||||
|
||||
if(charge.started) {
|
||||
charge.started = !charge.started;
|
||||
world.playSoundEffect(x, y, z, "hbm:weapon.fstbmbStart", 1.0F, 1.0F);
|
||||
charge.markDirty();
|
||||
} else {
|
||||
safe = true;
|
||||
this.dismantle(world, x, y, z);
|
||||
safe = false;
|
||||
}
|
||||
|
||||
this.dismantle(world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
||||
super.breakBlock(world, x, y, z, block, i);
|
||||
|
||||
if(!safe)
|
||||
explode(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion p_149723_5_) {
|
||||
this.explode(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.YELLOW + "Right-click to change timer.");
|
||||
list.add(EnumChatFormatting.YELLOW + "Sneak-click to arm.");
|
||||
list.add(EnumChatFormatting.RED + "Can only be disarmed and removed with defuser.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
TileEntityCharge charge = (TileEntityCharge) world.getTileEntity(x, y, z);
|
||||
|
||||
if(!charge.started) {
|
||||
|
||||
if(player.isSneaking()) {
|
||||
|
||||
if(charge.timer > 0) {
|
||||
charge.started = true;
|
||||
world.playSoundEffect(x, y, z, "hbm:weapon.fstbmbStart", 1.0F, 1.0F);
|
||||
}
|
||||
} else {
|
||||
|
||||
if(charge.timer == 0) { charge.timer = 100; }
|
||||
else if(charge.timer == 100) { charge.timer = 200; }
|
||||
else if(charge.timer == 200) { charge.timer = 300; }
|
||||
else if(charge.timer == 300) { charge.timer = 600; }
|
||||
else if(charge.timer == 600) { charge.timer = 1200; }
|
||||
else if(charge.timer == 1200) { charge.timer = 3600; }
|
||||
else if(charge.timer == 3600) { charge.timer = 6000; }
|
||||
else { charge.timer = 0; }
|
||||
|
||||
world.playSoundEffect(x, y, z, "hbm:item.techBoop", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
charge.markDirty();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.world.World;
|
||||
@ -13,11 +12,12 @@ public class BlockChargeDynamite extends BlockChargeBase {
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
safe = true;
|
||||
world.setBlockToAir(x, y, z);
|
||||
ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 6F);
|
||||
safe = false;
|
||||
ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
exp.explode();
|
||||
ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 25);
|
||||
ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 20);
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
@ -4,8 +4,10 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylonLarge;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -43,7 +45,19 @@ public class PylonLarge extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityPylonBase) {
|
||||
((TileEntityPylonBase)te).disconnectAll();
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, b, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
75
src/main/java/com/hbm/blocks/network/Substation.java
Normal file
75
src/main/java/com/hbm/blocks/network/Substation.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyConductor;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntitySubstation;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class Substation extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public Substation(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntitySubstation();
|
||||
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyConductor();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Quadruple");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "20m");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityPylonBase) {
|
||||
((TileEntityPylonBase)te).disconnectAll();
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, b, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {4, 0, 1, 1, 2, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX * o + 1, y, z + dir.offsetZ * o + 1);
|
||||
this.makeExtra(world, x + dir.offsetX * o + 1, y, z + dir.offsetZ * o - 1);
|
||||
this.makeExtra(world, x + dir.offsetX * o - 1, y, z + dir.offsetZ * o + 1);
|
||||
this.makeExtra(world, x + dir.offsetX * o - 1, y, z + dir.offsetZ * o - 1);
|
||||
}
|
||||
}
|
||||
@ -31,7 +31,6 @@ public class RodRecipes {
|
||||
addZIRNOXRod(U235, ModItems.rod_zirnox_u235_fuel);
|
||||
addZIRNOXRod(ModItems.billet_les, ModItems.rod_zirnox_les_fuel);
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_zirnox_lithium), new Object[] { ModItems.rod_zirnox_empty, LI.ingot(), LI.ingot() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { ModItems.rod_zirnox_tritium, ModItems.cell_empty, ModItems.cell_empty });
|
||||
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_natural_uranium, 2, 1), new Object[] { ModItems.rod_zirnox_natural_uranium_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium, 2, 1), new Object[] { ModItems.rod_zirnox_uranium_fuel_depleted });
|
||||
@ -51,9 +50,6 @@ public class RodRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_empty, 1), new Object[] { ModItems.rod_dual_empty, ModItems.rod_dual_empty });
|
||||
|
||||
addBreedingRod(LI, ModItems.lithium, BreedingRodType.LITHIUM);
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 1), new Object[] { new ItemStack(ModItems.rod_empty, 1, BreedingRodType.TRITIUM.ordinal()), ModItems.cell_empty });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { new ItemStack(ModItems.rod_dual_empty, 1, BreedingRodType.TRITIUM.ordinal()), ModItems.cell_empty, ModItems.cell_empty });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 4), new Object[] { new ItemStack(ModItems.rod_quad_empty, 1, BreedingRodType.TRITIUM.ordinal()), ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty });
|
||||
addBreedingRod(CO, ModItems.billet_cobalt, BreedingRodType.CO);
|
||||
addBreedingRod(CO60, ModItems.billet_co60, BreedingRodType.CO60);
|
||||
addBreedingRod(TH232, ModItems.billet_th232, BreedingRodType.TH232);
|
||||
|
||||
@ -100,7 +100,7 @@ public class AnvilRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 48, input);
|
||||
return getCycledIngredients(cycleticks / 20, input);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -113,7 +113,7 @@ public class AnvilRecipeHandler extends TemplateRecipeHandler {
|
||||
List<PositionedStack> other = new ArrayList();
|
||||
other.addAll(output);
|
||||
other.add(anvil);
|
||||
return getCycledIngredients(cycleticks / 48, other);
|
||||
return getCycledIngredients(cycleticks / 20, other);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -356,9 +356,6 @@ public class HazardRegistry {
|
||||
|
||||
HazardSystem.register(wire_schrabidium, makeData(RADIATION, sa326 * nugget));
|
||||
|
||||
HazardSystem.register(ore_asbestos, makeData(ASBESTOS, 1F));
|
||||
HazardSystem.register(ore_gneiss_asbestos, makeData(ASBESTOS, 3F));
|
||||
HazardSystem.register(block_asbestos, makeData(ASBESTOS, 1F));
|
||||
HazardSystem.register(brick_asbestos, makeData(ASBESTOS, 1F));
|
||||
HazardSystem.register(tile_lab_broken, makeData(ASBESTOS, 1F));
|
||||
HazardSystem.register(powder_coltan_ore, makeData(ASBESTOS, 3F));
|
||||
@ -393,6 +390,8 @@ public class HazardRegistry {
|
||||
HazardSystem.register(solinium_propellant, makeData(EXPLOSIVE, 10F));
|
||||
HazardSystem.register(solinium_core, new HazardData().addEntry(RADIATION, sa327 * nugget * 8).addEntry(BLINDING, 5F));
|
||||
|
||||
HazardSystem.register(nuke_fstbmb, makeData(DIGAMMA, 0.01F));
|
||||
|
||||
/*
|
||||
* Blacklist
|
||||
*/
|
||||
|
||||
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import static com.hbm.items.ModItems.*;
|
||||
import static com.hbm.blocks.ModBlocks.*;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.hazard.HazardData;
|
||||
import com.hbm.hazard.HazardEntry;
|
||||
@ -209,6 +210,7 @@ public class OreDictManager {
|
||||
public static final DictFrame ANY_PLASTIC = new DictFrame("AnyPlastic");
|
||||
public static final DictFrame ANY_GUNPOWDER = new DictFrame("AnyPropellant");
|
||||
public static final DictFrame ANY_SMOKELESS = new DictFrame("AnySmokeless");
|
||||
public static final String KEY_ANYCONCRETE = "anyConcrete";
|
||||
|
||||
public static void registerOres() {
|
||||
|
||||
@ -351,6 +353,10 @@ public class OreDictManager {
|
||||
ANY_GUNPOWDER .dust(Items.gunpowder, ModItems.ballistite, ModItems.cordite);
|
||||
ANY_SMOKELESS .dust(ModItems.ballistite, ModItems.cordite);
|
||||
|
||||
OreDictionary.registerOre(KEY_ANYCONCRETE, ModBlocks.concrete);
|
||||
OreDictionary.registerOre(KEY_ANYCONCRETE, ModBlocks.concrete_smooth);
|
||||
OreDictionary.registerOre(KEY_ANYCONCRETE, ModBlocks.concrete_asbestos);
|
||||
|
||||
OreDictionary.registerOre(getReflector(), neutron_reflector);
|
||||
OreDictionary.registerOre("oreRareEarth", ore_rare);
|
||||
OreDictionary.registerOre("oreRareEarth", ore_gneiss_rare);
|
||||
|
||||
@ -210,6 +210,26 @@ public class AnvilRecipes {
|
||||
},
|
||||
new AnvilOutput(new ItemStack(ModBlocks.machine_deuterium_tower))).setTier(4));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(KEY_ANYCONCRETE, 2),
|
||||
new ComparableStack(ModBlocks.steel_scaffold, 8),
|
||||
new ComparableStack(ModItems.plate_polymer, 8),
|
||||
new ComparableStack(ModItems.coil_copper, 4)
|
||||
},
|
||||
new AnvilOutput(new ItemStack(ModBlocks.red_pylon_large))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(KEY_ANYCONCRETE, 6),
|
||||
new OreDictStack(STEEL.ingot(), 4),
|
||||
new ComparableStack(ModBlocks.steel_scaffold, 2),
|
||||
new ComparableStack(ModItems.plate_polymer, 8),
|
||||
new ComparableStack(ModItems.coil_copper, 2),
|
||||
new ComparableStack(ModItems.coil_copper_torus, 2)
|
||||
},
|
||||
new AnvilOutput(new ItemStack(ModBlocks.substation))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new ComparableStack(ModItems.tank_steel, 1),
|
||||
|
||||
@ -2,14 +2,11 @@ package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.mob.EntityBlockSpider;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.world.dungeon.Bunker;
|
||||
import com.hbm.world.dungeon.Relay;
|
||||
import com.hbm.world.generator.CellularDungeonFactory;
|
||||
|
||||
import api.hbm.energy.IEnergyConductor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -35,6 +32,14 @@ public class ItemWandD extends Item {
|
||||
//int y = world.getHeightValue(x, z);
|
||||
int y = pos.blockY;
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
if(b instanceof BlockDummyable) {
|
||||
int[] core = ((BlockDummyable)b).findCore(world, x, y, z);
|
||||
x = core[0];
|
||||
y = core[1];
|
||||
z = core[2];
|
||||
}
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof IEnergyConductor) {
|
||||
IEnergyConductor con = (IEnergyConductor) te;
|
||||
|
||||
@ -134,7 +134,6 @@ public class Library {
|
||||
return true;
|
||||
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
||||
tileentity instanceof IFluidSource)) ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_flare ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_chemplant ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_fluidtank ||
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4095)";
|
||||
public static final String VERSION = "1.0.27 BETA (4109)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -126,6 +126,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeFleija.class, new RenderNukeFleija());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCrashedBomb.class, new RenderCrashedBomb());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukePrototype.class, new RenderNukePrototype());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCharge.class, new RenderExplosiveCharge());
|
||||
//turrets
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretHeavy.class, new RenderHeavyTurret());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretRocket.class, new RenderRocketTurret());
|
||||
@ -230,6 +231,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylon.class, new RenderPylon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnector.class, new RenderConnector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPylonLarge.class, new RenderPylonLarge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySubstation.class, new RenderSubstation());
|
||||
//multiblocks
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStructureMarker.class, new RenderStructureMaker());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock());
|
||||
|
||||
@ -456,6 +456,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.det_miner, 4), new Object[] { "FFF", "ITI", "ITI", 'F', Items.flint, 'I', IRON.plate(), 'T', ModItems.ball_dynamite });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.det_miner, 12), new Object[] { "FFF", "ITI", "ITI", 'F', Items.flint, 'I', STEEL.plate(), 'T', ModItems.ingot_semtex });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.emp_bomb), 1), new Object[] { "LML", "LCL", "LML", 'L', PB.plate(), 'M', ModItems.magnetron, 'C', ModItems.circuit_gold });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.charge_dynamite, 1), new Object[] { ModItems.stick_dynamite, ModItems.stick_dynamite, ModItems.stick_dynamite, ModItems.ducttape });
|
||||
|
||||
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_generic), new Object[] { " A ", "PRP", "PRP", 'A', ModItems.wire_aluminium, 'P', AL.plate(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PSP", "PLP", 'A', ModItems.wire_red_copper, 'P', CU.plate(), 'S', "sulfur", 'L', PB.dust() });
|
||||
|
||||
@ -68,7 +68,6 @@ import com.hbm.handler.imc.IMCCrystallizer;
|
||||
import com.hbm.handler.imc.IMCHandler;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.inventory.*;
|
||||
import com.hbm.inventory.recipes.*;
|
||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
||||
|
||||
@ -17,7 +17,6 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockAshes;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.entity.missile.EntityMissileBaseAdvanced;
|
||||
import com.hbm.entity.missile.EntityMissileCustom;
|
||||
import com.hbm.entity.mob.EntityCyberCrab;
|
||||
@ -26,7 +25,6 @@ import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.mob.EntityQuackos;
|
||||
import com.hbm.entity.mob.EntityTaintedCreeper;
|
||||
import com.hbm.entity.projectile.EntityBurningFOEQ;
|
||||
import com.hbm.entity.projectile.EntityMeteor;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockAshes;
|
||||
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
||||
import com.hbm.entity.mob.EntityHunterChopper;
|
||||
import com.hbm.entity.projectile.EntityChopperMine;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
@ -23,7 +22,6 @@ import com.hbm.interfaces.IItemHUD;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.gui.GUIArmorTable;
|
||||
import com.hbm.inventory.recipes.BreederRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.armor.ArmorFSB;
|
||||
import com.hbm.items.armor.ArmorFSBPowered;
|
||||
@ -52,7 +50,6 @@ import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom.CustomNukeEntry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumEntryType;
|
||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKBase;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
@ -140,7 +137,6 @@ public class ModEventHandlerClient {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
World world = mc.theWorld;
|
||||
MovingObjectPosition mop = mc.objectMouseOver;
|
||||
ScaledResolution resolution = event.resolution;
|
||||
|
||||
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK && world.getBlock(mop.blockX, mop.blockY, mop.blockZ) instanceof ILookOverlay) {
|
||||
((ILookOverlay) world.getBlock(mop.blockX, mop.blockY, mop.blockZ)).printHook(event, world, mop.blockX, mop.blockY, mop.blockZ);
|
||||
|
||||
@ -83,14 +83,12 @@ public class NEIConfig implements IConfigureNEI {
|
||||
}
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_assembler));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_chemplant));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_cyclotron));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_drill));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_flare));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_fluidtank));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_pumpjack));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_refinery));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_turbofan));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_well));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_base));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_emitter));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_ams_limiter));
|
||||
@ -101,14 +99,12 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_puf6));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_assembler));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_chemplant));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_cyclotron));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_drill));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_flare));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_fluidtank));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_pumpjack));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_refinery));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_turbofan));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_well));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_base));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_emitter));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_ams_limiter));
|
||||
|
||||
@ -273,6 +273,7 @@ public class ResourceManager {
|
||||
//Network
|
||||
public static final IModelCustom connector = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/connector.obj"));
|
||||
public static final IModelCustom pylon_large = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/network/pylon_large.obj"));
|
||||
public static final IModelCustom substation = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/substation.obj"));
|
||||
|
||||
////Textures TEs
|
||||
|
||||
@ -568,6 +569,7 @@ public class ResourceManager {
|
||||
//Electricity
|
||||
public static final ResourceLocation connector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/connector.png");
|
||||
public static final ResourceLocation pylon_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_large.png");
|
||||
public static final ResourceLocation substation_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/substation.png");
|
||||
|
||||
|
||||
|
||||
|
||||
@ -35,7 +35,9 @@ public class RenderBlockRotated implements ISimpleBlockRenderingHandler {
|
||||
iicon = renderer.overrideBlockTexture;
|
||||
}
|
||||
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glRotated(-90, 0, 1, 0);
|
||||
GL11.glRotated(-90, 0, 0, 1);
|
||||
GL11.glTranslated(0, 0.375, 0);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) model, iicon, tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.tileentity.bomb.TileEntityCharge;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderExplosiveCharge extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y + 0.5D, z + 0.5D);
|
||||
|
||||
switch(tile.getBlockMetadata()) {
|
||||
case 0: GL11.glRotated(180, 0, 0, 1); break;
|
||||
case 1: break;
|
||||
case 2: GL11.glRotated(90, 0, 1, 0); GL11.glRotated(-90, 0, 0, 1); break;
|
||||
case 3: GL11.glRotated(-90, 0, 1, 0); GL11.glRotated(-90, 0, 0, 1); break;
|
||||
case 4: GL11.glRotated(180, 0, 1, 0); GL11.glRotated(-90, 0, 0, 1); break;
|
||||
case 5: GL11.glRotated(-90, 0, 0, 1); break;
|
||||
}
|
||||
|
||||
TileEntityCharge charge = (TileEntityCharge) tile;
|
||||
String text = charge.getMinutes() + ":" + charge.getSeconds();
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
float f3 = 0.0125F;
|
||||
GL11.glTranslatef(-0.05F, 0.315F - 0.5F, 0.15F);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
GL11.glDepthMask(false);
|
||||
font.drawString(text, 0, 0, 0x00ff00);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -3,11 +3,9 @@ package com.hbm.render.tileentity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.network.TileEntityPylonLarge;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderPylonLarge extends RenderPylonBase {
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.network.TileEntitySubstation;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderSubstation extends RenderPylonBase {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 4:
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 2:
|
||||
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.substation_tex);
|
||||
ResourceManager.substation.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
TileEntitySubstation sub = (TileEntitySubstation) tile;
|
||||
this.renderLinesGeneric(sub, x, y, z);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
|
||||
import api.hbm.energy.IEnergyConnector;
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@ -128,8 +129,8 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
if(!power)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IEnergyUser) {
|
||||
return ((IEnergyUser)getTile()).getPower();
|
||||
if(getTile() instanceof IEnergyConnector) {
|
||||
return ((IEnergyConnector)getTile()).getPower();
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -141,8 +142,8 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
if(!power)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IEnergyUser) {
|
||||
return ((IEnergyUser)getTile()).getMaxPower();
|
||||
if(getTile() instanceof IEnergyConnector) {
|
||||
return ((IEnergyConnector)getTile()).getMaxPower();
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -154,8 +155,8 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
if(!this.power)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IEnergyUser) {
|
||||
return ((IEnergyUser)getTile()).transferPower(power);
|
||||
if(getTile() instanceof IEnergyConnector) {
|
||||
return ((IEnergyConnector)getTile()).transferPower(power);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -167,8 +168,8 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
if(!power)
|
||||
return false;
|
||||
|
||||
if(getTile() instanceof IEnergyUser) {
|
||||
return ((IEnergyUser)getTile()).canConnect(dir);
|
||||
if(getTile() instanceof IEnergyConnector) {
|
||||
return ((IEnergyConnector)getTile()).canConnect(dir);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import api.hbm.energy.IEnergyConductor;
|
||||
import api.hbm.energy.IPowerNet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityProxyConductor extends TileEntityProxyBase implements IEnergyConductor {
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long transferPower(long power) {
|
||||
|
||||
TileEntity te = this.getTE();
|
||||
|
||||
if(te instanceof IEnergyConductor) {
|
||||
return ((IEnergyConductor)te).transferPower(power);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
|
||||
TileEntity te = this.getTE();
|
||||
|
||||
if(te instanceof IEnergyConductor) {
|
||||
return ((IEnergyConductor)te).getPower();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
|
||||
TileEntity te = this.getTE();
|
||||
|
||||
if(te instanceof IEnergyConductor) {
|
||||
return ((IEnergyConductor)te).getMaxPower();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPowerNet getPowerNet() {
|
||||
|
||||
TileEntity te = this.getTE();
|
||||
|
||||
if(te instanceof IEnergyConductor) {
|
||||
return ((IEnergyConductor)te).getPowerNet();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPowerNet(IPowerNet network) {
|
||||
|
||||
TileEntity te = this.getTE();
|
||||
|
||||
if(te instanceof IEnergyConductor) {
|
||||
((IEnergyConductor)te).setPowerNet(network);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -73,9 +73,6 @@ public class TileMappings {
|
||||
put(TileEntityGasDuct.class, "tileentity_gas_duct");
|
||||
put(TileEntityGasDuctSolid.class, "tileentity_gas_duct_solid");
|
||||
put(TileEntityMachineRTG.class, "tileentity_machine_rtg");
|
||||
put(TileEntityConnector.class, "tileentity_connector_redwire");
|
||||
put(TileEntityPylon.class, "tileentity_pylon_redwire");
|
||||
put(TileEntityPylonLarge.class, "tileentity_pylon_large");
|
||||
put(TileEntityStructureMarker.class, "tileentity_structure_marker");
|
||||
put(TileEntityMachineMiningDrill.class, "tileentity_mining_drill");
|
||||
put(TileEntityMachineAssembler.class, "tileentity_assembly_machine");
|
||||
@ -160,10 +157,7 @@ public class TileMappings {
|
||||
put(TileEntitySoyuzStruct.class, "tileentity_soyuz_struct");
|
||||
put(TileEntityITERStruct.class, "tileentity_iter_struct");
|
||||
put(TileEntityMachineMiningLaser.class, "tileentity_mining_laser");
|
||||
put(TileEntityProxyInventory.class, "tileentity_proxy_inventory");
|
||||
put(TileEntityProxyEnergy.class, "tileentity_proxy_power");
|
||||
put(TileEntityNukeBalefire.class, "tileentity_nuke_fstbmb");
|
||||
put(TileEntityProxyCombo.class, "tileentity_proxy_combo");
|
||||
put(TileEntityMicrowave.class, "tileentity_microwave");
|
||||
put(TileEntityMachineMiniRTG.class, "tileentity_mini_rtg");
|
||||
put(TileEntityITER.class, "tileentity_iter");
|
||||
@ -193,10 +187,13 @@ public class TileMappings {
|
||||
|
||||
put(TileEntityLoot.class, "tileentity_ntm_loot");
|
||||
put(TileEntityBobble.class, "tileentity_ntm_bobblehead");
|
||||
|
||||
put(TileEntityCableBaseNT.class, "tileentity_cable", "tileentity_wirecoated");
|
||||
put(TileEntityCableSwitch.class, "tileentity_cable_switch");
|
||||
|
||||
put(TileEntityProxyInventory.class, "tileentity_proxy_inventory");
|
||||
put(TileEntityProxyEnergy.class, "tileentity_proxy_power");
|
||||
put(TileEntityProxyCombo.class, "tileentity_proxy_combo");
|
||||
put(TileEntityProxyConductor.class, "tileentity_proxy_conductor");
|
||||
|
||||
putNetwork();
|
||||
putBombs();
|
||||
putTurrets();
|
||||
putMachines();
|
||||
@ -215,6 +212,7 @@ public class TileMappings {
|
||||
put(TileEntityNukeSolinium.class, "tileentity_nuke_solinium");
|
||||
put(TileEntityNukeN2.class, "tileentity_nuke_n2");
|
||||
put(TileEntityNukeCustom.class, "tileentity_nuke_custom");
|
||||
put(TileEntityCharge.class, "tileentity_explosive_charge");
|
||||
}
|
||||
|
||||
private static void putTurrets() {
|
||||
@ -277,6 +275,16 @@ public class TileMappings {
|
||||
put(TileEntityRBMKOutlet.class, "tileentity_rbmk_outlet");
|
||||
}
|
||||
|
||||
private static void putNetwork() {
|
||||
put(TileEntityCableBaseNT.class, "tileentity_cable", "tileentity_wirecoated");
|
||||
put(TileEntityCableSwitch.class, "tileentity_cable_switch");
|
||||
|
||||
put(TileEntityConnector.class, "tileentity_connector_redwire");
|
||||
put(TileEntityPylon.class, "tileentity_pylon_redwire");
|
||||
put(TileEntityPylonLarge.class, "tileentity_pylon_large");
|
||||
put(TileEntitySubstation.class, "tileentity_substation");
|
||||
}
|
||||
|
||||
private static void put(Class<? extends TileEntity> clazz, String... names) {
|
||||
map.put(clazz, names);
|
||||
}
|
||||
|
||||
65
src/main/java/com/hbm/tileentity/bomb/TileEntityCharge.java
Normal file
65
src/main/java/com/hbm/tileentity/bomb/TileEntityCharge.java
Normal file
@ -0,0 +1,65 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import com.hbm.blocks.bomb.BlockChargeBase;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityCharge extends TileEntity implements INBTPacketReceiver {
|
||||
|
||||
public boolean started;
|
||||
public int timer;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(started) {
|
||||
timer--;
|
||||
|
||||
if(timer % 20 == 0 && timer > 0)
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.fstbmbPing", 1.0F, 1.0F);
|
||||
|
||||
if(timer <= 0) {
|
||||
((BlockChargeBase)this.getBlockType()).explode(worldObj, xCoord, yCoord, zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("timer", timer);
|
||||
data.setBoolean("started", started);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(data, xCoord, yCoord, zCoord), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 100));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
timer = data.getInteger("timer");
|
||||
started = data.getBoolean("started");
|
||||
}
|
||||
|
||||
public String getMinutes() {
|
||||
|
||||
String mins = "" + (timer / 1200);
|
||||
|
||||
if(mins.length() == 1)
|
||||
mins = "0" + mins;
|
||||
|
||||
return mins;
|
||||
}
|
||||
|
||||
public String getSeconds() {
|
||||
|
||||
String mins = "" + ((timer / 20) % 60);
|
||||
|
||||
if(mins.length() == 1)
|
||||
mins = "0" + mins;
|
||||
|
||||
return mins;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.hbm.tileentity.network;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
|
||||
import api.hbm.energy.IEnergyConductor;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class TileEntitySubstation extends TileEntityPylonBase {
|
||||
|
||||
@Override
|
||||
public ConnectionType getConnectionType() {
|
||||
return ConnectionType.QUAD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3[] getMountPos() {
|
||||
|
||||
double topOff = 5.25;
|
||||
Vec3 vec = Vec3.createVectorHelper(1, 0, 0);
|
||||
|
||||
switch(getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 2: vec.rotateAroundY((float) Math.PI * 0.0F); break;
|
||||
case 4: vec.rotateAroundY((float) Math.PI * 0.5F); break;
|
||||
case 3: vec.rotateAroundY((float) Math.PI * 0.0F); break;
|
||||
case 5: vec.rotateAroundY((float) Math.PI * 0.5F); break;
|
||||
}
|
||||
|
||||
return new Vec3[] {
|
||||
Vec3.createVectorHelper(0.5 + vec.xCoord * 0.5, topOff, 0.5 + vec.zCoord * 0.5),
|
||||
Vec3.createVectorHelper(0.5 + vec.xCoord * 1.5, topOff, 0.5 + vec.zCoord * 1.5),
|
||||
Vec3.createVectorHelper(0.5 - vec.xCoord * 0.5, topOff, 0.5 - vec.zCoord * 0.5),
|
||||
Vec3.createVectorHelper(0.5 - vec.xCoord * 1.5, topOff, 0.5 - vec.zCoord * 1.5),
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getConnectionPoint() {
|
||||
return Vec3.createVectorHelper(xCoord + 0.5, yCoord + 5.25, zCoord + 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxWireLength() {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void connect() {
|
||||
|
||||
manageNets(worldObj.getTileEntity(xCoord + 2, yCoord, zCoord - 1));
|
||||
manageNets(worldObj.getTileEntity(xCoord + 2, yCoord, zCoord + 1));
|
||||
manageNets(worldObj.getTileEntity(xCoord - 2, yCoord, zCoord - 1));
|
||||
manageNets(worldObj.getTileEntity(xCoord - 2, yCoord, zCoord + 1));
|
||||
manageNets(worldObj.getTileEntity(xCoord - 1, yCoord, zCoord + 2));
|
||||
manageNets(worldObj.getTileEntity(xCoord + 1, yCoord, zCoord + 2));
|
||||
manageNets(worldObj.getTileEntity(xCoord - 1, yCoord, zCoord - 2));
|
||||
manageNets(worldObj.getTileEntity(xCoord + 1, yCoord, zCoord - 2));
|
||||
|
||||
super.connect();
|
||||
}
|
||||
|
||||
private void manageNets(TileEntity te) {
|
||||
|
||||
if(te instanceof IEnergyConductor) {
|
||||
|
||||
IEnergyConductor conductor = (IEnergyConductor) te;
|
||||
|
||||
if(this.getPowerNet() == null && conductor.getPowerNet() != null) {
|
||||
conductor.getPowerNet().joinLink(this);
|
||||
}
|
||||
|
||||
if(this.getPowerNet() != null && conductor.getPowerNet() != null && this.getPowerNet() != conductor.getPowerNet()) {
|
||||
conductor.getPowerNet().joinNetworks(this.getPowerNet());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2916,6 +2916,7 @@ tile.brick_obsidian.name=Obsidianziegel
|
||||
tile.broadcaster_pc.name=Korrupter Sender
|
||||
tile.burning_earth.name=Brennendes Gras
|
||||
tile.cable_switch.name=Stromschalter
|
||||
tile.charge_dynamite.name=Zeitbombe
|
||||
tile.cheater_virus.name=Geliertes Euphemium
|
||||
tile.cheater_virus_seed.name=Instabiler Euphemiumschrabid-Block
|
||||
tile.chlorine_gas.name=Chlorgas
|
||||
@ -3384,6 +3385,7 @@ tile.red_barrel.name=Explosives Fass
|
||||
tile.red_cable.name=Rotes Kupferkabel
|
||||
tile.red_connector.name=Stromverbindungsstück
|
||||
tile.red_pylon.name=Strommasten
|
||||
tile.red_pylon_large.name=Hochspannungsmasten
|
||||
tile.red_wire_coated.name=Geschirmtes rotes Kupferkabel
|
||||
tile.reinforced_brick.name=Verstärkter Stein
|
||||
tile.reinforced_ducrete.name=Verstärkter Ducrete
|
||||
@ -3446,6 +3448,7 @@ tile.struct_launcher_core_large.name=Startrampe-Kernkomponente
|
||||
tile.struct_plasma_core.name=Plasmaerhitzer-Kernkomponente
|
||||
tile.struct_scaffold.name=Startrampe-Gerüstblock
|
||||
tile.struct_soyuz_core.name=Soyuz-Startrampe-Kernkomponente
|
||||
tile.substation.name=Umspannwerk
|
||||
tile.taint.name=Korrupter Schmutz
|
||||
tile.taint_barrel.name=IMP-Rückstandsfass
|
||||
tile.tape_recorder.name=Tonbandgerät
|
||||
|
||||
@ -3111,6 +3111,7 @@ tile.brick_obsidian.name=Obsidian Bricks
|
||||
tile.broadcaster_pc.name=Corrupted Broadcaster
|
||||
tile.burning_earth.name=Burning Grass
|
||||
tile.cable_switch.name=Power Switch
|
||||
tile.charge_dynamite.name=Time Bomb
|
||||
tile.cheater_virus.name=Gelid Euphemium
|
||||
tile.cheater_virus_seed.name=Unstable Euphemium Schrabide Block
|
||||
tile.chlorine_gas.name=Chlorine Gas
|
||||
@ -3392,6 +3393,7 @@ tile.machine_pumpjack.name=Pumpjack
|
||||
tile.machine_radar.name=Radar
|
||||
tile.machine_radgen.name=Radiation-Powered Engine
|
||||
tile.machine_reactor.name=Breeding Reactor
|
||||
tile.machine_reactor_small.name=Research Reactor
|
||||
tile.machine_refinery.name=Oil Refinery
|
||||
tile.machine_reix_mainframe.name=Rei-X Mainframe (WIP)
|
||||
tile.machine_rtg_blue.name=Convection Generator
|
||||
@ -3428,6 +3430,7 @@ tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranium Hexafluoride Tank
|
||||
tile.machine_waste_drum.name=Spent Fuel Pool Drum
|
||||
tile.machine_well.name=Oil Derrick
|
||||
tile.machine_zirnox.name=ZIRNOX Nuclear Reactor
|
||||
tile.marker_structure.name=Multiblock Structure Marker
|
||||
tile.meteor_battery.name=Starmetal Static Electricity Generator
|
||||
tile.meteor_brick.name=Meteor Bricks
|
||||
@ -3572,12 +3575,11 @@ tile.reactor_ejector.name=Reactor Waste Ejector
|
||||
tile.reactor_element.name=Reactor Chamber
|
||||
tile.reactor_hatch.name=Reactor Access Hatch
|
||||
tile.reactor_inserter.name=Reactor Fuel Inserter
|
||||
tile.machine_reactor_small.name=Research Reactor
|
||||
tile.machine_zirnox.name=ZIRNOX Nuclear Reactor
|
||||
tile.red_barrel.name=Explosive Barrel
|
||||
tile.red_cable.name=Red Copper Cable
|
||||
tile.red_connector.name=Electricity Connector
|
||||
tile.red_pylon.name=Electricity Pole
|
||||
tile.red_pylon_large.name=Large Electricity Pylon
|
||||
tile.red_wire_coated.name=Coated Red Copper Cable
|
||||
tile.reinforced_brick.name=Reinforced Stone
|
||||
tile.reinforced_ducrete.name=Reinforced Ducrete
|
||||
@ -3640,6 +3642,7 @@ tile.struct_launcher_core_large.name=Launch Table Core Component
|
||||
tile.struct_plasma_core.name=Plasma Heater Core Component
|
||||
tile.struct_scaffold.name=Launch Pad Scaffold Block
|
||||
tile.struct_soyuz_core.name=Soyuz Launcher Core Component
|
||||
tile.substation.name=Substation
|
||||
tile.taint.name=Taint
|
||||
tile.taint_barrel.name=IMP Residue Barrel
|
||||
tile.tape_recorder.name=Tape Recorder
|
||||
|
||||
3995
src/main/resources/assets/hbm/models/network/substation.obj
Normal file
3995
src/main/resources/assets/hbm/models/network/substation.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
src/main/resources/assets/hbm/textures/blocks/substation.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/substation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 274 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 8.6 KiB |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4095",
|
||||
"version":"1.0.27_X4109",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user