Compare commits

...

3 Commits

Author SHA1 Message Date
pompompopi bab35223bb
Also destroy ViaManager on 1.15.2 servers (#330) 2024-05-10 14:55:15 +02:00
pompompopi 9454942af6
Ensure ViaManager is destroyed on the server at graceful shutdown (#328)
Fixes #327
2024-05-10 14:45:53 +02:00
Kichura a7d5601d7b
Update Loader to 0.15.11, ViaVersion 4.10.2. (#329) 2024-05-10 14:45:27 +02:00
34 changed files with 541 additions and 13 deletions

View File

@ -1,8 +1,8 @@
# suppress inspection "UnusedProperty" for whole file
org.gradle.jvmargs=-Xms32M -Xmx4G -XX:+UseG1GC -XX:+UseStringDeduplication
loader_version=0.15.10
viaver_version=4.10.1
loader_version=0.15.11
viaver_version=4.10.2
yaml_version=2.2
publish_mc_versions=1.20.6, 1.20.4, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5, 1.15.2, 1.14.4, 1.12.2, 1.8.9

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1122.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stopRunning", at = @At("TAIL"))
private void onStopRunning(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -54,6 +54,7 @@
"mixins.viafabric1122.address.json",
"mixins.viafabric1122.gui.json",
"mixins.viafabric1122.debug.json",
"mixins.viafabric1122.pipeline.json"
"mixins.viafabric1122.pipeline.json",
"mixins.viafabric1122.shutdown.json"
]
}

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_8",
"package": "com.viaversion.fabric.mc1122.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1144.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -69,7 +69,8 @@
"mixins.viafabric1144.address.json",
"mixins.viafabric1144.gui.json",
"mixins.viafabric1144.debug.json",
"mixins.viafabric1144.pipeline.json"
"mixins.viafabric1144.pipeline.json",
"mixins.viafabric1144.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_8",
"package": "com.viaversion.fabric.mc1144.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1152.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -69,7 +69,8 @@
"mixins.viafabric1152.address.json",
"mixins.viafabric1152.gui.json",
"mixins.viafabric1152.debug.json",
"mixins.viafabric1152.pipeline.json"
"mixins.viafabric1152.pipeline.json",
"mixins.viafabric1152.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_8",
"package": "com.viaversion.fabric.mc1152.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1165.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -65,7 +65,8 @@
"mixins.viafabric1165.address.json",
"mixins.viafabric1165.gui.json",
"mixins.viafabric1165.debug.json",
"mixins.viafabric1165.pipeline.json"
"mixins.viafabric1165.pipeline.json",
"mixins.viafabric1165.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_8",
"package": "com.viaversion.fabric.mc1165.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1171.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -68,7 +68,8 @@
"mixins.viafabric1171.address.json",
"mixins.viafabric1171.gui.json",
"mixins.viafabric1171.debug.json",
"mixins.viafabric1171.pipeline.json"
"mixins.viafabric1171.pipeline.json",
"mixins.viafabric1171.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_16",
"package": "com.viaversion.fabric.mc1171.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1182.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -68,7 +68,8 @@
"mixins.viafabric1182.address.json",
"mixins.viafabric1182.gui.json",
"mixins.viafabric1182.debug.json",
"mixins.viafabric1182.pipeline.json"
"mixins.viafabric1182.pipeline.json",
"mixins.viafabric1182.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_17",
"package": "com.viaversion.fabric.mc1182.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1194.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -68,7 +68,8 @@
"mixins.viafabric1194.address.json",
"mixins.viafabric1194.gui.json",
"mixins.viafabric1194.debug.json",
"mixins.viafabric1194.pipeline.json"
"mixins.viafabric1194.pipeline.json",
"mixins.viafabric1194.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_17",
"package": "com.viaversion.fabric.mc1194.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1201.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -68,7 +68,8 @@
"mixins.viafabric1201.address.json",
"mixins.viafabric1201.gui.json",
"mixins.viafabric1201.debug.json",
"mixins.viafabric1201.pipeline.json"
"mixins.viafabric1201.pipeline.json",
"mixins.viafabric1201.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_17",
"package": "com.viaversion.fabric.mc1201.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1204.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -68,7 +68,8 @@
"mixins.viafabric1204.address.json",
"mixins.viafabric1204.gui.json",
"mixins.viafabric1204.debug.json",
"mixins.viafabric1204.pipeline.json"
"mixins.viafabric1204.pipeline.json",
"mixins.viafabric1204.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_17",
"package": "com.viaversion.fabric.mc1204.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc1206.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stop", at = @At("TAIL"))
private void onStop(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -68,7 +68,8 @@
"mixins.viafabric1206.address.json",
"mixins.viafabric1206.gui.json",
"mixins.viafabric1206.debug.json",
"mixins.viafabric1206.pipeline.json"
"mixins.viafabric1206.pipeline.json",
"mixins.viafabric1206.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_21",
"package": "com.viaversion.fabric.mc1206.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}

View File

@ -0,0 +1,34 @@
/*
* This file is part of ViaFabric - https://github.com/ViaVersion/ViaFabric
* Copyright (C) 2018-2024 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.viaversion.fabric.mc189.mixin.shutdown.server;
import com.viaversion.viaversion.ViaManagerImpl;
import com.viaversion.viaversion.api.Via;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MinecraftServer.class)
public class MixinMinecraftServer {
@Inject(method = "stopRunning", at = @At("TAIL"))
private void onStopRunning(CallbackInfo ci) {
((ViaManagerImpl) Via.getManager()).destroy();
}
}

View File

@ -65,7 +65,8 @@
"mixins.viafabric189.address.json",
"mixins.viafabric189.gui.json",
"mixins.viafabric189.debug.json",
"mixins.viafabric189.pipeline.json"
"mixins.viafabric189.pipeline.json",
"mixins.viafabric189.shutdown.json"
],
"custom": {
"modmenu": {

View File

@ -0,0 +1,13 @@
{
"required": true,
"compatibilityLevel": "JAVA_8",
"package": "com.viaversion.fabric.mc189.mixin.shutdown",
"mixins": [
],
"server": [
"server.MixinMinecraftServer"
],
"injectors": {
"defaultRequire": 0
}
}