1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-24 18:37:38 +00:00

Add a whole bunch of tests

Coverage graph goes woosh. Hopefully.

More importantly, all of these are historic regressions, so very much
worth tracking.
This commit is contained in:
Jonathan Coates
2021-01-19 20:02:45 +00:00
parent 657ceda3af
commit eaa7359c8c
22 changed files with 3287 additions and 18 deletions

View File

@@ -52,19 +52,6 @@ public class TurtleCompareCommand implements ITurtleCommand
Block lookAtBlock = lookAtState.getBlock();
if( !lookAtBlock.isAir( lookAtState, world, newPosition ) )
{
// Try getSilkTouchDrop first
if( !lookAtBlock.hasTileEntity( lookAtState ) )
{
try
{
Method method = ObfuscationReflectionHelper.findMethod( Block.class, "func_180643_i", BlockState.class );
lookAtStack = (ItemStack) method.invoke( lookAtBlock, lookAtState );
}
catch( ReflectiveOperationException | RuntimeException ignored )
{
}
}
// See if the block drops anything with the same ID as itself
// (try 5 times to try and beat random number generators)
for( int i = 0; i < 5 && lookAtStack.isEmpty(); i++ )