diff --git a/gradle.properties b/gradle.properties index 47bee8482..d728c1e8f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G # Mod properties -mod_version=1.91.1 +mod_version=1.91.2 # Minecraft properties mc_version=1.16.2 diff --git a/src/main/java/dan200/computercraft/ComputerCraft.java b/src/main/java/dan200/computercraft/ComputerCraft.java index 5a573d5a7..e2a966858 100644 --- a/src/main/java/dan200/computercraft/ComputerCraft.java +++ b/src/main/java/dan200/computercraft/ComputerCraft.java @@ -72,6 +72,7 @@ public final class ComputerCraft implements ModInitializer { "172.16.0.0/12", "192.168.0.0/16", "fd00::/8", + "0.0.0.0/8" }; public static final int terminalWidth_computer = 51; public static final int terminalHeight_computer = 19; diff --git a/src/main/java/dan200/computercraft/core/filesystem/FileSystemWrapperMount.java b/src/main/java/dan200/computercraft/core/filesystem/FileSystemWrapperMount.java index b8ec4ddce..b68edf971 100644 --- a/src/main/java/dan200/computercraft/core/filesystem/FileSystemWrapperMount.java +++ b/src/main/java/dan200/computercraft/core/filesystem/FileSystemWrapperMount.java @@ -106,7 +106,7 @@ public class FileSystemWrapperMount implements IFileSystem { @Override public boolean isDirectory(@Nonnull String path) throws IOException { try { - return this.m_filesystem.exists(path); + return this.m_filesystem.isDir(path); } catch (FileSystemException e) { throw new IOException(e.getMessage()); } diff --git a/src/main/java/dan200/computercraft/shared/util/DropConsumer.java b/src/main/java/dan200/computercraft/shared/util/DropConsumer.java index d70b2543d..ffca60fc3 100644 --- a/src/main/java/dan200/computercraft/shared/util/DropConsumer.java +++ b/src/main/java/dan200/computercraft/shared/util/DropConsumer.java @@ -36,7 +36,7 @@ public final class DropConsumer { dropPos = null; dropBounds = new Box(entity.getBlockPos()).expand(2, 2, 2); - // entity.captureDrops( new ArrayList<>() ); + // entity.getScale().captureDrops( new ArrayList<>() ); } public static void set(World world, BlockPos pos, Function consumer) { diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/motd.lua b/src/main/resources/assets/computercraft/lua/rom/programs/motd.lua index 317938b31..57ab7b916 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/motd.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/motd.lua @@ -1,15 +1,24 @@ -local tMotd = {} +local date = os.date("*t") +if date.month == 1 and date.day == 1 then + print("Happy new year!") +elseif date.month == 12 and date.day == 24 then + print("Merry X-mas!") +elseif date.month == 10 and date.day == 31 then + print("OOoooOOOoooo! Spooky!") +else + local tMotd = {} -for sPath in string.gmatch(settings.get( "motd.path" ), "[^:]+") do - if fs.exists(sPath) then - for sLine in io.lines(sPath) do - table.insert(tMotd,sLine) + for sPath in string.gmatch(settings.get("motd.path"), "[^:]+") do + if fs.exists(sPath) then + for sLine in io.lines(sPath) do + table.insert(tMotd, sLine) + end end end -end -if #tMotd == 0 then - print("missingno") -else - print(tMotd[math.random(1,#tMotd)]) + if #tMotd == 0 then + print("missingno") + else + print(tMotd[math.random(1, #tMotd)]) + end end