LiteLDev / LegacyScriptEngine

A plugin engine for running LLSE plugins on LeviLamina
GNU General Public License v3.0
48 stars 8 forks source link

onInteractOnEntity event #165

Closed HeliosPe closed 2 months ago

HeliosPe commented 1 year ago

Is your feature request related to a problem? Please describe.

Interact with entity event is very required. Could be a solution to use player.getEntityFromViewVector() in "onUseItem" event...

!!BUT!!

--it is a disgusting, crutchy solution --can not be intercepted --when interacting with villagers or npc's this methon doesn't work. The relative GUI, infact, is opening.

I could use player.getEntityFromViewVector() in "onOpenContainerScreen" !!BUT!! it works only with Villagers and bugs up when opening inventory looking on the villager.

p.s. It could be very helpfull intercepting NPC's gui, for using the /dialogue command and making cool dialogues. p.p.s In minecraft is not possible to use /dialogue command on entity who hasn't NPC component.

Describe the solution you'd like

In case it would be problematic to make an event possible to intercept with mobs, such events as onTrade and onDialogue will help.

dreamguxiang commented 1 year ago

use PlayerInteractEntityEvent?

HeliosPe commented 1 year ago

use PlayerInteractEntityEvent?

I'm sorry, I forgot to specify that I'm talking about LLSE. I haven't found such event there