mirror of
https://github.com/PaperMC/Paper.git
synced 2024-07-03 02:05:02 +02:00
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 CraftBukkit Changes: e1fc95c50 Fix crash with 1.20 smithing table 04dfb921d Fix crash with juke boxes 1264a6fb5 Fix crash with composters
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Tue, 14 Mar 2023 20:03:21 -0700
|
|
Subject: [PATCH] Fix sniffer
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
index efcfce93d17507bb6cc870a94eaa777429050d18..5719172a31f005ce419f365011d53712a9b2820f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
@@ -74,12 +74,20 @@ public class Sniffer extends Animal {
|
|
|
|
public Sniffer(EntityType<? extends Animal> type, Level world) {
|
|
super(type, world);
|
|
- this.entityData.define(DATA_STATE, Sniffer.State.IDLING);
|
|
- this.entityData.define(DATA_DROP_SEED_AT_TICK, 0);
|
|
+ // Paper - move to defineSyncedData
|
|
this.getNavigation().setCanFloat(true);
|
|
this.setPathfindingMalus(BlockPathTypes.WATER, -2.0F);
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ protected void defineSynchedData() {
|
|
+ super.defineSynchedData();
|
|
+ this.entityData.define(DATA_STATE, Sniffer.State.IDLING);
|
|
+ this.entityData.define(DATA_DROP_SEED_AT_TICK, 0);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
protected float getStandingEyeHeight(Pose pose, EntityDimensions dimensions) {
|
|
return this.getDimensions(pose).height * 0.6F;
|
|
@@ -388,7 +396,7 @@ public class Sniffer extends Animal {
|
|
|
|
@Override
|
|
public Brain<Sniffer> getBrain() {
|
|
- return super.getBrain();
|
|
+ return (Brain<Sniffer>) super.getBrain(); // Paper - decompile issue
|
|
}
|
|
|
|
@Override
|