diff --git a/data/lt/advancements/limeade_drink_test.json b/data/lt/advancements/limeade_drink_test.json index 80245d1f..1fdf973b 100644 --- a/data/lt/advancements/limeade_drink_test.json +++ b/data/lt/advancements/limeade_drink_test.json @@ -5,7 +5,7 @@ "conditions": { "item": { "items": [ - "minecraft:potion" + "tropicraft:limeade" ] } } diff --git a/data/lt/functions/club/bouncer/kick_out_non_member.mcfunction b/data/lt/functions/club/bouncer/kick_out_non_member.mcfunction new file mode 100644 index 00000000..221411a1 --- /dev/null +++ b/data/lt/functions/club/bouncer/kick_out_non_member.mcfunction @@ -0,0 +1,7 @@ +title @s times 0t 3t 0t +title @s title {"text": "! NON MEMBER !","color": "dark_red","bold": true} +title @s subtitle {"text": "You shouldn't be here - Bouncers inbound!","color": "red"} +effect give @s blindness 2 60 true +effect give @s slowness 1 5 true +playsound minecraft:block.note_block.bit master @s ~ ~ ~ 0.5 0.5 +damage @e[tag=club.bouncer,limit=1,sort=nearest] 5 minecraft:out_of_world by @s \ No newline at end of file diff --git a/data/lt/functions/club/bouncer/on_tick.mcfunction b/data/lt/functions/club/bouncer/on_tick.mcfunction new file mode 100644 index 00000000..6527aff2 --- /dev/null +++ b/data/lt/functions/club/bouncer/on_tick.mcfunction @@ -0,0 +1,10 @@ +# Team detection +# Execute store success to look for disguises on player heads. +execute in tropicraft:tropics as @a[distance=..45] store success score @s club.disguiseWearTrack run data get entity @s Inventory[{Slot:103b,id:"ltminigames:disguise"}] +team join club.hideNames @a[scores={club.disguiseWearTrack=1},distance=..45,tag=club.joined,gamemode=!spectator] +team leave @a[scores={club.disguiseWearTrack=0},distance=..45,team=club.hideNames] + +# Bouncer stuff +team join club.hideNames @e[tag=club.bouncer,type=minecraft:vindicator] +execute as @a[distance=..45,scores={club.disguiseWearTrack=0},gamemode=!spectator,gamemode=!creative,tag=club.joined] at @s run function lt:club/bouncer/trap_idiot +execute as @a[distance=..45,gamemode=!spectator,gamemode=!creative,tag=!club.joined] at @s run function lt:club/bouncer/kick_out_non_member \ No newline at end of file diff --git a/data/lt/functions/club/bouncer/trap_idiot.mcfunction b/data/lt/functions/club/bouncer/trap_idiot.mcfunction new file mode 100644 index 00000000..a01804e4 --- /dev/null +++ b/data/lt/functions/club/bouncer/trap_idiot.mcfunction @@ -0,0 +1,7 @@ +title @s times 0t 3t 0t +title @s title {"text": "DISGUISE REMOVED","color": "dark_red","bold": true} +title @s subtitle {"text": "Reequip your disguise - Bouncers inbound!","color": "red"} +effect give @s blindness 2 60 true +effect give @s slowness 1 5 true +playsound minecraft:block.note_block.bit master @s ~ ~ ~ 0.5 0.5 +damage @e[tag=club.bouncer,limit=1,sort=nearest] 5 minecraft:out_of_world by @s \ No newline at end of file diff --git a/data/lt/functions/club/dev/create_bartender.mcfunction b/data/lt/functions/club/dev/create_bartender.mcfunction new file mode 100644 index 00000000..869a80cd --- /dev/null +++ b/data/lt/functions/club/dev/create_bartender.mcfunction @@ -0,0 +1 @@ +summon villager ~ ~ ~ {NoGravity:1b,Invulnerable:1b,CustomNameVisible:1b,PersistenceRequired:1b,Health:100f,Tags:["club.bartender"],CustomName:'{"translate":"lt.club.bartender_name","fallback":"Dave: Bartender"}',Attributes:[{Name:generic.max_health,Base:100},{Name:generic.knockback_resistance,Base:1},{Name:generic.movement_speed,Base:0}],VillagerData:{level:99,profession:"minecraft:cleric",type:"minecraft:jungle"},Offers:{Recipes:[{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:coconut_water",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:black_coffee",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:pina_colada",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:mai_tai",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:lemonade",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:orangeade",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:4b},sell:{id:"tropicraft:limeade",Count:1b}},{rewardExp:0b,maxUses:2147483647,xp:0,buy:{id:"ltextras:tropicoin",Count:2b},sell:{id:"tropicraft:caipirinha",Count:1b}}]}} \ No newline at end of file diff --git a/data/lt/functions/club/dev/create_club_marker.mcfunction b/data/lt/functions/club/dev/create_club_marker.mcfunction new file mode 100644 index 00000000..ef22aa1b --- /dev/null +++ b/data/lt/functions/club/dev/create_club_marker.mcfunction @@ -0,0 +1,2 @@ +kill @e[tag=club.the_club] +summon marker ~ ~ ~ {Tags:["club.the_club"]} \ No newline at end of file diff --git a/data/lt/functions/club/dev/create_exit.mcfunction b/data/lt/functions/club/dev/create_exit.mcfunction new file mode 100644 index 00000000..53fd745d --- /dev/null +++ b/data/lt/functions/club/dev/create_exit.mcfunction @@ -0,0 +1 @@ +summon marker ~ ~ ~ {Tags:["club.exit"]} \ No newline at end of file diff --git a/data/lt/functions/club/dev/create_first_spawn.mcfunction b/data/lt/functions/club/dev/create_first_spawn.mcfunction new file mode 100644 index 00000000..26f64c21 --- /dev/null +++ b/data/lt/functions/club/dev/create_first_spawn.mcfunction @@ -0,0 +1,2 @@ +kill @e[tag=club.first_spawn] +summon marker ~ ~ ~ {Tags:["club.first_spawn"]} \ No newline at end of file diff --git a/data/lt/functions/club/dev/create_internal_exit.mcfunction b/data/lt/functions/club/dev/create_internal_exit.mcfunction new file mode 100644 index 00000000..f9fa04b2 --- /dev/null +++ b/data/lt/functions/club/dev/create_internal_exit.mcfunction @@ -0,0 +1,2 @@ +kill @e[tag=club.internal_exit] +summon marker ~ ~ ~ {Tags:["club.internal_exit"]} \ No newline at end of file diff --git a/data/lt/functions/club/dev/create_normal_spawn.mcfunction b/data/lt/functions/club/dev/create_normal_spawn.mcfunction new file mode 100644 index 00000000..cba8e6b8 --- /dev/null +++ b/data/lt/functions/club/dev/create_normal_spawn.mcfunction @@ -0,0 +1,2 @@ +kill @e[tag=club.normal_spawn] +summon marker ~ ~ ~ {Tags:["club.normal_spawn"]} \ No newline at end of file diff --git a/data/lt/functions/club/dev/summon_bouncer.mcfunction b/data/lt/functions/club/dev/summon_bouncer.mcfunction new file mode 100644 index 00000000..dff5ffea --- /dev/null +++ b/data/lt/functions/club/dev/summon_bouncer.mcfunction @@ -0,0 +1,2 @@ +summon vindicator ~ ~ ~ {Silent:1b,Invulnerable:1b,CustomNameVisible:1b,Team:"club.hideNames",PersistenceRequired:1b,CanPickUpLoot:0b,Health:100f,Johnny:0b,PatrolLeader:0b,Patrolling:0b,CanJoinRaid:0b,Tags:["club.bouncer"],CustomName:'{"text":"way of their inability to follow club rules.","color":"white"}',Attributes:[{Name:generic.max_health,Base:100},{Name:generic.follow_range,Base:65},{Name:generic.knockback_resistance,Base:1},{Name:generic.movement_speed,Base:0.45},{Name:generic.attack_damage,Base:25},{Name:generic.attack_knockback,Base:0}]} +effect give @e[tag=club.bouncer] regeneration infinite 10 true \ No newline at end of file diff --git a/data/lt/functions/club/disguise_tracker_tick.mcfunction b/data/lt/functions/club/disguise_tracker_tick.mcfunction index a0e61dd0..c51ff574 100644 --- a/data/lt/functions/club/disguise_tracker_tick.mcfunction +++ b/data/lt/functions/club/disguise_tracker_tick.mcfunction @@ -1,6 +1,8 @@ # Execute store success to look for disguises on player heads. execute in tropicraft:tropics as @a[distance=..35] store success score @s club.disguiseWearTrack run data get entity @s Inventory[{Slot:103b,id:"ltminigames:disguise"}] team join club.hideNames @a[scores={club.disguiseWearTrack=1},distance=..35] +team leave @a[scores={club.disguiseWearTrack=0},distance=..35,team=club.hideNames] + # Lava door in here cause fuck it why not <3 execute as @e[tag=club.lava_door] at @s run execute as @a[scores={club.disguiseWearTrack=1},distance=..1.1,y_rotation=-180..0] at @s run function lt:club/door/enter diff --git a/data/lt/functions/club/get_drunk.mcfunction b/data/lt/functions/club/get_drunk.mcfunction index ede631d1..c2a66209 100644 --- a/data/lt/functions/club/get_drunk.mcfunction +++ b/data/lt/functions/club/get_drunk.mcfunction @@ -1,16 +1,18 @@ # Remove advancement advancement revoke @s only lt:limeade_drink_test +## Only do any of the following if the player has the club.can_enter tag and has an emerald block at Y 44 in their vertical column (in bar detection). + # Create trail effects -playsound minecraft:entity.enderman.teleport master @a[distance=..25] ~ ~ ~ 2 -particle portal ~ ~0.25 ~ 0.1 0.3 0.1 0.3 100 force @a[distance=..25] +execute if entity @s[tag=club.can_enter,scores={club.disguiseWearTrack=1}] if block ~ 44 ~ emerald_block run playsound minecraft:entity.enderman.teleport master @a[distance=..25] ~ ~ ~ 2 +execute if entity @s[tag=club.can_enter,scores={club.disguiseWearTrack=1}] if block ~ 44 ~ emerald_block run particle portal ~ ~0.25 ~ 0.1 0.3 0.1 0.3 100 force @a[distance=..25] # Give tags -execute unless entity @s[tag=club.joined] run tag @s add club.first_time_join -tag @s add club.joined +execute if entity @s[tag=club.can_enter,scores={club.disguiseWearTrack=1}] if block ~ 44 ~ emerald_block run execute unless entity @s[tag=club.joined] run tag @s add club.first_time_join +execute if entity @s[tag=club.can_enter,scores={club.disguiseWearTrack=1}] if block ~ 44 ~ emerald_block run tag @s add club.joined # Play introduction if player is joining for the first time -execute if entity @s[tag=club.first_time_join] run function lt:club/introduction/start +execute if entity @s[tag=club.can_enter,scores={club.disguiseWearTrack=1}] if block ~ 44 ~ emerald_block if entity @s[tag=club.first_time_join] run function lt:club/introduction/start # Otherwise teleport them to the existing member spawn location -execute if entity @s[tag=!club.first_time_join] run function lt:club/introduction/existing_member \ No newline at end of file +execute if entity @s[tag=club.can_enter,scores={club.disguiseWearTrack=1}] if block ~ 44 ~ emerald_block if entity @s[tag=!club.first_time_join] run function lt:club/introduction/existing_member \ No newline at end of file diff --git a/data/lt/functions/club/gibnut/accept_end.mcfunction b/data/lt/functions/club/gibnut/accept_end.mcfunction index 50a4370d..00d6d2bb 100644 --- a/data/lt/functions/club/gibnut/accept_end.mcfunction +++ b/data/lt/functions/club/gibnut/accept_end.mcfunction @@ -1,4 +1,5 @@ tag @s add club.needs_invite_2 scoreboard players reset @s club.dialogueTime tag @s add club.spoken_with_gibnut -tag @s remove club.speaking_with_gibnut \ No newline at end of file +tag @s remove club.speaking_with_gibnut +give @s tropicraft:tropicoin 4 \ No newline at end of file diff --git a/data/lt/functions/club/gibnut/accept_leave.mcfunction b/data/lt/functions/club/gibnut/accept_leave.mcfunction index 31d23f35..a84882d7 100644 --- a/data/lt/functions/club/gibnut/accept_leave.mcfunction +++ b/data/lt/functions/club/gibnut/accept_leave.mcfunction @@ -1,6 +1,7 @@ -tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": Hey! I wasn't done talking, where are you going! Who raised you?! Whatever ... I'll pass the word along to ","color": "gray"},{"text": "them ","italic": true,"color": "gray"},{"text": "that you're ready.","italic": false,"color": "gray"}] +tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": Hey! I wasn't done talking, where are you going! Who raised you?! Whatever ... I'll pass the word along to ","color": "gray"},{"text": "them ","italic": true,"color": "gray"},{"text": "that you're ready. Oh and take these coins. I think you'll find them helpful.","italic": false,"color": "gray"}] tag @s remove club.speaking_with_gibnut tag @s add club.spoken_with_gibnut tag @s add club.needs_invite_2 playsound minecraft:entity.llama.spit master @s ~ ~ ~ 1 1 -scoreboard players reset @s club.dialogueTime \ No newline at end of file +scoreboard players reset @s club.dialogueTime +give @s tropicraft:tropicoin 4 \ No newline at end of file diff --git a/data/lt/functions/club/gibnut/accept_on_tick.mcfunction b/data/lt/functions/club/gibnut/accept_on_tick.mcfunction index 6ca86b52..5167ffd1 100644 --- a/data/lt/functions/club/gibnut/accept_on_tick.mcfunction +++ b/data/lt/functions/club/gibnut/accept_on_tick.mcfunction @@ -13,6 +13,11 @@ execute if score @s club.dialogueTime matches 105 run tellraw @s [{"text":"Ser G execute if score @s club.dialogueTime matches 105 run playsound minecraft:entity.illusioner.ambient master @s execute if score @s club.dialogueTime matches 190 run tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": But here's me blathering on, knowing full well in your shoes I'd have little care for the meandering of an old man.","color": "gray"}] execute if score @s club.dialogueTime matches 190 run playsound minecraft:entity.illusioner.ambient master @s -execute if score @s club.dialogueTime matches 350 run tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": Bah! So be it then. I'll let ","color": "gray"},{"text": "them ","italic": true,"color": "gray"},{"text": "know you're ready.","italic": false,"color": "gray"}] -execute if score @s club.dialogueTime matches 350 run playsound minecraft:entity.illusioner.ambient master @s -execute if score @s club.dialogueTime matches 350 run function lt:club/gibnut/accept_end \ No newline at end of file +#execute if score @s club.dialogueTime matches 350 run tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": Bah! So be it then. I'll let ","color": "gray"},{"text": "them ","italic": true,"color": "gray"},{"text": "know you're ready.","italic": false,"color": "gray"}] +execute if score @s club.dialogueTime matches 240 run tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": Bah! So be it then. I won't keep you much longer.","color": "gray"}] +execute if score @s club.dialogueTime matches 240 run playsound minecraft:entity.illusioner.ambient master @s +execute if score @s club.dialogueTime matches 320 run tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": You'll want to take these coins. Oh and keep them close, yeah? You'll be needing them.","color": "gray"}] +execute if score @s club.dialogueTime matches 320 run playsound minecraft:entity.illusioner.ambient master @s +execute if score @s club.dialogueTime matches 400 run tellraw @s [{"text":"Ser Gibsworth","color":"gold"},{"text": ": Well now unless you have something, I'll let ","color": "gray"},{"text": "them ","italic": true,"color": "gray"},{"text": "know you're ready. Farewell.","italic": false,"color": "gray"}] +execute if score @s club.dialogueTime matches 400 run playsound minecraft:entity.illusioner.ambient master @s +execute if score @s club.dialogueTime matches 400 run function lt:club/gibnut/accept_end \ No newline at end of file diff --git a/data/lt/functions/club/introduction/existing_member.mcfunction b/data/lt/functions/club/introduction/existing_member.mcfunction index 37dbfe4b..0067fa70 100644 --- a/data/lt/functions/club/introduction/existing_member.mcfunction +++ b/data/lt/functions/club/introduction/existing_member.mcfunction @@ -4,7 +4,7 @@ title @s title [{"text":"Welcome Back!","color":"dark_purple","bold":true}] title @s subtitle [{"text":"To the Covert Club for Undercover Clubbers","color":"light_purple"}] # Teleport player -tp @s 1169 229 2744 +tp @s @e[tag=club.normal_spawn,limit=1] # Give effects effect give @s nausea 5 3 true diff --git a/data/lt/functions/club/introduction/start.mcfunction b/data/lt/functions/club/introduction/start.mcfunction index 132e66d1..053eb453 100644 --- a/data/lt/functions/club/introduction/start.mcfunction +++ b/data/lt/functions/club/introduction/start.mcfunction @@ -7,7 +7,7 @@ title @s subtitle [{"text":"Covert Club for Undercover Clubbers","color":"dark_g scoreboard players set @s club.joinClock 100 # Teleport player -tp @s 2358 106 2392 -90 20 +tp @s @e[tag=club.first_spawn,limit=1] # Give effects effect give @s blindness infinite 60 true \ No newline at end of file diff --git a/data/lt/functions/club/on_tick.mcfunction b/data/lt/functions/club/on_tick.mcfunction index 1c7004fc..5f6adf5a 100644 --- a/data/lt/functions/club/on_tick.mcfunction +++ b/data/lt/functions/club/on_tick.mcfunction @@ -1,7 +1,18 @@ # Gibnut Grotto +execute in tropicraft:tropics as @e[tag=club.gibnut] at @s if entity @p[distance=..8,gamemode=!spectator] run execute as @a[distance=..8,tag=!club.has_enough_disguises,tag=!club.speaking_with_gibnut,tag=!club.gibnut_rejected] at @s run function lt:club/gibnut/reject +execute in tropicraft:tropics as @e[tag=club.gibnut] at @s if entity @p[distance=..8,gamemode=!spectator] run execute as @a[distance=..8,tag=club.has_enough_disguises,tag=!club.speaking_with_gibnut,tag=!club.spoken_with_gibnut] at @s run function lt:club/gibnut/accept +execute as @a[tag=club.speaking_with_gibnut,tag=club.has_enough_disguises] at @s run function lt:club/gibnut/accept_on_tick +execute as @a[tag=club.speaking_with_gibnut,tag=!club.has_enough_disguises] at @s run function lt:club/gibnut/reject_on_tick # Disguise detection (abstracted out for efficiency :)) execute as @e[tag=club.disguise_tracker] at @s if entity @e[type=player,distance=..35] run function lt:club/disguise_tracker_tick +# Bouncer / Club system +execute in tropicraft:tropics as @e[tag=club.the_club] at @s if entity @p[distance=..45] run function lt:club/bouncer/on_tick + +# Exit detection +execute as @e[tag=club.internal_exit] at @s run tp @a[distance=..2.5,gamemode=!spectator,tag=club.joined] @e[tag=club.exit,sort=random,limit=1] + # Ensure players who leave disguise tracker entity range have their team reset -execute as @a[scores={club.disguiseWearTrack=1}] at @s unless entity @e[tag=club.disguise_tracker,distance=..35] run function lt:club/reset_team \ No newline at end of file +execute as @a[scores={club.disguiseWearTrack=1}] at @s unless entity @e[tag=club.disguise_tracker,distance=..35] unless entity @e[tag=club.the_club,distance=..48] run function lt:club/reset_team + diff --git a/data/lt/functions/main/tick_runner.mcfunction b/data/lt/functions/main/tick_runner.mcfunction index dbabedff..35c65ed4 100644 --- a/data/lt/functions/main/tick_runner.mcfunction +++ b/data/lt/functions/main/tick_runner.mcfunction @@ -49,10 +49,6 @@ execute if entity @e[tag=stage.shark] run function lt:stage/feature/sharks/main # Club Stuff execute in tropicraft:tropics if entity @a[tag=club.first_time_join] run function lt:club/introduction/on_tick execute in tropicraft:tropics run function lt:club/on_tick -execute in tropicraft:tropics as @e[tag=club.gibnut] at @s if entity @p[distance=..8] run execute as @a[distance=..8,tag=!club.has_enough_disguises,tag=!club.speaking_with_gibnut,tag=!club.gibnut_rejected] at @s run function lt:club/gibnut/reject -execute in tropicraft:tropics as @e[tag=club.gibnut] at @s if entity @p[distance=..8] run execute as @a[distance=..8,tag=club.has_enough_disguises,tag=!club.speaking_with_gibnut,tag=!club.spoken_with_gibnut] at @s run function lt:club/gibnut/accept -execute as @a[tag=club.speaking_with_gibnut,tag=club.has_enough_disguises] at @s run function lt:club/gibnut/accept_on_tick -execute as @a[tag=club.speaking_with_gibnut,tag=!club.has_enough_disguises] at @s run function lt:club/gibnut/reject_on_tick #Donation Effects function lt:effects/donation/large_coconut/tick \ No newline at end of file