More Tags

More Tags

268k Downloads

Redirect Conflict with Terraformers-Dirt-API

Kneelawk opened this issue ยท 3 comments

commented

The Issue

Both MoreTags and Terraformers-Dirt-API redirect the BlockState.isOf call in CropBlock.getAvailableMoisture, leading to a redirect conflict.

Tested Mod Versions

  • MoreTags v3.0.3 (latest as of this issue)
  • Terraformers-Dirt-API v3.1.0 and v4.1.1 (latest as of this issue) (likely affects all versions in between)

Crash Logs

Crash logs using Terraformers-Dirt-API v3.1.0: https://pastebin.com/xGVeGdjj
Crash logs using Terraformers-Dirt-API v4.1.1: https://pastebin.com/0P6yVzSQ

Potential Solution

Given that both of these redirects appear to be for the purpose of checking if a potential farmland block is part of block tag. Either one of these mods could depend on the other or both could use a less-invasive mixin type like one of the mixins from MixinExtras.

commented

Issue on Terraformers-Dirt-API repository: TerraformersMC/Terraform#61

commented

This can be fixed using ModifyOperand

commented

I can't fix this entirely unilaterally ... for example the following cancels unnecessarily which breaks our similar injection:

https://github.com/gudenau/minecraft-MoreTags/blob/master/src/main/java/net/gudenau/minecraft/moretags/mixins/block/farmland/CropBlockMixin.java#L62

It should only cancel when the block tag matches, f.e.:

        if (floor.isIn(MoreBlockTags.FARMLAND)) {
            cir.setReturnValue(true);
        }