Friends&Foes compat (compat in general)
Faboslav opened this issue ยท 1 comments
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.
The mod is partially compatible with Friends and Foes. Female beekeepers can exist and interact with their block and pet bees. However, that female illusionist bug NEEDs to be patched. I had to blacklist the female illusionist from spawning with Bad Mobs, because of that. I almost lost my hardcore world due to them spawning in a raid, and I had to cheat and use the /kill command to get rid of all of them and their arrows to avoid my PC overheating.