mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Clean up
- 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:
parent
1961f9afdc
commit
4c960ef1ed
3 changed files with 5 additions and 14 deletions
|
@ -78,11 +78,6 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void addPassenger(Entity passenger) {
|
|
||||||
super.addPassenger(passenger);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addSittingPassenger(Entity passenger, int seatIndex) {
|
public void addSittingPassenger(Entity passenger, int seatIndex) {
|
||||||
passenger.startRiding(this, true);
|
passenger.startRiding(this, true);
|
||||||
if (world.isRemote)
|
if (world.isRemote)
|
||||||
|
@ -93,11 +88,6 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
||||||
new ContraptionSeatMappingPacket(getEntityId(), contraption.getSeatMapping()));
|
new ContraptionSeatMappingPacket(getEntityId(), contraption.getSeatMapping()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void remove() {
|
|
||||||
super.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void removePassenger(Entity passenger) {
|
protected void removePassenger(Entity passenger) {
|
||||||
Vec3d transformedVector = getPassengerPosition(passenger, 1);
|
Vec3d transformedVector = getPassengerPosition(passenger, 1);
|
||||||
|
|
|
@ -260,15 +260,14 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp
|
||||||
return true;
|
return true;
|
||||||
if (isPlayerSneaking)
|
if (isPlayerSneaking)
|
||||||
return false;
|
return false;
|
||||||
if (isWindmill())
|
if (!isWindmill() && getSpeed() == 0)
|
||||||
return false;
|
|
||||||
if (getSpeed() == 0)
|
|
||||||
return false;
|
return false;
|
||||||
if (running)
|
if (running)
|
||||||
return false;
|
return false;
|
||||||
BlockState state = getBlockState();
|
BlockState state = getBlockState();
|
||||||
if (!(state.getBlock() instanceof BearingBlock))
|
if (!(state.getBlock() instanceof BearingBlock))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
BlockState attachedState = world.getBlockState(pos.offset(state.get(BearingBlock.FACING)));
|
BlockState attachedState = world.getBlockState(pos.offset(state.get(BearingBlock.FACING)));
|
||||||
if (attachedState.getMaterial()
|
if (attachedState.getMaterial()
|
||||||
.isReplaceable())
|
.isReplaceable())
|
||||||
|
|
|
@ -42,6 +42,8 @@ public class StabilizedBearingMovementBehaviour extends MovementBehaviour {
|
||||||
|
|
||||||
// rotate against parent
|
// rotate against parent
|
||||||
float offset = 0;
|
float offset = 0;
|
||||||
|
int offsetMultiplier = facing.getAxisDirection().getOffset();
|
||||||
|
|
||||||
AbstractContraptionEntity entity = context.contraption.entity;
|
AbstractContraptionEntity entity = context.contraption.entity;
|
||||||
if (entity instanceof ControlledContraptionEntity) {
|
if (entity instanceof ControlledContraptionEntity) {
|
||||||
ControlledContraptionEntity controlledCE = (ControlledContraptionEntity) entity;
|
ControlledContraptionEntity controlledCE = (ControlledContraptionEntity) entity;
|
||||||
|
@ -60,7 +62,7 @@ public class StabilizedBearingMovementBehaviour extends MovementBehaviour {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(offset));
|
superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(offset * offsetMultiplier));
|
||||||
|
|
||||||
// render
|
// render
|
||||||
superBuffer.light(msLocal.peek()
|
superBuffer.light(msLocal.peek()
|
||||||
|
|
Loading…
Reference in a new issue