net.minecraft.client.renderer.entity.layers.LayerHeldItem Java Examples

The following examples show how to use net.minecraft.client.renderer.entity.layers.LayerHeldItem. 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: RenderSamuraiIllager.java    From Sakura_mod with MIT License 6 votes vote down vote up
public RenderSamuraiIllager(RenderManager p_i47477_1_) {
    super(p_i47477_1_, new ModelSamuraiIllager(0.0F, 0.0F, 64, 64), 0.5F);
    this.addLayer(new LayerHeldItem(this) {
        public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
            if ((((EntitySamuraiIllager) entitylivingbaseIn).isAggressive())) {
                super.doRenderLayer(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
            }
        }

        protected void translateToHand(EnumHandSide p_191361_1_) {
            ((ModelIllager) this.livingEntityRenderer.getMainModel()).getArm(p_191361_1_).postRender(0.0625F);
        }
    });

    ((ModelIllager) this.getMainModel()).hat.showModel = false;
}
 
Example #2
Source File: RenderGuard.java    From ToroQuest with GNU General Public License v3.0 6 votes vote down vote up
public RenderGuard(RenderManager renderManagerIn) {
	super(renderManagerIn, new ModelGuard(), 0.5F);

	LayerRenderer<?> layerrenderer = (LayerRenderer) this.layerRenderers.get(0);
	defaultModel = (ModelGuard) mainModel;

	addLayer(new LayerHeldItem(this));

	LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) {
		protected void initArmor() {
			modelLeggings = new ModelZombie(0.5F, true);
			modelArmor = new ModelZombie(1.0F, true);
		}
	};
	addLayer(layerbipedarmor);

	// addLayer(new LayerCape(this));

	this.defaultLayers = Lists.newArrayList(this.layerRenderers);

}
 
Example #3
Source File: RenderTofuMindCore.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public RenderTofuMindCore(RenderManager p_i48864_1_) {
    super(p_i48864_1_, new ModelTofuMindCore(), 0.5F);
    this.addLayer(new LayerGlowEye<>(this, "textures/mob/tofumindcore/tofumindcore_eye.png"));
    this.addLayer(new LayerHeldItem(this) {
        @Override
        public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
            GlStateManager.translate(0.0F, 0.35F, 0.0F);
            super.doRenderLayer(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
        }
    });
}
 
Example #4
Source File: RenderMage.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
public RenderMage(RenderManager renderManagerIn) {
	super(renderManagerIn, new ModelMage(), 0.5F);
	this.mageModel = getMainModel();
	addLayer(new LayerHeldItem(this));
}