Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## light.json (context int provider)
- {
- "type": "minecraft:number_dispatcher",
- "cases": [
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 0
- }
- }
- },
- "value": 0
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 1
- }
- }
- },
- "value": 1
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 2
- }
- }
- },
- "value": 2
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 3
- }
- }
- },
- "value": 3
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 4
- }
- }
- },
- "value": 4
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 5
- }
- }
- },
- "value": 5
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 6
- }
- }
- },
- "value": 6
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 7
- }
- }
- },
- "value": 7
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 8
- }
- }
- },
- "value": 8
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 9
- }
- }
- },
- "value": 9
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 10
- }
- }
- },
- "value": 10
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 11
- }
- }
- },
- "value": 11
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 12
- }
- }
- },
- "value": 12
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 13
- }
- }
- },
- "value": 13
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 14
- }
- }
- },
- "value": 14
- },
- {
- "condition": {
- "type": "minecraft:location_check",
- "predicate": {
- "light": {
- "light": 15
- }
- }
- },
- "value": 15
- }
- ]
- }
- ## compute_max.json (context int provider)
- {
- "type": "minecraft:max",
- "inputs": [
- {
- "type": "minecraft:score",
- "target": {
- "type": "minecraft:fixed",
- "name": "up"
- },
- "score": "light.light"
- },
- {
- "type": "minecraft:score",
- "target": {
- "type": "minecraft:fixed",
- "name": "down"
- },
- "score": "light.light"
- },
- {
- "type": "minecraft:score",
- "target": {
- "type": "minecraft:fixed",
- "name": "north"
- },
- "score": "light.light"
- },
- {
- "type": "minecraft:score",
- "target": {
- "type": "minecraft:fixed",
- "name": "east"
- },
- "score": "light.light"
- },{
- "type": "minecraft:score",
- "target": {
- "type": "minecraft:fixed",
- "name": "south"
- },
- "score": "light.light"
- },{
- "type": "minecraft:score",
- "target": {
- "type": "minecraft:fixed",
- "name": "west"
- },
- "score": "light.light"
- }
- ]
- }
- ## update_light.mcfunction
- execute store result score up light.light positioned ~ ~1 ~ run compute entity @s integer light:light
- execute store result score down light.light positioned ~ ~-1 ~ run compute entity @s integer light:light
- execute store result score east light.light positioned ~1 ~ ~ run compute entity @s integer light:light
- execute store result score west light.light positioned ~-1 ~ ~ run compute entity @s integer light:light
- execute store result score north light.light positioned ~ ~ ~-1 run compute entity @s integer light:light
- execute store result score south light.light positioned ~ ~ ~1 run compute entity @s integer light:light
- execute store result entity @s brightness.sky int 1 run compute default integer light:compute_max
Advertisement
Add Comment
Please, Sign In to add comment