getSubBlocks should not be SideOnly.CLIENT.
KingLemming opened this issue ยท 4 comments
Basically as topic. I don't know how many of your blocks this is in, but I know it's in EnumBlock at least.
In prior versions I'm aware that it was a client only thing, but this is no longer the case, and there are lots of valid reasons for iterating over this on the server.
I'm trying to track down potential weirdness with Natura and while I can't say for certain this is the cause...it could be? :)
You are correct, it's from the days of clientside-only-creative-items-thing. Curious why you are iterating over it though? I don't think it's a good idea to use it for any non-display purposes.
Because when things are Oredict'd using the Wildcard value instead of individually, there is no other option. There's literally no other method to try and determine what "valid" stacks are.
Basically, to figure out Natura's logs from the "logWood" list to create the Sawmill recipes, I have to call getSubBlocks to get each actual log.
Ah yes, that one.. I usually did a -> getStateFromMeta -> getMetaFromState and checked if they're the same. Since, if you pass in an invalid meta, you should get the default state.. and there's only 16 metadata values for blocks. However that can crash if mods don't handle their stuff properly.. or vanilla.