[SPIGOT-1877] TrapDoor shouldn't implement Attachable Created: 11/Mar/16 Updated: 12/Mar/16 Resolved: 12/Mar/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Johnnywoof | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 0 |
Labels: | 1.9, blocks, bug, bukkit, spigot | ||
Environment: |
Spigot 1.9 |
Description |
In the recent 1.9 update trap doors are no longer attached to a block. (as in they'll pop off if the adjacent block is broken) Therefore, the trap door class should not implement attachable. Also see https://bugs.mojang.com/browse/MC-83069 |
Comments |
Comment by md_5 [ 12/Mar/16 ] |
Sounds sane to me. Just looking now, it already has all the methods from Directional, so I'm still not convinced on the point of removing it. |
Comment by Matthew Steglinski [ 12/Mar/16 ] |
Perhaps just implementing the Directional interface and deprecating the getAttachedFace() method from Attachable for now and removing it in the update to 1.10 would be fine. It is a fairly minor change but it should be in our interest to stay in line with Mojang behavior/implementation. |
Comment by md_5 [ 12/Mar/16 ] |
The hinge is "attached" to a block in my opinion. That block may just be air |
Comment by Johnnywoof [ 12/Mar/16 ] |
I see the reasoning behind your conclusion, but the idea of the Attachable interface is that the block is attached to another block, as in if the attached block is broken so will the current block. (See the implementing classes at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/material/Attachable.html) |
Comment by md_5 [ 12/Mar/16 ] |
<SainttX> md_5 for that trapdoor change should I readd the extends SimpleAttachableMaterialData and just override getAttachedFace? Or should I just keep how it is in the PR (ie. removing the extends and removing the Attachable interface implementation) with getAttachedFace overriden? <~md_5> SainttX well first of all I dont understand how trapdoors in 1.9 are different <~md_5> they look the same to me <SainttX> Oops forgot to hit send on the PR. Message was: "They appear visually attached however no longer require a supporting block (ie. if the block they are 'attached' to breaks the trapdoor will not break anymore). This change occured in snapshot 15w31a (http://minecraft.gamepedia.com/15w31a#Blocks_2)." <~md_5> that is ridiculous <~md_5> how is that not a bug <~md_5> floating trapdoors <SainttX> Intended according to Dinnerbone <SainttX> https://bugs.mojang.com/browse/MC-83069 <%__0x277F> Classic. <AlphaBlend> trapdoors no longer require a connecting block <~md_5> SainttX whats wrong with just returning air as the attached block? <%__0x277F> Well, more customization aptitude, I guess. :/ <AlphaBlend> this is a 1.9 change <AlphaBlend> i know it seems like odd behavior, i'd call it an odd change myself <~md_5> they still always have a hinge block <~md_5> it's just air in some cases <AlphaBlend> true <SainttX> md_5 The only method that Attachable contains is BlockFace getAttachedFace(), don't think there is an attached block <~md_5> there is though <~md_5> Sometimes it's an actual block, and sometimes it is air <SainttX> I don't see an actual method to get the block though, it isn't in SimpleAttachableMaterialData nor TrapDoor <SainttX> Just the attached face <~md_5> yeah and the attached face is the hinge face <~md_5> aside from not breaking when the hinge face is air, I dont see any other changes <~md_5> Which in my mind makes the API still valid <SainttX> Ok |