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; }
public boolean a( ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l) { if (l == 0) { --j; } if (l == 1) { ++j; } if (l == 2) { --k; } if (l == 3) { ++k; } if (l == 4) { --i; } if (l == 5) { ++i; } int i1 = world.a(i, j, k); if (i1 == 0) { world.a( (double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "fire.ignite", 1.0F, b.nextFloat() * 0.4F + 0.8F); world.e(i, j, k, Block.FIRE.bi); } itemstack.b(1); return true; }
private boolean i() { if (h[0] == null) { return false; } ItemStack itemstack = FurnaceRecipes.a().a(h[0].a().ba); if (itemstack == null) { return false; } if (h[2] == null) { return true; } if (!h[2].a(itemstack)) { return false; } if (h[2].a < c() && h[2].a < h[2].b()) { return true; } return h[2].a < itemstack.b(); }