geforkt von Mirrors/Paper
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
35 Zeilen
1.8 KiB
Diff
35 Zeilen
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sun, 26 Jan 2020 16:30:19 -0600
|
|
Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
|
index bdc9911f5a72d2f23a3a01d0420ac9ba6cb78570..d94f045d7fe928c256c5d3e1af02ac73d7897f5a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
|
@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
|
public Bee(EntityType<? extends Bee> type, Level world) {
|
|
super(type, world);
|
|
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);
|
|
- this.moveControl = new FlyingMoveControl(this, 20, true);
|
|
+ // Paper start - apply gravity to bees when they get stuck in the void, fixes MC-167279
|
|
+ class BeeFlyingMoveControl extends FlyingMoveControl {
|
|
+ public BeeFlyingMoveControl(final Mob entity, final int maxPitchChange, final boolean noGravity) {
|
|
+ super(entity, maxPitchChange, noGravity);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void tick() {
|
|
+ if (this.mob.getY() <= Bee.this.level.getMinBuildHeight()) {
|
|
+ this.mob.setNoGravity(false);
|
|
+ }
|
|
+ super.tick();
|
|
+ }
|
|
+ }
|
|
+ this.moveControl = new BeeFlyingMoveControl(this, 20, true);
|
|
+ // Paper end
|
|
this.lookControl = new Bee.BeeLookControl(this);
|
|
this.setPathfindingMalus(BlockPathTypes.DANGER_FIRE, -1.0F);
|
|
this.setPathfindingMalus(BlockPathTypes.WATER, -1.0F);
|