Fix vanilla storage game tests being sensitive to rotation (#4108)

This commit is contained in:
haykam821 2024-09-23 13:48:10 -04:00 committed by GitHub
parent 1d5c24337f
commit 464f0e851d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,10 +113,11 @@ public class VanillaStorageTests {
InventoryStorage storage = InventoryStorage.of(inventory, null);
BlockPos comparatorPos = new BlockPos(1, 2, 0);
Direction comparatorFacing = context.getRotation().rotate(Direction.WEST);
// support block under the comparator
context.setBlockState(comparatorPos.offset(Direction.DOWN), Blocks.GREEN_WOOL.getDefaultState());
// comparator
context.setBlockState(comparatorPos, Blocks.COMPARATOR.getDefaultState().with(ComparatorBlock.FACING, Direction.WEST));
context.setBlockState(comparatorPos, Blocks.COMPARATOR.getDefaultState().with(ComparatorBlock.FACING, comparatorFacing));
try (Transaction transaction = Transaction.openOuter()) {
if (world.getBlockTickScheduler().isQueued(context.getAbsolutePos(comparatorPos), Blocks.COMPARATOR)) {