2020-02-08 18:34:26 +09:00
|
|
|
--
|
|
|
|
-- =====================================================================================
|
|
|
|
--
|
|
|
|
-- OpenMiner
|
2020-02-25 01:42:10 +09:00
|
|
|
--
|
2020-02-08 18:34:26 +09:00
|
|
|
-- Copyright (C) 2018-2020 Unarelith, Quentin Bazin <openminer@unarelith.net>
|
2020-02-25 01:42:10 +09:00
|
|
|
-- Copyright (C) 2019-2020 the OpenMiner contributors (see CONTRIBUTORS.md)
|
|
|
|
--
|
|
|
|
-- This file is part of OpenMiner.
|
2020-02-08 18:34:26 +09:00
|
|
|
--
|
2020-02-25 01:42:10 +09:00
|
|
|
-- OpenMiner is free software; you can redistribute it and/or
|
2020-02-08 18:34:26 +09:00
|
|
|
-- modify it under the terms of the GNU Lesser General Public
|
|
|
|
-- License as published by the Free Software Foundation; either
|
|
|
|
-- version 2.1 of the License, or (at your option) any later version.
|
|
|
|
--
|
2020-02-25 01:42:10 +09:00
|
|
|
-- OpenMiner is distributed in the hope that it will be useful,
|
2020-02-08 18:34:26 +09:00
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
-- Lesser General Public License for more details.
|
|
|
|
--
|
|
|
|
-- You should have received a copy of the GNU Lesser General Public License
|
2020-02-25 01:42:10 +09:00
|
|
|
-- along with OpenMiner; if not, write to the Free Software Foundation, Inc.,
|
2020-02-08 18:34:26 +09:00
|
|
|
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
--
|
|
|
|
-- =====================================================================================
|
|
|
|
--
|
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "dirt",
|
|
|
|
name = "Dirt",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "dirt.png"
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "cobblestone",
|
|
|
|
name = "Cobblestone",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "cobblestone.png",
|
2018-12-28 08:36:56 +01:00
|
|
|
hardness = 2,
|
|
|
|
harvest_requirements = 1,
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "grass",
|
|
|
|
name = "Grass",
|
2020-01-30 21:35:51 +09:00
|
|
|
tiles = {"grass_block_top.png", "dirt.png", "grass_block_side.png"},
|
2020-02-19 19:30:07 +09:00
|
|
|
color_multiplier = {129, 191, 91, 255},
|
|
|
|
|
2018-12-28 08:36:56 +01:00
|
|
|
item_drop = {
|
2019-01-04 18:05:35 +01:00
|
|
|
id = mod:id()..":dirt",
|
2018-12-28 08:36:56 +01:00
|
|
|
amount = 1
|
|
|
|
}
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
2020-03-04 21:01:11 +01:00
|
|
|
id = "oak_leaves",
|
|
|
|
name = "Oak Leaves",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "oak_leaves.png",
|
2020-02-19 19:30:07 +09:00
|
|
|
color_multiplier = {106, 173, 51, 255},
|
2018-12-28 08:36:56 +01:00
|
|
|
hardness = 0.5,
|
2020-03-07 16:33:35 +01:00
|
|
|
draw_type = "leaves",
|
2020-02-03 16:07:14 +09:00
|
|
|
-- is_opaque = false, -- FIXME
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
2020-03-04 21:01:11 +01:00
|
|
|
id = "oak_wood",
|
|
|
|
name = "Oak Wood",
|
2020-01-30 21:35:51 +09:00
|
|
|
tiles = {"oak_log_top.png", "oak_log.png"},
|
2018-12-28 08:36:56 +01:00
|
|
|
hardness = 2
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "stone",
|
|
|
|
name = "Stone",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "stone.png",
|
2018-12-28 08:36:56 +01:00
|
|
|
hardness = 1.5,
|
|
|
|
harvest_requirements = 1,
|
|
|
|
item_drop = {
|
2019-01-04 18:05:35 +01:00
|
|
|
id = mod:id()..":cobblestone",
|
2018-12-28 08:36:56 +01:00
|
|
|
amount = 1
|
|
|
|
},
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "sand",
|
|
|
|
name = "Sand",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "sand.png"
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "water",
|
|
|
|
name = "Water",
|
2020-02-03 15:29:00 +09:00
|
|
|
tiles = "water.png",
|
2020-02-19 19:30:07 +09:00
|
|
|
color_multiplier = {51, 115, 255, 217},
|
2020-03-07 16:33:35 +01:00
|
|
|
draw_type = "liquid",
|
2020-02-03 16:07:14 +09:00
|
|
|
is_opaque = false,
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "glass",
|
|
|
|
name = "Glass",
|
2020-02-03 15:38:34 +09:00
|
|
|
tiles = "glass.png",
|
2020-03-07 16:33:35 +01:00
|
|
|
draw_type = "glass",
|
2020-02-03 16:07:14 +09:00
|
|
|
is_opaque = false,
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
2020-02-25 15:42:59 +01:00
|
|
|
id = "coal_ore",
|
2019-01-04 18:05:35 +01:00
|
|
|
name = "Coal Ore",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "coal_ore.png",
|
2018-12-28 08:36:56 +01:00
|
|
|
hardness = 3,
|
|
|
|
harvest_requirements = 1,
|
|
|
|
item_drop = {
|
2019-01-04 18:05:35 +01:00
|
|
|
id = mod:id()..":coal",
|
2018-12-28 08:36:56 +01:00
|
|
|
amount = 1
|
|
|
|
},
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
2020-03-04 21:01:11 +01:00
|
|
|
id = "oak_planks",
|
|
|
|
name = "Oak Wood Planks",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "oak_planks.png"
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "glowstone",
|
|
|
|
name = "Glowstone",
|
2020-02-03 19:01:11 +09:00
|
|
|
tiles = "glowstone.png",
|
|
|
|
is_light_source = true
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2020-01-30 21:53:28 +09:00
|
|
|
dofile("mods/default/workbench.lua")
|
|
|
|
dofile("mods/default/furnace.lua")
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-04 18:05:35 +01:00
|
|
|
mod:block {
|
2020-01-30 15:31:49 +09:00
|
|
|
id = "iron_ore",
|
2019-01-04 18:05:35 +01:00
|
|
|
name = "Iron Ore",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "iron_ore.png",
|
2018-12-28 08:36:56 +01:00
|
|
|
hardness = 3,
|
|
|
|
harvest_requirements = 1,
|
2019-01-04 18:05:35 +01:00
|
|
|
}
|
2018-12-28 08:36:56 +01:00
|
|
|
|
2019-01-05 05:41:18 +01:00
|
|
|
mod:block {
|
2020-03-04 21:01:11 +01:00
|
|
|
id = "dandelion",
|
|
|
|
name = "Dandelion",
|
2020-01-30 17:25:48 +09:00
|
|
|
tiles = "dandelion.png",
|
2019-01-07 01:26:02 +01:00
|
|
|
hardness = 0.05,
|
2020-03-07 16:33:35 +01:00
|
|
|
draw_type = "xshape",
|
2020-02-20 22:48:14 +01:00
|
|
|
bounding_box = {0.25, 0.25, 0.0, 0.5, 0.5, 0.5},
|
2019-01-05 05:41:18 +01:00
|
|
|
}
|
|
|
|
|
2020-02-19 20:08:46 +09:00
|
|
|
mod:block {
|
|
|
|
id = "tallgrass",
|
2020-03-04 21:01:11 +01:00
|
|
|
name = "Grass",
|
2020-02-19 20:08:46 +09:00
|
|
|
tiles = "grass.png",
|
|
|
|
color_multiplier = {129, 191, 91, 255},
|
|
|
|
hardness = 0.05,
|
2020-03-07 16:33:35 +01:00
|
|
|
draw_type = "xshape",
|
2020-02-19 20:08:46 +09:00
|
|
|
}
|
|
|
|
|
2020-02-25 15:42:59 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2020-03-04 21:01:11 +01:00
|
|
|
|
2020-03-04 23:25:19 +01:00
|
|
|
mod:block {
|
|
|
|
id = "oak_slab",
|
|
|
|
name = "Oak Wood Slab",
|
|
|
|
tiles = "oak_planks.png",
|
|
|
|
|
2020-03-07 16:33:35 +01:00
|
|
|
draw_type = "boundingbox",
|
2020-03-04 23:25:19 +01:00
|
|
|
is_opaque = false,
|
|
|
|
|
|
|
|
bounding_box = {0, 0, 0, 1, 1, 0.5}
|
|
|
|
}
|
|
|
|
|
2020-03-08 15:28:46 +01:00
|
|
|
mod:block {
|
|
|
|
id = "portal",
|
|
|
|
name = "Portal",
|
|
|
|
tiles = "portal.png",
|
|
|
|
|
|
|
|
draw_type = "glass",
|
|
|
|
is_opaque = false,
|
|
|
|
|
|
|
|
on_block_activated = function(pos, player, world, client, server, screen_width, screen_height, gui_scale)
|
|
|
|
local dim = (player:dimension() + 1) % 2
|
2020-03-08 16:01:46 +01:00
|
|
|
local pos = {x = 0, y = 0, z = 20}
|
2020-03-08 15:28:46 +01:00
|
|
|
|
2020-03-08 16:01:46 +01:00
|
|
|
server:send_player_change_dimension(client.id, pos.x, pos.y, pos.z, dim, client)
|
|
|
|
player:set_dimension(dim)
|
|
|
|
player:set_position(pos.x, pos.y, pos.z)
|
2020-03-08 15:28:46 +01:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
2020-03-08 16:51:04 +01:00
|
|
|
mod:block {
|
|
|
|
id = "netherrack",
|
|
|
|
name = "Netherrack",
|
|
|
|
tiles = "netherrack.png",
|
|
|
|
}
|
|
|
|
|
|
|
|
mod:block {
|
|
|
|
id = "soul_sand",
|
|
|
|
name = "Soul Sand",
|
|
|
|
tiles = "soul_sand.png",
|
|
|
|
}
|
|
|
|
|
|
|
|
mod:block {
|
|
|
|
id = "lava",
|
|
|
|
name = "Lava",
|
|
|
|
tiles = "lava.png",
|
|
|
|
|
|
|
|
draw_type = "liquid",
|
|
|
|
is_light_source = true,
|
|
|
|
is_opaque = false,
|
|
|
|
}
|
|
|
|
|
2020-03-08 17:28:35 +01:00
|
|
|
mod:block {
|
|
|
|
id = "cactus",
|
|
|
|
name = "Cactus",
|
|
|
|
tiles = {"cactus_top.png", "cactus_side.png"},
|
2020-03-08 20:00:20 +01:00
|
|
|
|
|
|
|
draw_type = "cactus",
|
|
|
|
bounding_box = {1/16, 1/16, 0, 14/16, 14/16, 1};
|
2020-03-08 17:28:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
mod:block {
|
|
|
|
id = "deadbush",
|
|
|
|
name = "Dead Bush",
|
|
|
|
tiles = "deadbush.png",
|
|
|
|
draw_type = "xshape",
|
|
|
|
}
|
|
|
|
|
2020-03-08 21:45:24 +01:00
|
|
|
mod:block {
|
|
|
|
id = "debug",
|
|
|
|
name = "Debug",
|
|
|
|
tiles = {
|
|
|
|
"debug/f.png",
|
|
|
|
"debug/g.png",
|
|
|
|
"debug/j.png",
|
|
|
|
"debug/l.png",
|
|
|
|
"debug/p.png",
|
|
|
|
"debug/r.png",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|