3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-14 03:50:08 +01:00

Add new vanilla custom item properties to JSON reader, needs testing

Dieser Commit ist enthalten in:
Eclipse 2024-05-11 10:35:06 +00:00
Ursprung 22f5ad12a8
Commit 0a7a06a044
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 441A0B7FDD01D03A

Datei anzeigen

@ -225,6 +225,50 @@ public class MappingsReader_v1 extends MappingsReader {
customItemData.tags(tagsSet); customItemData.tags(tagsSet);
} }
if (node.has("stack_size")) {
customItemData.stackSize(node.get("stack_size").asInt());
}
if (node.has("max_damage")) {
customItemData.maxDamage(node.get("max_damage").asInt());
}
if (node.has("attack_damage")) {
customItemData.maxDamage(node.get("attack_damage").asInt());
}
if (node.has("tool_type")) {
customItemData.toolType(node.get("tool_type").asText());
}
if (node.has("tool_tier")) {
customItemData.toolTier(node.get("tool_tier").asText());
}
if (node.has("armor_type")) {
customItemData.armorType(node.get("armor_type").asText());
}
if (node.has("protection_value")) {
customItemData.protectionValue(node.get("protection_value").asInt());
}
if (node.has("hat")) {
customItemData.hat(node.get("hat").asBoolean());
}
if (node.has("foil")) {
customItemData.foil(node.get("foil").asBoolean());
}
if (node.has("edible")) {
customItemData.edible(node.get("edible").asBoolean());
}
if (node.has("can_always_eat")) {
customItemData.canAlwaysEat(node.get("can_always_eat").asBoolean());
}
return customItemData.build(); return customItemData.build();
} }