Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class WorldSpawnableModel extends AnimatedGeoModel<EntityWorldSpawnable> {
- //MODELS
- private static final ResourceLocation MAMMOTH_MODEL_LOCATION = prefix("geo/mammoth.geo.json");
- private static final ResourceLocation SMILODON_MODEL_LOCATION = prefix("geo/smilodon.geo.json");
- private static final ResourceLocation ERYON_MODEL_LOCATION = prefix("geo/eryon.geo.json");
- //TEXTURES
- private static final ResourceLocation MAMMOTH_TEXTURE_LOCATION = prefix("textures/entity/mammoth.png");
- private static final ResourceLocation SMILODON_TEXTURE_LOCATION = prefix("textures/entity/smilodon.png");
- private static final ResourceLocation ERYON_TEXTURE_LOCATION = prefix("textures/entity/eryon.png");
- //ANIMATIONS
- private static final ResourceLocation MAMMOTH_ANIMATION_LOCATION = prefix("animations/mammoth.animation.json");
- private static final ResourceLocation SMILODON_ANIMATION_LOCATION = prefix("animations/smilodon.animation.json");
- private static final ResourceLocation ERYON_ANIMATION_LOCATION = prefix("tanimations/eryon.animation.json");
- @Override
- public ResourceLocation getModelResource(EntityWorldSpawnable object)
- {
- int variant = object.getVariant();
- if(variant == 1){
- return MAMMOTH_MODEL_LOCATION;
- }
- if(variant == 2){
- return SMILODON_MODEL_LOCATION;
- }
- return ERYON_MODEL_LOCATION;
- }
- @Override
- public ResourceLocation getTextureResource(EntityWorldSpawnable object)
- {
- int variant = object.getVariant();
- if(variant == 1){
- return MAMMOTH_TEXTURE_LOCATION;
- }
- if(variant == 2){
- return SMILODON_TEXTURE_LOCATION;
- }
- return ERYON_TEXTURE_LOCATION;
- }
- @Override
- public ResourceLocation getAnimationResource(EntityWorldSpawnable object)
- {
- int variant = object.getVariant();
- if(variant == 1){
- return MAMMOTH_ANIMATION_LOCATION;
- }
- if(variant == 2){
- return SMILODON_ANIMATION_LOCATION;
- }
- return ERYON_ANIMATION_LOCATION;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement