Hello,, everyone.
How exactly works event on_player_cursor_stack_changed:
1 Is it called when player get some item frrom inventory/chest/etc.?
2 Is it called when player moving whoe stack by using ctrl+LeftClick?
3 Is it called when player putting some items to chest without opening it?
4 Is there similar event for manipulators?
The point is to create chest that can contain items only specific type and prevents putting to it other items, including manipulators.
on_player_cursor_stack_changed how it works?
Re: on_player_cursor_stack_changed how it works?
on_player_cursor_stack_changed is called exactly as its name is implied
It won't be called when ctrl/shift clicking from one inventory to another. It will be called after shift/ctrl clicking an item in your hand to an inventory.
There are other events that can be watched for though.
on_player_main_inventory_changed
on_player_quickbar_inventory_changed
It won't be called when ctrl/shift clicking from one inventory to another. It will be called after shift/ctrl clicking an item in your hand to an inventory.
There are other events that can be watched for though.
on_player_main_inventory_changed
on_player_quickbar_inventory_changed
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: on_player_cursor_stack_changed how it works?
If you want to see exactly what events are getting fired, I highly recommend Creative Mode mod which has an event logger. You can select one or more events from its UI, and when they fire they'll get logged to console and/or log file (depends what options you set) so you can see exactly what's happening.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: on_player_cursor_stack_changed how it works?
Also, this might be of use: memberlist.php?mode=viewprofile&u=25589
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.