Skip to content

Commit

Permalink
Reworks
Browse files Browse the repository at this point in the history
Global
- Added Corals related crafts
AFK
- Added config parameter to set the number of minutes before a player is considered AFK.
- Removed non-survival players from the system.
Bed
- Added a message when players are in bed considering the number.
- Slowed down the passage of time.
Blaze & Phantom
- Added config for the delay between spawns.
- Made the radius to check for spawned blazes from 90 to 128.
Magnet
- Entire rework stolen from my personal datapack (VW.)
Time
- Default modifier is 1 instead of 2.
  • Loading branch information
ShoukaSeikyo committed Oct 24, 2018
1 parent 935b9e6 commit 395de93
Show file tree
Hide file tree
Showing 39 changed files with 336 additions and 50 deletions.
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/brainblock2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:brain_coral_block"
}
],
"result": {
"item": "minecraft:brain_coral",
"count": 4
}
}
21 changes: 21 additions & 0 deletions data/holycube/recipes/corals/braincoral2block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:brain_coral"
},
{
"item": "minecraft:brain_coral"
},
{
"item": "minecraft:brain_coral"
},
{
"item": "minecraft:brain_coral"
}
],
"result": {
"item": "minecraft:brain_coral_block",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/braincoral2fan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:brain_coral"
}
],
"result": {
"item": "minecraft:brain_coral_fan",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/brainfan2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:brain_coral_fan"
}
],
"result": {
"item": "minecraft:brain_coral",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/bubbleblock2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:bubble_coral_block"
}
],
"result": {
"item": "minecraft:bubble_coral",
"count": 4
}
}
21 changes: 21 additions & 0 deletions data/holycube/recipes/corals/bubblecoral2block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:bubble_coral"
},
{
"item": "minecraft:bubble_coral"
},
{
"item": "minecraft:bubble_coral"
},
{
"item": "minecraft:bubble_coral"
}
],
"result": {
"item": "minecraft:bubble_coral_block",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/bubblecoral2fan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:bubble_coral"
}
],
"result": {
"item": "minecraft:bubble_coral_fan",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/bubblefan2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:bubble_coral_fan"
}
],
"result": {
"item": "minecraft:bubble_coral",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/fireblock2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:fire_coral_block"
}
],
"result": {
"item": "minecraft:fire_coral",
"count": 4
}
}
21 changes: 21 additions & 0 deletions data/holycube/recipes/corals/firecoral2block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:fire_coral"
},
{
"item": "minecraft:fire_coral"
},
{
"item": "minecraft:fire_coral"
},
{
"item": "minecraft:fire_coral"
}
],
"result": {
"item": "minecraft:fire_coral_block",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/firecoral2fan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:fire_coral"
}
],
"result": {
"item": "minecraft:fire_coral_fan",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/firefan2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:fire_coral_fan"
}
],
"result": {
"item": "minecraft:fire_coral",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/hornblock2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:horn_coral_block"
}
],
"result": {
"item": "minecraft:horn_coral",
"count": 4
}
}
21 changes: 21 additions & 0 deletions data/holycube/recipes/corals/horncoral2block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:horn_coral"
},
{
"item": "minecraft:horn_coral"
},
{
"item": "minecraft:horn_coral"
},
{
"item": "minecraft:horn_coral"
}
],
"result": {
"item": "minecraft:horn_coral_block",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/horncoral2fan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:horn_coral"
}
],
"result": {
"item": "minecraft:horn_coral_fan",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/hornfan2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:horn_coral_fan"
}
],
"result": {
"item": "minecraft:horn_coral",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/tubeblock2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:tube_coral_block"
}
],
"result": {
"item": "minecraft:tube_coral",
"count": 4
}
}
21 changes: 21 additions & 0 deletions data/holycube/recipes/corals/tubecoral2block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:tube_coral"
},
{
"item": "minecraft:tube_coral"
},
{
"item": "minecraft:tube_coral"
},
{
"item": "minecraft:tube_coral"
}
],
"result": {
"item": "minecraft:tube_coral_block",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/tubecoral2fan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:tube_coral"
}
],
"result": {
"item": "minecraft:tube_coral_fan",
"count": 1
}
}
12 changes: 12 additions & 0 deletions data/holycube/recipes/corals/tubefan2coral.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "crafting_shapeless",
"ingredients": [
{
"item": "minecraft:tube_coral_fan"
}
],
"result": {
"item": "minecraft:tube_coral",
"count": 1
}
}
2 changes: 2 additions & 0 deletions data/holycube_afk/functions/init.mcfunction
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#config

## #HC4_AFK#t -> Number of minutes before a player becomes AFK
## #HC4_AFK#s -> Players will gain saturation while AFK to not starve
## #HC4_AFK#i -> Players will gain a resistance effect of level 5 to become invulnerable while AFK. They will still move though.

execute unless score #HC4_AFK#t hc4-config matches 0.. run scoreboard players set #HC4_AFK#t hc4-config 5
execute unless score #HC4_AFK#s hc4-config matches 0..1 run scoreboard players set #HC4_AFK#s hc4-config 1
execute unless score #HC4_AFK#i hc4-config matches 0..1 run scoreboard players set #HC4_AFK#i hc4-config 1

Expand Down
11 changes: 7 additions & 4 deletions data/holycube_afk/functions/logic/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
execute as @a[scores={hc4.vehicle=1}] run function holycube_afk:logic/apply_in_vehicle
execute as @a[scores={hc4.vehicle=0}] run function holycube_afk:logic/apply_on_foot
scoreboard players set #HC4_AFK#t_tmp hc4-config 12
scoreboard players operation #HC4_AFK#t_tmp hc4-config *= #HC4_AFK#t hc4-config

tag @a[scores={hc4.afk=..98}] remove hc_afk
tag @a[scores={hc4.afk=99..}] add hc_afk
execute as @a[nbt={playerGameType:0},scores={hc4.vehicle=1}] run function holycube_afk:logic/apply_in_vehicle
execute as @a[nbt={playerGameType:0},scores={hc4.vehicle=0}] run function holycube_afk:logic/apply_on_foot
execute as @a[nbt=!{playerGameType:0}] run tag @s remove hc_afk
execute as @a[nbt={playerGameType:0}] if score @s hc4.afk < #HC4_AFK#t_tmp hc4-config run tag @s remove hc_afk
execute as @a[nbt={playerGameType:0}] if score @s hc4.afk >= #HC4_AFK#t_tmp hc4-config run tag @s add hc_afk

title @a[tag=hc_afk] times 0 1000000000 0
title @a[tag=hc_afk] title {"text":"AFK"}
Expand Down
3 changes: 0 additions & 3 deletions data/holycube_afk/functions/logic/apply_in_vehicle.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#pos
scoreboard players add @a[scores={hc4.afk=0..99}] hc4.afk 1

execute unless score @s hc4.ofkX = @s hc4.vehicleR run scoreboard players set @s hc4.afk 0
execute unless score @s hc4.ofkY = @s hc4.vehicleY run scoreboard players set @s hc4.afk 0

Expand Down
3 changes: 0 additions & 3 deletions data/holycube_afk/functions/logic/apply_on_foot.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#pos
scoreboard players add @a[scores={hc4.afk=0..99}] hc4.afk 1

execute unless score @s hc4.ofkX = @s hc4.posX run scoreboard players set @s hc4.afk 0
execute unless score @s hc4.ofkY = @s hc4.posY run scoreboard players set @s hc4.afk 0
execute unless score @s hc4.ofkZ = @s hc4.posZ run scoreboard players set @s hc4.afk 0
Expand Down
5 changes: 3 additions & 2 deletions data/holycube_bed/functions/loop.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ scoreboard players set #HC_Bed#asleep hc4.bed 0
scoreboard players set @a[nbt={Sleeping:0b}] hc4.bed 0
execute as @a[nbt={Sleeping:1b}] store result score @s hc4.bed run data get entity @s SleepTimer

execute as @a[scores={hc4.bed=1},limit=1] run tellraw @a [{"color":"green","selector":"@a[scores={hc4.bed=1..}]"}, {"color":"white","text":" sont maintenant dans un lit."}]
execute as @a[scores={hc4.bed=30..}] run scoreboard players add #HC_Bed#asleep hc4.bed 1
execute if score #HC_Bed#asleep hc4.bed matches 1 as @a[scores={hc4.bed=30},limit=1] run tellraw @a [{"color":"green","selector":"@a[scores={hc4.bed=1..}]"}, {"color":"white","text":" est maintenant dans un lit."}]
execute if score #HC_Bed#asleep hc4.bed matches 2.. as @a[scores={hc4.bed=30},limit=1] run tellraw @a [{"color":"green","selector":"@a[scores={hc4.bed=1..}]"}, {"color":"white","text":" sont maintenant dans un lit."}]

execute unless score #HC_Bed#total hc4.bed = #HC_Bed#cache hc4.bed run function holycube_bed:logic/check

Expand All @@ -22,4 +23,4 @@ execute if score #HC_Bed#asleep hc4.bed matches ..0 run bossbar set hc4.bed visi
execute store result score #HC_Bed#time hc4.bed run time query daytime

execute if score #HC_Bed#total hc4.bed matches 1.. if score #HC_Bed#req hc4.bed <= #HC_Bed#asleep hc4.bed run weather clear 0
execute if score #HC_Bed#total hc4.bed matches 1.. if score #HC_Bed#req hc4.bed <= #HC_Bed#asleep hc4.bed if score #HC_Bed#time hc4.bed matches 12550.. run time add 260
execute if score #HC_Bed#total hc4.bed matches 1.. if score #HC_Bed#req hc4.bed <= #HC_Bed#asleep hc4.bed if score #HC_Bed#time hc4.bed matches 12550.. run time add 50
2 changes: 1 addition & 1 deletion data/holycube_blaze/functions/check.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
execute as @s store result score #HC4-BlazeDiff hc4.blaze run difficulty
scoreboard players set #HC4-BlazeCount hc4.blaze 0
execute store result score #HC4-BlazeCount hc4.blaze at @s run effect give @e[type=minecraft:blaze,tag=hc4_blaze,distance=0..90] minecraft:absorption 1000000 1 true
execute store result score #HC4-BlazeCount hc4.blaze at @s run effect give @e[type=minecraft:blaze,tag=hc4_blaze,distance=0..128] minecraft:absorption 1000000 1 true

scoreboard players set #HC4-BlazeLimit hc4.blaze 2
scoreboard players operation #HC4-BlazeLimit hc4.blaze *= #HC4-BlazeDiff hc4.blaze
Expand Down
2 changes: 2 additions & 0 deletions data/holycube_blaze/functions/init.mcfunction
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
execute unless score #HC4_Blaze#t hc4-config matches 0.. run scoreboard players set #HC4_Blaze#t hc4-config 3600

scoreboard objectives add hc4.blaze dummy
Loading

0 comments on commit 395de93

Please sign in to comment.