3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Updated to Minecraft version 1.2.4. Updated version string to 1.2.4-R0.1.

Dieser Commit ist enthalten in:
Nathan Adams 2012-03-22 20:39:39 +00:00
Ursprung 8dc7417a3d
Commit 9d09e7d016
94 geänderte Dateien mit 647 neuen und 1944 gelöschten Zeilen

Datei anzeigen

@ -4,7 +4,7 @@
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<packaging>jar</packaging>
<version>1.2.3-R0.3-SNAPSHOT</version>
<version>1.2.4-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name>
<url>http://www.bukkit.org</url>
@ -51,14 +51,14 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.2.3-R0.3-SNAPSHOT</version>
<version>1.2.4-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

Datei anzeigen

@ -25,37 +25,37 @@ public class Block {
public static final BlockGrass GRASS = (BlockGrass) (new BlockGrass(2)).c(0.6F).a(g).a("grass");
public static final Block DIRT = (new BlockDirt(3, 2)).c(0.5F).a(f).a("dirt");
public static final Block COBBLESTONE = (new Block(4, 16, Material.STONE)).c(2.0F).b(10.0F).a(h).a("stonebrick");
public static final Block WOOD = (new Block(5, 4, Material.WOOD)).c(2.0F).b(5.0F).a(e).a("wood").i();
public static final Block SAPLING = (new BlockSapling(6, 15)).c(0.0F).a(g).a("sapling").i();
public static final Block BEDROCK = (new Block(7, 17, Material.STONE)).k().b(6000000.0F).a(h).a("bedrock").r();
public static final Block WATER = (new BlockFlowing(8, Material.WATER)).c(100.0F).f(3).a("water").r().i();
public static final Block STATIONARY_WATER = (new BlockStationary(9, Material.WATER)).c(100.0F).f(3).a("water").r().i();
public static final Block LAVA = (new BlockFlowing(10, Material.LAVA)).c(0.0F).a(1.0F).f(255).a("lava").r().i();
public static final Block STATIONARY_LAVA = (new BlockStationary(11, Material.LAVA)).c(100.0F).a(1.0F).f(255).a("lava").r().i();
public static final Block WOOD = (new BlockWood(5)).c(2.0F).b(5.0F).a(e).a("wood").j();
public static final Block SAPLING = (new BlockSapling(6, 15)).c(0.0F).a(g).a("sapling").j();
public static final Block BEDROCK = (new Block(7, 17, Material.STONE)).l().b(6000000.0F).a(h).a("bedrock").s();
public static final Block WATER = (new BlockFlowing(8, Material.WATER)).c(100.0F).f(3).a("water").s().j();
public static final Block STATIONARY_WATER = (new BlockStationary(9, Material.WATER)).c(100.0F).f(3).a("water").s().j();
public static final Block LAVA = (new BlockFlowing(10, Material.LAVA)).c(0.0F).a(1.0F).f(255).a("lava").s().j();
public static final Block STATIONARY_LAVA = (new BlockStationary(11, Material.LAVA)).c(100.0F).a(1.0F).f(255).a("lava").s().j();
public static final Block SAND = (new BlockSand(12, 18)).c(0.5F).a(l).a("sand");
public static final Block GRAVEL = (new BlockGravel(13, 19)).c(0.6F).a(f).a("gravel");
public static final Block GOLD_ORE = (new BlockOre(14, 32)).c(3.0F).b(5.0F).a(h).a("oreGold");
public static final Block IRON_ORE = (new BlockOre(15, 33)).c(3.0F).b(5.0F).a(h).a("oreIron");
public static final Block COAL_ORE = (new BlockOre(16, 34)).c(3.0F).b(5.0F).a(h).a("oreCoal");
public static final Block LOG = (new BlockLog(17)).c(2.0F).a(e).a("log").i();
public static final BlockLeaves LEAVES = (BlockLeaves) (new BlockLeaves(18, 52)).c(0.2F).f(1).a(g).a("leaves").i();
public static final Block LOG = (new BlockLog(17)).c(2.0F).a(e).a("log").j();
public static final BlockLeaves LEAVES = (BlockLeaves) (new BlockLeaves(18, 52)).c(0.2F).f(1).a(g).a("leaves").j();
public static final Block SPONGE = (new BlockSponge(19)).c(0.6F).a(g).a("sponge");
public static final Block GLASS = (new BlockGlass(20, 49, Material.SHATTERABLE, false)).c(0.3F).a(j).a("glass");
public static final Block LAPIS_ORE = (new BlockOre(21, 160)).c(3.0F).b(5.0F).a(h).a("oreLapis");
public static final Block LAPIS_BLOCK = (new Block(22, 144, Material.STONE)).c(3.0F).b(5.0F).a(h).a("blockLapis");
public static final Block DISPENSER = (new BlockDispenser(23)).c(3.5F).a(h).a("dispenser").i();
public static final Block SANDSTONE = (new BlockSandStone(24)).a(h).c(0.8F).a("sandStone");
public static final Block NOTE_BLOCK = (new BlockNote(25)).c(0.8F).a("musicBlock").i();
public static final Block BED = (new BlockBed(26)).c(0.2F).a("bed").r().i();
public static final Block GOLDEN_RAIL = (new BlockMinecartTrack(27, 179, true)).c(0.7F).a(i).a("goldenRail").i();
public static final Block DETECTOR_RAIL = (new BlockMinecartDetector(28, 195)).c(0.7F).a(i).a("detectorRail").i();
public static final Block PISTON_STICKY = (new BlockPiston(29, 106, true)).a("pistonStickyBase").i();
public static final Block DISPENSER = (new BlockDispenser(23)).c(3.5F).a(h).a("dispenser").j();
public static final Block SANDSTONE = (new BlockSandStone(24)).a(h).c(0.8F).a("sandStone").j();
public static final Block NOTE_BLOCK = (new BlockNote(25)).c(0.8F).a("musicBlock").j();
public static final Block BED = (new BlockBed(26)).c(0.2F).a("bed").s().j();
public static final Block GOLDEN_RAIL = (new BlockMinecartTrack(27, 179, true)).c(0.7F).a(i).a("goldenRail").j();
public static final Block DETECTOR_RAIL = (new BlockMinecartDetector(28, 195)).c(0.7F).a(i).a("detectorRail").j();
public static final Block PISTON_STICKY = (new BlockPiston(29, 106, true)).a("pistonStickyBase").j();
public static final Block WEB = (new BlockWeb(30, 11)).f(1).c(4.0F).a("web");
public static final BlockLongGrass LONG_GRASS = (BlockLongGrass) (new BlockLongGrass(31, 39)).c(0.0F).a(g).a("tallgrass");
public static final BlockDeadBush DEAD_BUSH = (BlockDeadBush) (new BlockDeadBush(32, 55)).c(0.0F).a(g).a("deadbush");
public static final Block PISTON = (new BlockPiston(33, 107, false)).a("pistonBase").i();
public static final BlockPistonExtension PISTON_EXTENSION = (BlockPistonExtension) (new BlockPistonExtension(34, 107)).i();
public static final Block WOOL = (new BlockCloth()).c(0.8F).a(k).a("cloth").i();
public static final Block PISTON = (new BlockPiston(33, 107, false)).a("pistonBase").j();
public static final BlockPistonExtension PISTON_EXTENSION = (BlockPistonExtension) (new BlockPistonExtension(34, 107)).j();
public static final Block WOOL = (new BlockCloth()).c(0.8F).a(k).a("cloth").j();
public static final BlockPistonMoving PISTON_MOVING = new BlockPistonMoving(36);
public static final BlockFlower YELLOW_FLOWER = (BlockFlower) (new BlockFlower(37, 13)).c(0.0F).a(g).a("flower");
public static final BlockFlower RED_ROSE = (BlockFlower) (new BlockFlower(38, 12)).c(0.0F).a(g).a("rose");
@ -70,77 +70,77 @@ public class Block {
public static final Block BOOKSHELF = (new BlockBookshelf(47, 35)).c(1.5F).a(e).a("bookshelf");
public static final Block MOSSY_COBBLESTONE = (new Block(48, 36, Material.STONE)).c(2.0F).b(10.0F).a(h).a("stoneMoss");
public static final Block OBSIDIAN = (new BlockObsidian(49, 37)).c(50.0F).b(2000.0F).a(h).a("obsidian");
public static final Block TORCH = (new BlockTorch(50, 80)).c(0.0F).a(0.9375F).a(e).a("torch").i();
public static final BlockFire FIRE = (BlockFire) (new BlockFire(51, 31)).c(0.0F).a(1.0F).a(e).a("fire").r();
public static final Block MOB_SPAWNER = (new BlockMobSpawner(52, 65)).c(5.0F).a(i).a("mobSpawner").r();
public static final Block WOOD_STAIRS = (new BlockStairs(53, WOOD)).a("stairsWood").i();
public static final Block CHEST = (new BlockChest(54)).c(2.5F).a(e).a("chest").i();
public static final Block REDSTONE_WIRE = (new BlockRedstoneWire(55, 164)).c(0.0F).a(d).a("redstoneDust").r().i();
public static final Block TORCH = (new BlockTorch(50, 80)).c(0.0F).a(0.9375F).a(e).a("torch").j();
public static final BlockFire FIRE = (BlockFire) (new BlockFire(51, 31)).c(0.0F).a(1.0F).a(e).a("fire").s();
public static final Block MOB_SPAWNER = (new BlockMobSpawner(52, 65)).c(5.0F).a(i).a("mobSpawner").s();
public static final Block WOOD_STAIRS = (new BlockStairs(53, WOOD)).a("stairsWood").j();
public static final Block CHEST = (new BlockChest(54)).c(2.5F).a(e).a("chest").j();
public static final Block REDSTONE_WIRE = (new BlockRedstoneWire(55, 164)).c(0.0F).a(d).a("redstoneDust").s().j();
public static final Block DIAMOND_ORE = (new BlockOre(56, 50)).c(3.0F).b(5.0F).a(h).a("oreDiamond");
public static final Block DIAMOND_BLOCK = (new BlockOreBlock(57, 24)).c(5.0F).b(10.0F).a(i).a("blockDiamond");
public static final Block WORKBENCH = (new BlockWorkbench(58)).c(2.5F).a(e).a("workbench");
public static final Block CROPS = (new BlockCrops(59, 88)).c(0.0F).a(g).a("crops").r().i();
public static final Block SOIL = (new BlockSoil(60)).c(0.6F).a(f).a("farmland").i();
public static final Block FURNACE = (new BlockFurnace(61, false)).c(3.5F).a(h).a("furnace").i();
public static final Block BURNING_FURNACE = (new BlockFurnace(62, true)).c(3.5F).a(h).a(0.875F).a("furnace").i();
public static final Block SIGN_POST = (new BlockSign(63, TileEntitySign.class, true)).c(1.0F).a(e).a("sign").r().i();
public static final Block WOODEN_DOOR = (new BlockDoor(64, Material.WOOD)).c(3.0F).a(e).a("doorWood").r().i();
public static final Block LADDER = (new BlockLadder(65, 83)).c(0.4F).a(e).a("ladder").i();
public static final Block RAILS = (new BlockMinecartTrack(66, 128, false)).c(0.7F).a(i).a("rail").i();
public static final Block COBBLESTONE_STAIRS = (new BlockStairs(67, COBBLESTONE)).a("stairsStone").i();
public static final Block WALL_SIGN = (new BlockSign(68, TileEntitySign.class, false)).c(1.0F).a(e).a("sign").r().i();
public static final Block LEVER = (new BlockLever(69, 96)).c(0.5F).a(e).a("lever").i();
public static final Block STONE_PLATE = (new BlockPressurePlate(70, STONE.textureId, EnumMobType.MOBS, Material.STONE)).c(0.5F).a(h).a("pressurePlate").i();
public static final Block IRON_DOOR_BLOCK = (new BlockDoor(71, Material.ORE)).c(5.0F).a(i).a("doorIron").r().i();
public static final Block WOOD_PLATE = (new BlockPressurePlate(72, WOOD.textureId, EnumMobType.EVERYTHING, Material.WOOD)).c(0.5F).a(e).a("pressurePlate").i();
public static final Block REDSTONE_ORE = (new BlockRedstoneOre(73, 51, false)).c(3.0F).b(5.0F).a(h).a("oreRedstone").i();
public static final Block GLOWING_REDSTONE_ORE = (new BlockRedstoneOre(74, 51, true)).a(0.625F).c(3.0F).b(5.0F).a(h).a("oreRedstone").i();
public static final Block REDSTONE_TORCH_OFF = (new BlockRedstoneTorch(75, 115, false)).c(0.0F).a(e).a("notGate").i();
public static final Block REDSTONE_TORCH_ON = (new BlockRedstoneTorch(76, 99, true)).c(0.0F).a(0.5F).a(e).a("notGate").i();
public static final Block STONE_BUTTON = (new BlockButton(77, STONE.textureId)).c(0.5F).a(h).a("button").i();
public static final Block CROPS = (new BlockCrops(59, 88)).c(0.0F).a(g).a("crops").s().j();
public static final Block SOIL = (new BlockSoil(60)).c(0.6F).a(f).a("farmland").j();
public static final Block FURNACE = (new BlockFurnace(61, false)).c(3.5F).a(h).a("furnace").j();
public static final Block BURNING_FURNACE = (new BlockFurnace(62, true)).c(3.5F).a(h).a(0.875F).a("furnace").j();
public static final Block SIGN_POST = (new BlockSign(63, TileEntitySign.class, true)).c(1.0F).a(e).a("sign").s().j();
public static final Block WOODEN_DOOR = (new BlockDoor(64, Material.WOOD)).c(3.0F).a(e).a("doorWood").s().j();
public static final Block LADDER = (new BlockLadder(65, 83)).c(0.4F).a(e).a("ladder").j();
public static final Block RAILS = (new BlockMinecartTrack(66, 128, false)).c(0.7F).a(i).a("rail").j();
public static final Block COBBLESTONE_STAIRS = (new BlockStairs(67, COBBLESTONE)).a("stairsStone").j();
public static final Block WALL_SIGN = (new BlockSign(68, TileEntitySign.class, false)).c(1.0F).a(e).a("sign").s().j();
public static final Block LEVER = (new BlockLever(69, 96)).c(0.5F).a(e).a("lever").j();
public static final Block STONE_PLATE = (new BlockPressurePlate(70, STONE.textureId, EnumMobType.MOBS, Material.STONE)).c(0.5F).a(h).a("pressurePlate").j();
public static final Block IRON_DOOR_BLOCK = (new BlockDoor(71, Material.ORE)).c(5.0F).a(i).a("doorIron").s().j();
public static final Block WOOD_PLATE = (new BlockPressurePlate(72, WOOD.textureId, EnumMobType.EVERYTHING, Material.WOOD)).c(0.5F).a(e).a("pressurePlate").j();
public static final Block REDSTONE_ORE = (new BlockRedstoneOre(73, 51, false)).c(3.0F).b(5.0F).a(h).a("oreRedstone").j();
public static final Block GLOWING_REDSTONE_ORE = (new BlockRedstoneOre(74, 51, true)).a(0.625F).c(3.0F).b(5.0F).a(h).a("oreRedstone").j();
public static final Block REDSTONE_TORCH_OFF = (new BlockRedstoneTorch(75, 115, false)).c(0.0F).a(e).a("notGate").j();
public static final Block REDSTONE_TORCH_ON = (new BlockRedstoneTorch(76, 99, true)).c(0.0F).a(0.5F).a(e).a("notGate").j();
public static final Block STONE_BUTTON = (new BlockButton(77, STONE.textureId)).c(0.5F).a(h).a("button").j();
public static final Block SNOW = (new BlockSnow(78, 66)).c(0.1F).a(k).a("snow").f(0);
public static final Block ICE = (new BlockIce(79, 67)).c(0.5F).f(3).a(j).a("ice");
public static final Block SNOW_BLOCK = (new BlockSnowBlock(80, 66)).c(0.2F).a(k).a("snow");
public static final Block CACTUS = (new BlockCactus(81, 70)).c(0.4F).a(k).a("cactus");
public static final Block CLAY = (new BlockClay(82, 72)).c(0.6F).a(f).a("clay");
public static final Block SUGAR_CANE_BLOCK = (new BlockReed(83, 73)).c(0.0F).a(g).a("reeds").r();
public static final Block JUKEBOX = (new BlockJukeBox(84, 74)).c(2.0F).b(10.0F).a(h).a("jukebox").i();
public static final Block SUGAR_CANE_BLOCK = (new BlockReed(83, 73)).c(0.0F).a(g).a("reeds").s();
public static final Block JUKEBOX = (new BlockJukeBox(84, 74)).c(2.0F).b(10.0F).a(h).a("jukebox").j();
public static final Block FENCE = (new BlockFence(85, 4)).c(2.0F).b(5.0F).a(e).a("fence");
public static final Block PUMPKIN = (new BlockPumpkin(86, 102, false)).c(1.0F).a(e).a("pumpkin").i();
public static final Block PUMPKIN = (new BlockPumpkin(86, 102, false)).c(1.0F).a(e).a("pumpkin").j();
public static final Block NETHERRACK = (new BlockBloodStone(87, 103)).c(0.4F).a(h).a("hellrock");
public static final Block SOUL_SAND = (new BlockSlowSand(88, 104)).c(0.5F).a(l).a("hellsand");
public static final Block GLOWSTONE = (new BlockLightStone(89, 105, Material.SHATTERABLE)).c(0.3F).a(j).a(1.0F).a("lightgem");
public static final BlockPortal PORTAL = (BlockPortal) (new BlockPortal(90, 14)).c(-1.0F).a(j).a(0.75F).a("portal");
public static final Block JACK_O_LANTERN = (new BlockPumpkin(91, 102, true)).c(1.0F).a(e).a(1.0F).a("litpumpkin").i();
public static final Block CAKE_BLOCK = (new BlockCake(92, 121)).c(0.5F).a(k).a("cake").r().i();
public static final Block DIODE_OFF = (new BlockDiode(93, false)).c(0.0F).a(e).a("diode").r().i();
public static final Block DIODE_ON = (new BlockDiode(94, true)).c(0.0F).a(0.625F).a(e).a("diode").r().i();
public static final Block LOCKED_CHEST = (new BlockLockedChest(95)).c(0.0F).a(1.0F).a(e).a("lockedchest").a(true).i();
public static final Block TRAP_DOOR = (new BlockTrapdoor(96, Material.WOOD)).c(3.0F).a(e).a("trapdoor").r().i();
public static final Block JACK_O_LANTERN = (new BlockPumpkin(91, 102, true)).c(1.0F).a(e).a(1.0F).a("litpumpkin").j();
public static final Block CAKE_BLOCK = (new BlockCake(92, 121)).c(0.5F).a(k).a("cake").s().j();
public static final Block DIODE_OFF = (new BlockDiode(93, false)).c(0.0F).a(e).a("diode").s().j();
public static final Block DIODE_ON = (new BlockDiode(94, true)).c(0.0F).a(0.625F).a(e).a("diode").s().j();
public static final Block LOCKED_CHEST = (new BlockLockedChest(95)).c(0.0F).a(1.0F).a(e).a("lockedchest").a(true).j();
public static final Block TRAP_DOOR = (new BlockTrapdoor(96, Material.WOOD)).c(3.0F).a(e).a("trapdoor").s().j();
public static final Block MONSTER_EGGS = (new BlockMonsterEggs(97)).c(0.75F);
public static final Block SMOOTH_BRICK = (new BlockSmoothBrick(98)).c(1.5F).b(10.0F).a(h).a("stonebricksmooth");
public static final Block BIG_MUSHROOM_1 = (new BlockHugeMushroom(99, Material.WOOD, 142, 0)).c(0.2F).a(e).a("mushroom").i();
public static final Block BIG_MUSHROOM_2 = (new BlockHugeMushroom(100, Material.WOOD, 142, 1)).c(0.2F).a(e).a("mushroom").i();
public static final Block BIG_MUSHROOM_1 = (new BlockHugeMushroom(99, Material.WOOD, 142, 0)).c(0.2F).a(e).a("mushroom").j();
public static final Block BIG_MUSHROOM_2 = (new BlockHugeMushroom(100, Material.WOOD, 142, 1)).c(0.2F).a(e).a("mushroom").j();
public static final Block IRON_FENCE = (new BlockThinFence(101, 85, 85, Material.ORE, true)).c(5.0F).b(10.0F).a(i).a("fenceIron");
public static final Block THIN_GLASS = (new BlockThinFence(102, 49, 148, Material.SHATTERABLE, false)).c(0.3F).a(j).a("thinGlass");
public static final Block MELON = (new BlockMelon(103)).c(1.0F).a(e).a("melon");
public static final Block PUMPKIN_STEM = (new BlockStem(104, PUMPKIN)).c(0.0F).a(e).a("pumpkinStem").i();
public static final Block MELON_STEM = (new BlockStem(105, MELON)).c(0.0F).a(e).a("pumpkinStem").i();
public static final Block VINE = (new BlockVine(106)).c(0.2F).a(g).a("vine").i();
public static final Block FENCE_GATE = (new BlockFenceGate(107, 4)).c(2.0F).b(5.0F).a(e).a("fenceGate").i();
public static final Block BRICK_STAIRS = (new BlockStairs(108, BRICK)).a("stairsBrick").i();
public static final Block STONE_STAIRS = (new BlockStairs(109, SMOOTH_BRICK)).a("stairsStoneBrickSmooth").i();
public static final Block PUMPKIN_STEM = (new BlockStem(104, PUMPKIN)).c(0.0F).a(e).a("pumpkinStem").j();
public static final Block MELON_STEM = (new BlockStem(105, MELON)).c(0.0F).a(e).a("pumpkinStem").j();
public static final Block VINE = (new BlockVine(106)).c(0.2F).a(g).a("vine").j();
public static final Block FENCE_GATE = (new BlockFenceGate(107, 4)).c(2.0F).b(5.0F).a(e).a("fenceGate").j();
public static final Block BRICK_STAIRS = (new BlockStairs(108, BRICK)).a("stairsBrick").j();
public static final Block STONE_STAIRS = (new BlockStairs(109, SMOOTH_BRICK)).a("stairsStoneBrickSmooth").j();
public static final BlockMycel MYCEL = (BlockMycel) (new BlockMycel(110)).c(0.6F).a(g).a("mycel");
public static final Block WATER_LILY = (new BlockWaterLily(111, 76)).c(0.0F).a(g).a("waterlily");
public static final Block NETHER_BRICK = (new Block(112, 224, Material.STONE)).c(2.0F).b(10.0F).a(h).a("netherBrick");
public static final Block NETHER_FENCE = (new BlockFence(113, 224, Material.STONE)).c(2.0F).b(10.0F).a(h).a("netherFence");
public static final Block NETHER_BRICK_STAIRS = (new BlockStairs(114, NETHER_BRICK)).a("stairsNetherBrick").i();
public static final Block NETHER_WART = (new BlockNetherWart(115)).a("netherStalk").i();
public static final Block NETHER_BRICK_STAIRS = (new BlockStairs(114, NETHER_BRICK)).a("stairsNetherBrick").j();
public static final Block NETHER_WART = (new BlockNetherWart(115)).a("netherStalk").j();
public static final Block ENCHANTMENT_TABLE = (new BlockEnchantmentTable(116)).c(5.0F).b(2000.0F).a("enchantmentTable");
public static final Block BREWING_STAND = (new BlockBrewingStand(117)).c(0.5F).a(0.125F).a("brewingStand").i();
public static final Block CAULDRON = (new BlockCauldron(118)).c(2.0F).a("cauldron").i();
public static final Block BREWING_STAND = (new BlockBrewingStand(117)).c(0.5F).a(0.125F).a("brewingStand").j();
public static final Block CAULDRON = (new BlockCauldron(118)).c(2.0F).a("cauldron").j();
public static final Block ENDER_PORTAL = (new BlockEnderPortal(119, Material.PORTAL)).c(-1.0F).b(6000000.0F);
public static final Block ENDER_PORTAL_FRAME = (new BlockEnderPortalFrame(120)).a(j).a(0.125F).c(-1.0F).a("endPortalFrame").i().b(6000000.0F);
public static final Block ENDER_PORTAL_FRAME = (new BlockEnderPortalFrame(120)).a(j).a(0.125F).c(-1.0F).a("endPortalFrame").j().b(6000000.0F);
public static final Block WHITESTONE = (new Block(121, 175, Material.STONE)).c(3.0F).b(15.0F).a(h).a("whiteStone");
public static final Block DRAGON_EGG = (new BlockDragonEgg(122, 167)).c(3.0F).b(15.0F).a(h).a(0.125F).a("dragonEgg");
public static final Block REDSTONE_LAMP_OFF = (new BlockRedstoneLamp(123, false)).c(0.3F).a(j).a("redstoneLight");
@ -185,12 +185,12 @@ public class Block {
}
}
protected Block i() {
protected Block j() {
r[this.id] = true;
return this;
}
protected void j() {}
protected void k() {}
protected Block(int i, int j, Material material) {
this(i, material);
@ -244,12 +244,12 @@ public class Block {
return this;
}
protected Block k() {
protected Block l() {
this.c(-1.0F);
return this;
}
public float l() {
public float m() {
return this.strength;
}
@ -258,11 +258,11 @@ public class Block {
return this;
}
public boolean m() {
public boolean n() {
return this.bT;
}
public boolean n() {
public boolean o() {
return this.isTileEntity;
}
@ -304,10 +304,10 @@ public class Block {
}
public boolean a(int i, boolean flag) {
return this.F_();
return this.E_();
}
public boolean F_() {
public boolean E_() {
return true;
}
@ -558,7 +558,7 @@ public class Block {
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
this.dropList = new ArrayList<ItemStack>();
// CraftBukkit end
if (this.b() && !this.isTileEntity && EnchantmentManager.hasSilkTouchEnchantment(entityhuman.inventory)) {
if (this.h() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman.inventory)) {
ItemStack itemstack = this.a_(l);
if (itemstack != null) {
@ -572,6 +572,10 @@ public class Block {
return this.dropList; // CraftBukkit
}
protected boolean h() {
return this.b() && !this.isTileEntity;
}
protected ItemStack a_(int i) {
int j = 0;
@ -598,20 +602,20 @@ public class Block {
}
public String getName() {
return LocaleI18n.get(this.p() + ".name");
return LocaleI18n.get(this.q() + ".name");
}
public String p() {
public String q() {
return this.name;
}
public void a(World world, int i, int j, int k, int l, int i1) {}
public boolean q() {
public boolean r() {
return this.bS;
}
protected Block r() {
protected Block s() {
this.bS = false;
return this;
}
@ -625,7 +629,9 @@ public class Block {
static {
Item.byId[WOOL.id] = (new ItemCloth(WOOL.id - 256)).a("cloth");
Item.byId[LOG.id] = (new ItemWithAuxData(LOG.id - 256, LOG)).a("log");
Item.byId[WOOD.id] = (new ItemWithAuxData(WOOD.id - 256, WOOD)).a("wood");
Item.byId[SMOOTH_BRICK.id] = (new ItemWithAuxData(SMOOTH_BRICK.id - 256, SMOOTH_BRICK)).a("stonebricksmooth");
Item.byId[SANDSTONE.id] = (new ItemWithAuxData(SANDSTONE.id - 256, SANDSTONE)).a("sandStone");
Item.byId[STEP.id] = (new ItemStep(STEP.id - 256)).a("stoneSlab");
Item.byId[SAPLING.id] = (new ItemSapling(SAPLING.id - 256)).a("sapling");
Item.byId[LEAVES.id] = (new ItemLeaves(LEAVES.id - 256)).a("leaves");
@ -642,7 +648,7 @@ public class Block {
if (byId[i] != null) {
if (Item.byId[i] == null) {
Item.byId[i] = new ItemBlock(i - 256);
byId[i].j();
byId[i].k();
}
boolean flag = false;

Datei anzeigen

@ -9,7 +9,7 @@ public class BlockBed extends BlockDirectional {
public BlockBed(int i) {
super(i, 134, Material.CLOTH);
this.s();
this.t();
}
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) {
@ -116,7 +116,7 @@ public class BlockBed extends BlockDirectional {
}
public void updateShape(IBlockAccess iblockaccess, int i, int j, int k) {
this.s();
this.t();
}
public void doPhysics(World world, int i, int j, int k, int l) {
@ -141,7 +141,7 @@ public class BlockBed extends BlockDirectional {
return /* d(i) ? 0 CraftBukkit : */ Item.BED.id;
}
private void s() {
private void t() {
this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.5625F, 1.0F);
}

Datei anzeigen

@ -25,7 +25,7 @@ public class BlockDeadBush extends BlockFlower {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
entityhuman.a(StatisticList.C[this.id], 1);
/* CraftBukkit start - moved this line into calculateDrops
this.a(world, i, j, k, new ItemStack(Block.DEAD_BUSH, 1, l));
@ -39,7 +39,7 @@ public class BlockDeadBush extends BlockFlower {
// CraftBukkit start - Calculate drops
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
super.dropList = new ArrayList<ItemStack>();
this.a(world, i, j, k, new ItemStack(Block.DEAD_BUSH, 1, l));
return super.dropList;

Datei anzeigen

@ -258,8 +258,12 @@ public class BlockDispenser extends BlockContainer {
}
itemstack.count -= i1;
// CraftBukkit - make sure enchantments are copied over
EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.id, i1, itemstack.getData(), itemstack.getEnchantments()));
EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.id, i1, itemstack.getData()));
if (itemstack.hasTag()) {
entityitem.itemStack.setTag((NBTTagCompound) itemstack.getTag().clone());
}
float f3 = 0.05F;
entityitem.motX = (double) ((float) this.a.nextGaussian() * f3);

Datei anzeigen

@ -21,7 +21,7 @@ public class BlockFire extends Block {
this.a(true);
}
public void j() {
public void k() {
this.a(Block.WOOD.id, 5, 20);
this.a(Block.FENCE.id, 5, 20);
this.a(Block.WOOD_STAIRS.id, 5, 20);
@ -226,7 +226,7 @@ public class BlockFire extends Block {
}
}
public boolean F_() {
public boolean E_() {
return false;
}

Datei anzeigen

@ -1,152 +0,0 @@
package net.minecraft.server;
import java.util.Random;
public class BlockFurnace extends BlockContainer {
private Random a = new Random();
private final boolean b;
private static boolean c = false;
protected BlockFurnace(int i, boolean flag) {
super(i, Material.STONE);
this.b = flag;
this.textureId = 45;
}
public int getDropType(int i, Random random, int j) {
return Block.FURNACE.id;
}
public void onPlace(World world, int i, int j, int k) {
super.onPlace(world, i, j, k);
this.g(world, i, j, k);
}
private void g(World world, int i, int j, int k) {
if (!world.isStatic) {
int l = world.getTypeId(i, j, k - 1);
int i1 = world.getTypeId(i, j, k + 1);
int j1 = world.getTypeId(i - 1, j, k);
int k1 = world.getTypeId(i + 1, j, k);
byte b0 = 3;
if (Block.n[l] && !Block.n[i1]) {
b0 = 3;
}
if (Block.n[i1] && !Block.n[l]) {
b0 = 2;
}
if (Block.n[j1] && !Block.n[k1]) {
b0 = 5;
}
if (Block.n[k1] && !Block.n[j1]) {
b0 = 4;
}
world.setData(i, j, k, b0);
}
}
public int a(int i) {
return i == 1 ? this.textureId + 17 : (i == 0 ? this.textureId + 17 : (i == 3 ? this.textureId - 1 : this.textureId));
}
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) {
if (world.isStatic) {
return true;
} else {
TileEntityFurnace tileentityfurnace = (TileEntityFurnace) world.getTileEntity(i, j, k);
if (tileentityfurnace != null) {
entityhuman.openFurnace(tileentityfurnace);
}
return true;
}
}
public static void a(boolean flag, World world, int i, int j, int k) {
int l = world.getData(i, j, k);
TileEntity tileentity = world.getTileEntity(i, j, k);
c = true;
if (flag) {
world.setTypeId(i, j, k, Block.BURNING_FURNACE.id);
} else {
world.setTypeId(i, j, k, Block.FURNACE.id);
}
c = false;
world.setData(i, j, k, l);
if (tileentity != null) {
tileentity.m();
world.setTileEntity(i, j, k, tileentity);
}
}
public TileEntity a_() {
return new TileEntityFurnace();
}
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) {
int l = MathHelper.floor((double) (entityliving.yaw * 4.0F / 360.0F) + 0.5D) & 3;
if (l == 0) {
world.setData(i, j, k, 2);
}
if (l == 1) {
world.setData(i, j, k, 5);
}
if (l == 2) {
world.setData(i, j, k, 3);
}
if (l == 3) {
world.setData(i, j, k, 4);
}
}
public void remove(World world, int i, int j, int k) {
if (!c) {
TileEntityFurnace tileentityfurnace = (TileEntityFurnace) world.getTileEntity(i, j, k);
if (tileentityfurnace != null) {
for (int l = 0; l < tileentityfurnace.getSize(); ++l) {
ItemStack itemstack = tileentityfurnace.getItem(l);
if (itemstack != null) {
float f = this.a.nextFloat() * 0.8F + 0.1F;
float f1 = this.a.nextFloat() * 0.8F + 0.1F;
float f2 = this.a.nextFloat() * 0.8F + 0.1F;
while (itemstack.count > 0) {
int i1 = this.a.nextInt(21) + 10;
if (i1 > itemstack.count) {
i1 = itemstack.count;
}
itemstack.count -= i1;
// CraftBukkit - include enchantments in new itemstack
EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.id, i1, itemstack.getData(), itemstack.getEnchantments()));
float f3 = 0.05F;
entityitem.motX = (double) ((float) this.a.nextGaussian() * f3);
entityitem.motY = (double) ((float) this.a.nextGaussian() * f3 + 0.2F);
entityitem.motZ = (double) ((float) this.a.nextGaussian() * f3);
world.addEntity(entityitem);
}
}
}
}
}
super.remove(world, i, j, k);
}
}

Datei anzeigen

@ -160,7 +160,7 @@ public class BlockLeaves extends BlockTransparant {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
entityhuman.a(StatisticList.C[this.id], 1);
/* CraftBukkit start - moved this line into calculateDrops
this.a(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
@ -174,7 +174,7 @@ public class BlockLeaves extends BlockTransparant {
// CraftBukkit start - Calculate drops
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
super.dropList = new ArrayList<ItemStack>();
this.a(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
return super.dropList;

Datei anzeigen

@ -25,7 +25,7 @@ public class BlockLongGrass extends BlockFlower {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
entityhuman.a(StatisticList.C[this.id], 1);
/* CraftBukkit start - moved this line into calculateDrops
this.a(world, i, j, k, new ItemStack(Block.LONG_GRASS, 1, l));
@ -39,7 +39,7 @@ public class BlockLongGrass extends BlockFlower {
// CraftBukkit start - Calculate drops
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
super.dropList = new ArrayList<ItemStack>();
this.a(world, i, j, k, new ItemStack(Block.LONG_GRASS, 1, l));
return super.dropList;

Datei anzeigen

@ -22,7 +22,7 @@ public class BlockMinecartTrack extends Block {
this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
}
public boolean h() {
public boolean i() {
return this.a;
}

Datei anzeigen

@ -77,6 +77,10 @@ public class BlockMushroom extends BlockFlower {
}
}
public boolean canPlace(World world, int i, int j, int k) {
return super.canPlace(world, i, j, k) && this.f(world, i, j, k);
}
protected boolean d(int i) {
return Block.n[i];
}

Datei anzeigen

@ -254,7 +254,7 @@ public class BlockPiston extends Block {
return false;
} else {
if (i != Block.PISTON.id && i != Block.PISTON_STICKY.id) {
if (Block.byId[i].l() == -1.0F) {
if (Block.byId[i].m() == -1.0F) {
return false;
}

Datei anzeigen

@ -166,7 +166,7 @@ public class BlockPortal extends BlockHalfTransparant {
world.getServer().getPluginManager().callEvent(event);
// CraftBukkit end
entity.ac();
entity.ad();
}
}
}

Datei anzeigen

@ -62,7 +62,7 @@ public class BlockSapling extends BlockFlower {
} else if (l == 3) {
for (i1 = 0; i1 >= -1; --i1) {
for (j1 = 0; j1 >= -1; --j1) {
if (world.getTypeId(i + i1, j, k + j1) == this.id && world.getTypeId(i + i1 + 1, j, k + j1) == this.id && world.getTypeId(i + i1, j, k + j1 + 1) == this.id && world.getTypeId(i + i1 + 1, j, k + j1 + 1) == this.id) {
if (this.f(world, i + i1, j, k + j1, 3) && this.f(world, i + i1 + 1, j, k + j1, 3) && this.f(world, i + i1, j, k + j1 + 1, 3) && this.f(world, i + i1 + 1, j, k + j1 + 1, 3)) {
treeType = TreeType.JUNGLE;
gen = new WorldGenMegaTree(false, 10 + random.nextInt(20), 3, 3);
flag = true;
@ -127,6 +127,10 @@ public class BlockSapling extends BlockFlower {
// CraftBukkit end
}
public boolean f(World world, int i, int j, int k, int l) {
return world.getTypeId(i, j, k) == this.id && (world.getData(i, j, k) & 3) == l;
}
protected int getDropData(int i) {
return i & 3;
}

Datei anzeigen

@ -33,10 +33,12 @@ public class BlockTNT extends Block {
}
public void wasExploded(World world, int i, int j, int k) {
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F));
if (!world.isStatic) {
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F));
entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8;
world.addEntity(entitytntprimed);
entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8;
world.addEntity(entitytntprimed);
}
}
public void postBreak(World world, int i, int j, int k, int l) {
@ -63,7 +65,7 @@ public class BlockTNT extends Block {
// CraftBukkit end
public void attack(World world, int i, int j, int k, EntityHuman entityhuman) {
if (entityhuman.T() != null && entityhuman.T().id == Item.FLINT_AND_STEEL.id) {
if (entityhuman.U() != null && entityhuman.U().id == Item.FLINT_AND_STEEL.id) {
world.setRawData(i, j, k, 1);
}

Datei anzeigen

@ -285,7 +285,7 @@ public class BlockVine extends Block {
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
entityhuman.a(StatisticList.C[this.id], 1);
/* CraftBukkit start - moved this line into calculateDrops
this.a(world, i, j, k, new ItemStack(Block.VINE, 1, 0));
@ -299,7 +299,7 @@ public class BlockVine extends Block {
// CraftBukkit start - Calculate drops
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
if (!world.isStatic && entityhuman.T() != null && entityhuman.T().id == Item.SHEARS.id) {
if (!world.isStatic && entityhuman.U() != null && entityhuman.U().id == Item.SHEARS.id) {
super.dropList = new ArrayList<ItemStack>();
this.a(world, i, j, k, new ItemStack(Block.VINE, 1, 0));
return super.dropList;

Datei anzeigen

@ -13,7 +13,7 @@ public class Chunk {
public static boolean a;
private ChunkSection[] sections;
private byte[] q;
private byte[] r;
public int[] b;
public boolean[] c;
public boolean d;
@ -21,30 +21,31 @@ public class Chunk {
public int[] heightMap;
public final int x;
public final int z;
private boolean r;
private boolean s;
public Map tileEntities;
public List[] entitySlices;
public boolean done;
public boolean l;
public boolean m;
public long n;
private int s;
boolean o;
public boolean sentToClient; // CraftBukkit - flag if chunk has been seen
public boolean seenByPlayer;
private int t;
boolean p;
public Chunk(World world, int i, int j) {
this.sections = new ChunkSection[16];
this.q = new byte[256];
this.r = new byte[256];
this.b = new int[256];
this.c = new boolean[256];
this.r = false;
this.s = false;
this.tileEntities = new HashMap();
this.done = false;
this.l = false;
this.m = false;
this.n = 0L;
this.s = 4096;
this.o = false;
this.seenByPlayer = false;
this.t = 4096;
this.p = false;
this.entitySlices = new List[16];
this.world = world;
this.x = i;
@ -56,7 +57,7 @@ public class Chunk {
}
Arrays.fill(this.b, -999);
Arrays.fill(this.q, (byte) -1);
Arrays.fill(this.r, (byte) -1);
// CraftBukkit start
if (!(this instanceof EmptyChunk)) {
@ -177,7 +178,7 @@ public class Chunk {
private void e(int i, int j) {
this.c[i + j * 16] = true;
this.r = true;
this.s = true;
}
private void o() {
@ -216,7 +217,7 @@ public class Chunk {
}
}
this.r = false;
this.s = false;
}
MethodProfiler.a();
@ -243,7 +244,7 @@ public class Chunk {
}
private void h(int i, int j, int k) {
int l = this.heightMap[k << 4 | i] & 0xFF; // CraftBukkit
int l = this.heightMap[k << 4 | i] & 255;
int i1 = l;
if (j > l) {
@ -331,17 +332,23 @@ public class Chunk {
}
public int getTypeId(int i, int j, int k) {
if (j >> 4 >= sections.length) return 0; // CraftBukkit - added until next release
ChunkSection chunksection = this.sections[j >> 4];
if (j >> 4 >= this.sections.length) {
return 0;
} else {
ChunkSection chunksection = this.sections[j >> 4];
return chunksection != null ? chunksection.a(i, j & 15, k) : 0;
return chunksection != null ? chunksection.a(i, j & 15, k) : 0;
}
}
public int getData(int i, int j, int k) {
if (j >> 4 >= sections.length) return 0; // CraftBukkit - added until next release
ChunkSection chunksection = this.sections[j >> 4];
if (j >> 4 >= this.sections.length) {
return 0;
} else {
ChunkSection chunksection = this.sections[j >> 4];
return chunksection != null ? chunksection.b(i, j & 15, k) : 0;
return chunksection != null ? chunksection.b(i, j & 15, k) : 0;
}
}
public boolean a(int i, int j, int k, int l) {
@ -385,49 +392,52 @@ public class Chunk {
}
}
if (chunksection.a(i, j & 15, k) != l) return false; // CraftBukkit - remove next update
chunksection.b(i, j & 15, k, i1);
if (flag) {
this.initLighting();
if (chunksection.a(i, j & 15, k) != l) {
return false;
} else {
if (Block.lightBlock[l & 4095] > 0) {
if (j > k1) {
this.h(i, j + 1, k);
chunksection.b(i, j & 15, k, i1);
if (flag) {
this.initLighting();
} else {
if (Block.lightBlock[l & 4095] > 0) {
if (j >= k1) {
this.h(i, j + 1, k);
}
} else if (j == k1 - 1) {
this.h(i, j, k);
}
} else if (j == k1 - 1) {
this.h(i, j, k);
this.e(i, k);
}
this.e(i, k);
}
TileEntity tileentity;
TileEntity tileentity;
if (l != 0) {
if (!this.world.isStatic) {
Block.byId[l].onPlace(this.world, i2, j, j2);
}
if (l != 0) {
if (!this.world.isStatic) {
Block.byId[l].onPlace(this.world, i2, j, j2);
}
if (Block.byId[l] instanceof BlockContainer) {
tileentity = this.e(i, j, k);
if (tileentity == null) {
tileentity = ((BlockContainer) Block.byId[l]).a_();
this.world.setTileEntity(i2, j, j2, tileentity);
}
if (Block.byId[l] instanceof BlockContainer) {
if (tileentity != null) {
tileentity.h();
}
}
} else if (l1 > 0 && Block.byId[l1] instanceof BlockContainer) {
tileentity = this.e(i, j, k);
if (tileentity == null) {
tileentity = ((BlockContainer) Block.byId[l]).a_();
this.world.setTileEntity(i2, j, j2, tileentity);
}
if (tileentity != null) {
tileentity.h();
}
}
} else if (l1 > 0 && Block.byId[l1] instanceof BlockContainer) {
tileentity = this.e(i, j, k);
if (tileentity != null) {
tileentity.h();
}
}
this.l = true;
return true;
this.l = true;
return true;
}
}
}
@ -568,7 +578,7 @@ public class Chunk {
if (tileentity == null) {
int l = this.getTypeId(i, j, k);
if (l <= 0 || !Block.byId[l].n()) {
if (l <= 0 || !Block.byId[l].o()) {
return null;
}
@ -694,7 +704,7 @@ public class Chunk {
if (entity1 != entity && entity1.boundingBox.a(axisalignedbb)) {
list.add(entity1);
Entity[] aentity = entity1.ba();
Entity[] aentity = entity1.bb();
if (aentity != null) {
for (int i1 = 0; i1 < aentity.length; ++i1) {
@ -816,7 +826,7 @@ public class Chunk {
}
public void j() {
if (this.r && !this.world.worldProvider.e) {
if (this.s && !this.world.worldProvider.e) {
this.o();
}
}
@ -850,41 +860,41 @@ public class Chunk {
}
public BiomeBase a(int i, int j, WorldChunkManager worldchunkmanager) {
int k = this.q[j << 4 | i] & 255;
int k = this.r[j << 4 | i] & 255;
if (k == 255) {
BiomeBase biomebase = worldchunkmanager.getBiome((this.x << 4) + i, (this.z << 4) + j);
k = biomebase.id;
this.q[j << 4 | i] = (byte) (k & 255);
this.r[j << 4 | i] = (byte) (k & 255);
}
return BiomeBase.biomes[k] == null ? BiomeBase.PLAINS : BiomeBase.biomes[k];
}
public byte[] l() {
return this.q;
return this.r;
}
public void a(byte[] abyte) {
this.q = abyte;
this.r = abyte;
}
public void m() {
this.s = 0;
this.t = 0;
}
public void n() {
for (int i = 0; i < 8; ++i) {
if (this.s >= 4096) {
if (this.t >= 4096) {
return;
}
int j = this.s % 16;
int k = this.s / 16 % 16;
int l = this.s / 256;
int j = this.t % 16;
int k = this.t / 16 % 16;
int l = this.t / 256;
++this.s;
++this.t;
int i1 = (this.x << 4) + k;
int j1 = (this.z << 4) + l;

Datei anzeigen

@ -1,102 +0,0 @@
package net.minecraft.server;
import java.util.List;
import java.util.Random;
public class ChunkProviderFlat implements IChunkProvider {
private World a;
private Random b;
private final boolean c;
private WorldGenVillage d = new WorldGenVillage(1);
public ChunkProviderFlat(World world, long i, boolean flag) {
this.a = world;
this.c = flag;
this.b = new Random(i);
}
private void a(byte[] abyte) {
int i = abyte.length / 256;
for (int j = 0; j < 16; ++j) {
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < i; ++l) {
int i1 = 0;
if (l == 0) {
i1 = Block.BEDROCK.id;
} else if (l <= 2) {
i1 = Block.DIRT.id;
} else if (l == 3) {
i1 = Block.GRASS.id;
}
abyte[j << 11 | k << 7 | l] = (byte) i1;
}
}
}
}
public Chunk getChunkAt(int i, int j) {
return this.getOrCreateChunk(i, j);
}
public Chunk getOrCreateChunk(int i, int j) {
byte[] abyte = new byte['\u8000'];
this.a(abyte);
Chunk chunk = new Chunk(this.a, abyte, i, j);
if (this.c) {
this.d.a(this, this.a, i, j, abyte);
}
// CraftBukkit start - prime biome data to prevent uninitialized values racing to client
BiomeBase[] bb = this.a.getWorldChunkManager().getBiomeBlock(null, i * 16, j * 16, 16, 16);
byte[] biomes = chunk.l();
for(int idx = 0; idx < biomes.length; idx++) {
biomes[idx] = (byte) bb[idx].id;
}
// CraftBukkit end
chunk.initLighting();
return chunk;
}
public boolean isChunkLoaded(int i, int j) {
return true;
}
public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
this.b.setSeed(this.a.getSeed());
long k = this.b.nextLong() / 2L * 2L + 1L;
long l = this.b.nextLong() / 2L * 2L + 1L;
this.b.setSeed((long) i * k + (long) j * l ^ this.a.getSeed());
if (this.c) {
this.d.a(this.a, this.b, i, j);
}
}
public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
return true;
}
public boolean unloadChunks() {
return false;
}
public boolean canSave() {
return true;
}
public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) {
BiomeBase biomebase = this.a.getBiome(i, k);
return biomebase == null ? null : biomebase.getMobs(enumcreaturetype);
}
public ChunkPosition findNearestMapFeature(World world, String s, int i, int j, int k) {
return null;
}
}

Datei anzeigen

@ -1,425 +0,0 @@
package net.minecraft.server;
import java.util.List;
import java.util.Random;
public class ChunkProviderGenerate implements IChunkProvider {
private Random k;
private NoiseGeneratorOctaves l;
private NoiseGeneratorOctaves m;
private NoiseGeneratorOctaves n;
private NoiseGeneratorOctaves o;
public NoiseGeneratorOctaves a;
public NoiseGeneratorOctaves b;
public NoiseGeneratorOctaves c;
private World p;
private final boolean q;
private double[] r;
private double[] s = new double[256];
private WorldGenBase t = new WorldGenCaves();
private WorldGenStronghold u = new WorldGenStronghold();
private WorldGenVillage v = new WorldGenVillage(0);
private WorldGenMineshaft w = new WorldGenMineshaft();
private WorldGenBase x = new WorldGenCanyon();
private BiomeBase[] y;
double[] d;
double[] e;
double[] f;
double[] g;
double[] h;
float[] i;
int[][] j = new int[32][32];
public ChunkProviderGenerate(World world, long i, boolean flag) {
this.p = world;
this.q = flag;
this.k = new Random(i);
this.l = new NoiseGeneratorOctaves(this.k, 16);
this.m = new NoiseGeneratorOctaves(this.k, 16);
this.n = new NoiseGeneratorOctaves(this.k, 8);
this.o = new NoiseGeneratorOctaves(this.k, 4);
this.a = new NoiseGeneratorOctaves(this.k, 10);
this.b = new NoiseGeneratorOctaves(this.k, 16);
this.c = new NoiseGeneratorOctaves(this.k, 8);
}
public void a(int i, int j, byte[] abyte) {
byte b0 = 4;
byte b1 = 16;
byte b2 = 63;
int k = b0 + 1;
byte b3 = 17;
int l = b0 + 1;
this.y = this.p.getWorldChunkManager().getBiomes(this.y, i * 4 - 2, j * 4 - 2, k + 5, l + 5);
this.r = this.a(this.r, i * b0, 0, j * b0, k, b3, l);
for (int i1 = 0; i1 < b0; ++i1) {
for (int j1 = 0; j1 < b0; ++j1) {
for (int k1 = 0; k1 < b1; ++k1) {
double d0 = 0.125D;
double d1 = this.r[((i1 + 0) * l + j1 + 0) * b3 + k1 + 0];
double d2 = this.r[((i1 + 0) * l + j1 + 1) * b3 + k1 + 0];
double d3 = this.r[((i1 + 1) * l + j1 + 0) * b3 + k1 + 0];
double d4 = this.r[((i1 + 1) * l + j1 + 1) * b3 + k1 + 0];
double d5 = (this.r[((i1 + 0) * l + j1 + 0) * b3 + k1 + 1] - d1) * d0;
double d6 = (this.r[((i1 + 0) * l + j1 + 1) * b3 + k1 + 1] - d2) * d0;
double d7 = (this.r[((i1 + 1) * l + j1 + 0) * b3 + k1 + 1] - d3) * d0;
double d8 = (this.r[((i1 + 1) * l + j1 + 1) * b3 + k1 + 1] - d4) * d0;
for (int l1 = 0; l1 < 8; ++l1) {
double d9 = 0.25D;
double d10 = d1;
double d11 = d2;
double d12 = (d3 - d1) * d9;
double d13 = (d4 - d2) * d9;
for (int i2 = 0; i2 < 4; ++i2) {
int j2 = i2 + i1 * 4 << 11 | 0 + j1 * 4 << 7 | k1 * 8 + l1;
short short1 = 128;
j2 -= short1;
double d14 = 0.25D;
double d15 = (d11 - d10) * d14;
double d16 = d10 - d15;
for (int k2 = 0; k2 < 4; ++k2) {
if ((d16 += d15) > 0.0D) {
abyte[j2 += short1] = (byte) Block.STONE.id;
} else if (k1 * 8 + l1 < b2) {
abyte[j2 += short1] = (byte) Block.STATIONARY_WATER.id;
} else {
abyte[j2 += short1] = 0;
}
}
d10 += d12;
d11 += d13;
}
d1 += d5;
d2 += d6;
d3 += d7;
d4 += d8;
}
}
}
}
}
public void a(int i, int j, byte[] abyte, BiomeBase[] abiomebase) {
byte b0 = 63;
double d0 = 0.03125D;
this.s = this.o.a(this.s, i * 16, j * 16, 0, 16, 16, 1, d0 * 2.0D, d0 * 2.0D, d0 * 2.0D);
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
BiomeBase biomebase = abiomebase[l + k * 16];
float f = biomebase.h();
int i1 = (int) (this.s[k + l * 16] / 3.0D + 3.0D + this.k.nextDouble() * 0.25D);
int j1 = -1;
byte b1 = biomebase.A;
byte b2 = biomebase.B;
for (int k1 = 127; k1 >= 0; --k1) {
int l1 = (l * 16 + k) * 128 + k1;
if (k1 <= 0 + this.k.nextInt(5)) {
abyte[l1] = (byte) Block.BEDROCK.id;
} else {
byte b3 = abyte[l1];
if (b3 == 0) {
j1 = -1;
} else if (b3 == Block.STONE.id) {
if (j1 == -1) {
if (i1 <= 0) {
b1 = 0;
b2 = (byte) Block.STONE.id;
} else if (k1 >= b0 - 4 && k1 <= b0 + 1) {
b1 = biomebase.A;
b2 = biomebase.B;
}
if (k1 < b0 && b1 == 0) {
if (f < 0.15F) {
b1 = (byte) Block.ICE.id;
} else {
b1 = (byte) Block.STATIONARY_WATER.id;
}
}
j1 = i1;
if (k1 >= b0 - 1) {
abyte[l1] = b1;
} else {
abyte[l1] = b2;
}
} else if (j1 > 0) {
--j1;
abyte[l1] = b2;
if (j1 == 0 && b2 == Block.SAND.id) {
j1 = this.k.nextInt(4);
b2 = (byte) Block.SANDSTONE.id;
}
}
}
}
}
}
}
}
public Chunk getChunkAt(int i, int j) {
return this.getOrCreateChunk(i, j);
}
public Chunk getOrCreateChunk(int i, int j) {
this.k.setSeed((long) i * 341873128712L + (long) j * 132897987541L);
byte[] abyte = new byte['\u8000'];
this.a(i, j, abyte);
this.y = this.p.getWorldChunkManager().getBiomeBlock(this.y, i * 16, j * 16, 16, 16);
this.a(i, j, abyte, this.y);
this.t.a(this, this.p, i, j, abyte);
this.x.a(this, this.p, i, j, abyte);
if (this.q) {
this.w.a(this, this.p, i, j, abyte);
this.v.a(this, this.p, i, j, abyte);
this.u.a(this, this.p, i, j, abyte);
}
Chunk chunk = new Chunk(this.p, abyte, i, j);
// CraftBukkit start - prime biome data to prevent uninitialized values racing to client
byte[] biomes = chunk.l();
for(int idx = 0; idx < biomes.length; idx++) {
biomes[idx] = (byte) this.y[idx].id;
}
// CraftBukkit end
chunk.initLighting();
return chunk;
}
private double[] a(double[] adouble, int i, int j, int k, int l, int i1, int j1) {
if (adouble == null) {
adouble = new double[l * i1 * j1];
}
if (this.i == null) {
this.i = new float[25];
for (int k1 = -2; k1 <= 2; ++k1) {
for (int l1 = -2; l1 <= 2; ++l1) {
float f = 10.0F / MathHelper.c((float) (k1 * k1 + l1 * l1) + 0.2F);
this.i[k1 + 2 + (l1 + 2) * 5] = f;
}
}
}
double d0 = 684.412D;
double d1 = 684.412D;
this.g = this.a.a(this.g, i, k, l, j1, 1.121D, 1.121D, 0.5D);
this.h = this.b.a(this.h, i, k, l, j1, 200.0D, 200.0D, 0.5D);
this.d = this.n.a(this.d, i, j, k, l, i1, j1, d0 / 80.0D, d1 / 160.0D, d0 / 80.0D);
this.e = this.l.a(this.e, i, j, k, l, i1, j1, d0, d1, d0);
this.f = this.m.a(this.f, i, j, k, l, i1, j1, d0, d1, d0);
boolean flag = false;
boolean flag1 = false;
int i2 = 0;
int j2 = 0;
for (int k2 = 0; k2 < l; ++k2) {
for (int l2 = 0; l2 < j1; ++l2) {
float f1 = 0.0F;
float f2 = 0.0F;
float f3 = 0.0F;
byte b0 = 2;
BiomeBase biomebase = this.y[k2 + 2 + (l2 + 2) * (l + 5)];
for (int i3 = -b0; i3 <= b0; ++i3) {
for (int j3 = -b0; j3 <= b0; ++j3) {
BiomeBase biomebase1 = this.y[k2 + i3 + 2 + (l2 + j3 + 2) * (l + 5)];
float f4 = this.i[i3 + 2 + (j3 + 2) * 5] / (biomebase1.D + 2.0F);
if (biomebase1.D > biomebase.D) {
f4 /= 2.0F;
}
f1 += biomebase1.E * f4;
f2 += biomebase1.D * f4;
f3 += f4;
}
}
f1 /= f3;
f2 /= f3;
f1 = f1 * 0.9F + 0.1F;
f2 = (f2 * 4.0F - 1.0F) / 8.0F;
double d2 = this.h[j2] / 8000.0D;
if (d2 < 0.0D) {
d2 = -d2 * 0.3D;
}
d2 = d2 * 3.0D - 2.0D;
if (d2 < 0.0D) {
d2 /= 2.0D;
if (d2 < -1.0D) {
d2 = -1.0D;
}
d2 /= 1.4D;
d2 /= 2.0D;
} else {
if (d2 > 1.0D) {
d2 = 1.0D;
}
d2 /= 8.0D;
}
++j2;
for (int k3 = 0; k3 < i1; ++k3) {
double d3 = (double) f2;
double d4 = (double) f1;
d3 += d2 * 0.2D;
d3 = d3 * (double) i1 / 16.0D;
double d5 = (double) i1 / 2.0D + d3 * 4.0D;
double d6 = 0.0D;
double d7 = ((double) k3 - d5) * 12.0D * 128.0D / 128.0D / d4;
if (d7 < 0.0D) {
d7 *= 4.0D;
}
double d8 = this.e[i2] / 512.0D;
double d9 = this.f[i2] / 512.0D;
double d10 = (this.d[i2] / 10.0D + 1.0D) / 2.0D;
if (d10 < 0.0D) {
d6 = d8;
} else if (d10 > 1.0D) {
d6 = d9;
} else {
d6 = d8 + (d9 - d8) * d10;
}
d6 -= d7;
if (k3 > i1 - 4) {
double d11 = (double) ((float) (k3 - (i1 - 4)) / 3.0F);
d6 = d6 * (1.0D - d11) + -10.0D * d11;
}
adouble[i2] = d6;
++i2;
}
}
}
return adouble;
}
public boolean isChunkLoaded(int i, int j) {
return true;
}
public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
BlockSand.instaFall = true;
int k = i * 16;
int l = j * 16;
BiomeBase biomebase = this.p.getBiome(k + 16, l + 16);
this.k.setSeed(this.p.getSeed());
long i1 = this.k.nextLong() / 2L * 2L + 1L;
long j1 = this.k.nextLong() / 2L * 2L + 1L;
this.k.setSeed((long) i * i1 + (long) j * j1 ^ this.p.getSeed());
boolean flag = false;
if (this.q) {
this.w.a(this.p, this.k, i, j);
flag = this.v.a(this.p, this.k, i, j);
this.u.a(this.p, this.k, i, j);
}
int k1;
int l1;
int i2;
if (!flag && this.k.nextInt(4) == 0) {
k1 = k + this.k.nextInt(16) + 8;
l1 = this.k.nextInt(128);
i2 = l + this.k.nextInt(16) + 8;
(new WorldGenLakes(Block.STATIONARY_WATER.id)).a(this.p, this.k, k1, l1, i2);
}
if (!flag && this.k.nextInt(8) == 0) {
k1 = k + this.k.nextInt(16) + 8;
l1 = this.k.nextInt(this.k.nextInt(120) + 8);
i2 = l + this.k.nextInt(16) + 8;
if (l1 < 63 || this.k.nextInt(10) == 0) {
(new WorldGenLakes(Block.STATIONARY_LAVA.id)).a(this.p, this.k, k1, l1, i2);
}
}
for (k1 = 0; k1 < 8; ++k1) {
l1 = k + this.k.nextInt(16) + 8;
i2 = this.k.nextInt(128);
int j2 = l + this.k.nextInt(16) + 8;
if ((new WorldGenDungeons()).a(this.p, this.k, l1, i2, j2)) {
;
}
}
biomebase.a(this.p, this.k, k, l);
SpawnerCreature.a(this.p, biomebase, k + 8, l + 8, 16, 16, this.k);
k += 8;
l += 8;
for (k1 = 0; k1 < 16; ++k1) {
for (l1 = 0; l1 < 16; ++l1) {
i2 = this.p.f(k + k1, l + l1);
if (this.p.s(k1 + k, i2 - 1, l1 + l)) {
this.p.setTypeId(k1 + k, i2 - 1, l1 + l, Block.ICE.id);
}
if (this.p.u(k1 + k, i2, l1 + l)) {
this.p.setTypeId(k1 + k, i2, l1 + l, Block.SNOW.id);
}
}
}
BlockSand.instaFall = false;
}
public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
return true;
}
public boolean unloadChunks() {
return false;
}
public boolean canSave() {
return true;
}
public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) {
BiomeBase biomebase = this.p.getBiome(i, k);
return biomebase == null ? null : biomebase.getMobs(enumcreaturetype);
}
public ChunkPosition findNearestMapFeature(World world, String s, int i, int j, int k) {
return "Stronghold".equals(s) && this.u != null ? this.u.getNearestGeneratedFeature(world, i, j, k) : null;
}
}

Datei anzeigen

@ -1,414 +0,0 @@
package net.minecraft.server;
import java.util.List;
import java.util.Random;
public class ChunkProviderHell implements IChunkProvider {
private Random i;
private NoiseGeneratorOctaves j;
private NoiseGeneratorOctaves k;
private NoiseGeneratorOctaves l;
private NoiseGeneratorOctaves m;
private NoiseGeneratorOctaves n;
public NoiseGeneratorOctaves a;
public NoiseGeneratorOctaves b;
private World o;
private double[] p;
public WorldGenNether c = new WorldGenNether();
private double[] q = new double[256];
private double[] r = new double[256];
private double[] s = new double[256];
private WorldGenBase t = new WorldGenCavesHell();
double[] d;
double[] e;
double[] f;
double[] g;
double[] h;
public ChunkProviderHell(World world, long i) {
this.o = world;
this.i = new Random(i);
this.j = new NoiseGeneratorOctaves(this.i, 16);
this.k = new NoiseGeneratorOctaves(this.i, 16);
this.l = new NoiseGeneratorOctaves(this.i, 8);
this.m = new NoiseGeneratorOctaves(this.i, 4);
this.n = new NoiseGeneratorOctaves(this.i, 4);
this.a = new NoiseGeneratorOctaves(this.i, 10);
this.b = new NoiseGeneratorOctaves(this.i, 16);
}
public void a(int i, int j, byte[] abyte) {
byte b0 = 4;
byte b1 = 32;
int k = b0 + 1;
byte b2 = 17;
int l = b0 + 1;
this.p = this.a(this.p, i * b0, 0, j * b0, k, b2, l);
for (int i1 = 0; i1 < b0; ++i1) {
for (int j1 = 0; j1 < b0; ++j1) {
for (int k1 = 0; k1 < 16; ++k1) {
double d0 = 0.125D;
double d1 = this.p[((i1 + 0) * l + j1 + 0) * b2 + k1 + 0];
double d2 = this.p[((i1 + 0) * l + j1 + 1) * b2 + k1 + 0];
double d3 = this.p[((i1 + 1) * l + j1 + 0) * b2 + k1 + 0];
double d4 = this.p[((i1 + 1) * l + j1 + 1) * b2 + k1 + 0];
double d5 = (this.p[((i1 + 0) * l + j1 + 0) * b2 + k1 + 1] - d1) * d0;
double d6 = (this.p[((i1 + 0) * l + j1 + 1) * b2 + k1 + 1] - d2) * d0;
double d7 = (this.p[((i1 + 1) * l + j1 + 0) * b2 + k1 + 1] - d3) * d0;
double d8 = (this.p[((i1 + 1) * l + j1 + 1) * b2 + k1 + 1] - d4) * d0;
for (int l1 = 0; l1 < 8; ++l1) {
double d9 = 0.25D;
double d10 = d1;
double d11 = d2;
double d12 = (d3 - d1) * d9;
double d13 = (d4 - d2) * d9;
for (int i2 = 0; i2 < 4; ++i2) {
int j2 = i2 + i1 * 4 << 11 | 0 + j1 * 4 << 7 | k1 * 8 + l1;
short short1 = 128;
double d14 = 0.25D;
double d15 = d10;
double d16 = (d11 - d10) * d14;
for (int k2 = 0; k2 < 4; ++k2) {
int l2 = 0;
if (k1 * 8 + l1 < b1) {
l2 = Block.STATIONARY_LAVA.id;
}
if (d15 > 0.0D) {
l2 = Block.NETHERRACK.id;
}
abyte[j2] = (byte) l2;
j2 += short1;
d15 += d16;
}
d10 += d12;
d11 += d13;
}
d1 += d5;
d2 += d6;
d3 += d7;
d4 += d8;
}
}
}
}
}
public void b(int i, int j, byte[] abyte) {
byte b0 = 64;
double d0 = 0.03125D;
this.q = this.m.a(this.q, i * 16, j * 16, 0, 16, 16, 1, d0, d0, 1.0D);
this.r = this.m.a(this.r, i * 16, 109, j * 16, 16, 1, 16, d0, 1.0D, d0);
this.s = this.n.a(this.s, i * 16, j * 16, 0, 16, 16, 1, d0 * 2.0D, d0 * 2.0D, d0 * 2.0D);
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
boolean flag = this.q[k + l * 16] + this.i.nextDouble() * 0.2D > 0.0D;
boolean flag1 = this.r[k + l * 16] + this.i.nextDouble() * 0.2D > 0.0D;
int i1 = (int) (this.s[k + l * 16] / 3.0D + 3.0D + this.i.nextDouble() * 0.25D);
int j1 = -1;
byte b1 = (byte) Block.NETHERRACK.id;
byte b2 = (byte) Block.NETHERRACK.id;
for (int k1 = 127; k1 >= 0; --k1) {
int l1 = (l * 16 + k) * 128 + k1;
if (k1 >= 127 - this.i.nextInt(5)) {
abyte[l1] = (byte) Block.BEDROCK.id;
} else if (k1 <= 0 + this.i.nextInt(5)) {
abyte[l1] = (byte) Block.BEDROCK.id;
} else {
byte b3 = abyte[l1];
if (b3 == 0) {
j1 = -1;
} else if (b3 == Block.NETHERRACK.id) {
if (j1 == -1) {
if (i1 <= 0) {
b1 = 0;
b2 = (byte) Block.NETHERRACK.id;
} else if (k1 >= b0 - 4 && k1 <= b0 + 1) {
b1 = (byte) Block.NETHERRACK.id;
b2 = (byte) Block.NETHERRACK.id;
if (flag1) {
b1 = (byte) Block.GRAVEL.id;
}
if (flag1) {
b2 = (byte) Block.NETHERRACK.id;
}
if (flag) {
b1 = (byte) Block.SOUL_SAND.id;
}
if (flag) {
b2 = (byte) Block.SOUL_SAND.id;
}
}
if (k1 < b0 && b1 == 0) {
b1 = (byte) Block.STATIONARY_LAVA.id;
}
j1 = i1;
if (k1 >= b0 - 1) {
abyte[l1] = b1;
} else {
abyte[l1] = b2;
}
} else if (j1 > 0) {
--j1;
abyte[l1] = b2;
}
}
}
}
}
}
}
public Chunk getChunkAt(int i, int j) {
return this.getOrCreateChunk(i, j);
}
public Chunk getOrCreateChunk(int i, int j) {
this.i.setSeed((long) i * 341873128712L + (long) j * 132897987541L);
byte[] abyte = new byte['\u8000'];
this.a(i, j, abyte);
this.b(i, j, abyte);
this.t.a(this, this.o, i, j, abyte);
this.c.a(this, this.o, i, j, abyte);
Chunk chunk = new Chunk(this.o, abyte, i, j);
// CraftBukkit start - prime biome data to prevent uninitialized values racing to client
BiomeBase[] bb = this.o.getWorldChunkManager().getBiomeBlock(null, i * 16, j * 16, 16, 16);
byte[] biomes = chunk.l();
for(int idx = 0; idx < biomes.length; idx++) {
biomes[idx] = (byte) bb[idx].id;
}
// CraftBukkit end
chunk.m();
return chunk;
}
private double[] a(double[] adouble, int i, int j, int k, int l, int i1, int j1) {
if (adouble == null) {
adouble = new double[l * i1 * j1];
}
double d0 = 684.412D;
double d1 = 2053.236D;
this.g = this.a.a(this.g, i, j, k, l, 1, j1, 1.0D, 0.0D, 1.0D);
this.h = this.b.a(this.h, i, j, k, l, 1, j1, 100.0D, 0.0D, 100.0D);
this.d = this.l.a(this.d, i, j, k, l, i1, j1, d0 / 80.0D, d1 / 60.0D, d0 / 80.0D);
this.e = this.j.a(this.e, i, j, k, l, i1, j1, d0, d1, d0);
this.f = this.k.a(this.f, i, j, k, l, i1, j1, d0, d1, d0);
int k1 = 0;
int l1 = 0;
double[] adouble1 = new double[i1];
int i2;
for (i2 = 0; i2 < i1; ++i2) {
adouble1[i2] = Math.cos((double) i2 * 3.141592653589793D * 6.0D / (double) i1) * 2.0D;
double d2 = (double) i2;
if (i2 > i1 / 2) {
d2 = (double) (i1 - 1 - i2);
}
if (d2 < 4.0D) {
d2 = 4.0D - d2;
adouble1[i2] -= d2 * d2 * d2 * 10.0D;
}
}
for (i2 = 0; i2 < l; ++i2) {
for (int j2 = 0; j2 < j1; ++j2) {
double d3 = (this.g[l1] + 256.0D) / 512.0D;
if (d3 > 1.0D) {
d3 = 1.0D;
}
double d4 = 0.0D;
double d5 = this.h[l1] / 8000.0D;
if (d5 < 0.0D) {
d5 = -d5;
}
d5 = d5 * 3.0D - 3.0D;
if (d5 < 0.0D) {
d5 /= 2.0D;
if (d5 < -1.0D) {
d5 = -1.0D;
}
d5 /= 1.4D;
d5 /= 2.0D;
d3 = 0.0D;
} else {
if (d5 > 1.0D) {
d5 = 1.0D;
}
d5 /= 6.0D;
}
d3 += 0.5D;
d5 = d5 * (double) i1 / 16.0D;
++l1;
for (int k2 = 0; k2 < i1; ++k2) {
double d6 = 0.0D;
double d7 = adouble1[k2];
double d8 = this.e[k1] / 512.0D;
double d9 = this.f[k1] / 512.0D;
double d10 = (this.d[k1] / 10.0D + 1.0D) / 2.0D;
if (d10 < 0.0D) {
d6 = d8;
} else if (d10 > 1.0D) {
d6 = d9;
} else {
d6 = d8 + (d9 - d8) * d10;
}
d6 -= d7;
double d11;
if (k2 > i1 - 4) {
d11 = (double) ((float) (k2 - (i1 - 4)) / 3.0F);
d6 = d6 * (1.0D - d11) + -10.0D * d11;
}
if ((double) k2 < d4) {
d11 = (d4 - (double) k2) / 4.0D;
if (d11 < 0.0D) {
d11 = 0.0D;
}
if (d11 > 1.0D) {
d11 = 1.0D;
}
d6 = d6 * (1.0D - d11) + -10.0D * d11;
}
adouble[k1] = d6;
++k1;
}
}
}
return adouble;
}
public boolean isChunkLoaded(int i, int j) {
return true;
}
public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
BlockSand.instaFall = true;
int k = i * 16;
int l = j * 16;
this.c.a(this.o, this.i, i, j);
int i1;
int j1;
int k1;
int l1;
for (i1 = 0; i1 < 8; ++i1) {
j1 = k + this.i.nextInt(16) + 8;
k1 = this.i.nextInt(120) + 4;
l1 = l + this.i.nextInt(16) + 8;
(new WorldGenHellLava(Block.LAVA.id)).a(this.o, this.i, j1, k1, l1);
}
i1 = this.i.nextInt(this.i.nextInt(10) + 1) + 1;
int i2;
for (j1 = 0; j1 < i1; ++j1) {
k1 = k + this.i.nextInt(16) + 8;
l1 = this.i.nextInt(120) + 4;
i2 = l + this.i.nextInt(16) + 8;
(new WorldGenFire()).a(this.o, this.i, k1, l1, i2);
}
i1 = this.i.nextInt(this.i.nextInt(10) + 1);
for (j1 = 0; j1 < i1; ++j1) {
k1 = k + this.i.nextInt(16) + 8;
l1 = this.i.nextInt(120) + 4;
i2 = l + this.i.nextInt(16) + 8;
(new WorldGenLightStone1()).a(this.o, this.i, k1, l1, i2);
}
for (j1 = 0; j1 < 10; ++j1) {
k1 = k + this.i.nextInt(16) + 8;
l1 = this.i.nextInt(128);
i2 = l + this.i.nextInt(16) + 8;
(new WorldGenLightStone2()).a(this.o, this.i, k1, l1, i2);
}
if (this.i.nextInt(1) == 0) {
j1 = k + this.i.nextInt(16) + 8;
k1 = this.i.nextInt(128);
l1 = l + this.i.nextInt(16) + 8;
(new WorldGenFlowers(Block.BROWN_MUSHROOM.id)).a(this.o, this.i, j1, k1, l1);
}
if (this.i.nextInt(1) == 0) {
j1 = k + this.i.nextInt(16) + 8;
k1 = this.i.nextInt(128);
l1 = l + this.i.nextInt(16) + 8;
(new WorldGenFlowers(Block.RED_MUSHROOM.id)).a(this.o, this.i, j1, k1, l1);
}
BlockSand.instaFall = false;
}
public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
return true;
}
public boolean unloadChunks() {
return false;
}
public boolean canSave() {
return true;
}
public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) {
if (enumcreaturetype == EnumCreatureType.MONSTER && this.c.a(i, j, k)) {
return this.c.b();
} else {
BiomeBase biomebase = this.o.getBiome(i, k);
return biomebase == null ? null : biomebase.getMobs(enumcreaturetype);
}
}
public ChunkPosition findNearestMapFeature(World world, String s, int i, int j, int k) {
return null;
}
}

Datei anzeigen

@ -1,303 +0,0 @@
package net.minecraft.server;
import java.util.List;
import java.util.Random;
public class ChunkProviderTheEnd implements IChunkProvider {
private Random i;
private NoiseGeneratorOctaves j;
private NoiseGeneratorOctaves k;
private NoiseGeneratorOctaves l;
public NoiseGeneratorOctaves a;
public NoiseGeneratorOctaves b;
private World m;
private double[] n;
private BiomeBase[] o;
double[] c;
double[] d;
double[] e;
double[] f;
double[] g;
int[][] h = new int[32][32];
public ChunkProviderTheEnd(World world, long i) {
this.m = world;
this.i = new Random(i);
this.j = new NoiseGeneratorOctaves(this.i, 16);
this.k = new NoiseGeneratorOctaves(this.i, 16);
this.l = new NoiseGeneratorOctaves(this.i, 8);
this.a = new NoiseGeneratorOctaves(this.i, 10);
this.b = new NoiseGeneratorOctaves(this.i, 16);
}
public void a(int i, int j, byte[] abyte, BiomeBase[] abiomebase) {
byte b0 = 2;
int k = b0 + 1;
byte b1 = 33;
int l = b0 + 1;
this.n = this.a(this.n, i * b0, 0, j * b0, k, b1, l);
for (int i1 = 0; i1 < b0; ++i1) {
for (int j1 = 0; j1 < b0; ++j1) {
for (int k1 = 0; k1 < 32; ++k1) {
double d0 = 0.25D;
double d1 = this.n[((i1 + 0) * l + j1 + 0) * b1 + k1 + 0];
double d2 = this.n[((i1 + 0) * l + j1 + 1) * b1 + k1 + 0];
double d3 = this.n[((i1 + 1) * l + j1 + 0) * b1 + k1 + 0];
double d4 = this.n[((i1 + 1) * l + j1 + 1) * b1 + k1 + 0];
double d5 = (this.n[((i1 + 0) * l + j1 + 0) * b1 + k1 + 1] - d1) * d0;
double d6 = (this.n[((i1 + 0) * l + j1 + 1) * b1 + k1 + 1] - d2) * d0;
double d7 = (this.n[((i1 + 1) * l + j1 + 0) * b1 + k1 + 1] - d3) * d0;
double d8 = (this.n[((i1 + 1) * l + j1 + 1) * b1 + k1 + 1] - d4) * d0;
for (int l1 = 0; l1 < 4; ++l1) {
double d9 = 0.125D;
double d10 = d1;
double d11 = d2;
double d12 = (d3 - d1) * d9;
double d13 = (d4 - d2) * d9;
for (int i2 = 0; i2 < 8; ++i2) {
int j2 = i2 + i1 * 8 << 11 | 0 + j1 * 8 << 7 | k1 * 4 + l1;
short short1 = 128;
double d14 = 0.125D;
double d15 = d10;
double d16 = (d11 - d10) * d14;
for (int k2 = 0; k2 < 8; ++k2) {
int l2 = 0;
if (d15 > 0.0D) {
l2 = Block.WHITESTONE.id;
}
abyte[j2] = (byte) l2;
j2 += short1;
d15 += d16;
}
d10 += d12;
d11 += d13;
}
d1 += d5;
d2 += d6;
d3 += d7;
d4 += d8;
}
}
}
}
}
public void b(int i, int j, byte[] abyte, BiomeBase[] abiomebase) {
for (int k = 0; k < 16; ++k) {
for (int l = 0; l < 16; ++l) {
byte b0 = 1;
int i1 = -1;
byte b1 = (byte) Block.WHITESTONE.id;
byte b2 = (byte) Block.WHITESTONE.id;
for (int j1 = 127; j1 >= 0; --j1) {
int k1 = (l * 16 + k) * 128 + j1;
byte b3 = abyte[k1];
if (b3 == 0) {
i1 = -1;
} else if (b3 == Block.STONE.id) {
if (i1 == -1) {
if (b0 <= 0) {
b1 = 0;
b2 = (byte) Block.WHITESTONE.id;
}
i1 = b0;
if (j1 >= 0) {
abyte[k1] = b1;
} else {
abyte[k1] = b2;
}
} else if (i1 > 0) {
--i1;
abyte[k1] = b2;
}
}
}
}
}
}
public Chunk getChunkAt(int i, int j) {
return this.getOrCreateChunk(i, j);
}
public Chunk getOrCreateChunk(int i, int j) {
this.i.setSeed((long) i * 341873128712L + (long) j * 132897987541L);
byte[] abyte = new byte['\u8000'];
this.o = this.m.getWorldChunkManager().getBiomeBlock(this.o, i * 16, j * 16, 16, 16);
this.a(i, j, abyte, this.o);
this.b(i, j, abyte, this.o);
Chunk chunk = new Chunk(this.m, abyte, i, j);
// CraftBukkit start - prime biome data to prevent uninitialized values racing to client
byte[] biomes = chunk.l();
for(int idx = 0; idx < biomes.length; idx++) {
biomes[idx] = (byte) this.o[idx].id;
}
// CraftBukkit end
chunk.initLighting();
return chunk;
}
private double[] a(double[] adouble, int i, int j, int k, int l, int i1, int j1) {
if (adouble == null) {
adouble = new double[l * i1 * j1];
}
double d0 = 684.412D;
double d1 = 684.412D;
this.f = this.a.a(this.f, i, k, l, j1, 1.121D, 1.121D, 0.5D);
this.g = this.b.a(this.g, i, k, l, j1, 200.0D, 200.0D, 0.5D);
d0 *= 2.0D;
this.c = this.l.a(this.c, i, j, k, l, i1, j1, d0 / 80.0D, d1 / 160.0D, d0 / 80.0D);
this.d = this.j.a(this.d, i, j, k, l, i1, j1, d0, d1, d0);
this.e = this.k.a(this.e, i, j, k, l, i1, j1, d0, d1, d0);
int k1 = 0;
int l1 = 0;
for (int i2 = 0; i2 < l; ++i2) {
for (int j2 = 0; j2 < j1; ++j2) {
double d2 = (this.f[l1] + 256.0D) / 512.0D;
if (d2 > 1.0D) {
d2 = 1.0D;
}
double d3 = this.g[l1] / 8000.0D;
if (d3 < 0.0D) {
d3 = -d3 * 0.3D;
}
d3 = d3 * 3.0D - 2.0D;
float f = (float) (i2 + i - 0) / 1.0F;
float f1 = (float) (j2 + k - 0) / 1.0F;
float f2 = 100.0F - MathHelper.c(f * f + f1 * f1) * 8.0F;
if (f2 > 80.0F) {
f2 = 80.0F;
}
if (f2 < -100.0F) {
f2 = -100.0F;
}
if (d3 > 1.0D) {
d3 = 1.0D;
}
d3 /= 8.0D;
d3 = 0.0D;
if (d2 < 0.0D) {
d2 = 0.0D;
}
d2 += 0.5D;
d3 = d3 * (double) i1 / 16.0D;
++l1;
double d4 = (double) i1 / 2.0D;
for (int k2 = 0; k2 < i1; ++k2) {
double d5 = 0.0D;
double d6 = ((double) k2 - d4) * 8.0D / d2;
if (d6 < 0.0D) {
d6 *= -1.0D;
}
double d7 = this.d[k1] / 512.0D;
double d8 = this.e[k1] / 512.0D;
double d9 = (this.c[k1] / 10.0D + 1.0D) / 2.0D;
if (d9 < 0.0D) {
d5 = d7;
} else if (d9 > 1.0D) {
d5 = d8;
} else {
d5 = d7 + (d8 - d7) * d9;
}
d5 -= 8.0D;
d5 += (double) f2;
byte b0 = 2;
double d10;
if (k2 > i1 / 2 - b0) {
d10 = (double) ((float) (k2 - (i1 / 2 - b0)) / 64.0F);
if (d10 < 0.0D) {
d10 = 0.0D;
}
if (d10 > 1.0D) {
d10 = 1.0D;
}
d5 = d5 * (1.0D - d10) + -3000.0D * d10;
}
b0 = 8;
if (k2 < b0) {
d10 = (double) ((float) (b0 - k2) / ((float) b0 - 1.0F));
d5 = d5 * (1.0D - d10) + -30.0D * d10;
}
adouble[k1] = d5;
++k1;
}
}
}
return adouble;
}
public boolean isChunkLoaded(int i, int j) {
return true;
}
public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
BlockSand.instaFall = true;
int k = i * 16;
int l = j * 16;
BiomeBase biomebase = this.m.getBiome(k + 16, l + 16);
biomebase.a(this.m, this.m.random, k, l);
BlockSand.instaFall = false;
}
public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
return true;
}
public boolean unloadChunks() {
return false;
}
public boolean canSave() {
return true;
}
public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) {
BiomeBase biomebase = this.m.getBiome(i, k);
return biomebase == null ? null : biomebase.getMobs(enumcreaturetype);
}
public ChunkPosition findNearestMapFeature(World world, String s, int i, int j, int k) {
return null;
}
}

Datei anzeigen

@ -48,17 +48,17 @@ public class ChunkSection {
if (i1 == 0 && l != 0) {
++this.b;
if (Block.byId[l] != null && Block.byId[l].m()) {
if (Block.byId[l] != null && Block.byId[l].n()) {
++this.c;
}
} else if (i1 != 0 && l == 0) {
--this.b;
if (Block.byId[i1] != null && Block.byId[i1].m()) {
if (Block.byId[i1] != null && Block.byId[i1].n()) {
--this.c;
}
} else if (Block.byId[i1] != null && Block.byId[i1].m() && (Block.byId[l] == null || !Block.byId[l].m())) {
} else if (Block.byId[i1] != null && Block.byId[i1].n() && (Block.byId[l] == null || !Block.byId[l].n())) {
--this.c;
} else if ((Block.byId[i1] == null || !Block.byId[i1].m()) && Block.byId[l] != null && Block.byId[l].m()) {
} else if ((Block.byId[i1] == null || !Block.byId[i1].n()) && Block.byId[l] != null && Block.byId[l].n()) {
++this.c;
}
@ -127,7 +127,7 @@ public class ChunkSection {
}
} else {
++this.b;
if (Block.byId[l].m()) {
if (Block.byId[l].n()) {
++this.c;
}
}

Datei anzeigen

@ -57,7 +57,10 @@ public class CraftingManager {
this.registerShapedRecipe(new ItemStack(Item.SIGN, 1), new Object[] { "###", "###", " X ", Character.valueOf('#'), Block.WOOD, Character.valueOf('X'), Item.STICK});
this.registerShapedRecipe(new ItemStack(Item.CAKE, 1), new Object[] { "AAA", "BEB", "CCC", Character.valueOf('A'), Item.MILK_BUCKET, Character.valueOf('B'), Item.SUGAR, Character.valueOf('C'), Item.WHEAT, Character.valueOf('E'), Item.EGG});
this.registerShapedRecipe(new ItemStack(Item.SUGAR, 1), new Object[] { "#", Character.valueOf('#'), Item.SUGAR_CANE});
this.registerShapedRecipe(new ItemStack(Block.WOOD, 4), new Object[] { "#", Character.valueOf('#'), Block.LOG});
this.registerShapedRecipe(new ItemStack(Block.WOOD, 4, 0), new Object[] { "#", Character.valueOf('#'), new ItemStack(Block.LOG, 1, 0)});
this.registerShapedRecipe(new ItemStack(Block.WOOD, 4, 1), new Object[] { "#", Character.valueOf('#'), new ItemStack(Block.LOG, 1, 1)});
this.registerShapedRecipe(new ItemStack(Block.WOOD, 4, 2), new Object[] { "#", Character.valueOf('#'), new ItemStack(Block.LOG, 1, 2)});
this.registerShapedRecipe(new ItemStack(Block.WOOD, 4, 3), new Object[] { "#", Character.valueOf('#'), new ItemStack(Block.LOG, 1, 3)});
this.registerShapedRecipe(new ItemStack(Item.STICK, 4), new Object[] { "#", "#", Character.valueOf('#'), Block.WOOD});
this.registerShapedRecipe(new ItemStack(Block.TORCH, 4), new Object[] { "X", "#", Character.valueOf('X'), Item.COAL, Character.valueOf('#'), Item.STICK});
this.registerShapedRecipe(new ItemStack(Block.TORCH, 4), new Object[] { "X", "#", Character.valueOf('X'), new ItemStack(Item.COAL, 1, 1), Character.valueOf('#'), Item.STICK});

Datei anzeigen

@ -193,11 +193,11 @@ public abstract class Entity {
this.boundingBox.c(d0 - (double) f, d1 - (double) this.height + (double) this.bO, d2 - (double) f, d0 + (double) f, d1 - (double) this.height + (double) this.bO + (double) f1, d2 + (double) f);
}
public void G_() {
this.az();
public void F_() {
this.aA();
}
public void az() {
public void aA() {
// MethodProfiler.a("entityBaseTick"); // CraftBukkit - not in production code
if (this.vehicle != null && this.vehicle.dead) {
this.vehicle = null;
@ -212,7 +212,7 @@ public abstract class Entity {
this.lastYaw = this.yaw;
int i;
if (this.isSprinting() && !this.aT()) {
if (this.isSprinting() && !this.aU()) {
int j = MathHelper.floor(this.locX);
int k = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height);
@ -286,13 +286,13 @@ public abstract class Entity {
}
}
if (this.aU()) {
this.aP();
if (this.aV()) {
this.aQ();
this.fallDistance *= 0.5F;
}
if (this.locY < -64.0D) {
this.aH();
this.aI();
}
if (!this.world.isStatic) {
@ -304,7 +304,7 @@ public abstract class Entity {
// MethodProfiler.a(); // CraftBukkit - not in production code
}
protected void aP() {
protected void aQ() {
if (!this.fireProof) {
// CraftBukkit start - fallen in lava TODO: this event spams!
if (this instanceof EntityLiving) {
@ -354,7 +354,7 @@ public abstract class Entity {
this.fireTicks = 0;
}
protected void aH() {
protected void aI() {
this.die();
}
@ -415,6 +415,27 @@ public abstract class Entity {
d2 += d8;
}
}
while (d0 != 0.0D && d2 != 0.0D && this.world.getCubes(this, this.boundingBox.c(d0, -1.0D, d2)).size() == 0) {
if (d0 < d8 && d0 >= -d8) {
d0 = 0.0D;
} else if (d0 > 0.0D) {
d0 -= d8;
} else {
d0 += d8;
}
if (d2 < d8 && d2 >= -d8) {
d2 = 0.0D;
} else if (d2 > 0.0D) {
d2 -= d8;
} else {
d2 += d8;
}
d5 = d0;
d7 = d2;
}
}
List list = this.world.getCubes(this, this.boundingBox.a(d0, d1, d2));
@ -620,7 +641,7 @@ public abstract class Entity {
}
}
boolean flag2 = this.aS();
boolean flag2 = this.aT();
if (this.world.d(this.boundingBox.shrink(0.0010D, 0.0010D, 0.0010D))) {
this.burn(1);
@ -725,11 +746,11 @@ public abstract class Entity {
}
}
public boolean aS() {
public boolean aT() {
return this.bV || this.world.y(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ));
}
public boolean aT() {
public boolean aU() {
return this.bV;
}
@ -758,7 +779,7 @@ public abstract class Entity {
return 0.0F;
}
public boolean aU() {
public boolean aV() {
return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
}
@ -905,12 +926,12 @@ public abstract class Entity {
this.ce = true;
}
protected void aV() {
protected void aW() {
this.velocityChanged = true;
}
public boolean damageEntity(DamageSource damagesource, int i) {
this.aV();
this.aW();
return false;
}
@ -925,7 +946,7 @@ public abstract class Entity {
public void b(Entity entity, int i) {}
public boolean c(NBTTagCompound nbttagcompound) {
String s = this.aW();
String s = this.aX();
if (!this.dead && s != null) {
nbttagcompound.setString("id", s);
@ -1050,7 +1071,7 @@ public abstract class Entity {
// CraftBukkit end
}
protected final String aW() {
protected final String aX() {
return EntityTypes.b(this);
}
@ -1131,14 +1152,14 @@ public abstract class Entity {
return null;
}
public void Q() {
public void R() {
if (this.vehicle.dead) {
this.vehicle = null;
} else {
this.motX = 0.0D;
this.motY = 0.0D;
this.motZ = 0.0D;
this.G_();
this.F_();
if (this.vehicle != null) {
this.vehicle.i_();
this.f += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
@ -1188,10 +1209,10 @@ public abstract class Entity {
}
public void i_() {
this.passenger.setPosition(this.locX, this.locY + this.x_() + this.passenger.V(), this.locZ);
this.passenger.setPosition(this.locX, this.locY + this.x_() + this.passenger.W(), this.locZ);
}
public double V() {
public double W() {
return (double) this.height;
}
@ -1276,11 +1297,11 @@ public abstract class Entity {
return 0.1F;
}
public Vec3D aI() {
public Vec3D aJ() {
return null;
}
public void ac() {}
public void ad() {}
public ItemStack[] getEquipment() {
return null;
@ -1472,7 +1493,7 @@ public abstract class Entity {
return LocaleI18n.get("entity." + s + ".name");
}
public Entity[] ba() {
public Entity[] bb() {
return null;
}
@ -1480,7 +1501,7 @@ public abstract class Entity {
return this == entity;
}
public float aq() {
public float ar() {
return 0.0F;
}

Datei anzeigen

@ -104,8 +104,8 @@ public class EntityArrow extends Entity {
this.k = 0;
}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (this.lastPitch == 0.0F && this.lastYaw == 0.0F) {
float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
@ -298,7 +298,7 @@ public class EntityArrow extends Entity {
float f4 = 0.99F;
f1 = 0.05F;
if (this.aT()) {
if (this.aU()) {
for (int i1 = 0; i1 < 4; ++i1) {
float f5 = 0.25F;

Datei anzeigen

@ -52,7 +52,7 @@ public class EntityBlaze extends EntityMonster {
public void e() {
if (!this.world.isStatic) {
if (this.aS()) {
if (this.aT()) {
this.damageEntity(DamageSource.DROWN, 1);
}
@ -62,7 +62,7 @@ public class EntityBlaze extends EntityMonster {
this.a = 0.5F + (float) this.random.nextGaussian() * 3.0F;
}
if (this.H() != null && this.H().locY + (double) this.H().getHeadHeight() > this.locY + (double) this.getHeadHeight() + (double) this.a) {
if (this.I() != null && this.I().locY + (double) this.I().getHeadHeight() > this.locY + (double) this.getHeadHeight() + (double) this.a) {
this.motY += (0.30000001192092896D - this.motY) * 0.30000001192092896D;
}
}
@ -172,7 +172,7 @@ public class EntityBlaze extends EntityMonster {
this.datawatcher.watch(16, Byte.valueOf(b0));
}
protected boolean D() {
protected boolean C() {
return true;
}
}

Datei anzeigen

@ -110,7 +110,7 @@ public class EntityBoat extends Entity {
this.d(-this.m());
this.c(10);
this.setDamage(this.getDamage() + i * 10);
this.aV();
this.aW();
if (this.getDamage() > 40) {
// CraftBukkit start
List<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
@ -168,7 +168,7 @@ public class EntityBoat extends Entity {
return !this.dead;
}
public void G_() {
public void F_() {
// CraftBukkit start
double prevX = this.locX;
double prevY = this.locY;
@ -177,7 +177,7 @@ public class EntityBoat extends Entity {
float prevPitch = this.pitch;
// CraftBukkit end
super.G_();
super.F_();
if (this.l() > 0) {
this.c(this.l() - 1);
}
@ -443,7 +443,7 @@ public class EntityBoat extends Entity {
double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
double d1 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
this.passenger.setPosition(this.locX + d0, this.locY + this.x_() + this.passenger.V(), this.locZ + d1);
this.passenger.setPosition(this.locX + d0, this.locY + this.x_() + this.passenger.W(), this.locZ + d1);
}
}

Datei anzeigen

@ -15,7 +15,7 @@ public class EntityCow extends EntityAnimal {
super(world);
this.texture = "/mob/cow.png";
this.b(0.9F, 1.3F);
this.ak().a(true);
this.al().a(true);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalPanic(this, 0.38F));
this.goalSelector.a(2, new PathfinderGoalBreed(this, 0.2F));

Datei anzeigen

@ -17,7 +17,7 @@ public abstract class EntityCreature extends EntityLiving {
super(world);
}
protected boolean E() {
protected boolean F() {
return false;
}
@ -27,7 +27,7 @@ public abstract class EntityCreature extends EntityLiving {
--this.f;
}
this.e = this.E();
this.e = this.F();
float f = 16.0F;
if (this.target == null) {
@ -77,12 +77,12 @@ public abstract class EntityCreature extends EntityLiving {
if (!this.e && this.target != null && (this.pathEntity == null || this.random.nextInt(20) == 0)) {
this.pathEntity = this.world.findPath(this, this.target, f, true, false, false, true);
} else if (!this.e && (this.pathEntity == null && this.random.nextInt(180) == 0 || this.random.nextInt(120) == 0 || this.f > 0) && this.aV < 100) {
this.F();
this.G();
}
int i = MathHelper.floor(this.boundingBox.b + 0.5D);
boolean flag = this.aT();
boolean flag1 = this.aU();
boolean flag = this.aU();
boolean flag1 = this.aV();
this.pitch = 0.0F;
if (this.pathEntity != null && this.random.nextInt(100) != 0) {
@ -146,7 +146,7 @@ public abstract class EntityCreature extends EntityLiving {
this.a(this.target, 30.0F, 30.0F);
}
if (this.positionChanged && !this.G()) {
if (this.positionChanged && !this.H()) {
this.aZ = true;
}
@ -161,7 +161,7 @@ public abstract class EntityCreature extends EntityLiving {
}
}
protected void F() {
protected void G() {
// MethodProfiler.a("stroll"); // CraftBukkit - not in production code
boolean flag = false;
int i = -1;
@ -211,7 +211,7 @@ public abstract class EntityCreature extends EntityLiving {
return super.canSpawn() && this.a(i, j, k) >= 0.0F;
}
public boolean G() {
public boolean H() {
return this.pathEntity != null;
}
@ -219,7 +219,7 @@ public abstract class EntityCreature extends EntityLiving {
this.pathEntity = pathentity;
}
public Entity H() {
public Entity I() {
return this.target;
}
@ -227,11 +227,11 @@ public abstract class EntityCreature extends EntityLiving {
this.target = entity;
}
protected float D_() {
protected float J() {
if (this.c_()) {
return 1.0F;
} else {
float f = super.D_();
float f = super.J();
if (this.f > 0) {
f *= 2.0F;

Datei anzeigen

@ -23,7 +23,7 @@ public class EntityCreeper extends EntityMonster {
this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, 0.2F));
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(6, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 16.0F, 0, false));
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 16.0F, 0, true));
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false));
}
@ -53,7 +53,7 @@ public class EntityCreeper extends EntityMonster {
this.datawatcher.watch(17, Byte.valueOf((byte) (nbttagcompound.getBoolean("powered") ? 1 : 0)));
}
public void G_() {
public void F_() {
if (this.isAlive()) {
this.b = this.fuseTicks;
int i = this.A();
@ -85,7 +85,7 @@ public class EntityCreeper extends EntityMonster {
}
}
super.G_();
super.F_();
}
protected String j() {

Datei anzeigen

@ -22,7 +22,7 @@ public class EntityEnderCrystal extends Entity {
this.datawatcher.a(8, Integer.valueOf(this.b));
}
public void G_() {
public void F_() {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;

Datei anzeigen

@ -272,14 +272,14 @@ public class EntityEnderDragon extends EntityComplex {
float f11 = MathHelper.sin(f10);
float f12 = MathHelper.cos(f10);
this.h.G_();
this.h.F_();
this.h.setPositionRotation(this.locX + (double) (f11 * 0.5F), this.locY, this.locZ - (double) (f12 * 0.5F), 0.0F, 0.0F);
this.l.G_();
this.l.F_();
this.l.setPositionRotation(this.locX + (double) (f12 * 4.5F), this.locY + 2.0D, this.locZ + (double) (f11 * 4.5F), 0.0F, 0.0F);
this.m.G_();
this.m.F_();
this.m.setPositionRotation(this.locX - (double) (f12 * 4.5F), this.locY + 2.0D, this.locZ - (double) (f11 * 4.5F), 0.0F, 0.0F);
if (!this.world.isStatic) {
this.D();
this.C();
}
if (!this.world.isStatic && this.at == 0) {
@ -294,7 +294,7 @@ public class EntityEnderDragon extends EntityComplex {
f3 = MathHelper.sin(this.yaw * 3.1415927F / 180.0F - this.aY * 0.01F);
float f13 = MathHelper.cos(this.yaw * 3.1415927F / 180.0F - this.aY * 0.01F);
this.g.G_();
this.g.F_();
this.g.setPositionRotation(this.locX + (double) (f3 * 5.5F * f1), this.locY + (adouble1[1] - adouble[1]) * 1.0D + (double) (f9 * 5.5F), this.locZ - (double) (f13 * 5.5F * f1), 0.0F, 0.0F);
for (int j = 0; j < 3; ++j) {
@ -319,7 +319,7 @@ public class EntityEnderDragon extends EntityComplex {
float f17 = 1.5F;
float f18 = (float) (j + 1) * 2.0F;
entitycomplexpart.G_();
entitycomplexpart.F_();
entitycomplexpart.setPositionRotation(this.locX - (double) ((f11 * f17 + f15 * f18) * f1), this.locY + (adouble2[1] - adouble[1]) * 1.0D - (double) ((f18 + f17) * f9) + 1.5D, this.locZ + (double) ((f12 * f17 + f16 * f18) * f1), 0.0F, 0.0F);
}
@ -370,7 +370,7 @@ public class EntityEnderDragon extends EntityComplex {
}
}
private void D() {}
private void C() {}
private void a(List list) {
double d0 = (this.h.boundingBox.a + this.h.boundingBox.d) / 2.0D;
@ -527,7 +527,7 @@ public class EntityEnderDragon extends EntityComplex {
return true;
}
protected void aA() {
protected void aB() {
++this.r;
if (this.r >= 180 && this.r <= 200) {
float f = (this.random.nextFloat() - 0.5F) * 8.0F;
@ -562,7 +562,7 @@ public class EntityEnderDragon extends EntityComplex {
}
this.a(MathHelper.floor(this.locX), MathHelper.floor(this.locZ));
this.aG();
this.aH();
this.die();
}
}
@ -623,9 +623,9 @@ public class EntityEnderDragon extends EntityComplex {
BlockEnderPortal.a = false;
}
protected void aF() {}
protected void aG() {}
public Entity[] ba() {
public Entity[] bb() {
return this.children;
}

Datei anzeigen

@ -85,7 +85,7 @@ public class EntityEnderman extends EntityMonster {
}
public void e() {
if (this.aS()) {
if (this.aT()) {
this.damageEntity(DamageSource.DROWN, 1);
}
@ -147,7 +147,7 @@ public class EntityEnderman extends EntityMonster {
}
}
if (this.aS()) {
if (this.aT()) {
this.target = null;
this.x();
}

Datei anzeigen

@ -34,8 +34,8 @@ public class EntityExperienceOrb extends Entity {
protected void b() {}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (this.c > 0) {
--this.c;
}
@ -111,7 +111,7 @@ public class EntityExperienceOrb extends Entity {
}
public boolean damageEntity(DamageSource damagesource, int i) {
this.aV();
this.aW();
this.d -= i;
if (this.d <= 0) {
this.die();

Datei anzeigen

@ -37,7 +37,7 @@ public class EntityFallingBlock extends Entity {
return !this.dead;
}
public void G_() {
public void F_() {
if (this.id == 0) {
this.die();
} else {

Datei anzeigen

@ -69,11 +69,11 @@ public class EntityFireball extends Entity {
this.dirZ = d2 / d3 * 0.1D;
}
public void G_() {
public void F_() {
if (!this.world.isStatic && (this.shooter != null && this.shooter.dead || !this.world.isLoaded((int) this.locX, (int) this.locY, (int) this.locZ))) {
this.die();
} else {
super.G_();
super.F_();
this.setOnFire(1);
if (this.i) {
int i = this.world.getTypeId(this.e, this.f, this.g);
@ -171,7 +171,7 @@ public class EntityFireball extends Entity {
this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F;
float f2 = 0.95F;
if (this.aT()) {
if (this.aU()) {
for (int k = 0; k < 4; ++k) {
float f3 = 0.25F;
@ -235,9 +235,9 @@ public class EntityFireball extends Entity {
}
public boolean damageEntity(DamageSource damagesource, int i) {
this.aV();
this.aW();
if (damagesource.getEntity() != null) {
Vec3D vec3d = damagesource.getEntity().aI();
Vec3D vec3d = damagesource.getEntity().aJ();
if (vec3d != null) {
this.motX = vec3d.a;

Datei anzeigen

@ -74,8 +74,8 @@ public class EntityFishingHook extends Entity {
this.i = 0;
}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (this.l > 0) {
double d0 = this.locX + (this.m - this.locX) / (double) this.l;
double d1 = this.locY + (this.n - this.locY) / (double) this.l;
@ -98,7 +98,7 @@ public class EntityFishingHook extends Entity {
this.c(this.yaw, this.pitch);
} else {
if (!this.world.isStatic) {
ItemStack itemstack = this.owner.T();
ItemStack itemstack = this.owner.U();
if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.j(this.owner) > 1024.0D) {
this.die();

Datei anzeigen

@ -46,8 +46,8 @@ public class EntityGhast extends EntityFlying implements IMonster {
return 10;
}
public void G_() {
super.G_();
public void F_() {
super.F_();
byte b0 = this.datawatcher.getByte(16);
this.texture = b0 == 1 ? "/mob/ghast_fire.png" : "/mob/ghast.png";
@ -58,7 +58,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
this.die();
}
this.aF();
this.aG();
this.e = this.f;
double d0 = this.b - this.locX;
double d1 = this.c - this.locY;

Datei anzeigen

@ -91,19 +91,19 @@ public abstract class EntityHuman extends EntityLiving {
this.datawatcher.a(17, Byte.valueOf((byte) 0));
}
public boolean L() {
public boolean M() {
return this.d != null;
}
public void M() {
public void N() {
if (this.d != null) {
this.d.b(this.world, this, this.e);
}
this.N();
this.O();
}
public void N() {
public void O() {
this.d = null;
this.e = 0;
if (!this.world.isStatic) {
@ -111,16 +111,16 @@ public abstract class EntityHuman extends EntityLiving {
}
}
public boolean O() {
return this.L() && Item.byId[this.d.id].d(this.d) == EnumAnimation.d;
public boolean P() {
return this.M() && Item.byId[this.d.id].d(this.d) == EnumAnimation.d;
}
public void G_() {
public void F_() {
if (this.d != null) {
ItemStack itemstack = this.inventory.getItemInHand();
if (itemstack != this.d) {
this.N();
this.O();
} else {
if (this.e <= 25 && this.e % 4 == 0) {
this.b(itemstack, 5);
@ -156,7 +156,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
super.G_();
super.F_();
if (!this.world.isStatic && this.activeContainer != null && !this.activeContainer.b(this)) {
this.closeInventory();
this.activeContainer = this.defaultContainer;
@ -253,11 +253,11 @@ public abstract class EntityHuman extends EntityLiving {
}
}
this.N();
this.O();
}
}
protected boolean P() {
protected boolean Q() {
return this.getHealth() <= 0 || this.isSleeping();
}
@ -266,12 +266,12 @@ public abstract class EntityHuman extends EntityLiving {
this.activeContainer = this.defaultContainer;
}
public void Q() {
public void R() {
double d0 = this.locX;
double d1 = this.locY;
double d2 = this.locZ;
super.Q();
super.R();
this.r = this.s;
this.s = 0.0F;
this.h(this.locX - d0, this.locY - d1, this.locZ - d2);
@ -390,7 +390,7 @@ public abstract class EntityHuman extends EntityLiving {
return j > 0 && this.random.nextInt(j + 1) > 0 ? i : super.b_(i);
}
public EntityItem R() {
public EntityItem S() {
return this.a(this.inventory.splitStack(this.inventory.itemInHandIndex, 1), false);
}
@ -622,7 +622,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
protected boolean C_() {
protected boolean C() {
return false;
}
@ -636,7 +636,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
if (!(entityliving instanceof EntityHuman) || this.C_()) {
if (!(entityliving instanceof EntityHuman) || this.C()) {
List list = this.world.a(EntityWolf.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 4.0D, 16.0D));
Iterator iterator = list.iterator();
@ -644,7 +644,7 @@ public abstract class EntityHuman extends EntityLiving {
Entity entity = (Entity) iterator.next();
EntityWolf entitywolf1 = (EntityWolf) entity;
if (entitywolf1.isTamed() && entitywolf1.H() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
if (entitywolf1.isTamed() && entitywolf1.I() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
entitywolf1.setSitting(false);
entitywolf1.setTarget(entityliving);
}
@ -657,12 +657,12 @@ public abstract class EntityHuman extends EntityLiving {
this.inventory.e(i);
}
public int S() {
public int T() {
return this.inventory.j();
}
protected void c(DamageSource damagesource, int i) {
if (!damagesource.ignoresArmor() && this.O()) {
if (!damagesource.ignoresArmor() && this.P()) {
i = 1 + i >> 1;
}
@ -682,32 +682,32 @@ public abstract class EntityHuman extends EntityLiving {
public void e(Entity entity) {
if (!entity.b(this)) {
ItemStack itemstack = this.T();
ItemStack itemstack = this.U();
if (itemstack != null && entity instanceof EntityLiving) {
itemstack.a((EntityLiving) entity);
// CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0) {
itemstack.a(this);
this.U();
this.V();
}
}
}
}
public ItemStack T() {
public ItemStack U() {
return this.inventory.getItemInHand();
}
public void U() {
public void V() {
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
}
public double V() {
public double W() {
return (double) (this.height - 0.5F);
}
public void D() {
public void C_() {
if (!this.t || this.u >= this.E() / 2 || this.u < 0) {
this.u = -1;
this.t = true;
@ -739,7 +739,7 @@ public abstract class EntityHuman extends EntityLiving {
}
if (i > 0 || k > 0) {
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.t() && !this.aT() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.t() && !this.aU() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
if (flag) {
i += this.random.nextInt(i / 2 + 2);
@ -777,14 +777,14 @@ public abstract class EntityHuman extends EntityLiving {
this.g(entity);
}
ItemStack itemstack = this.T();
ItemStack itemstack = this.U();
if (itemstack != null && entity instanceof EntityLiving) {
itemstack.a((EntityLiving) entity, this);
// CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0) {
itemstack.a(this);
this.U();
this.V();
}
}
@ -1034,8 +1034,8 @@ public abstract class EntityHuman extends EntityLiving {
public void a(Statistic statistic, int i) {}
protected void ab() {
super.ab();
protected void ac() {
super.ac();
this.a(StatisticList.u, 1);
if (this.isSprinting()) {
this.c(0.8F);
@ -1074,7 +1074,7 @@ public abstract class EntityHuman extends EntityLiving {
this.a(StatisticList.q, i);
this.c(0.015F * (float) i * 0.01F);
}
} else if (this.aT()) {
} else if (this.aU()) {
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.m, i);
@ -1140,7 +1140,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
public void ac() {
public void ad() {
if (this.I > 0) {
this.I = 10;
} else {
@ -1195,7 +1195,7 @@ public abstract class EntityHuman extends EntityLiving {
return (flag || this.foodData.b()) && !this.abilities.isInvulnerable;
}
public boolean af() {
public boolean ag() {
return this.getHealth() > 0 && this.getHealth() < this.getMaxHealth();
}
@ -1242,4 +1242,6 @@ public abstract class EntityHuman extends EntityLiving {
protected boolean g_() {
return !this.abilities.isFlying;
}
public void updateAbilities() {}
}

Datei anzeigen

@ -13,7 +13,7 @@ public class EntityIronGolem extends EntityGolem {
super(world);
this.texture = "/mob/villager_golem.png";
this.b(1.4F, 2.9F);
this.ak().a(true);
this.al().a(true);
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 0.25F, true));
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.22F, 32.0F));
this.goalSelector.a(3, new PathfinderGoalMoveThroughVillage(this, 0.16F, true));
@ -41,7 +41,7 @@ public class EntityIronGolem extends EntityGolem {
this.b = 70 + this.random.nextInt(50);
this.a = this.world.villages.getClosestVillage(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 32);
if (this.a == null) {
this.aw();
this.ax();
} else {
ChunkCoordinates chunkcoordinates = this.a.getCenter();

Datei anzeigen

@ -46,8 +46,8 @@ public class EntityItem extends Entity {
protected void b() {}
public void G_() {
super.G_();
public void F_() {
super.F_();
// CraftBukkit start
int currentTick = (int) (System.currentTimeMillis() / 50);
this.pickupDelay -= (currentTick - this.lastTick);
@ -110,7 +110,7 @@ public class EntityItem extends Entity {
}
public boolean damageEntity(DamageSource damagesource, int i) {
this.aV();
this.aW();
this.e -= i;
if (this.e <= 0) {
this.die();

Datei anzeigen

@ -131,23 +131,23 @@ public abstract class EntityLiving extends Entity {
return this.jumpController;
}
public Navigation ak() {
public Navigation al() {
return this.navigation;
}
public EntitySenses al() {
public EntitySenses am() {
return this.m;
}
public Random am() {
public Random an() {
return this.random;
}
public EntityLiving an() {
public EntityLiving ao() {
return this.lastDamager;
}
public EntityLiving ao() {
public EntityLiving ap() {
return this.d;
}
@ -157,15 +157,15 @@ public abstract class EntityLiving extends Entity {
}
}
public int ap() {
public int aq() {
return this.aV;
}
public float aq() {
public float ar() {
return this.X;
}
public float ar() {
public float as() {
return this.n;
}
@ -179,7 +179,7 @@ public abstract class EntityLiving extends Entity {
return false;
}
public EntityLiving as() {
public EntityLiving at() {
return this.l;
}
@ -193,7 +193,7 @@ public abstract class EntityLiving extends Entity {
public void z() {}
public boolean at() {
public boolean au() {
return this.e(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ));
}
@ -206,19 +206,19 @@ public abstract class EntityLiving extends Entity {
this.p = (float) l;
}
public ChunkCoordinates au() {
public ChunkCoordinates av() {
return this.o;
}
public float av() {
public float aw() {
return this.p;
}
public void aw() {
public void ax() {
this.p = -1.0F;
}
public boolean ax() {
public boolean ay() {
return this.p != -1.0F;
}
@ -251,7 +251,7 @@ public abstract class EntityLiving extends Entity {
return 80;
}
public void ay() {
public void az() {
String s = this.i();
if (s != null) {
@ -259,13 +259,13 @@ public abstract class EntityLiving extends Entity {
}
}
public void az() {
public void aA() {
this.an = this.ao;
super.az();
super.aA();
// MethodProfiler.a("mobBaseTick"); // CraftBukkit - not in production code
if (this.random.nextInt(1000) < this.a++) {
if (this.isAlive() && this.random.nextInt(1000) < this.a++) {
this.a = -this.m();
this.ay();
this.az();
}
// CraftBukkit start - don't inline the damage, perform it with an event
@ -329,7 +329,7 @@ public abstract class EntityLiving extends Entity {
}
if (this.health <= 0) {
this.aA();
this.aB();
}
if (this.lastDamageByPlayerTime > 0) {
@ -352,7 +352,7 @@ public abstract class EntityLiving extends Entity {
}
}
this.aJ();
this.aK();
this.ac = this.ab;
this.W = this.V;
this.Y = this.X;
@ -373,7 +373,7 @@ public abstract class EntityLiving extends Entity {
}
// CraftBukkit end
protected void aA() {
protected void aB() {
++this.deathTicks;
if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead).
int i;
@ -388,7 +388,7 @@ public abstract class EntityLiving extends Entity {
}
// CraftBukkit end
this.aG();
this.aH();
this.die();
for (i = 0; i < 20; ++i) {
@ -413,7 +413,7 @@ public abstract class EntityLiving extends Entity {
return false;
}
public void aB() {
public void aC() {
for (int i = 0; i < 20; ++i) {
double d0 = this.random.nextGaussian() * 0.02D;
double d1 = this.random.nextGaussian() * 0.02D;
@ -424,15 +424,15 @@ public abstract class EntityLiving extends Entity {
}
}
public void Q() {
super.Q();
public void R() {
super.R();
this.Z = this.aa;
this.aa = 0.0F;
this.fallDistance = 0.0F;
}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (this.aI > 0) {
if (this.aJ <= 0) {
this.aJ = 60;
@ -652,7 +652,7 @@ public abstract class EntityLiving extends Entity {
if (flag) {
this.world.broadcastEntityEffect(this, (byte) 2);
this.aV();
this.aW();
if (entity != null) {
double d0 = entity.locX - this.locX;
@ -688,7 +688,7 @@ public abstract class EntityLiving extends Entity {
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
}
public int S() {
public int T() {
return 0;
}
@ -696,7 +696,7 @@ public abstract class EntityLiving extends Entity {
protected int d(DamageSource damagesource, int i) {
if (!damagesource.ignoresArmor()) {
int j = 25 - this.S();
int j = 25 - this.T();
int k = i * j + this.ar;
this.f(i);
@ -864,7 +864,7 @@ public abstract class EntityLiving extends Entity {
public void a(float f, float f1) {
double d0;
if (this.aT()) {
if (this.aU()) {
d0 = this.locY;
this.a(f, f1, this.c_() ? 0.04F : 0.02F);
this.move(this.motX, this.motY, this.motZ);
@ -875,7 +875,7 @@ public abstract class EntityLiving extends Entity {
if (this.positionChanged && this.d(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
this.motY = 0.30000001192092896D;
}
} else if (this.aU()) {
} else if (this.aV()) {
d0 = this.locY;
this.a(f, f1, 0.02F);
this.move(this.motX, this.motY, this.motZ);
@ -903,7 +903,7 @@ public abstract class EntityLiving extends Entity {
if (this.onGround) {
if (this.c_()) {
f4 = this.ar();
f4 = this.as();
} else {
f4 = this.al;
}
@ -989,7 +989,6 @@ public abstract class EntityLiving extends Entity {
}
public void b(NBTTagCompound nbttagcompound) {
if (this.health < Short.MIN_VALUE) this.health = Short.MIN_VALUE; // CraftBukkit
nbttagcompound.setShort("Health", (short) this.health);
nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
@ -1013,6 +1012,10 @@ public abstract class EntityLiving extends Entity {
}
public void a(NBTTagCompound nbttagcompound) {
if (this.health < -32768) {
this.health = -32768;
}
this.health = nbttagcompound.getShort("Health");
if (!nbttagcompound.hasKey("Health")) {
this.health = this.getMaxHealth();
@ -1095,12 +1098,12 @@ public abstract class EntityLiving extends Entity {
}
// MethodProfiler.a("ai"); // CraftBukkit - not in production code
if (this.P()) {
if (this.Q()) {
this.aZ = false;
this.aW = 0.0F;
this.aX = 0.0F;
this.aY = 0.0F;
} else if (this.aE()) {
} else if (this.aF()) {
if (this.c_()) {
MethodProfiler.a("newAi");
this.z_();
@ -1114,8 +1117,8 @@ public abstract class EntityLiving extends Entity {
}
// MethodProfiler.a(); // CraftBukkit - not in production code
boolean flag = this.aT();
boolean flag1 = this.aU();
boolean flag = this.aU();
boolean flag1 = this.aV();
if (this.aZ) {
if (flag) {
@ -1123,7 +1126,7 @@ public abstract class EntityLiving extends Entity {
} else if (flag1) {
this.motY += 0.03999999910593033D;
} else if (this.onGround && this.q == 0) {
this.ab();
this.ac();
this.q = 10;
}
} else {
@ -1135,7 +1138,7 @@ public abstract class EntityLiving extends Entity {
this.aY *= 0.9F;
float f = this.al;
this.al *= this.D_();
this.al *= this.J();
this.a(this.aW, this.aX);
this.al = f;
// MethodProfiler.a("push"); // CraftBukkit - not in production code
@ -1158,19 +1161,19 @@ public abstract class EntityLiving extends Entity {
return false;
}
protected boolean aE() {
protected boolean aF() {
return !this.world.isStatic;
}
protected boolean P() {
protected boolean Q() {
return this.health <= 0;
}
public boolean O() {
public boolean P() {
return false;
}
protected void ab() {
protected void ac() {
this.motY = 0.41999998688697815D;
if (this.hasEffect(MobEffectList.JUMP)) {
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
@ -1190,7 +1193,7 @@ public abstract class EntityLiving extends Entity {
return true;
}
protected void aF() {
protected void aG() {
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
if (entityhuman != null) {
@ -1214,7 +1217,7 @@ public abstract class EntityLiving extends Entity {
protected void z_() {
++this.aV;
//MethodProfiler.a("checkDespawn"); // CraftBukkit - not in production code
this.aF();
this.aG();
//MethodProfiler.a(); // CraftBukkit - not in production code
//MethodProfiler.a("sensing"); // CraftBukkit - not in production code
this.m.a();
@ -1242,15 +1245,14 @@ public abstract class EntityLiving extends Entity {
protected void d_() {
++this.aV;
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
this.aF();
this.aG();
this.aW = 0.0F;
this.aX = 0.0F;
float f = 8.0F;
if (this.random.nextFloat() < 0.02F) {
entityhuman = this.world.findNearbyPlayer(this, (double) f);
EntityHuman entityhuman = this.world.findNearbyPlayer(this, (double) f);
if (entityhuman != null) {
this.r = entityhuman;
this.bc = 10 + this.random.nextInt(20);
@ -1260,7 +1262,7 @@ public abstract class EntityLiving extends Entity {
}
if (this.r != null) {
this.a(this.r, 10.0F, (float) this.C());
this.a(this.r, 10.0F, (float) this.D());
if (this.bc-- <= 0 || this.r.dead || this.r.j(this) > (double) (f * f)) {
this.r = null;
}
@ -1273,15 +1275,15 @@ public abstract class EntityLiving extends Entity {
this.pitch = this.ba;
}
boolean flag = this.aT();
boolean flag1 = this.aU();
boolean flag = this.aU();
boolean flag1 = this.aV();
if (flag || flag1) {
this.aZ = this.random.nextFloat() < 0.8F;
}
}
public int C() {
public int D() {
return 40;
}
@ -1328,13 +1330,13 @@ public abstract class EntityLiving extends Entity {
return f + f3;
}
public void aG() {}
public void aH() {}
public boolean canSpawn() {
return this.world.containsEntity(this.boundingBox) && this.world.getCubes(this, this.boundingBox).size() == 0 && !this.world.containsLiquid(this.boundingBox);
}
protected void aH() {
protected void aI() {
// CraftBukkit start
EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, this.getBukkitEntity(), EntityDamageEvent.DamageCause.VOID, 4);
this.world.getServer().getPluginManager().callEvent(event);
@ -1347,7 +1349,7 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit end
}
public Vec3D aI() {
public Vec3D aJ() {
return this.f(1.0F);
}
@ -1383,7 +1385,7 @@ public abstract class EntityLiving extends Entity {
return false;
}
protected void aJ() {
protected void aK() {
Iterator iterator = this.effects.keySet().iterator();
while (iterator.hasNext()) {
@ -1423,7 +1425,7 @@ public abstract class EntityLiving extends Entity {
}
}
public void aK() {
public void aL() {
Iterator iterator = this.effects.keySet().iterator();
while (iterator.hasNext()) {
@ -1473,7 +1475,7 @@ public abstract class EntityLiving extends Entity {
return true;
}
public boolean aM() {
public boolean aN() {
return this.getMonsterType() == MonsterType.UNDEAD;
}
@ -1489,7 +1491,7 @@ public abstract class EntityLiving extends Entity {
this.e = true;
}
protected float D_() {
protected float J() {
float f = 1.0F;
if (this.hasEffect(MobEffectList.FASTER_MOVEMENT)) {

Datei anzeigen

@ -16,7 +16,7 @@ public class EntityMagmaCube extends EntitySlime {
return this.world.difficulty > 0 && this.world.containsEntity(this.boundingBox) && this.world.getCubes(this, this.boundingBox).size() == 0 && !this.world.containsLiquid(this.boundingBox);
}
public int S() {
public int T() {
return this.getSize() * 3;
}
@ -28,7 +28,7 @@ public class EntityMagmaCube extends EntitySlime {
return "flame";
}
protected EntitySlime D() {
protected EntitySlime C() {
return new EntityMagmaCube(this.world);
}
@ -67,7 +67,7 @@ public class EntityMagmaCube extends EntitySlime {
this.a *= 0.9F;
}
protected void ab() {
protected void ac() {
this.motY = (double) (0.42F + (float) this.getSize() * 0.1F);
this.ce = true;
}
@ -90,11 +90,11 @@ public class EntityMagmaCube extends EntitySlime {
return "mob.slime";
}
protected String J() {
protected String I() {
return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small";
}
public boolean aU() {
public boolean aV() {
return false;
}

Datei anzeigen

@ -145,7 +145,7 @@ public class EntityMinecart extends Entity implements IInventory {
this.e(-this.n());
this.d(10);
this.aV();
this.aW();
this.setDamage(this.getDamage() + i * 10);
if (this.getDamage() > 40) {
// CraftBukkit start
@ -241,8 +241,12 @@ public class EntityMinecart extends Entity implements IInventory {
}
itemstack.count -= j;
// CraftBukkit - include enchantments in the new itemstack
EntityItem entityitem = new EntityItem(this.world, this.locX + (double) f, this.locY + (double) f1, this.locZ + (double) f2, new ItemStack(itemstack.id, j, itemstack.getData(), itemstack.getEnchantments()));
EntityItem entityitem = new EntityItem(this.world, this.locX + (double) f, this.locY + (double) f1, this.locZ + (double) f2, new ItemStack(itemstack.id, j, itemstack.getData()));
if (itemstack.hasTag()) {
entityitem.itemStack.setTag((NBTTagCompound) itemstack.getTag().clone());
}
float f3 = 0.05F;
entityitem.motX = (double) ((float) this.random.nextGaussian() * f3);
@ -256,7 +260,7 @@ public class EntityMinecart extends Entity implements IInventory {
super.die();
}
public void G_() {
public void F_() {
// CraftBukkit start
double prevX = this.locX;
double prevY = this.locY;
@ -273,6 +277,10 @@ public class EntityMinecart extends Entity implements IInventory {
this.setDamage(this.getDamage() - 1);
}
if (this.locY < -64.0D) {
this.aI();
}
if (this.k() && this.random.nextInt(4) == 0) {
this.world.a("largesmoke", this.locX, this.locY + 0.8D, this.locZ, 0.0D, 0.0D, 0.0D);
}
@ -333,7 +341,7 @@ public class EntityMinecart extends Entity implements IInventory {
flag1 = !flag;
}
if (((BlockMinecartTrack) Block.byId[l]).h()) {
if (((BlockMinecartTrack) Block.byId[l]).i()) {
i1 &= 7;
}
@ -659,7 +667,7 @@ public class EntityMinecart extends Entity implements IInventory {
int i1 = this.world.getData(i, j, k);
d1 = (double) j;
if (((BlockMinecartTrack) Block.byId[l]).h()) {
if (((BlockMinecartTrack) Block.byId[l]).i()) {
i1 &= 7;
}

Datei anzeigen

@ -21,8 +21,8 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
super.e();
}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (!this.world.isStatic && this.world.difficulty == 0) {
this.die();
}
@ -99,7 +99,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
super.a(nbttagcompound);
}
protected boolean D() {
protected boolean C() {
int i = MathHelper.floor(this.locX);
int j = MathHelper.floor(this.boundingBox.b);
int k = MathHelper.floor(this.locZ);
@ -122,6 +122,6 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
public boolean canSpawn() {
return this.D() && super.canSpawn();
return this.C() && super.canSpawn();
}
}

Datei anzeigen

@ -8,17 +8,18 @@ public class EntityOcelot extends EntityTameableAnimal {
super(world);
this.texture = "/mob/ozelot.png";
this.b(0.6F, 0.8F);
this.ak().a(true);
this.al().a(true);
this.goalSelector.a(1, new PathfinderGoalFloat(this));
this.goalSelector.a(2, this.a);
this.goalSelector.a(3, this.b = new PathfinderGoalTempt(this, 0.18F, Item.RAW_FISH.id, true));
this.goalSelector.a(4, new PathfinderGoalAvoidPlayer(this, EntityHuman.class, 16.0F, 0.23F, 0.4F));
this.goalSelector.a(5, new PathfinderGoalFollowOwner(this, 0.3F, 10.0F, 5.0F));
this.goalSelector.a(6, new PathfinderGoalLeapAtTarget(this, 0.3F));
this.goalSelector.a(7, new PathfinderGoalOzelotAttack(this));
this.goalSelector.a(8, new PathfinderGoalBreed(this, 0.23F));
this.goalSelector.a(9, new PathfinderGoalRandomStroll(this, 0.23F));
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
this.goalSelector.a(5, new PathfinderGoalJumpOnBlock(this, 0.4F));
this.goalSelector.a(6, new PathfinderGoalFollowOwner(this, 0.3F, 10.0F, 5.0F));
this.goalSelector.a(7, new PathfinderGoalLeapAtTarget(this, 0.3F));
this.goalSelector.a(8, new PathfinderGoalOzelotAttack(this));
this.goalSelector.a(9, new PathfinderGoalBreed(this, 0.23F));
this.goalSelector.a(10, new PathfinderGoalRandomStroll(this, 0.23F));
this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
this.targetSelector.a(1, new PathfinderGoalRandomTargetNonTamed(this, EntityChicken.class, 14.0F, 750, false));
}

Datei anzeigen

@ -121,10 +121,10 @@ public class EntityPainting extends Entity {
return i == 32 ? 0.5F : (i == 64 ? 0.5F : 0.0F);
}
public void G_() {
public void F_() {
if (this.f++ == 100 && !this.world.isStatic) {
this.f = 0;
if (!this.survives()) {
if (!this.dead && !this.survives()) {
// CraftBukkit start
List<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
drops.add(new CraftItemStack(Item.PAINTING.id, 1));
@ -245,7 +245,7 @@ public class EntityPainting extends Entity {
// CraftBukkit end
this.die();
this.aV();
this.aW();
// CraftBukkit start - replace following line with the loop
//this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
for (org.bukkit.inventory.ItemStack stack : drops) {
@ -290,7 +290,7 @@ public class EntityPainting extends Entity {
}
public void move(double d0, double d1, double d2) {
if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
if (!this.world.isStatic && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
if (dead) return; // CraftBukkit
this.die();

Datei anzeigen

@ -6,7 +6,7 @@ public class EntityPig extends EntityAnimal {
super(world);
this.texture = "/mob/pig.png";
this.b(0.9F, 0.9F);
this.ak().a(true);
this.al().a(true);
float f = 0.25F;
this.goalSelector.a(0, new PathfinderGoalFloat(this));

Datei anzeigen

@ -27,13 +27,13 @@ public class EntityPigZombie extends EntityZombie {
return false;
}
public void G_() {
public void F_() {
this.bb = this.target != null ? 0.95F : 0.5F;
if (this.soundDelay > 0 && --this.soundDelay == 0) {
this.world.makeSound(this, "mob.zombiepig.zpigangry", this.p() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.G_();
super.F_();
}
public boolean canSpawn() {

Datei anzeigen

@ -135,7 +135,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return 1.62F;
}
public void G_() {
public void F_() {
this.itemInWorldManager.c();
--this.invulnerableTicks;
this.activeContainer.a();
@ -216,7 +216,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
protected boolean C_() {
protected boolean C() {
return this.server.pvpMode;
}
@ -225,7 +225,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void a(boolean flag) {
super.G_();
super.F_();
for (int i = 0; i < this.inventory.getSize(); ++i) {
ItemStack itemstack = this.inventory.getItem(i);
@ -405,7 +405,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.activeContainer.a();
}
public void D() {
public void C_() {
if (!this.t) {
this.u = -1;
this.t = true;
@ -621,7 +621,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
public void J() {
public void D_() {
this.cf = -99999999;
this.lastSentExp = -1; // CraftBukkit - Added to reset
}
@ -678,6 +678,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
entitytracker.sendPacketToEntity(this, new Packet18ArmAnimation(entity, 7));
}
public void updateAbilities() {
if (this.netServerHandler != null) {
this.netServerHandler.sendPacket(new Packet202Abilities(this.abilities));
}
}
// CraftBukkit start
public long timeOffset = 0;
public boolean relativeTime = true;

Datei anzeigen

@ -82,11 +82,11 @@ public abstract class EntityProjectile extends Entity {
this.h = 0;
}
public void G_() {
public void F_() {
this.bL = this.locX;
this.bM = this.locY;
this.bN = this.locZ;
super.G_();
super.F_();
if (this.shake > 0) {
--this.shake;
}
@ -190,7 +190,7 @@ public abstract class EntityProjectile extends Entity {
float f2 = 0.99F;
float f3 = this.e();
if (this.aT()) {
if (this.aU()) {
for (int k = 0; k < 4; ++k) {
float f4 = 0.25F;

Datei anzeigen

@ -24,7 +24,7 @@ public class EntitySheep extends EntityAnimal {
this.b(0.9F, 1.3F);
float f = 0.23F;
this.ak().a(true);
this.al().a(true);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalPanic(this, 0.38F));
this.goalSelector.a(2, new PathfinderGoalBreed(this, f));

Datei anzeigen

@ -21,7 +21,7 @@ public class EntitySkeleton extends EntityMonster {
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(6, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, false));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 16.0F, 0, false));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 16.0F, 0, true));
}
public boolean c_() {

Datei anzeigen

@ -15,7 +15,6 @@ public class EntitySlime extends EntityLiving implements IMonster {
this.height = 0.0F;
this.jumpDelay = this.random.nextInt(20) + 10;
this.setSize(i);
this.aA = i;
}
protected void b() {
@ -28,6 +27,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
this.b(0.6F * (float) i, 0.6F * (float) i);
this.setPosition(this.locX, this.locY, this.locZ);
this.setHealth(this.getMaxHealth());
this.aA = i;
}
public int getMaxHealth() {
@ -54,11 +54,11 @@ public class EntitySlime extends EntityLiving implements IMonster {
return "slime";
}
protected String J() {
protected String I() {
return "mob.slime";
}
public void G_() {
public void F_() {
if (!this.world.isStatic && this.world.difficulty == 0 && this.getSize() > 0) {
this.dead = true;
}
@ -67,7 +67,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
this.c = this.b;
boolean flag = this.onGround;
super.G_();
super.F_();
if (this.onGround && !flag) {
int i = this.getSize();
@ -81,7 +81,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
}
if (this.K()) {
this.world.makeSound(this, this.J(), this.p(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
this.world.makeSound(this, this.I(), this.p(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
}
this.a = -0.5F;
@ -91,7 +91,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
}
protected void d_() {
this.aF();
this.aG();
EntityHuman entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // CraftBukkit TODO: EntityTargetEvent
if (entityhuman != null) {
@ -106,7 +106,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
this.aZ = true;
if (this.M()) {
this.world.makeSound(this, this.J(), this.p(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
this.world.makeSound(this, this.I(), this.p(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
}
this.a = 1.0F;
@ -128,7 +128,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
return this.random.nextInt(20) + 10;
}
protected EntitySlime D() {
protected EntitySlime C() {
return new EntitySlime(this.world);
}
@ -153,7 +153,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
for (int k = 0; k < j; ++k) {
float f = ((float) (k % 2) - 0.5F) * (float) i / 4.0F;
float f1 = ((float) (k / 2) - 0.5F) * (float) i / 4.0F;
EntitySlime entityslime = this.D();
EntitySlime entityslime = this.C();
entityslime.setSize(i / 2);
entityslime.setPositionRotation(this.locX + (double) f, this.locY + 0.5D, this.locZ + (double) f1, this.random.nextFloat() * 360.0F, 0.0F);
@ -204,7 +204,7 @@ public class EntitySlime extends EntityLiving implements IMonster {
return 0.4F * (float) this.getSize();
}
public int C() {
public int D() {
return 0;
}

Datei anzeigen

@ -14,7 +14,7 @@ public class EntitySnowman extends EntityGolem {
super(world);
this.texture = "/mob/snowman.png";
this.b(0.4F, 1.8F);
this.ak().a(true);
this.al().a(true);
this.goalSelector.a(1, new PathfinderGoalArrowAttack(this, 0.25F, 2, 20));
this.goalSelector.a(2, new PathfinderGoalRandomStroll(this, 0.2F));
this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
@ -32,7 +32,7 @@ public class EntitySnowman extends EntityGolem {
public void e() {
super.e();
if (this.aS()) {
if (this.aT()) {
EntityDamageEvent event = new EntityDamageEvent(this.getBukkitEntity(), EntityDamageEvent.DamageCause.DROWNING, 1);
this.world.getServer().getPluginManager().callEvent(event);
@ -44,7 +44,7 @@ public class EntitySnowman extends EntityGolem {
int i = MathHelper.floor(this.locX);
int j = MathHelper.floor(this.locZ);
if (this.world.getBiome(i, j).h() > 1.0F) {
if (this.world.getBiome(i, j).i() > 1.0F) {
EntityDamageEvent event = new EntityDamageEvent(this.getBukkitEntity(), EntityDamageEvent.DamageCause.FIRE_TICK, 1);
this.world.getServer().getPluginManager().callEvent(event);
@ -58,7 +58,7 @@ public class EntitySnowman extends EntityGolem {
int k = MathHelper.floor(this.locY);
int l = MathHelper.floor(this.locZ + (double) ((float) (i / 2 % 2 * 2 - 1) * 0.25F));
if (this.world.getTypeId(j, k, l) == 0 && this.world.getBiome(j, l).h() < 0.8F && Block.SNOW.canPlace(this.world, j, k, l)) {
if (this.world.getTypeId(j, k, l) == 0 && this.world.getBiome(j, l).i() < 0.8F && Block.SNOW.canPlace(this.world, j, k, l)) {
// CraftBukkit start
BlockState blockState = this.world.getWorld().getBlockAt(j, k, l).getState();
blockState.setTypeId(Block.SNOW.id);

Datei anzeigen

@ -26,8 +26,8 @@ public class EntitySpider extends EntityMonster {
super.e();
}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (!this.world.isStatic) {
this.a(this.positionChanged);
}

Datei anzeigen

@ -75,7 +75,7 @@ public class EntitySquid extends EntityWaterAnimal {
return super.b(entityhuman);
}
public boolean aT() {
public boolean aU() {
return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, this);
}
@ -93,7 +93,7 @@ public class EntitySquid extends EntityWaterAnimal {
}
}
if (this.aT()) {
if (this.aU()) {
float f;
if (this.h < 3.1415927F) {
@ -151,7 +151,7 @@ public class EntitySquid extends EntityWaterAnimal {
this.q = MathHelper.sin(f) * 0.2F;
}
this.aF();
this.aG();
}
public boolean canSpawn() {

Datei anzeigen

@ -45,7 +45,7 @@ public class EntityTNTPrimed extends Entity {
return !this.dead;
}
public void G_() {
public void F_() {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;

Datei anzeigen

@ -40,7 +40,7 @@ public class EntityTrackerEntry {
this.zLoc = MathHelper.floor(entity.locZ * 32.0D);
this.yRot = MathHelper.d(entity.yaw * 256.0F / 360.0F);
this.xRot = MathHelper.d(entity.pitch * 256.0F / 360.0F);
this.i = MathHelper.d(entity.aq() * 256.0F / 360.0F);
this.i = MathHelper.d(entity.ar() * 256.0F / 360.0F);
}
public boolean equals(Object object) {
@ -135,7 +135,7 @@ public class EntityTrackerEntry {
this.broadcastIncludingSelf(new Packet40EntityMetadata(this.tracker.id, datawatcher));
}
int i2 = MathHelper.d(this.tracker.aq() * 256.0F / 360.0F);
int i2 = MathHelper.d(this.tracker.ar() * 256.0F / 360.0F);
if (Math.abs(i2 - this.i) >= 4) {
this.broadcast(new Packet35EntityHeadRotation(this.tracker.id, (byte) i2));

Datei anzeigen

@ -73,8 +73,8 @@ public class EntityWeatherLighting extends EntityWeather {
}
}
public void G_() {
super.G_();
public void F_() {
super.F_();
if (this.lifeTicks == 2) {
this.world.makeSound(this.locX, this.locY, this.locZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
this.world.makeSound(this.locX, this.locY, this.locZ, "random.explode", 2.0F, 0.5F + this.random.nextFloat() * 0.2F);

Datei anzeigen

@ -15,7 +15,7 @@ public class EntityWolf extends EntityTameableAnimal {
this.texture = "/mob/wolf.png";
this.b(0.6F, 0.8F);
this.bb = 0.3F;
this.ak().a(true);
this.al().a(true);
this.goalSelector.a(1, new PathfinderGoalFloat(this));
this.goalSelector.a(2, this.a);
this.goalSelector.a(3, new PathfinderGoalLeapAtTarget(this, 0.4F));
@ -96,7 +96,7 @@ public class EntityWolf extends EntityTameableAnimal {
public void e() {
super.e();
if (!this.world.isStatic && this.h && !this.i && !this.G() && this.onGround) {
if (!this.world.isStatic && this.h && !this.i && !this.H() && this.onGround) {
this.i = true;
this.j = 0.0F;
this.k = 0.0F;
@ -104,8 +104,8 @@ public class EntityWolf extends EntityTameableAnimal {
}
}
public void G_() {
super.G_();
public void F_() {
super.F_();
this.g = this.c;
if (this.b) {
this.c += (1.0F - this.c) * 0.4F;
@ -117,7 +117,7 @@ public class EntityWolf extends EntityTameableAnimal {
this.bc = 10;
}
if (this.aS()) {
if (this.aT()) {
this.h = true;
this.i = false;
this.j = 0.0F;
@ -154,8 +154,8 @@ public class EntityWolf extends EntityTameableAnimal {
return this.length * 0.8F;
}
public int C() {
return this.isSitting() ? 20 : super.C();
public int D() {
return this.isSitting() ? 20 : super.D();
}
public boolean damageEntity(DamageSource damagesource, int i) {

Datei anzeigen

@ -9,7 +9,7 @@ public class EntityZombie extends EntityMonster {
this.texture = "/mob/zombie.png";
this.bb = 0.23F;
this.damage = 4;
this.ak().b(true);
this.al().b(true);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalBreakDoor(this));
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, EntityHuman.class, this.bb, false));
@ -28,7 +28,7 @@ public class EntityZombie extends EntityMonster {
return 20;
}
public int S() {
public int T() {
return 2;
}

Datei anzeigen

@ -42,7 +42,7 @@ public class FoodMetaData {
}
}
if (this.foodLevel >= 18 && entityhuman.af()) {
if (this.foodLevel >= 18 && entityhuman.ag()) {
++this.foodTickTimer;
if (this.foodTickTimer >= 80) {
// CraftBukkit - added RegainReason.

Datei anzeigen

@ -96,10 +96,10 @@ public class ItemBlock extends Item {
}
public String a(ItemStack itemstack) {
return Block.byId[this.id].p();
return Block.byId[this.id].q();
}
public String getName() {
return Block.byId[this.id].p();
return Block.byId[this.id].q();
}
}

Datei anzeigen

@ -15,7 +15,7 @@ public class ItemFishingRod extends Item {
int i = entityhuman.hookedFish.k();
itemstack.damage(i, entityhuman);
entityhuman.D();
entityhuman.C_();
} else {
// CraftBukkit start
PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, PlayerFishEvent.State.FISHING);
@ -31,7 +31,7 @@ public class ItemFishingRod extends Item {
world.addEntity(new EntityFishingHook(world, entityhuman));
}
entityhuman.D();
entityhuman.C_();
}
return itemstack;

Datei anzeigen

@ -47,6 +47,8 @@ public class ItemInWorldManager {
this.player.abilities.canInstantlyBuild = true;
this.player.abilities.isInvulnerable = true;
}
this.player.updateAbilities();
}
public int getGameMode() {
@ -220,14 +222,14 @@ public class ItemInWorldManager {
// CraftBukkit end
((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world));
} else {
ItemStack itemstack = this.player.T();
ItemStack itemstack = this.player.U();
boolean flag1 = this.player.b(Block.byId[l]);
if (itemstack != null) {
itemstack.a(l, i, j, k, this.player);
if (itemstack.count == 0) {
itemstack.a(this.player);
this.player.U();
this.player.V();
}
}

Datei anzeigen

@ -39,7 +39,7 @@ public class ItemMonsterEgg extends Item {
if (entity != null && entity instanceof EntityLiving) { // CraftBukkit
entity.setPositionRotation(d0, d1, d2, world.random.nextFloat() * 360.0F, 0.0F);
world.addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
((EntityLiving) entity).ay();
((EntityLiving) entity).az();
}
return entity != null;

Datei anzeigen

@ -35,16 +35,59 @@ public class ItemStep extends ItemBlock {
if ((l == 1 && !flag || l == 0 && flag) && i1 == Block.STEP.id && k1 == itemstack.getData()) {
/* CraftBukkit start - handle this in super
if (world.setTypeIdAndData(i, j, k, Block.DOUBLE_STEP.id, j1)) {
if (world.containsEntity(Block.DOUBLE_STEP.e(world, i, j, k)) && world.setTypeIdAndData(i, j, k, Block.DOUBLE_STEP.id, k1)) {
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), Block.DOUBLE_STEP.stepSound.getName(), (Block.DOUBLE_STEP.stepSound.getVolume1() + 1.0F) / 2.0F, Block.DOUBLE_STEP.stepSound.getVolume2() * 0.8F);
--itemstack.count;
}
return true;
*/
return super.interactWith(itemstack, entityhuman, world, i, j, k, -1);
// CraftBukkit end
} else {
return super.interactWith(itemstack, entityhuman, world, i, j, k, l);
return b(itemstack, entityhuman, world, i, j, k, l) ? true : super.interactWith(itemstack, entityhuman, world, i, j, k, l);
}
}
}
private static boolean b(ItemStack itemstack, EntityHuman entityhuman, 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.getTypeId(i, j, k);
int j1 = world.getData(i, j, k);
int k1 = j1 & 7;
if (i1 == Block.STEP.id && k1 == itemstack.getData()) {
if (world.containsEntity(Block.DOUBLE_STEP.e(world, i, j, k)) && world.setTypeIdAndData(i, j, k, Block.DOUBLE_STEP.id, k1)) {
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), Block.DOUBLE_STEP.stepSound.getName(), (Block.DOUBLE_STEP.stepSound.getVolume1() + 1.0F) / 2.0F, Block.DOUBLE_STEP.stepSound.getVolume2() * 0.8F);
--itemstack.count;
}
return true;
} else {
return false;
}
}
}

Datei anzeigen

@ -112,7 +112,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
// CraftBukkit end
log.info("Starting minecraft server version 1.2.3");
log.info("Starting minecraft server version 1.2.4");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
log.warning("**** NOT ENOUGH RAM!");
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
@ -685,7 +685,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
}
public String getVersion() {
return "1.2.3";
return "1.2.4";
}
public int getPlayerCount() {

Datei anzeigen

@ -95,8 +95,8 @@ public class MobEffectList {
}
} else if (this.id == HUNGER.id && entityliving instanceof EntityHuman) {
((EntityHuman) entityliving).c(0.025F * (float) (i + 1));
} else if ((this.id != HEAL.id || entityliving.aM()) && (this.id != HARM.id || !entityliving.aM())) {
if (this.id == HARM.id && !entityliving.aM() || this.id == HEAL.id && entityliving.aM()) {
} else if ((this.id != HEAL.id || entityliving.aN()) && (this.id != HARM.id || !entityliving.aN())) {
if (this.id == HARM.id && !entityliving.aN() || this.id == HEAL.id && entityliving.aN()) {
// CraftBukkit start
EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, entityliving, DamageCause.MAGIC, 6 << i);
Bukkit.getPluginManager().callEvent(event);
@ -120,8 +120,8 @@ public class MobEffectList {
// CraftBukkit end
int j;
if ((this.id != HEAL.id || entityliving1.aM()) && (this.id != HARM.id || !entityliving1.aM())) {
if (this.id == HARM.id && !entityliving1.aM() || this.id == HEAL.id && entityliving1.aM()) {
if ((this.id != HEAL.id || entityliving1.aN()) && (this.id != HARM.id || !entityliving1.aN())) {
if (this.id == HARM.id && !entityliving1.aN() || this.id == HEAL.id && entityliving1.aN()) {
j = (int) (d0 * (double) (6 << i) + 0.5D);
// CraftBukkit start

Datei anzeigen

@ -193,4 +193,8 @@ public class NBTTagCompound extends NBTBase {
return false;
}
}
public int hashCode() {
return super.hashCode() ^ this.map.hashCode();
}
}

Datei anzeigen

@ -77,8 +77,8 @@ public class NetLoginHandler extends NetHandler {
public void a(Packet1Login packet1login) {
this.g = packet1login.name;
if (packet1login.a != 28) {
if (packet1login.a > 28) {
if (packet1login.a != 29) {
if (packet1login.a > 29) {
this.disconnect("Outdated server!");
} else {
this.disconnect("Outdated client!");
@ -123,6 +123,7 @@ public class NetLoginHandler extends NetHandler {
// CraftBukkit end
netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z));
netserverhandler.sendPacket(new Packet202Abilities(entityplayer.abilities));
this.server.serverConfigurationManager.a(entityplayer, worldserver);
// this.server.serverConfigurationManager.sendAll(new Packet3Chat("\u00A7e" + entityplayer.name + " joined the game.")); // CraftBukkit - message moved to join event
this.server.serverConfigurationManager.c(entityplayer);

Datei anzeigen

@ -44,7 +44,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.player.PlayerToggleSneakEvent;
import org.bukkit.event.player.PlayerToggleSprintEvent;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.event.Event.Result;
import org.bukkit.event.inventory.*;
import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.inventory.CraftingInventory;
@ -575,9 +574,9 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
}
}
// CraftBukkit end
this.player.R();
this.player.S();
} else if (packet14blockdig.e == 5) {
this.player.M();
this.player.N();
} else {
boolean flag = worldserver.weirdIsOpCache = worldserver.dimension != 0 || this.minecraftServer.serverConfigurationManager.isOp(this.player.name); // CraftBukkit
boolean flag1 = false;
@ -985,7 +984,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
if (event.isCancelled()) return;
// CraftBukkit end
this.player.D();
this.player.C_();
}
}
@ -1379,6 +1378,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
return true;
}
public void a(Packet202Abilities packet202abilities) {
this.player.abilities.isFlying = packet202abilities.b && this.player.abilities.canFly;
}
// CraftBukkit start
@Override
public void a(Packet250CustomPayload packet) {

Datei anzeigen

@ -268,6 +268,7 @@ public abstract class Packet {
a(132, true, false, Packet132TileEntityData.class);
a(200, true, false, Packet200Statistic.class);
a(201, true, false, Packet201PlayerInfo.class);
a(202, true, true, Packet202Abilities.class);
a(250, true, true, Packet250CustomPayload.class);
a(254, false, true, Packet254GetInfo.class);
a(255, true, true, Packet255KickDisconnect.class);

Datei anzeigen

@ -31,7 +31,7 @@ public class Packet51MapChunk extends Packet {
this.f = flag;
if (flag) {
i = '\uffff';
chunk.sentToClient = true; // CraftBukkit - flag as seen
chunk.seenByPlayer = true;
}
ChunkSection[] achunksection = chunk.h();

Datei anzeigen

@ -23,7 +23,7 @@ public class PathfinderGoalArrowAttack extends PathfinderGoal {
}
public boolean a() {
EntityLiving entityliving = this.b.as();
EntityLiving entityliving = this.b.at();
if (entityliving == null) {
return false;
@ -34,7 +34,7 @@ public class PathfinderGoalArrowAttack extends PathfinderGoal {
}
public boolean b() {
return this.a() || !this.b.ak().e();
return this.a() || !this.b.al().e();
}
public void d() {
@ -48,7 +48,7 @@ public class PathfinderGoalArrowAttack extends PathfinderGoal {
public void e() {
double d0 = 100.0D;
double d1 = this.b.e(this.c.locX, this.c.boundingBox.b, this.c.locZ);
boolean flag = this.b.al().canSee(this.c);
boolean flag = this.b.am().canSee(this.c);
if (flag) {
++this.f;
@ -57,9 +57,9 @@ public class PathfinderGoalArrowAttack extends PathfinderGoal {
}
if (d1 <= d0 && this.f >= 20) {
this.b.ak().f();
this.b.al().f();
} else {
this.b.ak().a(this.c, this.e);
this.b.al().a(this.c, this.e);
}
this.b.getControllerLook().a(this.c, 30.0F, 30.0F);
@ -76,7 +76,7 @@ public class PathfinderGoalArrowAttack extends PathfinderGoal {
if (this.g == 1) {
EntityArrow entityarrow = new EntityArrow(this.a, this.b, this.c, 1.6F, 12.0F);
this.a.makeSound(this.b, "random.bow", 1.0F, 1.0F / (this.b.am().nextFloat() * 0.4F + 0.8F));
this.a.makeSound(this.b, "random.bow", 1.0F, 1.0F / (this.b.an().nextFloat() * 0.4F + 0.8F));
this.a.addEntity(entityarrow);
} else if (this.g == 2) {
EntitySnowball entitysnowball = new EntitySnowball(this.a, this.b);
@ -86,7 +86,7 @@ public class PathfinderGoalArrowAttack extends PathfinderGoal {
float f = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F;
entitysnowball.a(d0, d1 + (double) f, d2, 1.6F, 12.0F);
this.a.makeSound(this.b, "random.bow", 1.0F, 1.0F / (this.b.am().nextFloat() * 0.4F + 0.8F));
this.a.makeSound(this.b, "random.bow", 1.0F, 1.0F / (this.b.an().nextFloat() * 0.4F + 0.8F));
this.a.addEntity(entitysnowball);
}
}

Datei anzeigen

@ -25,7 +25,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
public void e() {
super.e();
if (this.a.am().nextInt(20) == 0) {
if (this.a.an().nextInt(20) == 0) {
this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0);
}

Datei anzeigen

@ -18,7 +18,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
}
public boolean a() {
if (this.b.am().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
if (this.b.an().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
return false;
} else {
int i = MathHelper.floor(this.b.locX);
@ -32,7 +32,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
public void c() {
this.a = 40;
this.c.broadcastEntityEffect(this.b, (byte) 10);
this.b.ak().f();
this.b.al().f();
}
public void d() {

Datei anzeigen

@ -29,7 +29,7 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
}
public boolean a() {
EntityLiving entityliving = this.b.as();
EntityLiving entityliving = this.b.at();
if (entityliving == null) {
return false;
@ -37,19 +37,19 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
return false;
} else {
this.c = entityliving;
this.g = this.b.ak().a(this.c);
this.g = this.b.al().a(this.c);
return this.g != null;
}
}
public boolean b() {
EntityLiving entityliving = this.b.as();
EntityLiving entityliving = this.b.at();
return entityliving == null ? false : (!this.c.isAlive() ? false : (!this.f ? !this.b.ak().e() : this.b.e(MathHelper.floor(this.c.locX), MathHelper.floor(this.c.locY), MathHelper.floor(this.c.locZ))));
return entityliving == null ? false : (!this.c.isAlive() ? false : (!this.f ? !this.b.al().e() : this.b.e(MathHelper.floor(this.c.locX), MathHelper.floor(this.c.locY), MathHelper.floor(this.c.locZ))));
}
public void c() {
this.b.ak().a(this.g, this.e);
this.b.al().a(this.g, this.e);
this.i = 0;
}
@ -59,14 +59,14 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetEvent(b, null, reason);
// CraftBukkit end
this.c = null;
this.b.ak().f();
this.b.al().f();
}
public void e() {
this.b.getControllerLook().a(this.c, 30.0F, 30.0F);
if ((this.f || this.b.al().canSee(this.c)) && --this.i <= 0) {
this.i = 4 + this.b.am().nextInt(7);
this.b.ak().a(this.c, this.e);
if ((this.f || this.b.am().canSee(this.c)) && --this.i <= 0) {
this.i = 4 + this.b.an().nextInt(7);
this.b.al().a(this.c, this.e);
}
this.d = Math.max(this.d - 1, 0);

Datei anzeigen

@ -27,7 +27,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
}
public boolean b() {
EntityLiving entityliving = this.c.as();
EntityLiving entityliving = this.c.at();
if (entityliving == null) {
return false;
@ -37,7 +37,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
return false;
} else {
if (this.e) {
if (!this.c.al().canSee(entityliving)) {
if (!this.c.am().canSee(entityliving)) {
if (++this.g > 60) {
return false;
}
@ -85,7 +85,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
if (!this.c.e(MathHelper.floor(entityliving.locX), MathHelper.floor(entityliving.locY), MathHelper.floor(entityliving.locZ))) {
return false;
} else if (this.e && !this.c.al().canSee(entityliving)) {
} else if (this.e && !this.c.am().canSee(entityliving)) {
return false;
} else {
if (this.a) {
@ -136,8 +136,8 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
}
private boolean a(EntityLiving entityliving) {
this.f = 10 + this.c.am().nextInt(5);
PathEntity pathentity = this.c.ak().a(entityliving);
this.f = 10 + this.c.an().nextInt(5);
PathEntity pathentity = this.c.al().a(entityliving);
if (pathentity == null) {
return false;

Datei anzeigen

@ -1,32 +0,0 @@
package net.minecraft.server;
public class PlayerAbilities {
public boolean isInvulnerable = false;
public boolean isFlying = false;
public boolean canFly = false;
public boolean canInstantlyBuild = false;
public PlayerAbilities() {}
public void a(NBTTagCompound nbttagcompound) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setBoolean("invulnerable", this.isInvulnerable);
nbttagcompound1.setBoolean("flying", this.isInvulnerable);
nbttagcompound1.setBoolean("mayfly", this.canFly);
nbttagcompound1.setBoolean("instabuild", this.canInstantlyBuild);
nbttagcompound.set("abilities", nbttagcompound1);
}
public void b(NBTTagCompound nbttagcompound) {
if (nbttagcompound.hasKey("abilities")) {
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("abilities");
this.isInvulnerable = nbttagcompound1.getBoolean("invulnerable");
//this.isFlying = nbttagcompound1.getBoolean("flying"); // CraftBukkit - not fully implemented.
this.canFly = nbttagcompound1.getBoolean("mayfly");
this.canInstantlyBuild = nbttagcompound1.getBoolean("instabuild");
}
}
}

Datei anzeigen

@ -833,7 +833,7 @@ public class ServerConfigurationManager {
public void updateClient(EntityPlayer entityplayer) {
entityplayer.updateInventory(entityplayer.defaultContainer);
entityplayer.J();
entityplayer.D_();
entityplayer.lastSentExp = -1; // CraftBukkit
}

Datei anzeigen

@ -222,7 +222,7 @@ public final class SpawnerCreature {
List list = biomebase.getMobs(EnumCreatureType.CREATURE);
if (!list.isEmpty()) {
while (random.nextFloat() < biomebase.e()) {
while (random.nextFloat() < biomebase.f()) {
BiomeMeta biomemeta = (BiomeMeta) WeightedRandom.a(world.random, (Collection) list);
int i1 = biomemeta.b + random.nextInt(1 + biomemeta.c - biomemeta.b);
int j1 = i + random.nextInt(k);

Datei anzeigen

@ -79,7 +79,7 @@ public class TileEntityMobSpawner extends TileEntity {
if (entityliving.canSpawn()) {
this.world.addEntity(entityliving, SpawnReason.SPAWNER); // CraftBukkit
this.world.triggerEffect(2004, this.x, this.y, this.z, 0);
entityliving.aB();
entityliving.aC();
this.e();
}
}

Datei anzeigen

@ -279,7 +279,7 @@ public class World implements IBlockAccess {
public boolean isTileEntity(int i, int j, int k) {
int l = this.getTypeId(i, j, k);
return Block.byId[l] != null && Block.byId[l].n();
return Block.byId[l] != null && Block.byId[l].o();
}
public boolean isLoaded(int i, int j, int k) {
@ -1111,7 +1111,7 @@ public class World implements IBlockAccess {
continue;
}
// CraftBukkit end
entity.G_();
entity.F_();
if (entity.dead) {
this.e.remove(i--);
}
@ -1260,9 +1260,9 @@ public class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.bZ) {
if (entity.vehicle != null) {
entity.Q();
entity.R();
} else {
entity.G_();
entity.F_();
}
}
@ -2038,7 +2038,7 @@ public class World implements IBlockAccess {
++j;
Block block = Block.byId[j3];
if (block != null && block.m()) {
if (block != null && block.n()) {
++i;
block.a(this, k2 + k, i3 + chunksection.c(), l2 + l, this.random);
}
@ -2060,7 +2060,7 @@ public class World implements IBlockAccess {
public boolean c(int i, int j, int k, boolean flag) {
BiomeBase biomebase = this.getBiome(i, k);
float f = biomebase.h();
float f = biomebase.i();
if (f > 0.15F) {
return false;
@ -2103,7 +2103,7 @@ public class World implements IBlockAccess {
public boolean u(int i, int j, int k) {
BiomeBase biomebase = this.getBiome(i, k);
float f = biomebase.h();
float f = biomebase.i();
if (f > 0.15F) {
return false;
@ -2870,14 +2870,14 @@ public class World implements IBlockAccess {
} else {
BiomeBase biomebase = this.getBiome(i, k);
return biomebase.b() ? false : biomebase.c();
return biomebase.c() ? false : biomebase.d();
}
}
public boolean z(int i, int j, int k) {
BiomeBase biomebase = this.getBiome(i, k);
return biomebase.d();
return biomebase.e();
}
public void a(String s, WorldMapBase worldmapbase) {

Datei anzeigen

@ -60,7 +60,7 @@ public class WorldGenForest extends WorldGenerator implements BlockSapling.TreeG
} else {
i1 = world.getTypeId(i, j - 1, k);
if ((i1 == Block.GRASS.id || i1 == Block.DIRT.id) && j < 256 - l - 1) {
this.setTypeAndData(world, i, j - 1, k, Block.DIRT.id, 0); // CraftBukkit
this.setType(world, i, j - 1, k, Block.DIRT.id);
int i2;

Datei anzeigen

@ -31,7 +31,7 @@ public class WorldGenGroundBush extends WorldGenerator implements BlockSapling.T
if (i1 == Block.DIRT.id || i1 == Block.GRASS.id) {
++j;
this.setTypeAndData(world, i, j, k, Block.LOG.id, this.b); // CraftBukkit
this.setTypeAndData(world, i, j, k, Block.LOG.id, this.b);
for (int j1 = j; j1 <= j + 2; ++j1) {
int k1 = j1 - j;
@ -54,6 +54,7 @@ public class WorldGenGroundBush extends WorldGenerator implements BlockSapling.T
return false;
}
// CraftBukkit end
return true;
}
}

Datei anzeigen

@ -59,7 +59,7 @@ public class WorldGenSwampTree extends WorldGenerator implements BlockSapling.T
} else {
i1 = world.getTypeId(i, j - 1, k);
if ((i1 == Block.GRASS.id || i1 == Block.DIRT.id) && j < 128 - l - 1) {
this.setTypeAndData(world, i, j - 1, k, Block.DIRT.id, 0); // CraftBukkit
this.setType(world, i, j - 1, k, Block.DIRT.id);
int i2;
int j2;
@ -75,7 +75,7 @@ public class WorldGenSwampTree extends WorldGenerator implements BlockSapling.T
int l2 = k2 - k;
if ((Math.abs(i2) != k1 || Math.abs(l2) != k1 || random.nextInt(2) != 0 && j1 != 0) && !Block.n[world.getTypeId(l1, j2, k2)]) {
this.setTypeAndData(world, l1, j2, k2, Block.LEAVES.id, 0); // CraftBukkit
this.setType(world, l1, j2, k2, Block.LEAVES.id);
}
}
}
@ -84,7 +84,7 @@ public class WorldGenSwampTree extends WorldGenerator implements BlockSapling.T
for (j2 = 0; j2 < l; ++j2) {
j1 = world.getTypeId(i, j + j2, k);
if (j1 == 0 || j1 == Block.LEAVES.id || j1 == Block.WATER.id || j1 == Block.STATIONARY_WATER.id) {
this.setTypeAndData(world, i, j + j2, k, Block.LOG.id, 0); // CraftBukkit
this.setType(world, i, j + j2, k, Block.LOG.id);
}
}
@ -96,19 +96,19 @@ public class WorldGenSwampTree extends WorldGenerator implements BlockSapling.T
for (i2 = k - k1; i2 <= k + k1; ++i2) {
if (world.getTypeId(l1, j2, i2) == Block.LEAVES.id) {
if (random.nextInt(4) == 0 && world.getTypeId(l1 - 1, j2, i2) == 0) {
this.a(world, l1 - 1, j2, i2, 8);
this.b(world, l1 - 1, j2, i2, 8);
}
if (random.nextInt(4) == 0 && world.getTypeId(l1 + 1, j2, i2) == 0) {
this.a(world, l1 + 1, j2, i2, 2);
this.b(world, l1 + 1, j2, i2, 2);
}
if (random.nextInt(4) == 0 && world.getTypeId(l1, j2, i2 - 1) == 0) {
this.a(world, l1, j2, i2 - 1, 1);
this.b(world, l1, j2, i2 - 1, 1);
}
if (random.nextInt(4) == 0 && world.getTypeId(l1, j2, i2 + 1) == 0) {
this.a(world, l1, j2, i2 + 1, 4);
this.b(world, l1, j2, i2 + 1, 4);
}
}
}
@ -125,8 +125,9 @@ public class WorldGenSwampTree extends WorldGenerator implements BlockSapling.T
}
}
private void a(org.bukkit.BlockChangeDelegate world, int i, int j, int k, int l) { // CraftBukkit - change signature
this.setTypeAndData(world, i, j, k, Block.VINE.id, l); // CraftBukkit
// CraftBukkit - change signature
private void b(org.bukkit.BlockChangeDelegate world, int i, int j, int k, int l) {
this.setTypeAndData(world, i, j, k, Block.VINE.id, l);
int i1 = 4;
while (true) {
@ -135,7 +136,7 @@ public class WorldGenSwampTree extends WorldGenerator implements BlockSapling.T
return;
}
this.setTypeAndData(world, i, j, k, Block.VINE.id, l); // CraftBukkit
this.setTypeAndData(world, i, j, k, Block.VINE.id, l);
--i1;
}
}

Datei anzeigen

@ -60,7 +60,7 @@ public class WorldGenTaiga1 extends WorldGenerator implements BlockSapling.TreeG
} else {
l1 = world.getTypeId(i, j - 1, k);
if ((l1 == Block.GRASS.id || l1 == Block.DIRT.id) && j < 128 - l - 1) {
this.setTypeAndData(world, i, j - 1, k, Block.DIRT.id, 0); // CraftBukkit
this.setType(world, i, j - 1, k, Block.DIRT.id);
l2 = 0;
for (i2 = j + l; i2 >= j + i1; --i2) {
@ -71,7 +71,7 @@ public class WorldGenTaiga1 extends WorldGenerator implements BlockSapling.TreeG
int j3 = i3 - k;
if ((Math.abs(k2) != l2 || Math.abs(j3) != l2 || l2 <= 0) && !Block.n[world.getTypeId(j2, i2, i3)]) {
this.setTypeAndData(world, j2, i2, i3, Block.LEAVES.id, 1); // CraftBukkit
this.setTypeAndData(world, j2, i2, i3, Block.LEAVES.id, 1);
}
}
}
@ -86,7 +86,7 @@ public class WorldGenTaiga1 extends WorldGenerator implements BlockSapling.TreeG
for (i2 = 0; i2 < l - 1; ++i2) {
j2 = world.getTypeId(i, j + i2, k);
if (j2 == 0 || j2 == Block.LEAVES.id) {
this.setTypeAndData(world, i, j + i2, k, Block.LOG.id, 1); // CraftBukkit
this.setTypeAndData(world, i, j + i2, k, Block.LOG.id, 1);
}
}

Datei anzeigen

@ -61,7 +61,7 @@ public class WorldGenTaiga2 extends WorldGenerator implements BlockSapling.TreeG
} else {
l1 = world.getTypeId(i, j - 1, k);
if ((l1 == Block.GRASS.id || l1 == Block.DIRT.id) && j < 256 - l - 1) {
this.setTypeAndData(world, i, j - 1, k, Block.DIRT.id, 0); // CraftBukkit
this.setType(world, i, j - 1, k, Block.DIRT.id);
k2 = random.nextInt(2);
i2 = 1;
byte b0 = 0;

Datei anzeigen

@ -72,7 +72,7 @@ public class WorldGenTrees extends WorldGenerator implements BlockSapling.TreeGe
} else {
i1 = world.getTypeId(i, j - 1, k);
if ((i1 == Block.GRASS.id || i1 == Block.DIRT.id) && j < 256 - l - 1) {
this.setTypeAndData(world, i, j - 1, k, Block.DIRT.id, 0); // CraftBukkit
this.setType(world, i, j - 1, k, Block.DIRT.id);
b0 = 3;
byte b1 = 0;
@ -130,19 +130,19 @@ public class WorldGenTrees extends WorldGenerator implements BlockSapling.TreeGe
for (k2 = k - i2; k2 <= k + i2; ++k2) {
if (world.getTypeId(j2, j1, k2) == Block.LEAVES.id) {
if (random.nextInt(4) == 0 && world.getTypeId(j2 - 1, j1, k2) == 0) {
this.a(world, j2 - 1, j1, k2, 8);
this.b(world, j2 - 1, j1, k2, 8);
}
if (random.nextInt(4) == 0 && world.getTypeId(j2 + 1, j1, k2) == 0) {
this.a(world, j2 + 1, j1, k2, 2);
this.b(world, j2 + 1, j1, k2, 2);
}
if (random.nextInt(4) == 0 && world.getTypeId(j2, j1, k2 - 1) == 0) {
this.a(world, j2, j1, k2 - 1, 1);
this.b(world, j2, j1, k2 - 1, 1);
}
if (random.nextInt(4) == 0 && world.getTypeId(j2, j1, k2 + 1) == 0) {
this.a(world, j2, j1, k2 + 1, 4);
this.b(world, j2, j1, k2 + 1, 4);
}
}
}
@ -161,8 +161,8 @@ public class WorldGenTrees extends WorldGenerator implements BlockSapling.TreeGe
}
// CraftBukkit - Changed world to BlockChangeDelegate
private void a(BlockChangeDelegate world, int i, int j, int k, int l) {
this.setTypeAndData(world, i, j, k, Block.VINE.id, l); // CraftBukkit
private void b(BlockChangeDelegate world, int i, int j, int k, int l) {
this.setTypeAndData(world, i, j, k, Block.VINE.id, l);
int i1 = 4;
while (true) {
@ -171,7 +171,7 @@ public class WorldGenTrees extends WorldGenerator implements BlockSapling.TreeGe
return;
}
this.setTypeAndData(world, i, j, k, Block.VINE.id, l); // CraftBukkit
this.setTypeAndData(world, i, j, k, Block.VINE.id, l);
--i1;
}
}

Datei anzeigen

@ -20,17 +20,19 @@ public abstract class WorldGenerator {
public void a(double d0, double d1, double d2) {}
// CraftBukkit - change signature
protected void setType(BlockChangeDelegate world, int i, int j, int k, int l) {
this.setTypeAndData(world, i, j, k, l, 0);
}
// CraftBukkit - change signature
protected void setTypeAndData(BlockChangeDelegate world, int i, int j, int k, int l, int i1) {
if (this.a) {
world.setTypeIdAndData(i, j, k, l, i1);
// CraftBukkit start - do equiv of setTypeIdAndData, but skip doing physics to prevent fades
}
else if ((world instanceof World) && ((World) world).getChunkAt(i >> 4, k >> 4).sentToClient) {
} else if (world instanceof World && ((World)world).getChunkAtWorldCoords(i >> 4, k >> 4).seenByPlayer) {
if (world.setRawTypeIdAndData(i, j, k, l, i1)) {
((World) world).notify(i, j, k);
((World)world).notify(i, j, k);
}
// CraftBukkt end
} else {
world.setRawTypeIdAndData(i, j, k, l, i1);
}

Datei anzeigen

@ -170,7 +170,7 @@ public class WorldServer extends World implements BlockChangeDelegate {
protected void c(Entity entity) {
super.c(entity);
this.entitiesById.a(entity.id, entity);
Entity[] aentity = entity.ba();
Entity[] aentity = entity.bb();
if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) {
@ -182,7 +182,7 @@ public class WorldServer extends World implements BlockChangeDelegate {
protected void d(Entity entity) {
super.d(entity);
this.entitiesById.d(entity.id);
Entity[] aentity = entity.ba();
Entity[] aentity = entity.bb();
if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) {

Datei anzeigen

@ -303,7 +303,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
public boolean isBlocking() {
return getHandle().O();
return getHandle().P();
}
public boolean setWindowProperty(InventoryView.Property prop, int value) {