mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-28 22:05:01 +01:00
custom namespace support of CustomRenderedItemModels
This commit is contained in:
parent
f1701ae784
commit
7ddf11004b
5 changed files with 8 additions and 7 deletions
|
@ -8,7 +8,7 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
|||
public class SymmetryWandModel extends CustomRenderedItemModel {
|
||||
|
||||
public SymmetryWandModel(IBakedModel template) {
|
||||
super(template, "wand_of_symmetry");
|
||||
super(template, "create", "wand_of_symmetry");
|
||||
addPartials("bits", "core", "core_glow");
|
||||
}
|
||||
|
||||
|
@ -16,5 +16,5 @@ public class SymmetryWandModel extends CustomRenderedItemModel {
|
|||
public ItemStackTileEntityRenderer createRenderer() {
|
||||
return new SymmetryWandItemRenderer();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
|||
public class ExtendoGripModel extends CustomRenderedItemModel {
|
||||
|
||||
public ExtendoGripModel(IBakedModel template) {
|
||||
super(template, "extendo_grip");
|
||||
super(template, "create", "extendo_grip");
|
||||
addPartials("cog", "thin_short", "wide_short", "thin_long", "wide_long");
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
|||
public class PotatoCannonModel extends CustomRenderedItemModel {
|
||||
|
||||
public PotatoCannonModel(IBakedModel template) {
|
||||
super(template, "potato_cannon");
|
||||
super(template, "create", "potato_cannon");
|
||||
addPartials("cog");
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
|||
public class WorldshaperModel extends CustomRenderedItemModel {
|
||||
|
||||
public WorldshaperModel(IBakedModel template) {
|
||||
super(template, "handheld_worldshaper");
|
||||
super(template, "create", "handheld_worldshaper");
|
||||
addPartials("core", "core_glow", "accelerator");
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,9 @@ public abstract class CustomRenderedItemModel extends BakedModelWrapper<IBakedMo
|
|||
protected Map<String, IBakedModel> partials = new HashMap<>();
|
||||
protected ItemStackTileEntityRenderer renderer;
|
||||
|
||||
public CustomRenderedItemModel(IBakedModel template, String basePath) {
|
||||
public CustomRenderedItemModel(IBakedModel template, String namespace, String basePath) {
|
||||
super(template);
|
||||
this.namespace = namespace;
|
||||
this.basePath = basePath;
|
||||
this.renderer = createRenderer();
|
||||
}
|
||||
|
@ -72,7 +73,7 @@ public abstract class CustomRenderedItemModel extends BakedModelWrapper<IBakedMo
|
|||
}
|
||||
|
||||
private ResourceLocation getPartialModelLocation(String name) {
|
||||
return new ResourceLocation(Create.ID, "item/" + basePath + "/" + name);
|
||||
return new ResourceLocation(namespace, "item/" + basePath + "/" + name);
|
||||
}
|
||||
|
||||
public IBakedModel getPartial(String name) {
|
||||
|
|
Loading…
Reference in a new issue