From 1528e140807c7e347ecc5e3b9946f66ebdb3e36d Mon Sep 17 00:00:00 2001 From: IzzelAliz Date: Wed, 21 Oct 2020 15:01:09 +0800 Subject: [PATCH] Update forge to 34.1.25 --- README.md | 2 +- arclight-common/build.gradle | 2 +- .../common/mixin/bukkit/CraftServerMixin.java | 2 +- .../common/mixin/core/entity/EntityMixin.java | 2 +- .../player/ServerPlayerEntityMixin.java | 2 +- arclight-forge-1.16/build.gradle | 64 ++++++++++++++++++- 6 files changed, 66 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0e309333..725ed2ee 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A Bukkit server implementation utilizing Mixin. | Minecraft | Forge | Status | Build | | :----: | :----: | :---: | :---: | -| 1.16.x | 34.1.7 | ACTIVE | [![1.16 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-16?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) | +| 1.16.x | 34.1.25 | ACTIVE | [![1.16 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-16?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) | | 1.15.x | 31.2.45 | ACTIVE | [![1.15 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-15?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-15) | | 1.14.x | 28.2.0 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.0.6) | [![1.14 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight) | diff --git a/arclight-common/build.gradle b/arclight-common/build.gradle index 67b49b3a..1b3df111 100644 --- a/arclight-common/build.gradle +++ b/arclight-common/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'io.izzel.arclight' ext { minecraftVersion = '1.16.3' - forgeVersion = '34.1.7' + forgeVersion = '34.1.25' } arclight { diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftServerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftServerMixin.java index f9901c8c..1a69ccec 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftServerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftServerMixin.java @@ -130,7 +130,7 @@ public abstract class CraftServerMixin implements CraftServerBridge { this.playerList = (DedicatedPlayerList) playerList; } - @Inject(method = "unloadWorld(Lorg/bukkit/World;Z)Z", require = 1, remap = false, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerChunkProvider;close()V")) + @Inject(method = "unloadWorld(Lorg/bukkit/World;Z)Z", require = 1, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/server/ServerWorld;getChunkProvider()Lnet/minecraft/world/server/ServerChunkProvider;")) private void arclight$unloadForge(World world, boolean save, CallbackInfoReturnable cir) { MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(((CraftWorld) world).getHandle())); } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/EntityMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/EntityMixin.java index 9cb47d62..83ab8969 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/EntityMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/EntityMixin.java @@ -833,7 +833,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge, return null; } this.world.getProfiler().startSection("reposition"); - PortalInfo portalinfo = this.func_241829_a(server); + PortalInfo portalinfo = teleporter.getPortalInfo((Entity) (Object) this, server, this::func_241829_a); if (portalinfo == null) { return null; } else { diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/player/ServerPlayerEntityMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/player/ServerPlayerEntityMixin.java index 9a945754..9c677976 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/player/ServerPlayerEntityMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/entity/player/ServerPlayerEntityMixin.java @@ -487,7 +487,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntityMixin implemen serverworld.removeEntity((ServerPlayerEntity) (Object) this, true); //Forge: the player entity is moved to the new world, NOT cloned. So keep the data alive with no matching invalidate call. this.revive(); */ - PortalInfo portalinfo = this.func_241829_a(server); + PortalInfo portalinfo = teleporter.getPortalInfo((ServerPlayerEntity) (Object) this, server, this::func_241829_a); ServerWorld[] exitWorld = new ServerWorld[]{server}; if (portalinfo != null) { Entity e = teleporter.placeEntity((ServerPlayerEntity) (Object) this, serverworld, exitWorld[0], this.rotationYaw, spawnPortal -> {//Forge: Start vanilla logic diff --git a/arclight-forge-1.16/build.gradle b/arclight-forge-1.16/build.gradle index 6d252008..ef73ce2b 100644 --- a/arclight-forge-1.16/build.gradle +++ b/arclight-forge-1.16/build.gradle @@ -18,10 +18,11 @@ apply plugin: 'org.spongepowered.mixin' apply plugin: 'java' apply plugin: 'idea' apply plugin: 'io.izzel.arclight' +apply plugin: 'maven-publish' ext { minecraftVersion = '1.16.3' - forgeVersion = '34.1.7' + forgeVersion = '34.1.25' } arclight { @@ -59,7 +60,7 @@ repositories { maven { url = 'https://jitpack.io/' } } -def embedLibs = ['org.spongepowered:mixin:0.8.1', 'org.ow2.asm:asm-util:8.0.1', +def embedLibs = [/*'org.spongepowered:mixin:0.8.1',*/ 'org.ow2.asm:asm-util:8.0.1', 'org.ow2.asm:asm-analysis:8.0.1', 'org.yaml:snakeyaml:1.26', 'org.xerial:sqlite-jdbc:3.32.3', 'mysql:mysql-connector-java:5.1.49', 'commons-lang:commons-lang:2.6', 'com.googlecode.json-simple:json-simple:1.1.1', @@ -128,4 +129,61 @@ mixin { compileJava { options.compilerArgs << '-XDignore.symbol.file' << '-XDenableSunApiLintControl' options.encoding = 'UTF-8' -} \ No newline at end of file +} + +task srgJar(type: Jar) { + from(tasks.jar.outputs.files.collect { it.isDirectory() ? it : zipTree(it) }) { + include 'io/izzel/**' + exclude 'io/izzel/arclight/common/mixin/**' + } + classifier = 'srg' +} + +task spigotJar(type: Jar) { + with tasks.srgJar + doLast { + def task = tasks.create('renameSpigotJar', net.minecraftforge.gradle.userdev.tasks.RenameJarInPlace) + task.input = archivePath + task.hasLog = false + task.mappings = project(':arclight-common').file('build/arclight_cache/tmp_srg/bukkit_srg.srg') + def args = task.args.toList() + args.add('--reverse') + task.setArgs(args) + task.apply() + } + classifier = 'spigot' +} + +task sourceJar(type: Jar) { + from(sourceSets.main.allSource) + for (def s in [':arclight-api', ':i18n-config', ':arclight-common', ':forge-installer']) { + from(project(s).sourceSets.main.allSource) { + exclude 'io/izzel/arclight/common/mixin/**' + } + } + classifier = 'sources' +} + +publishing { + repositories { + maven { + name = "IzzelAliz Repo" + url = uri('https://maven.izzel.io/' + (project.version.toString().endsWith('SNAPSHOT') ? 'snapshots' : 'releases')) + credentials { + username = project.findProperty("mavenUser") ?: System.getenv("ARCLIGHT_USER") + password = project.findProperty("mavenToken") ?: System.getenv("ARCLIGHT_TOKEN") + } + } + } + publications { + mavenJava(MavenPublication) { + artifact srgJar + artifact spigotJar + artifact sourceJar + } + } +} + +if ('true'.equalsIgnoreCase(System.getenv('APPVEYOR_REPO_TAG'))) { + tasks.build.dependsOn(tasks.publish) +}