mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Remove all raw usages of BSH, improve API generics
This commit is contained in:
@ -131,7 +131,7 @@ public class RegionIntersection extends AbstractRegion {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({"unchecked"})
|
||||
@Override
|
||||
public Iterator<BlockVector3> iterator() {
|
||||
Iterator<BlockVector3>[] iterators = (Iterator<BlockVector3>[]) new Iterator[regions.size()];
|
||||
|
@ -119,7 +119,7 @@ public class EllipsoidRegionSelector implements RegionSelector, CUIRegion {
|
||||
|
||||
@Override
|
||||
public boolean selectPrimary(BlockVector3 position, SelectorLimits limits) {
|
||||
if (position.equals(region.getCenter()) && region.getRadius().lengthSq() == 0) {
|
||||
if (position.equals(region.getCenter().toBlockPoint()) && region.getRadius().lengthSq() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
|
||||
/**
|
||||
* Generates solid and hollow shapes according to materials returned by the
|
||||
@ -51,7 +51,7 @@ public abstract class ArbitraryShape {
|
||||
* @param defaultMaterial The material returned by the pattern for the current block.
|
||||
* @return material to place or null to not place anything.
|
||||
*/
|
||||
protected abstract BlockStateHolder getMaterial(int x, int y, int z, BlockStateHolder defaultMaterial);
|
||||
protected abstract BaseBlock getMaterial(int x, int y, int z, BaseBlock defaultMaterial);
|
||||
|
||||
/**
|
||||
* Generates the shape.
|
||||
@ -71,7 +71,7 @@ public abstract class ArbitraryShape {
|
||||
int z = position.getBlockZ();
|
||||
|
||||
if (!hollow) {
|
||||
final BlockStateHolder material = getMaterial(x, y, z, pattern.apply(position));
|
||||
BaseBlock material = getMaterial(x, y, z, pattern.apply(position));
|
||||
if (material != null && editSession.setBlock(position, material)) {
|
||||
++affected;
|
||||
}
|
||||
@ -79,7 +79,7 @@ public abstract class ArbitraryShape {
|
||||
continue;
|
||||
}
|
||||
|
||||
final BlockStateHolder material = getMaterial(x, y, z, pattern.apply(position));
|
||||
BaseBlock material = getMaterial(x, y, z, pattern.apply(position));
|
||||
if (material == null) {
|
||||
continue;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ package com.sk89q.worldedit.regions.shape;
|
||||
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
|
||||
/**
|
||||
* Generates solid and hollow shapes according to materials returned by the
|
||||
@ -34,7 +34,7 @@ public class RegionShape extends ArbitraryShape {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateHolder getMaterial(int x, int y, int z, BlockStateHolder defaultMaterial) {
|
||||
protected BaseBlock getMaterial(int x, int y, int z, BaseBlock defaultMaterial) {
|
||||
if (!this.extent.contains(BlockVector3.at(x, y, z))) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user