Environmental Creepers

Environmental Creepers

2M Downloads

Crashes when creeper explodes on Fabric 1.19.3.

nimids opened this issue ยท 1 comments

commented

Error:

java.lang.IllegalArgumentException: Missing required parameters: [<parameter minecraft:tool>, <parameter minecraft:origin>]
	at net.minecraft.loot.context.LootContext$Builder.build(LootContext.java:110)
	at net.minecraft.block.AbstractBlock.getDroppedStacks(AbstractBlock.java:731)
	at net.minecraft.block.AbstractBlock$AbstractBlockState.getDroppedStacks(AbstractBlock.java:1128)
	at net.minecraft.world.explosion.Explosion.affectWorld(Explosion.java:236)
	at net.minecraft.world.World.createExplosion(World.java:561)
	at net.minecraft.server.world.ServerWorld.createExplosion(ServerWorld.java:1000)
	at net.minecraft.world.World.createExplosion(World.java:512)
	at net.minecraft.entity.mob.CreeperEntity.explode(CreeperEntity.java:236)
	at net.minecraft.entity.mob.CreeperEntity.tick(CreeperEntity.java:154)
	at net.minecraft.server.world.ServerWorld.tickEntity(ServerWorld.java:642)
	at net.minecraft.world.World.tickEntity(World.java:481)
	at net.minecraft.server.world.ServerWorld.method_31420(ServerWorld.java:347)
	at net.minecraft.world.EntityList.forEach(EntityList.java:78)
	at net.minecraft.server.world.ServerWorld.tick(ServerWorld.java:324)
	at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer.java:857)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:812)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:96)
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:666)
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:286)
	at java.base/java.lang.Thread.run(Thread.java:833)

net.minecraft.world.explosion.Explosion.affectWorld is the last mod interaction I can see.
Changing DESTROY to DESTROY_WITH_DECAY in MixinExplosion on line 128 along with updating to newer minecraft, yarn and loader versions appears to fix the issue.

--- "a/src/main/java/fi/dy/masa/environmentalcreepers/mixin/MixinExplosion.java"
+++ "b/src/main/java/fi/dy/masa/environmentalcreepers/mixin/MixinExplosion.java"
@@ -125,7 +125,7 @@ public abstract class MixinExplosion
     }
 
     @Redirect(method = "affectWorld",
-              slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/world/explosion/Explosion$DestructionType;DESTROY:Lnet/minecraft/world/explosion/Explosion$DestructionType;")),
+              slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/world/explosion/Explosion$DestructionType;DESTROY_WITH_DECAY:Lnet/minecraft/world/explosion/Explosion$DestructionType;")),
               at = @At(value = "INVOKE",
               target = "Lnet/minecraft/loot/context/LootContext$Builder;parameter(Lnet/minecraft/loot/context/LootContextParameter;Ljava/lang/Object;)Lnet/minecraft/loot/context/LootContext$Builder;"))
     private <T> LootContext.Builder envc_modifyDropChance(LootContext.Builder builder, LootContextParameter<T> key, T value)
commented

Can you explain what steps I need to take to reproduce this bit?

updating to newer minecraft, yarn and loader versions appears to fix the issue.

I am a newb at Java but I've been programming for over a decade. I've looked at build.gradle, settings.gradle, build.properties, and the gradlew script and I don't really know what to do with any of it.

I did notice that Fabric Loom is at version 1.1 now and that 0.12 is an old version, so I changed '0.12-SNAPSHOT' to '1.1-SNAPSHOT' in the build.gradle file. I also changed the default JVM arguments in gradlew to increase the amount of memory allocated because it ran out of memory the first time I tried building.