Skip to main content

Alshanex's Familiars

Familiars

Familiars can be tammed using Arcane Essence by default, but you can change this item via Datapack with the "familiar_tamming" tag. Familiars can be set to stay in a position by right-clicking him with a stick, which will make them stay still without attacking. Tamed familiars can be summoned/unsummoned by selecting the correspondant familiar in the selection menu, which can be opened using the correspondant keybind, and then you will be able to use the summoning/unsummoning keybind with the selected familiar. Upon getting the advancement "Learn Necromancy", familiar will avoid death at the cost of mana, but if you run out of mana they will die.

Lightning Mage Familiar

  • Battle: specialized in lightning magic, casting spells that hit multiple targets at the same time.
  • Abilities:
    • Charge Owner: has the ability to charge the owner for some time, giving him increased speed and strength.
    • Charge Creeper: everytime he finds a creeper, he will follow him to charge it.
  • Spawn: can be found wandering around in mountains, searching for a good spot to attract lightnings.

Lightning Mage Familiar

Archmage Familiar

  • Battle: specialized in basic magic from different schools.
  • Abilities:
    • Transmutation: has the ability to convert spell scrolls in a pedestal into other random scroll of the same rarity, and there's a little chance to get a higher rarity scroll.
    • Enderman's Nightmare: enderman are scared of him, and will run away when seeing him.
    • Shulker Protection: has the ability to counter shulker bullets.
  • Spawn: can be found studying in his improvised laboratory, located in the end.

Archmage Familiar

Necromancer Familiar

  • Battle: specialized in blood magic, including necromancy abilities to summon undeads.
  • Abilities:
    • Undead Chaos: has the ability to make undead entities around go in a rampage, attacking nearby entities in confusion.
    • Witherify: has the ability to turn nearby skeletons into wither skeletons.
  • Spawn: can be found studying the death in graveyards all over the Soul Sand Valleys.

Necromancer Familiar

Summoner Familiar

  • Battle: specialized in eldrith magic and unknown arts, being able to summon creatures born in the shadows.
  • Abilities:
    • True Vision: has the ability to give night vision to the owner, in addition to making him immune to blindness and darkness effects.
    • Dark Ritual: has the ability to deactivate sculk shriekers, hiding the owner from the warden.
  • Spawn: can be found studying dark arts in his laboratory, located in the Ancient City.

Summoner Familiar

Hunter Familiar

  • Battle: specialized in attacking enemies with arrows, combined with swift moves.
  • Abilities:
    • Watcher: has the ability to protect the owner from enemies aiming at him, even if the owner has not noticed them.
    • Smelling Loot: the owner can right click him with any item to make him search for entities around that can drop them, marking them for the owner to see.
  • Spawn: can be found living in campsites all over forest biomes.

Hunter Familiar

Druid Familiar

  • Battle: specialized in using nature magic to control enemies.
  • Abilities:
    • Overgrowth: has the ability to bonemeal nearby crops.
    • Nature's Blessing: has the ability to breed nearby animals.
  • Spawn: can be found protecting the forsts of the world.

Druid Familiar

Illusionist Familiar

  • Battle: specialized in evocation magic, controlling enemies confusing them.
  • Abilities:
    • Magic Trick: when the owner has low health, illusionist will perform a magic trick that will hide his owner from the enemies.
    • Decoy: when he's low health, he will disappear leaving behind an explosive copy of him, taunting enemies around into attacking it.
    • Pickpocket: when no one's watching and there are gold nuggets or emeralds on the floor, this little trickester will take them for himself.
  • Spawn: illusionist spawn naturally disguised as other overworld familiars, use the Mirror of Truth to make them reveal themselves.

Illusionist Familiar

Plague Doctor Familiar

  • Battle: specialized in poison magic, poisoning enemies to make them suffer a slow death.
  • Abilities:
    • Poison Blood: his owner and himself deal increased damage to poisoned entities, and when a plague doctor familiar gets hit, they throw a poison potion as countermeasure.
  • Spawn: to get him, you will need to craft a poison vial and give it to a tamed druid familiar.

Plague Doctor Familiar

Scorcher Familiar

  • Battle: specialized in fire magic, burning his enemies to death.
  • Abilities:
    • Molten Heart: upon getting hit, he will set attackers on fire for some time.
    • Heatproof: grants his owner and himself fire immunity.
  • Spawn: can be found wandering around in hot places in the nether.

Scorcher Familiar

Cleric Familiar

  • Battle: specialized in holy magic, his main role is supporting but he can also cast powerful holy spells to purify enemies.
  • Abilities:
    • Salvation: he will attack undeads on sight, but if he sees a zombified villager, he will use his holy power to cure him and grant him the salvation.
  • Spawn: to get a cleric familiar, you will need to cast the cleanse spell near an untamed necromancer familiar.

Cleric Familiar

Bard Familiar

  • Battle: specialized in sound magic, attacking his enemies with powerful melodies, but also supporting his friends with supporting melodies.
  • Abilities:
    • Musical Nature: he will play melodies to make adventures much nicer.
  • Spawn: to get him, you will need to cast a sound spell near an untamed familiar, making them interest in music.

Bard Familiar

Frostling Familiar

  • Battle: specialized in ice magic, having a good balance between attack, defense and mobility, and decent controlling abilities.
  • Abilities:
    • Frozen Feet: he and his owner will be able to freeze water bellow them to walk without problems.
    • Ice Heart: he and his owner will be immune to freezing, including powder snow freezing.
  • Spawn: can be found wandering around in icy biomes.

Frostling Familiar

Structures

Origin Island

A long lost island found in the vast oceans, holding the secrets of familiars' existence. Its only inhabitants are little lost souls, very early forms of the familiars that never got to their final form. These creatures can be bottled using empty bottles, and then can be used in the new rituals. Rituals are performed in the center of the island, using the pedestals, refer to the Rituals section to know more about them. To locate this island, you first need a Sniffer, which sometimes will find Crystal Berries. These berries can be used to feed your tamed familiars, which will make them vaguely remember things about their past and how they were born, which will condensate into Memory Fragments. Memory Fragments can be used the same way as Ender Eyes to locate the Origin Island.

Origin Island

Hunters' Campsite

Hunters live in groups, so they built campsite all along their principal hunting spots, mainly forests where abundant preys wander around. These campsites can also be found with a Furled Map obtained in the Origin Island.

Graveyard

This new structure belongs to the Soul Sand Valleys, a place where death rules. Necromancers are naturally attracted to these places, so you will surely find them here.

Summoner's Lab

Summoners' curiosity towards sculk made them stay in Ancient Cities for very long time, so they built their own laboratory in the city to make better use of their study time.

Archmage's Settlement

Archmages travelled to the End dimension to study the secrets of the infinite void, so they needed a place to stay meanwhile. That's when they decided to build temporal homes all around the End, a place where they can study and make discoverings.

Items

Familiar Trinkets

Familiar Trinkets are curios that can be equipped in the trinket slot, and provide different effects.

  • Magic Leaf: increases power of the spells casted by druid familiars. Found in jungle temples.
  • Chain of the Hunter: increases power of the spells casted by hunter familiars. Found in evoker forts or hunter campsites.
  • Insignia of the Lich: increases power of the spells casted by necromancer familiars. Found in graveyards.
  • Forgotten Crown: increases power of the spells casted by summoner familiars. Found in Ancient Cities.
  • Shiny Crown: increases power of the spells casted by archmage familiars. Found in Archmage Laboratories.
  • Golden Bell: increases power of the spells casted by illusionist familiars. Found in Woodland Mansion.
  • Conjurer's Candlestick: increases power of the spells casted by scorcher familiars. Found in Pyromancer Towers.
  • Blessed Calyx: increases power of the spells casted by cleric familiars. Found in Priest Houses.
  • Emblem of Electricity: increases power of the spells casted by lightning mage familiars. Found in Mountain Towers.
  • Contaminated Cheese: increases power of the spells casted by plague doctor familiars. Found in Impaled Icebreakers.
  • Lost Melody: increases power of the spells casted by bard familiars. Obtained with Mysterious Orb.
  • Frostbloom: increases power of the spells casted by frostling familiars. Found in Ice Spiders Den.
  • Pandora's Box: allows to summon/unsummon up to 10 familiars at the same time. Crafted.

Ring Curios

  • Ring of Familiar Revival: +10% mana regen, when equipped allows tamed familiars to escape death at the cost of your own mana, crafted.
  • Holy Water Grail: +5% mana regen, constantly heals tamed familiars at the cost of your own mana, found in Priest Towers.
  • Invisibility Robes: +50 max mana, when equipped tamed familiars that fall below 25% health willl get invisibility effect, crafted.
  • Statue of Willpower: +20% spell resist, when equipped tamed familiars that fall below half health will get oakskin effect, crafted.
  • Heart of Ender: +15% cast time reduction, when equipped familiars that fall below 25% health will get evasion effect on intervals, found in End Cities.

Consumables

  • Life Fruits: health consumable to boost familiar health, has 3 tiers with a limit for each tier, obtained through alchemist cauldron.
  • Armor Plates: armor consumable to boost familiar armor, has 3 tiers with a limit for each tier, obtained through shrinking.
  • Magic Essences: consumables for spell power and spell resist, each has 3 tiers with a limit for each tier, obtained through:
    • Power: dropped by magic creatures, upgraded through rituals.
    • **Resist:**obtained through shrinking, upgraded through rituals.
  • Tiny Shield: right click into a tamed familiar to allow him to block attacks with a low chance, limit 1 per familiar, obtained through shrinking.
  • Strange Mushroom: right click into a tamed familiar to give him a stack of enraged (when getting hit, has a chance to consume a stack of enraged to gain heartstop for some seconds), limit 10 per familiar, dropped from Mooshrooms.

Other items

  • Magic Eye: used to keep track of the magic consumables progress of a familiar.

Shards

Shards are obtained via rituals in the Origin Island, using the pedestals in the central structure. There is a shard for each naturally spawning familiar that spawns in the overworld, being the Illusionist one not obtainable. To know the recipes check JEI or the "ritual_recipes" folder inside the data folder of the mod inside the recipe folder.

Spellbooks and Staffs

  • Harp (Staff): staff from the sound school, obtained from the Mysterious Orb.
  • Symphonic Grimoire (Spellbook): spellbook for the sound school, crafted.
  • Familiar Tome of Alignment (Spellbook): when equipped, all tamed familiars will share the magic attributes of their owner, sharing equal amount based on the amount of the familiars summoned (if there are 10 summoned, each gets 10% of the owner's attributes, if there are 2, they get 50% of the owner's attributes), crafted.

Other Items

  • Crystal Berry: obtained by the Sniffer, can be feed to your Familiars to get Memory Fragments.
  • Memory Fragments: remnants of familiars' forgotten past, they lead you to what familiars treat as home.
  • Bottle of Spirit: the core material to conjure familiars into the world. This item is obtained by catching Lost Souls from the origin Island with empty bottles. Bottled souls can be released back into the wild.
  • Mirror of Truth: used to make disguised illusionist familiars reveal themselves, can be obtained via ritual.
  • Venomous Spider Fang: used to craft poison vials and heal plague doctor familiars, dropped from Cave Spiders.
  • Mysterious Orb: when right clicking it you will get the Harp and the Lost Melody trinket, obtained through island ritual. To be able to use the Mysterious Orb, you will need to complete the taming advancements for the elemental familiars (all of them except the bard familiar).
  • Tiny Totem: can be bound to a familiar, and a familiar can only be bound to 1 totem at a time. When the familiar dies and you have no mana to revive him, the bound totem will be consumed to allow the bound familiar to revive, and the totem will be consumed.

Sound School

Has its own spellbook, staff and armor. Staff and spellbook were mentioned in the correspondant section, and the armor is the Bard set. The school also contains the following spells:

  • Clef: shoots a simple note towards the enemy.
  • Chord Blast: performs a simple melody that hurts the enemy, and when someone hears this melody he can't evade it anymore.
  • Crescendo: performs a rumbling melody that hurts and stuns the enemy.
  • Grand Finale: performs an outrageous melody that traps the enemies and annihilates them with an explosive melody.
  • Celestial Chant: calls the angels to play an angelic melody that will heal and protect yourself and your allies.
  • Rhapsody: summons little birds that will cheer yourself and your allies, giving you a little boost for some time.
  • Sonata: starts playing a fast-paced song for everyone to hear, an harmonious melody to hurt your enemies.
  • Serenade: starts playing a slow-paced song for everyone to hear, an harmonious melody to make your enemies sleepy.

Blocks

Familiar Bed

Familiar beds are blocks tht familiars use to sleep and recover health. Familiars will search for nearby beds when they need to heal.

Familiar Storage

Familiar storage is a block that allows to save up to 10 familiars. Familiars inside the storage will be invulnerable, but they also won't attack other mobs with some exceptions. Familiar storage has 2 modes:

  • Store mode: Allows the player to freely move familiars between his familiars and the storage familiars.
  • Wander mode: Allows stored familiars to wander around until a configurable distance. It also allows you to enable or disable familiars abilities while they are wandering. Familiar storage blocks can only be broken by the owner and only when it's in storage mode and there are no familiars inside. Important: only 1 familiar storage block can be used in a 16 blocks radius.

Dev Section

Rituals

Rituals are completely data driven and shown in JEI, allowing devs to make their own ritual recipes only by adding a datapack. Recipes have the following structure:

{
"type": "alshanex_familiars:ritual_recipe",
"central_item": {
"item": "alshanex_familiars:pet_soul"
},
"inputs": [
{
"item": "irons_spellbooks:legendary_ink",
"count": 1,
"consume": true
},
{
"item": "irons_spellbooks:arcane_essence",
"count": 1,
"consume": true
},
{
"item": "irons_spellbooks:arcane_rune",
"count": 1,
"consume": true
},
{
"item": "irons_spellbooks:magic_cloth",
"count": 1,
"consume": true
}
],
"result": {
"id": "alshanex_familiars:archmage_shard"
},
"particle_type": "minecraft:end_rod"
}
  • central_item: the item that will be set in the center pedestal of the ritual.
  • inputs: the items that will be used in the ritual. The amount of items must be 4.
    • item: the id of the item.
    • count: the amount of the item required, should be always 1 for now since pedestals only allow that.
    • consume: specifies if the item should be consumed in the ritual, can be either "true" or "false".
  • result: the item that will result from the ritual completing.
  • particle_type: optional particles that will be used in the ritual. Invalid particle or no particle will default to enchant particles.

All recipe files should be added to the route "data > alshanex_familiars > recipe > ritual_recipes".

Shrinking

Players can now craft the Shrinkinator, a workstation that shrinks some items to make them avaliable for the familiars. The main use is to shrink food items, which can be given to any familiar to heal them. Apart from food, there are also some recipes to make other items like the armor consumables or the tiny shield. This block is also allows for automation with hoppers.

Shrinking recipes are also data driven and shown in JEI, allowing devs to make their own following this structure:

{
"type": "alshanex_familiars:shrinking_recipe",
"input": {
"item": "alshanex_familiars:armor_plate_tier_1"
},
"result": {
"id": "alshanex_familiars:armor_plate_tier_1",
"count": 1,
"components": {
"familiarslib:familiar_consumable": {
"type": "armor",
"tier": 1
}
}
}
}
  • input: the input item for the shrinkinator.
  • result: the output item obtained from the shrinking process (components are optional, in this case is included to show how the consumable component can be set to items).

All recipe files should be added to the route "data > alshanex_familiars > recipe > shrinking".

Consumables System

The new consumables system now uses components to set if they are consumables or not:

"components": {
"familiarslib:familiar_consumable": {
"type": "armor",
"tier": 1
}
}

There are currently these types of consumables:

  • armor: increases the familiar armor points, goes from tier 1 to tier 3.
  • health: increases the familiar health, goes from tier 1 to tier 3.
  • spell_power: increases familiar spell power attribute, goes from tier 1 to tier 3.
  • spell_resist: increases familiar spell power attribute, goes from tier 1 to tier 3.
  • enraged: adds 1 enraged stack to the familiar, only has tier 1.
  • blocking: unlocks the ability to block attacks for the familiar, only has tier 1.

Modify familiars spell roaster

Anyone can modify which spells each familiar can cast simply by making a datapack to edit some tags. The route to access the tags is "data > alshanex_familiars > tags > irons_spellbooks > spells". Inside this directory people will find a directory for each one of the familiars. Inside each familiar directory, there are a series of tags:

  • attack
  • defense
  • movement
  • support
  • buffing (cleric only)
  • healing (cleric only)

Anyone is free to add or remove any spells from these tags.

Create your own familiar and familiar blocks

Yes, you heard right. For neoforge 1.21.1 i made the FamiliarsLib mod specifically to allow anyone to make their own familiars, and obviously compatible with all the features included in Alshanex Familiars mod. FamiliarLib also allows to add your own Familiar Houses and Familiar Beds too by just extending a simple class.

Getting started

First of all, you need to add the Curse Maven Snippet of the FamiliarsLib version you want to use into your dependencies inside the "build.gradle". It should look like this: implementation "curse.maven:familiarslib-1316458:7415920"

Creating your own familiar

To create your own familiar you need a couple things before getting into coding:

  • Familiar's model: a ".geo.json" file that you can get by exporting in your geckolib blockbench project.
  • Familiar's texture: can be saved from your blockbench project.
  • A couple animations saved as json files:
    • idle (loop animation to play when idel)
    • interact (animation that plays when right clicking the familiar)
    • long_cast (animation that plays when the familiar casts long casting time spells)
    • skill (animation that plays when familiar casts instant or short casting time spells)
    • walk (loop animation to play when walking)
    • spawn (animation that plays when the familiar spawns in the world)
    • sleep (animation that plays when the familiar sleeps in a familiar bed)

Once you have all these files, you have to add them inside these routes:

  • familiar_model.geo.json: this one goes in "resources > assets > your_mod_id > geo", inside the "geo" directory.
  • familiar_texture.png: this one goes in "resources > assets > your_mod_id > textures > entity", inside the "entity" directory.
  • familiar_animations.animation.json: you need to put all the different animations mentioned before, mantaining the exact names stated before, in a single animation file. This file goes in "resources > assets > your_mod_id > animations", inside the "animations" directory.

Once all the files are in their correct locations, you can create your familiar entity class. If you want to make a flying familiar you can extend the "AbstractFlyingSpellCastingPet" class, if you want to make a terrestrian familiar you can extend the "AbstractTerrestrianSpellCastingPet" class. Here's an example familiar basic class:

public class ExamlpeFamiliarEntity extends AbstractFlyingSpellCastingPet {
public static final ResourceLocation textureResource = ResourceLocation.fromNamespaceAndPath(YourMainClass.MODID, "textures/entity/familiar_texture.png");

public ExamlpeFamiliarEntity(EntityType<? extends AbstractFlyingSpellCastingPet> pEntityType, Level pLevel) {
super(pEntityType, pLevel);
}

@Override
protected void registerGoals() {
super.registerGoals();
initializeAttackGoal(2);
//Any other goal specific to this
}

@Override
protected FamiliarGoals.FamiliarWizardAttackGoal createAttackGoal(float min, float max) {
//Here is where you set the spells you want the familiar to use. I recommend using spell tags for easier management and flexibility.
List<AbstractSpell> attackSpells = getSpellsFromTag(YourModTags.ARCHMAGE_ATTACK_SPELLS);
List<AbstractSpell> defenseSpells = getSpellsFromTag(YourModTags.ARCHMAGE_DEFENSE_SPELLS);
List<AbstractSpell> movementSpells = getSpellsFromTag(YourModTags.ARCHMAGE_MOVEMENT_SPELLS);
List<AbstractSpell> supportSpells = getSpellsFromTag(YourModTags.ARCHMAGE_SUPPORT_SPELLS);

return new FamiliarGoals.FamiliarWizardAttackGoal(this, 1f, 30, 40)
.setSpells(
attackSpells,
defenseSpells,
movementSpells,
supportSpells
)
.setIsFlying() //Only if it's a flying familiar, if it's terrestrian remove this line
.setAllowFleeing(true)
.setSpellQuality(min, max);
}

//Util method to extract spells from your tags
private List<AbstractSpell> getSpellsFromTag(TagKey<AbstractSpell> tag) {
var list = new ArrayList<AbstractSpell>();

for (var spell : SpellRegistry.getEnabledSpells()) {
SpellRegistry.REGISTRY.getHolder(spell.getSpellResource()).ifPresent(a -> {
if (a.is(tag)) {
list.add(spell);
}
});
}

return list;
}

//Set the attributes you like here
public static AttributeSupplier.Builder prepareAttributes() {
return LivingEntity.createLivingAttributes()
.add(Attributes.ATTACK_DAMAGE, 3.0)
.add(Attributes.ATTACK_KNOCKBACK, 0.0)
.add(Attributes.MAX_HEALTH, 30.0)
.add(Attributes.FOLLOW_RANGE, 24.0)
.add(Attributes.FLYING_SPEED, .1F)
.add(Attributes.MOVEMENT_SPEED, .2);
}

@Override
protected void defineSynchedData(SynchedEntityData.Builder pBuilder) {
super.defineSynchedData(pBuilder);
}

@Override
public void addAdditionalSaveData(CompoundTag pCompound) {
super.addAdditionalSaveData(pCompound);
}

@Override
public void readAdditionalSaveData(CompoundTag pCompound) {
super.readAdditionalSaveData(pCompound);
}
}

With the entity class done, you now need to add the entity model class. Here's an example class:

public class ExamlpeFamiliarModel extends DefaultedEntityGeoModel<ExamlpeFamiliarEntity> {
public static final ResourceLocation MODEL = new ResourceLocation(AlshanexFamiliarsMod.MODID, "geo/familiar_model.geo.json");
public static final ResourceLocation ANIMATIONS = new ResourceLocation(AlshanexFamiliarsMod.MODID, "animations/familiar_animations.animation.json");

public ExamlpeFamiliarModel() {
super(new ResourceLocation(YourMainClass.MODID, "example_familiar"));
}

protected TransformStack transformStack = new TransformStack();

@Override
public ResourceLocation getModelResource(ExamlpeFamiliarEntity object) {
return MODEL;
}

@Override
public ResourceLocation getAnimationResource(ExamlpeFamiliarEntity animatable) {
return ANIMATIONS;
}

@Override
public void setCustomAnimations(ExamlpeFamiliarEntity entity, long instanceId, AnimationState<ExamlpeFamiliarEntity> animationState) {
super.setCustomAnimations(entity, instanceId, animationState);

if (Minecraft.getInstance().isPaused() || !entity.shouldBeExtraAnimated())
return;

transformStack.popStack();
}
}

And last but not least, the entity renderer class. Here's an example class:

public class ExampleFamiliarRenderer extends HumanoidRenderer<ExampleFamiliarEntity> {
public ExampleFamiliarRenderer(EntityRendererProvider.Context renderManager, ExampleFamiliarModel model) {
super(renderManager, model);
addRenderLayer(new AutoGlowingGeoLayer<>(this));
}

@Override
public ResourceLocation getTextureLocation(ExampleFamiliarEntity entity) {
return ExampleFamiliarEntity.textureResource;
}

@Override
public void render(ExampleFamiliarEntity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
super.render(entity, entityYaw, partialTick, poseStack, bufferSource, packedLight);

SpellRenderingHelper.renderSpellHelper(ClientMagicData.getSyncedSpellData(animatable), animatable, poseStack, bufferSource, partialTick);
}

@Override
public RenderType getRenderType(ExampleFamiliarEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) {
return animatable.isInvisible() ? RenderType.entityTranslucent(texture) : super.getRenderType(animatable, texture, bufferSource, partialTick);
}
}

After you have all this, you can now proceed with the rest of the entity registration process as any other modded entity and you will have your familiar complete!

Creating your own familiar house

Creating your own familiar storage block is very simple, you just need to extend a couple base classes from FamiliarsLib and the rest is still the same. For the block class you need to extend the "AbstractFamiliarStorageBlock" class:

public class FamiliarHouseExampleBlock extends AbstractFamiliarStorageBlock {
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;

private static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 16.0D, 16.0D);

public static final MapCodec<FamiliarHouseExampleBlock> CODEC = simpleCodec(FamiliarHouseExampleBlock::new);

public FamiliarHouseExampleBlock(Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any()
.setValue(FACING, Direction.NORTH));
}

@Override
public MapCodec<FamiliarHouseExampleBlock> codec() {
return CODEC;
}

@Nullable
@Override
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return new FamiliarHouseExampleBlockEntity(pos, state);
}

//This states the amount of familiar house blocks per chunk allowed
@Override
protected int getAmountPerChunk() {
return 2;
}

@Nullable
@Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> blockEntityType) {
return level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityRegistry.FAMILIAR_HOUSE_EXAMPLE.get(), AbstractFamiliarStorageBlockEntity::serverTick);
}

//Rest of the implementation...
}

For the block entity class is basically the same as making a normal modded block entity but extending the class "AbstractFamiliarStorageBlockEntity".

Creating your own familiar bed

The process here is the same as creating a normal modded block and block entity but extending different classes. For the custom bed block you just need to extend the "AbstractFamiliarBedBlock" class and implement it as a normal modded block.

For the custom bed block entity you just need to extend the "AbstractFamiliarBedBlockEntity" class and implement it as a normal modded block entity.