-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
This server is running CraftBukkit version git-Bukkit-a0a27e5 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
-
Yes
Not an API bug report, but a missing Physics event call. Providing a plugin but should not be needed to understand the concept.
There is a missing physics event call which minimally causes attached blocks like signs to pop off without calling a physics event for that particular block. A video illustrating this concept with the attached plugin is shown. Where the EventHandler is:
@EventHandler public void handle(BlockPhysicsEvent event) { Material type = event.getBlock().getType(); if (type == Material.WALL_SIGN || type == Material.SIGN) { event.setCancelled(true); } }
Expected behavior is that the sign would not pop off since I am cancelling all physics events involving signs.
The location of the missing event call is in the nms.Block class; with a method that looks like as follows.
public void a(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, int i) { BlockPosition.b blockposition_b = BlockPosition.b.r(); Throwable throwable = null; try { EnumDirection[] aenumdirection = EnumDirection.values(); int j = aenumdirection.length; for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; blockposition_b.j(blockposition).d(enumdirection); IBlockData iblockdata1 = generatoraccess.getType(blockposition_b); IBlockData iblockdata2 = iblockdata1.updateState(enumdirection.opposite(), iblockdata, generatoraccess, blockposition_b, blockposition); a(iblockdata1, iblockdata2, generatoraccess, blockposition_b, i); } ...
The updateState is where the sign popping occurs. This method is occurs after the ALLOWED physics event of the original broken block.
I believe this is sufficient information. And it is probably faster for someone else to add in the event call than me. Not well practiced enough to quickly whip up Pull Requests.
Requested declaration
PPS: Bug reports which do not 1) contain a declaration of testing in Vanilla and without plugins, or 2) in the case of plugin API bugs, contain a minimal reproduction case (source + jar please) will be closed. Bug reports must contain step by step instructions to reproduce the bug from a clean server install with no assumptions or prior knowledge. Also make sure you include the full output of /version in your report. Please copy and paste this statement to the bottom of your report to indicate that you have read and understood it.