Fixed Button/Lever, using a logical AND instead of XOR to get 3 face bits
This commit is contained in:
parent
e44bb33109
commit
c36a98db64
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package org.bukkit.material;
|
package org.bukkit.material;
|
||||||
|
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@ -40,7 +39,7 @@ public class Button extends MaterialData implements Redstone, Attachable {
|
|||||||
* @return BlockFace attached to
|
* @return BlockFace attached to
|
||||||
*/
|
*/
|
||||||
public BlockFace getAttachedFace() {
|
public BlockFace getAttachedFace() {
|
||||||
byte data = (byte) (getData() ^ 0x7);
|
byte data = (byte) (getData() & 0x7);
|
||||||
|
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case 0x1:
|
case 0x1:
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package org.bukkit.material;
|
package org.bukkit.material;
|
||||||
|
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@ -40,7 +39,7 @@ public class Lever extends MaterialData implements Redstone, Attachable {
|
|||||||
* @return BlockFace attached to
|
* @return BlockFace attached to
|
||||||
*/
|
*/
|
||||||
public BlockFace getAttachedFace() {
|
public BlockFace getAttachedFace() {
|
||||||
byte data = (byte) (getData() ^ 0x7);
|
byte data = (byte) (getData() & 0x7);
|
||||||
|
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case 0x1:
|
case 0x1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user