Search in sources :

Example 1 with ToolModelData

use of net.silentchaos512.gems.lib.client.ToolModelData in project SilentGems by SilentChaos512.

the class ToolRenderHelper method updateModelCache.

@Override
public void updateModelCache(ItemStack toolOrArmor) {
    if (ToolHelper.hasUUID(toolOrArmor)) {
        UUID uuid = ToolHelper.getUUID(toolOrArmor);
        IModelData modelData = toolOrArmor.getItem() instanceof ITool ? new ToolModelData(toolOrArmor) : new ArmorModelData(toolOrArmor);
        if (ToolHelper.isExampleItem(toolOrArmor)) {
            modelCacheExamples.put(uuid, modelData);
        } else {
            modelCache.put(uuid, modelData);
        }
    }
}
Also used : ToolModelData(net.silentchaos512.gems.lib.client.ToolModelData) ArmorModelData(net.silentchaos512.gems.lib.client.ArmorModelData) UUID(java.util.UUID) ITool(net.silentchaos512.gems.api.ITool) IModelData(net.silentchaos512.gems.lib.client.IModelData)

Aggregations

UUID (java.util.UUID)1 ITool (net.silentchaos512.gems.api.ITool)1 ArmorModelData (net.silentchaos512.gems.lib.client.ArmorModelData)1 IModelData (net.silentchaos512.gems.lib.client.IModelData)1 ToolModelData (net.silentchaos512.gems.lib.client.ToolModelData)1