Remove all raw usages of BSH, improve API generics

This commit is contained in:
Kenzie Togami
2018-12-26 16:39:10 -08:00
committed by IronApollo
parent 1d87642b52
commit 590b7e23a9
105 changed files with 372 additions and 347 deletions

View File

@ -202,10 +202,10 @@ public class WorldEditBinding extends BindingHelper {
return result instanceof BlockState ? (BlockState) result : result.toImmutableState();
}
@BindingMatch(type = BaseBlock.class,
@BindingMatch(type = {BaseBlock.class, BlockState.class, BlockStateHolder.class},
behavior = BindingBehavior.CONSUMES,
consumedCount = 1)
public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
return new BaseBlock(getBlockState(context));
}
@ -360,7 +360,6 @@ public class WorldEditBinding extends BindingHelper {
String input = context.next();
if (input != null) {
if (MathMan.isInteger(input)) return new BaseBiome(Integer.parseInt(input));
BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager()
.queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry();
List<BaseBiome> knownBiomes = biomeRegistry.getBiomes();

View File

@ -21,7 +21,6 @@ package com.sk89q.worldedit.internal.registry;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.NoMatchException;