From 5e31c8a26bc5d71e0b083dd507d48b19d11d25e5 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 8 Dec 2022 18:17:06 -0800 Subject: [PATCH] fix method rename issue in Camel --- patches/server/CB-fixes.patch | 16 ++++++++++++++++ patches/server/MC-Dev-fixes.patch | 13 +++++++++++++ 2 files changed, 29 insertions(+) diff --git a/patches/server/CB-fixes.patch b/patches/server/CB-fixes.patch index e721771f6f..541cb59c34 100644 --- a/patches/server/CB-fixes.patch +++ b/patches/server/CB-fixes.patch @@ -43,6 +43,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return false; // Paper - fix upstream } + @Override +diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java ++++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +@@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider + } + + @Override +- protected void actuallyHurt(DamageSource source, float amount) { ++ protected boolean damageEntity0(DamageSource source, float amount) { // Paper - fix CB method rename issue + this.standUpPanic(); +- super.actuallyHurt(source, amount); ++ return super.damageEntity0(source, amount); // Paper - fix CB method rename issue + } + @Override diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/server/MC-Dev-fixes.patch b/patches/server/MC-Dev-fixes.patch index 0dba2c6878..40857846df 100644 --- a/patches/server/MC-Dev-fixes.patch +++ b/patches/server/MC-Dev-fixes.patch @@ -131,6 +131,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } public static SortedArraySet create(Comparator comparator) { +diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java ++++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +@@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider + @Override + protected void customServerAiStep() { + this.level.getProfiler().push("camelBrain"); +- Brain brain = this.getBrain(); ++ Brain brain = (Brain) this.getBrain(); // Paper - decompile fix + brain.tick((ServerLevel)this.level, this); + this.level.getProfiler().pop(); + this.level.getProfiler().push("camelActivityUpdate"); diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java