mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-21 12:32:13 +00:00
Merged
This commit is contained in:
commit
1fbf9f1568
3 files changed
+12
-15
No files matched your search
@@ -52,17 +52,14 @@ public class SynchronizedMatrixData extends SynchronizedData<SynchronizedMatrixD
|
||||
{
|
||||
for(Coord4D coord : cells)
|
||||
{
|
||||
if(energy <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileEntity tile = coord.getTileEntity(world);
|
||||
|
||||
if(tile instanceof TileEntityInductionCell)
|
||||
{
|
||||
TileEntityInductionCell cell = (TileEntityInductionCell)tile;
|
||||
|
||||
cell.setEnergy(0);
|
||||
|
||||
double toAdd = Math.min(cell.getMaxEnergy(), energy);
|
||||
cell.setEnergy(toAdd);
|
||||
energy -= toAdd;
|
||||
|
||||
@@ -93,6 +93,7 @@ public class TileEntityDynamicTank extends TileEntityMultiblock<SynchronizedTank
|
||||
if(structure.fluidStored != null && structure.fluidStored.amount <= 0)
|
||||
{
|
||||
structure.fluidStored = null;
|
||||
markDirty();
|
||||
}
|
||||
|
||||
manageInventory();
|
||||
|
||||
@@ -79,6 +79,15 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
|
||||
{
|
||||
EnumSet set = EnumSet.allOf(ForgeDirection.class);
|
||||
set.remove(ForgeDirection.UNKNOWN);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
if(structure.locations.contains(Coord4D.get(this).getFromSide(side)))
|
||||
{
|
||||
set.remove(side);
|
||||
}
|
||||
}
|
||||
|
||||
return set;
|
||||
}
|
||||
|
||||
@@ -215,16 +224,6 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
|
||||
nbtTags.setBoolean("mode", mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scaled energy level for the GUI.
|
||||
* @param i - multiplier
|
||||
* @return scaled energy
|
||||
*/
|
||||
public int getScaledEnergyLevel(int i)
|
||||
{
|
||||
return (int)(getEnergy()*i / getMaxEnergy());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "CoFHCore")
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate)
|
||||
|
||||
Reference in new issue
Block a user