Sandwichable

Sandwichable

1M Downloads

Crop blocks' appendProperties should call super

liach opened this issue ยท 5 comments

commented

Problematic methods:

protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(AGE);
}

protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(AGE);
}

super.appendProperties(builder); should be called in both method bodies.

Reason: Wtoll/demeter#13
Similar issue: CottonMC/Epicurean#30

commented

Now that I think about it, this might be the "compatibility issue" with Demeter...

commented

Good eye! Will fix.

commented

Yes, these methods theoretically should have super called even if the super method is blank. In other implementations it is more obvious that super should be called like in logs (I think?), but this one here is indeed tricky.

commented

This is, unfortunately, not possible since the super method is not blank, it actually appends a conflicting IntProperty to the builder, meaning that the two conflict and the game crashes. This means that calling super will not fix anything, instead it will just break the game.

commented

This is, unfortunately, not possible since the super method is not blank, it actually appends a conflicting IntProperty to the builder, meaning that the two conflict and the game crashes. This means that calling super will not fix anything, instead it will just break the game.

...but while I try prepending this to the code, it actually fixes the problem without crashing the game.
And yes since the source is incomplete I have to use something to decompile the jar.
The only problem is the crops don't grow. Maybe that's also why the game crashes.