Update to Minecraft 1.18.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-03-01 02:00:00 +11:00
parent bd40300a4f
commit 9ee989ea81
184 changed files with 1785 additions and 1785 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
@@ -53,6 +53,18 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -51,6 +51,18 @@
import net.minecraft.world.phys.Vec3D;
import org.slf4j.Logger;
+// CraftBukkit start
+import net.minecraft.world.item.ItemStack;
@@ -18,8 +18,8 @@
+
public class EntityEnderDragon extends EntityInsentient implements IMonster {
private static final Logger LOGGER = LogManager.getLogger();
@@ -89,6 +101,7 @@
private static final Logger LOGGER = LogUtils.getLogger();
@@ -87,6 +99,7 @@
private final PathPoint[] nodes = new PathPoint[24];
private final int[] nodeAdjacency = new int[24];
private final Path openSet = new Path();
@@ -27,7 +27,7 @@
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
super(EntityTypes.ENDER_DRAGON, world);
@@ -236,7 +249,7 @@
@@ -234,7 +247,7 @@
Vec3D vec3d1 = idragoncontroller.getFlyTargetLocation();
@@ -36,7 +36,7 @@
d0 = vec3d1.x - this.getX();
d1 = vec3d1.y - this.getY();
d2 = vec3d1.z - this.getZ();
@@ -378,7 +391,14 @@
@@ -375,7 +388,14 @@
if (this.nearestCrystal.isRemoved()) {
this.nearestCrystal = null;
} else if (this.tickCount % 10 == 0 && this.getHealth() < this.getMaxHealth()) {
@@ -52,7 +52,7 @@
}
}
@@ -453,6 +473,9 @@
@@ -450,6 +470,9 @@
int j1 = MathHelper.floor(axisalignedbb.maxZ);
boolean flag = false;
boolean flag1 = false;
@@ -62,10 +62,10 @@
for (int k1 = i; k1 <= l; ++k1) {
for (int l1 = j; l1 <= i1; ++l1) {
@@ -462,7 +485,11 @@
@@ -459,7 +482,11 @@
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is((Tag) TagsBlock.DRAGON_IMMUNE)) {
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is(TagsBlock.DRAGON_IMMUNE)) {
- flag1 = this.level.removeBlock(blockposition, false) || flag1;
+ // CraftBukkit start - Add blocks to list rather than destroying them
+ // flag1 = this.level.removeBlock(blockposition, false) || flag1;
@@ -75,7 +75,7 @@
} else {
flag = true;
}
@@ -471,6 +498,51 @@
@@ -468,6 +495,51 @@
}
}

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
+++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
@@ -5,6 +5,11 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
import org.slf4j.Logger;
+// CraftBukkit start
+import org.bukkit.craftbukkit.entity.CraftEnderDragon;
@@ -11,7 +11,7 @@
+
public class DragonControllerManager {
private static final Logger LOGGER = LogManager.getLogger();
private static final Logger LOGGER = LogUtils.getLogger();
@@ -24,6 +29,19 @@
this.currentPhase.end();
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/boss/wither/EntityWither.java
+++ b/net/minecraft/world/entity/boss/wither/EntityWither.java
@@ -56,6 +56,17 @@
@@ -55,6 +55,17 @@
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.phys.Vec3D;
@@ -18,7 +18,7 @@
public class EntityWither extends EntityMonster implements PowerableMob, IRangedEntity {
private static final DataWatcherObject<Integer> DATA_TARGET_A = DataWatcher.defineId(EntityWither.class, DataWatcherRegistry.INT);
@@ -250,16 +261,40 @@
@@ -249,16 +260,40 @@
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
if (i <= 0) {
Explosion.Effect explosion_effect = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
@@ -62,7 +62,7 @@
}
} else {
@@ -304,6 +339,7 @@
@@ -303,6 +338,7 @@
if (!list.isEmpty()) {
EntityLiving entityliving1 = (EntityLiving) list.get(this.random.nextInt(list.size()));
@@ -70,7 +70,7 @@
this.setAlternativeTarget(i, entityliving1.getId());
}
}
@@ -334,6 +370,11 @@
@@ -333,6 +369,11 @@
IBlockData iblockdata = this.level.getBlockState(blockposition);
if (canDestroy(iblockdata)) {
@@ -82,7 +82,7 @@
flag = this.level.destroyBlock(blockposition, true, this) || flag;
}
}
@@ -347,7 +388,7 @@
@@ -346,7 +387,7 @@
}
if (this.tickCount % 20 == 0) {