From 4f7ad220df0438b6f3382110577b53f29da46453 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 15:50:07 -0400 Subject: Update of all changes --- .../jewelrycraft/block/BlockMidasTouch.java | 130 +++++++++++---------- 1 file changed, 67 insertions(+), 63 deletions(-) mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java (limited to 'src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java') diff --git a/src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java b/src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java old mode 100644 new mode 100755 index 337428d..19e0190 --- a/src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java +++ b/src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java @@ -1,6 +1,7 @@ package darkknight.jewelrycraft.block; import java.util.Random; + import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -12,67 +13,70 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -public class BlockMidasTouch extends BlockContainer -{ - protected BlockMidasTouch(Material mat) - { - super(mat); - setHarvestLevel("pickaxe", 2); - } - - @Override - public TileEntity createNewTileEntity(World world, int var2) - { - return new TileEntityMidasTouch(); - } - - @Override - public boolean renderAsNormalBlock() - { - return false; - } - - @Override - public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) - { - return false; - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public int getRenderType() - { - return -1; - } - - public int quantityDropped(Random rand) - { - return 0; - } - - public Item getItemDropped(int id, Random rand, int size) - { - return Items.gold_nugget; - } - - public void onBlockHarvested(World world, int i, int j, int k, int meta, EntityPlayer player) - { - } - - public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) - { - TileEntity tile = world.getTileEntity(x, y, z); - if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2); - } - - @Override - public void registerBlockIcons(IIconRegister icon) - { - blockIcon = icon.registerIcon("minecraft:gold_block"); - } +public class BlockMidasTouch extends BlockContainer { + protected BlockMidasTouch(Material mat) { + super(mat); + setHarvestLevel("pickaxe", 2); + } + + @Override + public TileEntity createNewTileEntity(World world, int var2) { + return new TileEntityMidasTouch(); + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, + int j, int k, int l) { + return false; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public int quantityDropped(Random rand) { + return 0; + } + + @Override + public Item getItemDropped(int id, Random rand, int size) { + return Items.gold_nugget; + } + + @Override + public void onBlockHarvested(World world, int i, int j, int k, + int meta, EntityPlayer player) { + // Do nothing + } + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, + int y, int z) { + TileEntity tile = world.getTileEntity(x, y, z); + if (((TileEntityMidasTouch) tile).target != null) + this.setBlockBounds( + 0.5f - ((TileEntityMidasTouch) tile).target.width / 2, + 0F, + 0.5f - ((TileEntityMidasTouch) tile).target.width / 2, + 0.5f + ((TileEntityMidasTouch) tile).target.width / 2, + ((TileEntityMidasTouch) tile).target.height, + 0.5f + ((TileEntityMidasTouch) tile).target.width / 2); + } + + @Override + public void registerBlockIcons(IIconRegister icon) { + blockIcon = icon.registerIcon("minecraft:gold_block"); + } } -- cgit v1.2.3