[SPIGOT-4483] EntityInteractEvent not firing when zombies step on turtle egg Created: 11/Nov/18 Updated: 12/Nov/18 Resolved: 12/Nov/18 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Shane Bee | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | EntityInteractEvent, TURTLE_EGG, trample, zombie | ||
| Environment: |
MacOS 10.14 Java = java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode) Shanes-MacBook-Pro:~ Shane$ |
||
| Attachments: |
|
| Version: | This server is running CraftBukkit version git-Spigot-947a8e7-3a91182 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT) |
| Guidelines Read: | Yes |
| Description |
|
When a zombie maliciously jumps on and breaks turtle eggs the EntityInteractEvent does not fire. If a zombie steps on an egg and it breaks it fires.
Further detail: I used the following code to test this @EventHandler public void onTurtleEggTrample(EntityInteractEvent e) { Material block = e.getBlock().getType(); String string = e.getEntity().toString(); Bukkit.getServer().getConsoleSender().sendMessage("test " + block + " " + string); } If a zombie walks over an egg and it breaks, the event will fire, sending the message to console. (This is the event almost like the zombie accidentally broke the egg by walking on it, not when they jump on it)
If a zombie jumps on an egg and it breaks (the one where they jump up and down until it breaks, and the little smoke cloud puffs out) then the event does not fire.
VIDEO: As you can see in the video, the first time the Zombie tramples the egg, the egg breaks, the smoke cloud appears, but the event is not fired to the console. The second time the zombie tramples the egg, no animation, and the event fires. |
| Comments |
| Comment by Shane Bee [ 12/Nov/18 ] |
|
Okay did another test. It works, thank you so much for fixing this so fast.
Greatly appreciated |
| Comment by Shane Bee [ 12/Nov/18 ] |
|
Ah sorry. I saw the commit and assumed it automatically updated for build tools. I then ran /ver and I was still 1 version behind. Ill try again! |
| Comment by md_5 [ 12/Nov/18 ] |
|
You were probably too quick. Wait a minute and try again. |
| Comment by Shane Bee [ 12/Nov/18 ] |
|
Hey. Thanks for getting back so fast. I just built a fresh spigot, and same issue. |
| Comment by md_5 [ 12/Nov/18 ] |
|
Sorry, I see. Fixed |
| Comment by Shane Bee [ 12/Nov/18 ] |
|
but zombie jumps on it, the egg breaks, and the event isnt firing (see the video) |
| Comment by Shane Bee [ 12/Nov/18 ] |
|
" The egg is not changed in any way by the zombie jumping on it." Im not sure what you mean by the egg is not changed, when the zombie jumps on it, the eggs break
I guess the moral of the story is, the entity (zombie) is interacting with the block, but the Entity interact event isnt firing for this event. |
| Comment by Shane Bee [ 12/Nov/18 ] |
|
But the problem is, its only firing every other time, or less. So if I try to cancel said event, it does not cancel it each time. |
| Comment by md_5 [ 12/Nov/18 ] |
|
This kind of seems correct to me. |