mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
We don't need this to be a model, just use the part
This commit is contained in:
parent
a7ff78e141
commit
f8fc9467be
1 changed files with 3 additions and 3 deletions
|
@ -7,8 +7,8 @@ import net.minecraft.client.MinecraftClient;
|
|||
import net.minecraft.client.item.ClampedModelPredicateProvider;
|
||||
import net.minecraft.client.item.ModelPredicateProviderRegistry;
|
||||
import net.minecraft.client.model.*;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.model.TridentEntityModel;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
|
@ -26,7 +26,7 @@ public class PolearmRenderer implements DynamicItemRenderer, ClampedModelPredica
|
|||
private static final PolearmRenderer INSTANCE = new PolearmRenderer();
|
||||
private static final Identifier THROWING = new Identifier("throwing");
|
||||
|
||||
private final TridentEntityModel model = new TridentEntityModel(getTexturedModelData().createModel());
|
||||
private final ModelPart model = getTexturedModelData().createModel();
|
||||
|
||||
public static void register(Item...items) {
|
||||
for (Item item : items) {
|
||||
|
@ -89,7 +89,7 @@ public class PolearmRenderer implements DynamicItemRenderer, ClampedModelPredica
|
|||
}
|
||||
Identifier id = Registries.ITEM.getId(stack.getItem());
|
||||
Identifier texture = new Identifier(id.getNamespace(), "textures/entity/polearm/" + id.getPath() + ".png");
|
||||
model.render(matrices, ItemRenderer.getDirectItemGlintConsumer(vertexConsumers, model.getLayer(texture), false, stack.hasGlint()), light, overlay, 1, 1, 1, 1);
|
||||
model.render(matrices, ItemRenderer.getDirectItemGlintConsumer(vertexConsumers, RenderLayer.getEntitySolid(texture), false, stack.hasGlint()), light, overlay, 1, 1, 1, 1);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue