Update to forge 40.1.59
This commit is contained in:
parent
f98046185e
commit
7128c9d80d
|
@ -6,7 +6,7 @@ A Bukkit server implementation utilizing Mixin.
|
|||
|
||||
| Minecraft | Forge | Status | Build |
|
||||
| :----: |:-------:| :---: | :---: |
|
||||
| 1.18.x | 40.1.31 | ACTIVE | [![1.18 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-18?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-18) |
|
||||
| 1.18.x | 40.1.59 | ACTIVE | [![1.18 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-18?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-18) |
|
||||
| 1.17.x | 37.1.0 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.17/1.0.2) | [![1.17 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-17?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-17) |
|
||||
| 1.16.x | 36.2.26 | 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.48 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.15/1.0.19) | [![1.15 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-15?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-15) |
|
||||
|
|
|
@ -11,8 +11,10 @@ import io.izzel.arclight.common.mod.util.BukkitDispatcher;
|
|||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.commands.SharedSuggestionProvider;
|
||||
import net.minecraft.commands.synchronization.SuggestionProviders;
|
||||
import net.minecraft.network.protocol.game.ClientboundCommandsPacket;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraftforge.server.command.CommandHelper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.player.PlayerCommandSendEvent;
|
||||
import org.spigotmc.SpigotConfig;
|
||||
|
@ -57,11 +59,12 @@ public abstract class CommandsMixin {
|
|||
RootCommandNode<SharedSuggestionProvider> vanillaRoot = new RootCommandNode<>();
|
||||
Commands vanillaCommands = ((MinecraftServerBridge) player.server).bridge$getVanillaCommands();
|
||||
map.put(vanillaCommands.getDispatcher().getRoot(), vanillaRoot);
|
||||
this.fillUsableCommands(vanillaCommands.getDispatcher().getRoot(), vanillaRoot, player.createCommandSourceStack(), map);
|
||||
// FORGE: Use our own command node merging method to handle redirect nodes properly, see issue #7551
|
||||
CommandHelper.mergeCommandNode(vanillaCommands.getDispatcher().getRoot(), vanillaRoot, map, player.createCommandSourceStack(), ctx -> 0, suggest -> SuggestionProviders.safelySwap((com.mojang.brigadier.suggestion.SuggestionProvider<SharedSuggestionProvider>) (com.mojang.brigadier.suggestion.SuggestionProvider<?>) suggest));
|
||||
|
||||
RootCommandNode<SharedSuggestionProvider> node = new RootCommandNode<>();
|
||||
map.put(this.dispatcher.getRoot(), node);
|
||||
this.fillUsableCommands(this.dispatcher.getRoot(), node, player.createCommandSourceStack(), map);
|
||||
CommandHelper.mergeCommandNode(this.dispatcher.getRoot(), node, map, player.createCommandSourceStack(), ctx -> 0, suggest -> SuggestionProviders.safelySwap((com.mojang.brigadier.suggestion.SuggestionProvider<SharedSuggestionProvider>) (com.mojang.brigadier.suggestion.SuggestionProvider<?>) suggest));
|
||||
|
||||
LinkedHashSet<String> set = new LinkedHashSet<>();
|
||||
for (CommandNode<SharedSuggestionProvider> child : node.getChildren()) {
|
||||
|
|
|
@ -999,7 +999,8 @@ public abstract class ServerPlayNetHandlerMixin implements ServerPlayNetHandlerB
|
|||
return null;
|
||||
}
|
||||
String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage());
|
||||
Component component = ForgeHooks.onServerChatEvent(handler, queueEvent.getMessage(), ForgeHooks.newChatWithLinks(message));
|
||||
var event = ForgeHooks.onServerChatEvent(handler, queueEvent.getMessage(), ForgeHooks.newChatWithLinks(message), queueEvent.getMessage(), ForgeHooks.newChatWithLinks(message));
|
||||
var component = event == null ? null : event.getComponent();
|
||||
if (component == null) return null;
|
||||
Bukkit.getConsoleSender().sendMessage(CraftChatMessage.fromComponent(component));
|
||||
if (((LazyPlayerSet) queueEvent.getRecipients()).isLazy()) {
|
||||
|
@ -1040,7 +1041,8 @@ public abstract class ServerPlayNetHandlerMixin implements ServerPlayNetHandlerB
|
|||
@Override
|
||||
protected Void evaluate() {
|
||||
// this is called on main thread
|
||||
Component component = ForgeHooks.onServerChatEvent(handler, event.getMessage(), chatWithLinks);
|
||||
var chatEvent = ForgeHooks.onServerChatEvent(handler, event.getMessage(), chatWithLinks, event.getMessage(), chatWithLinks);
|
||||
var component = chatEvent != null ? chatEvent.getComponent() : null;
|
||||
if (component == null) return null;
|
||||
Bukkit.getConsoleSender().sendMessage(CraftChatMessage.fromComponent(component));
|
||||
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
|
||||
|
|
|
@ -110,7 +110,7 @@ public abstract class DedicatedServerMixin extends MinecraftServerMixin {
|
|||
}
|
||||
if (!threads.isEmpty()) {
|
||||
ArclightMod.LOGGER.debug("Threads {} not shutting down", String.join(", ", threads));
|
||||
ArclightMod.LOGGER.warn("{} threads not shutting down correctly, force exiting", threads.size());
|
||||
ArclightMod.LOGGER.info("{} threads not shutting down correctly, force exiting", threads.size());
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ allprojects {
|
|||
ext {
|
||||
agpVersion = '1.23'
|
||||
minecraftVersion = '1.18.2'
|
||||
forgeVersion = '40.1.31'
|
||||
forgeVersion = '40.1.59'
|
||||
apiVersion = '1.2.6'
|
||||
toolsVersion = '1.3.+'
|
||||
mixinVersion = '0.8.5'
|
||||
|
|
Loading…
Reference in New Issue
Block a user