Comments (3)
more comprehensive documentation would be very interesting, I can't find many doubts that I find about methods and properties of events and functions, I would love new content in the documentation.
from kubejs.
Use the player.inventory.xxxx
events.
For the change event, entity
/ item
/ slot
will tell you about the change.
For opening or closing an inventory, entity
/ inventoryContainer
are available. inventoryContainer
is a PlayerContainer from the Forge API, not a KubeJS wrapper, so it could break in future versions of the Forge API, Minecraft, etc. You probably want the inventorySlots
property.
For better documentation, read the source code like this and update the wiki.
from kubejs.
Actually, a better approach would be to call event
. player
. inventory
and then do what you want.
from kubejs.
Related Issues (20)
- Cannot modify player chat message on server, event is wrong type
- Cannot access files in the kubejs/config directory HOT 11
- Wrong version, even if it is the same version HOT 5
- Items in cooling down do not work for 'BlockEvents.rightClicked'
- Hiding items/fluids in JEI stops working on world reload
- Hoppers Can't Interact With Custom Block Entity Inventory
- ServerEvents.recipes breaks Grindstone interaction with Spelunkery HOT 4
- Conditional Recipes from any mod completely break if you add or remove any recipes in Neoforge 1.20.4+ HOT 3
- [1.19.2 forge] Campfire cooking recipe not using the correct nbt data HOT 3
- "1d" gets converted to 24 days instead of 1 day
- Modify item groups (creative inventory) HOT 3
- Method not found error when setting stages via PlayerEvents.loggedIn() HOT 2
- InputItem serializes to only the item, ignores count despite supporting count HOT 4
- Removal of ores doesnt fully work
- Recipe Components still suppressing errors
- afterRecipes cannot be triggered HOT 2
- remove/add/change recipes in non ServerEvents.recipes and an recipes.disable/enable functio
- Default Campfire Cooking time is wrong HOT 2
- Destroy mod recipe works in json file but not in recipe events
- player's DeltaMovement has changed but will not work. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubejs.