[SPIGOT-7079] Allays don't call EntityTargetEvent on ground items Created: 24/Jun/22 Updated: 25/Dec/24 Resolved: 16/Aug/22 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Coral_Papa | Assignee: | Doc |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
N/a |
Issue Links: |
|
||||||||
Version: | 3539-Spigot-56be6a8-82f7574 (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) | ||||||||
Guidelines Read: | Yes |
Description |
Allays don't call EntityTargetEvent when targeting items to pick up @EventHandler public void ontarger(EntityTargetEvent event) { Entity entity = event.getEntity(); Entity target = event.getTarget(); if(entity == null || target == null) return; Bukkit.broadcastMessage(entity.getType().name() + " " + target.getType().name()); } I am trying to prevent Allays from picking up certain items. |
Comments |
Comment by Coral_Papa [ 25/Jun/22 ] |
sorry about that, updated version and retested same results |
Comment by Doc [ 24/Jun/22 ] |
The version provided its not Spigot/CraftBukkit.
About EntityTargetEvent maybe can check for the missings cases.. and about EntityPickupItemEventy can make another PR for this case maybe a "cooldown" for make the allay forget this item in a few ticks... |