From 2728c635127f88bbba38321d13281f3eb26ff9ce Mon Sep 17 00:00:00 2001 From: SquidDev Date: Thu, 7 Dec 2017 09:06:47 +0000 Subject: [PATCH] Add back ILuaAPI This ensures binary compatibility with all those evil mods (Plethora) which CC internals. --- .../dan200/computercraft/core/apis/ILuaAPI.java | 16 ++++++++++++++++ .../computercraft/core/computer/Computer.java | 1 + 2 files changed, 17 insertions(+) create mode 100644 src/main/java/dan200/computercraft/core/apis/ILuaAPI.java diff --git a/src/main/java/dan200/computercraft/core/apis/ILuaAPI.java b/src/main/java/dan200/computercraft/core/apis/ILuaAPI.java new file mode 100644 index 000000000..577b7a4e5 --- /dev/null +++ b/src/main/java/dan200/computercraft/core/apis/ILuaAPI.java @@ -0,0 +1,16 @@ +package dan200.computercraft.core.apis; + +/** + * This exists purely to ensure binary compatibility. + * + * @see dan200.computercraft.api.lua.ILuaAPI + */ +public interface ILuaAPI extends dan200.computercraft.api.lua.ILuaAPI +{ + void advance( double v ); + + default void update() + { + advance( 0.05 ); + } +} diff --git a/src/main/java/dan200/computercraft/core/computer/Computer.java b/src/main/java/dan200/computercraft/core/computer/Computer.java index 9e87abe92..1c5ed5abf 100644 --- a/src/main/java/dan200/computercraft/core/computer/Computer.java +++ b/src/main/java/dan200/computercraft/core/computer/Computer.java @@ -12,6 +12,7 @@ import dan200.computercraft.api.filesystem.IFileSystem; import dan200.computercraft.api.filesystem.IMount; import dan200.computercraft.api.filesystem.IWritableMount; import dan200.computercraft.api.lua.*; +import dan200.computercraft.api.lua.ILuaAPI; import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.core.apis.*; import dan200.computercraft.core.filesystem.FileSystem;