mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-08 03:22:09 +01:00
Fix charge type predicate
This commit is contained in:
parent
361df163b8
commit
b80c054f53
1 changed files with 1 additions and 2 deletions
|
@ -75,7 +75,6 @@ public final class CustomItemTranslator {
|
|||
}
|
||||
|
||||
Key itemModel = components.getOrDefault(DataComponentType.ITEM_MODEL, MinecraftKey.key("air"));
|
||||
System.out.println(itemModel + " is the model!");
|
||||
Collection<Pair<CustomItemDefinition, ItemDefinition>> customItems = allCustomItems.get(itemModel);
|
||||
if (customItems.isEmpty()) {
|
||||
return null;
|
||||
|
@ -111,7 +110,7 @@ public final class CustomItemTranslator {
|
|||
if (match.property() == MatchPredicateProperty.CHARGE_TYPE) {
|
||||
ChargeType expected = (ChargeType) match.data();
|
||||
List<ItemStack> charged = components.get(DataComponentType.CHARGED_PROJECTILES);
|
||||
if (charged == null) {
|
||||
if (charged == null || charged.isEmpty()) {
|
||||
return expected == ChargeType.NONE;
|
||||
} else if (expected == ChargeType.ROCKET) {
|
||||
for (ItemStack projectile : charged) {
|
||||
|
|
Loading…
Reference in a new issue