Skip to content

Commit

Permalink
A bunch of bug fixes (#77)
Browse files Browse the repository at this point in the history
* Fix MC-200418
* Fix MC-119417
* Fix MC-223153
  • Loading branch information
HaHaWTH authored Jul 7, 2024
1 parent 26e0cd8 commit 1c28bb3
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
24 changes: 24 additions & 0 deletions patches/server/0081-Fix-MC-200418.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: HaHaWTH <[email protected]>
Date: Sun, 7 Jul 2024 01:29:57 +0800
Subject: [PATCH] Fix-MC-200418

Related MC issue: https://bugs.mojang.com/browse/MC-200418

diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
index 7ac5f6fc44fd5f901c30fe93856ed6b04b86a265..f6545e1703d6a957a051915effa4084427ff06fe 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -335,6 +335,12 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
world.levelEvent((Player) null, 1027, this.blockPosition(), 0);
}

+ // Leaf start - Fix MC-200418
+ if (entityvillager.isPassenger() && entityvillager.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && entityvillager.isBaby()) {
+ entityvillager.removeVehicle();
+ }
+ // Leaf end
+
}
}

19 changes: 19 additions & 0 deletions patches/server/0082-Fix-MC-119417.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: HaHaWTH <[email protected]>
Date: Sun, 7 Jul 2024 01:42:45 +0800
Subject: [PATCH] Fix-MC-119417

Related MC issue: https://bugs.mojang.com/browse/MC-119417

diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3a127806698edefafae06277ce6233fd6d2f1114..a9e8f3ef25859ccf3419a89e4b8b185a5bfca636 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2256,6 +2256,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId()));
if (gameMode == GameType.SPECTATOR) {
this.removeEntitiesOnShoulder();
+ this.stopSleeping(); // Leaf - Fix MC-119417
this.stopRiding();
EnchantmentHelper.stopLocationBasedEffects(this);
} else {
19 changes: 19 additions & 0 deletions patches/server/0083-Fix-MC-223153.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: HaHaWTH <[email protected]>
Date: Sun, 7 Jul 2024 01:59:11 +0800
Subject: [PATCH] Fix-MC-223153

Related MC issue: https://bugs.mojang.com/browse/MC-223153

diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java
index 7d58a95f7ae8983b466b275f4f82597d38762af0..6a2faa69e86123aeb902c2792bb225a6eaf8ba53 100644
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
@@ -7535,6 +7535,7 @@ public class Blocks {
.mapColor(MapColor.COLOR_ORANGE)
.instrument(NoteBlockInstrument.BASEDRUM)
.requiresCorrectToolForDrops()
+ .sound(SoundType.COPPER) // Leaf - Fix MC-223153
.strength(5.0F, 6.0F)
)
);

0 comments on commit 1c28bb3

Please sign in to comment.