9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-24 01:09:29 +00:00
Files
DivineMC/patches/server/0008-Fix-MC-172801.patch
NONPLAYT a87b3756b4 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@0601f87 Updated Upstream (Paper)
PurpurMC/Purpur@06dde9d Add Ridable and Attribute options for Creaking mob (#1613)
PurpurMC/Purpur@420a1ce Set the bee's `takes-damage-from-water` option to true by default (#1614)
PurpurMC/Purpur@2b6f273 Updated Upstream (Paper)
2024-11-28 01:00:39 +03:00

27 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sat, 27 Jan 2024 16:56:27 +0300
Subject: [PATCH] Fix MC-172801
Original post on Mojira: https://bugs.mojang.com/browse/MC-172801
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 734644edf9109ce0d0b059296d229f4877499c26..c18da64bb878a6fb1b1b9f9c1e9c3a2cc4c96e40 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3312,7 +3312,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
protected float getFlyingSpeed() {
- return this.getControllingPassenger() instanceof net.minecraft.world.entity.player.Player ? this.getSpeed() * 0.1F : 0.02F;
+ // DivineMC start - Fix MC-172801
+ float flyingSpeed = 0.02F;
+ if (this.getAttributes().hasAttribute(Attributes.FLYING_SPEED)) {
+ flyingSpeed = (float) (this.getAttribute(Attributes.FLYING_SPEED).getValue() * 0.049999999254942D);
+ }
+ return this.getControllingPassenger() instanceof net.minecraft.world.entity.player.Player ? this.getSpeed() * 0.1F : flyingSpeed;
+ // DivineMC end
}
public float getSpeed() {