-
Notifications
You must be signed in to change notification settings - Fork 22
NBT for Entity-Capture Items #185
Comments
Thinking about it some more, this does feel like an ideal spot for a custom capability to be defined, though I don't know what the best route to do so would be, especially as that would be outside of the scope of Plethora... Somewhat rubber-ducking here, as this would work for both the original enhancement request and for a hypothetical capability:
Any further methods would depend upon whether we have entity NBT, and what type of entity has been captured, such as profession/trades for a villager, wool color for a sheep, growth/gain/strength for a Chickens chicken, etc. As such, each type of entity would need its own extension to the core metadata methods... This, along with the variety of entity capture items, is the core of my concern about feature creep... |
Plethora has an "object converter" system - we could definitely implement something which maps As far as NBT goes, we can re-recreate the entity from that, and then we can just pass it off to our pre-existing entity metadata functions. This should mean we don't have to add too much new functionality, just piggyback off existing code. |
Simply provides the current entity metadata within capturedEntity. See #185
Nice! Out of curiosity, what code are you using in the screenshot to test? Edit: Having seen another screenshot on the Discord, I realized that your Lua interpreter is labeling the input/output line pairs; is that from CC:Tweaked, or is it a modified edit.lua? Main thing that is throwing me is that all of the output is nice and tidily aligned, but that may just be due to the tags not being nested... |
It's pretty much just
Yeah - it's the modified Lua shell from mbs. Makes it a tad easier to read things IMO :). |
That makes sense; much flatter structure than, say, the full meta for a bee that I was testing to determine the behavior of NamespacedMetaProvider. MBS looks handy... that's going into the list of 'things I want to auto-install'! |
Related to my suggestion regarding Roost, it may be useful to expose at least the type of animal captured in assorted items, albeit obnoxious due to the large variety, as I do not believe that a common interface or capability has been designed for such items. Examples that come to mind:
Further complicating things, I believe that, at least in the past, some mods will store the entity's full NBT, while others only store the entity type; e.g. if you catch a villager, do you get the same trades, or just a random villager when you place them down.
Given the large number of variables (both figuratively and literally) I understand if this is impractical or feature creep, but I thought that I would suggest it nonetheless.
The text was updated successfully, but these errors were encountered: