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;
|
2020-03-19 21:33:44 +00:00
|
|
|
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()));
|
2020-03-19 21:33:44 +00:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|