From 3e1ce88947ebaa0f0433c4c9a799a0c9a5418433 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Jul 2013 19:35:01 +1000 Subject: [PATCH] Update to latest CB --- CraftBukkit | 2 +- ...058-Entity-Mount-and-Dismount-Events.patch | 18 ++++----- ... => 0062-Console-Command-Completion.patch} | 2 +- ...ne-Ambient-Setting-of-Potion-Effects.patch | 39 ------------------- ...63-Fix-StructureGrowEvent.getPlayer.patch} | 2 +- ...64-Client-Crash-Cannot-Send-Message.patch} | 2 +- ...> 0065-Entity-ticking-chunk-caching.patch} | 5 +-- 7 files changed, 15 insertions(+), 55 deletions(-) rename CraftBukkit-Patches/{0063-Console-Command-Completion.patch => 0062-Console-Command-Completion.patch} (98%) delete mode 100644 CraftBukkit-Patches/0062-Define-Ambient-Setting-of-Potion-Effects.patch rename CraftBukkit-Patches/{0064-Fix-StructureGrowEvent.getPlayer.patch => 0063-Fix-StructureGrowEvent.getPlayer.patch} (93%) rename CraftBukkit-Patches/{0065-Client-Crash-Cannot-Send-Message.patch => 0064-Client-Crash-Cannot-Send-Message.patch} (93%) rename CraftBukkit-Patches/{0066-Entity-ticking-chunk-caching.patch => 0065-Entity-ticking-chunk-caching.patch} (97%) diff --git a/CraftBukkit b/CraftBukkit index 2a13a5af32..dc253127ad 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit 2a13a5af3218bf2cacfa791cf70cec417e0fdbd5 +Subproject commit dc253127ad2546e051d57e3b5cc09e31492f91ae diff --git a/CraftBukkit-Patches/0058-Entity-Mount-and-Dismount-Events.patch b/CraftBukkit-Patches/0058-Entity-Mount-and-Dismount-Events.patch index b849f2a230..d0d8738e4f 100644 --- a/CraftBukkit-Patches/0058-Entity-Mount-and-Dismount-Events.patch +++ b/CraftBukkit-Patches/0058-Entity-Mount-and-Dismount-Events.patch @@ -1,22 +1,22 @@ -From 41deff2d75cd3ee5da3a104b05d964a8d77736dd Mon Sep 17 00:00:00 2001 +From f7d44988922838f78b93465580dc27ec4e8067bb Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 20:32:49 +1000 Subject: [PATCH] Entity Mount and Dismount Events diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d4bd4ed..0653ff2 100644 +index 9c737ec..ee1ce90 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1421,6 +1421,7 @@ public abstract class Entity { - pluginManager.callEvent(event); +@@ -1427,6 +1427,7 @@ public abstract class Entity { + } } // CraftBukkit end + pluginManager.callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot this.setPositionRotation(this.vehicle.locX, this.vehicle.boundingBox.b + (double) this.vehicle.length, this.vehicle.locZ, this.yaw, this.pitch); this.vehicle.passenger = null; -@@ -1438,6 +1439,17 @@ public abstract class Entity { +@@ -1462,6 +1463,17 @@ public abstract class Entity { } } // CraftBukkit end @@ -35,7 +35,7 @@ index d4bd4ed..0653ff2 100644 if (this.vehicle != null) { this.vehicle.passenger = null; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 963bc55..204ee9d 100644 +index e1a3ca1..adb27d8 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -304,6 +304,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen @@ -43,9 +43,9 @@ index 963bc55..204ee9d 100644 // CraftBukkit end if (this.vehicle != null && entity == null) { + world.getServer().getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent( this.getBukkitEntity(), this.vehicle.getBukkitEntity() ) ); // Spigot - if (!this.world.isStatic) { - this.l(this.vehicle); - } + // CraftBukkit start - use parent method instead to correctly fire VehicleExitEvent + Entity originalVehicle = this.vehicle; + // First statement moved down, second statement handled in parent method. -- 1.8.1.2 diff --git a/CraftBukkit-Patches/0063-Console-Command-Completion.patch b/CraftBukkit-Patches/0062-Console-Command-Completion.patch similarity index 98% rename from CraftBukkit-Patches/0063-Console-Command-Completion.patch rename to CraftBukkit-Patches/0062-Console-Command-Completion.patch index 758373b883..470013bb88 100644 --- a/CraftBukkit-Patches/0063-Console-Command-Completion.patch +++ b/CraftBukkit-Patches/0062-Console-Command-Completion.patch @@ -1,4 +1,4 @@ -From c88c2a44162732adaeb8ccf4c7b355f2585965dd Mon Sep 17 00:00:00 2001 +From 4f18b70047255bbd18202656c6e95333ec9cac58 Mon Sep 17 00:00:00 2001 From: Phillip Schichtel Date: Fri, 5 Jul 2013 21:55:00 +1000 Subject: [PATCH] Console Command Completion diff --git a/CraftBukkit-Patches/0062-Define-Ambient-Setting-of-Potion-Effects.patch b/CraftBukkit-Patches/0062-Define-Ambient-Setting-of-Potion-Effects.patch deleted file mode 100644 index 22288c75af..0000000000 --- a/CraftBukkit-Patches/0062-Define-Ambient-Setting-of-Potion-Effects.patch +++ /dev/null @@ -1,39 +0,0 @@ -From af786a920ab177e4f00249244163327ccf02a660 Mon Sep 17 00:00:00 2001 -From: Jim Bilbrey -Date: Wed, 19 Jun 2013 05:38:05 -0400 -Subject: [PATCH] Define Ambient Setting of Potion Effects - -Use ambient setting of potion effects. Fixes BUKKIT-4357 and BUKKIT-3653 - -This changes livingEntity.addPotionEffect(PotionEffect, boolean) to -construct the MobEffect using the constructor that includes the ambient -setting as supplied by the PotionEffect - -This also changes livingEntity.getActivePotionEffects() to construct the -PotionEffects using the ambient setting supplied by the MobEffects. - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 3db1b22..443dde9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -258,7 +258,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - } - removePotionEffect(effect.getType()); - } -- getHandle().addEffect(new MobEffect(effect.getType().getId(), effect.getDuration(), effect.getAmplifier())); -+ getHandle().addEffect(new MobEffect(effect.getType().getId(), effect.getDuration(), effect.getAmplifier(), effect.isAmbient())); - return true; - } - -@@ -284,7 +284,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - if (!(raw instanceof MobEffect)) - continue; - MobEffect handle = (MobEffect) raw; -- effects.add(new PotionEffect(PotionEffectType.getById(handle.getEffectId()), handle.getDuration(), handle.getAmplifier())); -+ effects.add(new PotionEffect(PotionEffectType.getById(handle.getEffectId()), handle.getDuration(), handle.getAmplifier(), handle.isAmbient())); - } - return effects; - } --- -1.8.1.2 - diff --git a/CraftBukkit-Patches/0064-Fix-StructureGrowEvent.getPlayer.patch b/CraftBukkit-Patches/0063-Fix-StructureGrowEvent.getPlayer.patch similarity index 93% rename from CraftBukkit-Patches/0064-Fix-StructureGrowEvent.getPlayer.patch rename to CraftBukkit-Patches/0063-Fix-StructureGrowEvent.getPlayer.patch index 5dacb8d03b..a7de55faac 100644 --- a/CraftBukkit-Patches/0064-Fix-StructureGrowEvent.getPlayer.patch +++ b/CraftBukkit-Patches/0063-Fix-StructureGrowEvent.getPlayer.patch @@ -1,4 +1,4 @@ -From f6d9dd6ce30df450863c96dc96c4e529bd9107ea Mon Sep 17 00:00:00 2001 +From dca5c08d448139c00b6ed47389ebdd996b2c10df Mon Sep 17 00:00:00 2001 From: ItsHarry Date: Wed, 10 Jul 2013 13:45:08 +0200 Subject: [PATCH] Fix StructureGrowEvent.getPlayer() diff --git a/CraftBukkit-Patches/0065-Client-Crash-Cannot-Send-Message.patch b/CraftBukkit-Patches/0064-Client-Crash-Cannot-Send-Message.patch similarity index 93% rename from CraftBukkit-Patches/0065-Client-Crash-Cannot-Send-Message.patch rename to CraftBukkit-Patches/0064-Client-Crash-Cannot-Send-Message.patch index 81827d013a..834d1a64b0 100644 --- a/CraftBukkit-Patches/0065-Client-Crash-Cannot-Send-Message.patch +++ b/CraftBukkit-Patches/0064-Client-Crash-Cannot-Send-Message.patch @@ -1,4 +1,4 @@ -From ab716ebdb094de8cdd3966c4cad572a130614258 Mon Sep 17 00:00:00 2001 +From cfcb22091f17aaaa97c59f86bc53598d2ea65feb Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 10 Jul 2013 23:46:09 +1000 Subject: [PATCH] Client Crash Cannot Send Message diff --git a/CraftBukkit-Patches/0066-Entity-ticking-chunk-caching.patch b/CraftBukkit-Patches/0065-Entity-ticking-chunk-caching.patch similarity index 97% rename from CraftBukkit-Patches/0066-Entity-ticking-chunk-caching.patch rename to CraftBukkit-Patches/0065-Entity-ticking-chunk-caching.patch index 8020b5e373..511a2b7178 100644 --- a/CraftBukkit-Patches/0066-Entity-ticking-chunk-caching.patch +++ b/CraftBukkit-Patches/0065-Entity-ticking-chunk-caching.patch @@ -1,11 +1,10 @@ -From 86d9d652ef35abc3f1f29706f5c0fd4429779540 Mon Sep 17 00:00:00 2001 +From 5fd90c3a39b60c85b663c32ea4cdfcadf48c135a Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Tue, 16 Jul 2013 03:32:32 +0500 Subject: [PATCH] Entity ticking chunk caching Cache known loaded chunks so we avoid making a potentially expensive contains call for every single entity in exchange for some simple arithmetic. Best case scenario, this cuts down contains call to once per chunk, worst case it adds on some simple arithmetic operations - diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 8bd7876..ba1c1ca 100644 --- a/src/main/java/net/minecraft/server/World.java @@ -63,5 +62,5 @@ index 8bd7876..ba1c1ca 100644 if (entity.vehicle != null) { if (!entity.vehicle.dead && entity.vehicle.passenger == entity) { -- -1.8.1.msysgit.1 +1.8.1.2