Fixed orbit manager radius
This commit is contained in:
parent
14d3054e5b
commit
ed2868d981
2 changed files with 11 additions and 36 deletions
|
@ -1,14 +1,12 @@
|
|||
package dark.library.machine;
|
||||
|
||||
import ic2.api.Direction;
|
||||
import ic2.api.energy.event.EnergyTileLoadEvent;
|
||||
import ic2.api.energy.event.EnergyTileUnloadEvent;
|
||||
import ic2.api.energy.tile.IEnergySink;
|
||||
import ic2.api.Direction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
@ -16,14 +14,13 @@ import universalelectricity.core.UniversalElectricity;
|
|||
import universalelectricity.core.block.IConnector;
|
||||
import universalelectricity.core.block.IVoltage;
|
||||
import universalelectricity.core.electricity.ElectricityPack;
|
||||
import universalelectricity.prefab.implement.IRotatable;
|
||||
import universalelectricity.prefab.tile.TileEntityElectricityRunnable;
|
||||
import buildcraft.api.power.IPowerProvider;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
import buildcraft.api.power.PowerFramework;
|
||||
import dark.core.power.PowerSystems;
|
||||
|
||||
public class TileEntityRunnableMachine extends TileEntityElectricityRunnable implements IPowerReceptor, IEnergySink, IConnector, IVoltage
|
||||
public abstract class TileEntityRunnableMachine extends TileEntityElectricityRunnable implements IPowerReceptor, IEnergySink, IConnector, IVoltage
|
||||
{
|
||||
public static String powerToggleItemID = "battery";
|
||||
|
||||
|
@ -33,14 +30,7 @@ public class TileEntityRunnableMachine extends TileEntityElectricityRunnable imp
|
|||
|
||||
public TileEntityRunnableMachine()
|
||||
{
|
||||
if (PowerFramework.currentFramework != null)
|
||||
{
|
||||
if (this.powerProvider == null)
|
||||
{
|
||||
this.powerProvider = PowerFramework.currentFramework.createPowerProvider();
|
||||
this.powerProvider.configure(0, 0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,7 +87,14 @@ public class TileEntityRunnableMachine extends TileEntityElectricityRunnable imp
|
|||
{
|
||||
this.wattsReceived += Math.max(this.getWattBuffer() - this.wattsReceived, 0);
|
||||
}
|
||||
|
||||
if (PowerFramework.currentFramework != null)
|
||||
{
|
||||
if (this.powerProvider == null)
|
||||
{
|
||||
this.powerProvider = PowerFramework.currentFramework.createPowerProvider();
|
||||
this.powerProvider.configure(0, 0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
if (this.powerProvider != null)
|
||||
{
|
||||
int requiredEnergy = (int) (this.getRequest().getWatts() * UniversalElectricity.TO_BC_RATIO);
|
||||
|
@ -106,27 +103,6 @@ public class TileEntityRunnableMachine extends TileEntityElectricityRunnable imp
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection direction)
|
||||
{
|
||||
if (this instanceof IRotatable)
|
||||
{
|
||||
return direction == ForgeDirection.getOrientation(this.getBlockMetadata()).getOpposite();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public ForgeDirection getDirection(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
}
|
||||
|
||||
public void setDirection(World world, int x, int y, int z, ForgeDirection facingDirection)
|
||||
{
|
||||
this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, facingDirection.ordinal(), 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* IC2
|
||||
*/
|
||||
|
|
|
@ -100,7 +100,6 @@ public class Quaternion
|
|||
public Vector3 multi(Vector3 vec)
|
||||
{
|
||||
Vector3 vn = vec.clone();
|
||||
vn.normalize();
|
||||
|
||||
Quaternion vecQuat = new Quaternion(0, 0, 0, 1), resQuat;
|
||||
vecQuat.x = (float) vn.x;
|
||||
|
|
Loading…
Reference in a new issue