Remove all raw usages of BSH, improve API generics

This commit is contained in:
Kenzie Togami
2018-12-26 16:39:10 -08:00
parent a88f6b8430
commit 3fefcbf971
83 changed files with 242 additions and 259 deletions

View File

@ -35,6 +35,7 @@ import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.gamemode.GameMode;
import com.sk89q.worldedit.world.gamemode.GameModes;
import com.sk89q.worldedit.world.item.ItemTypes;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.type.HandTypes;
import org.spongepowered.api.entity.living.player.Player;
@ -196,7 +197,7 @@ public class SpongePlayer extends AbstractPlayerActor {
}
@Override
public void sendFakeBlock(BlockVector3 pos, BlockStateHolder block) {
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {
org.spongepowered.api.world.Location<World> loc = player.getWorld().getLocation(pos.getX(), pos.getY(), pos.getZ());
if (block == null) {
player.sendBlockChange(loc.getBlockPosition(), loc.getBlock());

View File

@ -135,7 +135,7 @@ public abstract class SpongeWorld extends AbstractWorld {
private static final BlockSnapshot.Builder builder = BlockSnapshot.builder();
@Override
public boolean setBlock(BlockVector3 position, BlockStateHolder block, boolean notifyAndLight) throws WorldEditException {
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, boolean notifyAndLight) throws WorldEditException {
checkNotNull(position);
checkNotNull(block);