mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
Add CreateCustomRenderedItemModel
- Allows Create's classes to not have to pass the namespace every time
This commit is contained in:
parent
80100ff504
commit
20b2ec4b63
9 changed files with 34 additions and 22 deletions
|
@ -1,14 +1,14 @@
|
||||||
package com.simibubi.create.content.contraptions.wrench;
|
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.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||||
|
|
||||||
public class WrenchModel extends CustomRenderedItemModel {
|
public class WrenchModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public WrenchModel(IBakedModel template) {
|
public WrenchModel(IBakedModel template) {
|
||||||
super(template, "create", "wrench");
|
super(template, "wrench");
|
||||||
addPartials("gear");
|
addPartials("gear");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package com.simibubi.create.content.curiosities.symmetry.client;
|
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.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||||
|
|
||||||
public class SymmetryWandModel extends CustomRenderedItemModel {
|
public class SymmetryWandModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public SymmetryWandModel(IBakedModel template) {
|
public SymmetryWandModel(IBakedModel template) {
|
||||||
super(template, "create", "wand_of_symmetry");
|
super(template, "wand_of_symmetry");
|
||||||
addPartials("bits", "core", "core_glow");
|
addPartials("bits", "core", "core_glow");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package com.simibubi.create.content.curiosities.tools;
|
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.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||||
|
|
||||||
public class ExtendoGripModel extends CustomRenderedItemModel {
|
public class ExtendoGripModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public ExtendoGripModel(IBakedModel template) {
|
public ExtendoGripModel(IBakedModel template) {
|
||||||
super(template, "create", "extendo_grip");
|
super(template, "extendo_grip");
|
||||||
addPartials("cog", "thin_short", "wide_short", "thin_long", "wide_long");
|
addPartials("cog", "thin_short", "wide_short", "thin_long", "wide_long");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.simibubi.create.content.curiosities.tools;
|
package com.simibubi.create.content.curiosities.tools;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
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 com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -79,10 +79,10 @@ public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {
|
||||||
ms.popPose();
|
ms.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class SandPaperModel extends CustomRenderedItemModel {
|
public static class SandPaperModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public SandPaperModel(IBakedModel template) {
|
public SandPaperModel(IBakedModel template) {
|
||||||
super(template, "create","");
|
super(template, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package com.simibubi.create.content.curiosities.weapons;
|
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.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||||
|
|
||||||
public class PotatoCannonModel extends CustomRenderedItemModel {
|
public class PotatoCannonModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public PotatoCannonModel(IBakedModel template) {
|
public PotatoCannonModel(IBakedModel template) {
|
||||||
super(template, "create", "potato_cannon");
|
super(template, "potato_cannon");
|
||||||
addPartials("cog");
|
addPartials("cog");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package com.simibubi.create.content.curiosities.zapper.terrainzapper;
|
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.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||||
|
|
||||||
public class WorldshaperModel extends CustomRenderedItemModel {
|
public class WorldshaperModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public WorldshaperModel(IBakedModel template) {
|
public WorldshaperModel(IBakedModel template) {
|
||||||
super(template, "create", "handheld_worldshaper");
|
super(template, "handheld_worldshaper");
|
||||||
addPartials("core", "core_glow", "accelerator");
|
addPartials("core", "core_glow", "accelerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package com.simibubi.create.content.logistics.item;
|
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.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||||
|
|
||||||
public class LinkedControllerModel extends CustomRenderedItemModel {
|
public class LinkedControllerModel extends CreateCustomRenderedItemModel {
|
||||||
|
|
||||||
public LinkedControllerModel(IBakedModel template) {
|
public LinkedControllerModel(IBakedModel template) {
|
||||||
super(template, "create", "linked_controller");
|
super(template, "linked_controller");
|
||||||
addPartials("powered", "button");
|
addPartials("powered", "button");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -6,7 +6,6 @@ import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.Create;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||||
|
|
Loading…
Reference in a new issue