geforkt von Mirrors/FastAsyncWorldEdit
Ensure BlockCategories are initialized.
We should probably have a way to initialize all these catalog classes ahead of time.
Dieser Commit ist enthalten in:
Ursprung
dddf2b963a
Commit
cdd71178f5
@ -26,6 +26,7 @@ import com.sk89q.worldedit.function.pattern.BlockPattern;
|
|||||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||||
import com.sk89q.worldedit.function.pattern.RandomPattern;
|
import com.sk89q.worldedit.function.pattern.RandomPattern;
|
||||||
import com.sk89q.worldedit.internal.registry.InputParser;
|
import com.sk89q.worldedit.internal.registry.InputParser;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockCategories;
|
||||||
import com.sk89q.worldedit.world.block.BlockCategory;
|
import com.sk89q.worldedit.world.block.BlockCategory;
|
||||||
import com.sk89q.worldedit.world.block.BlockType;
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ public class BlockCategoryPatternParser extends InputParser<Pattern> {
|
|||||||
if(!input.startsWith("##")) {
|
if(!input.startsWith("##")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
BlockCategory category = BlockCategory.REGISTRY.get(input.substring(2).toLowerCase());
|
BlockCategory category = BlockCategories.get(input.substring(2).toLowerCase());
|
||||||
if (category == null) {
|
if (category == null) {
|
||||||
throw new InputParseException("Unknown block tag: " + input.substring(2));
|
throw new InputParseException("Unknown block tag: " + input.substring(2));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren