2020-04-15 14:22:03 +02:00
|
|
|
package com.minelittlepony.unicopia.client;
|
|
|
|
|
2020-04-26 22:40:43 +02:00
|
|
|
import com.minelittlepony.unicopia.block.UBlocks;
|
2020-05-07 13:16:55 +02:00
|
|
|
import com.minelittlepony.unicopia.client.gui.UScreens;
|
2020-04-22 16:28:20 +02:00
|
|
|
import com.minelittlepony.unicopia.client.particle.ChangelingMagicParticle;
|
|
|
|
import com.minelittlepony.unicopia.client.particle.DiskParticle;
|
|
|
|
import com.minelittlepony.unicopia.client.particle.MagicParticle;
|
|
|
|
import com.minelittlepony.unicopia.client.particle.RaindropsParticle;
|
|
|
|
import com.minelittlepony.unicopia.client.particle.SphereParticle;
|
2020-04-15 14:22:03 +02:00
|
|
|
import com.minelittlepony.unicopia.client.render.ButterflyEntityRenderer;
|
|
|
|
import com.minelittlepony.unicopia.client.render.CloudEntityRenderer;
|
|
|
|
import com.minelittlepony.unicopia.client.render.CuccoonEntityRenderer;
|
|
|
|
import com.minelittlepony.unicopia.client.render.RainbowEntityRenderer;
|
|
|
|
import com.minelittlepony.unicopia.client.render.SpearEntityRenderer;
|
2020-04-22 16:28:20 +02:00
|
|
|
import com.minelittlepony.unicopia.client.render.SpellbookEntityRender;
|
2020-04-15 14:22:03 +02:00
|
|
|
import com.minelittlepony.unicopia.client.render.SpellcastEntityRenderer;
|
2020-04-22 16:28:20 +02:00
|
|
|
import com.minelittlepony.unicopia.entity.UEntities;
|
|
|
|
import com.minelittlepony.unicopia.particles.UParticles;
|
|
|
|
|
2020-04-26 22:40:43 +02:00
|
|
|
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
2020-04-22 16:28:20 +02:00
|
|
|
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
|
|
|
|
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
2020-04-26 22:40:43 +02:00
|
|
|
import net.minecraft.client.render.RenderLayer;
|
2020-04-15 14:22:03 +02:00
|
|
|
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
|
|
|
|
|
|
|
|
public interface URenderers {
|
|
|
|
static void bootstrap() {
|
2020-04-22 16:28:20 +02:00
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.CLOUD, CloudEntityRenderer::new);
|
2020-04-24 19:35:51 +02:00
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.WILD_CLOUD, CloudEntityRenderer::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.CONSTRUCTION_CLOUD, CloudEntityRenderer::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.RACING_CLOUD, CloudEntityRenderer::new);
|
2020-04-22 16:28:20 +02:00
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.MAGIC_SPELL, SpellcastEntityRenderer::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.THROWN_ITEM, (manager, context) -> new FlyingItemEntityRenderer<>(manager, context.getItemRenderer()));
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.SPELLBOOK, SpellbookEntityRender::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.RAINBOW, RainbowEntityRenderer::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.BUTTERFLY, ButterflyEntityRenderer::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.CUCCOON, CuccoonEntityRenderer::new);
|
|
|
|
EntityRendererRegistry.INSTANCE.register(UEntities.THROWN_SPEAR, SpearEntityRenderer::new);
|
2020-04-15 14:22:03 +02:00
|
|
|
|
2020-04-22 16:28:20 +02:00
|
|
|
ParticleFactoryRegistry.getInstance().register(UParticles.UNICORN_MAGIC, MagicParticle.Factory::new);
|
|
|
|
ParticleFactoryRegistry.getInstance().register(UParticles.CHANGELING_MAGIC, ChangelingMagicParticle.Factory::new);
|
|
|
|
ParticleFactoryRegistry.getInstance().register(UParticles.RAIN_DROPS, RaindropsParticle.Factory::new);
|
2020-05-03 19:20:51 +02:00
|
|
|
ParticleFactoryRegistry.getInstance().register(UParticles.SPHERE, SphereParticle::new);
|
|
|
|
ParticleFactoryRegistry.getInstance().register(UParticles.DISK, DiskParticle::new);
|
2020-04-26 22:40:43 +02:00
|
|
|
|
2020-05-19 18:55:21 +02:00
|
|
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),
|
|
|
|
UBlocks.ENCHANTED_TORCH, UBlocks.ENCHANTED_WALL_TORCH,
|
|
|
|
UBlocks.BAKERY_DOOR, UBlocks.LIBRARY_DOOR, UBlocks.MISTED_GLASS_DOOR, UBlocks.DIAMOND_DOOR,
|
2020-05-19 19:45:58 +02:00
|
|
|
UBlocks.APPLE_SAPLING, UBlocks.ALFALFA_CROPS,
|
2020-05-19 18:55:21 +02:00
|
|
|
UBlocks.TOMATO_PLANT, UBlocks.CLOUDSDALE_TOMATO_PLANT
|
|
|
|
);
|
2020-04-26 22:40:43 +02:00
|
|
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(),
|
|
|
|
UBlocks.CLOUD_ANVIL, UBlocks.CLOUD_FARMLAND,
|
2020-05-05 22:26:00 +02:00
|
|
|
UBlocks.CLOUD_BLOCK, UBlocks.CLOUD_SLAB, UBlocks.CLOUD_STAIRS,
|
2020-05-06 00:08:23 +02:00
|
|
|
UBlocks.ENCHANTED_CLOUD_BLOCK, UBlocks.ENCHANTED_CLOUD_SLAB, UBlocks.ENCHANTED_CLOUD_STAIRS,
|
2020-04-27 00:15:49 +02:00
|
|
|
|
2020-05-19 18:55:21 +02:00
|
|
|
UBlocks.SLIME_DROP, UBlocks.SLIME_LAYER
|
|
|
|
);
|
|
|
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutoutMipped(),
|
|
|
|
UBlocks.APPLE_LEAVES
|
2020-04-26 22:40:43 +02:00
|
|
|
);
|
2020-05-07 13:16:55 +02:00
|
|
|
|
|
|
|
UScreens.bootstrap();
|
2020-04-15 14:22:03 +02:00
|
|
|
}
|
|
|
|
}
|