Add CreateCustomRenderedItemModel

- Allows Create's classes to not have to pass the namespace every time
This commit is contained in:
PepperBell 2021-08-28 11:53:45 -07:00
parent 80100ff504
commit 20b2ec4b63
9 changed files with 34 additions and 22 deletions

View File

@ -1,14 +1,14 @@
package com.simibubi.create.content.contraptions.wrench;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
public class WrenchModel extends CustomRenderedItemModel {
public class WrenchModel extends CreateCustomRenderedItemModel {
public WrenchModel(IBakedModel template) {
super(template, "create", "wrench");
super(template, "wrench");
addPartials("gear");
}

View File

@ -1,14 +1,14 @@
package com.simibubi.create.content.curiosities.symmetry.client;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
public class SymmetryWandModel extends CustomRenderedItemModel {
public class SymmetryWandModel extends CreateCustomRenderedItemModel {
public SymmetryWandModel(IBakedModel template) {
super(template, "create", "wand_of_symmetry");
super(template, "wand_of_symmetry");
addPartials("bits", "core", "core_glow");
}

View File

@ -1,14 +1,14 @@
package com.simibubi.create.content.curiosities.tools;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
public class ExtendoGripModel extends CustomRenderedItemModel {
public class ExtendoGripModel extends CreateCustomRenderedItemModel {
public ExtendoGripModel(IBakedModel template) {
super(template, "create", "extendo_grip");
super(template, "extendo_grip");
addPartials("cog", "thin_short", "wide_short", "thin_long", "wide_long");
}

View File

@ -1,7 +1,7 @@
package com.simibubi.create.content.curiosities.tools;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft;
@ -79,10 +79,10 @@ public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {
ms.popPose();
}
public static class SandPaperModel extends CustomRenderedItemModel {
public static class SandPaperModel extends CreateCustomRenderedItemModel {
public SandPaperModel(IBakedModel template) {
super(template, "create","");
super(template, "");
}
@Override

View File

@ -1,14 +1,14 @@
package com.simibubi.create.content.curiosities.weapons;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
public class PotatoCannonModel extends CustomRenderedItemModel {
public class PotatoCannonModel extends CreateCustomRenderedItemModel {
public PotatoCannonModel(IBakedModel template) {
super(template, "create", "potato_cannon");
super(template, "potato_cannon");
addPartials("cog");
}

View File

@ -1,14 +1,14 @@
package com.simibubi.create.content.curiosities.zapper.terrainzapper;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
public class WorldshaperModel extends CustomRenderedItemModel {
public class WorldshaperModel extends CreateCustomRenderedItemModel {
public WorldshaperModel(IBakedModel template) {
super(template, "create", "handheld_worldshaper");
super(template, "handheld_worldshaper");
addPartials("core", "core_glow", "accelerator");
}

View File

@ -1,14 +1,14 @@
package com.simibubi.create.content.logistics.item;
import com.simibubi.create.foundation.item.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
public class LinkedControllerModel extends CustomRenderedItemModel {
public class LinkedControllerModel extends CreateCustomRenderedItemModel {
public LinkedControllerModel(IBakedModel template) {
super(template, "create", "linked_controller");
super(template, "linked_controller");
addPartials("powered", "button");
}

View File

@ -0,0 +1,13 @@
package com.simibubi.create.foundation.item.render;
import com.simibubi.create.Create;
import net.minecraft.client.renderer.model.IBakedModel;
public abstract class CreateCustomRenderedItemModel extends CustomRenderedItemModel {
public CreateCustomRenderedItemModel(IBakedModel template, String basePath) {
super(template, Create.ID, basePath);
}
}

View File

@ -6,7 +6,6 @@ import java.util.Map;
import java.util.stream.Collectors;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.Create;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms;