mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Fixed Button/Lever, using a logical AND instead of XOR to get 3 face bits
This commit is contained in:
parent
e44bb33109
commit
c36a98db64
2 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.bukkit.material;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
@ -40,7 +39,7 @@ public class Button extends MaterialData implements Redstone, Attachable {
|
|||
* @return BlockFace attached to
|
||||
*/
|
||||
public BlockFace getAttachedFace() {
|
||||
byte data = (byte) (getData() ^ 0x7);
|
||||
byte data = (byte) (getData() & 0x7);
|
||||
|
||||
switch (data) {
|
||||
case 0x1:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.bukkit.material;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
@ -40,7 +39,7 @@ public class Lever extends MaterialData implements Redstone, Attachable {
|
|||
* @return BlockFace attached to
|
||||
*/
|
||||
public BlockFace getAttachedFace() {
|
||||
byte data = (byte) (getData() ^ 0x7);
|
||||
byte data = (byte) (getData() & 0x7);
|
||||
|
||||
switch (data) {
|
||||
case 0x1:
|
||||
|
|
Loading…
Add table
Reference in a new issue