maruohon / enderutilities

A Minecraft mod that adds various (mostly "ender-themed") blocks and items
GNU Lesser General Public License v3.0
27 stars 15 forks source link

[1.11.2] Ender Elevator does not support Chisel Blocks #52

Closed brisingraerowing closed 7 years ago

brisingraerowing commented 7 years ago

When trying to use a block from Chisel to disguise an Ender Elevator, the elevator simply turns transparent.

maruohon commented 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.

brisingraerowing commented 7 years ago

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.

brisingraerowing commented 7 years ago

https://github.com/SleepyTrousers/EnderIO/blob/19a5fdac052df9c1f8f180537d7d32943471bed0/src/main/java/crazypants/util/IFacade.java

This seems to be the core of the implementation for Ender IO. It might be helpful.