Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friends&Foes compat (compat in general) #16

Open
Faboslav opened this issue Oct 16, 2023 · 1 comment
Open

Friends&Foes compat (compat in general) #16

Faboslav opened this issue Oct 16, 2023 · 1 comment

Comments

@Faboslav
Copy link

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.

@Faboslav Faboslav changed the title Friends&Foes compat Friends&Foes compat (every other mod compat) Oct 16, 2023
@Faboslav Faboslav changed the title Friends&Foes compat (every other mod compat) Friends&Foes compat (compat in general) Oct 16, 2023
@Daralexen05
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants