mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-11 04:22:00 +01:00
Stop flying your vehicle
This commit is contained in:
parent
405b7cbc36
commit
85200fe48f
3 changed files with 4 additions and 2 deletions
|
@ -340,8 +340,8 @@ public class ContraptionCollider {
|
|||
contraptionEntity.registerColliding(entity);
|
||||
entity.fallDistance = 0;
|
||||
for (Entity rider : entity.getIndirectPassengers())
|
||||
if (rider instanceof ServerPlayer playerRider)
|
||||
playerRider.connection.aboveGroundTickCount = 0;
|
||||
if (getPlayerType(rider) == PlayerType.CLIENT)
|
||||
AllPackets.channel.sendToServer(new ClientMotionPacket(rider.getDeltaMovement(), true, 0));
|
||||
boolean canWalk = bounce != 0 || slide == 0;
|
||||
if (canWalk || !rotation.hasVerticalRotation()) {
|
||||
if (canWalk)
|
||||
|
|
|
@ -53,6 +53,7 @@ public class ClientMotionPacket extends SimplePacketBase {
|
|||
sender.causeFallDamage(sender.fallDistance, 1, DamageSource.FALL);
|
||||
sender.fallDistance = 0;
|
||||
sender.connection.aboveGroundTickCount = 0;
|
||||
sender.connection.aboveGroundVehicleTickCount = 0;
|
||||
}
|
||||
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> sender),
|
||||
new LimbSwingUpdatePacket(sender.getId(), sender.position(), limbSwing));
|
||||
|
|
|
@ -11,6 +11,7 @@ public-f net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket f_
|
|||
|
||||
public net.minecraft.server.MinecraftServer f_129744_ # storageSource
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl f_9737_ # aboveGroundTickCount
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl f_9739_ # aboveGroundVehicleTickCount
|
||||
|
||||
public net.minecraft.world.entity.Entity f_146795_ # removalReason
|
||||
protected net.minecraft.world.entity.Entity m_19956_(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/entity/Entity$MoveFunction;)V # positionRider
|
||||
|
|
Loading…
Reference in a new issue