Reborn Core

Reborn Core

91M Downloads

Issues with TilePowerAcceptor not checking facing.

ali1234 opened this issue ยท 2 comments

commented

if (tile instanceof IEnergyInterfaceTile) {

In update(), if the acceptor is instanceof IEnergyInterfaceTile (which TilePowerAcceptor itself implements) then energy is added without checking whether the acceptor canAcceptEnergy(from).

public boolean hasCapability(Capability<?> capability, EnumFacing facing) {

In hasCapability(), the forge section does not check whether this tile canAcceptEnergy(from) the requested side. This causes cables to visually connect to blocks they cannot exchange energy with.

Since this section is not an "else if" this will happen even if Tesla is enabled and the block correctly reported it does not have the capability on that side. I don't know if it is possible to enable Tesla and FE at the same time, but still.

The same applies to getCapability().

commented

BTW, these are the two problems that cause the issues I mentioned in TechReborn/TechReborn#1306

commented

Before:
2017-10-16_20 27 56

After:
2017-10-16_20 31 21