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 vote down vote up
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 vote down vote up
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 vote down vote up
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 vote down vote up
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 vote down vote up
/**
 *
 * 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 vote down vote up
public PillagerRenderer(EntityRenderDispatcher manager) {
    super(manager, ModelType.PILLAGER);
}
 
Example #7
Source File: PonyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Caster(EntityRenderDispatcher manager, ModelKey<? super M> key) {
    super(manager, key);
}
 
Example #8
Source File: PonyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
@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 vote down vote up
PlayerEntityRenderer create(
        EntityRenderDispatcher dispatcher,
        boolean slim,
        ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key
);
 
Example #10
Source File: ZomponyVillagerRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public ZomponyVillagerRenderer(EntityRenderDispatcher manager) {
    super(manager, ModelType.ZOMBIE_VILLAGER, TYPE, FORMATTER);
}
 
Example #11
Source File: VillagerPonyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public VillagerPonyRenderer(EntityRenderDispatcher manager) {
    super(manager, ModelType.VILLAGER, TYPE, FORMATTER);
}
 
Example #12
Source File: IllagerPonyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public IllagerPonyRenderer(EntityRenderDispatcher manager) {
    super(manager, ModelType.ILLAGER);
}
 
Example #13
Source File: IllagerPonyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Evoker(EntityRenderDispatcher manager) {
    super(manager);
}
 
Example #14
Source File: IllagerPonyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Illusionist(EntityRenderDispatcher manager) {
    super(manager);
}
 
Example #15
Source File: TraderRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public TraderRenderer(EntityRenderDispatcher manager) {
    super(manager, ModelType.ALICORN.getKey(false));
}
 
Example #16
Source File: PonyRenderDispatcher.java    From MineLittlePony with MIT License 4 votes vote down vote up
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 vote down vote up
@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 vote down vote up
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 vote down vote up
public SkeleponyRenderer(EntityRenderDispatcher manager) {
    super(manager, ModelType.SKELETON);
}
 
Example #20
Source File: SkeleponyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Stray(EntityRenderDispatcher manager) {
    super(manager);
    addFeature(new StrayClothingFeature<>(this));
}
 
Example #21
Source File: SkeleponyRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Wither(EntityRenderDispatcher manager) {
    super(manager);
}
 
Example #22
Source File: PonyRenderDispatcher.java    From MineLittlePony with MIT License 4 votes vote down vote up
/**
 * 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 vote down vote up
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 vote down vote up
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 vote down vote up
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 vote down vote up
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 vote down vote up
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 vote down vote up
public MummyEntityRenderer(EntityRenderDispatcher erd) {
	super(erd);
}
 
Example #29
Source File: CultistEntityRenderer.java    From the-hallow with MIT License 4 votes vote down vote up
public CultistEntityRenderer(EntityRenderDispatcher erd) {
	super(erd, new CultistModel(), 0.5F);
}
 
Example #30
Source File: HallowedTreasureChestEntityRenderer.java    From the-hallow with MIT License 4 votes vote down vote up
public HallowedTreasureChestEntityRenderer(EntityRenderDispatcher dispatcher) {
	super(dispatcher);
}