Skip to content

Commit

Permalink
Update to Minecraft 1.20.4 (#170)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Nincodedo authored Apr 23, 2024
1 parent 60eaa7a commit adcb4c4
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 86 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-mc
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion datapacks/custom-compostables/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 15,
"pack_format": 26,
"description": "Custom Compostables v0.1.0 by Nincodedo"
}
}
41 changes: 4 additions & 37 deletions datapacks/ocw-stuff/data/nincodedo/loot_tables/ocw_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"values": [
"minecraft:tall_grass",
"minecraft:grass",
"minecraft:short_grass",
"minecraft:dead_bush",
"minecraft:fern",
"minecraft:large_fern"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions datapacks/ocw-stuff/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"pack": {
"pack_format": 15,
"pack_format": 26,
"description": "OCW Stuff"
},
"features": {
"enabled": [
"vanilla",
"bundle"
"bundle",
"trade_rebalance",
"update_1_21"
]
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 0 additions & 22 deletions datapacks/who-did-this/data/youdidthis/loot_tables/rng.json

This file was deleted.

2 changes: 1 addition & 1 deletion datapacks/who-did-this/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 15,
"pack_format": 26,
"description": "Who Did This?"
}
}
18 changes: 9 additions & 9 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions rhc/scripts/resetWorld.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit adcb4c4

Please sign in to comment.