-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Initial work on handle use item #433
base: master
Are you sure you want to change the base?
Conversation
We need to send sound, but its in future |
All fixed, waiting review |
You need to use |
pub consume_seconds: f32, | ||
pub has_consume_particles: bool, | ||
pub animation: Option<String>, | ||
pub sound: Option<String>, | ||
// TODO: Effects implementation?? | ||
pub on_consume_effects: Option<Vec<serde_json::Value>>, |
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.
Please, Before changing anything in the item_registry and trying to just look at the JSON what vanilla does just open up the vanilla Implementation. The Consumable component can be found in net.minecraft.component.type::ConsumableComponent
- consume_seconds: optional float
- animation: optional enum
- sound: optional SoundEvent
- has_consume_particles: optional bool
- on_consume_effects: optional list of "ConsumeEffect"s
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.
But some items have default values, like consume srxonds, its 1.6 by default, and why i need to add options if it has a default value?
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.
Some food dont have any arguments, so where i can get consume seconds?
Description
Initial work on handle use item, also i add strip in cargo.toml for optimizations.
Testing
cargo test
cargo run
see world
Please follow our Coding Guidelines