maruohon / environmentalcreepers

Small Minecraft mod to tweak some explosion properties
GNU General Public License v3.0
7 stars 6 forks source link

EC v1.6.0 not working properly on Fabric Server (MC v1.16.1) #9

Closed rxay579 closed 4 years ago

rxay579 commented 4 years ago

EC v1.6.0 for Fabric / MC v1.16.1 (environmentalcreepers-fabric-1.16.1-1.6.0.jar), Fabric Loader v0.92, Fabric API v0.17.0b386, MC v1.16.1.

Generally, I'm using EC to guarantee that creepers (and TNT) drop all the blocks they explode and don't destroy items on the ground. However, when on a dedicated server, when a creeper explodes, they don't drop 100% of the blocks. We noticed this when playing in survival and I tested a couple of times in creative by spawning in creepers, then lighting them with flint and steel. I turned on the verbose logging, but didn't get too much more info. Testing in single player, these functions appear to operate as expected with all blocks dropping.

Config File (added TXT extension for upload): environmentalcreepers.json.txt

Server Log (session in progress): latest.log.txt

Don't know how to go about troubleshooting it from here. Suggestions are welcome.

maruohon commented 4 years ago

Did you test in single player with all the same mods as are on the server? Your config does work for me on a local dedicated server, both Creeper and TNT explosions drop all the blocks as items. So I'm assuming it must be a conflict with some other mod. In my test instance I have FabricCarpet 1.4.0, CarpetExtra 1.4.0 and Lithium 0.5.1.

You can try to find out if you have another mod that modifies the Explosion class by starting the server with two Mixin debug options enabled, basically like this:

 java -Xmx2G -Dmixin.debug=true -Dmixin.debug.export=false -jar fabric-server-launch.jar nogui

This will write lots of extra stuff to the log. Once you started the server like this, detonate one creeper or TNT so that the Explosion class gets loaded, and then look at the log. You should see a number of lines indicating mixins being applied to class_1927 which is the Fabric intermediary name for the Explosion class. In my case it looks like this:

[03:27:43] [Server thread/INFO]: Mixing world.explosions.ExplosionMixin from lithium.mixins.json into net.minecraft.class_1927
[03:27:43] [Server thread/INFO]: Mixing MixinExplosion from mixins.environmentalcreepers.json into net.minecraft.class_1927
[03:27:43] [Server thread/INFO]: Mixing ExplosionMixin from carpet.mixins.json into net.minecraft.class_1927
[03:27:43] [Server thread/INFO]: Mixing ExplosionAccessor from carpet.mixins.json into net.minecraft.class_1927
[03:27:43] [Server thread/WARN]: Write access to @Mutable @Final field field_9190:F in mixins.environmentalcreepers.json:MixinExplosion::handler$zcm000$modifyExplosionSize
[03:27:43] [Server thread/WARN]: Write access to @Mutable @Final field field_9190:F in mixins.environmentalcreepers.json:MixinExplosion::handler$zcm000$modifyExplosionSize

See if there are other mixins to that class than from Carpet, EnvC, and Lithium, and that should allow you to start narrowing down what might be causing it.

Edit: Actually looks like the -Dmixin.debug.export=false option is not doing anything, it's still exporting all the classes... but whatever.

rxay579 commented 4 years ago

The single player test had a few extra client-side mods loaded in addition to the mods that are both on the server and client. Disabling those did not fix EC.

Tried the extra debugging logging but my log at the explosion looked like yours.

The single player world didn't have a carpet.conf in it, so I copied the one from the server over to single player and EC stopped working properly. Fiddling around with that and I found that removing the "optimizedTNT true" line from carpet.conf makes EC work.

Looks like that function in Carpet may be incompatible with what you're doing in your mod. I don't think our world plans involve lots of TNT in a laggy way, so I'll leave that out of our carpet.conf.

Thanks for your time and the extra debugging info.