Skip to content

Commit

Permalink
Add DataTransactionResult#successfulValue and replace old usages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDoot committed Jul 10, 2021
1 parent 06cf7bc commit 3192fe5
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public Byte getValueFromEvent(final Byte originalValue, final DataTransactionRes
newValue = (byte) (newInvisible ? newValue | EntityFlagsConverter.INVISIBLE_MASK : newValue & ~EntityFlagsConverter.INVISIBLE_MASK);
newValue = (byte) (newGlowing ? newValue | EntityFlagsConverter.GLOWING_MASK : newValue & ~EntityFlagsConverter.GLOWING_MASK);
newValue = (byte) (newElytra ? newValue | EntityFlagsConverter.FLYING_ELYTRA_MASK
: newValue & ~EntityFlagsConverter.FLYING_ELYTRA_MASK
: newValue & ~EntityFlagsConverter.FLYING_ELYTRA_MASK
);
return newValue;
}
Expand All @@ -128,12 +128,12 @@ private boolean getFlag(final byte value, final int mask) {
return (value & mask) != 0;
}

public static final int ON_FIRE_MASK = 0b00000001; // 0x01
public static final int CROUCHED_MASK = 0b00000010; // 0x02
public static final int UNUSED_MASK = 0b00000100; // 0x04
public static final int SPRINTING_MASK = 0b00001000; // 0x08
public static final int UNUSED_2_MASK = 0b00010000; // 0x10
public static final int INVISIBLE_MASK = 0b00100000; // 0x20
public static final int GLOWING_MASK = 0b01000000; // 0x40
public static final int FLYING_ELYTRA_MASK = 0b10000000; // 0x80
public static final int ON_FIRE_MASK = 0b00000001; // 0x01
public static final int CROUCHED_MASK = 0b00000010; // 0x02
public static final int UNUSED_MASK = 0b00000100; // 0x04
public static final int SPRINTING_MASK = 0b00001000; // 0x08
public static final int UNUSED_2_MASK = 0b00010000; // 0x10
public static final int INVISIBLE_MASK = 0b00100000; // 0x20
public static final int GLOWING_MASK = 0b01000000; // 0x40
public static final int FLYING_ELYTRA_MASK = 0b10000000; // 0x80
}

0 comments on commit 3192fe5

Please sign in to comment.