1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-11 10:53:03 +00:00

Construct ComponentAccesses with the BE

After embarrassing, let's do some proper work.

Rather than passing the level and position each time we call
ComponentAccess.get(), we now pass them at construction time (in the
form of the BE). This makes the consuming code a little cleaner, and is
required for the NeoForge changes in 1.20.4.
This commit is contained in:
Jonathan Coates
2024-01-14 17:46:37 +00:00
parent e6ee292850
commit be4512d1c3
10 changed files with 71 additions and 73 deletions

View File

@@ -177,12 +177,12 @@ public class TestPlatformHelper extends AbstractComputerCraftAPI implements Plat
}
@Override
public ComponentAccess<IPeripheral> createPeripheralAccess(Consumer<Direction> invalidate) {
public ComponentAccess<IPeripheral> createPeripheralAccess(BlockEntity owner, Consumer<Direction> invalidate) {
throw new UnsupportedOperationException("Cannot interact with the world inside tests");
}
@Override
public ComponentAccess<WiredElement> createWiredElementAccess(Consumer<Direction> invalidate) {
public ComponentAccess<WiredElement> createWiredElementAccess(BlockEntity owner, Consumer<Direction> invalidate) {
throw new UnsupportedOperationException("Cannot interact with the world inside tests");
}