Fixed #176 - Generator only outputting in one side
This commit is contained in:
parent
c7d4525a9c
commit
15c44d5ef0
2 changed files with 2 additions and 4 deletions
|
@ -83,7 +83,7 @@ public class TileGenerator extends TileElectrical implements IRotatable
|
||||||
if (tile instanceof IMechanical)
|
if (tile instanceof IMechanical)
|
||||||
{
|
{
|
||||||
IMechanical mech = ((IMechanical) tile).getInstance(outputDir.getOpposite());
|
IMechanical mech = ((IMechanical) tile).getInstance(outputDir.getOpposite());
|
||||||
long extract = energy.extractEnergy(false);
|
long extract = energy.extractEnergy(energy.getEnergy() / 2, false);
|
||||||
|
|
||||||
if (mech != null)
|
if (mech != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,11 +80,9 @@ public class TileMixer extends TileMechanical
|
||||||
/**
|
/**
|
||||||
* Rotate entities around the mixer
|
* Rotate entities around the mixer
|
||||||
*/
|
*/
|
||||||
double speed = angularVelocity;
|
|
||||||
|
|
||||||
Vector3 originalPosition = new Vector3(entity);
|
Vector3 originalPosition = new Vector3(entity);
|
||||||
Vector3 relativePosition = originalPosition.clone().subtract(new Vector3(this).add(0.5));
|
Vector3 relativePosition = originalPosition.clone().subtract(new Vector3(this).add(0.5));
|
||||||
relativePosition.rotate(speed, 0, 0);
|
relativePosition.rotate(angularVelocity, 0, 0);
|
||||||
Vector3 newPosition = new Vector3(this).add(0.5).add(relativePosition);
|
Vector3 newPosition = new Vector3(this).add(0.5).add(relativePosition);
|
||||||
Vector3 difference = newPosition.difference(originalPosition).scale(0.5);
|
Vector3 difference = newPosition.difference(originalPosition).scale(0.5);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue