mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Merge branch 'VolmitSoftware:master' into jigsaw_placement_fix
This commit is contained in:
commit
d5f74631cd
113
build.gradle
113
build.gradle
@ -36,7 +36,7 @@ registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/s
|
|||||||
registerCustomOutputTask('Coco', 'D://mcsm/plugins')
|
registerCustomOutputTask('Coco', 'D://mcsm/plugins')
|
||||||
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins')
|
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins')
|
||||||
registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19.4/plugins')
|
registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19.4/plugins')
|
||||||
registerCustomOutputTask('CrazyDev22', 'v1_20_R2', 'C://Users/Julian/Desktop/server/plugins')
|
registerCustomOutputTask('CrazyDev22', 'C://Users/Julian/Desktop/server/plugins')
|
||||||
registerCustomOutputTask('Pixel', 'C://Users/repix/Iris Dimension Engine/1.20.1 - Iris Coding/plugins')
|
registerCustomOutputTask('Pixel', 'C://Users/repix/Iris Dimension Engine/1.20.1 - Iris Coding/plugins')
|
||||||
// ========================== UNIX ==============================
|
// ========================== UNIX ==============================
|
||||||
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
|
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
|
||||||
@ -58,14 +58,12 @@ NMS_BINDINGS.each {
|
|||||||
project(":nms:${key}") {
|
project(":nms:${key}") {
|
||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'de.undercouch.download'
|
apply plugin: 'de.undercouch.download'
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
compileOnly "org.spigotmc:spigot-api:${value}"
|
compileOnly "org.spigotmc:spigot-api:${value}"
|
||||||
compileOnly "org.bukkit:craftbukkit:${value}:remapped-mojang" //[NMS]
|
compileOnly "org.bukkit:craftbukkit:${value}:remapped-mojang" //[NMS]
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildToolsJar = new File(rootProject.buildDir, "tools/BuildTools.jar")
|
def buildToolsJar = new File(rootProject.buildDir, "tools/BuildTools.jar")
|
||||||
def specialSourceJar = new File(rootProject.buildDir, "tools/SpecialSource.jar")
|
def specialSourceJar = new File(rootProject.buildDir, "tools/SpecialSource.jar")
|
||||||
|
|
||||||
@ -83,7 +81,11 @@ NMS_BINDINGS.each {
|
|||||||
def m2s = m2.getAbsolutePath();
|
def m2s = m2.getAbsolutePath();
|
||||||
|
|
||||||
// ======================== Building Mapped Jars =============================
|
// ======================== Building Mapped Jars =============================
|
||||||
Runnable executeBuildTools = () -> {
|
|
||||||
|
ext {
|
||||||
|
executeBuildTools = new Runnable() {
|
||||||
|
@Override
|
||||||
|
void run() {
|
||||||
//Download
|
//Download
|
||||||
if (!buildToolsJar.exists()) {
|
if (!buildToolsJar.exists()) {
|
||||||
download.run {
|
download.run {
|
||||||
@ -108,8 +110,15 @@ NMS_BINDINGS.each {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tasks.register("executeBuildTools") {
|
||||||
|
doLast {
|
||||||
|
property("executeBuildTools").run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Consumer<File> specialSourceRemap = outputFile -> {
|
tasks.build.doLast {
|
||||||
//Download
|
//Download
|
||||||
if (!specialSourceJar.exists()) {
|
if (!specialSourceJar.exists()) {
|
||||||
download.run {
|
download.run {
|
||||||
@ -120,13 +129,13 @@ NMS_BINDINGS.each {
|
|||||||
specialSourceFolder.mkdirs();
|
specialSourceFolder.mkdirs();
|
||||||
|
|
||||||
//Copy
|
//Copy
|
||||||
project.copy {
|
copy {
|
||||||
from outputFile
|
from outputJar
|
||||||
into specialSourceFolder
|
into specialSourceFolder
|
||||||
}
|
}
|
||||||
|
|
||||||
//obfuscate
|
//obfuscate
|
||||||
project.javaexec {
|
javaexec {
|
||||||
workingDir = specialSourceFolder
|
workingDir = specialSourceFolder
|
||||||
classpath = files(specialSourceJar,
|
classpath = files(specialSourceJar,
|
||||||
new File(m2s + "/org/spigotmc/spigot/" + value + "/spigot-" + value + "-remapped-mojang.jar"))
|
new File(m2s + "/org/spigotmc/spigot/" + value + "/spigot-" + value + "-remapped-mojang.jar"))
|
||||||
@ -144,7 +153,7 @@ NMS_BINDINGS.each {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//remap
|
//remap
|
||||||
project.javaexec {
|
javaexec {
|
||||||
workingDir = specialSourceFolder
|
workingDir = specialSourceFolder
|
||||||
classpath = files(specialSourceJar,
|
classpath = files(specialSourceJar,
|
||||||
new File(m2s + "/org/spigotmc/spigot/" + value + "/spigot-" + value + "-remapped-obf.jar"))
|
new File(m2s + "/org/spigotmc/spigot/" + value + "/spigot-" + value + "-remapped-obf.jar"))
|
||||||
@ -160,41 +169,14 @@ NMS_BINDINGS.each {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
//copy
|
//copy
|
||||||
project.copy {
|
copy {
|
||||||
from ssJar
|
from ssJar
|
||||||
into outputFile.getParentFile()
|
into outputJar.getParentFile()
|
||||||
rename {
|
rename {
|
||||||
outputFile.getName()
|
outputJar.getName()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("executeBuildTools") {
|
|
||||||
doFirst {
|
|
||||||
executeBuildTools.run()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("specialSourceRemap", JavaExec) {
|
|
||||||
doFirst {
|
|
||||||
specialSourceRemap.accept(outputJar)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
append("plugin.yml")
|
|
||||||
relocate('com.dfsek.paralithic', 'com.volmit.iris.util.paralithic')
|
|
||||||
relocate('io.papermc.lib', 'com.volmit.iris.util.paper')
|
|
||||||
relocate('net.kyori', 'com.volmit.iris.util.kyori')
|
|
||||||
archiveFileName.set("Iris-${project.name}.jar")
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
specialSourceRemap.accept(archiveFile.get().asFile)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn(specialSourceRemap)
|
|
||||||
executeBuildTools.run()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,17 +289,24 @@ task iris(type: Copy) {
|
|||||||
|
|
||||||
task setup() {
|
task setup() {
|
||||||
group "iris"
|
group "iris"
|
||||||
|
dependsOn(clean)
|
||||||
NMS_BINDINGS.each {
|
NMS_BINDINGS.each {
|
||||||
dependsOn(project(":nms:${it.key}").executeBuildTools)
|
dependsOn(":nms:${it.key}:clean");
|
||||||
|
}
|
||||||
|
|
||||||
|
doLast {
|
||||||
|
NMS_BINDINGS.each {
|
||||||
|
project(":nms:${it.key}").property("executeBuildTools").run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NMS_BINDINGS.keySet().forEach {
|
NMS_BINDINGS.keySet().forEach {
|
||||||
tasks.register(it, Copy) {
|
def nms = it
|
||||||
group('single version')
|
tasks.register("setup-${nms}") {
|
||||||
dependsOn(":nms:${name}:shadowJar")
|
group "iris"
|
||||||
from new File(project(":nms:${name}").buildDir, "libs${File.separator}Iris-${name}.jar")
|
dependsOn(":nms:${nms}:clean")
|
||||||
into buildDir
|
dependsOn(":nms:${nms}:executeBuildTools")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,23 +327,6 @@ def registerCustomOutputTask(name, path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def registerCustomOutputTask(name, nms, path) {
|
|
||||||
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register('build' + name, Copy) {
|
|
||||||
group('development')
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
dependsOn(":${nms}")
|
|
||||||
from(new File(buildDir, "Iris-${nms}.jar"))
|
|
||||||
into(file(path))
|
|
||||||
rename { String fileName ->
|
|
||||||
fileName.replace("Iris-${nms}.jar", "Iris.jar")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def registerCustomOutputTaskUnix(name, path) {
|
def registerCustomOutputTaskUnix(name, path) {
|
||||||
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
||||||
return;
|
return;
|
||||||
@ -372,21 +344,4 @@ def registerCustomOutputTaskUnix(name, path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def registerCustomOutputTaskUnix(name, nms, path) {
|
|
||||||
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register('build' + name, Copy) {
|
|
||||||
group('development')
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
dependsOn(":${nms}")
|
|
||||||
from(new File(buildDir, "Iris-${nms}.jar"))
|
|
||||||
into(file(path))
|
|
||||||
rename { String fileName ->
|
|
||||||
fileName.replace("Iris-${nms}.jar", "Iris.jar")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn(shadowJar)
|
tasks.build.dependsOn(shadowJar)
|
@ -81,5 +81,3 @@ processResources {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.compileJava.dependsOn(delombok)
|
|
@ -5,6 +5,7 @@ import com.volmit.iris.Iris;
|
|||||||
import com.volmit.iris.core.nms.INMSBinding;
|
import com.volmit.iris.core.nms.INMSBinding;
|
||||||
import com.volmit.iris.engine.data.cache.AtomicCache;
|
import com.volmit.iris.engine.data.cache.AtomicCache;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.collection.KMap;
|
import com.volmit.iris.util.collection.KMap;
|
||||||
import com.volmit.iris.util.hunk.Hunk;
|
import com.volmit.iris.util.hunk.Hunk;
|
||||||
import com.volmit.iris.util.json.JSONObject;
|
import com.volmit.iris.util.json.JSONObject;
|
||||||
@ -273,6 +274,11 @@ public class NMSBinding implements INMSBinding {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KList<Biome> getBiomes() {
|
||||||
|
return new KList<>(Biome.values()).qadd(Biome.CHERRY_GROVE).qdel(Biome.CUSTOM);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isBukkit() {
|
public boolean isBukkit() {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user