mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 17:27:38 +00:00
Fix error when parsing hand/offhand/pos1 as blocks.
This commit is contained in:
parent
aafb854e4f
commit
f84f3c6f85
@ -238,7 +238,7 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockType = blockInHand.getBlockType();
|
blockType = blockInHand.getBlockType();
|
||||||
blockStates = blockInHand.getStates();
|
blockStates.putAll(blockInHand.getStates());
|
||||||
} else if ("offhand".equalsIgnoreCase(typeString)) {
|
} else if ("offhand".equalsIgnoreCase(typeString)) {
|
||||||
// Get the block type from the item in the user's off hand.
|
// Get the block type from the item in the user's off hand.
|
||||||
final BaseBlock blockInHand = getBlockInHand(context.requireActor(), HandSide.OFF_HAND);
|
final BaseBlock blockInHand = getBlockInHand(context.requireActor(), HandSide.OFF_HAND);
|
||||||
@ -247,7 +247,7 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockType = blockInHand.getBlockType();
|
blockType = blockInHand.getBlockType();
|
||||||
blockStates = blockInHand.getStates();
|
blockStates.putAll(blockInHand.getStates());
|
||||||
} else if ("pos1".equalsIgnoreCase(typeString)) {
|
} else if ("pos1".equalsIgnoreCase(typeString)) {
|
||||||
// Get the block type from the "primary position"
|
// Get the block type from the "primary position"
|
||||||
final World world = context.requireWorld();
|
final World world = context.requireWorld();
|
||||||
@ -260,7 +260,7 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
final BlockState blockInHand = world.getBlock(primaryPosition);
|
final BlockState blockInHand = world.getBlock(primaryPosition);
|
||||||
|
|
||||||
blockType = blockInHand.getBlockType();
|
blockType = blockInHand.getBlockType();
|
||||||
blockStates = blockInHand.getStates();
|
blockStates.putAll(blockInHand.getStates());
|
||||||
} else {
|
} else {
|
||||||
// Attempt to lookup a block from ID or name.
|
// Attempt to lookup a block from ID or name.
|
||||||
blockType = BlockTypes.get(typeString.toLowerCase());
|
blockType = BlockTypes.get(typeString.toLowerCase());
|
||||||
|
Loading…
Reference in New Issue
Block a user