Skip to content

Commit

Permalink
Wallstreet better GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Oct 7, 2023
1 parent 09b054b commit 44cb32e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
Binary file added minigames/data/jump/structures/jump_1.nbt
Binary file not shown.
Binary file added minigames/data/jump/structures/jump_2.nbt
Binary file not shown.
Binary file added minigames/data/jump/structures/jump_3.nbt
Binary file not shown.
Binary file not shown.
32 changes: 18 additions & 14 deletions minigames/data/wallstreet/functions/villager/gui/build.mcfunction
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Title -----------------------------------------------------------------------

# Pre-title
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.68 ^1.05 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"➖➖➖ Item ➖➖➖","color":"gray","bold":false,"italic":true}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.4f,0.4f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:0}
# execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.68 ^1.05 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"➖➖➖ Item ➖➖➖","color":"gray","bold":false,"italic":true}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.4f,0.4f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:0}
# Slot background
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.72 ^0.65 ^0.995 run summon text_display ~ ~ ~ {text:'[{"text":" "}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[3f,1.3f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:-934655414}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.72 ^0.75 ^0.995 run summon text_display ~ ~ ~ {text:'[{"text":" "}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[3f,1.3f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:-934655414}
# <- display
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-1.02 ^0.62 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.previous_resource"],background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-1.02 ^0.72 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.previous_resource"],background:0}
# Item
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.72 ^0.58 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.resource"],background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.72 ^0.68 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.resource"],background:0}
# -> display
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.38 ^0.62 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.next_resource"],background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.38 ^0.72 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.next_resource"],background:0}

# <- interaction
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-1.02 ^0.65 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.3f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.previous_resource"]}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-1.02 ^0.75 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.3f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.previous_resource"]}
# -> interaction
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.38 ^0.65 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.3f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.next_resource"]}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.38 ^0.75 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.3f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.next_resource"]}

# Villager info ---------------------------------------------------------------

# Pre-title
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.52 ^1.05 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"➖➖➖ Villager info ➖➖➖","color":"gray","bold":false,"italic":true}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.4f,0.4f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:0}
# execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.52 ^1.05 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"➖➖➖ Villager info ➖➖➖","color":"gray","bold":false,"italic":true}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.4f,0.4f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:0}
# Stock & Price labels
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.15 ^0.75 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"Stock: ","color":"white","bold":false,"italic":false},{"text":"\\nPrice: ","color":"white","bold":false,"italic":false}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],alignment:"left",background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.15 ^0.8 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"Stock: ","color":"white","bold":false,"italic":false},{"text":"\\nPrice: ","color":"white","bold":false,"italic":false}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],alignment:"left",background:0}
# Stock & Price values
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.75 ^0.75 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.villager_info"],alignment:"right",background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.75 ^0.8 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.villager_info"],alignment:"right",background:0}
# Buy / Sell display
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.5 ^0.5 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.trade_mode"],background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^ ^0.4 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.trade_mode"],background:0}

# Buy interaction
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.23 ^0.47 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.2f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.buy"]}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.27 ^0.37 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.2f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.buy"]}
# Sell interaction
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.75 ^0.47 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.2f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.sell"]}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^0.25 ^0.37 ^1 run summon interaction ~ ~ ~ {width:0.3f,height:0.2f,Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.interaction.sell"]}

# Quantity selection ----------------------------------------------------------

# Pre-title
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^ ^0.3 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"➖➖➖ Quantity selection ➖➖➖","color":"gray","bold":false,"italic":true}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.4f,0.4f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:0}
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^ ^0.27 ^1 run summon text_display ~ ~ ~ {text:'[{"text":"➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖","color":"dark_gray","bold":false,"italic":true}]',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.4f,0.4f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:0}
# Quantity
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.6 ^0.08 ^1 run summon text_display ~ ~ ~ {text:'{"text":"placeholder"}',transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,1f]},Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new","wallstreet.villager.gui.display.quantity_selection"],alignment:"center",background:0}
# Quantity
Expand Down Expand Up @@ -81,6 +81,10 @@ execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchor

# Background ------------------------------------------------------------------

# Header
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.25 ^0.63 ^0.97 run summon text_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[20f,2.3f,1f]},text:'{"text":" ","color":"yellow"}',Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:-16777216}

# Global
execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest] at @s anchored eyes positioned ^-0.25 ^-0.48 ^0.95 run summon text_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[20f,6.3f,1f]},text:'{"text":" ","color":"yellow"}',Tags:["wallstreet.villager.gui","wallstreet.villager.gui.new"],background:-1778384896}

execute as @e[tag=wallstreet.villager.talking,limit=1,sort=nearest,distance=..2] rotated as @s as @e[tag=wallstreet.villager.gui.new] positioned as @s run tp @s ~ ~ ~ ~ ~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ function wallstreet:villager/gui/refresh/mode
function wallstreet:villager/gui/refresh/quantity_selection
function wallstreet:villager/gui/refresh/transaction_value
function wallstreet:villager/gui/refresh/next_balance
function wallstreet:villager/gui/refresh/next_client
function wallstreet:villager/gui/refresh/confirm_or_leave

function wallstreet:villager/gui/refresh/next_client
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ execute as @p[tag=wallstreet.villager.client] if predicate wallstreet:villager/g
execute as @p[tag=wallstreet.villager.client] unless predicate wallstreet:villager/gui/hover/confirm run data modify entity @e[tag=wallstreet.villager.gui.display.confirm,sort=nearest,limit=1] text set value '[{"text":"✔","color":"green","bold":false,"italic":false}]'

# Leave
execute as @p[tag=wallstreet.villager.client] if predicate wallstreet:villager/gui/hover/leave run data modify entity @e[tag=wallstreet.villager.gui.display.leave,sort=nearest,limit=1] text set value '[{"text":"","color":"red","bold":true,"italic":false}]'
execute as @p[tag=wallstreet.villager.client] unless predicate wallstreet:villager/gui/hover/leave run data modify entity @e[tag=wallstreet.villager.gui.display.leave,sort=nearest,limit=1] text set value '[{"text":"","color":"red","bold":false,"italic":false}]'
execute as @p[tag=wallstreet.villager.client] if predicate wallstreet:villager/gui/hover/leave run data modify entity @e[tag=wallstreet.villager.gui.display.leave,sort=nearest,limit=1] text set value '[{"text":"","color":"red","bold":true,"italic":false}]'
execute as @p[tag=wallstreet.villager.client] unless predicate wallstreet:villager/gui/hover/leave run data modify entity @e[tag=wallstreet.villager.gui.display.leave,sort=nearest,limit=1] text set value '[{"text":"","color":"red","bold":false,"italic":false}]'

0 comments on commit 44cb32e

Please sign in to comment.