dwaggy
@ -22,6 +22,11 @@
|
||||
* Most ammo types now have QMAW pages, including information on whether or not they are a war crime
|
||||
* Both assembly and chemical factories now have four special ports that only allow items inserted to go into one recipe group
|
||||
* All models using the HFR wavefront loader can now be hot-swapped via resource reload (F3 + T)
|
||||
* Updated most door models
|
||||
* Door skins are no longer a dedicated item, the skin can be changed using a screwdriver
|
||||
* Available skins are cycled through in the item preview
|
||||
* Fire doors and secure access doors no longer use clipping planes (i.e. making the doors not render outside of their frames)
|
||||
* Vault doors have been ported to the current door system, the blocks should convert automatically
|
||||
|
||||
# Fixed
|
||||
* Potentially fixed yet another issue regarding crates
|
||||
@ -38,3 +43,7 @@
|
||||
* Fixed some turrets not using the more modern casing spawner system which allows casings to have a smoke trail
|
||||
* Fixed incorrect tooltip on the upgrade stat screen for assembly factories
|
||||
* Fixed crash caused by RBMK overpressure meltdown mechanic
|
||||
* Fixed a crash causing by the charging station in combination with the new battery packs
|
||||
* Fixed a broken and originally unintended feature where the flamethrower turret would be loadable using regular item tanks
|
||||
* Most ammo slots now work for loading, the empty canisters are returned via the fluid ID slot
|
||||
* Fixed a dupe regarding conveyors
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5572
|
||||
mod_build_number=5593
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
|
||||
@ -109,7 +109,7 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
|
||||
// cannot be done accidentally, and is definitely preferable to multiblocks
|
||||
// just vanishing when their chunks are unloaded in an unlucky way.
|
||||
if(b != this && world.checkChunksExist(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1)) {
|
||||
if (isLegacyMonoblock(world, x, y, z)) {
|
||||
if(isLegacyMonoblock(world, x, y, z)) {
|
||||
fixLegacyMonoblock(world, x, y, z);
|
||||
} else {
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
@ -1209,7 +1209,6 @@ public class ModBlocks {
|
||||
public static Block volcano_core;
|
||||
public static Block volcano_rad_core;
|
||||
|
||||
public static Block dummy_block_vault;
|
||||
public static Block dummy_block_blast;
|
||||
public static Block dummy_plate_compact_launcher;
|
||||
public static Block dummy_port_compact_launcher;
|
||||
@ -2061,7 +2060,7 @@ public class ModBlocks {
|
||||
seal_controller = new BlockSeal(Material.iron).setBlockName("seal_controller").setHardness(10.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
seal_hatch = new BlockHatch(Material.iron).setBlockName("seal_hatch").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":seal_hatch_3");
|
||||
|
||||
vault_door = new VaultDoor(Material.iron).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
vault_door = new BlockDoorGeneric(Material.iron, DoorDecl.VAULT_DOOR).setBlockName("vault_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door");
|
||||
blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(1_000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door");
|
||||
|
||||
sliding_blast_door = new BlockDoorGeneric(Material.iron, DoorDecl.SLIDE_DOOR).setBlockName("sliding_blast_door").setHardness(10.0F).setResistance(750.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":sliding_blast_door");
|
||||
@ -2364,7 +2363,6 @@ public class ModBlocks {
|
||||
Fluid liquidConcrete = new GenericFluid("concrete_liquid").setViscosity(2000);
|
||||
concrete_liquid = new GenericFiniteFluid(liquidConcrete, Material.rock, "concrete_liquid", "concrete_liquid_flowing").setQuantaPerBlock(4).setBlockName("concrete_liquid").setResistance(500F);
|
||||
|
||||
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_plate_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, false).setBounds(0, 16, 0, 16, 16, 16).setBlockName("dummy_plate_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, true).setBlockName("dummy_port_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3490,7 +3488,6 @@ public class ModBlocks {
|
||||
//GameRegistry.registerBlock(concrete_liquid, concrete_liquid.getUnlocalizedName());
|
||||
|
||||
//Multiblock Dummy Blocks
|
||||
GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_plate_compact_launcher, dummy_plate_compact_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_compact_launcher, dummy_port_compact_launcher.getUnlocalizedName());
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
@ -34,8 +35,7 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta){
|
||||
if(meta >= 12)
|
||||
return new TileEntityDoorGeneric();
|
||||
if(meta >= 12) return new TileEntityDoorGeneric();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -168,7 +168,6 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return getBoundingBox(world, x, y, z, false);
|
||||
//return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
|
||||
public AxisAlignedBB getBoundingBox(World world, int x, int y, int z, boolean forCollision) {
|
||||
@ -192,4 +191,24 @@ public class BlockDoorGeneric extends BlockDummyable implements IBomb, IToolable
|
||||
}
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), x, y, z, dir)) return false;
|
||||
|
||||
if(type.getExtraDimensions() != null) for(int[] dims : type.getExtraDimensions()) {
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, dims, x, y, z, dir)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), this, dir);
|
||||
|
||||
if(type.getExtraDimensions() != null) for(int[] dims : type.getExtraDimensions()) {
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, dims, this, dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockAssembler extends DummyOldBase {
|
||||
|
||||
public DummyBlockAssembler(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_assembler);
|
||||
}
|
||||
|
||||
@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 if(!player.isSneaking())
|
||||
{
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
TileEntityMachineAssembler entity = (TileEntityMachineAssembler) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,53 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockRefinery extends DummyOldBase {
|
||||
|
||||
public DummyBlockRefinery(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_refinery);
|
||||
}
|
||||
|
||||
@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 if(!player.isSneaking())
|
||||
{
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
TileEntityMachineRefinery entity = (TileEntityMachineRefinery) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,53 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockTurbofan extends DummyOldBase {
|
||||
|
||||
public DummyBlockTurbofan(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_turbofan);
|
||||
}
|
||||
|
||||
@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 if(!player.isSneaking())
|
||||
{
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
TileEntityMachineTurbofan entity = (TileEntityMachineTurbofan) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,141 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.IDummy;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemLock;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockVault extends BlockContainer implements IDummy, IBomb {
|
||||
|
||||
public static boolean safeBreak = false;
|
||||
|
||||
public DummyBlockVault(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityDummy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
||||
if(!safeBreak) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy) te).targetX;
|
||||
int b = ((TileEntityDummy) te).targetY;
|
||||
int c = ((TileEntityDummy) te).targetZ;
|
||||
|
||||
if(!world.isRemote)
|
||||
world.func_147480_a(a, b, c, true);
|
||||
}
|
||||
}
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return Item.getItemFromBlock(ModBlocks.vault_door);
|
||||
}
|
||||
|
||||
@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 if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit)) {
|
||||
return false;
|
||||
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntity til = world.getTileEntity(x, y, z);
|
||||
if(til != null && til instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy) til).targetX;
|
||||
int b = ((TileEntityDummy) til).targetY;
|
||||
int c = ((TileEntityDummy) til).targetZ;
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(a, b, c);
|
||||
if(entity != null) {
|
||||
if(entity.canAccess(player))
|
||||
entity.tryToggle();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy) te).targetX;
|
||||
int b = ((TileEntityDummy) te).targetY;
|
||||
int c = ((TileEntityDummy) te).targetZ;
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(a, b, c);
|
||||
if(entity != null) {
|
||||
entity.type++;
|
||||
if(entity.type >= entity.maxTypes)
|
||||
entity.type = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy) te).targetX;
|
||||
int b = ((TileEntityDummy) te).targetY;
|
||||
int c = ((TileEntityDummy) te).targetZ;
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(a, b, c);
|
||||
if(entity != null && !entity.isLocked()) {
|
||||
entity.tryToggle();
|
||||
return BombReturnCode.TRIGGERED;
|
||||
}
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
return BombReturnCode.UNDEFINED;
|
||||
}
|
||||
}
|
||||
@ -1,156 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemLock;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class VaultDoor extends BlockContainer implements IBomb, IMultiblock {
|
||||
|
||||
public VaultDoor(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityVaultDoor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntityVaultDoor te = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
|
||||
if(!te.isLocked()) {
|
||||
te.tryToggle();
|
||||
return BombReturnCode.TRIGGERED;
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
return BombReturnCode.UNDEFINED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
|
||||
TileEntityVaultDoor te = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x + 1, y, z) && te.placeDummy(x + 2, y, z) && te.placeDummy(x + 2, y + 1, z) && te.placeDummy(x + 2, y + 2, z) && te.placeDummy(x + 2, y + 3, z) && te.placeDummy(x + 2, y + 4, z) && te.placeDummy(x + 1, y + 4, z) && te.placeDummy(x, y + 4, z) && te.placeDummy(x - 1, y + 4, z) && te.placeDummy(x - 2, y + 4, z) && te.placeDummy(x - 2, y + 3, z) && te.placeDummy(x - 2, y + 2, z) && te.placeDummy(x - 2, y + 1, z) && te.placeDummy(x - 2, y, z) && te.placeDummy(x - 1, y, z) &&
|
||||
// cog
|
||||
te.placeDummy(x - 1, y + 1, z) && te.placeDummy(x - 1, y + 2, z) && te.placeDummy(x - 1, y + 3, z) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x + 1, y + 1, z) && te.placeDummy(x + 1, y + 2, z) && te.placeDummy(x + 1, y + 3, z) &&
|
||||
// teeth
|
||||
te.placeDummy(x + 2, y, z + 1) && te.placeDummy(x + 1, y, z + 1) && te.placeDummy(x, y, z + 1) && te.placeDummy(x - 1, y, z + 1) && te.placeDummy(x - 2, y, z + 1))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x, y, z + 1) && te.placeDummy(x, y, z + 2) && te.placeDummy(x, y + 1, z + 2) && te.placeDummy(x, y + 2, z + 2) && te.placeDummy(x, y + 3, z + 2) && te.placeDummy(x, y + 4, z + 2) && te.placeDummy(x, y + 4, z + 1) && te.placeDummy(x, y + 4, z) && te.placeDummy(x, y + 4, z - 1) && te.placeDummy(x, y + 4, z - 2) && te.placeDummy(x, y + 3, z - 2) && te.placeDummy(x, y + 2, z - 2) && te.placeDummy(x, y + 1, z - 2) && te.placeDummy(x, y, z - 2) && te.placeDummy(x, y, z - 1) &&
|
||||
// cog
|
||||
te.placeDummy(x, y + 1, z - 1) && te.placeDummy(x, y + 2, z - 1) && te.placeDummy(x, y + 3, z - 1) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x, y + 1, z + 1) && te.placeDummy(x, y + 2, z + 1) && te.placeDummy(x, y + 3, z + 1) &&
|
||||
// teeth
|
||||
te.placeDummy(x - 1, y, z + 2) && te.placeDummy(x - 1, y, z + 1) && te.placeDummy(x - 1, y, z) && te.placeDummy(x - 1, y, z - 1) && te.placeDummy(x - 1, y, z - 2))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x + 1, y, z) && te.placeDummy(x + 2, y, z) && te.placeDummy(x + 2, y + 1, z) && te.placeDummy(x + 2, y + 2, z) && te.placeDummy(x + 2, y + 3, z) && te.placeDummy(x + 2, y + 4, z) && te.placeDummy(x + 1, y + 4, z) && te.placeDummy(x, y + 4, z) && te.placeDummy(x - 1, y + 4, z) && te.placeDummy(x - 2, y + 4, z) && te.placeDummy(x - 2, y + 3, z) && te.placeDummy(x - 2, y + 2, z) && te.placeDummy(x - 2, y + 1, z) && te.placeDummy(x - 2, y, z) && te.placeDummy(x - 1, y, z) &&
|
||||
// cog
|
||||
te.placeDummy(x - 1, y + 1, z) && te.placeDummy(x - 1, y + 2, z) && te.placeDummy(x - 1, y + 3, z) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x + 1, y + 1, z) && te.placeDummy(x + 1, y + 2, z) && te.placeDummy(x + 1, y + 3, z) &&
|
||||
// teeth
|
||||
te.placeDummy(x + 2, y, z - 1) && te.placeDummy(x + 1, y, z - 1) && te.placeDummy(x, y, z - 1) && te.placeDummy(x - 1, y, z - 1) && te.placeDummy(x - 2, y, z - 1))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
|
||||
// frame
|
||||
if(!(te.placeDummy(x, y, z + 1) && te.placeDummy(x, y, z + 2) && te.placeDummy(x, y + 1, z + 2) && te.placeDummy(x, y + 2, z + 2) && te.placeDummy(x, y + 3, z + 2) && te.placeDummy(x, y + 4, z + 2) && te.placeDummy(x, y + 4, z + 1) && te.placeDummy(x, y + 4, z) && te.placeDummy(x, y + 4, z - 1) && te.placeDummy(x, y + 4, z - 2) && te.placeDummy(x, y + 3, z - 2) && te.placeDummy(x, y + 2, z - 2) && te.placeDummy(x, y + 1, z - 2) && te.placeDummy(x, y, z - 2) && te.placeDummy(x, y, z - 1) &&
|
||||
// cog
|
||||
te.placeDummy(x, y + 1, z - 1) && te.placeDummy(x, y + 2, z - 1) && te.placeDummy(x, y + 3, z - 1) && te.placeDummy(x, y + 1, z) && te.placeDummy(x, y + 2, z) && te.placeDummy(x, y + 3, z) && te.placeDummy(x, y + 1, z + 1) && te.placeDummy(x, y + 2, z + 1) && te.placeDummy(x, y + 3, z + 1) &&
|
||||
// teeth
|
||||
te.placeDummy(x + 1, y, z + 2) && te.placeDummy(x + 1, y, z + 1) && te.placeDummy(x + 1, y, z) && te.placeDummy(x + 1, y, z - 1) && te.placeDummy(x + 1, y, z - 2))) {
|
||||
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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 if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit)) {
|
||||
return false;
|
||||
|
||||
}
|
||||
if(!player.isSneaking()) {
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
if(entity.isLocked()) {
|
||||
if(entity.canAccess(player))
|
||||
entity.tryToggle();
|
||||
} else {
|
||||
entity.tryToggle();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
||||
TileEntityVaultDoor entity = (TileEntityVaultDoor) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
entity.type++;
|
||||
if(entity.type >= entity.maxTypes)
|
||||
entity.type = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -37,6 +37,7 @@ public class ClientConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Integer> RENDER_REBAR_LIMIT = new ConfigWrapper(250);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_X = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Boolean> SHOW_BLOCK_META_OVERLAY = new ConfigWrapper(false);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
|
||||
@ -63,6 +64,7 @@ public class ClientConfig extends RunningConfig {
|
||||
configMap.put("RENDER_REBAR_LIMIT", RENDER_REBAR_LIMIT);
|
||||
configMap.put("TOOL_HUD_INDICATOR_X", TOOL_HUD_INDICATOR_X);
|
||||
configMap.put("TOOL_HUD_INDICATOR_Y", TOOL_HUD_INDICATOR_Y);
|
||||
configMap.put("SHOW_BLOCK_META_OVERLAY", SHOW_BLOCK_META_OVERLAY);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (5572)";
|
||||
public static final String VERSION = "1.0.27 BETA (5593)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -443,7 +443,6 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzPump.class, new RenderWatzPump());
|
||||
//doors
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDoorGeneric.class, new RenderDoorGeneric());
|
||||
//storage
|
||||
|
||||
@ -1478,6 +1478,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.sat_foeq");
|
||||
ignoreMappings.add("hbm:tile.sat_resonator");
|
||||
ignoreMappings.add("hbm:item.sliding_blast_door_skin");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_vault");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -223,6 +223,15 @@ public class ModEventHandlerClient {
|
||||
/*List<String> text = new ArrayList();
|
||||
text.add("Meta: " + world.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ));
|
||||
ILookOverlay.printGeneric(event, "DEBUG", 0xffff00, 0x4040000, text);*/
|
||||
|
||||
if(ClientConfig.SHOW_BLOCK_META_OVERLAY.get()) {
|
||||
Block b = world.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
int i = world.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ);
|
||||
List<String> text = new ArrayList();
|
||||
text.add(b.getUnlocalizedName());
|
||||
text.add("Meta: " + i);
|
||||
ILookOverlay.printGeneric(event, "DEBUG", 0xffff00, 0x4040000, text);
|
||||
}
|
||||
|
||||
} else if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
Entity entity = mop.entityHit;
|
||||
|
||||
@ -69,7 +69,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModItems.burnt_bark));
|
||||
API.hideItem(new ItemStack(ModItems.ams_core_thingy));
|
||||
}
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_vault));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_blast));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_compact_launcher));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_launch_table));
|
||||
|
||||
@ -334,7 +334,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation pheo_fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door.png");
|
||||
public static final ResourceLocation pheo_fire_door_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_black.png");
|
||||
public static final ResourceLocation pheo_fire_door_orange_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_orange.png");
|
||||
public static IModelCustomNamed pheo_fire_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/fire_door.obj")).asVBO();
|
||||
public static IModelCustomNamed pheo_fire_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/vault_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_airlock_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door.png");
|
||||
public static final ResourceLocation pheo_airlock_door_clean_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door_clean.png");
|
||||
public static final ResourceLocation pheo_airlock_door_green_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door_green.png");
|
||||
@ -354,6 +354,17 @@ public class ResourceManager {
|
||||
public static IModelCustomNamed pheo_vehicle_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/vehicle_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_water_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/water_door.png");
|
||||
public static IModelCustomNamed pheo_water_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/water_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_vault_door_3 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_3.png");
|
||||
public static final ResourceLocation pheo_vault_door_4 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_4.png");
|
||||
public static final ResourceLocation pheo_vault_door_s = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_s.png");
|
||||
public static final ResourceLocation pheo_label_2 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_2.png");
|
||||
public static final ResourceLocation pheo_label_81 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_81.png");
|
||||
public static final ResourceLocation pheo_label_87 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_87.png");
|
||||
public static final ResourceLocation pheo_label_99 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_99.png");
|
||||
public static final ResourceLocation pheo_label_101 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_101.png");
|
||||
public static final ResourceLocation pheo_label_106 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_106.png");
|
||||
public static final ResourceLocation pheo_label_111 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/label_111.png");
|
||||
public static IModelCustomNamed pheo_vault_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/vault_door.obj")).asVBO();
|
||||
|
||||
//Doors
|
||||
public static final ResourceLocation silo_hatch_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/silo_hatch.png");
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.hbm.packet.toclient;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityBlastDoor;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@ -22,9 +21,7 @@ public class TEVaultPacket implements IMessage {
|
||||
long sysTime;
|
||||
int type;
|
||||
|
||||
public TEVaultPacket() {
|
||||
|
||||
}
|
||||
public TEVaultPacket() { }
|
||||
|
||||
public TEVaultPacket(int x, int y, int z, boolean isOpening, int state, long sysTime, int type) {
|
||||
this.x = x;
|
||||
@ -66,23 +63,11 @@ public class TEVaultPacket implements IMessage {
|
||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||
|
||||
try {
|
||||
if (te != null && te instanceof TileEntityVaultDoor) {
|
||||
|
||||
TileEntityVaultDoor vault = (TileEntityVaultDoor) te;
|
||||
vault.isOpening = m.isOpening;
|
||||
vault.state = m.state;
|
||||
if(m.sysTime == 1)
|
||||
vault.sysTime = System.currentTimeMillis();
|
||||
vault.type = m.type;
|
||||
}
|
||||
|
||||
if (te != null && te instanceof TileEntityBlastDoor) {
|
||||
|
||||
TileEntityBlastDoor vault = (TileEntityBlastDoor) te;
|
||||
vault.isOpening = m.isOpening;
|
||||
vault.state = m.state;
|
||||
if(m.sysTime == 1)
|
||||
vault.sysTime = System.currentTimeMillis();
|
||||
if(m.sysTime == 1) vault.sysTime = System.currentTimeMillis();
|
||||
}
|
||||
} catch (Exception x) {
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.util.Clock;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
@ -23,12 +24,29 @@ public class ItemRenderLibraryDoors {
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.vault_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.vault_cog_tex); ResourceManager.vault_cog.renderAll();
|
||||
bindTexture(ResourceManager.vault_label_101_tex); ResourceManager.vault_label.renderAll();
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
int index = (int) ((Clock.get_ms() % (DoorDecl.VAULT_DOOR.getSkinCount() * 1000)) / 1000);
|
||||
|
||||
ResourceLocation doorTex = ResourceManager.pheo_vault_door_3;
|
||||
ResourceLocation labelTex = ResourceManager.pheo_label_101;
|
||||
|
||||
switch(index) {
|
||||
case 1: labelTex = ResourceManager.pheo_label_87; break;
|
||||
case 2: labelTex = ResourceManager.pheo_label_106; break;
|
||||
case 3: doorTex = ResourceManager.pheo_vault_door_4; labelTex = ResourceManager.pheo_label_81; break;
|
||||
case 4: doorTex = ResourceManager.pheo_vault_door_4; labelTex = ResourceManager.pheo_label_111; break;
|
||||
case 5: doorTex = ResourceManager.pheo_vault_door_s; labelTex = ResourceManager.pheo_label_2; break;
|
||||
case 6: doorTex = ResourceManager.pheo_vault_door_s; labelTex = ResourceManager.pheo_label_99; break;
|
||||
}
|
||||
|
||||
bindTexture(doorTex);
|
||||
ResourceManager.pheo_fire_door.renderPart("Door");
|
||||
bindTexture(labelTex);
|
||||
ResourceManager.pheo_fire_door.renderPart("Label");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -141,11 +141,9 @@ public class ItemRenderDebug extends ItemRenderWeaponBase {
|
||||
if(type == ItemRenderType.EQUIPPED) {
|
||||
EntityLivingBase ent = (EntityLivingBase) data[1];
|
||||
long shot;
|
||||
double shotRand = 0;
|
||||
if(ent == Minecraft.getMinecraft().thePlayer) {
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
shot = gun.lastShot[0];
|
||||
shotRand = gun.shotRand;
|
||||
} else {
|
||||
shot = ItemRenderWeaponBase.flashMap.getOrDefault(ent, (long) -1);
|
||||
if(shot < 0) return;
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityVaultDoor;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -13,10 +8,10 @@ public class RenderVaultDoor extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
renderDoor((TileEntityVaultDoor)tileEntity, x, y, z, f);
|
||||
//renderDoor((TileEntityVaultDoor)tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderDoor(TileEntityVaultDoor tileEntity, double x, double y, double z, float f)
|
||||
/*public void renderDoor(TileEntityVaultDoor tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
@ -120,5 +115,5 @@ public class RenderVaultDoor extends TileEntitySpecialRenderer {
|
||||
double roll = z / circumference * 360;
|
||||
|
||||
return new double[] { x + 0.0005D, z, roll };
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.hbm.render.tileentity.door;
|
||||
|
||||
import java.nio.DoubleBuffer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderVaultDoor implements IRenderDoors {
|
||||
|
||||
public static final RenderVaultDoor INSTANCE = new RenderVaultDoor();
|
||||
|
||||
@Override
|
||||
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
|
||||
|
||||
ResourceLocation doorTex = ResourceManager.pheo_vault_door_3;
|
||||
ResourceLocation labelTex = ResourceManager.pheo_label_101;
|
||||
|
||||
switch(door.getSkinIndex()) {
|
||||
case 1: labelTex = ResourceManager.pheo_label_87; break;
|
||||
case 2: labelTex = ResourceManager.pheo_label_106; break;
|
||||
case 3: doorTex = ResourceManager.pheo_vault_door_4; labelTex = ResourceManager.pheo_label_81; break;
|
||||
case 4: doorTex = ResourceManager.pheo_vault_door_4; labelTex = ResourceManager.pheo_label_111; break;
|
||||
case 5: doorTex = ResourceManager.pheo_vault_door_s; labelTex = ResourceManager.pheo_label_2; break;
|
||||
case 6: doorTex = ResourceManager.pheo_vault_door_s; labelTex = ResourceManager.pheo_label_99; break;
|
||||
}
|
||||
|
||||
double pull = 0;
|
||||
double slide = 0;
|
||||
|
||||
if(door.state == door.STATE_OPEN) {
|
||||
pull = 1;
|
||||
slide = 1;
|
||||
}
|
||||
|
||||
if(door.currentAnimation != null) {
|
||||
pull = IRenderDoors.getRelevantTransformation("PULL", door.currentAnimation)[2];
|
||||
slide = IRenderDoors.getRelevantTransformation("SLIDE", door.currentAnimation)[0];
|
||||
}
|
||||
|
||||
double diameter = 4.25D;
|
||||
double circumference = diameter * Math.PI;
|
||||
slide *= 5D;
|
||||
double roll = 360D * slide / circumference;
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(doorTex);
|
||||
ResourceManager.pheo_fire_door.renderPart("Frame");
|
||||
GL11.glTranslated(-pull, 0, 0);
|
||||
GL11.glTranslated(0, 0, slide);
|
||||
GL11.glTranslated(0, 2.5, 0);
|
||||
GL11.glRotated(roll, 1, 0, 0);
|
||||
GL11.glTranslated(0, -2.5, 0);
|
||||
ResourceManager.pheo_fire_door.renderPart("Door");
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(labelTex);
|
||||
ResourceManager.pheo_fire_door.renderPart("Label");
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class DoorDecl {
|
||||
@ -102,6 +104,55 @@ public abstract class DoorDecl {
|
||||
}
|
||||
};
|
||||
|
||||
public static final DoorDecl VAULT_DOOR = new DoorDecl() {
|
||||
|
||||
@Override
|
||||
public IRenderDoors getSEDNARenderer() {
|
||||
return RenderVaultDoor.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
|
||||
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation()
|
||||
.addBus("PULL", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 0, 1, 2_000, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 2000).addPos(1, 0, 0, 4_000));
|
||||
if(state == TileEntityDoorGeneric.STATE_CLOSING) return new BusAnimation()
|
||||
.addBus("PULL", new BusAnimationSequence().setPos(0, 0, 1).addPos(0, 0, 1, 4_000).addPos(0, 0, 0, 2_000, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().setPos(1, 0, 0).addPos(0, 0, 0, 4_000));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public int getSkinCount() { return 7; }
|
||||
|
||||
@Override public int timeToOpen() { return 120; }
|
||||
@Override public int[][] getDoorOpenRanges() { return new int[][] { {-1, 1, 0, 3, 3, 2} }; }
|
||||
@Override public int[] getDimensions() { return new int[] { 4, 0, 0, 0, 2, 2 }; }
|
||||
|
||||
@Override public int[][] getExtraDimensions() { return new int[][] { {0, 0, 1, -1, 2, 2} }; };
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open || y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||
else return super.getBlockBound(x, y, z, open, forCollision);
|
||||
}
|
||||
|
||||
public Consumer<TileEntityDoorGeneric> onUpdate = (door) -> {
|
||||
if(door.getWorldObj().isRemote) return;
|
||||
|
||||
if(door.state == door.STATE_OPENING) {
|
||||
if(door.openTicks == 0) door.getWorldObj().playSoundEffect(door.xCoord, door.yCoord, door.zCoord, "hbm:block.vaultScrapeNew", 1.0F, 1.0F);
|
||||
for(int i = 45; i <= 115; i += 10)
|
||||
if(door.openTicks == i) door.getWorldObj().playSoundEffect(door.xCoord, door.yCoord, door.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
} else if(door.state == door.STATE_CLOSING) {
|
||||
if(door.openTicks == 30) door.getWorldObj().playSoundEffect(door.xCoord, door.yCoord, door.zCoord, "hbm:block.vaultScrapeNew", 1.0F, 1.0F);
|
||||
for(int i = 45; i <= 115; i += 10)
|
||||
if(door.openTicks == i) door.getWorldObj().playSoundEffect(door.xCoord, door.yCoord, door.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
}
|
||||
};
|
||||
|
||||
@Override public Consumer<TileEntityDoorGeneric> onDoorUpdate() { return onUpdate; }
|
||||
};
|
||||
|
||||
public static final DoorDecl FIRE_DOOR = new DoorDecl() {
|
||||
|
||||
@Override public String getOpenSoundEnd() { return "hbm:door.wghStop"; }
|
||||
@ -546,11 +597,13 @@ public abstract class DoorDecl {
|
||||
|
||||
};
|
||||
|
||||
// TODO: bash drillgon to death for making this method like that, and for fucking up the documentation, like genuinely what the fuck is this
|
||||
/** Format: x, y, z, tangent amount 1 (how long the door would be if it moved
|
||||
up), tangent amount 2 (door places blocks in this direction), axis (0-x,
|
||||
1-y, 2-z) */
|
||||
public abstract int[][] getDoorOpenRanges();
|
||||
public abstract int[] getDimensions();
|
||||
public int[][] getExtraDimensions() { return null; };
|
||||
|
||||
public int getBlockOffset() { return 0; }
|
||||
public boolean remoteControllable() { return false; }
|
||||
@ -643,4 +696,6 @@ public abstract class DoorDecl {
|
||||
if(anim != null) return new com.hbm.render.anim.HbmAnimations.Animation("DOOR_ANIM", System.currentTimeMillis(), anim);
|
||||
return null;
|
||||
}
|
||||
|
||||
public Consumer<TileEntityDoorGeneric> onDoorUpdate() { return null; }
|
||||
}
|
||||
|
||||
@ -47,6 +47,11 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(getDoorType().onDoorUpdate() != null) {
|
||||
getDoorType().onDoorUpdate().accept(this);
|
||||
}
|
||||
|
||||
if(state == STATE_OPENING) {
|
||||
openTicks++;
|
||||
if(openTicks >= getDoorType().timeToOpen()) openTicks = getDoorType().timeToOpen();
|
||||
|
||||
@ -130,7 +130,7 @@ public class TileMappings {
|
||||
put(TileEntityBroadcaster.class, "tileentity_pink_cloud_broadcaster");
|
||||
put(TileEntityMachineSatLinker.class, "tileentity_satlinker");
|
||||
put(TileEntityReactorResearch.class, "tileentity_small_reactor");
|
||||
put(TileEntityVaultDoor.class, "tileentity_vault_door");
|
||||
put(TileEntityVaultDoorMigration.class, "tileentity_vault_door");
|
||||
put(TileEntityRadiobox.class, "tileentity_radio_broadcaster");
|
||||
put(TileEntityRadioRec.class, "tileentity_radio_receiver");
|
||||
put(TileEntityVent.class, "tileentity_vent");
|
||||
|
||||
@ -1,348 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.DummyBlockVault;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.TEVaultPacket;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityVaultDoor extends TileEntityLockableBase {
|
||||
|
||||
public boolean isOpening = false;
|
||||
//0: closed, 1: opening/closing, 2:open
|
||||
public int state = 0;
|
||||
public long sysTime;
|
||||
private int timer = 0;
|
||||
public int type;
|
||||
public static final int maxTypes = 7;
|
||||
public boolean redstoned = false;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(!isLocked()) {
|
||||
boolean flagX = false;
|
||||
boolean flagZ = false;
|
||||
|
||||
for(int x = xCoord - 2; x <= xCoord + 2; x++)
|
||||
for(int y = yCoord; y <= yCoord + 5; y++)
|
||||
if(worldObj.isBlockIndirectlyGettingPowered(x, y, zCoord)) {
|
||||
flagX = true;
|
||||
break;
|
||||
}
|
||||
|
||||
for(int z = zCoord - 2; z <= zCoord + 2; z++)
|
||||
for(int y = yCoord; y <= yCoord + 5; y++)
|
||||
if(worldObj.isBlockIndirectlyGettingPowered(xCoord, y, z)) {
|
||||
flagZ = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 2 || worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 3) {
|
||||
if(flagX) {
|
||||
|
||||
if(!redstoned) {
|
||||
this.tryToggle();
|
||||
}
|
||||
|
||||
redstoned = true;
|
||||
} else {
|
||||
|
||||
redstoned = false;
|
||||
}
|
||||
}
|
||||
if(worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 4 || worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 5) {
|
||||
if(flagZ) {
|
||||
|
||||
if(!redstoned) {
|
||||
this.tryToggle();
|
||||
}
|
||||
|
||||
redstoned = true;
|
||||
} else {
|
||||
|
||||
redstoned = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isOpening && state == 1) {
|
||||
|
||||
if(timer == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultScrapeNew", 1.0F, 1.0F);
|
||||
if(timer == 45)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 55)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 65)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 75)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 85)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 95)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 105)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 115)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
}
|
||||
if(!isOpening && state == 1) {
|
||||
|
||||
if(timer == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 10)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 20)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 30)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 40)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 50)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 60)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
if(timer == 70)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
|
||||
|
||||
if(timer == 80)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultScrapeNew", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(state != 1) {
|
||||
timer = 0;
|
||||
} else {
|
||||
timer++;
|
||||
|
||||
if(timer >= 120) {
|
||||
|
||||
if(isOpening)
|
||||
finishOpen();
|
||||
else
|
||||
finishClose();
|
||||
}
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
}
|
||||
}
|
||||
|
||||
public void open() {
|
||||
if(state == 0) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
isOpening = true;
|
||||
state = 1;
|
||||
|
||||
openHatch();
|
||||
}
|
||||
}
|
||||
|
||||
public void finishOpen() {
|
||||
state = 2;
|
||||
}
|
||||
|
||||
public void close() {
|
||||
if(state == 2) {
|
||||
PacketDispatcher.wrapper.sendToAllAround(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 250));
|
||||
isOpening = false;
|
||||
state = 1;
|
||||
|
||||
closeHatch();
|
||||
}
|
||||
}
|
||||
|
||||
public void finishClose() {
|
||||
state = 0;
|
||||
}
|
||||
|
||||
public boolean canOpen() {
|
||||
return state == 0;
|
||||
}
|
||||
|
||||
public boolean canClose() {
|
||||
return state == 2 && isHatchFree();
|
||||
}
|
||||
|
||||
public void tryToggle() {
|
||||
|
||||
if(canOpen())
|
||||
open();
|
||||
else if(canClose())
|
||||
close();
|
||||
}
|
||||
|
||||
public boolean placeDummy(int x, int y, int z) {
|
||||
|
||||
Block present = worldObj.getBlock(x, y, z);
|
||||
if(!present.isReplaceable(worldObj, x, y, z) && present != ModBlocks.dummy_block_vault) worldObj.func_147480_a(x, y, z, false);
|
||||
|
||||
worldObj.setBlock(x, y, z, ModBlocks.dummy_block_vault);
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = xCoord;
|
||||
dummy.targetY = yCoord;
|
||||
dummy.targetZ = zCoord;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void removeDummy(int x, int y, int z) {
|
||||
|
||||
if(worldObj.getBlock(x, y, z) == ModBlocks.dummy_block_vault) {
|
||||
DummyBlockVault.safeBreak = true;
|
||||
worldObj.setBlock(x, y, z, Blocks.air);
|
||||
DummyBlockVault.safeBreak = false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isHatchFree() {
|
||||
|
||||
if(this.getBlockMetadata() == 2 || this.getBlockMetadata() == 3)
|
||||
return checkNS();
|
||||
else if(this.getBlockMetadata() == 4 || this.getBlockMetadata() == 5)
|
||||
return checkEW();
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
private void closeHatch() {
|
||||
|
||||
if(this.getBlockMetadata() == 2 || this.getBlockMetadata() == 3)
|
||||
fillNS();
|
||||
else if(this.getBlockMetadata() == 4 || this.getBlockMetadata() == 5)
|
||||
fillEW();
|
||||
}
|
||||
|
||||
private void openHatch() {
|
||||
|
||||
if(this.getBlockMetadata() == 2 || this.getBlockMetadata() == 3)
|
||||
removeNS();
|
||||
else if(this.getBlockMetadata() == 4 || this.getBlockMetadata() == 5)
|
||||
removeEW();
|
||||
}
|
||||
|
||||
private boolean checkNS() {
|
||||
return worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).isReplaceable(worldObj, xCoord - 1, yCoord + 1, zCoord) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord).isReplaceable(worldObj, xCoord, yCoord + 1, zCoord) &&
|
||||
worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).isReplaceable(worldObj, xCoord + 1, yCoord + 1, zCoord) &&
|
||||
worldObj.getBlock(xCoord - 1, yCoord + 2, zCoord).isReplaceable(worldObj, xCoord - 1, yCoord + 2, zCoord) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 2, zCoord).isReplaceable(worldObj, xCoord, yCoord + 2, zCoord) &&
|
||||
worldObj.getBlock(xCoord + 1, yCoord + 2, zCoord).isReplaceable(worldObj, xCoord + 1, yCoord + 2, zCoord) &&
|
||||
worldObj.getBlock(xCoord - 1, yCoord + 3, zCoord).isReplaceable(worldObj, xCoord - 1, yCoord + 3, zCoord) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 3, zCoord).isReplaceable(worldObj, xCoord, yCoord + 3, zCoord) &&
|
||||
worldObj.getBlock(xCoord + 1, yCoord + 3, zCoord).isReplaceable(worldObj, xCoord + 1, yCoord + 3, zCoord);
|
||||
}
|
||||
|
||||
private boolean checkEW() {
|
||||
return worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).isReplaceable(worldObj, xCoord, yCoord + 1, zCoord -1) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord).isReplaceable(worldObj, xCoord, yCoord, zCoord) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).isReplaceable(worldObj, xCoord, yCoord + 1, zCoord + 1) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 2, zCoord - 1).isReplaceable(worldObj, xCoord, yCoord + 2, zCoord - 1) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 2, zCoord).isReplaceable(worldObj, xCoord, yCoord + 2, zCoord) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 2, zCoord + 1).isReplaceable(worldObj, xCoord, yCoord + 2, zCoord + 1) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 3, zCoord - 1).isReplaceable(worldObj, xCoord, yCoord + 3, zCoord - 1) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 3, zCoord).isReplaceable(worldObj, xCoord, yCoord + 3, zCoord) &&
|
||||
worldObj.getBlock(xCoord, yCoord + 3, zCoord + 1).isReplaceable(worldObj, xCoord, yCoord + 3, zCoord + 1);
|
||||
}
|
||||
|
||||
private void fillNS() {
|
||||
|
||||
placeDummy(xCoord - 1, yCoord + 1, zCoord);
|
||||
placeDummy(xCoord - 1, yCoord + 2, zCoord);
|
||||
placeDummy(xCoord - 1, yCoord + 3, zCoord);
|
||||
placeDummy(xCoord, yCoord + 1, zCoord);
|
||||
placeDummy(xCoord, yCoord + 2, zCoord);
|
||||
placeDummy(xCoord, yCoord + 3, zCoord);
|
||||
placeDummy(xCoord + 1, yCoord + 1, zCoord);
|
||||
placeDummy(xCoord + 1, yCoord + 2, zCoord);
|
||||
placeDummy(xCoord + 1, yCoord + 3, zCoord);
|
||||
}
|
||||
|
||||
private void fillEW() {
|
||||
|
||||
placeDummy(xCoord, yCoord + 1, zCoord - 1);
|
||||
placeDummy(xCoord, yCoord + 2, zCoord - 1);
|
||||
placeDummy(xCoord, yCoord + 3, zCoord - 1);
|
||||
placeDummy(xCoord, yCoord + 1, zCoord);
|
||||
placeDummy(xCoord, yCoord + 2, zCoord);
|
||||
placeDummy(xCoord, yCoord + 3, zCoord);
|
||||
placeDummy(xCoord, yCoord + 1, zCoord + 1);
|
||||
placeDummy(xCoord, yCoord + 2, zCoord + 1);
|
||||
placeDummy(xCoord, yCoord + 3, zCoord + 1);
|
||||
}
|
||||
|
||||
private void removeNS() {
|
||||
|
||||
removeDummy(xCoord - 1, yCoord + 1, zCoord);
|
||||
removeDummy(xCoord - 1, yCoord + 2, zCoord);
|
||||
removeDummy(xCoord - 1, yCoord + 3, zCoord);
|
||||
removeDummy(xCoord, yCoord + 1, zCoord);
|
||||
removeDummy(xCoord, yCoord + 2, zCoord);
|
||||
removeDummy(xCoord, yCoord + 3, zCoord);
|
||||
removeDummy(xCoord + 1, yCoord + 1, zCoord);
|
||||
removeDummy(xCoord + 1, yCoord + 2, zCoord);
|
||||
removeDummy(xCoord + 1, yCoord + 3, zCoord);
|
||||
}
|
||||
|
||||
private void removeEW() {
|
||||
|
||||
removeDummy(xCoord, yCoord + 1, zCoord - 1);
|
||||
removeDummy(xCoord, yCoord + 2, zCoord - 1);
|
||||
removeDummy(xCoord, yCoord + 3, zCoord - 1);
|
||||
removeDummy(xCoord, yCoord + 1, zCoord);
|
||||
removeDummy(xCoord, yCoord + 2, zCoord);
|
||||
removeDummy(xCoord, yCoord + 3, zCoord);
|
||||
removeDummy(xCoord, yCoord + 1, zCoord + 1);
|
||||
removeDummy(xCoord, yCoord + 2, zCoord + 1);
|
||||
removeDummy(xCoord, yCoord + 3, zCoord + 1);
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
isOpening = nbt.getBoolean("isOpening");
|
||||
state = nbt.getInteger("state");
|
||||
sysTime = nbt.getLong("sysTime");
|
||||
timer = nbt.getInteger("timer");
|
||||
type = nbt.getInteger("type");
|
||||
redstoned = nbt.getBoolean("redstoned");
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setBoolean("isOpening", isOpening);
|
||||
nbt.setInteger("state", state);
|
||||
nbt.setLong("sysTime", sysTime);
|
||||
nbt.setInteger("timer", timer);
|
||||
nbt.setInteger("type", type);
|
||||
nbt.setBoolean("redstoned", redstoned);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockDoorGeneric;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityVaultDoorMigration extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
int meta = getBlockMetadata();
|
||||
if(meta <= 5) {
|
||||
getWorldObj().setBlock(xCoord, yCoord, zCoord, ModBlocks.vault_door, meta + 10, 3);
|
||||
((BlockDoorGeneric) ModBlocks.vault_door).fillSpace(getWorldObj(), xCoord, yCoord, zCoord, ForgeDirection.getOrientation(meta), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,10 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
tank.setType(9, 9, slots);
|
||||
tank.loadTank(0, 1, slots);
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
tank.loadTank(i, 9, slots);
|
||||
}
|
||||
|
||||
for(int i = 1; i < 10; i++) {
|
||||
|
||||
|
||||
3786
src/main/resources/assets/hbm/models/pheodoors/vault_door.obj
Normal file
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 32 KiB |