-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add BlockPaletteParser, for example to deal with minecraft:grass->min…
…ecraft:short_grass id upgrade
- Loading branch information
Showing
6 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/net/hollowcube/schem/blockpalette/BlockPaletteParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package net.hollowcube.schem.blockpalette; | ||
|
||
import net.minestom.server.instance.block.Block; | ||
|
||
public interface BlockPaletteParser { | ||
Block parse(String key); | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/net/hollowcube/schem/blockpalette/CommandBlockPaletteParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.hollowcube.schem.blockpalette; | ||
|
||
import net.minestom.server.command.builder.arguments.minecraft.ArgumentBlockState; | ||
import net.minestom.server.instance.block.Block; | ||
|
||
public class CommandBlockPaletteParser implements BlockPaletteParser { | ||
@Override | ||
public Block parse(String key) { | ||
return ArgumentBlockState.staticParse(key); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters