Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Fix anvil usage in 1.19.50
Dieser Commit ist enthalten in:
Ursprung
8c70ac48d5
Commit
02208a5aed
@ -59,11 +59,13 @@ public class AnvilInventoryTranslator extends AbstractBlockInventoryTranslator {
|
|||||||
CraftRecipeOptionalStackRequestActionData data = (CraftRecipeOptionalStackRequestActionData) request.getActions()[0];
|
CraftRecipeOptionalStackRequestActionData data = (CraftRecipeOptionalStackRequestActionData) request.getActions()[0];
|
||||||
AnvilContainer container = (AnvilContainer) inventory;
|
AnvilContainer container = (AnvilContainer) inventory;
|
||||||
|
|
||||||
|
if (request.getFilterStrings().length != 0) {
|
||||||
// Required as of 1.18.30 - FilterTextPackets no longer appear to be sent
|
// Required as of 1.18.30 - FilterTextPackets no longer appear to be sent
|
||||||
String name = request.getFilterStrings()[data.getFilteredStringIndex()];
|
String name = request.getFilterStrings()[data.getFilteredStringIndex()];
|
||||||
if (!Objects.equals(name, container.getNewName())) {
|
if (!Objects.equals(name, container.getNewName())) { // TODO is this still necessary after pre-1.19.50 support is dropped?
|
||||||
container.checkForRename(session, name);
|
container.checkForRename(session, name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return super.translateRequest(session, inventory, request);
|
return super.translateRequest(session, inventory, request);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren