diff --git a/build.gradle b/build.gradle index d067f8d..53c17f8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.0.+' + id 'fabric-loom' version '1.5.+' id 'maven-publish' } @@ -46,12 +46,6 @@ processResources { // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present. -// If you remove this task, sources will not be generated. -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource -} - jar { from("LICENSE") { rename { "${it}_${project.archivesBaseName}"} @@ -66,9 +60,6 @@ publishing { artifact(remapJar) { builtBy remapJar } - artifact(sourcesJar) { - builtBy remapSourcesJar - } } } diff --git a/gradle.properties b/gradle.properties index c9eabef..db20ba8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,20 +3,20 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.20.1 -yarn_mappings=1.20.1+build.9 -loader_version=0.14.21 +minecraft_version=1.20.4 +yarn_mappings=1.20.4+build.1 +loader_version=0.15.6 # Mod Properties -mod_version=1.3.9 +mod_version=1.3.10 maven_group=io.github.redstoneparadox archives_base_name=creeperfall # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.84.0+1.20.1 +fabric_version=0.91.1+1.20.4 # check this on https://nucleoid.xyz/use/ -plasmid_version=0.5+1.20.1-SNAPSHOT +plasmid_version=0.5.102-SNAPSHOT+1.20.4 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fc..e411586 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/io/github/redstoneparadox/creeperfall/game/CreeperfallActive.java b/src/main/java/io/github/redstoneparadox/creeperfall/game/CreeperfallActive.java index d77a160..d26a450 100644 --- a/src/main/java/io/github/redstoneparadox/creeperfall/game/CreeperfallActive.java +++ b/src/main/java/io/github/redstoneparadox/creeperfall/game/CreeperfallActive.java @@ -328,8 +328,8 @@ else if (sourceEntity instanceof ArrowEntity) { } if (player != null) { - int maxEmeralds = config.emeraldRewardCount.getMax(); - int minEmeralds = config.emeraldRewardCount.getMin(); + int maxEmeralds = config.emeraldRewardCount.max().orElse(1024); + int minEmeralds = config.emeraldRewardCount.min().orElse(0); int emeralds = (random.nextInt(maxEmeralds - minEmeralds) + 1) + minEmeralds; player.giveItemStack(new ItemStack(Items.EMERALD, emeralds)); player.playSound(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, SoundCategory.MASTER, 1.0f, 1.0f); diff --git a/src/main/java/io/github/redstoneparadox/creeperfall/game/spawning/CreeperfallPlayerSpawnLogic.java b/src/main/java/io/github/redstoneparadox/creeperfall/game/spawning/CreeperfallPlayerSpawnLogic.java index cea9aa6..85b1335 100644 --- a/src/main/java/io/github/redstoneparadox/creeperfall/game/spawning/CreeperfallPlayerSpawnLogic.java +++ b/src/main/java/io/github/redstoneparadox/creeperfall/game/spawning/CreeperfallPlayerSpawnLogic.java @@ -45,7 +45,7 @@ public void resetPlayer(ServerPlayerEntity player, GameMode gameMode, boolean lo if (gameMode != GameMode.SPECTATOR && !lobby) { ItemStack compassStack = new ItemStack(Items.COMPASS); - compassStack.setCustomName(Text.translatable("shop.creeperfall.title", Formatting.AQUA, Formatting.ITALIC)); + compassStack.setCustomName(Text.translatable("shop.creeperfall.title").formatted(Formatting.AQUA, Formatting.ITALIC)); player.giveItemStack(compassStack); ItemStack bowStack = new ItemStack(Items.BOW); @@ -65,14 +65,15 @@ public void resetPlayer(ServerPlayerEntity player, GameMode gameMode, boolean lo pages.add( NbtString.of( - "[\"\",{\"text\":\"Creepers:\",\"bold\":true,\"italic\":true,\"color\":\"green\"},{\"text\":\"\\nCreepers periodically fall from the sky, shoot them down before they land or they will become invincible.\\n\\n\",\"color\":\"reset\"},{\"text\":\"Shop:\",\"bold\":true,\"italic\":true,\"color\":\"aqua\"},{\"text\":\"\\nKilling Creepers gives you emeralds to spend in the shop.\",\"color\":\"reset\"}]" + "{\"text\":\"\",\"extra\":[\"\",{\"text\":\"Creepers:\",\"bold\":true,\"italic\":true,\"color\":\"green\"},{\"text\":\"\\nCreepers periodically fall from the sky, shoot them down before they land or they will become invincible.\\n\\n\"},{\"text\":\"Shop:\",\"bold\":true,\"italic\":true,\"color\":\"aqua\"},{\"text\":\"\\nKilling Creepers gives you emeralds to spend in the shop.\"}]}" ) ); pages.add( NbtString.of( - "[\"\",{\"text\":\"Survive:\",\"bold\":true,\"italic\":true,\"color\":\"gold\"},{\"text\":\"\\nThe goal is to survive to the end of the game; your health does not regen so be careful!\",\"color\":\"reset\"}]" + "{\"text\":\"\", \"extra\":[\"\",{\"text\":\"Survive:\",\"bold\":true,\"italic\":true,\"color\":\"gold\"},{\"text\":\"\\nThe goal is to survive to the end of the game; your health does not regen so be careful!\"}]}" ) ); + lore.add(NbtString.of("How to play Creeperfall")); display.put("Lore", lore); nbt.put("pages", pages); diff --git a/src/main/java/io/github/redstoneparadox/creeperfall/game/util/Codecs.java b/src/main/java/io/github/redstoneparadox/creeperfall/game/util/Codecs.java index 8a960fb..5251c5d 100644 --- a/src/main/java/io/github/redstoneparadox/creeperfall/game/util/Codecs.java +++ b/src/main/java/io/github/redstoneparadox/creeperfall/game/util/Codecs.java @@ -8,6 +8,6 @@ public class Codecs { public static Codec INT_RANGE = Codec.INT.listOf().xmap( integers -> NumberRange.IntRange.between(integers.get(0), integers.get(1)), - intRange -> Arrays.asList(intRange.getMin(), intRange.getMax()) + intRange -> Arrays.asList(intRange.min().orElse(0), intRange.max().orElse(1)) ); }