From abd06133fbd2dab5a95f5e5b093bab08c1d9b992 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Thu, 7 Dec 2017 09:24:44 +0000 Subject: [PATCH] More binary compatibility stubs for ILuaAPI --- .../java/dan200/computercraft/core/computer/Computer.java | 5 +++++ .../computercraft/shared/computer/core/ServerComputer.java | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/dan200/computercraft/core/computer/Computer.java b/src/main/java/dan200/computercraft/core/computer/Computer.java index 1c5ed5abfb..d62ee2be07 100644 --- a/src/main/java/dan200/computercraft/core/computer/Computer.java +++ b/src/main/java/dan200/computercraft/core/computer/Computer.java @@ -666,6 +666,11 @@ public void addAPI( ILuaAPI api ) { m_apis.add( api ); } + + public void addAPI( dan200.computercraft.core.apis.ILuaAPI api ) + { + addAPI( (ILuaAPI) api ); + } public void setPeripheral( int side, IPeripheral peripheral ) { diff --git a/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java b/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java index 322f9d818d..1fcf965c1c 100644 --- a/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java +++ b/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java @@ -10,9 +10,9 @@ import dan200.computercraft.api.ComputerCraftAPI; import dan200.computercraft.api.filesystem.IMount; import dan200.computercraft.api.filesystem.IWritableMount; +import dan200.computercraft.api.lua.ILuaAPI; import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.core.apis.IAPIEnvironment; -import dan200.computercraft.api.lua.ILuaAPI; import dan200.computercraft.core.computer.Computer; import dan200.computercraft.core.computer.IComputerEnvironment; import dan200.computercraft.shared.common.ServerTerminal; @@ -313,6 +313,11 @@ public void addAPI( ILuaAPI api ) m_computer.addAPI( api ); } + public void addAPI( dan200.computercraft.core.apis.ILuaAPI api ) + { + m_computer.addAPI( api ); + } + public void setPeripheral( int side, IPeripheral peripheral ) { m_computer.setPeripheral( side, peripheral );