From adcb4c484d3e882fbc27f1f6fa6f41cef7ab239f Mon Sep 17 00:00:00 2001 From: Nincodedo Date: Tue, 23 Apr 2024 18:25:34 -0500 Subject: [PATCH] Update to Minecraft 1.20.4 (#170) * Update pack format to 16 * Replace rng calls with `random` command * Updates to Minecraft 1.20.2 * Datapack updates for 1.20.3 * Update to Minecraft 1.20.4 * Fix server MOTD * Update mods Inventory Sorting hasn't been updated to 1.20.4 yet * Add Inventory Sorting mod it is now updated :D * Update resource pack * Remove cool colors from sheep farm map Might be a bug in 1.20.4? Not sure, but it don't work anymore. Closes #169 * Update to latest Bedrock Bonemeal --- Dockerfile-mc | 4 +- datapacks/custom-compostables/pack.mcmeta | 2 +- .../data/nincodedo/loot_tables/ocw_map.json | 41 ++----------------- .../data/nincodedo/tags/blocks/any_grass.json | 2 +- .../blocks/cannot_place_torch_on_side_of.json | 2 +- .../blocks/cannot_place_torch_on_top_of.json | 2 +- datapacks/ocw-stuff/pack.mcmeta | 6 ++- .../functions/random_text.mcfunction | 10 ++--- .../data/youdidthis/loot_tables/rng.json | 22 ---------- datapacks/who-did-this/pack.mcmeta | 2 +- docker-compose.yaml | 18 ++++---- rhc/scripts/resetWorld.sh | 8 ++-- 12 files changed, 33 insertions(+), 86 deletions(-) delete mode 100644 datapacks/who-did-this/data/youdidthis/loot_tables/rng.json diff --git a/Dockerfile-mc b/Dockerfile-mc index 73af4109..2296ab49 100644 --- a/Dockerfile-mc +++ b/Dockerfile-mc @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 FROM debian:stable-slim AS build -ARG bedrock_bone_meal_version=1.2.0+1.20 +ARG bedrock_bone_meal_version=1.2.1+1.20 RUN apt-get update \ && apt-get install zip wget ca-certificates -y --no-install-recommends \ @@ -23,7 +23,7 @@ RUN wget -O /datapacks/bedrock-bone-meal.zip https://github.com/Nincodedo/mc-jav FROM itzg/minecraft-server:2024.4.1 -ENV MODRINTH_PROJECTS=fabric-api,cloth-config,lithium,ferrite-core,starlight,fastback,chunky,no-chat-reports,disableinsecurechattoast,inventory-sorting,jamlib,rightclickharvest,jade,rei,memoryleakfix,mc-server-description +ENV MODRINTH_PROJECTS=fabric-api,cloth-config,lithium,ferrite-core,starlight,fastback,chunky,no-chat-reports,disableinsecurechattoast,inventory-sorting,jamlib,architectury-api,rightclickharvest,jade,rei,memoryleakfix,mc-server-description ENV DATAPACKS=/datapacks/ocw-stuff.zip,/datapacks/who-did-this.zip,/datapacks/bedrock-bone-meal.zip,/datapacks/custom-compostables.zip RUN mkdir -p /datapacks diff --git a/datapacks/custom-compostables/pack.mcmeta b/datapacks/custom-compostables/pack.mcmeta index 9a28e194..61bb8ec3 100644 --- a/datapacks/custom-compostables/pack.mcmeta +++ b/datapacks/custom-compostables/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 15, + "pack_format": 26, "description": "Custom Compostables v0.1.0 by Nincodedo" } } diff --git a/datapacks/ocw-stuff/data/nincodedo/loot_tables/ocw_map.json b/datapacks/ocw-stuff/data/nincodedo/loot_tables/ocw_map.json index 72a5b0d8..1834d293 100644 --- a/datapacks/ocw-stuff/data/nincodedo/loot_tables/ocw_map.json +++ b/datapacks/ocw-stuff/data/nincodedo/loot_tables/ocw_map.json @@ -137,43 +137,10 @@ { "function": "minecraft:set_name", "entity": "this", - "name": [ - { - "text": "Anci", - "color": "red", - "italic": false, - "extra": [ - { - "text": "ent ", - "color": "orange", - "extra": [ - { - "text": "OCW ", - "color": "yellow", - "extra": [ - { - "text": "Stru", - "color": "green", - "extra": [ - { - "text": "ctur", - "color": "blue", - "extra": [ - { - "text": "e Map", - "color": "purple" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] + "name": { + "text": "Ancient OCW Structure Map", + "italic": false + } } ] }, diff --git a/datapacks/ocw-stuff/data/nincodedo/tags/blocks/any_grass.json b/datapacks/ocw-stuff/data/nincodedo/tags/blocks/any_grass.json index cd38a5d4..55abc3b6 100644 --- a/datapacks/ocw-stuff/data/nincodedo/tags/blocks/any_grass.json +++ b/datapacks/ocw-stuff/data/nincodedo/tags/blocks/any_grass.json @@ -1,7 +1,7 @@ { "values": [ "minecraft:tall_grass", - "minecraft:grass", + "minecraft:short_grass", "minecraft:dead_bush", "minecraft:fern", "minecraft:large_fern" diff --git a/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_side_of.json b/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_side_of.json index 1441500f..55938165 100644 --- a/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_side_of.json +++ b/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_side_of.json @@ -3,7 +3,7 @@ "minecraft:air", "minecraft:cave_air", "minecraft:void_air", - "minecraft:grass", + "minecraft:short_grass", "minecraft:tall_grass", "minecraft:dead_bush", "minecraft:fern", diff --git a/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_top_of.json b/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_top_of.json index 49a33965..8c1c0f1c 100644 --- a/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_top_of.json +++ b/datapacks/ocw-stuff/data/nincodedo/tags/blocks/cannot_place_torch_on_top_of.json @@ -3,7 +3,7 @@ "minecraft:air", "minecraft:cave_air", "minecraft:void_air", - "minecraft:grass", + "minecraft:short_grass", "minecraft:tall_grass", "minecraft:dead_bush", "minecraft:fern", diff --git a/datapacks/ocw-stuff/pack.mcmeta b/datapacks/ocw-stuff/pack.mcmeta index 622482fd..cc2814d2 100644 --- a/datapacks/ocw-stuff/pack.mcmeta +++ b/datapacks/ocw-stuff/pack.mcmeta @@ -1,12 +1,14 @@ { "pack": { - "pack_format": 15, + "pack_format": 26, "description": "OCW Stuff" }, "features": { "enabled": [ "vanilla", - "bundle" + "bundle", + "trade_rebalance", + "update_1_21" ] } } diff --git a/datapacks/who-did-this/data/youdidthis/functions/random_text.mcfunction b/datapacks/who-did-this/data/youdidthis/functions/random_text.mcfunction index 4209f6b5..bf61948c 100644 --- a/datapacks/who-did-this/data/youdidthis/functions/random_text.mcfunction +++ b/datapacks/who-did-this/data/youdidthis/functions/random_text.mcfunction @@ -1,10 +1,10 @@ -execute store result score text_rng rhcdata run loot spawn ~ ~ ~ loot youdidthis:rng +execute store result score text_rng rhcdata run random value 1..4 execute if score text_rng_prev rhcdata = text_rng rhcdata run scoreboard players add text_rng rhcdata 1 execute if score text_rng rhcdata matches 5.. run scoreboard players set text_rng rhcdata 1 -execute if score text_rng rhcdata matches 1 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"how could you","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "tl_text"],interpolation_duration:20} -execute if score text_rng rhcdata matches 2 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"wow","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "tr_text"],interpolation_duration:20} -execute if score text_rng rhcdata matches 3 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"nice one","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "br_text"],interpolation_duration:20} -execute if score text_rng rhcdata matches 4 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"wau","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "bl_text"],interpolation_duration:0} +execute if score text_rng rhcdata matches 1 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"how could you","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "tl_text"],interpolation_duration:20,teleport_duration:1} +execute if score text_rng rhcdata matches 2 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"wow","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "tr_text"],interpolation_duration:20,teleport_duration:1} +execute if score text_rng rhcdata matches 3 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"nice one","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "br_text"],interpolation_duration:20,teleport_duration:1} +execute if score text_rng rhcdata matches 4 anchored eyes run summon text_display ^-2 ^ ^ {width:0.5f,billboard:"center",line_width:50,text:'{"text":"wau","color":"red"}',background:16777215,shadow:1b,Tags:["youdidthistext", "bl_text"],interpolation_duration:0,teleport_duration:1} execute if score text_rng rhcdata matches 4 run data merge entity @e[tag=bl_text,sort=nearest,limit=1] {transformation:{right_rotation:[0f,0f,-0.25f,1f]},start_interpolation:-1} execute if score text_rng rhcdata matches 4 run data merge entity @e[tag=bl_text,sort=nearest,limit=1] {interpolation_duration:20} playsound minecraft:entity.wither.hurt master @s ~ ~ ~ .75 .2 diff --git a/datapacks/who-did-this/data/youdidthis/loot_tables/rng.json b/datapacks/who-did-this/data/youdidthis/loot_tables/rng.json deleted file mode 100644 index fbea924d..00000000 --- a/datapacks/who-did-this/data/youdidthis/loot_tables/rng.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "pools": [ - { - "rolls": { - "min": 1, - "max": 4 - }, - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stone", - "functions": [ - { - "function": "minecraft:set_count", - "count": 0 - } - ] - } - ] - } - ] -} diff --git a/datapacks/who-did-this/pack.mcmeta b/datapacks/who-did-this/pack.mcmeta index b36ee819..e752385d 100644 --- a/datapacks/who-did-this/pack.mcmeta +++ b/datapacks/who-did-this/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 15, + "pack_format": 26, "description": "Who Did This?" } } diff --git a/docker-compose.yaml b/docker-compose.yaml index eb7c4829..74f1d3f9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,7 +5,7 @@ services: build: context: . dockerfile: Dockerfile-mc - image: ghcr.io/nincodedo/rhc-ocw-mc:6.4.0 + image: ghcr.io/nincodedo/rhc-ocw-mc:6.5.0 env_file: - motd_override.env - docker.env @@ -15,7 +15,7 @@ services: OVERRIDE_SERVER_PROPERTIES: 'true' ICON: 'https://cdn.discordapp.com/icons/109466144993210368/a_63bcc148bca7700101d1fb6b9522d638.png' RESOURCE_PACK: 'https://ocw-rhc.services.nincodedo.dev/v1/resource-pack' - RESOURCE_PACK_SHA1: 'a80e03c5c4a85ad89734389be56149f9f969f437' + RESOURCE_PACK_SHA1: '1a6115175498b822e63f97a667276b97fad8d4aa' WHITELIST_FILE: 'https://pub-45c3705f3f054e47a324249ec3c7e698.r2.dev/whitelist.json' MEMORY: '3G' BROADCAST_RCON_TO_OPS: 'false' @@ -28,8 +28,8 @@ services: AUTOPAUSE_TIMEOUT_INIT: '120' TYPE: 'FABRIC' REMOVE_OLD_MODS: 'true' - VERSION: '1.20.1' - INITIAL_ENABLED_PACKS: 'bundle' + VERSION: '1.20.4' + INITIAL_ENABLED_PACKS: 'bundle,trade_rebalance,update_1_21' RCON_CMDS_STARTUP: |- gamerule doDaylightCycle false chunky radius 3000 @@ -51,7 +51,7 @@ services: dev.nincodedo.gameservercommander.game: "Minecraft" dev.nincodedo.gameservercommander.group: "MC-RHC" dev.nincodedo.gameservercommander.name: "OCW Minecraft RHC" - dev.nincodedo.gameservercommander.description: "OCW Radical Hardcore 6.4.0 - Minecraft 1.20.1" + dev.nincodedo.gameservercommander.description: "OCW Radical Hardcore 6.5.0 - Minecraft 1.20.4" dev.nincodedo.gameservercommander.connection_info: "games.nincodedo.dev" com.centurylinklabs.watchtower.enable: false log-watcher: @@ -60,7 +60,7 @@ services: dockerfile: Dockerfile-log-watcher labels: - "com.centurylinklabs.watchtower.enable=false" - image: ghcr.io/nincodedo/rhc-ocw:6.4.0 + image: ghcr.io/nincodedo/rhc-ocw:6.5.0 container_name: log-watcher env_file: - docker.env @@ -89,7 +89,7 @@ services: HARDCORE: 'true' OVERRIDE_SERVER_PROPERTIES: 'true' ICON: 'https://cdn.discordapp.com/icons/109466144993210368/a_63bcc148bca7700101d1fb6b9522d638.png' - RESOURCE_PACK_SHA1: 'a80e03c5c4a85ad89734389be56149f9f969f437' + RESOURCE_PACK_SHA1: '1a6115175498b822e63f97a667276b97fad8d4aa' WHITELIST_FILE: 'https://pub-45c3705f3f054e47a324249ec3c7e698.r2.dev/whitelist.json' MEMORY: '2G' BROADCAST_RCON_TO_OPS: 'false' @@ -102,8 +102,8 @@ services: AUTOPAUSE_TIMEOUT_INIT: '120' TYPE: 'FABRIC' REMOVE_OLD_MODS: 'true' - VERSION: '1.20.1' - INITIAL_ENABLED_PACKS: 'bundle' + VERSION: '1.20.4' + INITIAL_ENABLED_PACKS: 'bundle,trade_rebalance,update_1_21' RESOURCE_PACK: 'https://ocw-rhc.services.nincodedo.dev/v1/resource-pack?type=beta' RCON_CMDS_STARTUP: |- gamerule doDaylightCycle false diff --git a/rhc/scripts/resetWorld.sh b/rhc/scripts/resetWorld.sh index cc6e00f8..0343a905 100644 --- a/rhc/scripts/resetWorld.sh +++ b/rhc/scripts/resetWorld.sh @@ -96,9 +96,9 @@ while :; do previous_attempt=$attempt_number attempt_number=$((++attempt_number)) log "Starting up for attempt $attempt_number" - echo "MOTD=$SERVER_NAME - Attempt \#$attempt_number" >$minecraft_compose_dir/motd_override.env + echo "MOTD='$SERVER_NAME - Attempt #$attempt_number'" >$minecraft_compose_dir/motd_override.env printf "\n" >>$minecraft_compose_dir/motd_override.env - echo "CFG_MOTD=$SERVER_NAME - Attempt \#$attempt_number" >>$minecraft_compose_dir/motd_override.env + echo "CFG_MOTD='$SERVER_NAME - Attempt #$attempt_number'" >>$minecraft_compose_dir/motd_override.env chown -R 1000:1000 world/ log "Checking for healthy container status" docker ps -f name=$minecraft_docker_container_name | grep healthy >/dev/null @@ -149,9 +149,9 @@ while :; do death_reset=true previous_attempt=$attempt_number attempt_number=$((++attempt_number)) - echo "MOTD=$SERVER_NAME - Attempt \#$attempt_number" >$minecraft_compose_dir/motd_override.env + echo "MOTD='$SERVER_NAME - Attempt #$attempt_number'" >$minecraft_compose_dir/motd_override.env printf "\n" >>$minecraft_compose_dir/motd_override.env - echo "CFG_MOTD=$SERVER_NAME - Attempt \#$attempt_number" >>$minecraft_compose_dir/motd_override.env + echo "CFG_MOTD='$SERVER_NAME - Attempt #$attempt_number'" >>$minecraft_compose_dir/motd_override.env sleep 20 rcon_command "kick @a Better luck next time..." docker stop $minecraft_docker_container_name