diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index d43af7e7f..79a59ce78 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -857,6 +857,10 @@ tile.seal_hatch.name=Siloluke (Deckel) tile.vault_door.name=Vault-Tec Sprengtür tile.blast_door.name=Abschluss-Sprengtür +item.door_metal.name=Metalltür +item.door_office.name=Bürotür +item.door_bunker.name=Bunkertür + item.nugget_uranium.name=Urannugget item.nugget_plutonium.name=Plutoniumnugget item.nugget_neptunium.name=Neptuniumnugget diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index d49c40eb1..3618f415d 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -857,6 +857,10 @@ tile.seal_hatch.name=Silo Hatch tile.vault_door.name=Vault-Tec Blast Door tile.blast_door.name=Sliding Blast Door +item.door_metal.name=Metal Door +item.door_office.name=Office Door +item.door_bunker.name=Bunker Door + item.nugget_uranium.name=Uranium Nugget item.nugget_plutonium.name=Plutonium Nugget item.nugget_neptunium.name=Neptunium Nugget diff --git a/assets/hbm/sounds.json b/assets/hbm/sounds.json index 9908d4659..42f36b35b 100644 --- a/assets/hbm/sounds.json +++ b/assets/hbm/sounds.json @@ -30,6 +30,8 @@ "block.pipePlaced": {"category": "block", "sounds": [{"name": "block/pipePlaced", "stream": false}]}, "block.missileAssembly": {"category": "block", "sounds": [{"name": "block/missileAssembly", "stream": false}]}, "block.missileAssembly2": {"category": "block", "sounds": [{"name": "block/missileAssembly2", "stream": false}]}, + "block.openDoor": {"category": "block", "sounds": ["block/door_open_1", "block/door_open_2"]}, + "block.closeDoor": {"category": "block", "sounds": ["block/door_close_1", "block/door_close_2"]}, "item.techBleep": {"category": "player", "sounds": [{"name": "tool/techBleep", "stream": false}]}, "item.techBoop": {"category": "player", "sounds": [{"name": "tool/techBoop", "stream": false}]}, diff --git a/assets/hbm/sounds/block/door_close_1.ogg b/assets/hbm/sounds/block/door_close_1.ogg new file mode 100644 index 000000000..52303ba3a Binary files /dev/null and b/assets/hbm/sounds/block/door_close_1.ogg differ diff --git a/assets/hbm/sounds/block/door_close_2.ogg b/assets/hbm/sounds/block/door_close_2.ogg new file mode 100644 index 000000000..31c325e0d Binary files /dev/null and b/assets/hbm/sounds/block/door_close_2.ogg differ diff --git a/assets/hbm/sounds/block/door_open_1.ogg b/assets/hbm/sounds/block/door_open_1.ogg new file mode 100644 index 000000000..bee9e401d Binary files /dev/null and b/assets/hbm/sounds/block/door_open_1.ogg differ diff --git a/assets/hbm/sounds/block/door_open_2.ogg b/assets/hbm/sounds/block/door_open_2.ogg new file mode 100644 index 000000000..793cf0e1b Binary files /dev/null and b/assets/hbm/sounds/block/door_open_2.ogg differ diff --git a/assets/hbm/textures/blocks/brick_asbestos.png b/assets/hbm/textures/blocks/brick_asbestos.png new file mode 100644 index 000000000..cec900915 Binary files /dev/null and b/assets/hbm/textures/blocks/brick_asbestos.png differ diff --git a/assets/hbm/textures/blocks/door_bunker_lower.png b/assets/hbm/textures/blocks/door_bunker_lower.png new file mode 100644 index 000000000..5ee8ca712 Binary files /dev/null and b/assets/hbm/textures/blocks/door_bunker_lower.png differ diff --git a/assets/hbm/textures/blocks/door_bunker_upper.png b/assets/hbm/textures/blocks/door_bunker_upper.png new file mode 100644 index 000000000..53058dbe0 Binary files /dev/null and b/assets/hbm/textures/blocks/door_bunker_upper.png differ diff --git a/assets/hbm/textures/blocks/door_metal_lower.png b/assets/hbm/textures/blocks/door_metal_lower.png new file mode 100644 index 000000000..5da0cce0e Binary files /dev/null and b/assets/hbm/textures/blocks/door_metal_lower.png differ diff --git a/assets/hbm/textures/blocks/door_metal_upper.png b/assets/hbm/textures/blocks/door_metal_upper.png new file mode 100644 index 000000000..fb70e99bc Binary files /dev/null and b/assets/hbm/textures/blocks/door_metal_upper.png differ diff --git a/assets/hbm/textures/blocks/door_office_lower.png b/assets/hbm/textures/blocks/door_office_lower.png new file mode 100644 index 000000000..b06b857de Binary files /dev/null and b/assets/hbm/textures/blocks/door_office_lower.png differ diff --git a/assets/hbm/textures/blocks/door_office_upper.png b/assets/hbm/textures/blocks/door_office_upper.png new file mode 100644 index 000000000..f55a9d12f Binary files /dev/null and b/assets/hbm/textures/blocks/door_office_upper.png differ diff --git a/assets/hbm/textures/blocks/pink_log.png b/assets/hbm/textures/blocks/pink_log.png new file mode 100644 index 000000000..96c7b9528 Binary files /dev/null and b/assets/hbm/textures/blocks/pink_log.png differ diff --git a/assets/hbm/textures/blocks/pink_planks.png b/assets/hbm/textures/blocks/pink_planks.png new file mode 100644 index 000000000..e4aac5725 Binary files /dev/null and b/assets/hbm/textures/blocks/pink_planks.png differ diff --git a/assets/hbm/textures/blocks/tile_lab b/assets/hbm/textures/blocks/tile_lab new file mode 100644 index 000000000..8c715630a Binary files /dev/null and b/assets/hbm/textures/blocks/tile_lab differ diff --git a/assets/hbm/textures/blocks/tile_lab_broken.png b/assets/hbm/textures/blocks/tile_lab_broken.png new file mode 100644 index 000000000..caf789201 Binary files /dev/null and b/assets/hbm/textures/blocks/tile_lab_broken.png differ diff --git a/assets/hbm/textures/items/door_bunker.png b/assets/hbm/textures/items/door_bunker.png new file mode 100644 index 000000000..aa0a31b9d Binary files /dev/null and b/assets/hbm/textures/items/door_bunker.png differ diff --git a/assets/hbm/textures/items/door_metal.png b/assets/hbm/textures/items/door_metal.png new file mode 100644 index 000000000..4edc523b7 Binary files /dev/null and b/assets/hbm/textures/items/door_metal.png differ diff --git a/assets/hbm/textures/items/door_office.png b/assets/hbm/textures/items/door_office.png new file mode 100644 index 000000000..63d68820e Binary files /dev/null and b/assets/hbm/textures/items/door_office.png differ diff --git a/assets/hbm/textures/items/wire_advanced_alloy.png b/assets/hbm/textures/items/wire_advanced_alloy.png index 8f57852d1..0b31efe6f 100644 Binary files a/assets/hbm/textures/items/wire_advanced_alloy.png and b/assets/hbm/textures/items/wire_advanced_alloy.png differ diff --git a/assets/hbm/textures/items/wire_aluminium.png b/assets/hbm/textures/items/wire_aluminium.png index 84d065667..e4c210ec1 100644 Binary files a/assets/hbm/textures/items/wire_aluminium.png and b/assets/hbm/textures/items/wire_aluminium.png differ diff --git a/assets/hbm/textures/items/wire_copper.png b/assets/hbm/textures/items/wire_copper.png index 1ec61204e..94be8820f 100644 Binary files a/assets/hbm/textures/items/wire_copper.png and b/assets/hbm/textures/items/wire_copper.png differ diff --git a/assets/hbm/textures/items/wire_gold.png b/assets/hbm/textures/items/wire_gold.png index a95231266..8adcdb5e0 100644 Binary files a/assets/hbm/textures/items/wire_gold.png and b/assets/hbm/textures/items/wire_gold.png differ diff --git a/assets/hbm/textures/items/wire_magnetized_tungsten.png b/assets/hbm/textures/items/wire_magnetized_tungsten.png index d9b66cdda..e8c32d095 100644 Binary files a/assets/hbm/textures/items/wire_magnetized_tungsten.png and b/assets/hbm/textures/items/wire_magnetized_tungsten.png differ diff --git a/assets/hbm/textures/items/wire_red_copper.png b/assets/hbm/textures/items/wire_red_copper.png index b1c1ff47a..aa2054506 100644 Binary files a/assets/hbm/textures/items/wire_red_copper.png and b/assets/hbm/textures/items/wire_red_copper.png differ diff --git a/assets/hbm/textures/items/wire_schrabidium.png b/assets/hbm/textures/items/wire_schrabidium.png index 69c0f0603..44def6c53 100644 Binary files a/assets/hbm/textures/items/wire_schrabidium.png and b/assets/hbm/textures/items/wire_schrabidium.png differ diff --git a/assets/hbm/textures/items/wire_tungsten.png b/assets/hbm/textures/items/wire_tungsten.png index ebbb07933..8fb32aa9b 100644 Binary files a/assets/hbm/textures/items/wire_tungsten.png and b/assets/hbm/textures/items/wire_tungsten.png differ diff --git a/assets/hbm/textures/items/wiring_red_copper.png b/assets/hbm/textures/items/wiring_red_copper.png index 81baf8607..62f86c1bc 100644 Binary files a/assets/hbm/textures/items/wiring_red_copper.png and b/assets/hbm/textures/items/wiring_red_copper.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 26cc18359..c47fb1441 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -248,6 +248,10 @@ public class ModBlocks { public static Block vault_door; public static Block blast_door; + public static Block door_metal; + public static Block door_office; + public static Block door_bunker; + public static Block barbed_wire; public static Block barbed_wire_fire; public static Block barbed_wire_poison; @@ -703,6 +707,11 @@ public class ModBlocks { public static Block dummy_plate_cargo; public static Block ntm_dirt; + + public static Block pink_log; + public static Block pink_planks; + public static Block pink_slab; + public static Block pink_stairs; public static Block ff; @@ -1073,7 +1082,11 @@ public class ModBlocks { vault_door = new VaultDoor(Material.iron).setBlockName("vault_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vault_door"); blast_door = new BlastDoor(Material.iron).setBlockName("blast_door").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":blast_door"); - + + door_metal = new BlockModDoor(Material.iron).setBlockName("door_metal").setHardness(5.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":door_metal"); + door_office = new BlockModDoor(Material.iron).setBlockName("door_office").setHardness(10.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":door_office"); + door_bunker = new BlockModDoor(Material.iron).setBlockName("door_bunker").setHardness(10.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":door_bunker"); + barbed_wire = new BarbedWire(Material.iron).setBlockName("barbed_wire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire"); barbed_wire_fire = new BarbedWire(Material.iron).setBlockName("barbed_wire_fire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_fire"); barbed_wire_poison = new BarbedWire(Material.iron).setBlockName("barbed_wire_poison").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_poison"); @@ -1522,6 +1535,11 @@ public class ModBlocks { GameRegistry.registerBlock(vault_door, vault_door.getUnlocalizedName()); GameRegistry.registerBlock(blast_door, blast_door.getUnlocalizedName()); + //Doors + GameRegistry.registerBlock(door_metal, door_metal.getUnlocalizedName()); + GameRegistry.registerBlock(door_office, door_office.getUnlocalizedName()); + GameRegistry.registerBlock(door_bunker, door_bunker.getUnlocalizedName()); + //Crates GameRegistry.registerBlock(crate_iron, crate_iron.getUnlocalizedName()); GameRegistry.registerBlock(crate_steel, crate_steel.getUnlocalizedName()); diff --git a/com/hbm/blocks/generic/BlockModDoor.java b/com/hbm/blocks/generic/BlockModDoor.java new file mode 100644 index 000000000..3abb34c9c --- /dev/null +++ b/com/hbm/blocks/generic/BlockModDoor.java @@ -0,0 +1,398 @@ +package com.hbm.blocks.generic; + +import java.util.Random; + +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.IconFlipped; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockModDoor extends Block { + @SideOnly(Side.CLIENT) + private IIcon[] field_150017_a; + @SideOnly(Side.CLIENT) + private IIcon[] field_150016_b; + private static final String __OBFID = "CL_00000230"; + + public BlockModDoor(Material p_i45402_1_) { + super(p_i45402_1_); + float f = 0.5F; + float f1 = 1.0F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + return this.field_150016_b[0]; + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess p_149673_1_, int p_149673_2_, int p_149673_3_, int p_149673_4_, int p_149673_5_) { + if (p_149673_5_ != 1 && p_149673_5_ != 0) { + int i1 = this.func_150012_g(p_149673_1_, p_149673_2_, p_149673_3_, p_149673_4_); + int j1 = i1 & 3; + boolean flag = (i1 & 4) != 0; + boolean flag1 = false; + boolean flag2 = (i1 & 8) != 0; + + if (flag) { + if (j1 == 0 && p_149673_5_ == 2) { + flag1 = !flag1; + } else if (j1 == 1 && p_149673_5_ == 5) { + flag1 = !flag1; + } else if (j1 == 2 && p_149673_5_ == 3) { + flag1 = !flag1; + } else if (j1 == 3 && p_149673_5_ == 4) { + flag1 = !flag1; + } + } else { + if (j1 == 0 && p_149673_5_ == 5) { + flag1 = !flag1; + } else if (j1 == 1 && p_149673_5_ == 3) { + flag1 = !flag1; + } else if (j1 == 2 && p_149673_5_ == 4) { + flag1 = !flag1; + } else if (j1 == 3 && p_149673_5_ == 2) { + flag1 = !flag1; + } + + if ((i1 & 16) != 0) { + flag1 = !flag1; + } + } + + return flag2 ? this.field_150017_a[flag1 ? 1 : 0] : this.field_150016_b[flag1 ? 1 : 0]; + } else { + return this.field_150016_b[0]; + } + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) { + this.field_150017_a = new IIcon[2]; + this.field_150016_b = new IIcon[2]; + this.field_150017_a[0] = p_149651_1_.registerIcon(this.getTextureName() + "_upper"); + this.field_150016_b[0] = p_149651_1_.registerIcon(this.getTextureName() + "_lower"); + this.field_150017_a[1] = new IconFlipped(this.field_150017_a[0], true, false); + this.field_150016_b[1] = new IconFlipped(this.field_150016_b[0], true, false); + } + + /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether + * or not to render the shared face of two adjacent blocks and also whether + * the player can attach torches, redstone wire, etc to this block. + */ + public boolean isOpaqueCube() { + return false; + } + + public boolean getBlocksMovement(IBlockAccess p_149655_1_, int p_149655_2_, int p_149655_3_, int p_149655_4_) { + int l = this.func_150012_g(p_149655_1_, p_149655_2_, p_149655_3_, p_149655_4_); + return (l & 4) != 0; + } + + /** + * If this block doesn't render as an ordinary block it will return False + * (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() { + return false; + } + + /** + * The type of render function that is called for this block + */ + public int getRenderType() { + return 7; + } + + /** + * Returns the bounding box of the wired rectangular prism to render. + */ + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World p_149633_1_, int p_149633_2_, int p_149633_3_, + int p_149633_4_) { + this.setBlockBoundsBasedOnState(p_149633_1_, p_149633_2_, p_149633_3_, p_149633_4_); + return super.getSelectedBoundingBoxFromPool(p_149633_1_, p_149633_2_, p_149633_3_, p_149633_4_); + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this + * box can change after the pool has been cleared to be reused) + */ + public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, + int p_149668_4_) { + this.setBlockBoundsBasedOnState(p_149668_1_, p_149668_2_, p_149668_3_, p_149668_4_); + return super.getCollisionBoundingBoxFromPool(p_149668_1_, p_149668_2_, p_149668_3_, p_149668_4_); + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, y, + * z + */ + public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, + int p_149719_4_) { + this.func_150011_b(this.func_150012_g(p_149719_1_, p_149719_2_, p_149719_3_, p_149719_4_)); + } + + public int func_150013_e(IBlockAccess p_150013_1_, int p_150013_2_, int p_150013_3_, int p_150013_4_) { + return this.func_150012_g(p_150013_1_, p_150013_2_, p_150013_3_, p_150013_4_) & 3; + } + + public boolean func_150015_f(IBlockAccess p_150015_1_, int p_150015_2_, int p_150015_3_, int p_150015_4_) { + return (this.func_150012_g(p_150015_1_, p_150015_2_, p_150015_3_, p_150015_4_) & 4) != 0; + } + + private void func_150011_b(int p_150011_1_) { + float f = 0.1875F; + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F); + int j = p_150011_1_ & 3; + boolean flag = (p_150011_1_ & 4) != 0; + boolean flag1 = (p_150011_1_ & 16) != 0; + + if (j == 0) { + if (flag) { + if (!flag1) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + } else { + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + } + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + } + } else if (j == 1) { + if (flag) { + if (!flag1) { + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + } + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + } + } else if (j == 2) { + if (flag) { + if (!flag1) { + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + } + } else { + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + } else if (j == 3) { + if (flag) { + if (!flag1) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + } else { + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + } else { + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + } + } + } + + /** + * Called when a player hits the block. Args: world, x, y, z, player + */ + public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, + EntityPlayer p_149699_5_) { + } + + /** + * Called upon block activation (right click on the block.) + */ + public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, + EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { + int i1 = this.func_150012_g(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_); + int j1 = i1 & 7; + j1 ^= 4; + + if ((i1 & 8) == 0) { + p_149727_1_.setBlockMetadataWithNotify(p_149727_2_, p_149727_3_, p_149727_4_, j1, 2); + p_149727_1_.markBlockRangeForRenderUpdate(p_149727_2_, p_149727_3_, p_149727_4_, p_149727_2_, p_149727_3_, + p_149727_4_); + } else { + p_149727_1_.setBlockMetadataWithNotify(p_149727_2_, p_149727_3_ - 1, p_149727_4_, j1, 2); + p_149727_1_.markBlockRangeForRenderUpdate(p_149727_2_, p_149727_3_ - 1, p_149727_4_, p_149727_2_, + p_149727_3_, p_149727_4_); + } + + p_149727_1_.playSoundEffect(p_149727_2_, p_149727_3_, p_149727_4_, "hbm:block.openDoor", 1.0F, p_149727_1_.rand.nextFloat() * 0.1F + 0.9F); + + return true; + } + + public void func_150014_a(World p_150014_1_, int p_150014_2_, int p_150014_3_, int p_150014_4_, + boolean p_150014_5_) { + int l = this.func_150012_g(p_150014_1_, p_150014_2_, p_150014_3_, p_150014_4_); + boolean flag1 = (l & 4) != 0; + + if (flag1 != p_150014_5_) { + int i1 = l & 7; + i1 ^= 4; + + if ((l & 8) == 0) { + p_150014_1_.setBlockMetadataWithNotify(p_150014_2_, p_150014_3_, p_150014_4_, i1, 2); + p_150014_1_.markBlockRangeForRenderUpdate(p_150014_2_, p_150014_3_, p_150014_4_, p_150014_2_, + p_150014_3_, p_150014_4_); + } else { + p_150014_1_.setBlockMetadataWithNotify(p_150014_2_, p_150014_3_ - 1, p_150014_4_, i1, 2); + p_150014_1_.markBlockRangeForRenderUpdate(p_150014_2_, p_150014_3_ - 1, p_150014_4_, p_150014_2_, + p_150014_3_, p_150014_4_); + } + + p_150014_1_.playSoundEffect(p_150014_2_, p_150014_3_, p_150014_4_, "hbm:block.openDoor", 1.0F, p_150014_1_.rand.nextFloat() * 0.1F + 0.9F); + } + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which + * neighbor changed (coordinates passed are their own) Args: x, y, z, + * neighbor Block + */ + public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, + Block p_149695_5_) { + int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_); + + if ((l & 8) == 0) { + boolean flag = false; + + if (p_149695_1_.getBlock(p_149695_2_, p_149695_3_ + 1, p_149695_4_) != this) { + p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_); + flag = true; + } + + if (!World.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_)) { + p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_); + flag = true; + + if (p_149695_1_.getBlock(p_149695_2_, p_149695_3_ + 1, p_149695_4_) == this) { + p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_ + 1, p_149695_4_); + } + } + + if (flag) { + if (!p_149695_1_.isRemote) { + this.dropBlockAsItem(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, l, 0); + } + } else { + boolean flag1 = p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_) + || p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_ + 1, p_149695_4_); + + if ((flag1 || p_149695_5_.canProvidePower()) && p_149695_5_ != this) { + this.func_150014_a(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, flag1); + } + } + } else { + if (p_149695_1_.getBlock(p_149695_2_, p_149695_3_ - 1, p_149695_4_) != this) { + p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_); + } + + if (p_149695_5_ != this) { + this.onNeighborBlockChange(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_, p_149695_5_); + } + } + } + + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + + if((p_149650_1_ & 8) != 0) + return null; + + if (this == ModBlocks.door_metal) + return ModItems.door_metal; + else if (this == ModBlocks.door_office) + return ModItems.door_office; + else + return ModItems.door_bunker; + } + + /** + * Ray traces through the blocks collision from start vector to end vector + * returning a ray trace hit. Args: world, x, y, z, startVec, endVec + */ + public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, + Vec3 p_149731_5_, Vec3 p_149731_6_) { + this.setBlockBoundsBasedOnState(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_); + return super.collisionRayTrace(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_, p_149731_5_, p_149731_6_); + } + + /** + * Checks to see if its valid to put this block at the specified + * coordinates. Args: world, x, y, z + */ + public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) { + return p_149742_3_ >= p_149742_1_.getHeight() - 1 ? false + : World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) + && super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) + && super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_ + 1, p_149742_4_); + } + + /** + * Returns the mobility information of the block, 0 = free, 1 = can't push + * but can move over, 2 = total immobility and stop pistons + */ + public int getMobilityFlag() { + return 1; + } + + public int func_150012_g(IBlockAccess p_150012_1_, int p_150012_2_, int p_150012_3_, int p_150012_4_) { + int l = p_150012_1_.getBlockMetadata(p_150012_2_, p_150012_3_, p_150012_4_); + boolean flag = (l & 8) != 0; + int i1; + int j1; + + if (flag) { + i1 = p_150012_1_.getBlockMetadata(p_150012_2_, p_150012_3_ - 1, p_150012_4_); + j1 = l; + } else { + i1 = l; + j1 = p_150012_1_.getBlockMetadata(p_150012_2_, p_150012_3_ + 1, p_150012_4_); + } + + boolean flag1 = (j1 & 1) != 0; + return i1 & 7 | (flag ? 8 : 0) | (flag1 ? 16 : 0); + } + + /** + * Gets an item for the block being called on. Args: world, x, y, z + */ + @SideOnly(Side.CLIENT) + public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { + if (this == ModBlocks.door_metal) + return ModItems.door_metal; + else if (this == ModBlocks.door_office) + return ModItems.door_office; + else + return ModItems.door_bunker; + } + + /** + * Called when the block is attempted to be harvested + */ + public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_) { + if (p_149681_6_.capabilities.isCreativeMode && (p_149681_5_ & 8) != 0 + && p_149681_1_.getBlock(p_149681_2_, p_149681_3_ - 1, p_149681_4_) == this) { + p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_); + } + } +} diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 8c1b2bcf8..a28682928 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -1655,6 +1655,10 @@ public class ModItems { public static Item bucket_mud; public static Item bucket_acid; public static Item bucket_toxic; + + public static Item door_metal; + public static Item door_office; + public static Item door_bunker; public static Item record_lc; public static Item record_ss; @@ -3369,6 +3373,10 @@ public class ModItems { bucket_acid = new ItemModBucket(ModBlocks.acid_block).setUnlocalizedName("bucket_acid").setContainerItem(Items.bucket).setCreativeTab(MainRegistry.blockTab).setTextureName(RefStrings.MODID + ":bucket_acid"); bucket_toxic = new ItemModBucket(ModBlocks.toxic_block).setUnlocalizedName("bucket_toxic").setContainerItem(Items.bucket).setCreativeTab(MainRegistry.blockTab).setTextureName(RefStrings.MODID + ":bucket_toxic"); + door_metal = new ItemModDoor().setUnlocalizedName("door_metal").setCreativeTab(MainRegistry.blockTab).setTextureName(RefStrings.MODID + ":door_metal"); + door_office = new ItemModDoor().setUnlocalizedName("door_office").setCreativeTab(MainRegistry.blockTab).setTextureName(RefStrings.MODID + ":door_office"); + door_bunker = new ItemModDoor().setUnlocalizedName("door_bunker").setCreativeTab(MainRegistry.blockTab).setTextureName(RefStrings.MODID + ":door_bunker"); + record_lc = new ItemModRecord("lc").setUnlocalizedName("record_lc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_lc"); record_ss = new ItemModRecord("ss").setUnlocalizedName("record_ss").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_ss"); record_vc = new ItemModRecord("vc").setUnlocalizedName("record_vc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_vc"); @@ -5187,6 +5195,11 @@ public class ModItems { GameRegistry.registerItem(bucket_acid, bucket_acid.getUnlocalizedName()); GameRegistry.registerItem(bucket_toxic, bucket_toxic.getUnlocalizedName()); + //Door Items + GameRegistry.registerItem(door_metal, door_metal.getUnlocalizedName()); + GameRegistry.registerItem(door_office, door_office.getUnlocalizedName()); + GameRegistry.registerItem(door_bunker, door_bunker.getUnlocalizedName()); + //Records GameRegistry.registerItem(record_lc, record_lc.getUnlocalizedName()); GameRegistry.registerItem(record_ss, record_ss.getUnlocalizedName()); diff --git a/com/hbm/items/tool/ItemModDoor.java b/com/hbm/items/tool/ItemModDoor.java new file mode 100644 index 000000000..e87f98c8d --- /dev/null +++ b/com/hbm/items/tool/ItemModDoor.java @@ -0,0 +1,114 @@ +package com.hbm.items.tool; + +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class ItemModDoor extends Item +{ + private static final String __OBFID = "CL_00000020"; + + public ItemModDoor() + { + this.maxStackSize = 1; + this.setCreativeTab(CreativeTabs.tabRedstone); + } + + /** + * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return + * True if something happen and false if it don't. This is for ITEMS, not BLOCKS + */ + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + if (p_77648_7_ != 1) + { + return false; + } + else + { + ++p_77648_5_; + Block block; + + if(this == ModItems.door_metal) + block = ModBlocks.door_metal; + else if(this == ModItems.door_office) + block = ModBlocks.door_office; + else + block = ModBlocks.door_bunker; + + if (p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_) && p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_ + 1, p_77648_6_, p_77648_7_, p_77648_1_)) + { + if (!block.canPlaceBlockAt(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_)) + { + return false; + } + else + { + int i1 = MathHelper.floor_double((double)((p_77648_2_.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3; + placeDoorBlock(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, i1, block); + --p_77648_1_.stackSize; + return true; + } + } + else + { + return false; + } + } + } + + public static void placeDoorBlock(World p_150924_0_, int p_150924_1_, int p_150924_2_, int p_150924_3_, int p_150924_4_, Block p_150924_5_) + { + byte b0 = 0; + byte b1 = 0; + + if (p_150924_4_ == 0) + { + b1 = 1; + } + + if (p_150924_4_ == 1) + { + b0 = -1; + } + + if (p_150924_4_ == 2) + { + b1 = -1; + } + + if (p_150924_4_ == 3) + { + b0 = 1; + } + + int i1 = (p_150924_0_.getBlock(p_150924_1_ - b0, p_150924_2_, p_150924_3_ - b1).isNormalCube() ? 1 : 0) + (p_150924_0_.getBlock(p_150924_1_ - b0, p_150924_2_ + 1, p_150924_3_ - b1).isNormalCube() ? 1 : 0); + int j1 = (p_150924_0_.getBlock(p_150924_1_ + b0, p_150924_2_, p_150924_3_ + b1).isNormalCube() ? 1 : 0) + (p_150924_0_.getBlock(p_150924_1_ + b0, p_150924_2_ + 1, p_150924_3_ + b1).isNormalCube() ? 1 : 0); + boolean flag = p_150924_0_.getBlock(p_150924_1_ - b0, p_150924_2_, p_150924_3_ - b1) == p_150924_5_ || p_150924_0_.getBlock(p_150924_1_ - b0, p_150924_2_ + 1, p_150924_3_ - b1) == p_150924_5_; + boolean flag1 = p_150924_0_.getBlock(p_150924_1_ + b0, p_150924_2_, p_150924_3_ + b1) == p_150924_5_ || p_150924_0_.getBlock(p_150924_1_ + b0, p_150924_2_ + 1, p_150924_3_ + b1) == p_150924_5_; + boolean flag2 = false; + + if (flag && !flag1) + { + flag2 = true; + } + else if (j1 > i1) + { + flag2 = true; + } + + p_150924_0_.setBlock(p_150924_1_, p_150924_2_, p_150924_3_, p_150924_5_, p_150924_4_, 2); + p_150924_0_.setBlock(p_150924_1_, p_150924_2_ + 1, p_150924_3_, p_150924_5_, 8 | (flag2 ? 1 : 0), 2); + p_150924_0_.notifyBlocksOfNeighborChange(p_150924_1_, p_150924_2_, p_150924_3_, p_150924_5_); + p_150924_0_.notifyBlocksOfNeighborChange(p_150924_1_, p_150924_2_ + 1, p_150924_3_, p_150924_5_); + } +} diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index e45f2154c..df7a3aa25 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -1379,13 +1379,13 @@ public class Library { } public static Block getRandomConcrete() { - int i = rand.nextInt(100); + int i = rand.nextInt(20); - if(i < 5) + if(i <= 1) return ModBlocks.brick_concrete_broken; - if(i < 20) + if(i <= 4) return ModBlocks.brick_concrete_cracked; - if(i < 50) + if(i <= 10) return ModBlocks.brick_concrete_mossy; return ModBlocks.brick_concrete; diff --git a/com/hbm/world/Radio01.java b/com/hbm/world/Radio01.java index ae1a300fc..736c2f9b5 100644 --- a/com/hbm/world/Radio01.java +++ b/com/hbm/world/Radio01.java @@ -5,6 +5,7 @@ package com.hbm.world; import java.util.Random; import com.hbm.blocks.ModBlocks; +import com.hbm.items.tool.ItemModDoor; import com.hbm.lib.HbmChestContents; import com.hbm.lib.Library; import com.hbm.tileentity.machine.TileEntityCrateSteel; @@ -420,8 +421,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 5, y + 0, z + 4, Blocks.air, 0, 3); world.setBlock(x + 6, y + 0, z + 4, Blocks.air, 0, 3); world.setBlock(x + 7, y + 0, z + 4, Library.getRandomConcrete(), 0, 3); - world.setBlock(x + 8, y + 0, z + 4, Blocks.wooden_door, 3, 3); - ItemDoor.placeDoorBlock(world, x + 8, y + 0, z + 4, 3, Blocks.wooden_door); + world.setBlock(x + 8, y + 0, z + 4, ModBlocks.door_office, 3, 3); + ItemDoor.placeDoorBlock(world, x + 8, y + 0, z + 4, 3, ModBlocks.door_office); world.setBlock(x + 9, y + 0, z + 4, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 10, y + 0, z + 4, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 0, y + 0, z + 5, Library.getRandomConcrete(), 0, 3); @@ -464,8 +465,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 4, y + 0, z + 8, Blocks.air, 0, 3); world.setBlock(x + 5, y + 0, z + 8, Blocks.air, 0, 3); world.setBlock(x + 6, y + 0, z + 8, Blocks.air, 0, 3); - world.setBlock(x + 7, y + 0, z + 8, Blocks.wooden_door, 2, 3); - ItemDoor.placeDoorBlock(world, x + 7, y + 0, z + 8, 2, Blocks.wooden_door); + world.setBlock(x + 7, y + 0, z + 8, ModBlocks.door_office, 2, 3); + ItemDoor.placeDoorBlock(world, x + 7, y + 0, z + 8, 2, ModBlocks.door_office); world.setBlock(x + 8, y + 0, z + 8, Blocks.air, 0, 3); world.setBlock(x + 9, y + 0, z + 8, Blocks.air, 0, 3); world.setBlock(x + 10, y + 0, z + 8, Library.getRandomConcrete(), 0, 3); @@ -522,8 +523,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 4, y + 0, z + 13, Blocks.air, 0, 3); world.setBlock(x + 5, y + 0, z + 13, Blocks.air, 0, 3); world.setBlock(x + 6, y + 0, z + 13, Blocks.air, 0, 3); - world.setBlock(x + 7, y + 0, z + 13, Blocks.iron_door, 2, 3); - ItemDoor.placeDoorBlock(world, x + 7, y + 0, z + 13, 2, Blocks.iron_door); + world.setBlock(x + 7, y + 0, z + 13, ModBlocks.door_metal, 2, 3); + ItemDoor.placeDoorBlock(world, x + 7, y + 0, z + 13, 2, ModBlocks.door_office); world.setBlock(x + 8, y + 0, z + 13, Blocks.air, 0, 3); world.setBlock(x + 9, y + 0, z + 13, Blocks.air, 0, 3); world.setBlock(x + 10, y + 0, z + 13, Library.getRandomConcrete(), 0, 3); @@ -560,8 +561,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 8, y + 0, z + 16, Blocks.air, 0, 3); world.setBlock(x + 9, y + 0, z + 16, Blocks.air, 0, 3); world.setBlock(x + 10, y + 0, z + 16, Library.getRandomConcrete(), 0, 3); - world.setBlock(x + 0, y + 0, z + 17, Blocks.iron_door, 0, 3); - ItemDoor.placeDoorBlock(world, x + 0, y + 0, z + 17, 0, Blocks.iron_door); + world.setBlock(x + 0, y + 0, z + 17, ModBlocks.door_metal, 0, 3); + ItemDoor.placeDoorBlock(world, x + 0, y + 0, z + 17, 0, ModBlocks.door_metal); world.setBlock(x - 1, y + 1, z + 17, Blocks.wall_sign, 4, 3); world.setBlock(x + 1, y + 0, z + 17, Blocks.air, 0, 3); world.setBlock(x + 2, y + 0, z + 17, Blocks.air, 0, 3); @@ -573,8 +574,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 8, y + 0, z + 17, Blocks.air, 0, 3); world.setBlock(x + 9, y + 0, z + 17, Blocks.air, 0, 3); world.setBlock(x + 10, y + 0, z + 17, Library.getRandomConcrete(), 0, 3); - world.setBlock(x + 0, y + 0, z + 18, Blocks.iron_door, 0, 3); - ItemDoor.placeDoorBlock(world, x + 0, y + 0, z + 18, 0, Blocks.iron_door); + world.setBlock(x + 0, y + 0, z + 18, ModBlocks.door_metal, 0, 3); + ItemDoor.placeDoorBlock(world, x + 0, y + 0, z + 18, 0, ModBlocks.door_metal); world.setBlock(x - 1, y + 1, z + 18, Blocks.wall_sign, 4, 3); world.setBlock(x + 1, y + 0, z + 18, Blocks.air, 0, 3); world.setBlock(x + 2, y + 0, z + 18, Blocks.air, 0, 3); @@ -632,8 +633,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 10, y + 0, z + 22, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 0, y + 0, z + 23, Blocks.air, 0, 3); world.setBlock(x + 1, y + 0, z + 23, Blocks.air, 0, 3); - world.setBlock(x + 2, y + 0, z + 23, Blocks.wooden_door, 0, 3); - ItemDoor.placeDoorBlock(world, x + 2, y + 0, z + 23, 0, Blocks.wooden_door); + world.setBlock(x + 2, y + 0, z + 23, ModBlocks.door_metal, 0, 3); + ItemDoor.placeDoorBlock(world, x + 2, y + 0, z + 23, 0, ModBlocks.door_metal); world.setBlock(x + 3, y + 0, z + 23, Blocks.air, 0, 3); world.setBlock(x + 4, y + 0, z + 23, Blocks.air, 0, 3); world.setBlock(x + 5, y + 0, z + 23, ModBlocks.deco_steel, 0, 3); @@ -718,7 +719,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 5, y + 1, z + 4, Blocks.stone_stairs, 5, 3); world.setBlock(x + 6, y + 1, z + 4, Blocks.air, 0, 3); world.setBlock(x + 7, y + 1, z + 4, Library.getRandomConcrete(), 0, 3); - //world.setBlock(x + 8, y + 1, z + 4, Blocks.wooden_door, 8, 3); + //world.setBlock(x + 8, y + 1, z + 4, ModBlocks.door_office, 8, 3); world.setBlock(x + 9, y + 1, z + 4, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 10, y + 1, z + 4, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 0, y + 1, z + 5, Library.getRandomConcrete(), 0, 3); @@ -761,7 +762,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 4, y + 1, z + 8, Blocks.air, 0, 3); world.setBlock(x + 5, y + 1, z + 8, Blocks.air, 0, 3); world.setBlock(x + 6, y + 1, z + 8, Blocks.air, 0, 3); - //world.setBlock(x + 7, y + 1, z + 8, Blocks.wooden_door, 8, 3); + //world.setBlock(x + 7, y + 1, z + 8, ModBlocks.door_office, 8, 3); world.setBlock(x + 8, y + 1, z + 8, Blocks.air, 0, 3); world.setBlock(x + 9, y + 1, z + 8, Blocks.air, 0, 3); world.setBlock(x + 10, y + 1, z + 8, Library.getRandomConcrete(), 0, 3); @@ -816,7 +817,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 4, y + 1, z + 13, ModBlocks.deco_tungsten, 0, 3); world.setBlock(x + 5, y + 1, z + 13, Blocks.air, 0, 3); world.setBlock(x + 6, y + 1, z + 13, Blocks.air, 0, 3); - //world.setBlock(x + 7, y + 1, z + 13, Blocks.iron_door, 8, 3); + //world.setBlock(x + 7, y + 1, z + 13, ModBlocks.door_metal, 8, 3); world.setBlock(x + 8, y + 1, z + 13, Blocks.air, 0, 3); world.setBlock(x + 9, y + 1, z + 13, Blocks.air, 0, 3); world.setBlock(x + 10, y + 1, z + 13, Library.getRandomConcrete(), 0, 3); @@ -853,7 +854,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 8, y + 1, z + 16, Blocks.air, 0, 3); world.setBlock(x + 9, y + 1, z + 16, Blocks.air, 0, 3); world.setBlock(x + 10, y + 1, z + 16, Library.getRandomConcrete(), 0, 3); - //world.setBlock(x + 0, y + 1, z + 17, Blocks.iron_door, 8, 3); + //world.setBlock(x + 0, y + 1, z + 17, ModBlocks.door_metal, 8, 3); world.setBlock(x + 1, y + 1, z + 17, Blocks.air, 0, 3); world.setBlock(x + 2, y + 1, z + 17, Blocks.air, 0, 3); world.setBlock(x + 3, y + 1, z + 17, Blocks.air, 0, 3); @@ -864,7 +865,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 8, y + 1, z + 17, Blocks.air, 0, 3); world.setBlock(x + 9, y + 1, z + 17, Blocks.air, 0, 3); world.setBlock(x + 10, y + 1, z + 17, Library.getRandomConcrete(), 0, 3); - //world.setBlock(x + 0, y + 1, z + 18, Blocks.iron_door, 9, 3); + //world.setBlock(x + 0, y + 1, z + 18, ModBlocks.door_metal, 9, 3); world.setBlock(x + 1, y + 1, z + 18, Blocks.air, 0, 3); world.setBlock(x + 2, y + 1, z + 18, Blocks.air, 0, 3); world.setBlock(x + 3, y + 1, z + 18, Blocks.air, 0, 3); @@ -921,7 +922,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 10, y + 1, z + 22, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 0, y + 1, z + 23, Blocks.air, 0, 3); world.setBlock(x + 1, y + 1, z + 23, Blocks.air, 0, 3); - //world.setBlock(x + 2, y + 1, z + 23, Blocks.wooden_door, 8, 3); + //world.setBlock(x + 2, y + 1, z + 23, ModBlocks.door_office, 8, 3); world.setBlock(x + 3, y + 1, z + 23, Blocks.air, 0, 3); world.setBlock(x + 4, y + 1, z + 23, Blocks.air, 0, 3); world.setBlock(x + 5, y + 1, z + 23, ModBlocks.deco_steel, 0, 3); @@ -1614,8 +1615,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 0, y + 4, z + 7, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 1, y + 4, z + 7, Blocks.air, 0, 3); world.setBlock(x + 2, y + 4, z + 7, Blocks.air, 0, 3); - world.setBlock(x + 3, y + 4, z + 7, Blocks.iron_door, 0, 3); - ItemDoor.placeDoorBlock(world, x + 3, y + 4, z + 7, 0, Blocks.iron_door); + world.setBlock(x + 3, y + 4, z + 7, ModBlocks.door_metal, 0, 3); + ItemDoor.placeDoorBlock(world, x + 3, y + 4, z + 7, 0, ModBlocks.door_office); world.setBlock(x + 4, y + 4, z + 7, Blocks.air, 0, 3); world.setBlock(x + 5, y + 4, z + 7, Blocks.air, 0, 3); world.setBlock(x + 6, y + 4, z + 7, Blocks.air, 0, 3); @@ -1671,7 +1672,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 1, y + 4, z + 12, Blocks.air, 0, 3); world.setBlock(x + 2, y + 4, z + 12, Blocks.air, 0, 3); //world.setBlock(x + 3, y + 4, z + 12, Blocks.air, 0, 3); - ItemDoor.placeDoorBlock(world, x + 3, y + 4, z + 12, 0, Blocks.iron_door); + ItemDoor.placeDoorBlock(world, x + 3, y + 4, z + 12, 0, ModBlocks.door_office); world.setBlock(x + 4, y + 4, z + 12, Blocks.air, 0, 3); world.setBlock(x + 5, y + 4, z + 12, Blocks.air, 0, 3); world.setBlock(x + 6, y + 4, z + 12, Blocks.air, 0, 3); @@ -1684,7 +1685,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 2, y + 4, z + 13, Blocks.air, 0, 3); world.setBlock(x + 3, y + 4, z + 13, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 4, y + 4, z + 13, Blocks.air, 0, 3); - //ItemDoor.placeDoorBlock(world, x + 4, y + 4, z + 13, 2, Blocks.iron_door); + //ItemDoor.placeDoorBlock(world, x + 4, y + 4, z + 13, 2, ModBlocks.door_metal); world.setBlock(x + 5, y + 4, z + 13, Blocks.air, 0, 3); world.setBlock(x + 6, y + 4, z + 13, Blocks.air, 0, 3); world.setBlock(x + 7, y + 4, z + 13, Blocks.air, 0, 3); @@ -1717,8 +1718,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 10, y + 4, z + 15, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 0, y + 4, z + 16, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 1, y + 4, z + 16, Library.getRandomConcrete(), 0, 3); - world.setBlock(x + 2, y + 4, z + 16, Blocks.wooden_door, 5, 3); - ItemDoor.placeDoorBlock(world, x + 2, y + 4, z + 16, 5, Blocks.wooden_door); + world.setBlock(x + 2, y + 4, z + 16, ModBlocks.door_office, 5, 3); + ItemDoor.placeDoorBlock(world, x + 2, y + 4, z + 16, 5, ModBlocks.door_office); world.setBlock(x + 3, y + 4, z + 16, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 4, y + 4, z + 16, Blocks.air, 0, 3); world.setBlock(x + 5, y + 4, z + 16, Blocks.air, 0, 3); @@ -1765,8 +1766,8 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 2, y + 4, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 3, y + 4, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 4, y + 4, z + 20, Library.getRandomConcrete(), 0, 3); - world.setBlock(x + 5, y + 4, z + 20, Blocks.iron_door, 3, 3); - ItemDoor.placeDoorBlock(world, x + 5, y + 4, z + 20, 3, Blocks.iron_door); + world.setBlock(x + 5, y + 4, z + 20, ModBlocks.door_metal, 3, 3); + ItemDoor.placeDoorBlock(world, x + 5, y + 4, z + 20, 3, ModBlocks.door_metal); world.setBlock(x + 6, y + 4, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 7, y + 4, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 8, y + 4, z + 20, Library.getRandomConcrete(), 0, 3); @@ -1907,7 +1908,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 0, y + 5, z + 7, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 1, y + 5, z + 7, Blocks.air, 0, 3); world.setBlock(x + 2, y + 5, z + 7, Blocks.air, 0, 3); - //world.setBlock(x + 3, y + 5, z + 7, Blocks.iron_door, 8, 3); + //world.setBlock(x + 3, y + 5, z + 7, ModBlocks.door_metal, 8, 3); world.setBlock(x + 4, y + 5, z + 7, Blocks.air, 0, 3); world.setBlock(x + 5, y + 5, z + 7, Blocks.air, 0, 3); world.setBlock(x + 6, y + 5, z + 7, Blocks.air, 0, 3); @@ -2005,7 +2006,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 10, y + 5, z + 15, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 0, y + 5, z + 16, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 1, y + 5, z + 16, Library.getRandomConcrete(), 0, 3); - //world.setBlock(x + 2, y + 5, z + 16, Blocks.wooden_door, 8, 3); + //world.setBlock(x + 2, y + 5, z + 16, ModBlocks.door_office, 8, 3); world.setBlock(x + 3, y + 5, z + 16, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 4, y + 5, z + 16, Blocks.air, 0, 3); world.setBlock(x + 5, y + 5, z + 16, Blocks.air, 0, 3); @@ -2052,7 +2053,7 @@ public class Radio01 extends WorldGenerator world.setBlock(x + 2, y + 5, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 3, y + 5, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 4, y + 5, z + 20, Library.getRandomConcrete(), 0, 3); - //world.setBlock(x + 5, y + 5, z + 20, Blocks.iron_door, 8, 3); + //world.setBlock(x + 5, y + 5, z + 20, ModBlocks.door_metal, 8, 3); world.setBlock(x + 6, y + 5, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 7, y + 5, z + 20, Library.getRandomConcrete(), 0, 3); world.setBlock(x + 8, y + 5, z + 20, Library.getRandomConcrete(), 0, 3);