-
-
Notifications
You must be signed in to change notification settings - Fork 408
EffOpenInventory Update #8075
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
base: dev/feature
Are you sure you want to change the base?
EffOpenInventory Update #8075
Conversation
I'm working on #7508 that got closed after 3 weeks... |
@Description(""" | ||
Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that they opened. | ||
Please note that currently 'show' and 'open' have the same effect,\ | ||
but 'show' will eventually show an unmodifiable view of the inventory in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may want to implement this in this pr
ANVIL("[an] anvil", "anvil", InventoryType.ANVIL), | ||
CARTOGRAPHY("[a] cartography [table]", "cartography table", InventoryType.CARTOGRAPHY), | ||
CRAFTING("[a] (crafting [table]|workbench)", "crafting table", InventoryType.CRAFTING), | ||
DISPENSER("dispenser", InventoryType.DISPENSER), | ||
DROPPER("dropper", InventoryType.DROPPER), | ||
ENCHANTING("[an] enchant(ing|ment) [table]", "enchantment table", InventoryType.ENCHANTING), | ||
GRINDSTONE("grindstone", InventoryType.GRINDSTONE), | ||
HOPPER("hopper", InventoryType.HOPPER), | ||
LOOM("loom", InventoryType.LOOM), | ||
SMITHING("[a] smithing [table]", "smithing table", InventoryType.SMITHING), | ||
STONECUTTER("stonecutter", InventoryType.STONECUTTER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this what the inventorytype
type handles already? Can't we just improve it instead of duplicating it like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section was done to minimize breaking changes, since prior, the pattern had names of inventory types manually inserted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but can't we do that through the inventory type type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I could add all these "variations" to the patterns of the enum node inventory types
But then that would just be breaking changes since it would lead to MultiLiteral of ItemType and InventoryType.
anvil, furnace, beacon, hopper
etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant more like have a second entry for the types in the lang file that details their 'short names', but if that won't play nice with the enum class info thing, this way is alright.
inventory types:
hopper: hopper @a
Then internally we add the "inventory" for the type parser, but can use the short version here.
Or
inventory types:
hopper:
full: hopper inventory @a
short: hopper @a
Let me know what you think
Problem
Paper has methods of opening certain
InventoryType
s to players making them more reliable. Such as#openAnvil
which allows actually being able to get the anvil text input of a custom anvil inventory.Solution
Updates
EffOpenInventory
utilizing Papers methods (Skript 2.13 will be Paper)Simplifies code
Testing Completed
manual
!broadcast anvil text input of (top inventory of player("SirSmurfy2"))
Supporting Information
Todo in the future: Support Paper's MenuTypes
Completes: #6954
Related: none