mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Digital Miner now only accepts cable connections on certain sides
This commit is contained in:
1 parent
44d9aa506f
commit
4a78cb65b1
4 files changed
+34
-13
No files matched your search
@@ -198,7 +198,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate)
|
||||
{
|
||||
if(getInv() == null)
|
||||
if(getInv() == null || !canReceiveEnergy(from))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
return false;
|
||||
}
|
||||
|
||||
return getInv().canConnectEnergy(from);
|
||||
return canReceiveEnergy(from);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,7 +286,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
@Override
|
||||
public double transferEnergyToAcceptor(ForgeDirection side, double amount)
|
||||
{
|
||||
if(getInv() == null)
|
||||
if(getInv() == null || !canReceiveEnergy(side))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
return false;
|
||||
}
|
||||
|
||||
return getInv().canReceiveEnergy(side);
|
||||
return getInv().canBoundReceiveEnergy(Coord4D.get(this), side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -321,7 +321,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
@Method(modid = "IC2")
|
||||
public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage)
|
||||
{
|
||||
if(getInv() == null)
|
||||
if(getInv() == null || !canReceiveEnergy(directionFrom))
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user