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:
@@ -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-- )
|
||||||
|
|||||||
Reference in New Issue
Block a user