Railcraft

Railcraft

34M Downloads

1.12 - TileChestMetals gets stuck in evaluate (swap) methods

Dockter opened this issue ยท 3 comments

commented

I suspect a bunch of code with inventory manipulators was changed from 1.7.10 that creates this issue.

Observation: The Metals Chest can condense ingots/nuggets correctly however when it goes to do its swap, it will always return true for the type it finds and never progresses on with target.next.

To Reproduce: Place a stack of 64 gold ingots in slot 1 of the metal chest. Condense runs properly and you end up with 1 ingot in slot 1 and 7 gold blocks in slot 2. Now if you place another stack of gold ingots in slot 3, due to this bug, condense never runs and it never combines any future stacks of ingots or nuggets because it stuck on trying to continually move what is in slot 1.

One thing I would like to mention is that if you take a single ingot, place it in any slot other than slot one, when the enum cycles through, it will move the single ingot to slot 1, this doesn't happen in the 1.7.10 version.

Theory: I suspect the fact that its moving the UN-condensable stacks around within the chest as part of he cause of this issue.

https://github.com/Railcraft/Railcraft/blob/liach-1.12.2/src/main/java/mods/railcraft/common/blocks/single/TileChestMetals.java#L123

commented

@Dockter The true cause is this:

public static Predicate<ItemStack> noneOf(@Nonnull final ItemStack... stacks) {
return anyOf(Arrays.asList(stacks));
}

commented

Testing fix now...

commented

Confirmed fixed.