From 01c8701b68986ccfa83e902515716838d6829311 Mon Sep 17 00:00:00 2001 From: Onyx Date: Tue, 1 Dec 2015 20:55:30 +0000 Subject: - Fixed all of the bugs mentioned on github - Added new config options - Rabbits paw now increases the chance of spawning hearts, rather than itself spawning some - Hearts now have a much lower chance to spawn by default - You can no longer increase your health past 20 hearts (aka double the default health) - The guide now also shows the total number of pages on each tab - A new luck stat has been added to the Curse API - Cleaned up the code a bit (removed unused methods, imports etc) - The displayer's info now has a purple solid color background; the text also has a much closer shadow and now shrinks in height as well as in width when too big - I have modified the potion list to use Mithion's code, credits have been given --- .../jewelrycraft/block/BlockMidasTouch.java | 161 ++++++++++----------- 1 file changed, 78 insertions(+), 83 deletions(-) (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 index 4e09e4a..337428d 100644 --- a/src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java +++ b/src/main/java/darkknight/jewelrycraft/block/BlockMidasTouch.java @@ -1,83 +1,78 @@ -package darkknight.jewelrycraft.block; - -import java.util.ArrayList; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch; -import darkknight.jewelrycraft.tileentity.TileEntityMolder; - -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"); - } -} +package darkknight.jewelrycraft.block; + +import java.util.Random; +import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +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.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"); + } +} -- cgit v1.2.3