gnembon / fabric-carpet

Fabric Carpet
MIT License
1.73k stars 275 forks source link

__on_inventory_change(player, call(screen, action, data)) language improvement #1643

Open IceWolf23 opened 1 year ago

IceWolf23 commented 1 year ago

Add __on_inventory_change() method which is called whenever the player performs an action in a normal inventory, such as when you press E and move an item or when you open a Furnace interface and start cooking some item

the method should work the same way as create_screen() at the callback level only it is called exclusively for vanilla/non-scarpet GUIs

17183248569 commented 1 year ago

i ve talked about that with replace-item. A preliminary plan is to creat a function: get_current_screen(player, callback?),which returns the player`s GUI as a screen value (and you may append a callback to it), and an event that fires when player opens GUI.

with this 2, you can do what ever you want.

=======================

and i want to know if you have solve the problem #1604 ? you did not update it anymore. if you solve it, you can close it.

IceWolf23 commented 1 year ago

i ve talked about that with replace-item. A preliminary plan is to creat a function: get_current_screen(player, callback?),which returns the player`s GUI as a screen value (and you may append a callback to it), and an event that fires when player opens GUI.

with this 2, you can do what ever you want.

=======================

and i want to know if you have solve the problem #1604 ? you did not update it anymore. if you solve it, you can close it.

is it possible to know approximately when these functions will be available?