1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-04-04 17:56:59 +00:00

Invert side when checking connectivity

The side marks the direction relative to the wire, rather than the side
of the block it is attempting to connect to. Therefore needs to be
flipped.

Closes #149
This commit is contained in:
SquidDev 2017-05-01 21:43:24 +01:00
parent 5775c77aa3
commit 02ce111d9e

View File

@ -22,10 +22,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
public abstract class TileComputerBase extends TileGeneric
implements IComputerTile, IDirectionalTile, ITickable
@ -143,7 +143,8 @@ public abstract class TileComputerBase extends TileGeneric
@Override
public boolean getRedstoneConnectivity( EnumFacing side )
{
int localDir = remapLocalSide( DirectionUtil.toLocal( this, side ) );
if( side == null ) return false;
int localDir = remapLocalSide( DirectionUtil.toLocal( this, side.getOpposite() ) );
return !isRedstoneBlockedOnSide( localDir );
}