3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Optimize stackSize

Co-Authored-By: Camotoy <20743703+Camotoy@users.noreply.github.com>
Dieser Commit ist enthalten in:
AJ Ferguson 2021-01-04 15:12:26 -09:00
Ursprung a160e3694b
Commit 57e176efd6

Datei anzeigen

@ -147,7 +147,8 @@ public class ItemRegistry {
if (bedrockIdentifier == null) { if (bedrockIdentifier == null) {
throw new RuntimeException("Missing Bedrock ID in mappings!: " + bedrockId); throw new RuntimeException("Missing Bedrock ID in mappings!: " + bedrockId);
} }
int stackSize = entry.getValue().get("stack_size") == null ? 64 : entry.getValue().get("stack_size").intValue(); JsonNode stackSizeNode = entry.getValue().get("stack_size");
int stackSize = stackSizeNode == null ? 64 : stackSizeNode.intValue();
if (entry.getValue().has("tool_type")) { if (entry.getValue().has("tool_type")) {
if (entry.getValue().has("tool_tier")) { if (entry.getValue().has("tool_tier")) {
ITEM_ENTRIES.put(itemIndex, new ToolItemEntry( ITEM_ENTRIES.put(itemIndex, new ToolItemEntry(