-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello there, i got the reported issue here:
Faboslav/friends-and-foes#145
That means when you create your female entities
var replacedEntity = (Illusioner) entity;
replacementEntity = new FemaleIllusioner(entity.level);
replacementEntity.setItemSlot(EquipmentSlot.MAINHAND, replacedEntity.getItemBySlot(EquipmentSlot.MAINHAND));
you are basically cancelling all of other mods custom entity setups, for example my illusioner illusion setup:
IllusionerEntity illusioner = (IllusionerEntity) (Object) this;
IllusionerEntity illusion = EntityType.ILLUSIONER.create(this.getWorld());
illusion.equipStack(EquipmentSlot.MAINHAND, new ItemStack(Items.BOW));
IllusionerEntityAccess illusionerAccess = (IllusionerEntityAccess) illusion;
illusionerAccess.friendsandfoes_setIsIllusion(true);
illusionerAccess.friendsandfoes_setIllusioner(illusioner);
illusionerAccess.friendsandfoes_setTicksUntilDespawn(ILLUSION_LIFETIME_TICKS);
illusion.setHealth(this.getMaxHealth());
illusion.copyPositionAndRotation(illusioner);
illusion.setTarget(illusioner.getTarget());
boolean teleportResult = illusionerAccess.friendsandfoes_tryToTeleport(x, y, z);
if (teleportResult) {
this.getEntityWorld().spawnEntity(illusion);
illusionerAccess.friendsandfoes_spawnCloudParticles();
}
You should always somehow keep all the original entity context/data and just add your additional data, so it is rendered as female.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels