|
@@ -3,11 +3,11 @@
|
|
#include "StaticRegistry.h"
|
|
#include "StaticRegistry.h"
|
|
// block types
|
|
// block types
|
|
#include "BasicBlocks.h"
|
|
#include "BasicBlocks.h"
|
|
|
|
+#include "Chest.h"
|
|
#include "Grass.h"
|
|
#include "Grass.h"
|
|
#include "GrowingPlant.h"
|
|
#include "GrowingPlant.h"
|
|
#include "NoBlock.h"
|
|
#include "NoBlock.h"
|
|
#include "TreeSeblingBlock.h"
|
|
#include "TreeSeblingBlock.h"
|
|
-#include "Chest.h"
|
|
|
|
// fluid blocks
|
|
// fluid blocks
|
|
#include "FluidBlock.h"
|
|
#include "FluidBlock.h"
|
|
// dimensions
|
|
// dimensions
|
|
@@ -72,10 +72,10 @@ void initializeBlockTypes()
|
|
BlockTypeEnum::LEAVES_WOOD_OAK,
|
|
BlockTypeEnum::LEAVES_WOOD_OAK,
|
|
ItemTypeEnum::LEAVES_WOOD_OAK,
|
|
ItemTypeEnum::LEAVES_WOOD_OAK,
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
- [](Vec3<int> pos) {
|
|
|
|
|
|
+ [](Vec3<int> pos, int dimensionId) {
|
|
AdditionalItemSpawningBlock* block
|
|
AdditionalItemSpawningBlock* block
|
|
= new AdditionalItemSpawningBlock(
|
|
= new AdditionalItemSpawningBlock(
|
|
- BlockTypeEnum::LEAVES_WOOD_OAK, 0, pos);
|
|
|
|
|
|
+ BlockTypeEnum::LEAVES_WOOD_OAK, 0, pos, dimensionId);
|
|
block->addSpawn({1, 1, 0.015, ItemTypeEnum::SEBLING_WOOD_OAK});
|
|
block->addSpawn({1, 1, 0.015, ItemTypeEnum::SEBLING_WOOD_OAK});
|
|
return (Block*)block;
|
|
return (Block*)block;
|
|
},
|
|
},
|
|
@@ -116,10 +116,10 @@ void initializeBlockTypes()
|
|
BlockTypeEnum::LEAVES_WOOD_BIRCH,
|
|
BlockTypeEnum::LEAVES_WOOD_BIRCH,
|
|
ItemTypeEnum::LEAVES_WOOD_BIRCH,
|
|
ItemTypeEnum::LEAVES_WOOD_BIRCH,
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
- [](Vec3<int> pos) {
|
|
|
|
|
|
+ [](Vec3<int> pos, int dimensionId) {
|
|
AdditionalItemSpawningBlock* block
|
|
AdditionalItemSpawningBlock* block
|
|
= new AdditionalItemSpawningBlock(
|
|
= new AdditionalItemSpawningBlock(
|
|
- BlockTypeEnum::LEAVES_WOOD_BIRCH, 0, pos);
|
|
|
|
|
|
+ BlockTypeEnum::LEAVES_WOOD_BIRCH, 0, pos, dimensionId);
|
|
block->addSpawn({1, 1, 0.03, ItemTypeEnum::SEBLING_WOOD_BIRCH});
|
|
block->addSpawn({1, 1, 0.03, ItemTypeEnum::SEBLING_WOOD_BIRCH});
|
|
return (Block*)block;
|
|
return (Block*)block;
|
|
},
|
|
},
|
|
@@ -139,10 +139,10 @@ void initializeBlockTypes()
|
|
BlockTypeEnum::LEAVES_WOOD_BEECH,
|
|
BlockTypeEnum::LEAVES_WOOD_BEECH,
|
|
ItemTypeEnum::LEAVES_WOOD_BEECH,
|
|
ItemTypeEnum::LEAVES_WOOD_BEECH,
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
- [](Vec3<int> pos) {
|
|
|
|
|
|
+ [](Vec3<int> pos, int dimensionId) {
|
|
AdditionalItemSpawningBlock* block
|
|
AdditionalItemSpawningBlock* block
|
|
= new AdditionalItemSpawningBlock(
|
|
= new AdditionalItemSpawningBlock(
|
|
- BlockTypeEnum::LEAVES_WOOD_BEECH, 0, pos);
|
|
|
|
|
|
+ BlockTypeEnum::LEAVES_WOOD_BEECH, 0, pos, dimensionId);
|
|
block->addSpawn({1, 1, 0.02, ItemTypeEnum::SEBLING_WOOD_BEECH});
|
|
block->addSpawn({1, 1, 0.02, ItemTypeEnum::SEBLING_WOOD_BEECH});
|
|
return (Block*)block;
|
|
return (Block*)block;
|
|
},
|
|
},
|
|
@@ -169,10 +169,10 @@ void initializeBlockTypes()
|
|
BlockTypeEnum::LEAVES_WOOD_PINE,
|
|
BlockTypeEnum::LEAVES_WOOD_PINE,
|
|
ItemTypeEnum::LEAVES_WOOD_PINE,
|
|
ItemTypeEnum::LEAVES_WOOD_PINE,
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
ModelInfo("cube", "blocks.ltdb/leaves.png", 6),
|
|
- [](Vec3<int> pos) {
|
|
|
|
|
|
+ [](Vec3<int> pos, int dimensionId) {
|
|
AdditionalItemSpawningBlock* block
|
|
AdditionalItemSpawningBlock* block
|
|
= new AdditionalItemSpawningBlock(
|
|
= new AdditionalItemSpawningBlock(
|
|
- BlockTypeEnum::LEAVES_WOOD_PINE, 0, pos);
|
|
|
|
|
|
+ BlockTypeEnum::LEAVES_WOOD_PINE, 0, pos, dimensionId);
|
|
block->addSpawn({1, 1, 0.025, ItemTypeEnum::SEBLING_WOOD_PINE});
|
|
block->addSpawn({1, 1, 0.025, ItemTypeEnum::SEBLING_WOOD_PINE});
|
|
return (Block*)block;
|
|
return (Block*)block;
|
|
},
|
|
},
|
|
@@ -269,10 +269,10 @@ void initializeBlockTypes()
|
|
BlockTypeEnum::WHEAT,
|
|
BlockTypeEnum::WHEAT,
|
|
ItemTypeEnum::WHEAT,
|
|
ItemTypeEnum::WHEAT,
|
|
ModelInfo("grass", "plants.ltdb/wheat.png", 16).setTransparent(),
|
|
ModelInfo("grass", "plants.ltdb/wheat.png", 16).setTransparent(),
|
|
- [](Vec3<int> pos) {
|
|
|
|
|
|
+ [](Vec3<int> pos, int dimensionId) {
|
|
AdditionalItemSpawningBlock* block
|
|
AdditionalItemSpawningBlock* block
|
|
= new AdditionalItemSpawningBlock(
|
|
= new AdditionalItemSpawningBlock(
|
|
- BlockTypeEnum::WHEAT, 0, pos);
|
|
|
|
|
|
+ BlockTypeEnum::WHEAT, 0, pos, dimensionId);
|
|
block->addSpawn({0, 4, 1.0, ItemTypeEnum::WHEAT});
|
|
block->addSpawn({0, 4, 1.0, ItemTypeEnum::WHEAT});
|
|
return (Block*)block;
|
|
return (Block*)block;
|
|
},
|
|
},
|
|
@@ -296,15 +296,17 @@ void initializeBlockTypes()
|
|
"Crafting Table",
|
|
"Crafting Table",
|
|
0xFFC4A783))
|
|
0xFFC4A783))
|
|
->initializeDefault(); // TODO: implement crafting table block type
|
|
->initializeDefault(); // TODO: implement crafting table block type
|
|
- (new BasicBlockType(BlockTypeEnum::CHEST,
|
|
|
|
|
|
+ (new BasicBlockType(
|
|
|
|
+ BlockTypeEnum::CHEST,
|
|
ItemTypeEnum::CHEST,
|
|
ItemTypeEnum::CHEST,
|
|
- ModelInfo(
|
|
|
|
- "blocks.m3/chest", {"blocks.ltdb/chest.png", "blocks.ltdb/chestcover.png"}),
|
|
|
|
- [](Framework::Vec3<int> pos) {
|
|
|
|
- return new Chest(BlockTypeEnum::CHEST, 0, pos);
|
|
|
|
|
|
+ ModelInfo("blocks.m3/chest",
|
|
|
|
+ {"blocks.ltdb/chest.png", "blocks.ltdb/chestcover.png"}),
|
|
|
|
+ [](Framework::Vec3<int> pos, int dimensionId) {
|
|
|
|
+ return new Chest(BlockTypeEnum::CHEST, 0, pos, dimensionId);
|
|
},
|
|
},
|
|
"Chest",
|
|
"Chest",
|
|
- 0xFFE2C292, 1))
|
|
|
|
|
|
+ 0xFFE2C292,
|
|
|
|
+ 1))
|
|
->initializeDefault();
|
|
->initializeDefault();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -620,8 +622,8 @@ void initializeItemTypes()
|
|
"Chest",
|
|
"Chest",
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
- ModelInfo(
|
|
|
|
- "blocks.m3/chest", {"blocks.ltdb/chest.png", "blocks.ltdb/chestcover.png"}),
|
|
|
|
|
|
+ ModelInfo("blocks.m3/chest",
|
|
|
|
+ {"blocks.ltdb/chest.png", "blocks.ltdb/chestcover.png"}),
|
|
BlockTypeEnum::CHEST));
|
|
BlockTypeEnum::CHEST));
|
|
}
|
|
}
|
|
|
|
|