Comments (5)
I believe this is not something we currently support, sorry! Since the ID Flattening in 1.13 resolved almost all edge cases where items the user would consider distinct had the same ID. What's your specific use case and what prevents you from splitting it into multiple IDs?
from spice-of-life-carrot-edition.
I'm creating a mod that dynamically adds rarity to vanilla and modded food (which changes the stats when you eat) and I don't want to duplicate each item 4 times so I simply use the CustomModelData to manage the logic (and allow customization of the textures of course)
from spice-of-life-carrot-edition.
Interesting! When designing the mod, I envisioned that variants would either be distinct enough to warrant separate IDs/food list entries/etc. or similar enough to have the same ID and count as the same thing.
I suppose there may be a niche here where the rarer variants are sufficiently harder to get that they should count as separate entries while the items are sufficiently similar to be confusing as separate entries, but it sounds to me like maybe separate IDs really would make sense here. The items look the same, but they have different effects and aren't really interchangeable. Further, using CustomModelData to achieve different behavior really feels like a hack to me that is likely to break other things too (e.g. what happens if you put them in a Storage Drawer?).
Then again, sharing an ID means they can all be used in recipes just like the original, which may be worth all the downsides if that's really important to you. Either way, we don't currently support this functionality and I don't really have the time to add it right now, so you might want to reconsider splitting into separate IDs.
from spice-of-life-carrot-edition.
The use of NBT instead of ID is really the heart of the concept, the rarity system is inspired by Stardew Valley but what made me want to make my mod is in fact another mod (Quality Crops) which adds rarity with separate IDs (and work very well with this SoL), although I really like this mod I faced some problems when making a modpack with many food : a lot of food had no rarity because the compat had to be done manually (which makes everything confusing and inconsistent, especially when vanilla food is used in modded recipes that have no compat), my implementation aims to correct this among other things ^^
For the visual I currently use the CustomModelData but indeed given that the rarities are dynamic but that the alternative textures must be provided manually the items rarity tend to have the same icon, I planned to add an indicator a bit like Quality Crops in these cases (like a small colored star in a corner of the object). For now I have customized the tooltip render to add a rarity line, a colored name and prefixes/suffixes (all translatable)
About the recipe, I use the "forge:partial_nbt" type to create recipes that produces food of the same quality.
I am careful to make everything compatible with the other mods, the mod is still in development but so far I have not found any insurmountable problem linked to the use of NBT ^^
from spice-of-life-carrot-edition.
I see! That is quite the unfortunate situation then. We'd have to add a whole API for registering subtypes of items, figure out a way to represent it in our stored food list, and probably some other things I'm not thinking of. To be frank, I don't really see this happening any time soon—maybe it's not that important for foods of different rarity to count separately? The effects that come with them should be reward enough right :p
from spice-of-life-carrot-edition.
Related Issues (20)
- Player Must have food capability attached, but none was found. HOT 10
- Bug minecraft:air? HOT 2
- Suggestions: Disable nourishment in config HOT 2
- Whitelist question HOT 3
- Some eaten foods resetting when re-entering the world HOT 16
- Compatibility-ish. HOT 2
- Not working with Hunger Reworked HOT 1
- Suggestion for how to count Cake as a food HOT 1
- Crash when eating food 1.19.2 HOT 4
- Allow grouping foods for milestones instead of eating a set number of foods HOT 2
- ll hearts disappear when I die ( atm7 ) HOT 2
- loss of hearts randomly HOT 2
- [1.20.1] Crash with Modernfix? HOT 6
- How do I get health directly using commands? HOT 1
- [1.20.1] Need help HOT 2
- How to use whitelist? HOT 1
- How do I get health directly through a command? HOT 1
- I need help HOT 1
- Inexplicable collapse 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 spice-of-life-carrot-edition.