Slime size fix
This commit is contained in:
parent
83320b2df3
commit
c9cdea122f
3 changed files with 17 additions and 4 deletions
|
@ -17,8 +17,8 @@ import ru.betterend.util.MHelper;
|
|||
import ru.betterend.util.SpawnHelper;
|
||||
|
||||
public class EntityRegistry {
|
||||
public static final EntityType<EntityDragonfly> DRAGONFLY = register("dragonfly", SpawnGroup.AMBIENT, 0.6F, 0.5F, EntityDragonfly::new, EntityDragonfly.createMobAttributes(), MHelper.color(32, 42, 176), MHelper.color(115, 225, 249));
|
||||
public static final EntityType<EntityEndSlime> END_SLIME = register("end_slime", SpawnGroup.MONSTER, 0.6F, 0.5F, EntityEndSlime::new, EntityEndSlime.createMobAttributes(), MHelper.color(28, 28, 28), MHelper.color(99, 11, 99));
|
||||
public static final EntityType<EntityDragonfly> DRAGONFLY = register("dragonfly", SpawnGroup.AMBIENT, 0.6F, 0.5F, EntityDragonfly::new, EntityDragonfly.createMobAttributes(), true, MHelper.color(32, 42, 176), MHelper.color(115, 225, 249));
|
||||
public static final EntityType<EntityEndSlime> END_SLIME = register("end_slime", SpawnGroup.MONSTER, 2F, 2F, EntityEndSlime::new, EntityEndSlime.createMobAttributes(), false, MHelper.color(28, 28, 28), MHelper.color(99, 11, 99));
|
||||
|
||||
public static void register() {
|
||||
SpawnHelper.restrictionLand(END_SLIME, EntityEndSlime::canSpawn);
|
||||
|
@ -29,8 +29,8 @@ public class EntityRegistry {
|
|||
return type;
|
||||
}
|
||||
|
||||
private static <T extends LivingEntity> EntityType<T> register(String name, SpawnGroup group, float width, float height, EntityFactory<T> entity, Builder attributes, int eggColor, int dotsColor) {
|
||||
EntityType<T> type = Registry.register(Registry.ENTITY_TYPE, BetterEnd.makeID(name), FabricEntityTypeBuilder.<T>create(group, entity).dimensions(EntityDimensions.fixed(width, height)).build());
|
||||
private static <T extends LivingEntity> EntityType<T> register(String name, SpawnGroup group, float width, float height, EntityFactory<T> entity, Builder attributes, boolean fixedSize, int eggColor, int dotsColor) {
|
||||
EntityType<T> type = Registry.register(Registry.ENTITY_TYPE, BetterEnd.makeID(name), FabricEntityTypeBuilder.<T>create(group, entity).dimensions(fixedSize ? EntityDimensions.fixed(width, height) : EntityDimensions.changing(width, height)).build());
|
||||
FabricDefaultAttributeRegistry.register(type, attributes);
|
||||
ItemRegistry.registerEgg("spawn_egg_" + name, type, eggColor, dotsColor);
|
||||
return type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue