Terraform icon indicating copy to clipboard operation
Terraform copied to clipboard

The way terraform creates custom signs could be better

Open Sollace opened this issue 1 year ago • 0 comments

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

Sollace avatar May 25 '23 13:05 Sollace