Skip to content

Commit

Permalink
Minecraft 1.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MarbleGateKeeper committed Oct 29, 2024
1 parent 2fdb9b8 commit 60cb56a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,15 +33,15 @@ public abstract class CreeperEntityMixin extends HostileEntity {
@Shadow
private static TrackedData<Boolean> CHARGED;

@Shadow public abstract boolean shouldRenderOverlay();
@Shadow public abstract boolean isCharged();

protected CreeperEntityMixin(EntityType<? extends HostileEntity> entityType, World world) {
super(entityType, world);
}

@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()) {
Expand All @@ -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();
}
Expand Down Expand Up @@ -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);
}
}
}
4 changes: 2 additions & 2 deletions fabric/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Dependency Properties
cloth_config_version = 15.0.140
mod_menu_version = 11.0.3
cloth_config_version = 16.0.141
mod_menu_version = 12.0.0-beta.1
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"depends": {
"fabric": "*",
"minecraft": ">=1.21.1",
"minecraft": ">=1.21.3",
"cloth-config": "*"
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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

4 changes: 2 additions & 2 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down

0 comments on commit 60cb56a

Please sign in to comment.