mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
Fixed tiny silly ponies reverting to normal villagers when they grow up
This commit is contained in:
parent
509f6477f2
commit
e31ee1c53b
1 changed files with 4 additions and 2 deletions
|
@ -8,7 +8,9 @@ public class SillyPonyTextureSupplier {
|
|||
public static <T extends LivingEntity & VillagerDataContainer> TextureSupplier<T> create(TextureSupplier<T> fallback, TextureSupplier<String> formatter) {
|
||||
Identifier egg = formatter.apply("silly_pony");
|
||||
Identifier egg2 = formatter.apply("tiny_silly_pony");
|
||||
return entity -> isBestPony(entity) ? (entity.isBaby() ? egg2 : egg) : fallback.apply(entity);
|
||||
return entity -> {
|
||||
return isBestPony(entity) ? ("Dinky".equals(entity.getCustomName().getString()) ? egg2 : egg) : fallback.apply(entity);
|
||||
};
|
||||
}
|
||||
|
||||
public static boolean isBestPony(LivingEntity entity) {
|
||||
|
@ -16,7 +18,7 @@ public class SillyPonyTextureSupplier {
|
|||
return false;
|
||||
}
|
||||
String name = entity.getCustomName().getString();
|
||||
return "Derpy".equals(name) || (entity.isBaby() && "Dinky".equals(name));
|
||||
return "Derpy".equals(name) || "Dinky".equals(name);
|
||||
}
|
||||
|
||||
public static boolean isCrownPony(LivingEntity entity) {
|
||||
|
|
Loading…
Reference in a new issue