mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:18:36 +00:00
Merge branch 'master' into breaking
This commit is contained in:
@ -904,8 +904,8 @@ public final class BlockTypes {
|
||||
try {
|
||||
BlockStateHolder block = LegacyMapper.getInstance().getBlockFromLegacy(input);
|
||||
if (block != null) return block.getBlockType();
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (IndexOutOfBoundsException e) {}
|
||||
} catch (NumberFormatException | IndexOutOfBoundsException e) {
|
||||
}
|
||||
|
||||
throw new SuggestInputParseException("Does not match a valid block type: " + inputLower, inputLower, () -> Stream.of(BlockTypes.values)
|
||||
.filter(b -> b.getId().contains(inputLower))
|
||||
|
@ -147,4 +147,4 @@ public class BundledBlockData {
|
||||
public SimpleBlockMaterial material = new SimpleBlockMaterial();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -40,8 +40,6 @@ import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.item.ItemType;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import com.sk89q.worldedit.extension.input.ParserContext;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -50,6 +48,7 @@ import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
@ -37,6 +37,7 @@ public class WeatherTypes {
|
||||
private WeatherTypes() {
|
||||
}
|
||||
|
||||
|
||||
public static @Nullable WeatherType get(final String id) {
|
||||
return WeatherType.REGISTRY.get(id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user