mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
Update 1.19.2
fixed some bake bug left by 1.18.1
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Wed, 30 Mar 2022 08:58:45 +0000
|
||||
Subject: [PATCH] Add isShrink to EntityResurrectEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index cff7993bdafd2f69e46c9985c7601a69ae47f452..2dee51917888e20768f434b8232430094028b516 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1530,12 +1530,12 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
- EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity());
|
||||
+ EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), true);
|
||||
event.setCancelled(itemstack == null);
|
||||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
- if (!itemstack1.isEmpty()) {
|
||||
+ if (!itemstack1.isEmpty() && event.isShrink()) {
|
||||
itemstack1.shrink(1);
|
||||
}
|
||||
if (itemstack != null && this instanceof ServerPlayer) {
|
||||
@@ -4374,3 +4374,4 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
}
|
||||
}
|
||||
+
|
||||
Reference in New Issue
Block a user