net.minecraft.client.render.entity.model.EntityModel Java Examples
The following examples show how to use
net.minecraft.client.render.entity.model.EntityModel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ElytraFeature.java From MineLittlePony with MIT License | 6 votes |
@Override public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, T entity, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) { ItemStack itemstack = entity.getEquippedStack(EquipmentSlot.CHEST); if (itemstack.getItem() == Items.ELYTRA) { stack.push(); preRenderCallback(stack); EntityModel<T> elytra = getElytraModel(); getContextModel().copyStateTo(elytra); if (elytra instanceof PonyElytra) { ((PonyElytra<T>)elytra).isSneaking = getContext().getEntityPony(entity).isCrouching(entity); } elytra.setAngles(entity, limbDistance, limbAngle, age, headYaw, headPitch); VertexConsumer vertexConsumer = ItemRenderer.method_29711(renderContext, modelElytra.getLayer(getElytraTexture(entity)), false, itemstack.hasEnchantmentGlint()); modelElytra.render(stack, vertexConsumer, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1); stack.pop(); } }
Example #2
Source File: PonyRenderDispatcher.java From MineLittlePony with MIT License | 5 votes |
@SuppressWarnings("unchecked") @Nullable public <T extends LivingEntity, M extends EntityModel<T> & IPonyModel<T>> IPonyRenderContext<T, M> getPonyRenderer(@Nullable T entity) { if (entity == null) { return null; } EntityRenderer<?> renderer = MinecraftClient.getInstance().getEntityRenderManager().getRenderer(entity); if (renderer instanceof IPonyRenderContext) { return (IPonyRenderContext<T, M>) renderer; } return null; }
Example #3
Source File: EvolvedCreeperChargeFeatureRenderer.java From Galacticraft-Rewoven with MIT License | 4 votes |
@Override protected EntityModel<EvolvedCreeperEntity> getEnergySwirlModel() { return model; }
Example #4
Source File: ElytraFeature.java From MineLittlePony with MIT License | 4 votes |
protected EntityModel<T> getElytraModel() { return modelElytra; }
Example #5
Source File: GuardianPonyModel.java From MineLittlePony with MIT License | 4 votes |
@Override public void copyStateTo(EntityModel<GuardianEntity> model) { mixin().copyStateTo(model); }