This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
SlightlyVanilla/src/main/java/com/thebrokenrail/slightlyvanilla/client/SlightlyVanillaClient.java

33 lines
1.6 KiB
Java
Raw Normal View History

2020-03-19 19:45:46 +00:00
package com.thebrokenrail.slightlyvanilla.client;
2020-03-20 01:26:13 +00:00
import com.google.common.collect.Lists;
2020-03-19 19:45:46 +00:00
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
import com.thebrokenrail.slightlyvanilla.ModConfig;
import com.thebrokenrail.slightlyvanilla.entity.SlimeballEntity;
import com.thebrokenrail.slightlyvanilla.entity.SpawnEggEntity;
2020-03-19 19:45:46 +00:00
import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
public class SlightlyVanillaClient implements ClientModInitializer, ModMenuApi {
@Override
public void onInitializeClient() {
EntityRendererRegistry.INSTANCE.register(SlightlyVanilla.SLIMEBALL_ENTITY, (entityRenderDispatcher, context) -> new FlyingItemEntityRenderer<SlimeballEntity>(entityRenderDispatcher, context.getItemRenderer()));
EntityRendererRegistry.INSTANCE.register(SlightlyVanilla.SPAWN_EGG_ENTITY, (entityRenderDispatcher, context) -> new FlyingItemEntityRenderer<SpawnEggEntity>(entityRenderDispatcher, context.getItemRenderer()));
2020-03-19 19:45:46 +00:00
}
@Override
public String getModId() {
return SlightlyVanilla.NAMESPACE;
}
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return (ConfigScreenFactory<Screen>) screen -> AutoConfig.getConfigScreen(ModConfig.class, screen).get();
}
}