Initial import

This commit is contained in:
Darto KLoning
2026-06-20 20:58:13 +07:00
parent 2d6b7400a2
commit 0a22196ea6
76 changed files with 1019 additions and 0 deletions
@@ -0,0 +1,10 @@
scoreboard players set #villager pv_villagers 0
scoreboard players set #guard pv_guards 0
scoreboard players set #alive pv_alive 0
execute store result score #villager pv_villagers run execute if entity @e[type=minecraft:villager,x=-1,y=64,z=-9,dx=2,dy=2,dz=18]
execute store result score #guard pv_guards run execute if entity @e[type=guardvillagers:guard,x=-1,y=64,z=-9,dx=2,dy=2,dz=18]
scoreboard players operation #alive pv_alive = #villager pv_villagers
scoreboard players operation #alive pv_alive += #guard pv_guards
@@ -0,0 +1,6 @@
execute store result score @s pv_emeralds run clear @s minecraft:emerald 0
execute if score @s pv_emeralds matches ..49 run tellraw @s [{"text":"Emerald tidak cukup. Butuh ","color":"red"},{"text":"50 Emerald","color":"green","bold":true},{"text":" untuk spawn Villager.","color":"red"}]
execute if score @s pv_emeralds matches ..49 run playsound minecraft:block.note_block.bass player @s ~ ~ ~ 0.8 0.8
execute if score @s pv_emeralds matches 50.. run function protect_villagers:entities/spawn/try_slots
@@ -0,0 +1,6 @@
scoreboard players set #button pv_button_lock 1
execute if score @s pv_spawn_cd matches 1.. run tellraw @s {"text":"Villager spawn masih cooldown. Tunggu sebentar...","color":"red"}
execute if score @s pv_spawn_cd matches 1.. run playsound minecraft:block.note_block.bass player @s ~ ~ ~ 0.8 0.7
execute unless score @s pv_spawn_cd matches 1.. run function protect_villagers:entities/spawn/check_payment
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 -8
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 -8 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 -8 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 -6
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 -6 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 -6 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 -4
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 -4 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 -4 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 -2
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 -2 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 -2 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 0
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 0 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 0 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 2
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 2 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 2 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 4
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 4 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 4 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 6
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 6 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 6 1.0 1.0
@@ -0,0 +1,4 @@
summon minecraft:villager 0 65 8
scoreboard players set #spawn pv_spawn_done 1
particle minecraft:happy_villager 0 66 8 0.4 0.6 0.4 0.02 20 force
playsound minecraft:entity.villager.yes player @a[x=-39,y=57,z=-27,dx=108,dy=42,dz=54] 0 65 8 1.0 1.0
@@ -0,0 +1,17 @@
scoreboard players set #spawn pv_spawn_done 0
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 -8 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_1
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 -6 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_2
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 -4 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_3
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 -2 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_4
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 0 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_5
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 2 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_6
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 4 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_7
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 6 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_8
execute if score #spawn pv_spawn_done matches 0 positioned 0 65 8 unless entity @e[type=minecraft:villager,distance=..0.8] unless entity @e[type=guardvillagers:guard,distance=..0.8] run function protect_villagers:entities/spawn/slot_9
execute if score #spawn pv_spawn_done matches 0 run tellraw @s {"text":"Semua slot Villager sudah terisi.","color":"yellow"}
execute if score #spawn pv_spawn_done matches 1 run clear @s minecraft:emerald 50
execute if score #spawn pv_spawn_done matches 1 run scoreboard players set @s pv_spawn_cd 300
execute if score #spawn pv_spawn_done matches 1 run tellraw @s [{"text":"Villager baru berhasil dipanggil. ","color":"green"},{"text":"-50 Emerald","color":"yellow"}]
execute if score #spawn pv_spawn_done matches 1 run playsound minecraft:entity.villager.celebrate player @s ~ ~ ~ 1.2 1.0