Advertisement
jayhillx

ButterflyRenderer

May 19th, 2022
915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.21 KB | None | 0 0
  1. package com.mysticsbiomes.client.entity.render;
  2.  
  3. import com.mysticsbiomes.client.entity.Butterfly;
  4. import com.mysticsbiomes.client.entity.model.ButterflyModel;
  5. import com.mysticsbiomes.core.MysticsBiomes;
  6. import net.minecraft.client.model.geom.ModelLayerLocation;
  7. import net.minecraft.client.renderer.entity.EntityRendererProvider;
  8. import net.minecraft.client.renderer.entity.MobRenderer;
  9. import net.minecraft.resources.ResourceLocation;
  10. import net.minecraftforge.api.distmarker.Dist;
  11. import net.minecraftforge.api.distmarker.OnlyIn;
  12.  
  13. @OnlyIn(Dist.CLIENT)
  14. public class ButterflyRenderer extends MobRenderer<Butterfly, ButterflyModel<Butterfly>> {
  15.     private static final ResourceLocation ORANGE_BUTTERFLY = new ResourceLocation(MysticsBiomes.modId, "textures/entity/butterfly/butterfly.png");
  16.     public static final ModelLayerLocation BUTTERFLY = new ModelLayerLocation(new ResourceLocation(MysticsBiomes.modId, "butterfly"), "main");
  17.  
  18.     public ButterflyRenderer(EntityRendererProvider.Context context) {
  19.         super(context, new ButterflyModel<>(context.bakeLayer(BUTTERFLY)), 0.4F);
  20.     }
  21.  
  22.     public ResourceLocation getTextureLocation(Butterfly butterfly) {
  23.         return ORANGE_BUTTERFLY;
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement