Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Creators
Details
Reflect
Reflect is a small item rendering library for older and newer versions alike, focusing on compatibility and ease of use of various models for one item.
SimpleModelItem
Implementing SimpleModelItem into your Item class will present you with three needed parameters, the primaryModel, secondaryModel, and getPreset. These primary and secondary models are the two models your item will use, such as test_item_handheld and test_item.
getPreset is the method for using one of the three presets Reflect offers, which are:
Handheld - Seperates the primary model to be used as the in-hand model for the item, and the secondary as the gui and ground model.
WhileUsing - Uses the primary model when the user is not using the item, and the secondary when they are using the item.
WhileSneaking - Same as WhileUsing, but for sneaking.
ComplexModelItem
Implementing ComplexModelItem presents you with only two methods, but much more capabilities. Instead of set presets, ComplexModelItem allows you to set the model of the item in any way you want, with as many models as you want. However, each model MUST be added to the list of strings, getLoadedModels, otherwise they will not be loaded when the game starts.
Analogous Features
Inside of both Simple and Complex Model Items, there is a method named getPlugin, prompting for a ReflectPlugin.
When setting up your project, you must add this in your initializer, and use that ReflectPlugin in all of your Reflect-related features.
public static ReflectPlugin testPlugin = ReflectPlugin.register(MOD_ID);
This ReflectPlugin is registered under your Mod's ID inside of the initializer class preferably.
Other
This mod is heavily inspired by ModelVaryingItem from the AcornLib library by AcoYT, and I heavily recommend you use that library in newer versions.


