Reimplemented Sentient Tools

Reimplemented the Sentient Axe, Pickaxe, and Shovel, as well as fixed the ability for the sentient weaponry to drop aspected Will.
This commit is contained in:
WayofTime 2020-11-08 21:35:26 -05:00
parent 0297f3a979
commit de5b422a41
32 changed files with 1987 additions and 2 deletions
src/main/java/wayoftime/bloodmagic/common/data

View file

@ -60,6 +60,9 @@ public class GeneratorItemModels extends ItemModelProvider
registerDemonWillVariantItem(BloodMagicItems.COMMON_GEM.get());
registerDemonWillVariantItem(BloodMagicItems.GREATER_GEM.get());
registerDemonSword(BloodMagicItems.SENTIENT_SWORD.get());
registerDemonTool(BloodMagicItems.SENTIENT_AXE.get());
registerDemonTool(BloodMagicItems.SENTIENT_PICKAXE.get());
registerDemonTool(BloodMagicItems.SENTIENT_SHOVEL.get());
}
private void registerCustomBlockPath(Block block, String newPath)
@ -124,4 +127,22 @@ public class GeneratorItemModels extends ItemModelProvider
}
}
}
private void registerDemonTool(Item item)
{
String path = item.getRegistryName().getPath();
ItemModelBuilder builder = getBuilder(path);
for (EnumDemonWillType type : EnumDemonWillType.values())
{
String name = "";
if (type.ordinal() != 0)
{
name = "_" + type.name().toLowerCase() + name;
}
ModelFile willFile = singleTexture("item/variants/" + path + name, mcLoc("item/handheld"), "layer0", modLoc("item/" + path + name));
builder = builder.override().predicate(BloodMagic.rl("type"), type.ordinal()).model(willFile).end();
}
}
}