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