1 -- Building blocks and decorative nodes
3 minetest
.register_node("mcl_end:end_stone", {
4 description
= "End Stone",
5 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
6 tiles
= {"mcl_end_end_stone.png"},
8 groups
= {pickaxey
=1, building_block
=1, material_stone
=1},
9 sounds
= mcl_sounds
.node_sound_stone_defaults(),
10 _mcl_blast_resistance
= 45,
14 minetest
.register_node("mcl_end:end_bricks", {
15 description
= "End Stone Bricks",
16 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
17 tiles
= {"mcl_end_end_bricks.png"},
18 is_ground_content
= false,
20 groups
= {pickaxey
=1, building_block
=1, material_stone
=1},
21 sounds
= mcl_sounds
.node_sound_stone_defaults(),
22 _mcl_blast_resistance
= 4,
26 minetest
.register_node("mcl_end:purpur_block", {
27 description
= "Purpur Block",
28 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
29 tiles
= {"mcl_end_purpur_block.png"},
30 is_ground_content
= false,
32 groups
= {pickaxey
=1, building_block
=1, material_stone
=1, purpur_block
=1},
33 sounds
= mcl_sounds
.node_sound_stone_defaults(),
34 _mcl_blast_resistance
= 30,
38 minetest
.register_node("mcl_end:purpur_pillar", {
39 description
= "Purpur Pillar",
40 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
42 paramtype2
= "facedir",
43 is_ground_content
= false,
44 on_place
= mcl_util
.rotate_axis
,
45 tiles
= {"mcl_end_purpur_pillar_top.png", "mcl_end_purpur_pillar_top.png", "mcl_end_purpur_pillar.png"},
46 groups
= {pickaxey
=1, building_block
=1, material_stone
=1, purpur_block
=1},
47 sounds
= mcl_sounds
.node_sound_stone_defaults(),
48 _mcl_blast_resistance
= 30,
52 minetest
.register_node("mcl_end:end_rod", {
53 description
= "End Rod",
54 _doc_items_longdesc
= "End rods are decorational light sources.",
56 "mcl_end_end_rod_top.png",
57 "mcl_end_end_rod_bottom.png",
58 "mcl_end_end_rod_side.png",
59 "mcl_end_end_rod_side.png",
60 "mcl_end_end_rod_side.png",
61 "mcl_end_end_rod_side.png",
64 is_ground_content
= false,
66 paramtype2
= "facedir",
68 sunlight_propagates
= true,
69 groups
= { dig_immediate
=3, deco_block
=1, destroy_by_lava_flow
=1, },
73 {-0.125, -0.5, -0.125, 0.125, -0.4375, 0.125}, -- Base
74 {-0.0625, -0.4375, -0.0625, 0.0625, 0.5, 0.0625}, -- Rod
80 {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- Base
86 {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- Base
89 on_place
= function(itemstack
, placer
, pointed_thing
)
90 if pointed_thing
.type ~= "node" then
94 local p0
= pointed_thing
.under
95 local p1
= pointed_thing
.above
98 local placer_pos
= placer
:get_pos()
101 x
= p1
.x
- placer_pos
.x
,
102 y
= p1
.y
- placer_pos
.y
,
103 z
= p1
.z
- placer_pos
.z
105 param2
= minetest
.dir_to_facedir(dir
)
108 if p0
.y
- 1 == p1
.y
then
110 elseif p0
.x
- 1 == p1
.x
then
112 elseif p0
.x
+ 1 == p1
.x
then
114 elseif p0
.z
- 1 == p1
.z
then
116 elseif p0
.z
+ 1 == p1
.z
then
120 return minetest
.item_place(itemstack
, placer
, pointed_thing
, param2
)
123 sounds
= mcl_sounds
.node_sound_glass_defaults(),
124 _mcl_blast_resistance
= 0,
127 minetest
.register_node("mcl_end:dragon_egg", {
128 description
= "Dragon Egg",
129 _doc_items_longdesc
= "A dragon egg is a decorational item which can be placed.",
131 "mcl_end_dragon_egg.png",
132 "mcl_end_dragon_egg.png",
133 "mcl_end_dragon_egg.png",
134 "mcl_end_dragon_egg.png",
135 "mcl_end_dragon_egg.png",
136 "mcl_end_dragon_egg.png",
138 drawtype
= "nodebox",
139 is_ground_content
= false,
145 {-0.375, -0.5, -0.375, 0.375, -0.4375, 0.375},
146 {-0.5, -0.4375, -0.5, 0.5, -0.1875, 0.5},
147 {-0.4375, -0.1875, -0.4375, 0.4375, 0, 0.4375},
148 {-0.375, 0, -0.375, 0.375, 0.125, 0.375},
149 {-0.3125, 0.125, -0.3125, 0.3125, 0.25, 0.3125},
150 {-0.25, 0.25, -0.25, 0.25, 0.3125, 0.25},
151 {-0.1875, 0.3125, -0.1875, 0.1875, 0.375, 0.1875},
152 {-0.125, 0.375, -0.125, 0.125, 0.4375, 0.125},
153 {-0.0625, 0.4375, -0.0625, 0.0625, 0.5, 0.0625},
159 groups
= {handy
=1, falling_node
= 1, deco_block
= 1, not_in_creative_inventory
= 1, dig_by_piston
= 1 },
160 sounds
= mcl_sounds
.node_sound_stone_defaults(),
161 _mcl_blast_resistance
= 45,
163 -- TODO: Make dragon egg teleport on punching
169 minetest
.register_craft({
170 output
= "mcl_end:end_bricks 4",
172 {"mcl_end:end_stone", "mcl_end:end_stone"},
173 {"mcl_end:end_stone", "mcl_end:end_stone"},
177 minetest
.register_craft({
178 output
= "mcl_end:purpur_block 4",
180 {"mcl_end:chorus_fruit_popped", "mcl_end:chorus_fruit_popped",},
181 {"mcl_end:chorus_fruit_popped", "mcl_end:chorus_fruit_popped",},
185 minetest
.register_craft({
186 output
= "mcl_end:end_rod 4",
188 {"mcl_mobitems:blaze_rod"},
189 {"mcl_end:chorus_fruit_popped"},