1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-31 13:42:59 +00:00

Minor fixes and cleanup

My working tree is a mess, so this is not a good commit. I'm making a
bit of a habit of this.

 - Fix UserLevel.OWNER check failing on single player servers.
 - Correctly handle the "open folder" fake command.
 - Some reshuffling of Forge-specific methods to make Fabric slightly
   easier.
This commit is contained in:
Jonathan Coates
2022-11-10 17:15:03 +00:00
parent 8360e8234d
commit b2b58892e3
17 changed files with 105 additions and 77 deletions

View File

@@ -52,14 +52,19 @@ public interface ComputerCraftAPIService {
@Nullable
IMount createResourceMount(String domain, String subPath);
// TODO(1.19.3): Make this take a MinecraftServer argument.
@Deprecated
void registerPeripheralProvider(IPeripheralProvider provider);
default void registerPeripheralProvider(IPeripheralProvider provider) {
throw new UnsupportedOperationException("Can only register peripheral provider on Forge");
}
void registerGenericSource(GenericSource source);
@Deprecated
void registerGenericCapability(Capability<?> capability);
default void registerGenericCapability(Capability<?> capability) {
throw new UnsupportedOperationException("Can only register Capability on Forge");
}
void registerBundledRedstoneProvider(IBundledRedstoneProvider provider);
@@ -76,7 +81,9 @@ public interface ComputerCraftAPIService {
IWiredNode createWiredNodeForElement(IWiredElement element);
LazyOptional<IWiredElement> getWiredElementAt(BlockGetter world, BlockPos pos, Direction side);
default LazyOptional<IWiredElement> getWiredElementAt(BlockGetter world, BlockPos pos, Direction side) {
throw new UnsupportedOperationException("Can only call getWiredElementAt on Forge");
}
void registerRefuelHandler(TurtleRefuelHandler handler);