Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The way terraform creates custom signs could be better #77

Open
Sollace opened this issue May 25, 2023 · 0 comments
Open

The way terraform creates custom signs could be better #77

Sollace opened this issue May 25, 2023 · 0 comments

Comments

@Sollace
Copy link

Sollace commented May 25, 2023

I happened to be looking at it today because I was thinking of adding a wood set to another of my mods, and I wanted to see if I could do everything using terraformer-wood-api instead of half-half like how psychedelicraft ended up when I noticed something. You're doing a lot of mixin work to enable custom texturing of signs, but is that really neccessary?

For reference, in psychedelicraft I implemented signs before adding terraform-wood-api, so it doesn't use it at all for that. All I needed was two accessor mixins and I can just create my signs like this:

    SignType JUNIPER_SIGN_TYPE = SignTypeAccessor.callRegister(new SignType("juniper") {});

    Block JUNIPER_SIGN = register("juniper_sign", new SignBlock(..., JUNIPER_SIGN_TYPE));
    
    BlockEntityTypeSupportHelper.of(BlockEntityType.SIGN).addSupportedBlocks(JUNIPER_SIGN);

I'm not saying it has to be exactly like this, just that you could do it with fewer mixins.

References:
https://github.com/Sollace/Psychedelicraft/blob/1.20/src/main/java/ivorius/psychedelicraft/block/entity/BlockEntityTypeSupportHelper.java
https://github.com/Sollace/Psychedelicraft/blob/1.20/src/main/java/ivorius/psychedelicraft/mixin/MixinBlockEntityType.java
https://github.com/Sollace/Psychedelicraft/blob/1.20/src/main/java/ivorius/psychedelicraft/mixin/SignTypeAccessor.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant