Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XItemStack] - NETHER_PORTAL is no longer an item in 1.21 #275

Closed
HSGamer opened this issue Jun 22, 2024 · 1 comment
Closed

[XItemStack] - NETHER_PORTAL is no longer an item in 1.21 #275

HSGamer opened this issue Jun 22, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@HSGamer
Copy link
Contributor

HSGamer commented Jun 22, 2024

Description

java.lang.IllegalArgumentException: NETHER_PORTAL isn't an item
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) ~[guava-32.1.2-jre.jar:?]
        at org.bukkit.inventory.ItemStack.of(ItemStack.java:58) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:138) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:117) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:104) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:87) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at ModularMob-1.0-SNAPSHOT.jar/me.hsgamer.modularmob.lib.xseries.XItemStack.deserialize(XItemStack.java:453) ~[ModularMob-1.0-SNAPSHOT.jar:?]
        at ModularMob-1.0-SNAPSHOT.jar/me.hsgamer.modularmob.lib.xseries.XItemStack.deserialize(XItemStack.java:466) ~[ModularMob-1.0-SNAPSHOT.jar:?]
        at java.base/java.util.Optional.map(Optional.java:260) ~[?:?]

When deserializing the item config in 1.21, the DEFAULT_MATERIAL in XItemStack uses NETHER_PORTAL as a default itemstack, which is illegal by Spigot.

I guess we need to change the default material to something else.

Version
1.21

@HSGamer HSGamer added the bug Something isn't working label Jun 22, 2024
@HSGamer
Copy link
Contributor Author

HSGamer commented Jun 22, 2024

This affects XEntity so we definitely need to change the default material

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants