Update to BCLib 0.3.0
This commit is contained in:
parent
1a52251af0
commit
b2431153dc
294 changed files with 7484 additions and 1440 deletions
|
@ -23,12 +23,72 @@ import ru.betterend.entity.SilkMothEntity;
|
|||
import ru.betterend.util.SpawnHelper;
|
||||
|
||||
public class EndEntities {
|
||||
public static final EntityType<DragonflyEntity> DRAGONFLY = register("dragonfly", MobCategory.AMBIENT, 0.6F, 0.5F, DragonflyEntity::new, DragonflyEntity.createMobAttributes(), true, ColorUtil.color(32, 42, 176), ColorUtil.color(115, 225, 249));
|
||||
public static final EntityType<EndSlimeEntity> END_SLIME = register("end_slime", MobCategory.MONSTER, 2F, 2F, EndSlimeEntity::new, EndSlimeEntity.createMobAttributes(), false, ColorUtil.color(28, 28, 28), ColorUtil.color(99, 11, 99));
|
||||
public static final EntityType<EndFishEntity> END_FISH = register("end_fish", MobCategory.WATER_AMBIENT, 0.5F, 0.5F, EndFishEntity::new, EndFishEntity.createMobAttributes(), true, ColorUtil.color(3, 50, 76), ColorUtil.color(120, 206, 255));
|
||||
public static final EntityType<ShadowWalkerEntity> SHADOW_WALKER = register("shadow_walker", MobCategory.MONSTER, 0.6F, 1.95F, ShadowWalkerEntity::new, ShadowWalkerEntity.createMobAttributes(), true, ColorUtil.color(30, 30, 30), ColorUtil.color(5, 5, 5));
|
||||
public static final EntityType<CubozoaEntity> CUBOZOA = register("cubozoa", MobCategory.WATER_AMBIENT, 0.6F, 1F, CubozoaEntity::new, CubozoaEntity.createMobAttributes(), true, ColorUtil.color(151, 77, 181), ColorUtil.color(93, 176, 238));
|
||||
public static final EntityType<SilkMothEntity> SILK_MOTH = register("silk_moth", MobCategory.AMBIENT, 0.6F, 0.6F, SilkMothEntity::new, SilkMothEntity.createMobAttributes(), true, ColorUtil.color(198, 138, 204), ColorUtil.color(242, 220, 236));
|
||||
public static final EntityType<DragonflyEntity> DRAGONFLY = register(
|
||||
"dragonfly",
|
||||
MobCategory.AMBIENT,
|
||||
0.6F,
|
||||
0.5F,
|
||||
DragonflyEntity::new,
|
||||
DragonflyEntity.createMobAttributes(),
|
||||
true,
|
||||
ColorUtil.color(32, 42, 176),
|
||||
ColorUtil.color(115, 225, 249)
|
||||
);
|
||||
public static final EntityType<EndSlimeEntity> END_SLIME = register(
|
||||
"end_slime",
|
||||
MobCategory.MONSTER,
|
||||
2F,
|
||||
2F,
|
||||
EndSlimeEntity::new,
|
||||
EndSlimeEntity.createMobAttributes(),
|
||||
false,
|
||||
ColorUtil.color(28, 28, 28),
|
||||
ColorUtil.color(99, 11, 99)
|
||||
);
|
||||
public static final EntityType<EndFishEntity> END_FISH = register(
|
||||
"end_fish",
|
||||
MobCategory.WATER_AMBIENT,
|
||||
0.5F,
|
||||
0.5F,
|
||||
EndFishEntity::new,
|
||||
EndFishEntity.createMobAttributes(),
|
||||
true,
|
||||
ColorUtil.color(3, 50, 76),
|
||||
ColorUtil.color(120, 206, 255)
|
||||
);
|
||||
public static final EntityType<ShadowWalkerEntity> SHADOW_WALKER = register(
|
||||
"shadow_walker",
|
||||
MobCategory.MONSTER,
|
||||
0.6F,
|
||||
1.95F,
|
||||
ShadowWalkerEntity::new,
|
||||
ShadowWalkerEntity.createMobAttributes(),
|
||||
true,
|
||||
ColorUtil.color(30, 30, 30),
|
||||
ColorUtil.color(5, 5, 5)
|
||||
);
|
||||
public static final EntityType<CubozoaEntity> CUBOZOA = register(
|
||||
"cubozoa",
|
||||
MobCategory.WATER_AMBIENT,
|
||||
0.6F,
|
||||
1F,
|
||||
CubozoaEntity::new,
|
||||
CubozoaEntity.createMobAttributes(),
|
||||
true,
|
||||
ColorUtil.color(151, 77, 181),
|
||||
ColorUtil.color(93, 176, 238)
|
||||
);
|
||||
public static final EntityType<SilkMothEntity> SILK_MOTH = register(
|
||||
"silk_moth",
|
||||
MobCategory.AMBIENT,
|
||||
0.6F,
|
||||
0.6F,
|
||||
SilkMothEntity::new,
|
||||
SilkMothEntity.createMobAttributes(),
|
||||
true,
|
||||
ColorUtil.color(198, 138, 204),
|
||||
ColorUtil.color(242, 220, 236)
|
||||
);
|
||||
|
||||
public static void register() {
|
||||
SpawnHelper.restrictionAir(DRAGONFLY, DragonflyEntity::canSpawn);
|
||||
|
@ -41,7 +101,9 @@ public class EndEntities {
|
|||
|
||||
protected static <T extends Entity> EntityType<T> register(String name, MobCategory group, float width, float height, EntityFactory<T> entity) {
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity).dimensions(EntityDimensions.fixed(width, height)).build();
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity)
|
||||
.dimensions(EntityDimensions.fixed(width, height))
|
||||
.build();
|
||||
if (Configs.ENTITY_CONFIG.getBooleanRoot(id.getPath(), true)) {
|
||||
return Registry.register(Registry.ENTITY_TYPE, id, type);
|
||||
}
|
||||
|
@ -50,7 +112,12 @@ public class EndEntities {
|
|||
|
||||
private static <T extends Mob> EntityType<T> register(String name, MobCategory group, float width, float height, EntityFactory<T> entity, Builder attributes, boolean fixedSize, int eggColor, int dotsColor) {
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity).dimensions(fixedSize ? EntityDimensions.fixed(width, height) : EntityDimensions.scalable(width, height)).build();
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity)
|
||||
.dimensions(fixedSize ? EntityDimensions.fixed(
|
||||
width,
|
||||
height
|
||||
) : EntityDimensions.scalable(width, height))
|
||||
.build();
|
||||
if (Configs.ENTITY_CONFIG.getBooleanRoot(id.getPath(), true)) {
|
||||
FabricDefaultAttributeRegistry.register(type, attributes);
|
||||
EndItems.registerEndEgg("spawn_egg_" + name, type, eggColor, dotsColor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue