Still trying, still no success

This commit is contained in:
Adubbz 2013-06-08 12:50:47 +10:00
parent 73e458308a
commit 0238c806d5
2 changed files with 44 additions and 37 deletions

View file

@ -41,6 +41,8 @@ public class BlockAltar extends Block
public static Icon frameSapphire;
public static Icon frameTanzanite;
public static Icon frameTopaz;
public static TileEntityAltar tileentityaltar;
public BlockAltar(int blockID)
{
@ -96,7 +98,7 @@ public class BlockAltar extends Block
boolean returnStatement = false;
ItemStack equippedItem = player.getCurrentEquippedItem();
TileEntityAltar tileentityaltar = (TileEntityAltar) world.getBlockTileEntity(x, y, z);
tileentityaltar = (TileEntityAltar) world.getBlockTileEntity(x, y, z);
if (equippedItem != null)
{
@ -154,38 +156,41 @@ public class BlockAltar extends Block
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int meta, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
TileEntityAltar tileentityaltar = (TileEntityAltar) world.getBlockTileEntity(x, y, z);
tileentityaltar = (TileEntityAltar) world.getBlockTileEntity(x, y, z);
if (tileentityaltar != null)
{
if (tileentityaltar.getPresent("ruby"));
if (!world.isRemote)
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 10));
}
if (tileentityaltar.getPresent("peridot"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 11));
}
if (tileentityaltar.getPresent("topaz"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 12));
}
if (tileentityaltar.getPresent("tanzanite"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 13));
}
if (tileentityaltar.getPresent("apatite"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 14));
}
if (tileentityaltar.getPresent("sapphire"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 15));
if (tileentityaltar.getPresent("ruby"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 10));
}
if (tileentityaltar.getPresent("peridot"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 11));
}
if (tileentityaltar.getPresent("topaz"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 12));
}
if (tileentityaltar.getPresent("tanzanite"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 13));
}
if (tileentityaltar.getPresent("apatite"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 14));
}
if (tileentityaltar.getPresent("sapphire"));
{
ret.add(new ItemStack(Items.miscItems.get(), 1, 15));
}
}
}

View file

@ -8,12 +8,12 @@ import net.minecraft.world.World;
public class TileEntityAltar extends TileEntity
{
public boolean apatitePresent = false;
public boolean peridotPresent = false;
public boolean rubyPresent = false;
public boolean sapphirePresent = false;
public boolean tanzanitePresent = false;
public boolean topazPresent = false;
private boolean apatitePresent;
private boolean peridotPresent;
private boolean rubyPresent;
private boolean sapphirePresent;
private boolean tanzanitePresent;
private boolean topazPresent;
@Override
public void readFromNBT(NBTTagCompound nbt)
@ -93,7 +93,9 @@ public class TileEntityAltar extends TileEntity
{
return topazPresent;
}
return false;
else
{
return false;
}
}
}