TheGreyGhost / ItemTransformHelper

A Minecraft helper tool to interactively adjust the rotation, position, and scale of Items.
16 stars 9 forks source link

Allow wrapping ISmartItemModel and IFlexibleBakedModel #1

Closed maruohon closed 9 years ago

maruohon commented 9 years ago

Changed the ItemModelFlexibleCamera to implement IFlexibleBakedModel instead of IBakedModel. Also made it implement ISmartItemModel. In case of ISmartItemModel type models, the actual model is retrieved from the ISmartItemModel.handleItemState() and stored in the iBakedModel field. There is a new field wrappedModel which in this case stores the original wrapped model (which is the ISmartItemModel model).

(This at least worked for my items in Ender Utilities, which all use a generic ISmartItemModel model wrapper, which then retrieves the actual models from the item class, which are generated in code from the base models. This allows me to use a single generic json model for most items, and then just have separate json base models for items that require specific rotations, like tools.)

TheGreyGhost commented 9 years ago

Thanks, looks good! I'll merge it.

Cheers TGG