mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 12:33:54 +00:00
Use BlockState for player inventory getBlock
This commit is contained in:
@ -50,7 +50,7 @@ public class PlayerWrapper extends AbstractPlayerActor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getBlockInHand(HandSide handSide) throws WorldEditException {
|
||||
public BlockState getBlockInHand(HandSide handSide) throws WorldEditException {
|
||||
return parent.getBlockInHand(handSide);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class DefaultBlockParser extends InputParser<BlockStateHolder> {
|
||||
super(worldEdit);
|
||||
}
|
||||
|
||||
private static BaseBlock getBlockInHand(Actor actor, HandSide handSide) throws InputParseException {
|
||||
private static BlockState getBlockInHand(Actor actor, HandSide handSide) throws InputParseException {
|
||||
if (actor instanceof Player) {
|
||||
try {
|
||||
return ((Player) actor).getBlockInHand(handSide);
|
||||
|
@ -65,7 +65,7 @@ public class PlayerProxy extends AbstractPlayerActor {
|
||||
|
||||
|
||||
@Override
|
||||
public BaseBlock getBlockInHand(HandSide handSide) throws WorldEditException {
|
||||
public BlockState getBlockInHand(HandSide handSide) throws WorldEditException {
|
||||
return basePlayer.getBlockInHand(handSide);
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ public class SnapshotRestore {
|
||||
// Now just copy blocks!
|
||||
for (Vector pos : entry.getValue()) {
|
||||
try {
|
||||
BaseBlock block = chunk.getBlock(pos);
|
||||
BlockState block = chunk.getBlock(pos);
|
||||
editSession.setBlock(pos, block);
|
||||
} catch (DataException e) {
|
||||
// this is a workaround: just ignore for now
|
||||
|
Reference in New Issue
Block a user