Added new blocks and fixed minor bug with LuaMods.
@ -104,7 +104,7 @@ mod:block {
|
||||
}
|
||||
|
||||
mod:block {
|
||||
id = "ore_coal",
|
||||
id = "coal_ore",
|
||||
name = "Coal Ore",
|
||||
tiles = "coal_ore.png",
|
||||
hardness = 3,
|
||||
@ -157,3 +157,28 @@ mod:block {
|
||||
draw_type = 1, -- FIXME: Use string instead
|
||||
}
|
||||
|
||||
mod:block {
|
||||
id = "stone_bricks",
|
||||
name = "Stone Bricks",
|
||||
tiles = "stone_bricks.png",
|
||||
hardness = 2,
|
||||
harvest_requirements = 1,
|
||||
}
|
||||
|
||||
mod:block {
|
||||
id = "bricks",
|
||||
name = "Bricks",
|
||||
tiles = "bricks.png",
|
||||
hardness = 2,
|
||||
harvest_requirements = 1,
|
||||
}
|
||||
|
||||
mod:block {
|
||||
id = "clay",
|
||||
name = "Clay",
|
||||
tiles = "clay.png",
|
||||
item_drop = {
|
||||
id = mod:id()..":clay_ball",
|
||||
amount = 4
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ function init(player)
|
||||
player_inv:add_stack("default:stone_shovel", 1);
|
||||
player_inv:add_stack("default:iron_ore", 64);
|
||||
player_inv:add_stack("default:coal", 64);
|
||||
player_inv:add_stack("default:clay", 64);
|
||||
end
|
||||
|
||||
function show_inventory(client, screen_width, screen_height, gui_scale)
|
||||
|
@ -26,13 +26,13 @@
|
||||
--
|
||||
|
||||
mod:item {
|
||||
id = "default:stick",
|
||||
id = "stick",
|
||||
name = "Stick",
|
||||
tiles = "stick.png"
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:stone_axe",
|
||||
id = "stone_axe",
|
||||
name = "Stone Axe",
|
||||
tiles = "stone_axe.png",
|
||||
mining_speed = 4,
|
||||
@ -40,13 +40,13 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:stone_hoe",
|
||||
id = "stone_hoe",
|
||||
name = "Stone Hoe",
|
||||
tiles = "stone_hoe.png"
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:stone_pickaxe",
|
||||
id = "stone_pickaxe",
|
||||
name = "Stone Pickaxe",
|
||||
tiles = "stone_pickaxe.png",
|
||||
mining_speed = 4,
|
||||
@ -54,7 +54,7 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:stone_shovel",
|
||||
id = "stone_shovel",
|
||||
name = "Stone Shovel",
|
||||
tiles = "stone_shovel.png",
|
||||
mining_speed = 4,
|
||||
@ -62,13 +62,13 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:stone_sword",
|
||||
id = "stone_sword",
|
||||
name = "Stone Sword",
|
||||
tiles = "stone_sword.png"
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:coal",
|
||||
id = "coal",
|
||||
name = "Coal",
|
||||
tiles = "coal.png",
|
||||
is_fuel = true,
|
||||
@ -76,13 +76,13 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:iron_ingot",
|
||||
id = "iron_ingot",
|
||||
name = "Iron Ingot",
|
||||
tiles = "iron_ingot.png"
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:charcoal",
|
||||
id = "charcoal",
|
||||
name = "Charcoal",
|
||||
tiles = "charcoal.png",
|
||||
is_fuel = true,
|
||||
@ -90,7 +90,7 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:wooden_axe",
|
||||
id = "wooden_axe",
|
||||
name = "Wooden Axe",
|
||||
tiles = "wooden_axe.png",
|
||||
mining_speed = 2,
|
||||
@ -98,13 +98,13 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:wooden_hoe",
|
||||
id = "wooden_hoe",
|
||||
name = "Wooden Hoe",
|
||||
tiles = "wooden_hoe.png",
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:wooden_pickaxe",
|
||||
id = "wooden_pickaxe",
|
||||
name = "Wooden Pickaxe",
|
||||
tiles = "wooden_pickaxe.png",
|
||||
mining_speed = 2,
|
||||
@ -112,7 +112,7 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:wooden_shovel",
|
||||
id = "wooden_shovel",
|
||||
name = "Wooden Shovel",
|
||||
tiles = "wooden_shovel.png",
|
||||
mining_speed = 2,
|
||||
@ -120,8 +120,19 @@ mod:item {
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "default:wooden_sword",
|
||||
id = "wooden_sword",
|
||||
name = "Wooden Sword",
|
||||
tiles = "wooden_sword.png",
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "brick",
|
||||
name = "Brick",
|
||||
tiles = "brick.png"
|
||||
}
|
||||
|
||||
mod:item {
|
||||
id = "clay_ball",
|
||||
name = "Clay",
|
||||
tiles = "clay_ball.png"
|
||||
}
|
||||
|
@ -305,3 +305,34 @@ mod:smelting_recipe {
|
||||
output = {id = "default:charcoal", amount = 1}
|
||||
}
|
||||
|
||||
-- Brick
|
||||
mod:smelting_recipe {
|
||||
input = {id = "default:clay_ball", amount = 1},
|
||||
output = {id = "default:brick", amount = 1}
|
||||
}
|
||||
|
||||
-- Bricks
|
||||
mod:crafting_recipe {
|
||||
result = {
|
||||
id = "default:bricks",
|
||||
amount = 1
|
||||
},
|
||||
pattern = {
|
||||
"##",
|
||||
"##"
|
||||
},
|
||||
keys = {["#"] = "default:brick"}
|
||||
}
|
||||
|
||||
-- Stone Bricks
|
||||
mod:crafting_recipe {
|
||||
result = {
|
||||
id = "default:stone_bricks",
|
||||
amount = 1
|
||||
},
|
||||
pattern = {
|
||||
"##",
|
||||
"##"
|
||||
},
|
||||
keys = {["#"] = "default:stone"}
|
||||
}
|
||||
|
BIN
mods/default/textures/blocks/bricks.png
Normal file
After Width: | Height: | Size: 671 B |
BIN
mods/default/textures/blocks/clay.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
0
mods/default/textures/blocks/iron_ore.png
Executable file → Normal file
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
BIN
mods/default/textures/blocks/stone_bricks.png
Normal file
After Width: | Height: | Size: 860 B |
BIN
mods/default/textures/items/brick.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
mods/default/textures/items/clay_ball.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
mods/default/textures_mc/blocks/bricks.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
mods/default/textures_mc/blocks/clay.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
mods/default/textures_mc/blocks/stone_bricks.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
mods/default/textures_mc/items/brick.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
mods/default/textures_mc/items/clay_ball.png
Normal file
After Width: | Height: | Size: 196 B |
@ -92,7 +92,7 @@ void LuaMod::registerItem(const sol::table &table) {
|
||||
TilesDef tiles;
|
||||
tiles.loadFromLuaTable(table);
|
||||
|
||||
std::string stringID = table["id"].get<std::string>();
|
||||
std::string stringID = m_id + ":" + table["id"].get<std::string>();
|
||||
std::string label = table["name"].get<std::string>();
|
||||
|
||||
Item &item = Registry::getInstance().registerItem(tiles, stringID, label);
|
||||
|