Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
3229be0dc3 | |||
97df6d9653 |
8
init.lua
8
init.lua
@ -12,7 +12,7 @@ local east = nil
|
|||||||
function add_remove_border(entity, player_pos, entity_pos, is_rotated)
|
function add_remove_border(entity, player_pos, entity_pos, is_rotated)
|
||||||
if vector.distance(player_pos, entity_pos) < 10 then
|
if vector.distance(player_pos, entity_pos) < 10 then
|
||||||
if not entity then
|
if not entity then
|
||||||
entity = minetest.add_entity(entity_pos, "worldborder:border", nil)
|
entity = minetest.add_entity(entity_pos, "simpleworldborder:border", nil)
|
||||||
if is_rotated then entity:set_rotation({x = 0, y = math.pi/2, z = 0 }) end
|
if is_rotated then entity:set_rotation({x = 0, y = math.pi/2, z = 0 }) end
|
||||||
else
|
else
|
||||||
-- within range but entity already exists
|
-- within range but entity already exists
|
||||||
@ -30,14 +30,14 @@ end
|
|||||||
|
|
||||||
-- worldborder:border item
|
-- worldborder:border item
|
||||||
-- represents "stop sign" for border
|
-- represents "stop sign" for border
|
||||||
minetest.register_entity("worldborder:border", {
|
minetest.register_entity("simpleworldborder:border", {
|
||||||
initial_properties = {
|
initial_properties = {
|
||||||
collide_with_objects = false,
|
collide_with_objects = false,
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
visual = "upright_sprite",
|
visual = "upright_sprite",
|
||||||
textures = {
|
textures = {
|
||||||
"worldborder_stopsign.png",
|
"simpleworldborder_stopsign.png",
|
||||||
"worldborder_stopsign.png"
|
"simpleworldborder_stopsign.png"
|
||||||
},
|
},
|
||||||
visual_size = {
|
visual_size = {
|
||||||
x = 10,
|
x = 10,
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Loading…
x
Reference in New Issue
Block a user