mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Baby zombie ponies have a small chance of spawning as cozy glow
This commit is contained in:
parent
d9769e32ee
commit
fb3973a3f1
2 changed files with 13 additions and 6 deletions
|
@ -14,23 +14,30 @@ public class ZomponyRenderer<Zombie extends HostileEntity> extends PonyRenderer<
|
||||||
public static final Identifier HUSK = new Identifier("minelittlepony", "textures/entity/zombie/husk_pony.png");
|
public static final Identifier HUSK = new Identifier("minelittlepony", "textures/entity/zombie/husk_pony.png");
|
||||||
public static final Identifier DROWNED = new Identifier("minelittlepony", "textures/entity/zombie/drowned_pony.png");
|
public static final Identifier DROWNED = new Identifier("minelittlepony", "textures/entity/zombie/drowned_pony.png");
|
||||||
|
|
||||||
public ZomponyRenderer(EntityRendererFactory.Context context, Identifier texture, float scale) {
|
public static final Identifier DEMON_CHILD = new Identifier("minelittlepony", "textures/entity/zombie/demon_child.png");
|
||||||
super(context, ModelType.ZOMBIE, TextureSupplier.of(texture), scale);
|
|
||||||
|
public ZomponyRenderer(EntityRendererFactory.Context context, TextureSupplier<Zombie> texture, float scale) {
|
||||||
|
super(context, ModelType.ZOMBIE, texture, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ZomponyRenderer<ZombieEntity> zombie(EntityRendererFactory.Context context) {
|
public static ZomponyRenderer<ZombieEntity> zombie(EntityRendererFactory.Context context) {
|
||||||
return new ZomponyRenderer<>(context, ZOMBIE, 1);
|
return new ZomponyRenderer<>(context, entity -> {
|
||||||
|
if (entity.isBaby() && entity.getUuid().getLeastSignificantBits() % 160 == 0) {
|
||||||
|
return DEMON_CHILD;
|
||||||
|
}
|
||||||
|
return ZOMBIE;
|
||||||
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ZomponyRenderer<HuskEntity> husk(EntityRendererFactory.Context context) {
|
public static ZomponyRenderer<HuskEntity> husk(EntityRendererFactory.Context context) {
|
||||||
return new ZomponyRenderer<>(context, HUSK, 1.0625F);
|
return new ZomponyRenderer<>(context, TextureSupplier.of(HUSK), 1.0625F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ZomponyRenderer<DrownedEntity> drowned(EntityRendererFactory.Context context) {
|
public static ZomponyRenderer<DrownedEntity> drowned(EntityRendererFactory.Context context) {
|
||||||
return new ZomponyRenderer<>(context, DROWNED, 1);
|
return new ZomponyRenderer<>(context, TextureSupplier.of(DROWNED), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ZomponyRenderer<GiantEntity> giant(EntityRendererFactory.Context context) {
|
public static ZomponyRenderer<GiantEntity> giant(EntityRendererFactory.Context context) {
|
||||||
return new ZomponyRenderer<>(context, ZOMBIE, 3);
|
return new ZomponyRenderer<>(context, TextureSupplier.of(ZOMBIE), 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in a new issue