- Fixed stabilizer bearings not always rotating their head against parent transform
- Windmill bearings now display a tooltip when waiting to be updated by a player
- Removed obsolete overrides from hotswapping streak
This commit is contained in:
simibubi 2020-11-20 16:28:57 +01:00
parent 1961f9afdc
commit 4c960ef1ed
3 changed files with 5 additions and 14 deletions

View file

@ -78,11 +78,6 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
return true;
}
@Override
protected void addPassenger(Entity passenger) {
super.addPassenger(passenger);
}
public void addSittingPassenger(Entity passenger, int seatIndex) {
passenger.startRiding(this, true);
if (world.isRemote)
@ -93,11 +88,6 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
new ContraptionSeatMappingPacket(getEntityId(), contraption.getSeatMapping()));
}
@Override
public void remove() {
super.remove();
}
@Override
protected void removePassenger(Entity passenger) {
Vec3d transformedVector = getPassengerPosition(passenger, 1);

View file

@ -260,15 +260,14 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp
return true;
if (isPlayerSneaking)
return false;
if (isWindmill())
return false;
if (getSpeed() == 0)
if (!isWindmill() && getSpeed() == 0)
return false;
if (running)
return false;
BlockState state = getBlockState();
if (!(state.getBlock() instanceof BearingBlock))
return false;
BlockState attachedState = world.getBlockState(pos.offset(state.get(BearingBlock.FACING)));
if (attachedState.getMaterial()
.isReplaceable())

View file

@ -42,6 +42,8 @@ public class StabilizedBearingMovementBehaviour extends MovementBehaviour {
// rotate against parent
float offset = 0;
int offsetMultiplier = facing.getAxisDirection().getOffset();
AbstractContraptionEntity entity = context.contraption.entity;
if (entity instanceof ControlledContraptionEntity) {
ControlledContraptionEntity controlledCE = (ControlledContraptionEntity) entity;
@ -60,7 +62,7 @@ public class StabilizedBearingMovementBehaviour extends MovementBehaviour {
}
}
if (offset != 0)
superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(offset));
superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(offset * offsetMultiplier));
// render
superBuffer.light(msLocal.peek()