mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-15 22:17:39 +00:00
Compare commits
24 Commits
v1.18.2-1.
...
v1.16.5-1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aa89e51639 | ||
![]() |
7436447a6e | ||
![]() |
f629831b12 | ||
![]() |
f7fdb6e729 | ||
![]() |
db2616d1c0 | ||
![]() |
c0f982dc97 | ||
![]() |
2a9f35de5e | ||
![]() |
0fce3212a3 | ||
![]() |
652f954886 | ||
![]() |
6f65bad9af | ||
![]() |
e4dd4dbef0 | ||
![]() |
e1dffaa334 | ||
![]() |
d7305fb975 | ||
![]() |
9b3cadf57c | ||
![]() |
68f6fa9343 | ||
![]() |
58f2c0bd71 | ||
![]() |
b46ad62424 | ||
![]() |
12f2f854a6 | ||
![]() |
4078a2dcba | ||
![]() |
0ad12eeab6 | ||
![]() |
68a5081740 | ||
![]() |
5e701f73d6 | ||
![]() |
1d3ecb551d | ||
![]() |
aefda6a381 |
2
.github/workflows/main-ci.yml
vendored
2
.github/workflows/main-ci.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 8
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Setup Gradle
|
||||
|
2
.github/workflows/make-doc.yml
vendored
2
.github/workflows/make-doc.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
java-version: 8
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Setup Gradle
|
||||
|
@@ -43,10 +43,6 @@ minecraft {
|
||||
// configureEach would be better, but we need to eagerly configure configs or otherwise the run task doesn't
|
||||
// get set up properly.
|
||||
all {
|
||||
lazyToken("minecraft_classpath") {
|
||||
configurations["shade"].copyRecursive().resolve().joinToString(File.pathSeparator) { it.absolutePath }
|
||||
}
|
||||
|
||||
property("forge.logging.markers", "REGISTRIES")
|
||||
property("forge.logging.console.level", "debug")
|
||||
|
||||
@@ -79,24 +75,6 @@ minecraft {
|
||||
}
|
||||
|
||||
fun RunConfig.configureForGameTest() {
|
||||
val old = lazyTokens.get("minecraft_classpath")
|
||||
lazyToken("minecraft_classpath") {
|
||||
// We do some terrible hacks here to basically find all things not already on the runtime classpath
|
||||
// and add them. /Except/ for our source sets, as those need to load inside the Minecraft classpath.
|
||||
val testMod = configurations["testModRuntimeClasspath"].resolve()
|
||||
val implementation = configurations.runtimeClasspath.get().resolve()
|
||||
val new = (testMod - implementation)
|
||||
.asSequence()
|
||||
.filter { it.isFile && !it.name.endsWith("-test-fixtures.jar") }
|
||||
.map { it.absolutePath }
|
||||
.joinToString(File.pathSeparator)
|
||||
if (old == null) new else old.get() + File.pathSeparator + new
|
||||
}
|
||||
|
||||
property("cctest.sources", file("src/testMod/resources/data/cctest").absolutePath)
|
||||
|
||||
arg("--mixin.config=computercraft-gametest.mixins.json")
|
||||
|
||||
mods.register("cctest") {
|
||||
source(sourceSets["testMod"])
|
||||
source(sourceSets["testFixtures"])
|
||||
@@ -109,10 +87,12 @@ minecraft {
|
||||
configureForGameTest()
|
||||
}
|
||||
|
||||
val gameTestServer by registering {
|
||||
val testServer by registering {
|
||||
workingDirectory(file("run/testServer"))
|
||||
parent(server.get())
|
||||
configureForGameTest()
|
||||
|
||||
property("cctest.run", "true")
|
||||
property("forge.logging.console.level", "info")
|
||||
}
|
||||
}
|
||||
@@ -120,6 +100,7 @@ minecraft {
|
||||
mappings("parchment", "${libs.versions.parchmentMc.get()}-${libs.versions.parchment.get()}-$mcVersion")
|
||||
|
||||
accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))
|
||||
accessTransformer(file("src/testMod/resources/META-INF/accesstransformer.cfg"))
|
||||
}
|
||||
|
||||
mixin {
|
||||
@@ -139,14 +120,16 @@ configurations {
|
||||
|
||||
dependencies {
|
||||
minecraft("net.minecraftforge:forge:$mcVersion-${libs.versions.forge.get()}")
|
||||
annotationProcessor("org.spongepowered:mixin:0.8.5:processor")
|
||||
annotationProcessor("org.spongepowered:mixin:0.8.4:processor")
|
||||
|
||||
compileOnly(libs.jetbrainsAnnotations)
|
||||
annotationProcessorEverywhere(libs.autoService)
|
||||
|
||||
"extraModsCompileOnly"(fg.deobf("mezz.jei:jei-1.18.2:9.4.1.116:api"))
|
||||
"extraModsRuntimeOnly"(fg.deobf("mezz.jei:jei-1.18.2:9.4.1.116"))
|
||||
"extraModsCompileOnly"(fg.deobf("maven.modrinth:oculus:1.18.2-1.2.5"))
|
||||
"extraModsCompileOnly"(fg.deobf("mezz.jei:jei-1.16.5:7.7.0.104:api"))
|
||||
"extraModsRuntimeOnly"(fg.deobf("mezz.jei:jei-1.16.5:7.7.0.104"))
|
||||
|
||||
"extraModsCompileOnly"(fg.deobf("com.blamejared.crafttweaker:CraftTweaker-1.16.5:7.1.0.313"))
|
||||
"extraModsCompileOnly"(fg.deobf("commoble.morered:morered-1.16.5:2.1.1.0"))
|
||||
|
||||
"shade"(libs.cobalt)
|
||||
|
||||
@@ -168,7 +151,7 @@ illuaminate {
|
||||
|
||||
tasks.javadoc {
|
||||
include("dan200/computercraft/api/**/*.java")
|
||||
(options as StandardJavadocDocletOptions).links("https://docs.oracle.com/en/java/javase/17/docs/api/")
|
||||
(options as StandardJavadocDocletOptions).links("https://docs.oracle.com/javase/8/docs/api/")
|
||||
}
|
||||
|
||||
val apiJar by tasks.registering(Jar::class) {
|
||||
@@ -194,7 +177,7 @@ val luaJavadoc by tasks.registering(Javadoc::class) {
|
||||
|
||||
javadocTool.set(
|
||||
javaToolchains.javadocToolFor {
|
||||
languageVersion.set(cc.tweaked.gradle.CCTweakedPlugin.JAVA_VERSION)
|
||||
languageVersion.set(JavaLanguageVersion.of(11))
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -204,7 +187,7 @@ tasks.processResources {
|
||||
inputs.property("forgeVersion", libs.versions.forge.get())
|
||||
inputs.property("gitHash", cct.gitHash)
|
||||
|
||||
filesMatching("data/computercraft/lua/rom/help/credits.txt") {
|
||||
filesMatching("data/computercraft/lua/rom/help/credits.md") {
|
||||
expand(mapOf("gitContributors" to cct.gitContributors.get().joinToString("\n")))
|
||||
}
|
||||
|
||||
@@ -337,14 +320,25 @@ val lintLua by tasks.registering(IlluaminateExec::class) {
|
||||
doLast { if (System.getenv("GITHUB_ACTIONS") != null) println("::remove-matcher owner=illuaminate::") }
|
||||
}
|
||||
|
||||
val setupRunGametest by tasks.registering(Copy::class) {
|
||||
group = LifecycleBasePlugin.VERIFICATION_GROUP
|
||||
description = "Sets up the environment for the test server."
|
||||
|
||||
from("src/testMod/server-files") {
|
||||
include("eula.txt")
|
||||
include("server.properties")
|
||||
}
|
||||
into("run/testServer")
|
||||
}
|
||||
|
||||
val runGametest by tasks.registering(JavaExec::class) {
|
||||
group = LifecycleBasePlugin.VERIFICATION_GROUP
|
||||
description = "Runs tests on a temporary Minecraft instance."
|
||||
dependsOn("cleanRunGametest")
|
||||
dependsOn(setupRunGametest, "cleanRunGametest")
|
||||
|
||||
// Copy from runGameTestServer. We do it in this slightly odd way as runGameTestServer
|
||||
// Copy from runTestServer. We do it in this slightly odd way as runTestServer
|
||||
// isn't created until the task is configured (which is no good for us).
|
||||
val exec = tasks.getByName<JavaExec>("runGameTestServer")
|
||||
val exec = tasks.getByName<JavaExec>("runTestServer")
|
||||
dependsOn(exec.dependsOn)
|
||||
exec.copyToFull(this)
|
||||
}
|
||||
@@ -370,7 +364,7 @@ val publishCurseForge by tasks.registering(TaskPublishCurseForge::class) {
|
||||
apiToken = findProperty("curseForgeApiKey") ?: ""
|
||||
enabled = apiToken != ""
|
||||
|
||||
val mainFile = upload("282001", tasks.shadowJar)
|
||||
val mainFile = upload("282001", tasks.shadowJar.get().archiveFile)
|
||||
dependsOn(tasks.shadowJar) // Ughr.
|
||||
mainFile.changelog = "Release notes can be found on the [GitHub repository](https://github.com/cc-tweaked/CC-Tweaked/releases/tag/v$mcVersion-$modVersion)."
|
||||
mainFile.changelogType = "markdown"
|
||||
@@ -451,6 +445,8 @@ publishing {
|
||||
repositories {
|
||||
maven("https://squiddev.cc/maven") {
|
||||
name = "SquidDev"
|
||||
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,12 +26,12 @@ abstract class CCTweakedExtension(
|
||||
) {
|
||||
/** Get the hash of the latest git commit. */
|
||||
val gitHash: Provider<String> = gitProvider(project, "<no git hash>") {
|
||||
ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "HEAD")
|
||||
ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "HEAD").trim()
|
||||
}
|
||||
|
||||
/** Get the current git branch. */
|
||||
val gitBranch: Provider<String> = gitProvider(project, "<no git branch>") {
|
||||
ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "--abbrev-ref", "HEAD")
|
||||
ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "--abbrev-ref", "HEAD").trim()
|
||||
}
|
||||
|
||||
/** Get a list of all contributors to the project. */
|
||||
|
@@ -13,6 +13,6 @@ class CCTweakedPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
companion object {
|
||||
val JAVA_VERSION = JavaLanguageVersion.of(17)
|
||||
val JAVA_VERSION = JavaLanguageVersion.of(8)
|
||||
}
|
||||
}
|
||||
|
@@ -58,29 +58,20 @@
|
||||
<module name="SimplifyBooleanExpression" />
|
||||
<module name="SimplifyBooleanReturn" />
|
||||
<module name="StringLiteralEquality" />
|
||||
<module name="UnnecessaryParentheses">
|
||||
<!-- Default minus LAND. -->
|
||||
<property name="tokens" value="EXPR,IDENT,NUM_DOUBLE,NUM_FLOAT,NUM_INT,NUM_LONG,STRING_LITERAL,LITERAL_NULL,LITERAL_FALSE,LITERAL_TRUE,ASSIGN,BAND_ASSIGN,BOR_ASSIGN,BSR_ASSIGN,BXOR_ASSIGN,DIV_ASSIGN,MINUS_ASSIGN,MOD_ASSIGN,PLUS_ASSIGN,SL_ASSIGN,SR_ASSIGN,STAR_ASSIGN,LAMBDA,TEXT_BLOCK_LITERAL_BEGIN,LITERAL_INSTANCEOF,GT,LT,GE,LE,EQUAL,NOT_EQUAL,UNARY_MINUS,UNARY_PLUS,INC,DEC,LNOT,BNOT,POST_INC,POST_DEC" />
|
||||
</module>
|
||||
<module name="UnnecessaryParentheses" />
|
||||
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
|
||||
<module name="UnnecessarySemicolonInTryWithResources" />
|
||||
<module name="UnnecessarySemicolonInEnumeration" />
|
||||
|
||||
<!-- Imports -->
|
||||
<module name="CustomImportOrder">
|
||||
<property name="customImportOrderRules"
|
||||
value="THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"
|
||||
/>
|
||||
</module>
|
||||
<module name="CustomImportOrder" />
|
||||
<module name="IllegalImport" />
|
||||
<module name="RedundantImport" />
|
||||
<module name="UnusedImports" />
|
||||
|
||||
<!-- Javadoc -->
|
||||
<!-- TODO: Missing* checks for the dan200.computercraft.api package? -->
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
</module>
|
||||
<module name="AtclauseOrder" />
|
||||
<module name="InvalidJavadocPosition" />
|
||||
<module name="JavadocBlockTagLocation" />
|
||||
<module name="JavadocMethod"/>
|
||||
@@ -109,9 +100,7 @@
|
||||
<module name="LocalFinalVariableName" />
|
||||
<module name="LocalVariableName" />
|
||||
<module name="MemberName" />
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^(computercraft\$)?[a-z][a-zA-Z0-9]*$" />
|
||||
</module>
|
||||
<module name="MethodName" />
|
||||
<module name="MethodTypeParameterName" />
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^dan200\.computercraft(\.[a-z][a-z0-9]*)*" />
|
||||
@@ -119,6 +108,11 @@
|
||||
<module name="ParameterName" />
|
||||
<module name="StaticVariableName">
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*|CAPABILITY(_[A-Z_]+)?$" />
|
||||
<property name="applyToPrivate" value="false" />
|
||||
</module>
|
||||
<module name="StaticVariableName">
|
||||
<property name="format" value="^(s_)?[a-z][a-zA-Z0-9]*|CAPABILITY(_[A-Z_]+)?$" />
|
||||
<property name="applyToPrivate" value="true" />
|
||||
</module>
|
||||
<module name="TypeName" />
|
||||
|
||||
@@ -162,7 +156,6 @@
|
||||
<property name="allowEmptyLambdas" value="true" />
|
||||
<property name="allowEmptyMethods" value="true" />
|
||||
<property name="allowEmptyConstructors" value="true" />
|
||||
<property name="allowEmptyTypes" value="true" />
|
||||
|
||||
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAMBDA,LAND,LCURLY,LE,LITERAL_RETURN,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND" />
|
||||
</module>
|
||||
|
@@ -3,6 +3,6 @@ FROM gitpod/workspace-base
|
||||
USER gitpod
|
||||
|
||||
RUN sudo apt-get -q update \
|
||||
&& sudo apt-get install -yq openjdk-16-jdk python3-pip npm \
|
||||
&& sudo apt-get install -yq openjdk-8-jdk openjdk-16-jdk python3-pip npm \
|
||||
&& sudo pip3 install pre-commit \
|
||||
&& sudo update-java-alternatives --set java-1.16.0-openjdk-amd64
|
||||
&& sudo update-java-alternatives --set java-1.8.0-openjdk-amd64
|
||||
|
@@ -1,64 +0,0 @@
|
||||
--- @module fs
|
||||
|
||||
--- Returns true if a path is mounted to the parent filesystem.
|
||||
--
|
||||
-- The root filesystem "/" is considered a mount, along with disk folders and
|
||||
-- the rom folder. Other programs (such as network shares) can exstend this to
|
||||
-- make other mount types by correctly assigning their return value for getDrive.
|
||||
--
|
||||
-- @tparam string path The path to check.
|
||||
-- @treturn boolean If the path is mounted, rather than a normal file/folder.
|
||||
-- @throws If the path does not exist.
|
||||
-- @see getDrive
|
||||
-- @since 1.87.0
|
||||
function isDriveRoot(path) end
|
||||
|
||||
--[[- Provides completion for a file or directory name, suitable for use with
|
||||
@{_G.read}.
|
||||
|
||||
When a directory is a possible candidate for completion, two entries are
|
||||
included - one with a trailing slash (indicating that entries within this
|
||||
directory exist) and one without it (meaning this entry is an immediate
|
||||
completion candidate). `include_dirs` can be set to @{false} to only include
|
||||
those with a trailing slash.
|
||||
|
||||
@tparam[1] string path The path to complete.
|
||||
@tparam[1] string location The location where paths are resolved from.
|
||||
@tparam[1,opt=true] boolean include_files When @{false}, only directories will
|
||||
be included in the returned list.
|
||||
@tparam[1,opt=true] boolean include_dirs When @{false}, "raw" directories will
|
||||
not be included in the returned list.
|
||||
|
||||
@tparam[2] string path The path to complete.
|
||||
@tparam[2] string location The location where paths are resolved from.
|
||||
@tparam[2] {
|
||||
include_dirs? = boolean, include_files? = boolean,
|
||||
include_hidden? = boolean
|
||||
} options
|
||||
This table form is an expanded version of the previous syntax. The
|
||||
`include_files` and `include_dirs` arguments from above are passed in as fields.
|
||||
|
||||
This table also accepts the following options:
|
||||
- `include_hidden`: Whether to include hidden files (those starting with `.`)
|
||||
by default. They will still be shown when typing a `.`.
|
||||
|
||||
@treturn { string... } A list of possible completion candidates.
|
||||
@since 1.74
|
||||
@changed 1.101.0
|
||||
@usage Complete files in the root directory.
|
||||
|
||||
read(nil, nil, function(str)
|
||||
return fs.complete(str, "", true, false)
|
||||
end)
|
||||
|
||||
@usage Complete files in the root directory, hiding hidden files by default.
|
||||
|
||||
read(nil, nil, function(str)
|
||||
return fs.complete(str, "", {
|
||||
include_files = true,
|
||||
include_dirs = false,
|
||||
included_hidden = false,
|
||||
})
|
||||
end)
|
||||
]]
|
||||
function complete(path, location, include_files, include_dirs) end
|
@@ -1,177 +0,0 @@
|
||||
--- Make HTTP requests, sending and receiving data to a remote web server.
|
||||
--
|
||||
-- @module http
|
||||
-- @since 1.1
|
||||
-- @see local_ips To allow accessing servers running on your local network.
|
||||
|
||||
--- Asynchronously make a HTTP request to the given url.
|
||||
--
|
||||
-- This returns immediately, a @{http_success} or @{http_failure} will be queued
|
||||
-- once the request has completed.
|
||||
--
|
||||
-- @tparam string url The url to request
|
||||
-- @tparam[opt] string body An optional string containing the body of the
|
||||
-- request. If specified, a `POST` request will be made instead.
|
||||
-- @tparam[opt] { [string] = string } headers Additional headers to send as part
|
||||
-- of this request.
|
||||
-- @tparam[opt] boolean binary Whether to make a binary HTTP request. If true,
|
||||
-- the body will not be UTF-8 encoded, and the received response will not be
|
||||
-- decoded.
|
||||
--
|
||||
-- @tparam[2] {
|
||||
-- url = string, body? = string, headers? = { [string] = string },
|
||||
-- binary? = boolean, method? = string, redirect? = boolean,
|
||||
-- } request Options for the request.
|
||||
--
|
||||
-- This table form is an expanded version of the previous syntax. All arguments
|
||||
-- from above are passed in as fields instead (for instance,
|
||||
-- `http.request("https://example.com")` becomes `http.request { url =
|
||||
-- "https://example.com" }`).
|
||||
--
|
||||
-- This table also accepts several additional options:
|
||||
--
|
||||
-- - `method`: Which HTTP method to use, for instance `"PATCH"` or `"DELETE"`.
|
||||
-- - `redirect`: Whether to follow HTTP redirects. Defaults to true.
|
||||
--
|
||||
-- @see http.get For a synchronous way to make GET requests.
|
||||
-- @see http.post For a synchronous way to make POST requests.
|
||||
--
|
||||
-- @changed 1.63 Added argument for headers.
|
||||
-- @changed 1.80pr1 Added argument for binary handles.
|
||||
-- @changed 1.80pr1.6 Added support for table argument.
|
||||
-- @changed 1.86.0 Added PATCH and TRACE methods.
|
||||
function request(...) end
|
||||
|
||||
--- Make a HTTP GET request to the given url.
|
||||
--
|
||||
-- @tparam string url The url to request
|
||||
-- @tparam[opt] { [string] = string } headers Additional headers to send as part
|
||||
-- of this request.
|
||||
-- @tparam[opt] boolean binary Whether to make a binary HTTP request. If true,
|
||||
-- the body will not be UTF-8 encoded, and the received response will not be
|
||||
-- decoded.
|
||||
--
|
||||
-- @tparam[2] {
|
||||
-- url = string, headers? = { [string] = string },
|
||||
-- binary? = boolean, method? = string, redirect? = boolean,
|
||||
-- } request Options for the request. See @{http.request} for details on how
|
||||
-- these options behave.
|
||||
--
|
||||
-- @treturn Response The resulting http response, which can be read from.
|
||||
-- @treturn[2] nil When the http request failed, such as in the event of a 404
|
||||
-- error or connection timeout.
|
||||
-- @treturn string A message detailing why the request failed.
|
||||
-- @treturn Response|nil The failing http response, if available.
|
||||
--
|
||||
-- @changed 1.63 Added argument for headers.
|
||||
-- @changed 1.80pr1 Response handles are now returned on error if available.
|
||||
-- @changed 1.80pr1 Added argument for binary handles.
|
||||
-- @changed 1.80pr1.6 Added support for table argument.
|
||||
-- @changed 1.86.0 Added PATCH and TRACE methods.
|
||||
--
|
||||
-- @usage Make a request to [example.tweaked.cc](https://example.tweaked.cc),
|
||||
-- and print the returned page.
|
||||
-- ```lua
|
||||
-- local request = http.get("https://example.tweaked.cc")
|
||||
-- print(request.readAll())
|
||||
-- -- => HTTP is working!
|
||||
-- request.close()
|
||||
-- ```
|
||||
function get(...) end
|
||||
|
||||
--- Make a HTTP POST request to the given url.
|
||||
--
|
||||
-- @tparam string url The url to request
|
||||
-- @tparam string body The body of the POST request.
|
||||
-- @tparam[opt] { [string] = string } headers Additional headers to send as part
|
||||
-- of this request.
|
||||
-- @tparam[opt] boolean binary Whether to make a binary HTTP request. If true,
|
||||
-- the body will not be UTF-8 encoded, and the received response will not be
|
||||
-- decoded.
|
||||
--
|
||||
-- @tparam[2] {
|
||||
-- url = string, body? = string, headers? = { [string] = string },
|
||||
-- binary? = boolean, method? = string, redirect? = boolean,
|
||||
-- } request Options for the request. See @{http.request} for details on how
|
||||
-- these options behave.
|
||||
--
|
||||
-- @treturn Response The resulting http response, which can be read from.
|
||||
-- @treturn[2] nil When the http request failed, such as in the event of a 404
|
||||
-- error or connection timeout.
|
||||
-- @treturn string A message detailing why the request failed.
|
||||
-- @treturn Response|nil The failing http response, if available.
|
||||
--
|
||||
-- @since 1.31
|
||||
-- @changed 1.63 Added argument for headers.
|
||||
-- @changed 1.80pr1 Response handles are now returned on error if available.
|
||||
-- @changed 1.80pr1 Added argument for binary handles.
|
||||
-- @changed 1.80pr1.6 Added support for table argument.
|
||||
-- @changed 1.86.0 Added PATCH and TRACE methods.
|
||||
function post(...) end
|
||||
|
||||
--- Asynchronously determine whether a URL can be requested.
|
||||
--
|
||||
-- If this returns `true`, one should also listen for @{http_check} which will
|
||||
-- container further information about whether the URL is allowed or not.
|
||||
--
|
||||
-- @tparam string url The URL to check.
|
||||
-- @treturn true When this url is not invalid. This does not imply that it is
|
||||
-- allowed - see the comment above.
|
||||
-- @treturn[2] false When this url is invalid.
|
||||
-- @treturn string A reason why this URL is not valid (for instance, if it is
|
||||
-- malformed, or blocked).
|
||||
--
|
||||
-- @see http.checkURL For a synchronous version.
|
||||
function checkURLAsync(url) end
|
||||
|
||||
--- Determine whether a URL can be requested.
|
||||
--
|
||||
-- If this returns `true`, one should also listen for @{http_check} which will
|
||||
-- container further information about whether the URL is allowed or not.
|
||||
--
|
||||
-- @tparam string url The URL to check.
|
||||
-- @treturn true When this url is valid and can be requested via @{http.request}.
|
||||
-- @treturn[2] false When this url is invalid.
|
||||
-- @treturn string A reason why this URL is not valid (for instance, if it is
|
||||
-- malformed, or blocked).
|
||||
--
|
||||
-- @see http.checkURLAsync For an asynchronous version.
|
||||
--
|
||||
-- @usage
|
||||
-- ```lua
|
||||
-- print(http.checkURL("https://example.tweaked.cc/"))
|
||||
-- -- => true
|
||||
-- print(http.checkURL("http://localhost/"))
|
||||
-- -- => false Domain not permitted
|
||||
-- print(http.checkURL("not a url"))
|
||||
-- -- => false URL malformed
|
||||
-- ```
|
||||
function checkURL(url) end
|
||||
|
||||
--- Open a websocket.
|
||||
--
|
||||
-- @tparam string url The websocket url to connect to. This should have the
|
||||
-- `ws://` or `wss://` protocol.
|
||||
-- @tparam[opt] { [string] = string } headers Additional headers to send as part
|
||||
-- of the initial websocket connection.
|
||||
--
|
||||
-- @treturn Websocket The websocket connection.
|
||||
-- @treturn[2] false If the websocket connection failed.
|
||||
-- @treturn string An error message describing why the connection failed.
|
||||
-- @since 1.80pr1.1
|
||||
-- @changed 1.80pr1.3 No longer asynchronous.
|
||||
-- @changed 1.95.3 Added User-Agent to default headers.
|
||||
function websocket(url, headers) end
|
||||
|
||||
--- Asynchronously open a websocket.
|
||||
--
|
||||
-- This returns immediately, a @{websocket_success} or @{websocket_failure}
|
||||
-- will be queued once the request has completed.
|
||||
--
|
||||
-- @tparam string url The websocket url to connect to. This should have the
|
||||
-- `ws://` or `wss://` protocol.
|
||||
-- @tparam[opt] { [string] = string } headers Additional headers to send as part
|
||||
-- of the initial websocket connection.
|
||||
-- @since 1.80pr1.3
|
||||
-- @changed 1.95.3 Added User-Agent to default headers.
|
||||
function websocketAsync(url, headers) end
|
@@ -5,7 +5,7 @@ kotlin.stdlib.default.dependency=false
|
||||
kotlin.jvm.target.validation.mode=error
|
||||
|
||||
# Mod properties
|
||||
modVersion=1.101.0
|
||||
modVersion=1.101.3
|
||||
|
||||
# Minecraft properties: We want to configure this here so we can read it in settings.gradle
|
||||
mcVersion=1.18.2
|
||||
mcVersion=1.16.5
|
||||
|
@@ -2,12 +2,12 @@
|
||||
|
||||
# Minecraft
|
||||
# MC version is specified in gradle.properties, as we need that in settings.gradle.
|
||||
forge = "40.1.0"
|
||||
parchment = "2022.03.13"
|
||||
parchmentMc = "1.18.2"
|
||||
forge = "36.2.34"
|
||||
parchment = "2021.08.08"
|
||||
parchmentMc = "1.16.5"
|
||||
|
||||
autoService = "1.0.1"
|
||||
cobalt = { strictly = "[0.5.8,0.6.0)", prefer = "0.5.8" }
|
||||
cobalt = "0.6.0"
|
||||
jetbrainsAnnotations = "23.0.0"
|
||||
kotlin = "1.7.10"
|
||||
kotlin-coroutines = "1.6.0"
|
||||
@@ -19,11 +19,11 @@ junit = "5.9.1"
|
||||
|
||||
# Build tools
|
||||
cctJavadoc = "1.5.2"
|
||||
checkstyle = "10.3.4"
|
||||
checkstyle = "8.25" # There's a reason we're pinned on an ancient version, but I can't remember what it is.
|
||||
curseForgeGradle = "1.0.11"
|
||||
forgeGradle = "5.1.+"
|
||||
githubRelease = "2.2.12"
|
||||
illuaminate = "0.1.0-7-g2a5a89c"
|
||||
illuaminate = "0.1.0-20-g8c483a4"
|
||||
librarian = "1.+"
|
||||
minotaur = "2.+"
|
||||
mixinGradle = "0.7.+"
|
||||
|
@@ -111,6 +111,6 @@
|
||||
(lint
|
||||
(globals
|
||||
:max sleep write
|
||||
cct_test describe expect howlci fail it pending stub)))
|
||||
cct_test describe expect howlci fail it pending stub before_each)))
|
||||
|
||||
(at /src/web/mount/expr_template.lua (lint (globals :max __expr__)))
|
||||
|
@@ -3,8 +3,8 @@
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{"up": "true", "north": "false", "west": "false", "south": "false", "east": "false", "cable": "true"},
|
||||
{"north": "false", "west": "false", "south": "false", "east": "false", "down": "true", "cable": "true"}
|
||||
{"east": "false", "north": "false", "south": "false", "cable": "true", "up": "true", "west": "false"},
|
||||
{"down": "true", "east": "false", "north": "false", "south": "false", "cable": "true", "west": "false"}
|
||||
]
|
||||
},
|
||||
"apply": {"model": "computercraft:block/cable_core_facing", "x": 90}
|
||||
@@ -13,16 +13,16 @@
|
||||
"when": {
|
||||
"OR": [
|
||||
{
|
||||
"up": "false",
|
||||
"north": "false",
|
||||
"west": "false",
|
||||
"south": "false",
|
||||
"east": "false",
|
||||
"down": "false",
|
||||
"cable": "true"
|
||||
"east": "false",
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"cable": "true",
|
||||
"up": "false",
|
||||
"west": "false"
|
||||
},
|
||||
{"up": "false", "west": "false", "north": "true", "east": "false", "down": "false", "cable": "true"},
|
||||
{"up": "false", "west": "false", "south": "true", "east": "false", "down": "false", "cable": "true"}
|
||||
{"down": "false", "east": "false", "north": "true", "cable": "true", "up": "false", "west": "false"},
|
||||
{"down": "false", "east": "false", "south": "true", "cable": "true", "up": "false", "west": "false"}
|
||||
]
|
||||
},
|
||||
"apply": {"model": "computercraft:block/cable_core_facing", "y": 0}
|
||||
@@ -30,8 +30,8 @@
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{"up": "false", "north": "false", "south": "false", "east": "true", "down": "false", "cable": "true"},
|
||||
{"up": "false", "north": "false", "west": "true", "south": "false", "down": "false", "cable": "true"}
|
||||
{"down": "false", "east": "true", "north": "false", "south": "false", "cable": "true", "up": "false"},
|
||||
{"down": "false", "north": "false", "south": "false", "cable": "true", "up": "false", "west": "true"}
|
||||
]
|
||||
},
|
||||
"apply": {"model": "computercraft:block/cable_core_facing", "y": 90}
|
||||
@@ -39,18 +39,18 @@
|
||||
{
|
||||
"when": {
|
||||
"OR": [
|
||||
{"north": "true", "down": "true", "cable": "true"},
|
||||
{"south": "true", "down": "true", "cable": "true"},
|
||||
{"west": "true", "down": "true", "cable": "true"},
|
||||
{"east": "true", "down": "true", "cable": "true"},
|
||||
{"up": "true", "north": "true", "cable": "true"},
|
||||
{"up": "true", "south": "true", "cable": "true"},
|
||||
{"up": "true", "west": "true", "cable": "true"},
|
||||
{"up": "true", "east": "true", "cable": "true"},
|
||||
{"north": "true", "west": "true", "cable": "true"},
|
||||
{"north": "true", "east": "true", "cable": "true"},
|
||||
{"west": "true", "south": "true", "cable": "true"},
|
||||
{"south": "true", "east": "true", "cable": "true"}
|
||||
{"down": "true", "north": "true", "cable": "true"},
|
||||
{"down": "true", "south": "true", "cable": "true"},
|
||||
{"down": "true", "cable": "true", "west": "true"},
|
||||
{"down": "true", "east": "true", "cable": "true"},
|
||||
{"north": "true", "cable": "true", "up": "true"},
|
||||
{"south": "true", "cable": "true", "up": "true"},
|
||||
{"cable": "true", "up": "true", "west": "true"},
|
||||
{"east": "true", "cable": "true", "up": "true"},
|
||||
{"north": "true", "cable": "true", "west": "true"},
|
||||
{"east": "true", "north": "true", "cable": "true"},
|
||||
{"south": "true", "cable": "true", "west": "true"},
|
||||
{"east": "true", "south": "true", "cable": "true"}
|
||||
]
|
||||
},
|
||||
"apply": {"model": "computercraft:block/cable_core_any"}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"minecraft:redstone"
|
||||
]
|
||||
"item": "minecraft:redstone"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:gold_ingot"
|
||||
]
|
||||
"item": "minecraft:gold_ingot"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:computer_normal"
|
||||
]
|
||||
"item": "computercraft:computer_normal"
|
||||
},
|
||||
{
|
||||
"tag": "forge:ingots/gold"
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"minecraft:command_block"
|
||||
]
|
||||
"item": "minecraft:command_block"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:disk_drive"
|
||||
]
|
||||
"item": "computercraft:disk_drive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_advanced"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:speaker"
|
||||
]
|
||||
"item": "computercraft:speaker"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_advanced"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_advanced"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_advanced"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_advanced"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_normal"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -21,9 +21,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"minecraft:golden_apple"
|
||||
]
|
||||
"item": "minecraft:golden_apple"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_normal"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_normal"
|
||||
},
|
||||
{
|
||||
"tag": "forge:ingots/gold"
|
||||
|
@@ -21,9 +21,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"minecraft:golden_apple"
|
||||
]
|
||||
"item": "minecraft:golden_apple"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_normal"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:speaker"
|
||||
]
|
||||
"item": "computercraft:speaker"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_normal"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_advanced"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_advanced"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:pocket_computer_normal"
|
||||
]
|
||||
"item": "computercraft:pocket_computer_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_normal"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:printer"
|
||||
]
|
||||
"item": "computercraft:printer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:printer"
|
||||
]
|
||||
"item": "computercraft:printer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:computer_normal"
|
||||
]
|
||||
"item": "computercraft:computer_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:speaker"
|
||||
]
|
||||
"item": "computercraft:speaker"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_advanced"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_advanced"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_normal"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:crafting_table"
|
||||
]
|
||||
"item": "minecraft:crafting_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_axe"
|
||||
]
|
||||
"item": "minecraft:diamond_axe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_hoe"
|
||||
]
|
||||
"item": "minecraft:diamond_hoe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_pickaxe"
|
||||
]
|
||||
"item": "minecraft:diamond_pickaxe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_shovel"
|
||||
]
|
||||
"item": "minecraft:diamond_shovel"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_advanced"
|
||||
]
|
||||
"item": "computercraft:turtle_advanced"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_sword"
|
||||
]
|
||||
"item": "minecraft:diamond_sword"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"tag": "forge:ingots/gold"
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:computer_normal"
|
||||
]
|
||||
"item": "computercraft:computer_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:speaker"
|
||||
]
|
||||
"item": "computercraft:speaker"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_advanced"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_advanced"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_normal"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:crafting_table"
|
||||
]
|
||||
"item": "minecraft:crafting_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_axe"
|
||||
]
|
||||
"item": "minecraft:diamond_axe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_hoe"
|
||||
]
|
||||
"item": "minecraft:diamond_hoe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_pickaxe"
|
||||
]
|
||||
"item": "minecraft:diamond_pickaxe"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_shovel"
|
||||
]
|
||||
"item": "minecraft:diamond_shovel"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,14 +11,10 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:turtle_normal"
|
||||
]
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
{
|
||||
"items": [
|
||||
"minecraft:diamond_sword"
|
||||
]
|
||||
"item": "minecraft:diamond_sword"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -21,9 +21,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:cable"
|
||||
]
|
||||
"item": "computercraft:cable"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -21,9 +21,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:wireless_modem_normal"
|
||||
]
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:monitor_normal"
|
||||
]
|
||||
"item": "computercraft:monitor_normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -11,9 +11,7 @@
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
"computercraft:computer_advanced"
|
||||
]
|
||||
"item": "computercraft:computer_advanced"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:speaker",
|
||||
"item": "computercraft:speaker"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:wireless_modem_advanced",
|
||||
"item": "computercraft:wireless_modem_advanced"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:wireless_modem_normal",
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:speaker",
|
||||
"item": "computercraft:speaker"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:wireless_modem_advanced",
|
||||
"item": "computercraft:wireless_modem_advanced"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:wireless_modem_normal",
|
||||
"item": "computercraft:wireless_modem_normal"
|
||||
}
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
@@ -24,8 +23,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:dynamic",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:dynamic",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:dynamic",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:dynamic",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:dynamic",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -2,8 +2,7 @@
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
|
@@ -10,7 +10,7 @@
|
||||
"tag": "forge:ingots/gold"
|
||||
},
|
||||
"C": {
|
||||
"item": "computercraft:computer_advanced"
|
||||
"item": "computercraft:computer_normal"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
@@ -10,7 +10,7 @@
|
||||
"tag": "forge:ingots/gold"
|
||||
},
|
||||
"C": {
|
||||
"item": "computercraft:computer_advanced"
|
||||
"item": "computercraft:turtle_normal"
|
||||
},
|
||||
"B": {
|
||||
"tag": "forge:storage_blocks/gold"
|
||||
|
@@ -2,7 +2,6 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:crops",
|
||||
"#minecraft:mineable/hoe",
|
||||
"minecraft:cactus",
|
||||
"minecraft:melon",
|
||||
"minecraft:pumpkin",
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:mineable/shovel",
|
||||
"minecraft:melon",
|
||||
"minecraft:pumpkin",
|
||||
"minecraft:carved_pumpkin",
|
||||
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:workbench",
|
||||
"item": "minecraft:crafting_table"
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:tool",
|
||||
"item": "minecraft:diamond_axe",
|
||||
"damageMultiplier": 6.0
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:tool",
|
||||
"item": "minecraft:diamond_hoe",
|
||||
"breakable": "computercraft:turtle_hoe_harvestable"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:tool",
|
||||
"item": "minecraft:diamond_pickaxe"
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:tool",
|
||||
"item": "minecraft:diamond_shovel",
|
||||
"breakable": "computercraft:turtle_shovel_harvestable"
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"type": "computercraft:tool",
|
||||
"item": "minecraft:diamond_sword",
|
||||
"damageMultiplier": 9.0,
|
||||
"breakable": "computercraft:turtle_sword_harvestable"
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"computercraft:computer_normal",
|
||||
"computercraft:computer_advanced",
|
||||
"computercraft:turtle_normal",
|
||||
"computercraft:turtle_advanced",
|
||||
"computercraft:speaker",
|
||||
"computercraft:disk_drive",
|
||||
"computercraft:printer",
|
||||
"computercraft:monitor_normal",
|
||||
"computercraft:monitor_advanced",
|
||||
"computercraft:wireless_modem_normal",
|
||||
"computercraft:wireless_modem_advanced",
|
||||
"computercraft:wired_modem_full",
|
||||
"computercraft:cable"
|
||||
]
|
||||
}
|
@@ -5,17 +5,20 @@
|
||||
*/
|
||||
package dan200.computercraft;
|
||||
|
||||
import dan200.computercraft.api.turtle.event.TurtleAction;
|
||||
import dan200.computercraft.core.apis.http.options.Action;
|
||||
import dan200.computercraft.core.apis.http.options.AddressRule;
|
||||
import dan200.computercraft.shared.Config;
|
||||
import dan200.computercraft.shared.Registry;
|
||||
import dan200.computercraft.shared.peripheral.monitor.MonitorRenderer;
|
||||
import dan200.computercraft.shared.pocket.peripherals.PocketModem;
|
||||
import dan200.computercraft.shared.pocket.peripherals.PocketSpeaker;
|
||||
import dan200.computercraft.shared.turtle.upgrades.*;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.OptionalInt;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Mod( ComputerCraft.MOD_ID )
|
||||
@@ -37,10 +40,10 @@ public final class ComputerCraft
|
||||
|
||||
public static boolean httpEnabled = true;
|
||||
public static boolean httpWebsocketEnabled = true;
|
||||
public static List<AddressRule> httpRules = List.of(
|
||||
public static List<AddressRule> httpRules = Collections.unmodifiableList( Arrays.asList(
|
||||
AddressRule.parse( "$private", OptionalInt.empty(), Action.DENY.toPartial() ),
|
||||
AddressRule.parse( "*", OptionalInt.empty(), Action.ALLOW.toPartial() )
|
||||
);
|
||||
) );
|
||||
|
||||
public static int httpMaxRequests = 16;
|
||||
public static int httpMaxWebsockets = 4;
|
||||
@@ -54,7 +57,7 @@ public final class ComputerCraft
|
||||
public static int modemHighAltitudeRangeDuringStorm = 384;
|
||||
public static int maxNotesPerTick = 8;
|
||||
public static MonitorRenderer monitorRenderer = MonitorRenderer.BEST;
|
||||
public static int monitorDistance = 65;
|
||||
public static double monitorDistanceSq = 4096;
|
||||
public static long monitorBandwidth = 1_000_000;
|
||||
|
||||
public static boolean turtlesNeedFuel = true;
|
||||
@@ -62,6 +65,7 @@ public final class ComputerCraft
|
||||
public static int advancedTurtleFuelLimit = 100000;
|
||||
public static boolean turtlesObeyBlockProtection = true;
|
||||
public static boolean turtlesCanPush = true;
|
||||
public static EnumSet<TurtleAction> turtleDisabledActions = EnumSet.noneOf( TurtleAction.class );
|
||||
|
||||
public static int computerTermWidth = 51;
|
||||
public static int computerTermHeight = 19;
|
||||
@@ -77,7 +81,28 @@ public final class ComputerCraft
|
||||
|
||||
public static int uploadNagDelay = 5;
|
||||
|
||||
public static final Logger log = LoggerFactory.getLogger( MOD_ID );
|
||||
public static final class TurtleUpgrades
|
||||
{
|
||||
public static TurtleModem wirelessModemNormal;
|
||||
public static TurtleModem wirelessModemAdvanced;
|
||||
public static TurtleSpeaker speaker;
|
||||
|
||||
public static TurtleCraftingTable craftingTable;
|
||||
public static TurtleSword diamondSword;
|
||||
public static TurtleShovel diamondShovel;
|
||||
public static TurtleTool diamondPickaxe;
|
||||
public static TurtleAxe diamondAxe;
|
||||
public static TurtleHoe diamondHoe;
|
||||
}
|
||||
|
||||
public static final class PocketUpgrades
|
||||
{
|
||||
public static PocketModem wirelessModemNormal;
|
||||
public static PocketModem wirelessModemAdvanced;
|
||||
public static PocketSpeaker speaker;
|
||||
}
|
||||
|
||||
public static final Logger log = LogManager.getLogger( MOD_ID );
|
||||
|
||||
public ComputerCraft()
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user