mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Merge remote-tracking branch 'upstream/1.11' into 1.12
This commit is contained in:
commit
c9dc4c0ac0
468 files changed
+1602
-9935
No files matched your search
@@ -10,13 +10,13 @@ import ic2.api.energy.tile.IEnergyTile;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import mekanism.common.base.IEnergyWrapper;
|
||||
import mekanism.common.capabilities.Capabilities;
|
||||
import mekanism.common.capabilities.CapabilityWrapperManager;
|
||||
import mekanism.common.config.MekanismConfig.general;
|
||||
import mekanism.common.integration.forgeenergy.ForgeEnergyIntegration;
|
||||
import mekanism.common.integration.ic2.IC2Integration;
|
||||
import mekanism.common.integration.tesla.TeslaIntegration;
|
||||
import mekanism.common.util.CapabilityUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
@@ -56,7 +56,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
maxEnergy = BASE_MAX_ENERGY;
|
||||
}
|
||||
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public void register()
|
||||
{
|
||||
if(!world.isRemote)
|
||||
@@ -78,7 +78,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
}
|
||||
}
|
||||
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public void deregister()
|
||||
{
|
||||
if(!world.isRemote)
|
||||
@@ -256,28 +256,28 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public int getSinkTier()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public int getSourceTier()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public void setStored(int energy)
|
||||
{
|
||||
setEnergy(energy*general.FROM_IC2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public int addEnergy(int amount)
|
||||
{
|
||||
setEnergy(getEnergy() + amount*general.FROM_IC2);
|
||||
@@ -285,7 +285,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public boolean isTeleporterCompatible(EnumFacing side)
|
||||
{
|
||||
return sideIsOutput(side);
|
||||
@@ -298,49 +298,49 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public boolean acceptsEnergyFrom(IEnergyEmitter emitter, EnumFacing direction)
|
||||
{
|
||||
return sideIsConsumer(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing direction)
|
||||
{
|
||||
return sideIsOutput(direction) && receiver instanceof IEnergyConductor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public int getStored()
|
||||
{
|
||||
return (int)Math.round(Math.min(Integer.MAX_VALUE, getEnergy()*general.TO_IC2));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public int getCapacity()
|
||||
{
|
||||
return (int)Math.round(Math.min(Integer.MAX_VALUE, getMaxEnergy()*general.TO_IC2));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public int getOutput()
|
||||
{
|
||||
return (int)Math.round(Math.min(Integer.MAX_VALUE, getMaxOutput()*general.TO_IC2));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public double getDemandedEnergy()
|
||||
{
|
||||
return (getMaxEnergy() - getEnergy())*general.TO_IC2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public double getOfferedEnergy()
|
||||
{
|
||||
return Math.min(getEnergy(), getMaxOutput())*general.TO_IC2;
|
||||
@@ -353,14 +353,14 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public double getOutputEnergyUnitsPerTick()
|
||||
{
|
||||
return getMaxOutput()*general.TO_IC2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public double injectEnergy(EnumFacing direction, double amount, double voltage)
|
||||
{
|
||||
TileEntity tile = getWorld().getTileEntity(getPos().offset(direction));
|
||||
@@ -374,7 +374,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
@Method(modid = IC2Integration.MODID)
|
||||
public void drawEnergy(double amount)
|
||||
{
|
||||
setEnergy(Math.max(getEnergy() - (amount*general.FROM_IC2), 0));
|
||||
|
||||
Reference in new issue
Block a user