Closed brisingraerowing closed 7 years ago
The camouflage ability in this mod is a pretty simple/basic one. I'm just grabbing the IBlockState
from the ItemBlock
when one is clicked on the camo-enabled blocks. I then try to get the model for that state.
I'm assuming the Chisel blocks may need an extended block state to know their proper model. And AFAIK there is no sane way for me to even try to serialize/deserialize and store that, and in addition I can't even really get that state from anywhere easily, without temporarily placing that block and then grabbing it from that. Many mods also don't seem to like it when getExtendedState()
is called on the server side, so then grabbing the extended state would have to happen on the client. Which would probably mean fake placing and grabbing the model during chunk rendering, which would likely be very bad for performance and cause other issues...
So basically I don't think there is any sane way for me to support "blocks with more complex models" without considerable extra code and complexity, and a whole lot of new potential issues. I'd be happy to hear it if there is an easy way to support them though.
I know that Ender IOs Painting Machine supports Chisel, but I am not sure how that works. I think they actually use the Chisel API for that.
This seems to be the core of the implementation for Ender IO. It might be helpful.
When trying to use a block from Chisel to disguise an Ender Elevator, the elevator simply turns transparent.