feat: add pushable box blocks

This commit is contained in:
Martin Prokoph
2025-01-21 15:17:47 +01:00
parent 3c609340f2
commit 543a23ce0a
9 changed files with 240 additions and 26 deletions

View File

@@ -16,6 +16,7 @@ public:
Block GOAL = Block(Identifier("adventura", "goal"), 'O', Color::BRIGHT_GREEN, BlockSettingsBuilder().nonSolid().build());
Block WALL = Block(Identifier("adventura", "wall"), '0', Color::BRIGHT_BLACK, BlockSettingsBuilder().collidable().build());
Block SPIKE = Block(Identifier("adventura", "spike"), '^', Color::BRIGHT_RED, BlockSettingsBuilder().lethal().build());
Block BOX = Block(Identifier("adventura", "box"), 'x', Color::BRIGHT_CYAN, BlockSettingsBuilder().pushable().collidable().gravity().build());
BlockRegistry() {
registerBlock(AIR);
@@ -26,6 +27,7 @@ public:
registerBlock(GOAL);
registerBlock(WALL);
registerBlock(SPIKE);
registerBlock(BOX);
}
const Block getByEncoding(char encoding) {