2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/ItemMapEmpty.java
|
|
|
|
+++ b/net/minecraft/server/ItemMapEmpty.java
|
2016-02-29 22:32:46 +01:00
|
|
|
@@ -7,16 +7,20 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2016-02-29 22:32:46 +01:00
|
|
|
public InteractionResultWrapper<ItemStack> a(ItemStack itemstack, World world, EntityHuman entityhuman, EnumHand enumhand) {
|
2014-11-25 22:32:16 +01:00
|
|
|
- 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
|
|
|
|
String s = "map_" + itemstack1.getData();
|
|
|
|
WorldMap worldmap = new WorldMap(s);
|
|
|
|
|
2014-12-17 16:23:36 +01:00
|
|
|
- world.a(s, (PersistentBase) worldmap);
|
2015-02-26 23:41:06 +01:00
|
|
|
+ worldMain.a(s, (PersistentBase) worldmap); // CraftBukkit
|
2014-11-25 22:32:16 +01:00
|
|
|
worldmap.scale = 0;
|
|
|
|
worldmap.a(entityhuman.locX, entityhuman.locZ, worldmap.scale);
|
2016-03-10 06:42:07 +01:00
|
|
|
- worldmap.map = (byte) world.worldProvider.getDimensionManager().getDimensionID();
|
|
|
|
+ worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - use bukkit dimension
|
2016-02-29 22:32:46 +01:00
|
|
|
worldmap.track = true;
|
2014-11-25 22:32:16 +01:00
|
|
|
worldmap.c();
|
2015-02-26 23:41:06 +01:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callEvent(new org.bukkit.event.server.MapInitializeEvent(worldmap.mapView)); // CraftBukkit
|
2015-02-26 23:41:06 +01:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
--itemstack.count;
|
|
|
|
if (itemstack.count <= 0) {
|
2016-02-29 22:32:46 +01:00
|
|
|
return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack1);
|