Advertisement
Scouter456

Untitled

Jul 31st, 2023
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.14 KB | None | 0 0
  1. public class WorldSpawnableModel extends AnimatedGeoModel<EntityWorldSpawnable> {
  2.     //MODELS
  3.     private static final ResourceLocation MAMMOTH_MODEL_LOCATION = prefix("geo/mammoth.geo.json");
  4.     private static final ResourceLocation SMILODON_MODEL_LOCATION = prefix("geo/smilodon.geo.json");
  5.     private static final ResourceLocation ERYON_MODEL_LOCATION = prefix("geo/eryon.geo.json");
  6.     //TEXTURES
  7.     private static final ResourceLocation MAMMOTH_TEXTURE_LOCATION = prefix("textures/entity/mammoth.png");
  8.     private static final ResourceLocation SMILODON_TEXTURE_LOCATION = prefix("textures/entity/smilodon.png");
  9.     private static final ResourceLocation ERYON_TEXTURE_LOCATION = prefix("textures/entity/eryon.png");
  10.     //ANIMATIONS
  11.     private static final ResourceLocation MAMMOTH_ANIMATION_LOCATION = prefix("animations/mammoth.animation.json");
  12.     private static final ResourceLocation SMILODON_ANIMATION_LOCATION = prefix("animations/smilodon.animation.json");
  13.     private static final ResourceLocation ERYON_ANIMATION_LOCATION = prefix("tanimations/eryon.animation.json");
  14.  
  15.     @Override
  16.     public ResourceLocation getModelResource(EntityWorldSpawnable object)
  17.     {
  18.         int variant = object.getVariant();
  19.         if(variant == 1){
  20.             return MAMMOTH_MODEL_LOCATION;
  21.         }
  22.         if(variant == 2){
  23.             return SMILODON_MODEL_LOCATION;
  24.         }
  25.  
  26.         return ERYON_MODEL_LOCATION;
  27.     }
  28.  
  29.     @Override
  30.     public ResourceLocation getTextureResource(EntityWorldSpawnable object)
  31.     {
  32.         int variant = object.getVariant();
  33.         if(variant == 1){
  34.             return MAMMOTH_TEXTURE_LOCATION;
  35.         }
  36.         if(variant == 2){
  37.             return SMILODON_TEXTURE_LOCATION;
  38.         }
  39.  
  40.         return ERYON_TEXTURE_LOCATION;
  41.     }
  42.  
  43.     @Override
  44.     public ResourceLocation getAnimationResource(EntityWorldSpawnable object)
  45.     {
  46.         int variant = object.getVariant();
  47.         if(variant == 1){
  48.             return MAMMOTH_ANIMATION_LOCATION;
  49.         }
  50.         if(variant == 2){
  51.             return SMILODON_ANIMATION_LOCATION;
  52.         }
  53.  
  54.         return ERYON_ANIMATION_LOCATION;
  55.     }
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement