1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-18 22:25:12 +00:00

Adds the ability to load custom bios.lua files from resource packs

Computer now delegates to IComputerEnvironment which, by default, looks
in the following locations:

 - Resouce pack files
 - The "debug" folder
 - The original ComputerCraft jar
This commit is contained in:
SquidDev
2017-07-14 21:50:51 +01:00
parent 94d701b1f7
commit c0294e1534
4 changed files with 98 additions and 3 deletions

View File

@@ -26,6 +26,8 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.Loader;
import java.io.InputStream;
public class ServerComputer extends ServerTerminal
implements IComputer, IComputerEnvironment, INetworkedThing
{
@@ -309,6 +311,12 @@ public class ServerComputer extends ServerTerminal
return ComputerCraftAPI.createResourceMount( ComputerCraft.class, domain, subPath );
}
@Override
public InputStream createResourceFile( String domain, String subPath )
{
return ComputerCraft.getResourceFile( ComputerCraft.class, domain, subPath );
}
@Override
public long getComputerSpaceLimit()
{