public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize) { RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager(); Render render = (Render)rendermanager.getEntityRenderMap().get(EntitySheep.class); if (!(render instanceof RenderSheep)) { Config.warn("Not a RenderSheep: " + render); return null; } else { if (render.getEntityClass() == null) { RenderSheep rendersheep = new RenderSheep(rendermanager); rendersheep.mainModel = new ModelSheep2(); rendersheep.shadowSize = 0.7F; render = rendersheep; } RenderSheep rendersheep1 = (RenderSheep)render; List<LayerRenderer<EntitySheep>> list = rendersheep1.getLayerRenderers(); Iterator iterator = list.iterator(); while (iterator.hasNext()) { LayerRenderer layerrenderer = (LayerRenderer)iterator.next(); if (layerrenderer instanceof LayerSheepWool) { iterator.remove(); } } LayerSheepWool layersheepwool = new LayerSheepWool(rendersheep1); layersheepwool.sheepModel = (ModelSheep1)modelBase; rendersheep1.addLayer(layersheepwool); return rendersheep1; } }
public RenderSheep(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn) { super(renderManagerIn, modelBaseIn, shadowSizeIn); this.addLayer(new LayerSheepWool(this)); }
public RenderSheep(RenderManager p_i47195_1_) { super(p_i47195_1_, new ModelSheep2(), 0.7F); this.addLayer(new LayerSheepWool(this)); }