CreeperMend (Alpha) A Sponge replacement for CreeperHeal

Note, currently has 0 configuration, and currently heals all blocks after 15 seconds.

I will be working on this further, but figured having a extremely basic release might be beneficial to someone.

4 Likes

What is the current status of this?

I got stuck with modded items.

The problem is when restoring to do it with block by block actions, you need to schedule and arrange the blocks in an order that will build it so they make sense, blocks before torches.

However the API and Minecraft both don’t know this natively, they just update their states when they receive update events.

About the best I could do is do it 1 layer at a time, bottom to top, and block any neighbour notify events relating to the restore, as well as monitor the explosion areas + neighbours for block updates and prevent them until healed. but this will probably have side effects.

The original creeperheal did this pretty well for the most part, but didn’t have to deal with modded blocks, and had all this information encoded in the plugin itself…

If I could somehow make this configurable for mods, then people might be able to make configpacks for mods that make sense…

Sorry for the brain dump, but hope this helps some.

If anyone has any suggestions I’m all ears.

Hmm, that sounds like an exponentially difficult problem, I’d be fine with a “crippled” version of the plugin which just ignores modded items’ orientation and/or just deletes torches and such items/leaves them dropped.
if you could make a config setting for explosions to always drop 100% that would be fine too (my server has very long item despawn times so for PvP purposes this would be adequate functionality).

1 Like

yes :slight_smile: actually mine does the undo in one large chunk…is that something you’re interested in?

    @Listener(order = Order.LAST)
    public void onExplode(final ExplosionEvent.Detonate bang){

}

Check out Explosion Guard :slight_smile: it may make things easier for you :slight_smile: here

I’d just like to quickly point out, that the snippet that you have in Explosion Guard, which came from my gist, is the entirety of the release of CreeperMend further up this page. That said, looking at the code you have made it configurable, so +1 to that.

lol correct :slight_smile: i did use the mend from you :slight_smile: because i didn’t know when you’d have one lol so I went ahead and added my own stuff into it :slight_smile:

1 Like

the origional mending i had just did transactions but they never worked correctly they left certain things out :slight_smile: that’s why i pointed out the order because that’ll help :slight_smile:

Error is as follows:

[19:03:37] [Server thread/DEBUG] [mixin/]: Mixing text.MixinTextPlaceholder from mixins.common.api.json into org.spongepowered.api.text.Text$Placeholder
[19:03:55] [Hikari housekeeper (pool HikariPool-0)/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: Before cleanup pool HikariPool-0 stats (total=9, active=1, idle=8, waiting=0)
[19:03:55] [Hikari housekeeper (pool HikariPool-0)/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: After cleanup pool HikariPool-0 stats (total=9, active=1, idle=8, waiting=0)
[19:04:03] [Server thread/DEBUG] [mixin/]: Mixing event.cause.entity.damage.MixinEntityDamageSource from mixins.common.core.json into net.minecraft.util.EntityDamageSource
[19:04:03] [Server thread/TRACE] [mixin/]: Added class metadata for org/spongepowered/api/event/cause/entity/damage/source/EntityDamageSource to metadata cache
[19:04:03] [Server thread/TRACE] [mixin/]: Added class metadata for org/spongepowered/api/event/cause/entity/damage/DamageType to metadata cache
[19:04:03] [Server thread/DEBUG] [mixin/]: Mixing event.cause.entity.damage.MixinMinecraftBlockDamageSource from mixins.common.core.json into org.spongepowered.common.event.MinecraftBlockDamageSource
[19:04:03] [Server thread/TRACE] [mixin/]: Added class metadata for org/spongepowered/api/event/cause/entity/damage/source/BlockDamageSource to metadata cache
[19:04:03] [Server thread/DEBUG] [mixin/]: Mixing event.cause.entity.damage.MixinIndirectEntityDamageSource from mixins.common.core.json into net.minecraft.util.EntityDamageSourceIndirect
[19:04:03] [Server thread/TRACE] [mixin/]: Added class metadata for org/spongepowered/api/event/cause/entity/damage/source/IndirectEntityDamageSource to metadata cache
[19:04:10] [Server thread/DEBUG] [FML/]: Gathering id map for writing to world save Overworld
[19:04:18] [Netty Server IO #2/INFO] [FML/]: Opening channel which already seems to have a state set. This is a vanilla connection. Handshake handler will stop now
[19:04:18] [Server thread/INFO] [FML/]: Connection received without FML marker, assuming vanilla.
[19:04:18] [Server thread/INFO] [FML/]: [Server thread] Server side vanilla connection established
[19:04:19] [Server thread/DEBUG] [mixin/]: Mixing forge.MixinBlockSnapshot from mixins.forge.core.json into net.minecraftforge.common.util.BlockSnapshot
[19:04:25] [Hikari housekeeper (pool HikariPool-0)/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: Before cleanup pool HikariPool-0 stats (total=9, active=1, idle=8, waiting=0)
[19:04:25] [Hikari housekeeper (pool HikariPool-0)/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: After cleanup pool HikariPool-0 stats (total=9, active=1, idle=8, waiting=0)
[19:04:32] [Server thread/DEBUG] [mixin/]: Mixing world.MixinExplosion from mixins.common.core.json into net.minecraft.world.Explosion
[19:04:32] [Server thread/DEBUG] [mixin/]: Mixing world.MixinExplosion from mixins.forge.core.json into net.minecraft.world.Explosion
[19:04:32] [Server thread/ERROR] [Sponge/]: Could not pass Detonate to Plugin{id=CreeperMend, name=CreeperMend, version=0.1-SNAPSHOT}
java.lang.NoSuchMethodError: org.spongepowered.api.event.world.ExplosionEvent$Detonate.getGame()Lorg/spongepowered/api/Game;
at CreeperMend.onExplode(CreeperMend.java:20) ~[CreeperMend.class:?]
at org.spongepowered.common.event.listener.DetonateListener_CreeperMend_onExplode4.handle(Unknown Source) ~[?:?]
at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:86) ~[RegisteredListener.class:1.8-1577-2.1-DEV-979]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:231) [SpongeModEventManager.class:1.8-1577-2.1-DEV-979]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:192) [SpongeModEventManager.class:1.8-1577-2.1-DEV-979]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:70) [EventBus.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:58) [EventBus.class:?]
at net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(ForgeEventFactory.java:429) [ForgeEventFactory.class:?]
at net.minecraft.world.Explosion.func_77278_a(Explosion.java:135) [aqo.class:?]
at net.minecraft.world.WorldServer.func_72885_a(WorldServer.java:1034) [qt.class:?]
at net.minecraft.world.World.func_72876_a(World.java:2187) [aqu.class:?]
at net.minecraft.entity.monster.EntityCreeper.func_146077_cc(SourceFile:223) [aep.class:?]
at net.minecraft.entity.monster.EntityCreeper.func_70071_h_(SourceFile:137) [aep.class:?]
at net.minecraft.world.World.onCallEntityUpdate(World.java:492) [aqu.class:?]
at net.minecraft.world.World.func_72866_a(World.java:1880) [aqu.class:?]
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:732) [qt.class:?]
at net.minecraft.world.World.func_72870_g(World.java:1850) [aqu.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1679) [aqu.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:571) [qt.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:704) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:364) [po.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:598) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:478) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
[19:04:33] [Server thread/ERROR] [Sponge/]: Could not pass Detonate to Plugin{id=CreeperMend, name=CreeperMend, version=0.1-SNAPSHOT}
java.lang.NoSuchMethodError: org.spongepowered.api.event.world.ExplosionEvent$Detonate.getGame()Lorg/spongepowered/api/Game;
at CreeperMend.onExplode(CreeperMend.java:20) ~[CreeperMend.class:?]
at org.spongepowered.common.event.listener.DetonateListener_CreeperMend_onExplode4.handle(Unknown Source) ~[?:?]
at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:86) ~[RegisteredListener.class:1.8-1577-2.1-DEV-979]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:231) [SpongeModEventManager.class:1.8-1577-2.1-DEV-979]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:192) [SpongeModEventManager.class:1.8-1577-2.1-DEV-979]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:70) [EventBus.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:58) [EventBus.class:?]
at net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(ForgeEventFactory.java:429) [ForgeEventFactory.class:?]
at net.minecraft.world.Explosion.func_77278_a(Explosion.java:135) [aqo.class:?]
at net.minecraft.world.WorldServer.func_72885_a(WorldServer.java:1034) [qt.class:?]
at net.minecraft.world.World.func_72876_a(World.java:2187) [aqu.class:?]
at net.minecraft.entity.item.EntityTNTPrimed.func_70515_d(SourceFile:85) [aek.class:?]
at net.minecraft.entity.item.EntityTNTPrimed.func_70071_h_(SourceFile:75) [aek.class:?]
at net.minecraft.world.World.onCallEntityUpdate(World.java:492) [aqu.class:?]
at net.minecraft.world.World.func_72866_a(World.java:1880) [aqu.class:?]
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:732) [qt.class:?]
at net.minecraft.world.World.func_72870_g(World.java:1850) [aqu.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1679) [aqu.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:571) [qt.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:704) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:364) [po.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:598) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:478) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
[19:04:36] [Server thread/ERROR] [Sponge/]: Could not pass Detonate to Plugin{id=CreeperMend, name=CreeperMend, version=0.1-SNAPSHOT}
java.lang.NoSuchMethodError: org.spongepowered.api.event.world.ExplosionEvent$Detonate.getGame()Lorg/spongepowered/api/Game;
at CreeperMend.onExplode(CreeperMend.java:20) ~[CreeperMend.class:?]
at org.spongepowered.common.event.listener.DetonateListener_CreeperMend_onExplode4.handle(Unknown Source) ~[?:?]
at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:86) ~[RegisteredListener.class:1.8-1577-2.1-DEV-979]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:231) [SpongeModEventManager.class:1.8-1577-2.1-DEV-979]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:192) [SpongeModEventManager.class:1.8-1577-2.1-DEV-979]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:70) [EventBus.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:58) [EventBus.class:?]
at net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(ForgeEventFactory.java:429) [ForgeEventFactory.class:?]
at net.minecraft.world.Explosion.func_77278_a(Explosion.java:135) [aqo.class:?]
at net.minecraft.world.WorldServer.func_72885_a(WorldServer.java:1034) [qt.class:?]
at net.minecraft.world.World.func_72876_a(World.java:2187) [aqu.class:?]
at net.minecraft.entity.monster.EntityCreeper.func_146077_cc(SourceFile:223) [aep.class:?]
at net.minecraft.entity.monster.EntityCreeper.func_70071_h_(SourceFile:137) [aep.class:?]
at net.minecraft.world.World.onCallEntityUpdate(World.java:492) [aqu.class:?]
at net.minecraft.world.World.func_72866_a(World.java:1880) [aqu.class:?]
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:732) [qt.class:?]
at net.minecraft.world.World.func_72870_g(World.java:1850) [aqu.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1679) [aqu.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:571) [qt.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:704) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:364) [po.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:598) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:478) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
[19:04:55] [Hikari housekeeper (pool HikariPool-0)/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: Before cleanup pool HikariPool-0 stats (total=9, active=1, idle=8, waiting=0)
[19:04:55] [Hikari housekeeper (pool HikariPool-0)/DEBUG] [com.zaxxer.hikari.pool.HikariPool/sponge]: After cleanup pool HikariPool-0 stats (total=9, active=1, idle=8, waiting=0)
[19:04:55] [Server thread/DEBUG] [FML/]: Gathering id map for writing to world save Overworld

Just a heads up I’ve updated this for sponge 3.0.0 you can find the new preview at https://github.com/ryantheleach/CreeperMend/releases

It’s still alpha, there is unresolved issues blocking further development. But report any exceptions or bugs to the bug tracker on the repository.

I’m holding back on making it configurable until I can do it properly with the features I want, so I don’t need to worry about config versioning this early.

Could you made it heal in less time than 15 seconds?

Sure I’ll make that configurable as soon as I’ve got the rest of the config settings that I want figured out. :slightly_smiling:

Is there any planned update schedule for this plugin?
It would be nice to be able to blacklist vanilla blocks from explosion and overwrite protection, such as fire, which causes… issues when a fireball crater attempts to regrow.

As far as I am aware I’m still blocked on Sponge changing how the block harvesting events work.

@FourFun should be possible once https://github.com/SpongePowered/SpongeCommon/pull/502/commits/36f7d1c643178a55747b785535f6f270da80cbfb is merged.

Didn’t realize this thread was so outdated, I had another that I thought I had been replying to and updating, I really need to centralize and manage my threads better.

1 Like

@ryantheleach What is the current status of creepermend?

@ryantheleach What is the current status of creepermend?

Forge Creeper Heal
https://mods.curse.com/mc-mods/minecraft/233077-forge-creeper-heal

@modwizcode had/has ported Creepair but it seems to have gotten lost in the last ore-staging reset.
https://ore-staging.spongepowered.org/modwizcode/Creepair/

In short, I had it almost working, but I faced a few issues that wern’t immediately solvable last time I looked at the cause tracking system. That, + competition has lead me to work on other plugins instead.