net.minecraft.client.renderer.entity.Render Java Examples
The following examples show how to use
net.minecraft.client.renderer.entity.Render.
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: ClientProxy.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
public static <T extends Render> T unregisterRenderer(Class<? extends Entity> entityClass, Class<T> renderClass) { Injector registry = new Injector(RenderingRegistry.instance()); List entityRenderers = registry.getField("entityRenderers"); if(entityRenderers == null) { FMLLog.severe("Failed to get entityRenderers field in RenderingRegistry!"); return null; } for(int i = 0; i < entityRenderers.size(); i++) { Injector pair = new Injector(entityRenderers.get(i)); Class<? extends Entity> target = pair.getField("target"); if(entityClass.equals(target)) { Render render = pair.getField("renderer"); if(renderClass.isInstance(render)) { entityRenderers.remove(i); return (T)render; } } } return null; }
Example #2
Source File: RenderCyberlimbHand.java From Cyberware with MIT License | 6 votes |
private void renderArm(EnumHandSide p_187455_1_) { this.mc.getTextureManager().bindTexture(this.mc.thePlayer.getLocationSkin()); Render<AbstractClientPlayer> render = getEntityRenderObject(this.mc.thePlayer, p_187455_1_); RenderPlayer renderplayer = (RenderPlayer)render; GlStateManager.pushMatrix(); float f = p_187455_1_ == EnumHandSide.RIGHT ? 1.0F : -1.0F; GlStateManager.rotate(92.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(f * -41.0F, 0.0F, 0.0F, 1.0F); GlStateManager.translate(f * 0.3F, -1.1F, 0.45F); if (p_187455_1_ == EnumHandSide.RIGHT) { renderplayer.renderRightArm(this.mc.thePlayer); } else { renderplayer.renderLeftArm(this.mc.thePlayer); } GlStateManager.popMatrix(); }
Example #3
Source File: ClientProxy.java From Wizardry with GNU Lesser General Public License v3.0 | 6 votes |
@Override public void init(FMLInitializationEvent event) { super.init(event); MinecraftForge.EVENT_BUS.register(CapeHandler.instance()); Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap(); for (RenderPlayer render : skinMap.values()) { // render.addLayer(new BloodRenderLayer(render)); render.addLayer(new RenderHaloEntity(render.getMainModel().bipedHead)); } Map<Class<? extends Entity>, Render<? extends Entity>> map = Minecraft.getMinecraft().getRenderManager().entityRenderMap; for (ResourceLocation entity : EntityList.getEntityNameList()) { Class<? extends Entity> clazz = EntityList.getClass(entity); Render<? extends Entity> entityRenderer = map.get(clazz); if (entityRenderer instanceof RenderLiving<?>) { ModelBase main = ((RenderLiving<?>) entityRenderer).getMainModel(); ModelRenderer renderer = null; if (main instanceof ModelBiped) renderer = ((ModelBiped) main).bipedHead; ((RenderLiving<?>) entityRenderer).addLayer(new RenderHaloEntity(renderer)); } } }
Example #4
Source File: ClientEventHandler.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
private void setRenderHead(EntityLivingBase entity, boolean setRender){ if(entity.getEquipmentInSlot(4) != null && entity.getEquipmentInSlot(4).getItem() == Itemss.pneumaticHelmet && (Config.useHelmetModel || DateEventHandler.isIronManEvent())) { Render renderer = RenderManager.instance.getEntityRenderObject(entity); if(renderer instanceof RenderBiped) { ((RenderBiped)renderer).modelBipedMain.bipedHead.showModel = setRender; } } }
Example #5
Source File: ProxyFunctions.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
public static net.minecraftforge.fml.client.registry.IRenderFactory entityVillagerRenderer(){ return new net.minecraftforge.fml.client.registry.IRenderFactory(){ @Override public Render createRenderFor(RenderManager manager) { return new net.minecraft.client.renderer.entity.RenderVillager(manager); } }; }
Example #6
Source File: ProxyClient.java From WearableBackpacks with MIT License | 5 votes |
/** Ensures that the specified entity class' renderer has a backpack layer - if possible. */ public static void ensureHasBackpackLayer(Class<? extends EntityLivingBase> entityClass) { if (!_hasLayerChecked.add(entityClass)) return; RenderManager manager = Minecraft.getMinecraft().getRenderManager(); Render<?> render = manager.getEntityClassRenderObject(entityClass); if (!(render instanceof RenderLivingBase)) return; ((RenderLivingBase<?>)render).addLayer(new RendererBackpack.Layer((RenderLivingBase<?>)render)); }
Example #7
Source File: ClientProxy.java From LookingGlass with GNU General Public License v3.0 | 5 votes |
/** * Run during mod init. */ @Override public void init() { // We register the portal renderer here Render render; render = new RenderPortal(); render.setRenderManager(RenderManager.instance); RenderingRegistry.registerEntityRenderingHandler(EntityPortal.class, render); }
Example #8
Source File: EntityToro.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityToro.class, new IRenderFactory<EntityToro>() { @Override public Render<EntityToro> createRenderFor(RenderManager manager) { return new RenderToro(manager, new ModelToro(), 0.7F); } }); }
Example #9
Source File: EntityRainbowGuard.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityRainbowGuard.class, new IRenderFactory<EntityRainbowGuard>() { @Override public Render<EntityRainbowGuard> createRenderFor(RenderManager manager) { return new RenderRainbowGuard(manager); } }); }
Example #10
Source File: EntityBas.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityBas.class, new IRenderFactory<EntityBas>() { @Override public Render<EntityBas> createRenderFor(RenderManager manager) { return new RenderBas(manager); } }); }
Example #11
Source File: EntityGuard.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityGuard.class, new IRenderFactory<EntityGuard>() { @Override public Render<EntityGuard> createRenderFor(RenderManager manager) { return new RenderGuard(manager); } }); }
Example #12
Source File: EntitySentry.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntitySentry.class, new IRenderFactory<EntitySentry>() { @Override public Render<EntitySentry> createRenderFor(RenderManager manager) { return new RenderSentry(manager); } }); }
Example #13
Source File: ToroQuestEntityRenders.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerMonolithEyeRenderer() { RenderingRegistry.registerEntityRenderingHandler(EntityMonolithEye.class, new IRenderFactory<EntityMonolithEye>() { @Override public Render<EntityMonolithEye> createRenderFor(RenderManager manager) { return new RenderMonolithEye(manager); } }); }
Example #14
Source File: EntityFugitive.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityFugitive.class, new IRenderFactory<EntityFugitive>() { @Override public Render<EntityFugitive> createRenderFor(RenderManager manager) { return new RenderFugitive(manager); } }); }
Example #15
Source File: EntityVampireBat.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityVampireBat.class, new IRenderFactory<EntityVampireBat>() { @Override public Render<EntityVampireBat> createRenderFor(RenderManager manager) { return new RenderVampireBat(manager); } }); }
Example #16
Source File: EntityVillageLord.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityVillageLord.class, new IRenderFactory<EntityVillageLord>() { @Override public Render<EntityVillageLord> createRenderFor(RenderManager manager) { return new RenderVillageLord(manager); } }); }
Example #17
Source File: EntityShopkeeper.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityShopkeeper.class, new IRenderFactory<EntityShopkeeper>() { @Override public Render<EntityShopkeeper> createRenderFor(RenderManager manager) { return new RenderShopkeeper(manager); } }); }
Example #18
Source File: EntityRainbowKing.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityRainbowKing.class, new IRenderFactory<EntityRainbowKing>() { @Override public Render<? super EntityRainbowKing> createRenderFor(RenderManager manager) { return new RenderRainbowKing(manager); } }); }
Example #19
Source File: Mobycraft.java From mobycraft with Apache License 2.0 | 5 votes |
public void registerModEntity(Class entityClass, Render render, String entityName, int entityId, int foregroundColor, int backgroundColor) { EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityId, foregroundColor, backgroundColor); EntityRegistry.registerModEntity(entityClass, entityName, entityId, this, 80, 1, false); RenderingRegistry.registerEntityRenderingHandler(entityClass, render); }
Example #20
Source File: ToroQuestEntityRenders.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void registerMageRenderer() { RenderingRegistry.registerEntityRenderingHandler(EntityMage.class, new IRenderFactory<EntityMage>() { @Override public Render<EntityMage> createRenderFor(RenderManager manager) { return new RenderMage(manager); } }); }
Example #21
Source File: RenderFluidCow.java From Moo-Fluids with GNU General Public License v3.0 | 4 votes |
@Override public Render<? super EntityFluidCow> createRenderFor(RenderManager renderManager) { return new RenderFluidCow(renderManager); }
Example #22
Source File: OverEngineeredPieceOfSh_RenderFactory.java From AdvancedRocketry with MIT License | 4 votes |
@Override public Render<? super Entity> createRenderFor(RenderManager manager) { return new RendererRocket(manager); }
Example #23
Source File: RenderEventCow.java From Moo-Fluids with GNU General Public License v3.0 | 4 votes |
@Override public Render<? super EntityCow> createRenderFor(RenderManager renderManager) { return new RenderEventCow(renderManager); }
Example #24
Source File: RenderFireflyWrapper.java From GardenCollection with MIT License | 4 votes |
public RenderFireflyWrapper () { try { render = (Render) TwilightForestIntegration.constRenderFirefly.newInstance(); } catch (Throwable t) { } }
Example #25
Source File: RenderPrimedCharge.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
@Override public Render<? super EntityPrimedCharge> createRenderFor(RenderManager manager) { return new RenderPrimedCharge(manager); }
Example #26
Source File: RenderEntityOwlEgg.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
@Override public Render<? super EntityOwlEgg> createRenderFor(RenderManager manager) { return new RenderEntityOwlEgg(manager, Minecraft.getMinecraft().getRenderItem()); }
Example #27
Source File: RenderWitherCat.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
@Override public Render<? super EntityWitherCat> createRenderFor(RenderManager manager) { return new RenderWitherCat(manager); }
Example #28
Source File: RenderEnderminy.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
@Override public Render<? super EntityEnderminy> createRenderFor(RenderManager manager) { return new RenderEnderminy(manager); }
Example #29
Source File: RenderConcussionCreeper.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
@Override public Render<? super EntityCreeper> createRenderFor(RenderManager manager) { return new RenderConcussionCreeper(manager); }
Example #30
Source File: RenderOwl.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
@Override public Render<? super EntityOwl> createRenderFor(RenderManager manager) { return new RenderOwl(manager); }