[Bug] Controller rack capacity is 1 less than advertised
jzisser9 opened this issue ยท 4 comments
Hmm...this is where I thought the issue would be:
EventManager.java:62
if (posSet.size() > controller.getTier() * 20)
But if we consider a stone controller to be tier == 1
, then this logic works. So maybe posSet.size()
is the issue...
Just did a little more testing in-game, and it's not just the stone controller that has this issue. All controllers support one less rack than they advertise.
I think it's because of that code snippet I shared above. My guess is that posSet.size()
is including a block it shouldn't be, like maybe the controller itself.
UPDATE: And it looks like that's exactly what's happening:
TileEntityRack.java
public static BlockPos visitPositions(final World level, final Set<BlockPos> visitedPositions, final BlockPos current)
{
BlockPos controller = null;
if (level.getBlockEntity(current) instanceof TileEntityController)
{
controller = current;
}
visitedPositions.add(current);