net.minecraft.client.render.entity.EntityRenderDispatcher Java Examples
The following examples show how to use
net.minecraft.client.render.entity.EntityRenderDispatcher.
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: SeaponyRenderer.java From MineLittlePony with MIT License | 6 votes |
public SeaponyRenderer(EntityRenderDispatcher manager) { super(manager); features.clear(); ponyRenderer = new Proxy<GuardianEntity, GuardianPonyModel>(features, manager, ModelType.GUARDIAN) { @Override public Identifier findTexture(GuardianEntity entity) { return SEAPONY; } @Override protected HeldItemFeature<GuardianEntity, GuardianPonyModel> createItemHoldingLayer() { return new GlowingItemFeature<>(this); } }; model = ponyRenderer.getModel(); }
Example #2
Source File: MoonVillagerRenderer.java From Galacticraft-Rewoven with MIT License | 5 votes |
public MoonVillagerRenderer(EntityRenderDispatcher renderManager) { super(renderManager, new MoonVillagerModel(0, 64, 64), 0.5F); this.addFeature(new HeadFeatureRenderer<>(this)); //this.addFeature(new VillagerClothingFeatureRenderer<>(this, reloadableResourceManager, "villager")); this.addFeature(new VillagerHeldItemFeatureRenderer<>(this)); }
Example #3
Source File: AbstractNpcRenderer.java From MineLittlePony with MIT License | 5 votes |
public AbstractNpcRenderer(EntityRenderDispatcher manager, ModelKey<? super M> key, String type, TextureSupplier<String> formatter) { super(manager, key); entityType = type; baseTextures = new PonyTextures<>(formatter); addFeature(new NpcClothingFeature<>(this, entityType)); }
Example #4
Source File: PonyStandRenderer.java From MineLittlePony with MIT License | 5 votes |
public PonyStandRenderer(EntityRenderDispatcher entityRenderDispatcher) { super(entityRenderDispatcher); features.clear(); addFeature(new Armour(this)); addFeature(new HeldItemFeatureRenderer<>(this)); addFeature(new ElytraFeatureRenderer<>(this)); addFeature(new HeadFeatureRenderer<>(this)); }
Example #5
Source File: PonyRenderDispatcher.java From MineLittlePony with MIT License | 5 votes |
/** * * Replaces an entity renderer depending on whether we want ponies or not. * * @param state True if we want ponies (the original will be stored) * @param type The type to replace * @param factory The replacement value * @param <T> The entity type */ @SuppressWarnings("unchecked") <T extends Entity, V extends T> void switchRenderer(boolean state, EntityType<V> type, Function<EntityRenderDispatcher, EntityRenderer<T>> factory) { if (state) { if (!renderMap.containsKey(type)) { renderMap.put(type, ((MixinEntityRenderDispatcher)MinecraftClient.getInstance().getEntityRenderManager()).getEntityRenderers().get(type)); } Mson.getInstance().getEntityRendererRegistry().registerEntityRenderer(type, factory); } else { if (renderMap.containsKey(type)) { Mson.getInstance().getEntityRendererRegistry().registerEntityRenderer(type, m -> (EntityRenderer<T>)renderMap.get(type)); } } }
Example #6
Source File: PillagerRenderer.java From MineLittlePony with MIT License | 4 votes |
public PillagerRenderer(EntityRenderDispatcher manager) { super(manager, ModelType.PILLAGER); }
Example #7
Source File: PonyRenderer.java From MineLittlePony with MIT License | 4 votes |
public Caster(EntityRenderDispatcher manager, ModelKey<? super M> key) { super(manager, key); }
Example #8
Source File: PonyRenderer.java From MineLittlePony with MIT License | 4 votes |
@SuppressWarnings({"rawtypes", "unchecked"}) public Proxy(List exportedLayers, EntityRenderDispatcher manager, ModelKey<M> key) { super(manager, key); exportedLayers.addAll(features); }
Example #9
Source File: PlayerModelKey.java From MineLittlePony with MIT License | 4 votes |
PlayerEntityRenderer create( EntityRenderDispatcher dispatcher, boolean slim, ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key );
Example #10
Source File: ZomponyVillagerRenderer.java From MineLittlePony with MIT License | 4 votes |
public ZomponyVillagerRenderer(EntityRenderDispatcher manager) { super(manager, ModelType.ZOMBIE_VILLAGER, TYPE, FORMATTER); }
Example #11
Source File: VillagerPonyRenderer.java From MineLittlePony with MIT License | 4 votes |
public VillagerPonyRenderer(EntityRenderDispatcher manager) { super(manager, ModelType.VILLAGER, TYPE, FORMATTER); }
Example #12
Source File: IllagerPonyRenderer.java From MineLittlePony with MIT License | 4 votes |
public IllagerPonyRenderer(EntityRenderDispatcher manager) { super(manager, ModelType.ILLAGER); }
Example #13
Source File: IllagerPonyRenderer.java From MineLittlePony with MIT License | 4 votes |
public Evoker(EntityRenderDispatcher manager) { super(manager); }
Example #14
Source File: IllagerPonyRenderer.java From MineLittlePony with MIT License | 4 votes |
public Illusionist(EntityRenderDispatcher manager) { super(manager); }
Example #15
Source File: TraderRenderer.java From MineLittlePony with MIT License | 4 votes |
public TraderRenderer(EntityRenderDispatcher manager) { super(manager, ModelType.ALICORN.getKey(false)); }
Example #16
Source File: PonyRenderDispatcher.java From MineLittlePony with MIT License | 4 votes |
private void addPlayerSkin(EntityRenderDispatcher manager, boolean slimArms, PlayerModels playerModel) { Mson.getInstance().getEntityRendererRegistry().registerPlayerRenderer( playerModel.getId(slimArms), playerModel.getModelKey().getRendererFactory(slimArms) ); }
Example #17
Source File: PlayerModelKey.java From MineLittlePony with MIT License | 4 votes |
@SuppressWarnings("unchecked") public Function<EntityRenderDispatcher, PlayerEntityRenderer> getRendererFactory(boolean slimArms) { return d -> rendererFactory.create(d, slimArms, (ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>>)getKey(slimArms)); }
Example #18
Source File: PlayerSeaponyRenderer.java From MineLittlePony with MIT License | 4 votes |
public PlayerSeaponyRenderer(EntityRenderDispatcher manager, boolean slim, ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key) { super(manager, slim, key); normalPony = new ModelWrapper<>(ModelType.<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>getPlayerModel(Race.UNICORN).getKey(slim)); seapony = this.manager.getModelWrapper(); }
Example #19
Source File: SkeleponyRenderer.java From MineLittlePony with MIT License | 4 votes |
public SkeleponyRenderer(EntityRenderDispatcher manager) { super(manager, ModelType.SKELETON); }
Example #20
Source File: SkeleponyRenderer.java From MineLittlePony with MIT License | 4 votes |
public Stray(EntityRenderDispatcher manager) { super(manager); addFeature(new StrayClothingFeature<>(this)); }
Example #21
Source File: SkeleponyRenderer.java From MineLittlePony with MIT License | 4 votes |
public Wither(EntityRenderDispatcher manager) { super(manager); }
Example #22
Source File: PonyRenderDispatcher.java From MineLittlePony with MIT License | 4 votes |
/** * Registers all new player skin types. (currently only pony and slimpony). */ public void initialise(EntityRenderDispatcher manager) { PlayerModels.registry.forEach(i -> registerPlayerSkin(manager, i)); MobRenderers.REGISTRY.values().forEach(i -> i.apply(this)); }
Example #23
Source File: PonyRenderDispatcher.java From MineLittlePony with MIT License | 4 votes |
private void registerPlayerSkin(EntityRenderDispatcher manager, PlayerModels playerModel) { if (playerModel != PlayerModels.DEFAULT) { addPlayerSkin(manager, false, playerModel); addPlayerSkin(manager, true, playerModel); } }
Example #24
Source File: ParaspriteRenderer.java From MineLittlePony with MIT License | 4 votes |
public ParaspriteRenderer(EntityRenderDispatcher dispatcher) { super(dispatcher, ModelType.PARASPRITE.createModel(), 0.5F); addFeature(new SaddleFeatureRenderer<>(this, ModelType.PARASPRITE.createModel(), SADDLE)); }
Example #25
Source File: EvolvedZombieRenderer.java From Galacticraft-Rewoven with MIT License | 4 votes |
public EvolvedZombieRenderer(EntityRenderDispatcher entityRenderDispatcher_1) { super(entityRenderDispatcher_1, new EvolvedZombieModel(1, 64, 64), 0.5F); }
Example #26
Source File: EvolvedCreeperEntityRenderer.java From Galacticraft-Rewoven with MIT License | 4 votes |
public EvolvedCreeperEntityRenderer(EntityRenderDispatcher dispatcher) { super(dispatcher, new EvolvedCreeperEntityModel(0.0F), 0.5F); this.addFeature(new EvolvedCreeperChargeFeatureRenderer(this)); }
Example #27
Source File: PumpcownEntityRenderer.java From the-hallow with MIT License | 4 votes |
public PumpcownEntityRenderer(EntityRenderDispatcher dispatcher) { super(dispatcher, new CowEntityModel(), 0.7F); this.addFeature(new PumpcownStemFeatureRenderer(this)); }
Example #28
Source File: MummyEntityRenderer.java From the-hallow with MIT License | 4 votes |
public MummyEntityRenderer(EntityRenderDispatcher erd) { super(erd); }
Example #29
Source File: CultistEntityRenderer.java From the-hallow with MIT License | 4 votes |
public CultistEntityRenderer(EntityRenderDispatcher erd) { super(erd, new CultistModel(), 0.5F); }
Example #30
Source File: HallowedTreasureChestEntityRenderer.java From the-hallow with MIT License | 4 votes |
public HallowedTreasureChestEntityRenderer(EntityRenderDispatcher dispatcher) { super(dispatcher); }