Skip to content

Commit

Permalink
Add MLG challenge and experimental toggle command
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraculixxT committed May 19, 2024
1 parent 4b3f965 commit cd048f8
Show file tree
Hide file tree
Showing 17 changed files with 634 additions and 30 deletions.
13 changes: 12 additions & 1 deletion .github/assets/README-Modrinth.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ All challenges can be combined and played in multiplayer or singleplayer (some r
You have an idea for a new Challenge?
We would be happy to hear it in our [discord](https://dc.mutils.net)!

**▪ Current Challenge count**``66``
**▪ Current Challenge count**``67``

<!-- modrinth_exclude.start -->
> **Important**<br>
Expand Down Expand Up @@ -276,6 +276,17 @@ The world gone crazy and every few seconds the gravity switches between 4 new gr

🏷️ **Tags**
- `Medium` - Slightly more difficult than normal Minecraft but still very doable
</details><details><summary><b>Death Hunt</b> ▪ <img src='https://mutils.net/images/mc/grab/items/totem_of_undying.png' width='18'></summary>
Die to all given deaths in a specific order to finish! Use /deathhunt to modify

---

⚙️ **Settings**
- `No settings`

🏷️ **Tags**
- `Fun` - Easy Challenge with fun in focus
- `Force` - You receive a task and are forced to finish it to proceed<br>*Currently requires full access*
</details><details><summary><b>Rhythm Craft</b> ▪ <img src='https://mutils.net/images/mc/grab/rendered/note_block.png' width='18'></summary>
Turn Minecraft into a full Rhythmgame! Every action needs to be done on the beat to follow the world rhythm.

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ All challenges can be combined and played in multiplayer or singleplayer (some r
You have an idea for a new Challenge?
We would be happy to hear it in our [discord](https://dc.mutils.net)!

**▪ Current Challenge count**``66``
**▪ Current Challenge count**``67``

<!-- modrinth_exclude.start -->
> **Important**<br>
Expand Down Expand Up @@ -269,6 +269,17 @@ The world gone crazy and every few seconds the gravity switches between 4 new gr

🏷️ **Tags**
- `Medium` - Slightly more difficult than normal Minecraft but still very doable
</details><details><summary><b>Death Hunt</b> ▪ <img src='https://mutils.net/images/mc/grab/items/totem_of_undying.png' width='18'></summary>
Die to all given deaths in a specific order to finish! Use /deathhunt to modify

---

⚙️ **Settings**
- `No settings`

🏷️ **Tags**
- `Fun` - Easy Challenge with fun in focus
- `Force` - You receive a task and are forced to finish it to proceed<br>*Currently requires full access*
</details><details><summary><b>Rhythm Craft</b> ▪ <img src='https://mutils.net/images/mc/grab/rendered/note_block.png' width='18'></summary>
Turn Minecraft into a full Rhythmgame! Every action needs to be done on the beat to follow the world rhythm.

Expand Down
32 changes: 19 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.yaml.snakeyaml.Yaml
plugins {
kotlin("jvm") version "1.9.23"
kotlin("plugin.serialization") version "1.9.23"
id("io.papermc.paperweight.userdev") version "1.7.0"
id("io.papermc.paperweight.userdev") version "1.7.1"
id("xyz.jpenilla.run-paper") version "2.3.0"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("com.modrinth.minotaur") version "2.+"
Expand All @@ -27,6 +27,8 @@ val projectName = properties["name"] as String
repositories {
mavenLocal()
mavenCentral()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://dl.cloudsmith.io/public/matyrobbrt/javanbt/maven/")
}

paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
Expand All @@ -36,14 +38,15 @@ dependencies {

// Kotlin libraries
library(kotlin("stdlib"))
library("org.jetbrains.kotlinx:kotlinx-serialization-json:1.+")
library("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.+")
library("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.+")
library("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.+")

// MC Libraries
implementation("de.miraculixx:mc-commons:1.0.1")
implementation("de.miraculixx:kpaper-light:1.2.1")
library("dev.jorel:commandapi-bukkit-shade-mojang-mapped:9.4.0")
library("dev.jorel:commandapi-bukkit-kotlin:9.4.0")
implementation("dev.jorel:commandapi-bukkit-shade-mojang-mapped:9.5.0-SNAPSHOT")
implementation("dev.jorel:commandapi-bukkit-kotlin:9.5.0-SNAPSHOT")
implementation("io.github.matyrobbrt:javanbt:0.0.3")

// Internal APIs
implementation("de.miraculixx:mbridge:1.0.0")
Expand All @@ -68,9 +71,10 @@ tasks {
shadowJar {
dependencies {
include {
it.moduleGroup == "de.miraculixx"
it.moduleGroup == "de.miraculixx" || it.moduleGroup == "dev.jorel"
}
}
relocate("dev.jorel.commandapi", "de.miraculixx.mchallenge.commandapi")
}
}

Expand Down Expand Up @@ -99,25 +103,27 @@ bukkit {

modrinth {
token.set(properties["modrinthToken"] as String)
projectId.set(properties["modrinthProjectId"] as? String ?: projectName)
projectId.set(properties["modrinthProjectId"] as? String ?: properties["name"] as String)
versionNumber.set(version as String)
versionType.set("release") // Can also be `beta` or `alpha`
versionName.set("MChallenge - $version")
versionType.set(properties["publishState"] as String)

uploadFile.set(tasks.jar)
versionName = "MChallenge - ${properties["version"]}"
outlet.mcVersionRange = properties["supportedVersions"] as String
outlet.allowedReleaseTypes = setOf(ReleaseType.RELEASE)
gameVersions.addAll(outlet.mcVersions())
loaders.addAll(buildList {
add("paper")
add("purpur")
if (foliaSupport) add("folia")
})
dependencies {
optional.project("timer")
optional.project("mweb")
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
// The type can either be `project` or `version`
required.project("mweb")
}

// Project sync
changelog = "- Fix error caused by latest Paper API changes regarding brigadier commands"

syncBodyFrom = rootProject.file(".github/assets/README-Modrinth.md").readText()
}

Expand Down
13 changes: 11 additions & 2 deletions data/challenges.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
[
{
"key": "MLG",
"version": 118,
"item": "water_bucket",
"tags": [
"HARD"
],
"new": true
},
{
"key": "DEATH_HUNT",
"version": 105,
"block": "totem_of_undying",
"version": 116,
"item": "totem_of_undying",
"tags": [
"FUN",
"FORCE"
Expand Down
156 changes: 156 additions & 0 deletions data/data/flatworld-data.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
"": {
Data: {
WanderingTraderSpawnChance: 0
BorderCenterZ: 0.0
Difficulty: 1B
BorderSizeLerpTime: 0L
raining: 0B
Time: 0L
GameType: 0
BorderCenterX: 0.0
BorderWarningBlocks: 5.0
BorderDamagePerBlock: 0.2
WorldGenSettings: {
bonus_chest: 0B
seed: -8199817837703319721L
generate_features: 0B
dimensions: {
"minecraft:overworld": {
generator: {
settings: {
features: 0B
biome: "minecraft:the_void"
layers: [
{
block: "minecraft:bedrock"
height: 1
},
{
block: "minecraft:%BLOCK%"
height: 1
},
]
lakes: 0B
}
type: "minecraft:flat"
}
type: "minecraft:overworld"
}
"minecraft:the_nether": {
generator: {
settings: "minecraft:nether"
biome_source: {
preset: "minecraft:nether"
type: "minecraft:multi_noise"
}
type: "minecraft:noise"
}
type: "minecraft:the_nether"
}
"minecraft:the_end": {
generator: {
settings: "minecraft:end"
biome_source: {
type: "minecraft:the_end"
}
type: "minecraft:noise"
}
type: "minecraft:the_end"
}
}
}
DragonFight: {
NeedsStateScanning: 1B
DragonKilled: 0B
PreviouslyKilled: 0B
}
BorderSizeLerpTarget: 59999968.0
Version: {
Series: main
Snapshot: 0B
Id: 3839
Name: "%VERSION%"
}
DayTime: 0L
initialized: 1B
WasModded: 1B
allowCommands: 0B
WanderingTraderSpawnDelay: 0
CustomBossEvents: {}
GameRules: {
globalSoundEvents: "true"
tntExplosionDropDecay: "false"
enderPearlsVanishOnDeath: "true"
doFireTick: "false"
maxCommandChainLength: "65536"
doVinesSpread: "true"
lavaSourceConversion: "false"
disableElytraMovementCheck: "false"
forgiveDeadPlayers: "true"
commandBlockOutput: "true"
playersNetherPortalCreativeDelay: "1"
maxEntityCramming: "24"
doMobSpawning: "false"
universalAnger: "false"
playersSleepingPercentage: "100"
snowAccumulationHeight: "1"
doImmediateRespawn: "false"
blockExplosionDropDecay: "true"
naturalRegeneration: "true"
doMobLoot: "true"
fallDamage: "true"
doEntityDrops: "true"
randomTickSpeed: "0"
playersNetherPortalDefaultDelay: "80"
spawnRadius: "10"
freezeDamage: "true"
sendCommandFeedback: "true"
doWardenSpawning: "true"
fireDamage: "true"
reducedDebugInfo: "false"
waterSourceConversion: "true"
projectilesCanBreakBlocks: "true"
announceAdvancements: "true"
drowningDamage: "true"
spawnChunkRadius: "2"
disableRaids: "false"
doWeatherCycle: "true"
mobExplosionDropDecay: "true"
doDaylightCycle: "true"
showDeathMessages: "true"
doTileDrops: "true"
doInsomnia: "true"
keepInventory: "false"
doLimitedCrafting: "false"
mobGriefing: "true"
doTraderSpawning: "true"
commandModificationBlockLimit: "32768"
logAdminCommands: "true"
spectatorsGenerateChunks: "true"
doPatrolSpawning: "true"
maxCommandForkCount: "65536"
}
thunderTime: 17243
SpawnY: -62
rainTime: 23770
hardcore: 0B
SpawnZ: 0
DifficultyLocked: 0B
SpawnX: 0
clearWeatherTime: 0
thundering: 0B
SpawnAngle: 0.0F
version: 19133
BorderSafeZone: 5.0
LastPlayed: 1716035560012L
BorderWarningTime: 15.0
ScheduledEvents: []
LevelName: "%NAME%"
BorderSize: 59999968.0
DataVersion: 3839
DataPacks: {
Enabled: [ vanilla, file/bukkit, paper, update_1_21 ]
Disabled: [ bundle, trade_rebalance, ]
}
}
}
24 changes: 24 additions & 0 deletions data/language/mchallenge/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ event:
noDoubleKill: "<red><input-1> killed the same mob twice in a row!"
hitOrder: "<red><input-1> was not allowed do damage a mob"
crushedAnvils: "<red><input-1> was hit by an anvil!"
mlg: "<red><input-1> failed the MLG!"
mob_hunt:
collect: "<green><input-1> found <input-2>!"
success: "<green>Congratulations! You found all mobs"
Expand Down Expand Up @@ -154,6 +155,8 @@ event:
current: "Current Health ⇒ <blue><input-1></blue>"
next: "Next health draining in <blue><input-1></blue> <dark_gray>(<input-2>%)"
enable-flight: "<red>This Challenge requires to allow flight in your <u>server.properties</u>! Otherwise players will be kicked spontaneously for flying."
experimental:
missing: "<red>Missing experimental features <u><input-1></u>! <click:run_command:'/experimental-features enable <input-1>'>Click here to enable it (requires rejoin)</click>"



Expand Down Expand Up @@ -412,6 +415,9 @@ items:
DEATH_HUNT:
n: "Death Hunt"
l: "Die to all given deaths in a specific order<br>to finish!<br>Use /deathhunt to modify"
MLG:
n: "MLG Challenge"
l: "Once a while you are forced to perform<br>a random MLG! Can you survive the fall?"
chS:
FLY:
power:
Expand Down Expand Up @@ -795,6 +801,24 @@ items:
interval:
n: "Interval"
l: "Timing for each health draining"
MLG:
delay:
n: "Delay"
l: "Minimum and maximum duration<br>between MLGs"
minDelay:
n: "Min Delay"
maxDelay:
n: "Max Delay"
height:
n: "Height"
l: "Minimum and maximum height<br>in blocks to perform the MLG"
minHeight:
n: "Min Height"
maxHeight:
n: "Max Height"
hardMLGs:
n: "Hard MLGs"
l: "Activate to perform the hardest<br>MLGs. Only for skilled players!"

tags:
FUN:
Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
kotlin.code.style=official

# Project Settings - set name in settings.gradle.kts
version=116
version=118
group=de.miraculixx
name=MChallenge
description=MUtils Challenges - Play various Challenges that can modify the game slightly to completely against or in coop with your friends!
author=Miraculixx
publishState=release
modrinthProjectId=challenge

# Minecraft Settings
gameVersion=1.20.4
supportedVersions=>=1.16
gameVersion=1.20.6
supportedVersions=>=1.20.5
foliaSupport=false
Loading

0 comments on commit cd048f8

Please sign in to comment.