Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -19,14 +19,6 @@
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
- if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
- EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world);
-
- entityendermite.setPlayerSpawned(true);
- entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
- this.world.addEntity(entityendermite);
- }
-
- if (entityliving.isPassenger()) {
- entityliving.stopRiding();
+ // CraftBukkit start - Fire PlayerTeleportEvent
+ org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity();
+ org.bukkit.Location location = getBukkitEntity().getLocation();
@@ -39,12 +31,17 @@
+ if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
+ if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
+ EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world);
+
- entityendermite.setPlayerSpawned(true);
+ entityendermite.setPlayerSpawned(true);
+ entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
entityendermite.setPositionRotation(entityliving.locX(), entityliving.locY(), entityliving.locZ(), entityliving.yaw, entityliving.pitch);
- this.world.addEntity(entityendermite);
- }
+ this.world.addEntity(entityendermite, CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
+ }
+
- if (entityliving.isPassenger()) {
- entityliving.stopRiding();
+ if (entityliving.isPassenger()) {
+ entityliving.stopRiding();
+ }
@@ -56,10 +53,10 @@
+ CraftEventFactory.entityDamage = null;
}
-
- entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
- entityliving.enderTeleportTo(this.locX(), this.locY(), this.locZ());
- entityliving.fallDistance = 0.0F;
- entityliving.damageEntity(DamageSource.FALL, 5.0F);
+ // CraftBukkit end
}
} else if (entityliving != null) {
entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
entityliving.enderTeleportTo(this.locX(), this.locY(), this.locZ());