mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-12 02:35:52 -07:00
Update to Minecraft 1.9
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user