1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-28 12:27:39 +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" ); return TurtleCommandResult.failure( "Nothing to dig here" );
} }
@SuppressWarnings("deprecation")
private List<ItemStack> getBlockDropped( World world, BlockPos pos, EntityPlayer player ) private List<ItemStack> getBlockDropped( World world, BlockPos pos, EntityPlayer player )
{ {
IBlockState state = world.getBlockState( pos ); IBlockState state = world.getBlockState( pos );
Block block = state.getBlock(); Block block = state.getBlock();
NonNullList<ItemStack> drops = NonNullList.create(); // Note, we use the deprecated version as some mods override that instead. Those mods are wrong (TM).
block.getDrops( drops, world, pos, world.getBlockState( pos ), 0 ); List<ItemStack> drops = block.getDrops( world, pos, world.getBlockState( pos ), 0 );
double chance = ForgeEventFactory.fireBlockHarvesting( drops, world, pos, state, 0, 1, false, player ); double chance = ForgeEventFactory.fireBlockHarvesting( drops, world, pos, state, 0, 1, false, player );
for( int i = drops.size() - 1; i >= 0; i-- ) for( int i = drops.size() - 1; i >= 0; i-- )