Allows generator blocks to output different speeds in different directions

It is currently impossible to for example make a block that both generates stress and that behaves as a gearshift in that it rotates differently on either side. This simple check should allow that to be possible in a much easier and more intuitive manner.
This commit is contained in:
Eriksonnaren 2021-10-21 23:27:55 +02:00 committed by GitHub
parent 63f3946309
commit d5aea05283
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,7 +156,7 @@ public class RotationPropagator {
} }
private static float getAxisModifier(KineticTileEntity te, Direction direction) { private static float getAxisModifier(KineticTileEntity te, Direction direction) {
if (!te.hasSource() || !(te instanceof DirectionalShaftHalvesTileEntity)) if (!(te.hasSource()||te.isSource()) || !(te instanceof DirectionalShaftHalvesTileEntity))
return 1; return 1;
Direction source = ((DirectionalShaftHalvesTileEntity) te).getSourceFacing(); Direction source = ((DirectionalShaftHalvesTileEntity) te).getSourceFacing();