So back in 1.12 the villagers had a bug where you couldn't use a nametag on them because- guess what right clicking does on a villager?
BOOM. i am a loser who made the same mistake now...
I have a custom item that is supposed to be used on entities, but when i look at the name-tag code, i didn't see how it was fixed, so i went to the villagers code and found this:
VillagerEntity#processInteract
public boolean processInteract(PlayerEntity player, Hand hand) {
ItemStack ite
Hey everyone, i just wanted to update the thread in case anyone else needs more detail on how to do something similar to this. I used Animefan8888's suggestion:
and found that EntityInteractSpecific worked better for me. As i have a lot of custom functions all over my mod it wouldn't do any good to post my code but here is a breakdown for some direction!
@SubscribeEvent
public void EntityInteract(EntityInteractSpecific event) {
if(event.getTarget() instanceof [ENTITY YOU