mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix anvil usage in 1.19.50
This commit is contained in:
parent
8c70ac48d5
commit
02208a5aed
1 changed files with 6 additions and 4 deletions
|
@ -59,10 +59,12 @@ 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;
|
||||||
|
|
||||||
// Required as of 1.18.30 - FilterTextPackets no longer appear to be sent
|
if (request.getFilterStrings().length != 0) {
|
||||||
String name = request.getFilterStrings()[data.getFilteredStringIndex()];
|
// Required as of 1.18.30 - FilterTextPackets no longer appear to be sent
|
||||||
if (!Objects.equals(name, container.getNewName())) {
|
String name = request.getFilterStrings()[data.getFilteredStringIndex()];
|
||||||
container.checkForRename(session, name);
|
if (!Objects.equals(name, container.getNewName())) { // TODO is this still necessary after pre-1.19.50 support is dropped?
|
||||||
|
container.checkForRename(session, name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.translateRequest(session, inventory, request);
|
return super.translateRequest(session, inventory, request);
|
||||||
|
|
Loading…
Reference in a new issue