[SPIGOT-4298] BlockCommandSender returns the wrong block Created: 21/Aug/18  Updated: 21/Aug/18  Resolved: 21/Aug/18

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: PseudoKnight Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None

Version: git-Spigot-fe3ab0d-ec86574 (MC: 1.13)
Guidelines Read: Yes

 Description   

This is an int rounding issue at negative coordinates. You can see it here:

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java#26

This is because CommandListenerWrapper.getPosition() returns a centered position, not a block position. You can see that being defined in n.m.s.TileEntityCommand.

Due to the simple logic nature of the issue, I didn't include reproduction code. If you wish for me to still include reproduction code for these, let me know.



 Comments   
Comment by md_5 [ 21/Aug/18 ]

Unless you’re includijg a PR to fix the issue you need to follow the guidelines

Generated at Sat Dec 13 15:23:28 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.