public void d(ItemStack itemstack, World world, EntityHuman entityhuman) { itemstack.b(world.b("map")); String s = "map_" + itemstack.getData(); WorldMap worldmap = new WorldMap(s); world.a(s, (WorldMapBase) worldmap); worldmap.b = MathHelper.floor(entityhuman.locX); worldmap.c = MathHelper.floor(entityhuman.locZ); worldmap.e = 3; worldmap.map = (byte) world.worldProvider.dimension; worldmap.a(); }
public WorldMap a(ItemStack itemstack, World world) { WorldMap worldmap = (WorldMap) world.a(WorldMap.class, "map_" + itemstack.getData()); if (worldmap == null) { itemstack.b(world.b("map")); String s = "map_" + itemstack.getData(); worldmap = new WorldMap(s); worldmap.b = world.r().c(); worldmap.c = world.r().e(); worldmap.e = 3; worldmap.map = (byte) world.worldProvider.dimension; worldmap.a(); world.a(s, (WorldMapBase) worldmap); } return worldmap; }