[SPIGOT-4073] Improving on BlockState API Attachables Created: 19/Jul/18 Updated: 07/Apr/23 Resolved: 07/Apr/23 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | Bjarne Koll | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | 1.13-pre7, API, blocks, suggestions |
Version: | 1.13-pre.7 |
Description |
With the MaterialData being deprecated, I ran into a few issues while trying to update a few bits of my code: As of 1.12.2 the Attachable MaterialData was able to be used to detect most (excluding doors and redstone and maybe more stuff ?) blocks that needed attachment to be placed in the world which can be used to prevent block changes the would indirectly destroy those blocks. With 1.13-pre7 the Attachable interface is only covering tripwirehooks while the directional interface seems to cover stuff like levers and signs. Other blocks like torches or carpets seem to be not covered at all :/ The suggestion would be to implement a simple interface below the Directional interface that represents BlockStates that are not only directional but need to be placed against the blockface provided by directional. |
Comments |
Comment by Black Hole [ 07/Apr/23 ] |
Resolved in https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/8e43b278166a0a004677327e43fa89b3e263d907 |
Comment by md_5 [ 22/Jul/18 ] |
This feels like a wontfix to me, as far as I can tell there is no universal "attachable" anywhere - see wall torches for example. |
Comment by Black Hole [ 19/Jul/18 ] |
Such a marker interface doesn't fit with the new API. An alternative could be to introduce a new well documented method in Material. Once there is MCP for 1.13 it should be easy to identify the corresponding method in nms.Block. |