From 60cb56a9d0235411df5a8aa08bf800b0c7f2f4b6 Mon Sep 17 00:00:00 2001 From: MarbleGate Date: Tue, 29 Oct 2024 09:07:22 +0800 Subject: [PATCH] Minecraft 1.12.3 --- .../creeperfirework/mixin/CreeperEntityMixin.java | 11 ++++++----- fabric/gradle.properties | 4 ++-- fabric/src/main/resources/fabric.mod.json | 2 +- gradle.properties | 8 ++++---- .../src/main/resources/META-INF/neoforge.mods.toml | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/common/src/main/java/plus/dragons/creeperfirework/mixin/CreeperEntityMixin.java b/common/src/main/java/plus/dragons/creeperfirework/mixin/CreeperEntityMixin.java index 60efa74..20bbd87 100644 --- a/common/src/main/java/plus/dragons/creeperfirework/mixin/CreeperEntityMixin.java +++ b/common/src/main/java/plus/dragons/creeperfirework/mixin/CreeperEntityMixin.java @@ -7,6 +7,7 @@ import net.minecraft.entity.data.TrackedData; import net.minecraft.entity.mob.CreeperEntity; import net.minecraft.entity.mob.HostileEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; @@ -32,7 +33,7 @@ public abstract class CreeperEntityMixin extends HostileEntity { @Shadow private static TrackedData CHARGED; - @Shadow public abstract boolean shouldRenderOverlay(); + @Shadow public abstract boolean isCharged(); protected CreeperEntityMixin(EntityType entityType, World world) { super(entityType, world); @@ -40,7 +41,7 @@ protected CreeperEntityMixin(EntityType entityType, Wor @Inject(method = "explode", at = @At( value = "INVOKE", - target = "Lnet/minecraft/world/World;createExplosion(Lnet/minecraft/entity/Entity;DDDFLnet/minecraft/world/World$ExplosionSourceType;)Lnet/minecraft/world/explosion/Explosion;"), + target = "Lnet/minecraft/server/world/ServerWorld;createExplosion(Lnet/minecraft/entity/Entity;DDDFLnet/minecraft/world/World$ExplosionSourceType;)V"), cancellable = true) private void injected(CallbackInfo ci) { if (Configuration.isCreeperExplodeIntoFirework() && Math.random() < Configuration.becomeFireworkChance()) { @@ -60,8 +61,8 @@ public boolean shouldDamage(Explosion explosion, Entity entity) { return false; } }, - this.getX(), this.getY(), this.getZ(), (float)this.explosionRadius * (this.shouldRenderOverlay()? 2.0F : 1.0F), false, World.ExplosionSourceType.MOB); - this.onRemoval(RemovalReason.KILLED); + this.getX(), this.getY(), this.getZ(), (float)this.explosionRadius * (this.isCharged()? 2.0F : 1.0F), false, World.ExplosionSourceType.MOB); + this.onRemoval((ServerWorld) this.getWorld(),RemovalReason.KILLED); this.discard(); ci.cancel(); } @@ -94,7 +95,7 @@ public boolean shouldDamage(Explosion explosion, Entity entity) { return false; } }, - this.getX(), this.getY(), this.getZ(), (float)this.explosionRadius * (this.shouldRenderOverlay()? 2.0F : 1.0F), false, World.ExplosionSourceType.MOB); + this.getX(), this.getY(), this.getZ(), (float)this.explosionRadius * (this.isCharged()? 2.0F : 1.0F), false, World.ExplosionSourceType.MOB); } } } diff --git a/fabric/gradle.properties b/fabric/gradle.properties index 3143f3e..7072bd6 100644 --- a/fabric/gradle.properties +++ b/fabric/gradle.properties @@ -1,3 +1,3 @@ # Dependency Properties -cloth_config_version = 15.0.140 -mod_menu_version = 11.0.3 \ No newline at end of file +cloth_config_version = 16.0.141 +mod_menu_version = 12.0.0-beta.1 \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 8cd5aa6..840fb1f 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -30,7 +30,7 @@ ], "depends": { "fabric": "*", - "minecraft": ">=1.21.1", + "minecraft": ">=1.21.3", "cloth-config": "*" } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1aec69c..5d7b300 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,14 @@ org.gradle.jvmargs=-Xmx2048M -minecraft_version=1.21.1 +minecraft_version=1.21.3 archives_base_name=creepre_firework mod_version=2.2.0 maven_group=plus.dragons.creeprefirework -yarn_mappings=1.21.1+build.3 +yarn_mappings=1.21.3+build.2 fabric_loader_version=0.16.7 -fabric_api_version=0.106.0+1.21.1 -neoforge_version=21.1.72 +fabric_api_version=0.107.0+1.21.3 +neoforge_version=21.3.4-beta yarn_mappings_patch_neoforge_version=1.21+build.4 diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index f47139d..1b0e369 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -14,13 +14,13 @@ Creeper explodes into firework! [[dependencies.creeper_firework]] #optional modId="neoforge" #mandatory type = "required" -versionRange = "[21.0,)" +versionRange = "[21.3,)" ordering="NONE" side="BOTH" [[dependencies.creeper_firework]] modId="minecraft" type = "required" -versionRange = "[1.21,1.22)" +versionRange = "[1.21.3,1.22)" ordering="NONE" side="BOTH" [[mixins]]