mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 15:33:18 +00:00
58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockSkull.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java
|
|
@@ -116,10 +116,6 @@
|
|
return new ItemStack(Items.skull, 1, i);
|
|
}
|
|
|
|
- public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
|
- {
|
|
- }
|
|
-
|
|
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
|
|
{
|
|
if (player.capabilities.isCreativeMode)
|
|
@@ -127,13 +123,18 @@
|
|
state = state.withProperty(NODROP, Boolean.valueOf(true));
|
|
worldIn.setBlockState(pos, state, 4);
|
|
}
|
|
+ this.dropBlockAsItem(worldIn, pos, state, 0);
|
|
|
|
super.onBlockHarvested(worldIn, pos, state, player);
|
|
}
|
|
|
|
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
|
{
|
|
- if (!worldIn.isRemote)
|
|
+ super.breakBlock(worldIn, pos, state);
|
|
+ }
|
|
+ public java.util.List<ItemStack> getDrops(IBlockAccess worldIn, BlockPos pos, IBlockState state, int fortune)
|
|
+ {
|
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
|
{
|
|
if (!((Boolean)state.getValue(NODROP)).booleanValue())
|
|
{
|
|
@@ -142,7 +143,7 @@
|
|
if (tileentity instanceof TileEntitySkull)
|
|
{
|
|
TileEntitySkull tileentityskull = (TileEntitySkull)tileentity;
|
|
- ItemStack itemstack = this.func_185473_a(worldIn, pos, state);
|
|
+ ItemStack itemstack = new ItemStack(Items.skull, 1, tileentityskull.getSkullType());
|
|
|
|
if (tileentityskull.getSkullType() == 3 && tileentityskull.getPlayerProfile() != null)
|
|
{
|
|
@@ -152,12 +153,11 @@
|
|
itemstack.getTagCompound().setTag("SkullOwner", nbttagcompound);
|
|
}
|
|
|
|
- spawnAsEntity(worldIn, pos, itemstack);
|
|
+ ret.add(itemstack);
|
|
}
|
|
}
|
|
-
|
|
- super.breakBlock(worldIn, pos, state);
|
|
}
|
|
+ return ret;
|
|
}
|
|
|
|
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|