mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 12:06:41 +00:00
some hasty refactoring
This commit is contained in:
@ -72,7 +72,7 @@ public class OverlayBrush extends PerformBrush
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean isIgnoredBlock(int materialId)
|
||||
{
|
||||
BlockTypes type = BlockTypes.getFromStateId(materialId);
|
||||
BlockTypes type = BlockTypes.get(materialId);
|
||||
switch (type) {
|
||||
case WATER:
|
||||
case LAVA:
|
||||
@ -86,7 +86,7 @@ public class OverlayBrush extends PerformBrush
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean isOverrideableMaterial(int materialId)
|
||||
{
|
||||
BlockMaterial mat = BlockTypes.getFromStateId(materialId).getMaterial();
|
||||
BlockMaterial mat = BlockTypes.get(materialId).getMaterial();
|
||||
if (allBlocks && !(mat.isAir()))
|
||||
{
|
||||
return true;
|
||||
|
@ -9,7 +9,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -174,7 +173,7 @@ public class PunishBrush extends PerformBrush
|
||||
target = location.clone();
|
||||
target.add(x, y, z);
|
||||
Player plr = ((Player) entity);
|
||||
BlockData bd = BukkitAdapter.adapt(BlockState.get(v.getVoxelId() + (v.getPropertyId() << BlockTypes.BIT_OFFSET)));
|
||||
BlockData bd = BukkitAdapter.adapt(BlockState.getFromInternalId(v.getVoxelId() + (v.getPropertyId() << BlockTypes.BIT_OFFSET)));
|
||||
plr.sendBlockChange(target, bd);
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class ScannerBrush extends Brush
|
||||
@Override
|
||||
protected final void arrow(final SnipeData v)
|
||||
{
|
||||
this.checkFor = BukkitAdapter.adapt(BlockTypes.getFromStateId(v.getVoxelId()));
|
||||
this.checkFor = BukkitAdapter.adapt(BlockTypes.get(v.getVoxelId()));
|
||||
this.scan(v, this.getTargetBlock().getFace(this.getLastBlock()));
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ public class ScannerBrush extends Brush
|
||||
@Override
|
||||
protected final void powder(final SnipeData v)
|
||||
{
|
||||
this.checkFor = BukkitAdapter.adapt(BlockTypes.getFromStateId(v.getVoxelId()));
|
||||
this.checkFor = BukkitAdapter.adapt(BlockTypes.get(v.getVoxelId()));
|
||||
this.scan(v, this.getTargetBlock().getFace(this.getLastBlock()));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user