mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Add a material to check if air is air, because there are now 3 types of air.
This commit is contained in:
@ -32,6 +32,7 @@ import com.sk89q.worldedit.util.TargetBlock;
|
||||
import com.sk89q.worldedit.util.auth.AuthorizationException;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.gamemode.GameMode;
|
||||
import com.sk89q.worldedit.world.gamemode.GameModes;
|
||||
@ -210,10 +211,10 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
while (y >= 0) {
|
||||
final Vector platform = new Vector(x, y, z);
|
||||
final BlockStateHolder block = world.getBlock(platform);
|
||||
final com.sk89q.worldedit.world.block.BlockType type = block.getBlockType();
|
||||
final BlockType type = block.getBlockType();
|
||||
|
||||
// Don't want to end up in lava
|
||||
if (type != BlockTypes.AIR && type != BlockTypes.LAVA) {
|
||||
if (!type.getMaterial().isAir() && type != BlockTypes.LAVA) {
|
||||
// Found a block!
|
||||
setPosition(platform.add(0.5, 1, 0.5));
|
||||
return true;
|
||||
@ -246,7 +247,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
Extent world = getLocation().getExtent();
|
||||
|
||||
// No free space above
|
||||
if (world.getBlock(new Vector(x, y, z)).getBlockType() != BlockTypes.AIR) {
|
||||
if (!world.getBlock(new Vector(x, y, z)).getBlockType().getMaterial().isAir()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user