Skip to content

Commit

Permalink
Revert to old behavior of coercing
Browse files Browse the repository at this point in the history
  • Loading branch information
octylFractal committed Feb 15, 2021
1 parent 23a4e2d commit fb5d7f8
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -30,7 +30,7 @@
import com.sk89q.worldedit.util.Direction.Flag;
import com.sk89q.worldedit.util.nbt.BinaryTag;
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
import com.sk89q.worldedit.util.nbt.IntBinaryTag;
import com.sk89q.worldedit.util.nbt.NumberBinaryTag;
import com.sk89q.worldedit.world.block.BaseBlock;

import static com.google.common.base.Preconditions.checkNotNull;
Expand Down Expand Up @@ -93,8 +93,8 @@ private BaseBlock transformNbtData(BaseBlock state) {
if (tag != null) {
// Handle blocks which store their rotation in NBT
BinaryTag rotTag = tag.get("Rot");
if (rotTag instanceof IntBinaryTag) {
int rot = ((IntBinaryTag) rotTag).value();
if (rotTag instanceof NumberBinaryTag) {
int rot = ((NumberBinaryTag) rotTag).intValue();

Direction direction = MCDirections.fromRotation(rot);

Expand Down

0 comments on commit fb5d7f8

Please sign in to comment.