additionaladditions icon indicating copy to clipboard operation
additionaladditions copied to clipboard

compatibility issue with enchanting infuser, having speed and soul speed on boots crashes your game and prevents you from rejoining the server when stepping on soulsand.

Open Cryominous opened this issue 2 years ago • 4 comments

Using the Enchaning Infuser mod, you can put speed on boots that have the soul speed enchantment, but if you do that then stepping on soulsand seems to effectively ban you from the server. I crashed and was unable to rejoin. Luckily i was able to join on an alt and break the soulsand which fixed it but i image doing this on singleplayer may just break your world.

Cryominous avatar Jan 18 '23 12:01 Cryominous

that's why you can't combine speed and soul speed in a vanilla anvil. those two are marked incompatible but that mod you're using seems to ignore it

Dqu1J avatar Jan 18 '23 21:01 Dqu1J

that's why you can't combine speed and soul speed in a vanilla anvil. those two are marked incompatible but that mod you're using seems to ignore it

You can combine the two enchantments by command in vanilla. The game still crashes. The bottom line is that any command can't lead to a permenent crash. You may make the enchantment not to work but you can't crash the game anyway.

I wrote a mixin to fix it:

@Mixin(LivingEntity.class)
abstract class MLivingEntity extends Entity {
    private static final UUID NEW_SOUL_SPEED_UUID = Trifle.uuidOf(new Identifier("additionaladditions", "speed"), 1);//This can be a random UUID.
    @Shadow
    public abstract EntityAttributeInstance getAttributeInstance(EntityAttribute attribute);
    @Redirect(method = {"addSoulSpeedBoostIfNeeded", "removeSoulSpeedBoost"}, at = @At(value = "FIELD", target = "Lnet/minecraft/entity/LivingEntity;SOUL_SPEED_BOOST_ID:Ljava/util/UUID;"))
    private static UUID changeSoulSpeedUUID() {
        return FabricLoader.getInstance().isModLoaded("additionaladditions") ? NEW_SOUL_SPEED_UUID : SOUL_SPEED_BOOST_ID;
    }
}

Phoupraw avatar Nov 04 '23 05:11 Phoupraw

that's why you can't combine speed and soul speed in a vanilla anvil. those two are marked incompatible but that mod you're using seems to ignore it

You can combine the two enchantments by command in vanilla. The game still crashes. The bottom line is that any command can't leat to a permenent crash. You may make the enchantment not to work but you can't crash the game anyway.

I wrote a mixin to fix it:

@Mixin(LivingEntity.class)
abstract class MLivingEntity extends Entity {
    private static final UUID NEW_SOUL_SPEED_UUID = Trifle.uuidOf(new Identifier("additionaladditions", "speed"), 1);//This can be a random UUID.
    @Shadow
    public abstract EntityAttributeInstance getAttributeInstance(EntityAttribute attribute);
    @Redirect(method = {"addSoulSpeedBoostIfNeeded", "removeSoulSpeedBoost"}, at = @At(value = "FIELD", target = "Lnet/minecraft/entity/LivingEntity;SOUL_SPEED_BOOST_ID:Ljava/util/UUID;"))
    private static UUID changeSoulSpeedUUID() {
        return FabricLoader.getInstance().isModLoaded("additionaladditions") ? NEW_SOUL_SPEED_UUID : SOUL_SPEED_BOOST_ID;
    }
}

i dont know anything about coding please tell me how do I use that mixin to fix it do I need to add it to the mod or make a new mod please help

RYUKxAnime avatar Dec 02 '23 16:12 RYUKxAnime

@RYUKxAnime What's your MC version?

Phoupraw avatar Dec 02 '23 16:12 Phoupraw