diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:32:46 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:32:45 +1100 |
commit | aa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch) | |
tree | cb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/ItemMapEmpty.patch | |
parent | e1ebe524a78e27f6a2829ed4574fded3779094e1 (diff) | |
download | craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip |
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/ItemMapEmpty.patch')
-rw-r--r-- | nms-patches/ItemMapEmpty.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nms-patches/ItemMapEmpty.patch b/nms-patches/ItemMapEmpty.patch index cc593bb8..6edb2d9b 100644 --- a/nms-patches/ItemMapEmpty.patch +++ b/nms-patches/ItemMapEmpty.patch @@ -1,9 +1,9 @@ --- a/net/minecraft/server/ItemMapEmpty.java +++ b/net/minecraft/server/ItemMapEmpty.java -@@ -7,15 +7,19 @@ +@@ -7,16 +7,20 @@ } - public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { + public InteractionResultWrapper<ItemStack> a(ItemStack itemstack, World world, EntityHuman entityhuman, EnumHand enumhand) { - ItemStack itemstack1 = new ItemStack(Items.FILLED_MAP, 1, world.b("map")); + World worldMain = world.getServer().getServer().worlds.get(0); // CraftBukkit - store reference to primary world + ItemStack itemstack1 = new ItemStack(Items.FILLED_MAP, 1, worldMain.b("map")); // CraftBukkit - use primary world for maps @@ -14,12 +14,12 @@ + worldMain.a(s, (PersistentBase) worldmap); // CraftBukkit worldmap.scale = 0; worldmap.a(entityhuman.locX, entityhuman.locZ, worldmap.scale); -- worldmap.map = (byte) world.worldProvider.getDimension(); -+ worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - use bukkit dimension + worldmap.map = (byte) world.worldProvider.getDimensionManager().getDimensionID(); + worldmap.track = true; worldmap.c(); + + org.bukkit.craftbukkit.event.CraftEventFactory.callEvent(new org.bukkit.event.server.MapInitializeEvent(worldmap.mapView)); // CraftBukkit + --itemstack.count; if (itemstack.count <= 0) { - return itemstack1; + return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack1); |