Update to Minecraft 1.18-pre8

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-25 08:00:00 +11:00
parent 0d839e926c
commit 799bfc92e2
30 changed files with 206 additions and 758 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/animal/EntitySnowman.java
+++ b/net/minecraft/world/entity/animal/EntitySnowman.java
@@ -40,6 +40,10 @@
@@ -41,6 +41,10 @@
import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.phys.Vec3D;
@@ -11,25 +11,25 @@
public class EntitySnowman extends EntityGolem implements IShearable, IRangedEntity {
private static final DataWatcherObject<Byte> DATA_PUMPKIN_ID = DataWatcher.defineId(EntitySnowman.class, DataWatcherRegistry.BYTE);
@@ -100,7 +104,7 @@
int k = MathHelper.floor(this.getZ());
@@ -103,7 +107,7 @@
BiomeBase biomebase = this.level.getBiome(blockposition);
if (this.level.getBiome(new BlockPosition(i, 0, k)).getTemperature(new BlockPosition(i, j, k)) > 1.0F) {
if (biomebase.shouldSnowGolemBurn(blockposition)) {
- this.hurt(DamageSource.ON_FIRE, 1.0F);
+ this.hurt(CraftEventFactory.MELTING, 1.0F); // CraftBukkit - DamageSource.BURN -> CraftEventFactory.MELTING
}
if (!this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
@@ -116,7 +120,7 @@
BlockPosition blockposition = new BlockPosition(i, j, k);
@@ -119,7 +123,7 @@
BlockPosition blockposition1 = new BlockPosition(i, j, k);
if (this.level.getBlockState(blockposition).isAir() && this.level.getBiome(blockposition).getTemperature(blockposition) < 0.8F && iblockdata.canSurvive(this.level, blockposition)) {
- this.level.setBlockAndUpdate(blockposition, iblockdata);
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level, blockposition, iblockdata, this); // CraftBukkit
if (this.level.getBlockState(blockposition1).isAir() && iblockdata.canSurvive(this.level, blockposition1)) {
- this.level.setBlockAndUpdate(blockposition1, iblockdata);
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level, blockposition1, iblockdata, this); // CraftBukkit
}
}
}
@@ -147,6 +151,11 @@
@@ -150,6 +154,11 @@
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
@@ -41,7 +41,7 @@
this.shear(SoundCategory.PLAYERS);
this.gameEvent(GameEvent.SHEAR, (Entity) entityhuman);
if (!this.level.isClientSide) {
@@ -166,7 +175,9 @@
@@ -169,7 +178,9 @@
this.level.playSound((EntityHuman) null, (Entity) this, SoundEffects.SNOW_GOLEM_SHEAR, soundcategory, 1.0F, 1.0F);
if (!this.level.isClientSide()) {
this.setPumpkin(false);