Merge branch 'mc1.15/dev' into mc1.16/dev

This commit is contained in:
simibubi 2021-03-31 15:23:18 +02:00
commit e82f9221b7
4 changed files with 16 additions and 3 deletions

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.components.actors;
import javax.annotation.Nullable;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
@ -15,8 +17,6 @@ import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
public class DrillMovementBehaviour extends BlockBreakingMovementBehaviour {
@Override

View file

@ -102,6 +102,11 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
public void onSpeedChanged(float prevSpeed) {
super.onSpeedChanged(prevSpeed);
assembleNextTick = true;
if (movedContraption != null && Math.signum(prevSpeed) != Math.signum(getSpeed()) && prevSpeed != 0) {
movedContraption.getContraption()
.stop(world);
}
}
public float getAngularSpeed() {

View file

@ -69,6 +69,8 @@ public class GantryContraptionEntity extends AbstractContraptionEntity {
if (!isStalled() && ticksExisted > 2)
move(movementVec.x, movementVec.y, movementVec.z);
if (Math.signum(prevAxisMotion) != Math.signum(axisMotion) && prevAxisMotion != 0)
contraption.stop(world);
if (!world.isRemote && (prevAxisMotion != axisMotion || ticksExisted % 3 == 0))
sendPacket();
}

View file

@ -21,7 +21,8 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
public abstract class LinearActuatorTileEntity extends KineticTileEntity implements IControlContraption, IDisplayAssemblyExceptions {
public abstract class LinearActuatorTileEntity extends KineticTileEntity
implements IControlContraption, IDisplayAssemblyExceptions {
public float offset;
public boolean running;
@ -148,6 +149,11 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity impleme
super.onSpeedChanged(prevSpeed);
assembleNextTick = true;
waitingForSpeedChange = false;
if (movedContraption != null && Math.signum(prevSpeed) != Math.signum(getSpeed()) && prevSpeed != 0) {
movedContraption.getContraption()
.stop(world);
}
}
@Override