Skip to content

Commit

Permalink
Merge branch 'battle' into battle-1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DBTDerpbox committed Jun 3, 2024
2 parents a1184de + 49be734 commit 2bd82e0
Show file tree
Hide file tree
Showing 32 changed files with 453 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autoHash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto generate hash for dependency files
commit_message: Auto generate hash for dependency files
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

LEM is a set of open source remakes of the Mini Games from Legacy Console Edition.

![Minecraft Version](https://img.shields.io/badge/Minecraft-1.20.1-80ba42?style=for-the-badge) ![License](https://img.shields.io/github/license/DBTDerpbox/legacy-edition-battle?style=for-the-badge) ![Last Commit](https://img.shields.io/github/last-commit/dbtderpbox/legacy-edition-battle?style=for-the-badge)
![Minecraft Version](https://img.shields.io/badge/Minecraft-1.20.4-80ba42?style=for-the-badge) ![License](https://img.shields.io/github/license/DBTDerpbox/legacy-edition-battle?style=for-the-badge) ![Last Commit](https://img.shields.io/github/last-commit/dbtderpbox/legacy-edition-battle?style=for-the-badge)

[![forthebadge](https://github.com/BraveUX/for-the-badge/blob/master/src/images/badges/contains-tasty-spaghetti-code.svg)](https://forthebadge.com) ![Powered By Nostalgia](https://img.shields.io/badge/Powered_by-Nostalgia-e49454?style=for-the-badge)
[![forthebadge](https://forthebadge.com/images/badges/contains-tasty-spaghetti-code.svg)](https://forthebadge.com) ![Powered By Nostalgia](https://img.shields.io/badge/Powered_by-Nostalgia-e49454?style=for-the-badge)

The server is currently in a Closed Alpha. If you would like to see how to join please see [this page](https://www.legacyminigames.xyz/join)

Expand Down
Binary file removed world/data/scoreboardsuffix.dat
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function lem.base:ui/playerbar/load
##Set lives
scoreboard players operation @s lem.lives = #Store lem.lives

##Give small inventory items
execute if score #Store lem.smallinv matches 1 run function lem.base:game/inventory/small/fill/run

##Display message
function lem.base:relog/messages/generic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ schedule clear lem.base:game/loading/mapload/timer
##Mark users that dont need to reload as loaded
tag @a[tag=ingame,tag=!loadingresources] add resourceloaded

##Start resource loader check
function lem.base:game/loading/resource/run

##Start loading animation in tablist
#Reset loading animation
scoreboard players set #Store lem.packtimerani 1
#Start
function lem.base:game/loading/resource/tablist/run

##Start resource loader check
function lem.base:game/loading/resource/run
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ scoreboard objectives add lem.gameicon dummy
gamerule doDaylightCycle false
time set noon

##Set admin settings variables
execute unless score #Store lem.recon matches 0.. run scoreboard players set #Store lem.recon 0

##Disable worldborder warning
worldborder warning distance 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ execute unless score #Store lem.plist matches 2.. run function lem.base:lobby/di

##Timer
execute if score #Store lem.plist matches 2.. run function lem.base:lobby/display/globalinfo/timer

##Frozen
execute if score #Store lem.lobbytimerset matches -1 run function lem.base:lobby/display/globalinfo/frozen
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
##Set GlobalInfo
#P1
bossbar set minecraft:globalinfo1 name {"translate":"lem.lobby.start.frozen"}
#P2
bossbar set minecraft:globalinfo2 name {"translate":"lem.lobby.start.frozen"}
#P3
bossbar set minecraft:globalinfo3 name {"translate":"lem.lobby.start.frozen"}
#P4
bossbar set minecraft:globalinfo4 name {"translate":"lem.lobby.start.frozen"}
#P5
bossbar set minecraft:globalinfo5 name {"translate":"lem.lobby.start.frozen"}
#P6
bossbar set minecraft:globalinfo6 name {"translate":"lem.lobby.start.frozen"}
#P7
bossbar set minecraft:globalinfo7 name {"translate":"lem.lobby.start.frozen"}
#P8
bossbar set minecraft:globalinfo8 name {"translate":"lem.lobby.start.frozen"}
#P9
bossbar set minecraft:globalinfo9 name {"translate":"lem.lobby.start.frozen"}
#P10
bossbar set minecraft:globalinfo10 name {"translate":"lem.lobby.start.frozen"}
#P11
bossbar set minecraft:globalinfo11 name {"translate":"lem.lobby.start.frozen"}
#P12
bossbar set minecraft:globalinfo12 name {"translate":"lem.lobby.start.frozen"}
#P13
bossbar set minecraft:globalinfo13 name {"translate":"lem.lobby.start.frozen"}
#P14
bossbar set minecraft:globalinfo14 name {"translate":"lem.lobby.start.frozen"}
#P15
bossbar set minecraft:globalinfo15 name {"translate":"lem.lobby.start.frozen"}
#P16
bossbar set minecraft:globalinfo16 name {"translate":"lem.lobby.start.frozen"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##Start timer if enough players are online
execute if score #Store lem.plist matches 2.. run function lem.base:lobby/timer/run/start
execute if score #Store lem.plist matches 2.. unless score #Store lem.lobbytimerset matches -1 run function lem.base:lobby/timer/run/start

##Give effects
function lem.base:lobby/timer/effects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ schedule clear lem.base:lobby/timer/check
##Stop timer if there are not enough players
execute unless score #Store lem.plist matches 2.. run function lem.base:lobby/timer/stop

##Stop if timer is disabled
execute if score #Store lem.lobbytimerset matches -1 run function lem.base:lobby/timer/stop

##Count down if there are enough players
execute if score #Store lem.plist matches 2.. run function lem.base:lobby/timer/run/count
execute if score #Store lem.plist matches 2.. unless score #Store lem.lobbytimerset matches -1 run function lem.base:lobby/timer/run/count

##Give effects
function lem.base:lobby/timer/effects
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function lem.base:ui/playerbar/load
#Add tag
tag @s add transferhostmsg
#Transfer
discordChatMSG {"translate":"lem.menu.host.transfer.success","with":[{"selector":"@a[tag=ingame,tag=host]","color":"dark_aqua"},{"selector":"@a[tag=transferhostmsg]","color":"dark_aqua"}],"color":"blue"}
execute unless entity @s[tag=silentTransfer] run discordChatMSG {"translate":"lem.menu.host.transfer.success","with":[{"selector":"@a[tag=ingame,tag=host]","color":"dark_aqua"},{"selector":"@a[tag=transferhostmsg]","color":"dark_aqua"}],"color":"blue"}
#Recieve
tellraw @s {"translate":"lem.menu.host.transfer.receive","italic":true,"color":"dark_aqua"}
execute unless entity @s[tag=silentTransfer] run tellraw @s {"translate":"lem.menu.host.transfer.receive","italic":true,"color":"dark_aqua"}
#Remove tag
tag @s remove transferhostmsg

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##Stop game
scoreboard players set #Store lem.gametimer 0

##Open menu
function lem.base:menu/load/host/admin/open/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##Open menu
function lem.base:menu/load/host/admin/open/main

##Display message if gamestatus is not lobby
execute unless score #Store lem.gamestatus matches 2 run tellraw @s {"text":"It is extremely unsafe to do this outside of the lobby! If you must, enable debug mode first.","color":"red"}

##Start game if gamestatus is Lobby
execute if score #Store lem.gamestatus matches 2 run function lem.base:mapdecider/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##Add score
scoreboard players add #Store lem.lobbytimerset 1

##Update timer
scoreboard players operation #Store lem.timer = #Store lem.lobbytimerset

##Open menu
function lem.base:menu/load/host/admin/open/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##Remove score
scoreboard players remove #Store lem.lobbytimerset 1

##Update timer
scoreboard players operation #Store lem.timer = #Store lem.lobbytimerset

##Open menu
function lem.base:menu/load/host/admin/open/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##Disable timer
scoreboard players set #Store lem.lobbytimerset -1

##Update display
execute if score #Store lem.gamestatus matches 2 run function lem.base:lobby/display/run

##Open menu
function lem.base:menu/load/host/admin/open/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##Enable timer
scoreboard players set #Store lem.lobbytimerset 60

##Update display
execute if score #Store lem.gamestatus matches 2 run function lem.base:lobby/display/run

##Open menu
function lem.base:menu/load/host/admin/open/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
##Summon the puppet master.
execute at @e[tag=ingame] run summon salmon ~ ~ ~ {CustomNameVisible:1b,Health:80f,Passengers:[{id:"minecraft:evoker",Glowing:1b,CustomNameVisible:1b,Health:100f,SpellTicks:80,CustomName:'{"text":"The Fish Flesh Puppet"}',HandItems:[{id:"minecraft:salmon_bucket",Count:1b,tag:{CanPlaceOn:["#lem.base:all_blocks"],EntityTag:{CustomNameVisible:1b,CustomName:'{"text":"The Puppet Master\'s slightly weaker brother"}'}}},{id:"minecraft:salmon_spawn_egg",Count:1b,tag:{CanPlaceOn:["#lem.base:all_blocks"]}}],HandDropChances:[1.000F,1.000F],ArmorItems:[{},{},{},{id:salmon,Count:1}],ArmorDropChances:[0.000F,0.000F,0.000F,1.000F],active_effects:[{id:"minecraft:jump_boost",amplifier:2b,duration:-1,show_particles:0b},{id:"minecraft:glowing",amplifier:1b,duration:-1,show_particles:0b}],Attributes:[{Name:generic.max_health,Base:100},{Name:generic.follow_range,Base:128}]}],CustomName:'{"text":"The Puppet Master"}',HandItems:[{id:"minecraft:salmon_bucket",Count:1b,tag:{CanPlaceOn:["#lem.base:all_blocks"],EntityTag:{CustomNameVisible:1b,Health:80f,CustomName:'{"text":"The Puppet Master"}',active_effects:[{id:"minecraft:jump_boost",amplifier:3b,duration:-1,show_particles:0b},{id:"minecraft:glowing",amplifier:1b,duration:-1,show_particles:0b},{id:"minecraft:slow_falling",amplifier:1b,duration:-1,show_particles:0b}],Attributes:[{Name:generic.max_health,Base:80}]}}},{id:golden_apple,Count:1}],HandDropChances:[1.000F,1.000F],ArmorItems:[{id:iron_boots,Count:1},{id:iron_leggings,Count:1},{id:iron_chestplate,Count:1},{id:iron_helmet,Count:1}],ArmorDropChances:[1.000F,1.000F,1.000F,1.000F],active_effects:[{id:"minecraft:jump_boost",amplifier:3b,duration:-1,show_particles:0b},{id:"minecraft:glowing",amplifier:1b,duration:-1,show_particles:0b},{id:"minecraft:slow_falling",amplifier:1b,duration:-1,show_particles:0b}],Attributes:[{Name:generic.max_health,Base:80}]}

##Warn everyone
tellraw @a[tag=ingame] {"text":"The Puppet Master has been awoken!","color":"dark_purple"}
discordMSG "The Puppet Master has been awoken!"
execute as @a[tag=ingame] at @s run playsound entity.wither.spawn hostile @s ~ ~ ~

##Add this event to player savedata
userconfig @a[tag=ingame] set lem.base:lore_puppet true
userconfig @a[tag=ingame] sync
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##Header
tellraw @s {"text":"- Lore -","color":"blue"}

##Puppet Master
tellraw @s {"text":"[Puppet Master]","color":"blue","clickEvent":{"action":"run_command","value":"/function lem.base:menu/load/host/admin/lore/puppet"},"hoverEvent":{"action":"show_text","contents":[{"text":"Summon the Puppet Master.","color":"dark_aqua"}]}}

##Run functions for addons
function #lem.base:menu/load/host/admin/open/lore

##Go back button
tellraw @s {"text":"[Go Back]","color":"gray","clickEvent":{"action":"run_command","value":"/function lem.base:menu/load/host/admin/open/main"},"hoverEvent":{"action":"show_text","contents":[{"text":"Click to go back to the normal configuration page","color":"dark_aqua"}]}}

##Reset gamecfg score
scoreboard players reset @s lem.gamecfg
Loading

0 comments on commit 2bd82e0

Please sign in to comment.