Begin new model system
Includes some examples for both ways.
This commit is contained in:
parent
5c2ba20a32
commit
ba0b24d231
28 changed files with 332 additions and 104 deletions
|
@ -5,6 +5,7 @@ import net.minecraft.client.resources.model.ModelResourceLocation;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.iface.IActivatable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class CustomMeshDefinitionActivatable implements ItemMeshDefinition
|
||||
{
|
||||
|
@ -18,12 +19,9 @@ public class CustomMeshDefinitionActivatable implements ItemMeshDefinition
|
|||
public ModelResourceLocation getModelLocation(ItemStack stack)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof IActivatable)
|
||||
{
|
||||
if (!((IActivatable) stack.getItem()).getActivated(stack))
|
||||
return new ModelResourceLocation(Constants.Mod.DOMAIN + name + "0", "inventory");
|
||||
if (((IActivatable) stack.getItem()).getActivated(stack))
|
||||
return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "active=true");
|
||||
|
||||
return new ModelResourceLocation(Constants.Mod.DOMAIN + name + "1", "inventory");
|
||||
}
|
||||
return null;
|
||||
return new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), "active=false");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue