some blocks were added into creative, names for flowers fixed, carpet crafts, emeralnd generates in flat worlds

This commit is contained in:
GameHerobrine 2023-02-22 17:03:09 +03:00
parent 2342e1e783
commit 87ed00d718
5 changed files with 48 additions and 14 deletions

View file

@ -16,13 +16,16 @@ class BlockAPI{
[WOODEN_PLANKS, 2], [WOODEN_PLANKS, 2],
[WOODEN_PLANKS, 3], [WOODEN_PLANKS, 3],
[BRICKS, 0], [BRICKS, 0],
[EMERALD_BLOCK, 0],
[EMERALD_ORE, 0],
[DIRT, 0], [DIRT, 0],
[GRASS, 0], [GRASS, 0],
[CLAY_BLOCK, 0], [CLAY_BLOCK, 0],
[SANDSTONE, 0], [SANDSTONE, 0],
[SANDSTONE, 1], [SANDSTONE, 1],
[SANDSTONE, 2], [SANDSTONE, 2],
[LOG2, 0],
[LOG2, 1],
[SAND, 0], [SAND, 0],
[SAND, 1], [SAND, 1],
[GRAVEL, 0], [GRAVEL, 0],
@ -38,6 +41,8 @@ class BlockAPI{
[SPRUCE_WOODEN_STAIRS, 0], [SPRUCE_WOODEN_STAIRS, 0],
[BIRCH_WOODEN_STAIRS, 0], [BIRCH_WOODEN_STAIRS, 0],
[JUNGLE_WOODEN_STAIRS, 0], [JUNGLE_WOODEN_STAIRS, 0],
[ACACIA_WOOD_STAIRS, 0],
[DARK_OAK_WOOD_STAIRS, 0],
[BRICK_STAIRS, 0], [BRICK_STAIRS, 0],
[SANDSTONE_STAIRS, 0], [SANDSTONE_STAIRS, 0],
[STONE_BRICK_STAIRS, 0], [STONE_BRICK_STAIRS, 0],
@ -111,6 +116,14 @@ class BlockAPI{
[FURNACE, 0], [FURNACE, 0],
[DANDELION, 0], [DANDELION, 0],
[CYAN_FLOWER, 0], [CYAN_FLOWER, 0],
[CYAN_FLOWER, 1],
[CYAN_FLOWER, 2],
[CYAN_FLOWER, 3],
[CYAN_FLOWER, 4],
[CYAN_FLOWER, 5],
[CYAN_FLOWER, 6],
[CYAN_FLOWER, 7],
[CYAN_FLOWER, 8],
[BROWN_MUSHROOM, 0], [BROWN_MUSHROOM, 0],
[RED_MUSHROOM, 0], [RED_MUSHROOM, 0],
[CACTUS, 0], [CACTUS, 0],
@ -126,10 +139,14 @@ class BlockAPI{
[SAPLING, 1], [SAPLING, 1],
[SAPLING, 2], [SAPLING, 2],
[SAPLING, 3], [SAPLING, 3],
[SAPLING, 4],
[SAPLING, 5],
[LEAVES, 0], [LEAVES, 0],
[LEAVES, 1], [LEAVES, 1],
[LEAVES, 2], [LEAVES, 2],
[LEAVES, 3], [LEAVES, 3],
[LEAVES2, 0],
[LEAVES2, 0],
[CAKE, 0], [CAKE, 0],
[SIGN, 0], [SIGN, 0],
[CARPET, 0], [CARPET, 0],

View file

@ -230,7 +230,7 @@ define("LEAVES2", 161);
define("ACACIA_LEAVES", 161); define("ACACIA_LEAVES", 161);
define("DARK_OAK_LEAVES", "161:1"); define("DARK_OAK_LEAVES", "161:1");
define("LOG2", 162); define("LOG2", 162);
define("ACACIA_WOOD", 162); define("ACACIA_WOOD", "162:0");
define("DARK_OAK_WOOD", "162:1"); define("DARK_OAK_WOOD", "162:1");
define("ACACIA_WOOD_STAIRS", 163); define("ACACIA_WOOD_STAIRS", 163);
define("DARK_OAK_WOOD_STAIRS", 164); define("DARK_OAK_WOOD_STAIRS", 164);

View file

@ -1,10 +1,7 @@
<?php <?php
class CyanFlowerBlock extends FlowableBlock{ class CyanFlowerBlock extends FlowableBlock{
public function __construct($meta = 0){ protected static $names = [
parent::__construct(CYAN_FLOWER, $meta, "Poppy");
$this->hardness = 0;
$names = array(
0 => "Poppy", 0 => "Poppy",
1 => "Blue Orchid", 1 => "Blue Orchid",
2 => "Allium", 2 => "Allium",
@ -14,7 +11,10 @@ class CyanFlowerBlock extends FlowableBlock{
6 => "White Tulip", 6 => "White Tulip",
7 => "Pink Tulip", 7 => "Pink Tulip",
8 => "Oxeye Daisy", 8 => "Oxeye Daisy",
); ];
public function __construct($meta = 0){
parent::__construct(CYAN_FLOWER, $meta, nullsafe(self::$names[$meta], "Poppy"));
$this->hardness = 0;
} }
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){

View file

@ -68,7 +68,23 @@ class CraftingRecipes{
"DYE:0x1,DYE:15x1=>DYE:8x2",//Gray Dye "DYE:0x1,DYE:15x1=>DYE:8x2",//Gray Dye
"DYE:0x1,DYE:15x2=>DYE:7x3",//Light Gray Dye "DYE:0x1,DYE:15x2=>DYE:7x3",//Light Gray Dye
"DYE:0x1,DYE:8x1=>DYE:7x2",//Light Gray Dye "DYE:0x1,DYE:8x1=>DYE:7x2",//Light Gray Dye
"WOOL:0x2=>CARPET:0x3",
"WOOL:1x2=>CARPET:1x3",
"WOOL:2x2=>CARPET:2x3",
"WOOL:3x2=>CARPET:3x3",
"WOOL:4x2=>CARPET:4x3",
"WOOL:5x2=>CARPET:5x3",
"WOOL:6x2=>CARPET:6x3",
"WOOL:7x2=>CARPET:7x3",
"WOOL:8x2=>CARPET:8x3",
"WOOL:9x2=>CARPET:9x3",
"WOOL:10x2=>CARPET:10x3",
"WOOL:11x2=>CARPET:11x3",
"WOOL:12x2=>CARPET:12x3",
"WOOL:13x2=>CARPET:13x3",
"WOOL:14x2=>CARPET:14x3", "WOOL:14x2=>CARPET:14x3",
"WOOL:15x2=>CARPET:15x3",
]; ];
private static $big = [//Probably means only craftable on crafting bench. Name it better! private static $big = [//Probably means only craftable on crafting bench. Name it better!

View file

@ -27,6 +27,7 @@ class SuperflatGenerator implements LevelGenerator{
new OreType(new DiamondOreBlock(), 1, 7, 0, 16), new OreType(new DiamondOreBlock(), 1, 7, 0, 16),
new OreType(new DirtBlock(), 20, 32, 0, 128), new OreType(new DirtBlock(), 20, 32, 0, 128),
new OreType(new GravelBlock(), 10, 16, 0, 128), new OreType(new GravelBlock(), 10, 16, 0, 128),
new OreType(new EmeraldOreBlock(), 1, 7, 0, 16), //TODO
]); ]);
$this->populators[] = $ores; $this->populators[] = $ores;
} }