MaxenceDC / sparsestructures

A simple and configurable one-mixin mod that makes all (even datapacks and modded) structures more spread out (or more common!), essentially making them rarer/easier to find. Useful in big modpacks with a lot of structures mod to encourage exploration and make the experience more challenging or balanced.
https://modrinth.com/mod/sparsestructures
MIT License
4 stars 4 forks source link

AE2 meteorites rarity not affected #9

Closed tanyan-tanyan closed 6 months ago

tanyan-tanyan commented 8 months ago

I'm trying to make the meteorites less common on Fabric 1.19.2, with the recent v2.1 mod version. Currently on the Prominence I modpack. I tried both extreme ends in the config and the meteorites' placements around spawn didn't seem to change, on the seed I used.

Do you know if your mod affects the meteorites if they're still in .class files? I don't know much about this stuff, but I was told that I can't make a datapack for AE2 meteorite rarity because the Fabric version of AE2 has not moved away the structure from .class yet. If this appears to be the reason they are not affected, do you think you could make integration for AE2 meteorites? Thank you in advance.

MaxenceDC commented 8 months ago

I'll look into that this weekend. Thanks for the report!

SiverDX commented 8 months ago

you would have to directly modify the values in the RandomSpreadStructurePlacement class (in the constructor)

(unless you'd only want to add support for this structure set)

https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/a2f4f2b6779b0ee816b855197f15a8676a5b9031/src/main/java/appeng/init/worldgen/InitStructures.java#L57-L61

The problem with this approach is that some structure mods are using modified versions of that placement class

MaxenceDC commented 8 months ago

Yeah, It'd have to be a custom update for Applied-Energistics, and I'm not sure if I want to implement that or not... Maybe as an addon ?

SiverDX commented 8 months ago

seems a bit small for an addon

i'd use https://github.com/SpongePowered/Mixin/blob/master/src/main/java/org/spongepowered/asm/mixin/extensibility/IMixinConfigPlugin.java to ship it in the base mod and only load the mixin if the mod is present

unless fabric has some other way to load mixins based on mods being present or sth like that

MaxenceDC commented 6 months ago

So this is actually solved (I believe) thanks to a new AE2 version which seemed to have fixed the issue. Well I can't reproduce the issue anyway as it is working as intended using ae2 v15.0.18 and sp_st v2.1, So I'll mark this issue as closed for now.