first commit
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
execute if score McVersion fktool matches 1..999 run tellraw @a ["",{"text":"[fktool]","bold":true,"color":"gold"},{"text":" Conflict detected between two of my datapacks. Proceed : "}]
|
||||
execute if score McVersion fktool matches 1..999 run tellraw @a ["",{"text":"[fktool]","bold":true,"color":"gold"},{"text":" 1. Download and update all FunkyToc's datapacks "},{"text":"[ get list ]","color":"aqua","clickEvent":{"action":"open_url","value":"https://www.planetminecraft.com/member/funkytoc/submissions/data-packs/"}}]
|
||||
execute if score McVersion fktool matches 1..999 run tellraw @a ["",{"text":"[fktool]","bold":true,"color":"gold"},{"text":" 2. Use /reload in game"}]
|
||||
execute if score McVersion fktool matches 1..999 run tellraw @a ["",{"text":"[fktool]","bold":true,"color":"gold"},{"text":" 3. Fixed. If the problem still persists, please contact me on "},{"text":"[ PMC ]","color":"aqua","clickEvent":{"action":"open_url","value":"https://www.planetminecraft.com/member/funkytoc/"}}]
|
@ -0,0 +1 @@
|
||||
execute store result score Difficulty fktool run difficulty
|
@ -0,0 +1,90 @@
|
||||
# scores
|
||||
scoreboard objectives add fktool dummy
|
||||
|
||||
# const
|
||||
scoreboard players set #-1 fktool -1
|
||||
scoreboard players set #1 fktool 1
|
||||
scoreboard players set #2 fktool 2
|
||||
scoreboard players set #3 fktool 3
|
||||
scoreboard players set #4 fktool 4
|
||||
scoreboard players set #5 fktool 5
|
||||
scoreboard players set #6 fktool 6
|
||||
scoreboard players set #7 fktool 7
|
||||
scoreboard players set #8 fktool 8
|
||||
scoreboard players set #9 fktool 9
|
||||
scoreboard players set #10 fktool 10
|
||||
scoreboard players set #11 fktool 11
|
||||
scoreboard players set #12 fktool 12
|
||||
scoreboard players set #13 fktool 13
|
||||
scoreboard players set #14 fktool 14
|
||||
scoreboard players set #15 fktool 15
|
||||
scoreboard players set #16 fktool 16
|
||||
scoreboard players set #17 fktool 17
|
||||
scoreboard players set #18 fktool 18
|
||||
scoreboard players set #19 fktool 19
|
||||
scoreboard players set #20 fktool 20
|
||||
scoreboard players set #25 fktool 25
|
||||
scoreboard players set #30 fktool 30
|
||||
scoreboard players set #35 fktool 35
|
||||
scoreboard players set #40 fktool 40
|
||||
scoreboard players set #45 fktool 45
|
||||
scoreboard players set #50 fktool 50
|
||||
scoreboard players set #55 fktool 55
|
||||
scoreboard players set #60 fktool 60
|
||||
scoreboard players set #65 fktool 65
|
||||
scoreboard players set #70 fktool 70
|
||||
scoreboard players set #75 fktool 75
|
||||
scoreboard players set #80 fktool 80
|
||||
scoreboard players set #85 fktool 85
|
||||
scoreboard players set #90 fktool 90
|
||||
scoreboard players set #91 fktool 91
|
||||
scoreboard players set #92 fktool 92
|
||||
scoreboard players set #93 fktool 93
|
||||
scoreboard players set #94 fktool 94
|
||||
scoreboard players set #95 fktool 95
|
||||
scoreboard players set #96 fktool 96
|
||||
scoreboard players set #97 fktool 97
|
||||
scoreboard players set #98 fktool 98
|
||||
scoreboard players set #99 fktool 99
|
||||
scoreboard players set #100 fktool 100
|
||||
scoreboard players set #101 fktool 101
|
||||
scoreboard players set #200 fktool 200
|
||||
scoreboard players set #300 fktool 300
|
||||
scoreboard players set #400 fktool 400
|
||||
scoreboard players set #500 fktool 500
|
||||
scoreboard players set #600 fktool 600
|
||||
scoreboard players set #700 fktool 700
|
||||
scoreboard players set #800 fktool 800
|
||||
scoreboard players set #900 fktool 900
|
||||
scoreboard players set #1000 fktool 1000
|
||||
scoreboard players set #10000 fktool 10000
|
||||
scoreboard players set #100000 fktool 100000
|
||||
scoreboard players set #1000000 fktool 1000000
|
||||
|
||||
# timestamps
|
||||
scoreboard players set #1min fktool 1200
|
||||
scoreboard players set #2min fktool 2400
|
||||
scoreboard players set #3min fktool 3600
|
||||
scoreboard players set #4min fktool 4800
|
||||
scoreboard players set #5min fktool 6000
|
||||
scoreboard players set #10min fktool 12000
|
||||
scoreboard players set #20min fktool 24000
|
||||
scoreboard players set #30min fktool 36000
|
||||
scoreboard players set #60min fktool 72000
|
||||
scoreboard players set #2hour fktool 144000
|
||||
scoreboard players set #4hour fktool 288000
|
||||
scoreboard players set #8hour fktool 576000
|
||||
|
||||
# properties
|
||||
|
||||
|
||||
# modules
|
||||
|
||||
|
||||
# check conflict
|
||||
function fktool:conflict
|
||||
|
||||
# init
|
||||
function fktool:difficulty/get
|
||||
function fktool:mcv/get
|
||||
function fktool:rng/get
|
@ -0,0 +1,27 @@
|
||||
# get
|
||||
execute store result score DataVersion fktool run data get entity @r DataVersion
|
||||
|
||||
# set
|
||||
scoreboard players set McVersion fktool 0
|
||||
execute if score DataVersion fktool matches 3700.. run scoreboard players set McVersion fktool 12004
|
||||
execute if score DataVersion fktool matches 3579..3699 run scoreboard players set McVersion fktool 12003
|
||||
execute if score DataVersion fktool matches 3567..3578 run scoreboard players set McVersion fktool 12002
|
||||
execute if score DataVersion fktool matches 3442..3465 run scoreboard players set McVersion fktool 12000
|
||||
execute if score DataVersion fktool matches 3320..3337 run scoreboard players set McVersion fktool 11904
|
||||
execute if score DataVersion fktool matches 3205..3218 run scoreboard players set McVersion fktool 11903
|
||||
execute if score DataVersion fktool matches 3066..3120 run scoreboard players set McVersion fktool 11900
|
||||
execute if score DataVersion fktool matches 2966..2975 run scoreboard players set McVersion fktool 11802
|
||||
execute if score DataVersion fktool matches 2825..2865 run scoreboard players set McVersion fktool 11800
|
||||
execute if score DataVersion fktool matches 2701..2730 run scoreboard players set McVersion fktool 11700
|
||||
execute if score DataVersion fktool matches 2569..2586 run scoreboard players set McVersion fktool 11602
|
||||
execute if score DataVersion fktool matches 2320..2567 run scoreboard players set McVersion fktool 11600
|
||||
execute if score DataVersion fktool matches 2067..2230 run scoreboard players set McVersion fktool 11500
|
||||
execute if score DataVersion fktool matches 1901..1976 run scoreboard players set McVersion fktool 11400
|
||||
execute if score DataVersion fktool matches 1444..1631 run scoreboard players set McVersion fktool 11300
|
||||
execute if score DataVersion fktool matches 1..1343 run scoreboard players set McVersion fktool 11200
|
||||
|
||||
# require
|
||||
execute unless entity @p run tellraw @a {"text":"WARNING: a connected player is required to get the Minecraft version. Default setting : 1.20.4 . Use /reload with a player ingame to update it.","color":"red"}
|
||||
execute if entity @p unless score DataVersion fktool matches 1.. run tellraw @a {"text":"ERROR: DataVersion not recognized. Do you use intensive plugins, mods or optimized server type? Default setting : 1.20.4.","color":"red"}
|
||||
execute unless score DataVersion fktool matches 1.. run scoreboard players set DataVersion fktool -1
|
||||
execute if score DataVersion fktool matches -1 run scoreboard players set McVersion fktool 12004
|
@ -0,0 +1,3 @@
|
||||
execute if score McVersion fktool matches ..11500 run function fktool:rng/rand_1.13
|
||||
execute if score McVersion fktool matches 11600..11602 run function fktool:rng/rand_1.16
|
||||
execute if score McVersion fktool matches 11700.. run function fktool:rng/rand_1.17
|
@ -0,0 +1,4 @@
|
||||
summon minecraft:area_effect_cloud ~ 1 ~ {Tags:["fktool.rng"]}
|
||||
execute store result score Random fktool run data get entity @e[type=minecraft:area_effect_cloud,tag=fktool.rng,limit=1] UUIDMost 0.00000000023283064
|
||||
scoreboard players operation Random fktool %= #101 fktool
|
||||
kill @e[type=minecraft:area_effect_cloud,tag=fktool.rng]
|
@ -0,0 +1,4 @@
|
||||
summon minecraft:area_effect_cloud ~ 1 ~ {Tags:["fktool.rng"]}
|
||||
execute store result score Random fktool run data get entity @e[type=minecraft:area_effect_cloud,tag=fktool.rng,limit=1] UUID[0] 1
|
||||
scoreboard players operation Random fktool %= #101 fktool
|
||||
kill @e[type=minecraft:area_effect_cloud,tag=fktool.rng]
|
@ -0,0 +1,4 @@
|
||||
summon minecraft:marker ~ 1 ~ {Tags:["fktool.rng"]}
|
||||
execute store result score Random fktool run data get entity @e[type=minecraft:marker,tag=fktool.rng,limit=1] UUID[0] 1
|
||||
scoreboard players operation Random fktool %= #101 fktool
|
||||
kill @e[type=minecraft:marker,tag=fktool.rng]
|
@ -0,0 +1,3 @@
|
||||
data modify storage fktool:systime int_array set value ["9","8","8","7","7","7","6","6","6","6","5","5","5","5","5","4","4","4","4","4","4","3","3","3","3","3","3","3","2","2","2","2","2","2","2","2","1","1","1","1","1","1","1","1","1","0","0","0","0","0","0","0","0","0","0"]
|
||||
execute store result score #int fktool run data modify storage fktool:systime int_array[] set from storage fktool:systime input
|
||||
scoreboard players remove #int fktool 45
|
@ -0,0 +1,7 @@
|
||||
# set / reset
|
||||
execute unless entity @e[type=minecraft:marker,tag=fktool.systime,limit=1] run schedule function fktool:systime/install 1t
|
||||
execute at @e[type=minecraft:marker,tag=fktool.systime,limit=1] unless block ~ ~ ~ repeating_command_block run schedule function fktool:systime/install 1t
|
||||
|
||||
# get
|
||||
execute if score McVersion fktool matches 12003.. as @e[type=minecraft:marker,tag=fktool.systime,limit=1] at @s run function fktool:systime/read_1.20
|
||||
execute if score McVersion fktool matches 11904..12002 as @e[type=minecraft:marker,tag=fktool.systime,limit=1] at @s run function fktool:systime/read_1.19
|
@ -0,0 +1,2 @@
|
||||
execute if score McVersion fktool matches 11904.. run function fktool:systime/do
|
||||
execute if score McVersion fktool matches ..11903 run tellraw @a[gamemode=creative] {"text":"fktool.systime require 1.19.4+","color":"red"}
|
@ -0,0 +1,11 @@
|
||||
# install
|
||||
tellraw @p[name=FunkyToc] {"text":"fktool.systime require enabling command_block.","color":"red"}
|
||||
tellraw @p[name=FunkyToc] {"text":"fktool.systime installed. Please, do it again.","color":"red"}
|
||||
|
||||
# remove prev
|
||||
function fktool:systime/unset
|
||||
|
||||
# summon new
|
||||
execute positioned ~.5 -63.5 ~.5 run setblock ~ ~ ~ repeating_command_block{auto:1b,Command:"help me",TrackOutput:1b}
|
||||
execute positioned ~.5 -63.5 ~.5 run summon marker ~ ~ ~ {Tags: ["fktool.systime"]}
|
||||
execute positioned ~.5 -63.5 ~.5 run forceload add ~ ~
|
@ -0,0 +1,26 @@
|
||||
# get hour
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 44 45
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.hour fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 45 46
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.hour fktool += #int fktool
|
||||
|
||||
# get minute
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 47 48
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.min fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 48 49
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.min fktool += #int fktool
|
||||
|
||||
# get second
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 50 51
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.sec fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 51 52
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.sec fktool += #int fktool
|
@ -0,0 +1,26 @@
|
||||
# get hour
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 44 45
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.hour fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 45 46
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.hour fktool += #int fktool
|
||||
|
||||
# get minute
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 47 48
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.min fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 48 49
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.min fktool += #int fktool
|
||||
|
||||
# get second
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 50 51
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.sec fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 51 52
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.sec fktool += #int fktool
|
@ -0,0 +1,26 @@
|
||||
# get hour
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 10 11
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.hour fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 11 12
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.hour fktool += #int fktool
|
||||
|
||||
# get minute
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 13 14
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.min fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 14 15
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.min fktool += #int fktool
|
||||
|
||||
# get second
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 16 17
|
||||
function fktool:systime/convert
|
||||
execute store result score SysTime.sec fktool run scoreboard players operation #int fktool *= #10 fktool
|
||||
|
||||
data modify storage fktool:systime input set string block ~ ~ ~ LastOutput 17 18
|
||||
function fktool:systime/convert
|
||||
scoreboard players operation SysTime.sec fktool += #int fktool
|
@ -0,0 +1,3 @@
|
||||
execute at @e[type=minecraft:marker,tag=fktool.systime] run setblock ~ ~ ~ air
|
||||
execute at @e[type=minecraft:marker,tag=fktool.systime] run forceload remove ~ ~
|
||||
kill @e[type=minecraft:marker,tag=fktool.systime]
|
@ -0,0 +1,2 @@
|
||||
scoreboard players reset * fktool
|
||||
scoreboard objectives remove fktool
|
Reference in New Issue
Block a user