PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
53 stars 21 forks source link

ItemsAdder Mythic Mobs onInteract trigger non functioning #2096

Open shadymac opened 1 year ago

shadymac commented 1 year ago

Terms

Discord tag (optional)

No response

What happened?

Using ItemsAdder with Mythic Mobs - models in Mythic Mobs using onInteract triggers, do not trigger the mob. Changing the mob trigger to onDamaged and hitting the mob works fine. Changing the mobs trigger to onInteract, and right-clicking the mob does not work.

Steps to reproduce the issue

` Skills:

Server version

This server is running Paper version git-Paper-265 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 117579c)

ItemsAdder Version

ItemsAdder 3.2.5-r3

ProtocolLib Version

ProtocolLib 5.0.0-Snapshot-b602

LoneLibs Version

Lonelibs 1.0.21

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

No Errors reported

ItemsAdder config.yml

No response

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

LoneDev6 commented 1 year ago

Strange. ItemsaAdder triggers PlayerInteractAtEntityEvent and PlayerInteractEntityEvent when you interact with custom entities. I don't have any idea of why this doesn't work for Mythicmobs, maybe they don't intercept these events correctly.

microvencn commented 1 year ago

I had almost the same problem today. I created a listener listening MythicMobInteractEvent provided by MythicMob. It can't work when I set a custom skin for it. Not only that, the listener listening PlayerInteractAtEntityEvent also can't work.

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onInteractUnknownGhost(PlayerInteractAtEntityEvent event) {
    Entity entity = event.getRightClicked();
    // Triggers normally when not set custom skin, but never trigger when set a custom skin for the mythicmob.
    Bukkit.getLogger().info(entity.getName());
}
UnknownSoul:
  Type: ZOMBIE
  Display: "Soul"
  Health: 10
  Damage: 0
  Skills:
    - customentity{model=soul:unknown_soul} @self ~onSpawn
    - customentity{play=attack} @self ~onAttack
info:
  namespace: soul

entities:
  unknown_soul:
    display_name: "Soul"
    type: ZOMBIE
    model_folder: entity/unknown_soul

My plugins version: ItemsAdder 3.4.1b LoneLibs 1.0.24 MythicMobs 5.2.6

Hope that u can solve this problem :) @LoneDev6

Apiz05 commented 5 months ago

i also have this problem, but i doesn't make an listener event like microvencn here I just use the normal way like the oninteract

Plugins

Tested Server Version

file:

  namespace: customs
entities:
  bagrid_fish:
    display_name: "Bagrid fish"
    type: DOLPHIN
    model_folder: entity/bagrid_fish
    silent: true 
bagrid_test:
  Type: ZOMBIE
  AIGoalSelectors:
  - 0 clear
  AiTargetSelectors:
  - 0 clear
  Drops: 
    - customs:bagrid 1
  Options:
    Silent: true
    PreventOtherDrops: true
    MovementSpeed: .25
  Skills:
  - customentity{model=customs:bagrid_fish} @self ~onSpawn
  - skill{s=CaptureFish} @Trigger ~onInteract
  - skill{s=AirDeath} @self ~onSpawn 
  TriggerConditions:
  - holding{m=STICK}
  Skills:
    - message{msg="You have captured the Mystic Cod!"} @Trigger
    - command{c=iagive <trigger.name> customs:bagrid_net 1 silent} @Trigger
    - remove @self

AirDeath:
  Conditions:
  - inblock{b=WATER} false
  Skills:
  - damage{a=2} @self

i hope u will look into this @LoneDev6