mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Remove all raw usages of BSH, improve API generics
This commit is contained in:
@ -172,7 +172,7 @@ public class WorldEditBinding extends BindingHelper {
|
||||
@BindingMatch(type = {BaseBlock.class, BlockState.class, BlockStateHolder.class},
|
||||
behavior = BindingBehavior.CONSUMES,
|
||||
consumedCount = 1)
|
||||
public BlockStateHolder getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
|
||||
public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
|
||||
Actor actor = context.getContext().getLocals().get(Actor.class);
|
||||
ParserContext parserContext = new ParserContext();
|
||||
parserContext.setActor(context.getContext().getLocals().get(Actor.class));
|
||||
@ -311,19 +311,6 @@ public class WorldEditBinding extends BindingHelper {
|
||||
public BaseBiome getBiomeType(ArgumentStack context) throws ParameterException, WorldEditException {
|
||||
String input = context.next();
|
||||
if (input != null) {
|
||||
Actor actor = context.getContext().getLocals().get(Actor.class);
|
||||
World world;
|
||||
if (actor instanceof Entity) {
|
||||
Extent extent = ((Entity) actor).getExtent();
|
||||
if (extent instanceof World) {
|
||||
world = (World) extent;
|
||||
} else {
|
||||
throw new ParameterException("A world is required.");
|
||||
}
|
||||
} else {
|
||||
throw new ParameterException("An entity is required.");
|
||||
}
|
||||
|
||||
BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager()
|
||||
.queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry();
|
||||
List<BaseBiome> knownBiomes = biomeRegistry.getBiomes();
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user