Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -1,16 +1,16 @@
--- a/net/minecraft/world/level/block/PowderSnowBlock.java
+++ b/net/minecraft/world/level/block/PowderSnowBlock.java
@@ -68,7 +68,12 @@
@@ -69,7 +69,12 @@
entity.o(true);
entity.setIsInPowderSnow(true);
if (!world.isClientSide) {
- if (entity.isBurning() && (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman) && entity.a(world, blockposition)) {
- if (entity.isOnFire() && (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman) && entity.mayInteract(world, blockposition)) {
+ // CraftBukkit start
+ if (entity.isBurning() && entity.a(world, blockposition)) {
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !(world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman)).isCancelled()) {
+ if (entity.isOnFire() && entity.mayInteract(world, blockposition)) {
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState(), !(world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman)).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.b(blockposition, false);
world.destroyBlock(blockposition, false);
}