- check_circle Functions
- 1,382 views, 5 today
- 40 downloads, 0 today
1
Streetlamps
With this datapack you can easily build street lamps that turn on automatically at night.
Like a daylight sensor but better.
How to build a street lamp
With this datapack you can easily build street lamps that turn on automatically at night.
Like a daylight sensor but better.
How to build a street lamp
- Type "/function streetlamp:creator" or if no chats are allowed enter "/trigger streetlamp"
- Place it over a redstone lamp
Important to know for servers and map markers
The command "/trigger streetlamp" can be executed by any player on the map.
To prevent this, it can be changed with the command "/function streetlamp:permission".
The function is on by default.
To use it in a server with multiple worlds you need to make some changes.
Here is an explanation
To prevent this, it can be changed with the command "/function streetlamp:permission".
The function is on by default.
To use it in a server with multiple worlds you need to make some changes.
Here is an explanation
- Go to “datapacks\streetlamp\data\streetlamp\functions”
- Open secondaryworlds.mcfunction with a text editor
- Copy the script block as many times as you own worlds. An exception is the main world in which the data package is executed including the nether and the end. This should not be entered here.
Scrip block###WORLD 1### #execute in minecraft:WORLDNAME store result score #time time run time query daytime #execute if score #time time matches 12041.. run execute if score #time time matches ..23960 run execute at @e[type=minecraft:armor_stand,name=StreetLamp,tag=StreetLamp] if dimension minecraft:WORLDNAME run setblock ~ ~ ~ minecraft:redstone_lamp[lit=true] #execute if score #time time matches 23961.. run execute at @e[type=minecraft:armor_stand,name=StreetLamp,tag=StreetLamp] if dimension minecraft:WORLDNAME run setblock ~ ~ ~ minecraft:redstone_lamp[lit=false] #execute if score #time time matches ..12040 run execute at @e[type=minecraft:armor_stand,name=StreetLamp,tag=StreetLamp] if dimension minecraft:WORLDNAME run setblock ~ ~ ~ minecraft:redstone_lamp[lit=false] - Then change “WORLDNAME” for each script block to your world name. It is located once per line.
- Then remove the # in front of each line
Compatibility | Minecraft 1.18 |
to | Minecraft 1.20 |
Tags |
2 Update Logs
Update #3 : by Knamf 02/23/2024 9:16:49 amFeb 23rd
Can now be used in multiple worlds on one server.See the description to learn how to adjust the code
LOAD MORE LOGS
tools/tracking
6065871
119
streetlamps
Create an account or sign in to comment.
maybe in MC 1.20.4 there are some changes?
Your package is very convenient, I replaced the light sensors which are so unsightly that they overlook any lamp, and made my city more realistic ;)
Simply download new version and replace. Reload the server and you're done.
I would like to understand if it is a functionality problem with the package I have on my server, but I think with the package.
Any player can now create a lamp using the “/trigger streetlamp” command. If you're loading it in a world with cheats, you can change this function with "/function streetlamp:permission".