1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-28 18:04:47 +00:00

Add workaround for incorrect overload of getDrops being overridden

Closes #2
This commit is contained in:
SquidDev 2017-12-30 19:03:32 +00:00
parent c69ba205f8
commit 632762768e

View File

@ -302,12 +302,13 @@ public class TurtleTool implements ITurtleUpgrade
return TurtleCommandResult.failure( "Nothing to dig here" );
}
@SuppressWarnings("deprecation")
private List<ItemStack> getBlockDropped( World world, BlockPos pos, EntityPlayer player )
{
IBlockState state = world.getBlockState( pos );
Block block = state.getBlock();
NonNullList<ItemStack> drops = NonNullList.create();
block.getDrops( drops, world, pos, world.getBlockState( pos ), 0 );
// Note, we use the deprecated version as some mods override that instead. Those mods are wrong (TM).
List<ItemStack> drops = block.getDrops( world, pos, world.getBlockState( pos ), 0 );
double chance = ForgeEventFactory.fireBlockHarvesting( drops, world, pos, state, 0, 1, false, player );
for( int i = drops.size() - 1; i >= 0; i-- )