use of net.minecraft.entity.EntityDimensions in project MCDoom by AzureDoom.
the class ProjectilesEntityRegister method projectile.
private static <T extends Entity> EntityType<T> projectile(EntityType.EntityFactory<T> factory, String id, boolean itemRender) {
EntityType<T> type = FabricEntityTypeBuilder.<T>create(SpawnGroup.MISC, factory).dimensions(new EntityDimensions(0.5F, 0.5F, true)).disableSummon().spawnableFarFromPlayer().trackRangeBlocks(90).trackedUpdateRate(4).build();
Registry.register(Registry.ENTITY_TYPE, new Identifier(DoomMod.MODID, id), type);
ENTITY_TYPES.add(type);
if (itemRender) {
ENTITY_THAT_USE_ITEM_RENDERS.add(type);
}
return type;
}
use of net.minecraft.entity.EntityDimensions in project ImmersivePortalsMod by qouteall.
the class NewNetherPortalEntity method init.
public static void init() {
entityType = Registry.register(Registry.ENTITY_TYPE, new Identifier("immersive_portals", "nether_portal_new"), FabricEntityTypeBuilder.create(EntityCategory.MISC, (EntityType<NewNetherPortalEntity> type, World world1) -> new NewNetherPortalEntity(type, world1)).size(new EntityDimensions(1, 1, true)).setImmuneToFire().build());
PortalPlaceholderBlock.portalBlockUpdateSignal.connect((world, pos) -> {
McHelper.getEntitiesNearby(world, new Vec3d(pos), NewNetherPortalEntity.class, 20).forEach(NewNetherPortalEntity::notifyToCheckIntegrity);
});
}
use of net.minecraft.entity.EntityDimensions in project ImmersivePortalsMod by qouteall.
the class NetherPortalEntity method init.
public static void init() {
entityType = Registry.register(Registry.ENTITY_TYPE, new Identifier("immersive_portals", "monitoring_nether_portal"), FabricEntityTypeBuilder.create(EntityCategory.MISC, (EntityType.EntityFactory<NetherPortalEntity>) NetherPortalEntity::new).size(new EntityDimensions(1, 1, true)).setImmuneToFire().build());
PortalPlaceholderBlock.portalBlockUpdateSignal.connect((world, pos) -> {
McHelper.getEntitiesNearby(world, new Vec3d(pos), NetherPortalEntity.class, 20).forEach(NetherPortalEntity::notifyToCheckIntegrity);
});
}
use of net.minecraft.entity.EntityDimensions in project MCDoom by AzureDoom.
the class ProjectilesEntityRegister method projectile2.
private static <T extends Entity> EntityType<T> projectile2(EntityType.EntityFactory<T> factory, String id, boolean itemRender) {
EntityType<T> type = FabricEntityTypeBuilder.<T>create(SpawnGroup.MISC, factory).dimensions(new EntityDimensions(0.5F, 0.5F, true)).disableSummon().spawnableFarFromPlayer().trackRangeBlocks(90).trackedUpdateRate(4).build();
Registry.register(Registry.ENTITY_TYPE, new Identifier(DoomMod.MODID, id), type);
ENTITY_TYPES.add(type);
if (itemRender) {
ENTITY_THAT_USE_ITEM_RENDERS.add(type);
}
return type;
}
use of net.minecraft.entity.EntityDimensions in project MCDoom by AzureDoom.
the class ProjectilesEntityRegister method projectile1.
private static <T extends Entity> EntityType<T> projectile1(EntityType.EntityFactory<T> factory, String id, boolean itemRender) {
EntityType<T> type = FabricEntityTypeBuilder.<T>create(SpawnGroup.MISC, factory).dimensions(new EntityDimensions(2.0F, 2.0F, true)).disableSummon().spawnableFarFromPlayer().trackRangeBlocks(90).trackedUpdateRate(4).build();
Registry.register(Registry.ENTITY_TYPE, new Identifier(DoomMod.MODID, id), type);
ENTITY_TYPES.add(type);
if (itemRender) {
ENTITY_THAT_USE_ITEM_RENDERS.add(type);
}
return type;
}
Aggregations