diff --git a/build.gradle b/build.gradle index 9f49cd8c..bdefb66a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.7-SNAPSHOT' + id 'fabric-loom' version '1.8-SNAPSHOT' id 'maven-publish' id 'com.modrinth.minotaur' version '2.+' id 'com.github.breadmoirai.github-release' version '2.4.1' diff --git a/gradle.properties b/gradle.properties index 73954cf1..c9b53f41 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/develop/ - minecraft_version=1.21.3 - minecraft_version_dependency=>=1.21.2 <=1.21.3 - minecraft_version_list=1.21.2, 1.21.3 - minecraft_version_list_presentable=1.21.2 - 1.21.3 + minecraft_version=1.21.4-rc3 + minecraft_version_dependency=1.21.4-rc.3 + minecraft_version_list=1.21.4 + minecraft_version_list_presentable=1.21.4 loader_version=0.16.9 parchment_mcversion=1.21 - parchment_version=2024.07.28 + parchment_version=2024.11.10 # Mod Properties mod_version=2.9.8 @@ -19,7 +19,7 @@ org.gradle.jvmargs=-Xmx2G # Dependencies # also check this on https://fabricmc.net/develop/ - fabric_version=0.109.0+1.21.3 + fabric_version=0.110.2+1.21.4 clientarguments_version=1.10.1 betterconfig_version=2.1.2 seedfinding_core_version=1.200.1 diff --git a/src/main/java/net/earthcomputer/clientcommands/command/CParticleCommand.java b/src/main/java/net/earthcomputer/clientcommands/command/CParticleCommand.java index d6e5431d..758f3d0f 100644 --- a/src/main/java/net/earthcomputer/clientcommands/command/CParticleCommand.java +++ b/src/main/java/net/earthcomputer/clientcommands/command/CParticleCommand.java @@ -3,11 +3,9 @@ import com.mojang.brigadier.Command; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.exceptions.CommandSyntaxException; -import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.commands.CommandBuildContext; import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.util.RandomSource; @@ -21,8 +19,6 @@ public class CParticleCommand { - private static final SimpleCommandExceptionType UNSUITABLE_PARTICLE_OPTION_EXCEPTION = new SimpleCommandExceptionType(Component.translatable("commands.cparticle.unsuitableParticleOption")); - public static void register(CommandDispatcher dispatcher, CommandBuildContext context) { dispatcher.register(literal("cparticle") .then(argument("name", particle(context)) @@ -42,27 +38,16 @@ public static void register(CommandDispatcher dispatc } private static int spawnParticle(FabricClientCommandSource source, ParticleOptions parameters, Vec3 pos, Vec3 delta, float speed, int count, boolean force) throws CommandSyntaxException { - switch (source.getClient().options.particles().get()) { - case MINIMAL: - if (!force) { - throw UNSUITABLE_PARTICLE_OPTION_EXCEPTION.create(); - } - case DECREASED: - if ((parameters.getType() == ParticleTypes.RAIN || parameters.getType() == ParticleTypes.SMOKE) && !force) { - throw UNSUITABLE_PARTICLE_OPTION_EXCEPTION.create(); - } - default: - if (count == 0) { - source.getWorld().addParticle(parameters, force, pos.x, pos.y, pos.z, delta.x * speed, delta.y * speed, delta.z * speed); - } else { - final RandomSource random = source.getClient().getConnection().getLevel().random; - for (int i = 0; i < count; i++) { - source.getWorld().addParticle(parameters, force, pos.x + delta.x * random.nextGaussian(), pos.y + delta.y * random.nextGaussian(), pos.z + delta.z * random.nextGaussian(), speed * random.nextGaussian(), speed * random.nextGaussian(), speed * random.nextGaussian()); - } - } - source.sendFeedback(Component.translatable("commands.cparticle.success", - BuiltInRegistries.PARTICLE_TYPE.getKey(parameters.getType()).toString())); - return Command.SINGLE_SUCCESS; + if (count == 0) { + source.getWorld().addAlwaysVisibleParticle(parameters, force, pos.x, pos.y, pos.z, delta.x * speed, delta.y * speed, delta.z * speed); + } else { + final RandomSource random = source.getClient().getConnection().getLevel().random; + for (int i = 0; i < count; i++) { + source.getWorld().addAlwaysVisibleParticle(parameters, force, pos.x + delta.x * random.nextGaussian(), pos.y + delta.y * random.nextGaussian(), pos.z + delta.z * random.nextGaussian(), speed * random.nextGaussian(), speed * random.nextGaussian(), speed * random.nextGaussian()); + } } + source.sendFeedback(Component.translatable("commands.cparticle.success", + BuiltInRegistries.PARTICLE_TYPE.getKey(parameters.getType()).toString())); + return Command.SINGLE_SUCCESS; } } diff --git a/src/main/java/net/earthcomputer/clientcommands/command/CTitleCommand.java b/src/main/java/net/earthcomputer/clientcommands/command/CTitleCommand.java index b9d4c6cc..826477aa 100644 --- a/src/main/java/net/earthcomputer/clientcommands/command/CTitleCommand.java +++ b/src/main/java/net/earthcomputer/clientcommands/command/CTitleCommand.java @@ -36,14 +36,14 @@ public static void register(CommandDispatcher dispatc } private static int executeClear(FabricClientCommandSource source) { - source.getClient().gui.clear(); + source.getClient().gui.clearTitles(); source.sendFeedback(Component.translatable("commands.ctitle.cleared")); return Command.SINGLE_SUCCESS; } private static int executeReset(FabricClientCommandSource source) { - source.getClient().gui.clear(); + source.getClient().gui.clearTitles(); source.getClient().gui.resetTitleTimes(); source.sendFeedback(Component.translatable("commands.ctitle.reset")); diff --git a/src/main/java/net/earthcomputer/clientcommands/features/FishingCracker.java b/src/main/java/net/earthcomputer/clientcommands/features/FishingCracker.java index b678dba1..6bffef57 100644 --- a/src/main/java/net/earthcomputer/clientcommands/features/FishingCracker.java +++ b/src/main/java/net/earthcomputer/clientcommands/features/FishingCracker.java @@ -931,7 +931,7 @@ public SimulatedFishingBobber(long seed, ItemStack tool, Vec3 pos, Vec3 velocity this.velocity = velocity; this.boundingBox = FISHING_BOBBER_DIMENSIONS.makeBoundingBox(pos.x, pos.y, pos.z); - this.fakeEntity = new FishingHook(Objects.requireNonNull(Minecraft.getInstance().player), level, 0, 0, tool); + this.fakeEntity = new FishingHook(Objects.requireNonNull(Minecraft.getInstance().player), level, 0, 0); } public boolean canCatchFish() { diff --git a/src/main/resources/assets/clientcommands/lang/de_de.json b/src/main/resources/assets/clientcommands/lang/de_de.json index 5947e332..1c0a64da 100644 --- a/src/main/resources/assets/clientcommands/lang/de_de.json +++ b/src/main/resources/assets/clientcommands/lang/de_de.json @@ -155,7 +155,6 @@ "commands.cplayerinfo.ioException": "Ein Fehler ist aufgetreten", "commands.cplayerinfo.getNameHistory.success": "%s hatte die folgenden Namen: %s", - "commands.cparticle.unsuitableParticleOption": "Zeige keine Partikel an, weil die Partikel-Grafikeinstellung ungeeignet ist", "commands.cparticle.success": "Zeige Partikel %s an", "commands.cpermissionlevel.success": "Deine Berechtigungsstufe ist %s", diff --git a/src/main/resources/assets/clientcommands/lang/en_us.json b/src/main/resources/assets/clientcommands/lang/en_us.json index a96f474f..1f546123 100644 --- a/src/main/resources/assets/clientcommands/lang/en_us.json +++ b/src/main/resources/assets/clientcommands/lang/en_us.json @@ -159,7 +159,6 @@ "commands.cplayerinfo.ioException": "An error occurred", "commands.cplayerinfo.getNameHistory.success": "%s has had the following names: %s", - "commands.cparticle.unsuitableParticleOption": "Won't display particle as the particle video setting is unsuitable", "commands.cparticle.success": "Displaying particle %s", "commands.cpermissionlevel.success": "Your permission level is %s", diff --git a/src/main/resources/assets/clientcommands/lang/id_id.json b/src/main/resources/assets/clientcommands/lang/id_id.json index a2e774b5..39ff9543 100644 --- a/src/main/resources/assets/clientcommands/lang/id_id.json +++ b/src/main/resources/assets/clientcommands/lang/id_id.json @@ -140,7 +140,6 @@ "commands.cplayerinfo.ioException": "Terjadi sebuah kesalahan", "commands.cplayerinfo.getNameHistory.success": "%s memiliki nama nama berikut: %s", - "commands.cparticle.unsuitableParticleOption": "Tidak akan menampilkan partikel karena pengaturan partikel tidak cocok", "commands.cparticle.success": "Menampilkan partikel %s", "commands.cpermissionlevel.success": "Tingkat izin anda adalah %s", diff --git a/src/main/resources/assets/clientcommands/lang/ja_jp.json b/src/main/resources/assets/clientcommands/lang/ja_jp.json index a5e8e34f..4919f8ac 100644 --- a/src/main/resources/assets/clientcommands/lang/ja_jp.json +++ b/src/main/resources/assets/clientcommands/lang/ja_jp.json @@ -140,7 +140,6 @@ "commands.cplayerinfo.ioException": "エラーが発生しました", "commands.cplayerinfo.getNameHistory.success": "%s は過去に次の名前を所持していました: %s", - "commands.cparticle.unsuitableParticleOption": "パーティクルの設定が不適当であるためパーティクルを表示しません", "commands.cparticle.success": "%s としてパーティクルを表示しています", "commands.cpermissionlevel.success": "あなたの権限レベルは %s です", diff --git a/src/main/resources/assets/clientcommands/lang/pl_pl.json b/src/main/resources/assets/clientcommands/lang/pl_pl.json index 4463d964..c71609a2 100644 --- a/src/main/resources/assets/clientcommands/lang/pl_pl.json +++ b/src/main/resources/assets/clientcommands/lang/pl_pl.json @@ -123,7 +123,6 @@ "commands.cplayerinfo.ioException": "Wystąpił błąd", "commands.cplayerinfo.getNameHistory.success": "%s był znany również jako: %s", - "commands.cparticle.unsuitableParticleOption": "Nie można wyświetlić cząsteczki ponieważ opcje cząsteczek są ustawione na \"minimalne\"", "commands.cparticle.success": "Pokazuję cząsteczkę %s", "commands.cpermissionlevel.success": "Twój poziom uprawnień to %s", diff --git a/src/main/resources/assets/clientcommands/lang/ru_ru.json b/src/main/resources/assets/clientcommands/lang/ru_ru.json index 69a4c5b1..742bda32 100644 --- a/src/main/resources/assets/clientcommands/lang/ru_ru.json +++ b/src/main/resources/assets/clientcommands/lang/ru_ru.json @@ -126,7 +126,6 @@ "commands.cplayerinfo.ioException": "Произошла ошибка", "commands.cplayerinfo.getNameHistory.success": "%s имел следующие ники: %s", - "commands.cparticle.unsuitableParticleOption": "Частицы не отображаются, так как настройки видео частиц не подходят.", "commands.cparticle.success": "Отображение частицы %s", "commands.cpermissionlevel.success": "Ваш уровень разрешений %s", diff --git a/src/main/resources/assets/clientcommands/lang/zh_cn.json b/src/main/resources/assets/clientcommands/lang/zh_cn.json index 7e38ea84..90ebce9f 100644 --- a/src/main/resources/assets/clientcommands/lang/zh_cn.json +++ b/src/main/resources/assets/clientcommands/lang/zh_cn.json @@ -159,7 +159,6 @@ "commands.cplayerinfo.ioException": "出现错误", "commands.cplayerinfo.getNameHistory.success": "%s有如下名称:%s", - "commands.cparticle.unsuitableParticleOption": "无法在视频设置中“粒子效果”一项为“最少”时播放粒子效果,", "commands.cparticle.success": "成功显示粒子效果%s", "commands.cpermissionlevel.success": "你的权限等级为%s", diff --git a/src/main/resources/assets/clientcommands/lang/zh_tw.json b/src/main/resources/assets/clientcommands/lang/zh_tw.json index 29a640b4..c7ca831f 100644 --- a/src/main/resources/assets/clientcommands/lang/zh_tw.json +++ b/src/main/resources/assets/clientcommands/lang/zh_tw.json @@ -159,7 +159,6 @@ "commands.cplayerinfo.ioException": "發生錯誤", "commands.cplayerinfo.getNameHistory.success": "%s 曾使用過以下名稱: %s", - "commands.cparticle.unsuitableParticleOption": "由於粒子顯示設定不適合,因此無法顯示粒子", "commands.cparticle.success": "正在顯示粒子 %s", "commands.cpermissionlevel.success": "您的權限等級為 %s",