Update CraftBukkit to Minecraft 1.7.10
Dieser Commit ist enthalten in:
Ursprung
a8628fd645
Commit
dbb5e6e3cd
6
pom.xml
6
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.7.9-R0.3-SNAPSHOT</version>
|
||||
<version>1.7.10-R0.1-SNAPSHOT</version>
|
||||
<name>CraftBukkit</name>
|
||||
<url>http://www.bukkit.org</url>
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<api.version>unknown</api.version>
|
||||
<junit.version>4.11</junit.version>
|
||||
<minecraft.version>1.7.9</minecraft.version>
|
||||
<minecraft_version>1_7_R3</minecraft_version>
|
||||
<minecraft.version>1.7.10</minecraft.version>
|
||||
<minecraft_version>1_7_R4</minecraft_version>
|
||||
<buildtag.prefix>git-Bukkit-</buildtag.prefix>
|
||||
<buildtag.suffix></buildtag.suffix>
|
||||
</properties>
|
||||
|
@ -15,7 +15,7 @@ public class BiomeTheEndDecorator extends BiomeDecorator {
|
||||
int j = this.d + this.b.nextInt(16) + 8;
|
||||
int k = this.a.i(i, j);
|
||||
|
||||
this.J.a(this.a, this.b, i, k, j);
|
||||
this.J.generate(this.a, this.b, i, k, j);
|
||||
}
|
||||
|
||||
if (this.c == 0 && this.d == 0) {
|
||||
|
@ -44,21 +44,21 @@ public class Block {
|
||||
public float frictionFactor;
|
||||
private String name;
|
||||
|
||||
public static int b(Block block) {
|
||||
public static int getId(Block block) {
|
||||
return REGISTRY.b(block);
|
||||
}
|
||||
|
||||
public static Block e(int i) {
|
||||
public static Block getById(int i) {
|
||||
return (Block) REGISTRY.a(i);
|
||||
}
|
||||
|
||||
public static Block a(Item item) {
|
||||
return e(Item.b(item));
|
||||
return getById(Item.getId(item));
|
||||
}
|
||||
|
||||
public static Block b(String s) {
|
||||
if (REGISTRY.b(s)) {
|
||||
return (Block) REGISTRY.a(s);
|
||||
return (Block) REGISTRY.get(s);
|
||||
} else {
|
||||
try {
|
||||
return (Block) REGISTRY.a(Integer.parseInt(s));
|
||||
@ -681,8 +681,8 @@ public class Block {
|
||||
public void g() {}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[b(this)], 1);
|
||||
entityhuman.a(0.025F);
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1);
|
||||
entityhuman.applyExhaustion(0.025F);
|
||||
if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
|
||||
ItemStack itemstack = this.j(l);
|
||||
|
||||
@ -786,7 +786,7 @@ public class Block {
|
||||
return block != null && block1 != null ? (block == block1 ? true : block.c(block1)) : false;
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean isComplexRedstone() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,11 @@ package net.minecraft.server;
|
||||
import java.util.ArrayList;
|
||||
|
||||
// CraftBukkit - imported class because the constructor is package private
|
||||
class NoteDataList extends ArrayList {
|
||||
class BlockActionDataList extends ArrayList {
|
||||
|
||||
private NoteDataList() {}
|
||||
private BlockActionDataList() {}
|
||||
|
||||
NoteDataList(EmptyClass2 emptyclass2) {
|
||||
BlockActionDataList(BananaAPI bananaapi) {
|
||||
this();
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ public class BlockBloodStone extends Block {
|
||||
|
||||
// CraftBukkit start
|
||||
public void doPhysics(World world, int i, int j, int k, int l) {
|
||||
if (net.minecraft.server.Block.e(l) != null && net.minecraft.server.Block.e(l).isPowerSource()) {
|
||||
if (net.minecraft.server.Block.getById(l) != null && net.minecraft.server.Block.getById(l).isPowerSource()) {
|
||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
|
||||
int power = block.getBlockPower();
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
|
||||
public void a(World world, int i, int j, int k, Random random) {
|
||||
if (!this.j(world, i, j, k)) {
|
||||
this.b(world, i, j, k, world.getData(i, j, k), 0);
|
||||
world.setTypeAndData(i, j, k, e(0), 0, 2);
|
||||
world.setTypeAndData(i, j, k, getById(0), 0, 2);
|
||||
} else if (world.random.nextInt(5) == 0) {
|
||||
int l = world.getData(i, j, k);
|
||||
int i1 = c(l);
|
||||
@ -97,7 +97,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
|
||||
public void doPhysics(World world, int i, int j, int k, Block block) {
|
||||
if (!this.j(world, i, j, k)) {
|
||||
this.b(world, i, j, k, world.getData(i, j, k), 0);
|
||||
world.setTypeAndData(i, j, k, e(0), 0, 2);
|
||||
world.setTypeAndData(i, j, k, getById(0), 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,10 +42,10 @@ public class BlockCommand extends BlockContainer {
|
||||
TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
|
||||
if (tileentity != null && tileentity instanceof TileEntityCommand) {
|
||||
CommandBlockListenerAbstract commandblocklistenerabstract = ((TileEntityCommand) tileentity).a();
|
||||
CommandBlockListenerAbstract commandblocklistenerabstract = ((TileEntityCommand) tileentity).getCommandBlock();
|
||||
|
||||
commandblocklistenerabstract.a(world);
|
||||
world.f(i, j, k, this);
|
||||
world.updateAdjacentComparators(i, j, k, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,21 +63,21 @@ public class BlockCommand extends BlockContainer {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean isComplexRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int g(World world, int i, int j, int k, int l) {
|
||||
TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
|
||||
return tileentity != null && tileentity instanceof TileEntityCommand ? ((TileEntityCommand) tileentity).a().g() : 0;
|
||||
return tileentity != null && tileentity instanceof TileEntityCommand ? ((TileEntityCommand) tileentity).getCommandBlock().g() : 0;
|
||||
}
|
||||
|
||||
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving, ItemStack itemstack) {
|
||||
TileEntityCommand tileentitycommand = (TileEntityCommand) world.getTileEntity(i, j, k);
|
||||
|
||||
if (itemstack.hasName()) {
|
||||
tileentitycommand.a().b(itemstack.getName());
|
||||
tileentitycommand.getCommandBlock().setName(itemstack.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ public class BlockDispenser extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
world.f(i, j, k, block);
|
||||
world.updateAdjacentComparators(i, j, k, block);
|
||||
}
|
||||
|
||||
super.remove(world, i, j, k, block, l);
|
||||
@ -179,7 +179,7 @@ public class BlockDispenser extends BlockContainer {
|
||||
return EnumFacing.a(i & 7);
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean isComplexRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -19,29 +19,29 @@ public class BlockFire extends Block {
|
||||
}
|
||||
|
||||
public static void e() {
|
||||
Blocks.FIRE.a(b(Blocks.WOOD), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.WOOD_DOUBLE_STEP), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.WOOD_STEP), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.FENCE), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.BIRCH_WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.SPRUCE_WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.JUNGLE_WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(b(Blocks.LOG), 5, 5);
|
||||
Blocks.FIRE.a(b(Blocks.LOG2), 5, 5);
|
||||
Blocks.FIRE.a(b(Blocks.LEAVES), 30, 60);
|
||||
Blocks.FIRE.a(b(Blocks.LEAVES2), 30, 60);
|
||||
Blocks.FIRE.a(b(Blocks.BOOKSHELF), 30, 20);
|
||||
Blocks.FIRE.a(b(Blocks.TNT), 15, 100);
|
||||
Blocks.FIRE.a(b(Blocks.LONG_GRASS), 60, 100);
|
||||
Blocks.FIRE.a(b(Blocks.DOUBLE_PLANT), 60, 100);
|
||||
Blocks.FIRE.a(b(Blocks.YELLOW_FLOWER), 60, 100);
|
||||
Blocks.FIRE.a(b(Blocks.RED_ROSE), 60, 100);
|
||||
Blocks.FIRE.a(b(Blocks.WOOL), 30, 60);
|
||||
Blocks.FIRE.a(b(Blocks.VINE), 15, 100);
|
||||
Blocks.FIRE.a(b(Blocks.COAL_BLOCK), 5, 5);
|
||||
Blocks.FIRE.a(b(Blocks.HAY_BLOCK), 60, 20);
|
||||
Blocks.FIRE.a(b(Blocks.WOOL_CARPET), 60, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.WOOD), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.WOOD_DOUBLE_STEP), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.WOOD_STEP), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.FENCE), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.BIRCH_WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.SPRUCE_WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.JUNGLE_WOOD_STAIRS), 5, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.LOG), 5, 5);
|
||||
Blocks.FIRE.a(getId(Blocks.LOG2), 5, 5);
|
||||
Blocks.FIRE.a(getId(Blocks.LEAVES), 30, 60);
|
||||
Blocks.FIRE.a(getId(Blocks.LEAVES2), 30, 60);
|
||||
Blocks.FIRE.a(getId(Blocks.BOOKSHELF), 30, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.TNT), 15, 100);
|
||||
Blocks.FIRE.a(getId(Blocks.LONG_GRASS), 60, 100);
|
||||
Blocks.FIRE.a(getId(Blocks.DOUBLE_PLANT), 60, 100);
|
||||
Blocks.FIRE.a(getId(Blocks.YELLOW_FLOWER), 60, 100);
|
||||
Blocks.FIRE.a(getId(Blocks.RED_ROSE), 60, 100);
|
||||
Blocks.FIRE.a(getId(Blocks.WOOL), 30, 60);
|
||||
Blocks.FIRE.a(getId(Blocks.VINE), 15, 100);
|
||||
Blocks.FIRE.a(getId(Blocks.COAL_BLOCK), 5, 5);
|
||||
Blocks.FIRE.a(getId(Blocks.HAY_BLOCK), 60, 20);
|
||||
Blocks.FIRE.a(getId(Blocks.WOOL_CARPET), 60, 20);
|
||||
}
|
||||
|
||||
public void a(int i, int j, int k) {
|
||||
@ -151,8 +151,8 @@ public class BlockFire extends Block {
|
||||
org.bukkit.Server server = world.getServer();
|
||||
org.bukkit.World bworld = world.getWorld();
|
||||
org.bukkit.block.BlockState blockState = bworld.getBlockAt(i1, k1, j1).getState();
|
||||
blockState.setTypeId(Block.b(this));
|
||||
blockState.setData(new org.bukkit.material.MaterialData(Block.b(this), (byte) k2));
|
||||
blockState.setTypeId(Block.getId(this));
|
||||
blockState.setData(new org.bukkit.material.MaterialData(Block.getId(this), (byte) k2));
|
||||
|
||||
BlockSpreadEvent spreadEvent = new BlockSpreadEvent(blockState.getBlock(), bworld.getBlockAt(i, j, k), blockState);
|
||||
server.getPluginManager().callEvent(spreadEvent);
|
||||
@ -178,7 +178,7 @@ public class BlockFire extends Block {
|
||||
}
|
||||
|
||||
private void a(World world, int i, int j, int k, int l, Random random, int i1) {
|
||||
int j1 = this.b[Block.b(world.getType(i, j, k))];
|
||||
int j1 = this.b[Block.getId(world.getType(i, j, k))];
|
||||
|
||||
if (random.nextInt(l) < j1) {
|
||||
boolean flag = world.getType(i, j, k) == Blocks.TNT;
|
||||
@ -238,11 +238,11 @@ public class BlockFire extends Block {
|
||||
}
|
||||
|
||||
public boolean e(IBlockAccess iblockaccess, int i, int j, int k) {
|
||||
return this.a[Block.b(iblockaccess.getType(i, j, k))] > 0;
|
||||
return this.a[Block.getId(iblockaccess.getType(i, j, k))] > 0;
|
||||
}
|
||||
|
||||
public int a(World world, int i, int j, int k, int l) {
|
||||
int i1 = this.a[Block.b(world.getType(i, j, k))];
|
||||
int i1 = this.a[Block.getId(world.getType(i, j, k))];
|
||||
|
||||
return i1 > l ? i1 : l;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class BlockFlowing extends BlockFluids {
|
||||
private void n(World world, int i, int j, int k) {
|
||||
int l = world.getData(i, j, k);
|
||||
|
||||
world.setTypeAndData(i, j, k, Block.e(Block.b((Block) this) + 1), l, 2);
|
||||
world.setTypeAndData(i, j, k, Block.getById(Block.getId(this) + 1), l, 2);
|
||||
}
|
||||
|
||||
public void a(World world, int i, int j, int k, Random random) {
|
||||
|
@ -126,7 +126,7 @@ public class BlockHopper extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
world.f(i, j, k, block);
|
||||
world.updateAdjacentComparators(i, j, k, block);
|
||||
}
|
||||
|
||||
super.remove(world, i, j, k, block, l);
|
||||
@ -152,7 +152,7 @@ public class BlockHopper extends BlockContainer {
|
||||
return (i & 8) != 8;
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean isComplexRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,8 @@ public class BlockIce extends BlockHalfTransparent {
|
||||
}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
|
||||
entityhuman.a(0.025F);
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
|
||||
entityhuman.applyExhaustion(0.025F);
|
||||
if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
|
||||
ItemStack itemstack = this.j(l);
|
||||
|
||||
|
@ -179,8 +179,8 @@ public abstract class BlockLeaves extends BlockTransparent {
|
||||
}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
if (!world.isStatic && entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
|
||||
if (!world.isStatic && entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
|
||||
this.a(world, i, j, k, new ItemStack(Item.getItemOf(this), 1, l & 3));
|
||||
} else {
|
||||
super.a(world, entityhuman, i, j, k, l);
|
||||
|
@ -87,7 +87,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
|
||||
world.a(i, j, k, this, this.a(world));
|
||||
}
|
||||
|
||||
world.f(i, j, k, this);
|
||||
world.updateAdjacentComparators(i, j, k, this);
|
||||
}
|
||||
|
||||
public void onPlace(World world, int i, int j, int k) {
|
||||
@ -95,7 +95,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
|
||||
this.a(world, i, j, k, world.getData(i, j, k));
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean isComplexRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
|
||||
List list = world.a(EntityMinecartCommandBlock.class, AxisAlignedBB.a((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f)));
|
||||
|
||||
if (list.size() > 0) {
|
||||
return ((EntityMinecartCommandBlock) list.get(0)).e().g();
|
||||
return ((EntityMinecartCommandBlock) list.get(0)).getCommandBlock().g();
|
||||
}
|
||||
|
||||
List list1 = world.a(EntityMinecartAbstract.class, AxisAlignedBB.a((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f)), IEntitySelector.c);
|
||||
|
@ -104,7 +104,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme
|
||||
worldgenhugemushroom = new WorldGenHugeMushroom(1);
|
||||
}
|
||||
|
||||
if (worldgenhugemushroom != null && worldgenhugemushroom.a(world, random, i, j, k)) {
|
||||
if (worldgenhugemushroom != null && worldgenhugemushroom.generate(world, random, i, j, k)) {
|
||||
return true;
|
||||
} else {
|
||||
world.setTypeAndData(i, j, k, this, l, 3);
|
||||
|
@ -73,7 +73,7 @@ public class BlockPiston extends Block {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
world.playNote(i, j, k, this, 0, i1);
|
||||
world.playBlockAction(i, j, k, this, 0, i1);
|
||||
}
|
||||
} else if (!flag && c(l)) {
|
||||
// CraftBukkit start
|
||||
@ -87,7 +87,7 @@ public class BlockPiston extends Block {
|
||||
// CraftBukkit end
|
||||
|
||||
world.setData(i, j, k, i1, 2);
|
||||
world.playNote(i, j, k, this, 1, i1);
|
||||
world.playBlockAction(i, j, k, this, 1, i1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,6 +164,6 @@ public class BlockPistonExtension extends Block {
|
||||
}
|
||||
|
||||
public static int b(int i) {
|
||||
return i & 7;
|
||||
return MathHelper.a(i & 7, 0, Facing.b.length - 1);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
||||
Entity entity = ItemMonsterEgg.spawnCreature(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
|
||||
|
||||
if (entity != null) {
|
||||
entity.portalCooldown = entity.ah();
|
||||
entity.portalCooldown = entity.ai();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
||||
world.getServer().getPluginManager().callEvent(event);
|
||||
// CraftBukkit end
|
||||
|
||||
entity.ag();
|
||||
entity.ah();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
if (!entity.ay()) {
|
||||
if (!entity.az()) {
|
||||
return 15;
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
|
||||
world.setTypeAndData(i, j, k, block, 0, 4);
|
||||
}
|
||||
|
||||
if (!((WorldGenerator) object).a(world, random, i + i1, j, k + j1)) {
|
||||
if (!((WorldGenerator) object).generate(world, random, i + i1, j, k + j1)) {
|
||||
if (flag) {
|
||||
world.setTypeAndData(i + i1, j, k + j1, this, l, 4);
|
||||
world.setTypeAndData(i + i1 + 1, j, k + j1, this, l, 4);
|
||||
|
@ -88,7 +88,7 @@ public class BlockSkull extends BlockContainer {
|
||||
itemstack.setTag(new NBTTagCompound());
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
|
||||
GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile());
|
||||
GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile());
|
||||
itemstack.getTag().set("SkullOwner", nbttagcompound);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ public class BlockSkull extends BlockContainer {
|
||||
itemstack.setTag(new NBTTagCompound());
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
|
||||
GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile());
|
||||
GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile());
|
||||
itemstack.getTag().set("SkullOwner", nbttagcompound);
|
||||
}
|
||||
|
||||
@ -151,13 +151,13 @@ public class BlockSkull extends BlockContainer {
|
||||
world.setData(i, j, k + l + 1, 8, 2);
|
||||
world.setData(i, j, k + l + 2, 8, 2);
|
||||
|
||||
blockList.setTypeAndData(i, j, k + l, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j, k + l + 1, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j, k + l + 2, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 1, k + l, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 1, k + l + 1, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 1, k + l + 2, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 2, k + l + 1, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j, k + l, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j, k + l + 1, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j, k + l + 2, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 1, k + l, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 1, k + l + 1, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 1, k + l + 2, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i, j - 2, k + l + 1, getById(0), 0, 2);
|
||||
|
||||
if (!world.isStatic) {
|
||||
entitywither = new EntityWither(world);
|
||||
@ -196,13 +196,13 @@ public class BlockSkull extends BlockContainer {
|
||||
world.setData(i + l + 1, j, k, 8, 2);
|
||||
world.setData(i + l + 2, j, k, 8, 2);
|
||||
|
||||
blockList.setTypeAndData(i + l, j, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 1, j, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 2, j, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l, j - 1, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 1, j - 1, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 2, j - 1, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 1, j - 2, k, e(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l, j, k, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 1, j, k, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 2, j, k, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l, j - 1, k, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 1, j - 1, k, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 2, j - 1, k, getById(0), 0, 2);
|
||||
blockList.setTypeAndData(i + l + 1, j - 2, k, getById(0), 0, 2);
|
||||
if (!world.isStatic) {
|
||||
entitywither = new EntityWither(world);
|
||||
entitywither.setPositionRotation((double) (i + l) + 1.5D, (double) j - 1.45D, (double) k + 0.5D, 0.0F, 0.0F);
|
||||
|
@ -67,7 +67,7 @@ public class BlockSnow extends Block {
|
||||
|
||||
this.a(world, i, j, k, new ItemStack(Items.SNOW_BALL, i1 + 1, 0));
|
||||
world.setAir(i, j, k);
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
|
||||
}
|
||||
|
||||
public Item getDropType(int i, Random random, int j) {
|
||||
|
@ -24,8 +24,8 @@ public class BlockStationary extends BlockFluids {
|
||||
private void n(World world, int i, int j, int k) {
|
||||
int l = world.getData(i, j, k);
|
||||
|
||||
world.setTypeAndData(i, j, k, Block.e(Block.b((Block) this) - 1), l, 2);
|
||||
world.a(i, j, k, Block.e(Block.b((Block) this) - 1), this.a(world));
|
||||
world.setTypeAndData(i, j, k, Block.getById(Block.getId(this) - 1), l, 2);
|
||||
world.a(i, j, k, Block.getById(Block.getId(this) - 1), this.a(world));
|
||||
}
|
||||
|
||||
public void a(World world, int i, int j, int k, Random random) {
|
||||
|
@ -86,7 +86,7 @@ public class BlockTallPlant extends BlockPlant implements IBlockFragilePlantElem
|
||||
}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
if (world.isStatic || entityhuman.bE() == null || entityhuman.bE().getItem() != Items.SHEARS || c(l) || !this.b(world, i, j, k, l, entityhuman)) {
|
||||
if (world.isStatic || entityhuman.bF() == null || entityhuman.bF().getItem() != Items.SHEARS || c(l) || !this.b(world, i, j, k, l, entityhuman)) {
|
||||
super.a(world, entityhuman, i, j, k, l);
|
||||
}
|
||||
}
|
||||
@ -101,7 +101,7 @@ public class BlockTallPlant extends BlockPlant implements IBlockFragilePlantElem
|
||||
if (j1 != 3 && j1 != 2) {
|
||||
world.setAir(i, j - 1, k, true);
|
||||
} else {
|
||||
if (!world.isStatic && entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
|
||||
if (!world.isStatic && entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
|
||||
this.b(world, i, j, k, i1, entityhuman);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ public class BlockTallPlant extends BlockPlant implements IBlockFragilePlantElem
|
||||
if (i1 != 3 && i1 != 2) {
|
||||
return false;
|
||||
} else {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
|
||||
byte b0 = 1;
|
||||
|
||||
if (i1 == 3) {
|
||||
|
@ -76,7 +76,7 @@ public class BlockTripwire extends Block {
|
||||
|
||||
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
|
||||
if (!world.isStatic) {
|
||||
if (entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
|
||||
if (entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
|
||||
world.setData(i, j, k, l | 8, 4);
|
||||
}
|
||||
}
|
||||
@ -140,7 +140,7 @@ public class BlockTripwire extends Block {
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
if (!entity.ay()) {
|
||||
if (!entity.az()) {
|
||||
flag1 = true;
|
||||
break;
|
||||
}
|
||||
|
@ -294,8 +294,8 @@ public class BlockVine extends Block {
|
||||
}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
if (!world.isStatic && entityhuman.bE() != null && entityhuman.bE().getItem() == Items.SHEARS) {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.b((Block) this)], 1);
|
||||
if (!world.isStatic && entityhuman.bF() != null && entityhuman.bF().getItem() == Items.SHEARS) {
|
||||
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)], 1);
|
||||
this.a(world, i, j, k, new ItemStack(Blocks.VINE, 1, 0));
|
||||
} else {
|
||||
super.a(world, entityhuman, i, j, k, l);
|
||||
|
@ -35,7 +35,7 @@ public class Chunk {
|
||||
public boolean m;
|
||||
public boolean n;
|
||||
public boolean o;
|
||||
public long p;
|
||||
public long lastSaved;
|
||||
public boolean q;
|
||||
public int r;
|
||||
public long s;
|
||||
@ -167,7 +167,7 @@ public class Chunk {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public ChunkSection[] i() {
|
||||
public ChunkSection[] getSections() {
|
||||
return this.sections;
|
||||
}
|
||||
|
||||
@ -737,7 +737,7 @@ public class Chunk {
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
entity.W();
|
||||
entity.X();
|
||||
}
|
||||
|
||||
this.world.a(this.entitySlices[i]);
|
||||
@ -791,7 +791,7 @@ public class Chunk {
|
||||
|
||||
if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
|
||||
list.add(entity1);
|
||||
Entity[] aentity = entity1.as();
|
||||
Entity[] aentity = entity1.at();
|
||||
|
||||
if (aentity != null) {
|
||||
for (int i1 = 0; i1 < aentity.length; ++i1) {
|
||||
@ -828,10 +828,10 @@ public class Chunk {
|
||||
|
||||
public boolean a(boolean flag) {
|
||||
if (flag) {
|
||||
if (this.o && this.world.getTime() != this.p || this.n) {
|
||||
if (this.o && this.world.getTime() != this.lastSaved || this.n) {
|
||||
return true;
|
||||
}
|
||||
} else if (this.o && this.world.getTime() >= this.p + 600L) {
|
||||
} else if (this.o && this.world.getTime() >= this.lastSaved + 600L) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -846,7 +846,7 @@ public class Chunk {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void a(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
|
||||
public void loadNearby(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
|
||||
if (!this.done && ichunkprovider.isChunkLoaded(i + 1, j + 1) && ichunkprovider.isChunkLoaded(i, j + 1) && ichunkprovider.isChunkLoaded(i + 1, j)) {
|
||||
ichunkprovider.getChunkAt(ichunkprovider1, i, j);
|
||||
}
|
||||
@ -901,7 +901,7 @@ public class Chunk {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean k() {
|
||||
public boolean isReady() {
|
||||
return this.m && this.done && this.lit;
|
||||
}
|
||||
|
||||
@ -933,7 +933,7 @@ public class Chunk {
|
||||
this.sections = achunksection;
|
||||
}
|
||||
|
||||
public BiomeBase a(int i, int j, WorldChunkManager worldchunkmanager) {
|
||||
public BiomeBase getBiome(int i, int j, WorldChunkManager worldchunkmanager) {
|
||||
int k = this.v[j << 4 | i] & 255;
|
||||
|
||||
if (k == 255) {
|
||||
|
@ -186,7 +186,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
chunk.a(this, this, i, j);
|
||||
chunk.loadNearby(this, this, i, j);
|
||||
}
|
||||
|
||||
return chunk;
|
||||
@ -217,7 +217,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
Chunk chunk = this.f.a(this.world, i, j);
|
||||
|
||||
if (chunk != null) {
|
||||
chunk.p = this.world.getTime();
|
||||
chunk.lastSaved = this.world.getTime();
|
||||
if (this.chunkProvider != null) {
|
||||
this.chunkProvider.recreateStructures(i, j);
|
||||
}
|
||||
@ -244,7 +244,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
public void saveChunk(Chunk chunk) { // CraftBukkit - private -> public
|
||||
if (this.f != null) {
|
||||
try {
|
||||
chunk.p = this.world.getTime();
|
||||
chunk.lastSaved = this.world.getTime();
|
||||
this.f.a(this.world, chunk);
|
||||
// CraftBukkit start - IOException to Exception
|
||||
} catch (Exception ioexception) {
|
||||
|
@ -215,7 +215,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
nbttagcompound.setBoolean("TerrainPopulated", chunk.done);
|
||||
nbttagcompound.setBoolean("LightPopulated", chunk.lit);
|
||||
nbttagcompound.setLong("InhabitedTime", chunk.s);
|
||||
ChunkSection[] achunksection = chunk.i();
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
boolean flag = !world.worldProvider.g;
|
||||
ChunkSection[] achunksection1 = achunksection;
|
||||
@ -292,7 +292,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
NextTickListEntry nextticklistentry = (NextTickListEntry) iterator1.next();
|
||||
NBTTagCompound nbttagcompound2 = new NBTTagCompound();
|
||||
|
||||
nbttagcompound2.setInt("i", Block.b(nextticklistentry.a()));
|
||||
nbttagcompound2.setInt("i", Block.getId(nextticklistentry.a()));
|
||||
nbttagcompound2.setInt("x", nextticklistentry.a);
|
||||
nbttagcompound2.setInt("y", nextticklistentry.b);
|
||||
nbttagcompound2.setInt("z", nextticklistentry.c);
|
||||
@ -396,7 +396,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
for (int j1 = 0; j1 < nbttaglist3.size(); ++j1) {
|
||||
NBTTagCompound nbttagcompound5 = nbttaglist3.get(j1);
|
||||
|
||||
world.b(nbttagcompound5.getInt("x"), nbttagcompound5.getInt("y"), nbttagcompound5.getInt("z"), Block.e(nbttagcompound5.getInt("i")), nbttagcompound5.getInt("t"), nbttagcompound5.getInt("p"));
|
||||
world.b(nbttagcompound5.getInt("x"), nbttagcompound5.getInt("y"), nbttagcompound5.getInt("z"), Block.getById(nbttagcompound5.getInt("i")), nbttagcompound5.getInt("t"), nbttagcompound5.getInt("p"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class ChunkSection {
|
||||
id |= this.extBlockIds.a(i, j, k) << 8;
|
||||
}
|
||||
|
||||
return Block.e(id); // Should be getBlockForId
|
||||
return Block.getById(id);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -95,7 +95,7 @@ public class ChunkSection {
|
||||
l |= this.extBlockIds.a(i, j, k) << 8;
|
||||
}
|
||||
|
||||
return Block.e(l);
|
||||
return Block.getById(l);
|
||||
}
|
||||
|
||||
public void setTypeId(int i, int j, int k, Block block) {
|
||||
@ -120,7 +120,7 @@ public class ChunkSection {
|
||||
}
|
||||
}
|
||||
|
||||
int i1 = Block.b(block);
|
||||
int i1 = Block.getId(block);
|
||||
|
||||
// CraftBukkit start - Compact storage
|
||||
if (this.blockIds == null) {
|
||||
@ -226,7 +226,7 @@ public class ChunkSection {
|
||||
if (this.extBlockIds == null) {
|
||||
id |= this.compactExtId << 8;
|
||||
if (id > 0) {
|
||||
Block block = Block.e(id); // Should be getBlockForId
|
||||
Block block = Block.getById(id);
|
||||
if (block == null) {
|
||||
this.compactId = 0;
|
||||
this.compactExtId = 0;
|
||||
@ -243,7 +243,7 @@ public class ChunkSection {
|
||||
byte extid = ext[off2];
|
||||
int l = (id & 0xFF) | ((extid & 0xF) << 8); // Even data
|
||||
if (l > 0) {
|
||||
Block block = Block.e(l); // Should be getBlockForId
|
||||
Block block = Block.getById(l);
|
||||
if (block == null) {
|
||||
this.compactId = 0;
|
||||
ext[off2] &= 0xF0;
|
||||
@ -257,7 +257,7 @@ public class ChunkSection {
|
||||
off++;
|
||||
l = (id & 0xFF) | ((extid & 0xF0) << 4); // Odd data
|
||||
if (l > 0) {
|
||||
Block block = Block.e(l); // Should be getBlockForId
|
||||
Block block = Block.getById(l);
|
||||
if (block == null) {
|
||||
this.compactId = 0;
|
||||
ext[off2] &= 0x0F;
|
||||
@ -278,11 +278,11 @@ public class ChunkSection {
|
||||
for (int off = 0; off < blkIds.length; off++) {
|
||||
int l = blkIds[off] & 0xFF;
|
||||
if (l > 0) {
|
||||
if (Block.e(l) == null) {
|
||||
if (Block.getById(l) == null) {
|
||||
blkIds[off] = 0;
|
||||
} else {
|
||||
++cntNonEmpty;
|
||||
if (Block.e(l).isTicking()) {
|
||||
if (Block.getById(l).isTicking()) {
|
||||
++cntTicking;
|
||||
}
|
||||
}
|
||||
@ -294,12 +294,12 @@ public class ChunkSection {
|
||||
byte extid = ext[off2];
|
||||
int l = (blkIds[off] & 0xFF) | ((extid & 0xF) << 8); // Even data
|
||||
if (l > 0) {
|
||||
if (Block.e(l) == null) {
|
||||
if (Block.getById(l) == null) {
|
||||
blkIds[off] = 0;
|
||||
ext[off2] &= 0xF0;
|
||||
} else {
|
||||
++cntNonEmpty;
|
||||
if (Block.e(l).isTicking()) {
|
||||
if (Block.getById(l).isTicking()) {
|
||||
++cntTicking;
|
||||
}
|
||||
}
|
||||
@ -307,12 +307,12 @@ public class ChunkSection {
|
||||
off++;
|
||||
l = (blkIds[off] & 0xFF) | ((extid & 0xF0) << 4); // Odd data
|
||||
if (l > 0) {
|
||||
if (Block.e(l) == null) {
|
||||
if (Block.getById(l) == null) {
|
||||
blkIds[off] = 0;
|
||||
ext[off2] &= 0x0F;
|
||||
} else {
|
||||
++cntNonEmpty;
|
||||
if (Block.e(l).isTicking()) {
|
||||
if (Block.getById(l).isTicking()) {
|
||||
++cntTicking;
|
||||
}
|
||||
}
|
||||
|
@ -61,11 +61,11 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
return i <= 2;
|
||||
}
|
||||
|
||||
public void a(String s) {
|
||||
public void setCommand(String s) {
|
||||
this.e = s;
|
||||
}
|
||||
|
||||
public String i() {
|
||||
public String getCommand() {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
@ -211,13 +211,13 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
return new ChatComponentText(this.getName());
|
||||
}
|
||||
|
||||
public void b(String s) {
|
||||
public void setName(String s) {
|
||||
this.f = s;
|
||||
}
|
||||
|
||||
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
|
||||
if (this.c && this.getWorld() != null && !this.getWorld().isStatic) {
|
||||
this.d = (new ChatComponentText("[" + a.format(new Date()) + "] ")).a(ichatbasecomponent);
|
||||
this.d = (new ChatComponentText("[" + a.format(new Date()) + "] ")).addSibling(ichatbasecomponent);
|
||||
this.e();
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public abstract class Container {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Slot a(IInventory iinventory, int i) {
|
||||
public Slot getSlot(IInventory iinventory, int i) {
|
||||
for (int j = 0; j < this.c.size(); ++j) {
|
||||
Slot slot = (Slot) this.c.get(j);
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class ContainerChest extends Container {
|
||||
|
||||
public void b(EntityHuman entityhuman) {
|
||||
super.b(entityhuman);
|
||||
this.container.l_();
|
||||
this.container.closeContainer();
|
||||
}
|
||||
|
||||
public IInventory e() {
|
||||
|
@ -80,6 +80,6 @@ public class ContainerHopper extends Container {
|
||||
|
||||
public void b(EntityHuman entityhuman) {
|
||||
super.b(entityhuman);
|
||||
this.hopper.l_();
|
||||
this.hopper.closeContainer();
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +99,6 @@ public class ContainerHorse extends Container {
|
||||
|
||||
public void b(EntityHuman entityhuman) {
|
||||
super.b(entityhuman);
|
||||
this.a.l_();
|
||||
this.a.closeContainer();
|
||||
}
|
||||
}
|
||||
|
@ -28,9 +28,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
private RemoteStatusListener k;
|
||||
private RemoteControlListener l;
|
||||
public PropertyManager propertyManager; // CraftBukkit - private -> public
|
||||
private EULA n;
|
||||
private boolean generateStructures;
|
||||
private EnumGamemode o;
|
||||
private boolean p;
|
||||
private EnumGamemode p;
|
||||
private boolean q;
|
||||
|
||||
// CraftBukkit start - Signature changed
|
||||
public DedicatedServer(joptsimple.OptionSet options) {
|
||||
@ -67,147 +68,154 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
|
||||
// CraftBukkit end
|
||||
|
||||
i.info("Starting minecraft server version 1.7.9");
|
||||
i.info("Starting minecraft server version 1.7.10");
|
||||
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||
i.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
|
||||
i.info("Loading properties");
|
||||
this.propertyManager = new PropertyManager(this.options); // CraftBukkit - CLI argument support
|
||||
if (this.N()) {
|
||||
this.c("127.0.0.1");
|
||||
} else {
|
||||
this.setOnlineMode(this.propertyManager.getBoolean("online-mode", true));
|
||||
this.c(this.propertyManager.getString("server-ip", ""));
|
||||
}
|
||||
|
||||
this.setSpawnAnimals(this.propertyManager.getBoolean("spawn-animals", true));
|
||||
this.setSpawnNPCs(this.propertyManager.getBoolean("spawn-npcs", true));
|
||||
this.setPvP(this.propertyManager.getBoolean("pvp", true));
|
||||
this.setAllowFlight(this.propertyManager.getBoolean("allow-flight", false));
|
||||
this.setTexturePack(this.propertyManager.getString("resource-pack", ""));
|
||||
this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server"));
|
||||
this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false));
|
||||
this.setIdleTimeout(this.propertyManager.getInt("player-idle-timeout", 0));
|
||||
if (this.propertyManager.getInt("difficulty", 1) < 0) {
|
||||
this.propertyManager.a("difficulty", Integer.valueOf(0));
|
||||
} else if (this.propertyManager.getInt("difficulty", 1) > 3) {
|
||||
this.propertyManager.a("difficulty", Integer.valueOf(3));
|
||||
}
|
||||
|
||||
this.generateStructures = this.propertyManager.getBoolean("generate-structures", true);
|
||||
int gamemode = this.propertyManager.getInt("gamemode", EnumGamemode.SURVIVAL.a()); // CraftBukkit - Unique name to avoid stomping on logger
|
||||
|
||||
this.o = WorldSettings.a(gamemode); // CraftBukkit - Use new name
|
||||
i.info("Default game type: " + this.o);
|
||||
InetAddress inetaddress = null;
|
||||
|
||||
if (this.getServerIp().length() > 0) {
|
||||
inetaddress = InetAddress.getByName(this.getServerIp());
|
||||
}
|
||||
|
||||
if (this.L() < 0) {
|
||||
this.setPort(this.propertyManager.getInt("server-port", 25565));
|
||||
}
|
||||
|
||||
i.info("Generating keypair");
|
||||
this.a(MinecraftEncryption.b());
|
||||
i.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.L());
|
||||
|
||||
try {
|
||||
this.ai().a(inetaddress, this.L());
|
||||
} catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
|
||||
i.warn("**** FAILED TO BIND TO PORT!");
|
||||
i.warn("The exception was: {}", new Object[] { ioexception.toString()});
|
||||
i.warn("Perhaps a server is already running on that port?");
|
||||
return false;
|
||||
}
|
||||
|
||||
this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit
|
||||
|
||||
if (!this.getOnlineMode()) {
|
||||
i.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
i.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
i.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
i.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
|
||||
if (this.aE()) {
|
||||
this.getUserCache().c();
|
||||
}
|
||||
|
||||
if (!NameReferencingFileConverter.a(this.propertyManager)) {
|
||||
this.n = new EULA(new File("eula.txt"));
|
||||
if (!this.n.a()) {
|
||||
i.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
|
||||
this.n.b();
|
||||
return false;
|
||||
} else {
|
||||
// this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit - moved up
|
||||
this.convertable = new WorldLoaderServer(server.getWorldContainer()); // CraftBukkit - moved from MinecraftServer constructor
|
||||
long j = System.nanoTime();
|
||||
|
||||
if (this.O() == null) {
|
||||
this.k(this.propertyManager.getString("level-name", "world"));
|
||||
if (this.N()) {
|
||||
this.c("127.0.0.1");
|
||||
} else {
|
||||
this.setOnlineMode(this.propertyManager.getBoolean("online-mode", true));
|
||||
this.c(this.propertyManager.getString("server-ip", ""));
|
||||
}
|
||||
|
||||
String s = this.propertyManager.getString("level-seed", "");
|
||||
String s1 = this.propertyManager.getString("level-type", "DEFAULT");
|
||||
String s2 = this.propertyManager.getString("generator-settings", "");
|
||||
long k = (new Random()).nextLong();
|
||||
this.setSpawnAnimals(this.propertyManager.getBoolean("spawn-animals", true));
|
||||
this.setSpawnNPCs(this.propertyManager.getBoolean("spawn-npcs", true));
|
||||
this.setPvP(this.propertyManager.getBoolean("pvp", true));
|
||||
this.setAllowFlight(this.propertyManager.getBoolean("allow-flight", false));
|
||||
this.setTexturePack(this.propertyManager.getString("resource-pack", ""));
|
||||
this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server"));
|
||||
this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false));
|
||||
this.setIdleTimeout(this.propertyManager.getInt("player-idle-timeout", 0));
|
||||
if (this.propertyManager.getInt("difficulty", 1) < 0) {
|
||||
this.propertyManager.setProperty("difficulty", Integer.valueOf(0));
|
||||
} else if (this.propertyManager.getInt("difficulty", 1) > 3) {
|
||||
this.propertyManager.setProperty("difficulty", Integer.valueOf(3));
|
||||
}
|
||||
|
||||
if (s.length() > 0) {
|
||||
try {
|
||||
long l = Long.parseLong(s);
|
||||
this.generateStructures = this.propertyManager.getBoolean("generate-structures", true);
|
||||
int gamemode = this.propertyManager.getInt("gamemode", EnumGamemode.SURVIVAL.getId()); // CraftBukkit - Unique name to avoid stomping on logger
|
||||
|
||||
if (l != 0L) {
|
||||
k = l;
|
||||
}
|
||||
} catch (NumberFormatException numberformatexception) {
|
||||
k = (long) s.hashCode();
|
||||
this.p = WorldSettings.a(gamemode); // CraftBukkit - Use new name
|
||||
i.info("Default game type: " + this.p);
|
||||
InetAddress inetaddress = null;
|
||||
|
||||
if (this.getServerIp().length() > 0) {
|
||||
inetaddress = InetAddress.getByName(this.getServerIp());
|
||||
}
|
||||
|
||||
if (this.L() < 0) {
|
||||
this.setPort(this.propertyManager.getInt("server-port", 25565));
|
||||
}
|
||||
|
||||
i.info("Generating keypair");
|
||||
this.a(MinecraftEncryption.b());
|
||||
i.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.L());
|
||||
|
||||
try {
|
||||
this.ai().a(inetaddress, this.L());
|
||||
} catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
|
||||
i.warn("**** FAILED TO BIND TO PORT!");
|
||||
i.warn("The exception was: {}", new Object[] { ioexception.toString()});
|
||||
i.warn("Perhaps a server is already running on that port?");
|
||||
return false;
|
||||
}
|
||||
|
||||
this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit
|
||||
|
||||
if (!this.getOnlineMode()) {
|
||||
i.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
i.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
i.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
i.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
|
||||
if (this.aE()) {
|
||||
this.getUserCache().c();
|
||||
}
|
||||
|
||||
if (!NameReferencingFileConverter.a(this.propertyManager)) {
|
||||
return false;
|
||||
} else {
|
||||
// this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit - moved up
|
||||
this.convertable = new WorldLoaderServer(server.getWorldContainer()); // CraftBukkit - moved from MinecraftServer constructor
|
||||
long j = System.nanoTime();
|
||||
|
||||
if (this.O() == null) {
|
||||
this.k(this.propertyManager.getString("level-name", "world"));
|
||||
}
|
||||
|
||||
String s = this.propertyManager.getString("level-seed", "");
|
||||
String s1 = this.propertyManager.getString("level-type", "DEFAULT");
|
||||
String s2 = this.propertyManager.getString("generator-settings", "");
|
||||
long k = (new Random()).nextLong();
|
||||
|
||||
if (s.length() > 0) {
|
||||
try {
|
||||
long l = Long.parseLong(s);
|
||||
|
||||
if (l != 0L) {
|
||||
k = l;
|
||||
}
|
||||
} catch (NumberFormatException numberformatexception) {
|
||||
k = (long) s.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
WorldType worldtype = WorldType.getType(s1);
|
||||
|
||||
if (worldtype == null) {
|
||||
worldtype = WorldType.NORMAL;
|
||||
}
|
||||
|
||||
this.at();
|
||||
this.getEnableCommandBlock();
|
||||
this.l();
|
||||
this.getSnooperEnabled();
|
||||
this.c(this.propertyManager.getInt("max-build-height", 256));
|
||||
this.c((this.getMaxBuildHeight() + 8) / 16 * 16);
|
||||
this.c(MathHelper.a(this.getMaxBuildHeight(), 64, 256));
|
||||
this.propertyManager.setProperty("max-build-height", Integer.valueOf(this.getMaxBuildHeight()));
|
||||
i.info("Preparing level \"" + this.O() + "\"");
|
||||
this.a(this.O(), this.O(), k, worldtype, s2);
|
||||
long i1 = System.nanoTime() - j;
|
||||
String s3 = String.format("%.3fs", new Object[] { Double.valueOf((double) i1 / 1.0E9D)});
|
||||
|
||||
i.info("Done (" + s3 + ")! For help, type \"help\" or \"?\"");
|
||||
if (this.propertyManager.getBoolean("enable-query", false)) {
|
||||
i.info("Starting GS4 status listener");
|
||||
this.k = new RemoteStatusListener(this);
|
||||
this.k.a();
|
||||
}
|
||||
|
||||
if (this.propertyManager.getBoolean("enable-rcon", false)) {
|
||||
i.info("Starting remote control listener");
|
||||
this.l = new RemoteControlListener(this);
|
||||
this.l.a();
|
||||
this.remoteConsole = new org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender(); // CraftBukkit
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
if (this.server.getBukkitSpawnRadius() > -1) {
|
||||
i.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
|
||||
this.propertyManager.properties.remove("spawn-protection");
|
||||
this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
|
||||
this.server.removeBukkitSpawnRadius();
|
||||
this.propertyManager.savePropertiesFile();
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
WorldType worldtype = WorldType.getType(s1);
|
||||
|
||||
if (worldtype == null) {
|
||||
worldtype = WorldType.NORMAL;
|
||||
}
|
||||
|
||||
this.at();
|
||||
this.getEnableCommandBlock();
|
||||
this.l();
|
||||
this.getSnooperEnabled();
|
||||
this.c(this.propertyManager.getInt("max-build-height", 256));
|
||||
this.c((this.getMaxBuildHeight() + 8) / 16 * 16);
|
||||
this.c(MathHelper.a(this.getMaxBuildHeight(), 64, 256));
|
||||
this.propertyManager.a("max-build-height", Integer.valueOf(this.getMaxBuildHeight()));
|
||||
i.info("Preparing level \"" + this.O() + "\"");
|
||||
this.a(this.O(), this.O(), k, worldtype, s2);
|
||||
long i1 = System.nanoTime() - j;
|
||||
String s3 = String.format("%.3fs", new Object[] { Double.valueOf((double) i1 / 1.0E9D)});
|
||||
|
||||
i.info("Done (" + s3 + ")! For help, type \"help\" or \"?\"");
|
||||
if (this.propertyManager.getBoolean("enable-query", false)) {
|
||||
i.info("Starting GS4 status listener");
|
||||
this.k = new RemoteStatusListener(this);
|
||||
this.k.a();
|
||||
}
|
||||
|
||||
if (this.propertyManager.getBoolean("enable-rcon", false)) {
|
||||
i.info("Starting remote control listener");
|
||||
this.l = new RemoteControlListener(this);
|
||||
this.l.a();
|
||||
this.remoteConsole = new org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender(); // CraftBukkit
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
if (this.server.getBukkitSpawnRadius() > -1) {
|
||||
i.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
|
||||
this.propertyManager.properties.remove("spawn-protection");
|
||||
this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
|
||||
this.server.removeBukkitSpawnRadius();
|
||||
this.propertyManager.savePropertiesFile();
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -222,28 +230,18 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public EnumGamemode getGamemode() {
|
||||
return this.o;
|
||||
return this.p;
|
||||
}
|
||||
|
||||
public EnumDifficulty getDifficulty() {
|
||||
return EnumDifficulty.a(this.propertyManager.getInt("difficulty", 1));
|
||||
return EnumDifficulty.getById(this.propertyManager.getInt("difficulty", 1));
|
||||
}
|
||||
|
||||
public boolean isHardcore() {
|
||||
return this.propertyManager.getBoolean("hardcore", false);
|
||||
}
|
||||
|
||||
protected void a(CrashReport crashreport) {
|
||||
while (this.isRunning()) {
|
||||
this.aB();
|
||||
|
||||
try {
|
||||
Thread.sleep(10L);
|
||||
} catch (InterruptedException interruptedexception) {
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void a(CrashReport crashreport) {}
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
crashreport = super.b(crashreport);
|
||||
@ -319,7 +317,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public void a(String s, Object object) {
|
||||
this.propertyManager.a(s, object);
|
||||
this.propertyManager.setProperty(s, object);
|
||||
}
|
||||
|
||||
public void a() {
|
||||
@ -334,11 +332,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
||||
public void aD() {
|
||||
ServerGUI.a(this);
|
||||
this.p = true;
|
||||
this.q = true;
|
||||
}
|
||||
|
||||
public boolean ak() {
|
||||
return this.p;
|
||||
return this.q;
|
||||
}
|
||||
|
||||
public String a(EnumGamemode enumgamemode, boolean flag) {
|
||||
@ -356,7 +354,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
|
||||
if (world.worldProvider.dimension != 0) {
|
||||
return false;
|
||||
} else if (this.aC().getOPs().d()) {
|
||||
} else if (this.aC().getOPs().isEmpty()) {
|
||||
return false;
|
||||
} else if (this.aC().isOp(entityhuman.getProfile())) {
|
||||
return false;
|
||||
@ -378,7 +376,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
||||
public void setIdleTimeout(int i) {
|
||||
super.setIdleTimeout(i);
|
||||
this.propertyManager.a("player-idle-timeout", Integer.valueOf(i));
|
||||
this.propertyManager.setProperty("player-idle-timeout", Integer.valueOf(i));
|
||||
this.a();
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public abstract class Entity {
|
||||
public boolean k;
|
||||
public Entity passenger;
|
||||
public Entity vehicle;
|
||||
public boolean n;
|
||||
public boolean attachedToPlayer;
|
||||
public World world;
|
||||
public double lastX;
|
||||
public double lastY;
|
||||
@ -238,10 +238,10 @@ public abstract class Entity {
|
||||
}
|
||||
|
||||
public void h() {
|
||||
this.B();
|
||||
this.C();
|
||||
}
|
||||
|
||||
public void B() {
|
||||
public void C() {
|
||||
this.world.methodProfiler.a("entityBaseTick");
|
||||
if (this.vehicle != null && this.vehicle.dead) {
|
||||
this.vehicle = null;
|
||||
@ -259,12 +259,12 @@ public abstract class Entity {
|
||||
this.world.methodProfiler.a("portal");
|
||||
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
|
||||
|
||||
i = this.C();
|
||||
i = this.D();
|
||||
if (this.an) {
|
||||
if (true || minecraftserver.getAllowNether()) { // CraftBukkit
|
||||
if (this.vehicle == null && this.ao++ >= i) {
|
||||
this.ao = i;
|
||||
this.portalCooldown = this.ah();
|
||||
this.portalCooldown = this.ai();
|
||||
byte b0;
|
||||
|
||||
if (this.world.worldProvider.dimension == -1) {
|
||||
@ -295,7 +295,7 @@ public abstract class Entity {
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
if (this.isSprinting() && !this.L()) {
|
||||
if (this.isSprinting() && !this.M()) {
|
||||
int j = MathHelper.floor(this.locX);
|
||||
|
||||
i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height);
|
||||
@ -303,11 +303,11 @@ public abstract class Entity {
|
||||
Block block = this.world.getType(j, i, k);
|
||||
|
||||
if (block.getMaterial() != Material.AIR) {
|
||||
this.world.addParticle("blockcrack_" + Block.b(block) + "_" + this.world.getData(j, i, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D);
|
||||
this.world.addParticle("blockcrack_" + Block.getId(block) + "_" + this.world.getData(j, i, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D);
|
||||
}
|
||||
}
|
||||
|
||||
this.M();
|
||||
this.N();
|
||||
if (this.world.isStatic) {
|
||||
this.fireTicks = 0;
|
||||
} else if (this.fireTicks > 0) {
|
||||
@ -325,13 +325,13 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.O()) {
|
||||
this.D();
|
||||
if (this.P()) {
|
||||
this.E();
|
||||
this.fallDistance *= 0.5F;
|
||||
}
|
||||
|
||||
if (this.locY < -64.0D) {
|
||||
this.F();
|
||||
this.G();
|
||||
}
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
@ -342,11 +342,11 @@ public abstract class Entity {
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
public int C() {
|
||||
public int D() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected void D() {
|
||||
protected void E() {
|
||||
if (!this.fireProof) {
|
||||
this.damageEntity(DamageSource.LAVA, 4);
|
||||
|
||||
@ -388,7 +388,7 @@ public abstract class Entity {
|
||||
this.fireTicks = 0;
|
||||
}
|
||||
|
||||
protected void F() {
|
||||
protected void G() {
|
||||
this.die();
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ public abstract class Entity {
|
||||
// CraftBukkit start - Don't do anything if we aren't moving
|
||||
// We need to do this regardless of whether or not we are moving thanks to portals
|
||||
try {
|
||||
this.H();
|
||||
this.I();
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision");
|
||||
@ -666,14 +666,14 @@ public abstract class Entity {
|
||||
this.Q = (float) ((double) this.Q + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D);
|
||||
if (this.Q > (float) this.d && block.getMaterial() != Material.AIR) {
|
||||
this.d = (int) this.Q + 1;
|
||||
if (this.L()) {
|
||||
if (this.M()) {
|
||||
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.35F;
|
||||
|
||||
if (f > 1.0F) {
|
||||
f = 1.0F;
|
||||
}
|
||||
|
||||
this.makeSound(this.G(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
this.makeSound(this.H(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
}
|
||||
|
||||
this.a(l, k, i1, block);
|
||||
@ -684,7 +684,7 @@ public abstract class Entity {
|
||||
// CraftBukkit start - Move to the top of the method
|
||||
/*
|
||||
try {
|
||||
this.H();
|
||||
this.I();
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision");
|
||||
@ -694,7 +694,7 @@ public abstract class Entity {
|
||||
}
|
||||
*/
|
||||
// CraftBukkit end
|
||||
boolean flag2 = this.K();
|
||||
boolean flag2 = this.L();
|
||||
|
||||
if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) {
|
||||
this.burn(1);
|
||||
@ -726,11 +726,11 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected String G() {
|
||||
protected String H() {
|
||||
return "game.neutral.swim";
|
||||
}
|
||||
|
||||
protected void H() {
|
||||
protected void I() {
|
||||
int i = MathHelper.floor(this.boundingBox.a + 0.001D);
|
||||
int j = MathHelper.floor(this.boundingBox.b + 0.001D);
|
||||
int k = MathHelper.floor(this.boundingBox.c + 0.001D);
|
||||
@ -789,7 +789,7 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public AxisAlignedBB I() {
|
||||
public AxisAlignedBB J() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -809,15 +809,15 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean K() {
|
||||
public boolean L() {
|
||||
return this.inWater || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
|
||||
}
|
||||
|
||||
public boolean L() {
|
||||
public boolean M() {
|
||||
return this.inWater;
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean N() {
|
||||
if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) {
|
||||
if (!this.inWater && !this.justCreated) {
|
||||
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F;
|
||||
@ -826,7 +826,7 @@ public abstract class Entity {
|
||||
f = 1.0F;
|
||||
}
|
||||
|
||||
this.makeSound(this.N(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
this.makeSound(this.O(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
float f1 = (float) MathHelper.floor(this.boundingBox.b);
|
||||
|
||||
int i;
|
||||
@ -856,7 +856,7 @@ public abstract class Entity {
|
||||
return this.inWater;
|
||||
}
|
||||
|
||||
protected String N() {
|
||||
protected String O() {
|
||||
return "game.neutral.swim.splash";
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ public abstract class Entity {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public boolean O() {
|
||||
public boolean P() {
|
||||
return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
|
||||
}
|
||||
|
||||
@ -1030,7 +1030,7 @@ public abstract class Entity {
|
||||
this.al = true;
|
||||
}
|
||||
|
||||
protected void P() {
|
||||
protected void Q() {
|
||||
this.velocityChanged = true;
|
||||
}
|
||||
|
||||
@ -1038,23 +1038,23 @@ public abstract class Entity {
|
||||
if (this.isInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
this.P();
|
||||
this.Q();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean R() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean S() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void b(Entity entity, int i) {}
|
||||
|
||||
public boolean c(NBTTagCompound nbttagcompound) {
|
||||
String s = this.V();
|
||||
String s = this.W();
|
||||
|
||||
if (!this.dead && s != null) {
|
||||
nbttagcompound.setString("id", s);
|
||||
@ -1066,7 +1066,7 @@ public abstract class Entity {
|
||||
}
|
||||
|
||||
public boolean d(NBTTagCompound nbttagcompound) {
|
||||
String s = this.V();
|
||||
String s = this.W();
|
||||
|
||||
if (!this.dead && s != null && this.passenger == null) {
|
||||
nbttagcompound.setString("id", s);
|
||||
@ -1167,7 +1167,7 @@ public abstract class Entity {
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.b(this.yaw, this.pitch);
|
||||
this.a(nbttagcompound);
|
||||
if (this.U()) {
|
||||
if (this.V()) {
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
}
|
||||
|
||||
@ -1231,11 +1231,11 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean U() {
|
||||
protected boolean V() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected final String V() {
|
||||
protected final String W() {
|
||||
return EntityTypes.b(this);
|
||||
}
|
||||
|
||||
@ -1243,7 +1243,7 @@ public abstract class Entity {
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
|
||||
public void W() {}
|
||||
public void X() {}
|
||||
|
||||
protected NBTTagList a(double... adouble) {
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
@ -1329,7 +1329,7 @@ public abstract class Entity {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void aa() {
|
||||
public void ab() {
|
||||
if (this.vehicle.dead) {
|
||||
this.vehicle = null;
|
||||
} else {
|
||||
@ -1338,7 +1338,7 @@ public abstract class Entity {
|
||||
this.motZ = 0.0D;
|
||||
this.h();
|
||||
if (this.vehicle != null) {
|
||||
this.vehicle.ab();
|
||||
this.vehicle.ac();
|
||||
this.h += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
|
||||
|
||||
for (this.g += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.h >= 180.0D; this.h -= 360.0D) {
|
||||
@ -1383,17 +1383,17 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void ab() {
|
||||
public void ac() {
|
||||
if (this.passenger != null) {
|
||||
this.passenger.setPosition(this.locX, this.locY + this.ad() + this.passenger.ac(), this.locZ);
|
||||
this.passenger.setPosition(this.locX, this.locY + this.ad() + this.passenger.ad(), this.locZ);
|
||||
}
|
||||
}
|
||||
|
||||
public double ac() {
|
||||
public double ad() {
|
||||
return (double) this.height;
|
||||
}
|
||||
|
||||
public double ad() {
|
||||
public double ae() {
|
||||
return (double) this.length * 0.75D;
|
||||
}
|
||||
|
||||
@ -1487,17 +1487,17 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public float ae() {
|
||||
public float af() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
public Vec3D af() {
|
||||
public Vec3D ag() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void ag() {
|
||||
public void ah() {
|
||||
if (this.portalCooldown > 0) {
|
||||
this.portalCooldown = this.ah();
|
||||
this.portalCooldown = this.ai();
|
||||
} else {
|
||||
double d0 = this.lastX - this.locX;
|
||||
double d1 = this.lastZ - this.locZ;
|
||||
@ -1510,7 +1510,7 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public int ah() {
|
||||
public int ai() {
|
||||
return 300;
|
||||
}
|
||||
|
||||
@ -1526,7 +1526,7 @@ public abstract class Entity {
|
||||
return !this.fireProof && (this.fireTicks > 0 || flag && this.g(0));
|
||||
}
|
||||
|
||||
public boolean al() {
|
||||
public boolean am() {
|
||||
return this.vehicle != null;
|
||||
}
|
||||
|
||||
@ -1706,7 +1706,7 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void ar() {
|
||||
public void as() {
|
||||
this.I = true;
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
@ -1721,7 +1721,7 @@ public abstract class Entity {
|
||||
return LocaleI18n.get("entity." + s + ".name");
|
||||
}
|
||||
|
||||
public Entity[] as() {
|
||||
public Entity[] at() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1733,7 +1733,7 @@ public abstract class Entity {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public boolean au() {
|
||||
public boolean av() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1855,15 +1855,15 @@ public abstract class Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int aw() {
|
||||
public int ax() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int ax() {
|
||||
public int ay() {
|
||||
return this.aq;
|
||||
}
|
||||
|
||||
public boolean ay() {
|
||||
public boolean az() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1880,7 +1880,7 @@ public abstract class Entity {
|
||||
return this.uniqueID;
|
||||
}
|
||||
|
||||
public boolean aB() {
|
||||
public boolean aC() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
for (j = 0; j < list.size(); ++j) {
|
||||
Entity entity1 = (Entity) list.get(j);
|
||||
|
||||
if (entity1.Q() && (entity1 != this.shooter || this.au >= 5)) {
|
||||
if (entity1.R() && (entity1 != this.shooter || this.au >= 5)) {
|
||||
f1 = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.grow((double) f1, (double) f1, (double) f1);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1);
|
||||
@ -244,7 +244,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
EntityLiving entityliving = (EntityLiving) movingobjectposition.entity;
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
entityliving.p(entityliving.aY() + 1);
|
||||
entityliving.p(entityliving.aZ() + 1);
|
||||
}
|
||||
|
||||
if (this.knockbackStrength > 0) {
|
||||
@ -332,7 +332,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
float f4 = 0.99F;
|
||||
|
||||
f1 = 0.05F;
|
||||
if (this.L()) {
|
||||
if (this.M()) {
|
||||
for (int l = 0; l < 4; ++l) {
|
||||
f3 = 0.25F;
|
||||
this.world.addParticle("bubble", this.locX - this.motX * (double) f3, this.locY - this.motY * (double) f3, this.locZ - this.motZ * (double) f3, this.motX, this.motY, this.motZ);
|
||||
@ -341,7 +341,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
f4 = 0.8F;
|
||||
}
|
||||
|
||||
if (this.K()) {
|
||||
if (this.L()) {
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
this.motZ *= (double) f4;
|
||||
this.motY -= (double) f1;
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.H();
|
||||
this.I();
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
nbttagcompound.setShort("yTile", (short) this.e);
|
||||
nbttagcompound.setShort("zTile", (short) this.f);
|
||||
nbttagcompound.setShort("life", (short) this.at);
|
||||
nbttagcompound.setByte("inTile", (byte) Block.b(this.g));
|
||||
nbttagcompound.setByte("inTile", (byte) Block.getId(this.g));
|
||||
nbttagcompound.setByte("inData", (byte) this.h);
|
||||
nbttagcompound.setByte("shake", (byte) this.shake);
|
||||
nbttagcompound.setByte("inGround", (byte) (this.inGround ? 1 : 0));
|
||||
@ -372,7 +372,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
this.e = nbttagcompound.getShort("yTile");
|
||||
this.f = nbttagcompound.getShort("zTile");
|
||||
this.at = nbttagcompound.getShort("life");
|
||||
this.g = Block.e(nbttagcompound.getByte("inTile") & 255);
|
||||
this.g = Block.getById(nbttagcompound.getByte("inTile") & 255);
|
||||
this.h = nbttagcompound.getByte("inData") & 255;
|
||||
this.shake = nbttagcompound.getByte("shake") & 255;
|
||||
this.inGround = nbttagcompound.getByte("inGround") == 1;
|
||||
@ -434,7 +434,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
this.knockbackStrength = i;
|
||||
}
|
||||
|
||||
public boolean au() {
|
||||
public boolean av() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -67,11 +67,11 @@ public class EntityBoat extends Entity {
|
||||
return entity.boundingBox;
|
||||
}
|
||||
|
||||
public AxisAlignedBB I() {
|
||||
public AxisAlignedBB J() {
|
||||
return this.boundingBox;
|
||||
}
|
||||
|
||||
public boolean R() {
|
||||
public boolean S() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ public class EntityBoat extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
|
||||
}
|
||||
|
||||
public double ad() {
|
||||
public double ae() {
|
||||
return (double) this.length * 0.0D - 0.30000001192092896D;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ public class EntityBoat extends Entity {
|
||||
this.c(-this.i());
|
||||
this.a(10);
|
||||
this.setDamage(this.getDamage() + f * 10.0F);
|
||||
this.P();
|
||||
this.Q();
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
@ -143,7 +143,7 @@ public class EntityBoat extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ public class EntityBoat extends Entity {
|
||||
for (int k1 = 0; k1 < list.size(); ++k1) {
|
||||
Entity entity = (Entity) list.get(k1);
|
||||
|
||||
if (entity != this.passenger && entity.R() && entity instanceof EntityBoat) {
|
||||
if (entity != this.passenger && entity.S() && entity instanceof EntityBoat) {
|
||||
entity.collide(this);
|
||||
}
|
||||
}
|
||||
@ -411,12 +411,12 @@ public class EntityBoat extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void ab() {
|
||||
public void ac() {
|
||||
if (this.passenger != null) {
|
||||
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.ad() + this.passenger.ac(), this.locZ + d1);
|
||||
this.passenger.setPosition(this.locX + d0, this.locY + this.ae() + this.passenger.ad(), this.locZ + d1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,19 +24,19 @@ public class EntityChicken extends EntityAnimal {
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(4.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
public void e() {
|
||||
// CraftBukkit start
|
||||
if (this.bZ()) { // should be isChickenJockey
|
||||
if (this.isChickenJockey()) {
|
||||
this.persistent = !this.isTypeNotPersistent();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -62,7 +62,7 @@ public class EntityChicken extends EntityAnimal {
|
||||
}
|
||||
|
||||
this.bp += this.bt * 2.0F;
|
||||
if (!this.world.isStatic && !this.isBaby() && !this.bZ() && --this.bu <= 0) {
|
||||
if (!this.world.isStatic && !this.isBaby() && !this.isChickenJockey() && --this.bu <= 0) {
|
||||
this.makeSound("mob.chicken.plop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
this.a(Items.EGG, 1);
|
||||
this.bu = this.random.nextInt(6000) + 6000;
|
||||
@ -75,11 +75,11 @@ public class EntityChicken extends EntityAnimal {
|
||||
return "mob.chicken.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.chicken.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.chicken.hurt";
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ public class EntityChicken extends EntityAnimal {
|
||||
}
|
||||
|
||||
protected int getExpValue(EntityHuman entityhuman) {
|
||||
return this.bZ() ? 10 : super.getExpValue(entityhuman);
|
||||
return this.isChickenJockey() ? 10 : super.getExpValue(entityhuman);
|
||||
}
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
@ -128,23 +128,23 @@ public class EntityChicken extends EntityAnimal {
|
||||
}
|
||||
|
||||
protected boolean isTypeNotPersistent() {
|
||||
return this.bZ() && this.passenger == null;
|
||||
return this.isChickenJockey() && this.passenger == null;
|
||||
}
|
||||
|
||||
public void ab() {
|
||||
super.ab();
|
||||
public void ac() {
|
||||
super.ac();
|
||||
float f = MathHelper.sin(this.aM * 3.1415927F / 180.0F);
|
||||
float f1 = MathHelper.cos(this.aM * 3.1415927F / 180.0F);
|
||||
float f2 = 0.1F;
|
||||
float f3 = 0.0F;
|
||||
|
||||
this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + (double) (this.length * 0.5F) + this.passenger.ac() + (double) f3, this.locZ - (double) (f2 * f1));
|
||||
this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + (double) (this.length * 0.5F) + this.passenger.ad() + (double) f3, this.locZ - (double) (f2 * f1));
|
||||
if (this.passenger instanceof EntityLiving) {
|
||||
((EntityLiving) this.passenger).aM = this.aM;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bZ() {
|
||||
public boolean isChickenJockey() {
|
||||
return this.bv;
|
||||
}
|
||||
|
||||
|
@ -21,13 +21,13 @@ public class EntityCow extends EntityAnimal {
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
|
||||
}
|
||||
|
||||
@ -35,11 +35,11 @@ public class EntityCow extends EntityAnimal {
|
||||
return "mob.cow.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.cow.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.cow.hurt";
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class EntityCow extends EntityAnimal {
|
||||
this.makeSound("mob.cow.step", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
protected void bq() {
|
||||
this.world.methodProfiler.a("ai");
|
||||
if (this.bo > 0 && --this.bo == 0) {
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
@ -63,7 +63,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
} else if (this.target.isAlive()) {
|
||||
float f1 = this.target.e((Entity) this);
|
||||
|
||||
if (this.p(this.target)) {
|
||||
if (this.hasLineOfSight(this.target)) {
|
||||
this.a(this.target, f1);
|
||||
}
|
||||
} else {
|
||||
@ -93,8 +93,8 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
}
|
||||
|
||||
int i = MathHelper.floor(this.boundingBox.b + 0.5D);
|
||||
boolean flag = this.L();
|
||||
boolean flag1 = this.O();
|
||||
boolean flag = this.M();
|
||||
boolean flag1 = this.P();
|
||||
|
||||
this.pitch = 0.0F;
|
||||
if (this.pathEntity != null && this.random.nextInt(100) != 0) {
|
||||
@ -161,7 +161,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
} else {
|
||||
super.bp();
|
||||
super.bq();
|
||||
this.pathEntity = null;
|
||||
}
|
||||
}
|
||||
|
@ -26,16 +26,16 @@ public class EntityCreeper extends EntityMonster {
|
||||
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false));
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int aw() {
|
||||
public int ax() {
|
||||
return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
|
||||
}
|
||||
|
||||
@ -108,23 +108,23 @@ public class EntityCreeper extends EntityMonster {
|
||||
super.h();
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.creeper.say";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.creeper.death";
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
// super.die(damagesource); // CraftBukkit - Moved to end
|
||||
if (damagesource.getEntity() instanceof EntitySkeleton) {
|
||||
int i = Item.b(Items.RECORD_1);
|
||||
int j = Item.b(Items.RECORD_12);
|
||||
int i = Item.getId(Items.RECORD_1);
|
||||
int j = Item.getId(Items.RECORD_12);
|
||||
int k = i + this.random.nextInt(j - i + 1);
|
||||
|
||||
// CraftBukkit start - Store record for now, drop in dropDeathLoot
|
||||
// this.a(Item.d(k), 1);
|
||||
// this.a(Item.getById(k), 1);
|
||||
this.record = k;
|
||||
// CraftBukkit end
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
|
||||
// Drop a music disc?
|
||||
if (this.record != -1) {
|
||||
this.a(Item.d(this.record), 1);
|
||||
this.a(Item.getById(this.record), 1);
|
||||
this.record = -1;
|
||||
}
|
||||
}
|
||||
@ -188,7 +188,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Items.FLINT_AND_STEEL) {
|
||||
this.world.makeSound(this.locX + 0.5D, this.locY + 0.5D, this.locZ + 0.5D, "fire.ignite", 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
|
||||
entityhuman.aZ();
|
||||
entityhuman.ba();
|
||||
if (!this.world.isStatic) {
|
||||
this.cd();
|
||||
itemstack.damage(1, entityhuman);
|
||||
|
@ -19,7 +19,7 @@ public class EntityDamageSourceIndirect extends EntityDamageSource {
|
||||
|
||||
public IChatBaseComponent getLocalizedDeathMessage(EntityLiving entityliving) {
|
||||
IChatBaseComponent ichatbasecomponent = this.owner == null ? this.p.getScoreboardDisplayName() : this.owner.getScoreboardDisplayName();
|
||||
ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).bd() : null;
|
||||
ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).be() : null;
|
||||
String s = "death.attack." + this.translationIndex;
|
||||
String s1 = s + ".item";
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class EntityEnderCrystal extends Entity {
|
||||
|
||||
protected void a(NBTTagCompound nbttagcompound) {}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
this.ak = true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(200.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(200.0D);
|
||||
}
|
||||
|
||||
protected void c() {
|
||||
@ -518,7 +518,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
return super.damageEntity(damagesource, f);
|
||||
}
|
||||
|
||||
protected void aE() {
|
||||
protected void aF() {
|
||||
if (this.dead) return; // CraftBukkit - can't kill what's already dead
|
||||
++this.bB;
|
||||
if (this.bB >= 180 && this.bB <= 200) {
|
||||
@ -632,11 +632,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
|
||||
protected void w() {}
|
||||
|
||||
public Entity[] as() {
|
||||
public Entity[] at() {
|
||||
return this.children;
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -648,11 +648,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
return "mob.enderdragon.growl";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.enderdragon.hit";
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 5.0F;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,10 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||
Bukkit.getPluginManager().callEvent(teleEvent);
|
||||
|
||||
if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
|
||||
if (this.getShooter().am()) {
|
||||
this.getShooter().mount((Entity) null);
|
||||
}
|
||||
|
||||
entityplayer.playerConnection.teleport(teleEvent.getTo());
|
||||
this.getShooter().fallDistance = 0.0F;
|
||||
CraftEventFactory.entityDamage = this;
|
||||
|
@ -24,9 +24,9 @@ public class EntityEnderman extends EntityMonster {
|
||||
this.W = 1.0F;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(40.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(40.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(7.0D);
|
||||
}
|
||||
@ -40,13 +40,13 @@ public class EntityEnderman extends EntityMonster {
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
nbttagcompound.setShort("carried", (short) Block.b(this.getCarried()));
|
||||
nbttagcompound.setShort("carried", (short) Block.getId(this.getCarried()));
|
||||
nbttagcompound.setShort("carriedData", (short) this.getCarriedData());
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
super.a(nbttagcompound);
|
||||
this.setCarried(Block.e(nbttagcompound.getShort("carried")));
|
||||
this.setCarried(Block.getById(nbttagcompound.getShort("carried")));
|
||||
this.setCarriedData(nbttagcompound.getShort("carriedData"));
|
||||
}
|
||||
|
||||
@ -86,12 +86,12 @@ public class EntityEnderman extends EntityMonster {
|
||||
vec3d1 = vec3d1.a();
|
||||
double d1 = vec3d.b(vec3d1);
|
||||
|
||||
return d1 > 1.0D - 0.025D / d0 && entityhuman.p(this);
|
||||
return d1 > 1.0D - 0.025D / d0 && entityhuman.hasLineOfSight(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void e() {
|
||||
if (this.K()) {
|
||||
if (this.L()) {
|
||||
this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
j = MathHelper.floor(this.locY + this.random.nextDouble() * 3.0D);
|
||||
k = MathHelper.floor(this.locZ - 2.0D + this.random.nextDouble() * 4.0D);
|
||||
block = this.world.getType(i, j, k);
|
||||
if (br[Block.b(block)]) {
|
||||
if (br[Block.getId(block)]) {
|
||||
// CraftBukkit start - Pickup event
|
||||
if (!CraftEventFactory.callEntityChangeBlockEvent(this, this.world.getWorld().getBlockAt(i, j, k), org.bukkit.Material.AIR).isCancelled()) {
|
||||
this.setCarried(block);
|
||||
@ -161,7 +161,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.K() || this.isBurning()) {
|
||||
if (this.L() || this.isBurning()) {
|
||||
this.target = null;
|
||||
this.a(false);
|
||||
this.bv = false;
|
||||
@ -290,11 +290,11 @@ public class EntityEnderman extends EntityMonster {
|
||||
return this.cd() ? "mob.endermen.scream" : "mob.endermen.idle";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.endermen.hit";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.endermen.death";
|
||||
}
|
||||
|
||||
@ -315,11 +315,11 @@ public class EntityEnderman extends EntityMonster {
|
||||
}
|
||||
|
||||
public void setCarried(Block block) {
|
||||
this.datawatcher.watch(16, Byte.valueOf((byte) (Block.b(block) & 255)));
|
||||
this.datawatcher.watch(16, Byte.valueOf((byte) (Block.getId(block) & 255)));
|
||||
}
|
||||
|
||||
public Block getCarried() {
|
||||
return Block.e(this.datawatcher.getByte(16));
|
||||
return Block.getById(this.datawatcher.getByte(16));
|
||||
}
|
||||
|
||||
public void setCarriedData(int i) {
|
||||
@ -364,19 +364,19 @@ public class EntityEnderman extends EntityMonster {
|
||||
}
|
||||
|
||||
static {
|
||||
br[Block.b((Block) Blocks.GRASS)] = true;
|
||||
br[Block.b(Blocks.DIRT)] = true;
|
||||
br[Block.b((Block) Blocks.SAND)] = true;
|
||||
br[Block.b(Blocks.GRAVEL)] = true;
|
||||
br[Block.b((Block) Blocks.YELLOW_FLOWER)] = true;
|
||||
br[Block.b((Block) Blocks.RED_ROSE)] = true;
|
||||
br[Block.b((Block) Blocks.BROWN_MUSHROOM)] = true;
|
||||
br[Block.b((Block) Blocks.RED_MUSHROOM)] = true;
|
||||
br[Block.b(Blocks.TNT)] = true;
|
||||
br[Block.b(Blocks.CACTUS)] = true;
|
||||
br[Block.b(Blocks.CLAY)] = true;
|
||||
br[Block.b(Blocks.PUMPKIN)] = true;
|
||||
br[Block.b(Blocks.MELON)] = true;
|
||||
br[Block.b((Block) Blocks.MYCEL)] = true;
|
||||
br[Block.getId(Blocks.GRASS)] = true;
|
||||
br[Block.getId(Blocks.DIRT)] = true;
|
||||
br[Block.getId(Blocks.SAND)] = true;
|
||||
br[Block.getId(Blocks.GRAVEL)] = true;
|
||||
br[Block.getId(Blocks.YELLOW_FLOWER)] = true;
|
||||
br[Block.getId(Blocks.RED_ROSE)] = true;
|
||||
br[Block.getId(Blocks.BROWN_MUSHROOM)] = true;
|
||||
br[Block.getId(Blocks.RED_MUSHROOM)] = true;
|
||||
br[Block.getId(Blocks.TNT)] = true;
|
||||
br[Block.getId(Blocks.CACTUS)] = true;
|
||||
br[Block.getId(Blocks.CLAY)] = true;
|
||||
br[Block.getId(Blocks.PUMPKIN)] = true;
|
||||
br[Block.getId(Blocks.MELON)] = true;
|
||||
br[Block.getId(Blocks.MYCEL)] = true;
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean N() {
|
||||
return this.world.a(this.boundingBox, Material.WATER, (Entity) this);
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
if (this.isInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
this.P();
|
||||
this.Q();
|
||||
this.d = (int) ((float) this.d - f);
|
||||
if (this.d <= 0) {
|
||||
this.die();
|
||||
@ -182,7 +182,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
return i >= 2477 ? 2477 : (i >= 1237 ? 1237 : (i >= 617 ? 617 : (i >= 307 ? 307 : (i >= 149 ? 149 : (i >= 73 ? 73 : (i >= 37 ? 37 : (i >= 17 ? 17 : (i >= 7 ? 7 : (i >= 3 ? 3 : 1)))))))));
|
||||
}
|
||||
|
||||
public boolean au() {
|
||||
public boolean av() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ public class EntityFallingBlock extends Entity {
|
||||
|
||||
public Block id; // CraftBukkit - private -> public
|
||||
public int data;
|
||||
public int b;
|
||||
public int ticksLived;
|
||||
public boolean dropItem;
|
||||
private boolean f;
|
||||
private boolean hurtEntities;
|
||||
@ -53,7 +53,7 @@ public class EntityFallingBlock extends Entity {
|
||||
|
||||
protected void c() {}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ public class EntityFallingBlock extends Entity {
|
||||
this.lastX = this.locX;
|
||||
this.lastY = this.locY;
|
||||
this.lastZ = this.locZ;
|
||||
++this.b;
|
||||
++this.ticksLived;
|
||||
this.motY -= 0.03999999910593033D;
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
this.motX *= 0.9800000190734863D;
|
||||
@ -75,9 +75,9 @@ public class EntityFallingBlock extends Entity {
|
||||
int j = MathHelper.floor(this.locY);
|
||||
int k = MathHelper.floor(this.locZ);
|
||||
|
||||
if (this.b == 1) {
|
||||
if (this.ticksLived == 1) {
|
||||
// CraftBukkit - compare data and call event
|
||||
if (this.b != 1 || this.world.getType(i, j, k) != this.id || this.world.getData(i, j, k) != this.data || CraftEventFactory.callEntityChangeBlockEvent(this, i, j, k, Blocks.AIR, 0).isCancelled()) {
|
||||
if (this.ticksLived != 1 || this.world.getType(i, j, k) != this.id || this.world.getData(i, j, k) != this.data || CraftEventFactory.callEntityChangeBlockEvent(this, i, j, k, Blocks.AIR, 0).isCancelled()) {
|
||||
this.die();
|
||||
return;
|
||||
}
|
||||
@ -129,7 +129,7 @@ public class EntityFallingBlock extends Entity {
|
||||
this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F);
|
||||
}
|
||||
}
|
||||
} else if (this.b > 100 && !this.world.isStatic && (j < 1 || j > 256) || this.b > 600) {
|
||||
} else if (this.ticksLived > 100 && !this.world.isStatic && (j < 1 || j > 256) || this.ticksLived > 600) {
|
||||
if (this.dropItem) {
|
||||
this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F);
|
||||
}
|
||||
@ -174,10 +174,10 @@ public class EntityFallingBlock extends Entity {
|
||||
}
|
||||
|
||||
protected void b(NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.setByte("Tile", (byte) Block.b(this.id));
|
||||
nbttagcompound.setInt("TileID", Block.b(this.id));
|
||||
nbttagcompound.setByte("Tile", (byte) Block.getId(this.id));
|
||||
nbttagcompound.setInt("TileID", Block.getId(this.id));
|
||||
nbttagcompound.setByte("Data", (byte) this.data);
|
||||
nbttagcompound.setByte("Time", (byte) this.b);
|
||||
nbttagcompound.setByte("Time", (byte) this.ticksLived);
|
||||
nbttagcompound.setBoolean("DropItem", this.dropItem);
|
||||
nbttagcompound.setBoolean("HurtEntities", this.hurtEntities);
|
||||
nbttagcompound.setFloat("FallHurtAmount", this.fallHurtAmount);
|
||||
@ -189,13 +189,13 @@ public class EntityFallingBlock extends Entity {
|
||||
|
||||
protected void a(NBTTagCompound nbttagcompound) {
|
||||
if (nbttagcompound.hasKeyOfType("TileID", 99)) {
|
||||
this.id = Block.e(nbttagcompound.getInt("TileID"));
|
||||
this.id = Block.getById(nbttagcompound.getInt("TileID"));
|
||||
} else {
|
||||
this.id = Block.e(nbttagcompound.getByte("Tile") & 255);
|
||||
this.id = Block.getById(nbttagcompound.getByte("Tile") & 255);
|
||||
}
|
||||
|
||||
this.data = nbttagcompound.getByte("Data") & 255;
|
||||
this.b = nbttagcompound.getByte("Time") & 255;
|
||||
this.ticksLived = nbttagcompound.getByte("Time") & 255;
|
||||
if (nbttagcompound.hasKeyOfType("HurtEntities", 99)) {
|
||||
this.hurtEntities = nbttagcompound.getBoolean("HurtEntities");
|
||||
this.fallHurtAmount = nbttagcompound.getFloat("FallHurtAmount");
|
||||
@ -223,7 +223,7 @@ public class EntityFallingBlock extends Entity {
|
||||
|
||||
public void a(CrashReportSystemDetails crashreportsystemdetails) {
|
||||
super.a(crashreportsystemdetails);
|
||||
crashreportsystemdetails.a("Immitating block ID", Integer.valueOf(Block.b(this.id)));
|
||||
crashreportsystemdetails.a("Immitating block ID", Integer.valueOf(Block.getId(this.id)));
|
||||
crashreportsystemdetails.a("Immitating block data", Integer.valueOf(this.data));
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ public abstract class EntityFireball extends Entity {
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
Entity entity1 = (Entity) list.get(i);
|
||||
|
||||
if (entity1.Q() && (!entity1.i(this.shooter) || this.au >= 25)) {
|
||||
if (entity1.R() && (!entity1.i(this.shooter) || this.au >= 25)) {
|
||||
float f = 0.3F;
|
||||
AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
|
||||
@ -164,7 +164,7 @@ public abstract class EntityFireball extends Entity {
|
||||
this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F;
|
||||
float f2 = this.e();
|
||||
|
||||
if (this.L()) {
|
||||
if (this.M()) {
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
float f3 = 0.25F;
|
||||
|
||||
@ -195,7 +195,7 @@ public abstract class EntityFireball extends Entity {
|
||||
nbttagcompound.setShort("xTile", (short) this.e);
|
||||
nbttagcompound.setShort("yTile", (short) this.f);
|
||||
nbttagcompound.setShort("zTile", (short) this.g);
|
||||
nbttagcompound.setByte("inTile", (byte) Block.b(this.h));
|
||||
nbttagcompound.setByte("inTile", (byte) Block.getId(this.h));
|
||||
nbttagcompound.setByte("inGround", (byte) (this.i ? 1 : 0));
|
||||
// CraftBukkit - Fix direction being mismapped to invalid variables
|
||||
nbttagcompound.set("power", this.a(new double[] { this.dirX, this.dirY, this.dirZ}));
|
||||
@ -205,7 +205,7 @@ public abstract class EntityFireball extends Entity {
|
||||
this.e = nbttagcompound.getShort("xTile");
|
||||
this.f = nbttagcompound.getShort("yTile");
|
||||
this.g = nbttagcompound.getShort("zTile");
|
||||
this.h = Block.e(nbttagcompound.getByte("inTile") & 255);
|
||||
this.h = Block.getById(nbttagcompound.getByte("inTile") & 255);
|
||||
this.i = nbttagcompound.getByte("inGround") == 1;
|
||||
// CraftBukkit start - direction -> power
|
||||
if (nbttagcompound.hasKeyOfType("power", 9)) {
|
||||
@ -220,11 +220,11 @@ public abstract class EntityFireball extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public float ae() {
|
||||
public float af() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ public abstract class EntityFireball extends Entity {
|
||||
if (this.isInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
this.P();
|
||||
this.Q();
|
||||
if (damagesource.getEntity() != null) {
|
||||
// CraftBukkit start
|
||||
if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
|
||||
@ -240,7 +240,7 @@ public abstract class EntityFireball extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
Vec3D vec3d = damagesource.getEntity().af();
|
||||
Vec3D vec3d = damagesource.getEntity().ag();
|
||||
|
||||
if (vec3d != null) {
|
||||
this.motX = vec3d.a;
|
||||
|
@ -11,7 +11,7 @@ public class EntityFireworks extends Entity {
|
||||
}
|
||||
|
||||
protected void c() {
|
||||
this.datawatcher.a(8, 5);
|
||||
this.datawatcher.add(8, 5);
|
||||
}
|
||||
|
||||
public EntityFireworks(World world, double d0, double d1, double d2, ItemStack itemstack) {
|
||||
|
@ -101,7 +101,7 @@ public class EntityFishingHook extends Entity {
|
||||
this.b(this.yaw, this.pitch);
|
||||
} else {
|
||||
if (!this.world.isStatic) {
|
||||
ItemStack itemstack = this.owner.bE();
|
||||
ItemStack itemstack = this.owner.bF();
|
||||
|
||||
if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Items.FISHING_ROD || this.f(this.owner) > 1024.0D) {
|
||||
this.die();
|
||||
@ -164,7 +164,7 @@ public class EntityFishingHook extends Entity {
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
Entity entity1 = (Entity) list.get(i);
|
||||
|
||||
if (entity1.Q() && (entity1 != this.owner || this.aw >= 5)) {
|
||||
if (entity1.R() && (entity1 != this.owner || this.aw >= 5)) {
|
||||
float f = 0.3F;
|
||||
AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
|
||||
@ -344,7 +344,7 @@ public class EntityFishingHook extends Entity {
|
||||
nbttagcompound.setShort("xTile", (short) this.g);
|
||||
nbttagcompound.setShort("yTile", (short) this.h);
|
||||
nbttagcompound.setShort("zTile", (short) this.i);
|
||||
nbttagcompound.setByte("inTile", (byte) Block.b(this.at));
|
||||
nbttagcompound.setByte("inTile", (byte) Block.getId(this.at));
|
||||
nbttagcompound.setByte("shake", (byte) this.a);
|
||||
nbttagcompound.setByte("inGround", (byte) (this.au ? 1 : 0));
|
||||
}
|
||||
@ -353,7 +353,7 @@ public class EntityFishingHook extends Entity {
|
||||
this.g = nbttagcompound.getShort("xTile");
|
||||
this.h = nbttagcompound.getShort("yTile");
|
||||
this.i = nbttagcompound.getShort("zTile");
|
||||
this.at = Block.e(nbttagcompound.getByte("inTile") & 255);
|
||||
this.at = Block.getById(nbttagcompound.getByte("inTile") & 255);
|
||||
this.a = nbttagcompound.getByte("shake") & 255;
|
||||
this.au = nbttagcompound.getByte("inGround") == 1;
|
||||
}
|
||||
|
@ -41,12 +41,12 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
protected void bq() {
|
||||
if (!this.world.isStatic && this.world.difficulty == EnumDifficulty.PEACEFUL) {
|
||||
this.die();
|
||||
}
|
||||
@ -123,7 +123,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
double d7 = this.target.locZ - this.locZ;
|
||||
|
||||
this.aM = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F;
|
||||
if (this.p(this.target)) {
|
||||
if (this.hasLineOfSight(this.target)) {
|
||||
if (this.bp == 10) {
|
||||
this.world.a((EntityHuman) null, 1007, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
|
||||
}
|
||||
@ -184,11 +184,11 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
return "mob.ghast.moan";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.ghast.scream";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.ghast.death";
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 10.0F;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ public abstract class EntityHanging extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ public abstract class EntityHanging extends Entity {
|
||||
// CraftBukkit end
|
||||
|
||||
this.die();
|
||||
this.P();
|
||||
this.Q();
|
||||
this.b(damagesource.getEntity());
|
||||
}
|
||||
|
||||
@ -334,7 +334,7 @@ public abstract class EntityHanging extends Entity {
|
||||
|
||||
public abstract void b(Entity entity);
|
||||
|
||||
protected boolean U() {
|
||||
protected boolean V() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -254,11 +254,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f);
|
||||
}
|
||||
|
||||
public int aU() {
|
||||
public int aV() {
|
||||
return by[this.cl()];
|
||||
}
|
||||
|
||||
public boolean R() {
|
||||
public boolean S() {
|
||||
return this.passenger == null;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return this.getAttributeInstance(attributeJumpStrength).getValue();
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
this.cS();
|
||||
int i = this.getType();
|
||||
|
||||
@ -401,10 +401,10 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
boolean flag = this.random.nextInt(4) == 0;
|
||||
int i = this.getType();
|
||||
|
||||
return i == 4 ? Items.BONE : (i == 3 ? (flag ? Item.d(0) : Items.ROTTEN_FLESH) : Items.LEATHER);
|
||||
return i == 4 ? Items.BONE : (i == 3 ? (flag ? Item.getById(0) : Items.ROTTEN_FLESH) : Items.LEATHER);
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
this.cS();
|
||||
if (this.random.nextInt(3) == 0) {
|
||||
this.cU();
|
||||
@ -421,7 +421,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
|
||||
protected String t() {
|
||||
this.cS();
|
||||
if (this.random.nextInt(10) == 0 && !this.bg()) {
|
||||
if (this.random.nextInt(10) == 0 && !this.bh()) {
|
||||
this.cU();
|
||||
}
|
||||
|
||||
@ -466,10 +466,10 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.bb().b(attributeJumpStrength);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(53.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeMap().b(attributeJumpStrength);
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(53.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.22499999403953552D);
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return this.maxDomestication; // CraftBukkit - return stored max domestication instead of 100
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 0.8F;
|
||||
}
|
||||
|
||||
@ -663,7 +663,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return i == 2 || i == 1;
|
||||
}
|
||||
|
||||
protected boolean bg() {
|
||||
protected boolean bh() {
|
||||
return this.passenger != null && this.cu() ? true : this.cm() || this.cn();
|
||||
}
|
||||
|
||||
@ -689,7 +689,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
super.die(damagesource);
|
||||
/* CraftBukkit start - Handle chest dropping in dropDeathLoot below
|
||||
if (!this.world.isStatic) {
|
||||
this.cK();
|
||||
this.dropChest();
|
||||
}
|
||||
// CraftBukkit end */
|
||||
}
|
||||
@ -700,7 +700,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
|
||||
// Moved from die method above
|
||||
if (!this.world.isStatic) {
|
||||
this.cK(); // Should be dropChest
|
||||
this.dropChest();
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -846,11 +846,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
String s = this.cv();
|
||||
|
||||
if (s != null) {
|
||||
this.makeSound(s, this.be(), this.bf());
|
||||
this.makeSound(s, this.bf(), this.bg());
|
||||
}
|
||||
}
|
||||
|
||||
public void cK() {
|
||||
public void dropChest() {
|
||||
this.a(this, this.inventoryChest);
|
||||
this.cs();
|
||||
}
|
||||
@ -912,7 +912,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
|
||||
this.W = 1.0F;
|
||||
this.aQ = this.bk() * 0.1F;
|
||||
this.aQ = this.bl() * 0.1F;
|
||||
if (!this.world.isStatic) {
|
||||
this.i((float) this.getAttributeInstance(GenericAttributes.d).getValue());
|
||||
super.e(f, f1);
|
||||
@ -998,7 +998,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication");
|
||||
}
|
||||
// CraftBukkit end
|
||||
AttributeInstance attributeinstance = this.bb().a("Speed");
|
||||
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
|
||||
|
||||
if (attributeinstance != null) {
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D);
|
||||
@ -1098,9 +1098,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
|
||||
entityhorse1.setType(k);
|
||||
double d0 = this.getAttributeInstance(GenericAttributes.a).b() + entityageable.getAttributeInstance(GenericAttributes.a).b() + (double) this.cV();
|
||||
double d0 = this.getAttributeInstance(GenericAttributes.maxHealth).b() + entityageable.getAttributeInstance(GenericAttributes.maxHealth).b() + (double) this.cV();
|
||||
|
||||
entityhorse1.getAttributeInstance(GenericAttributes.a).setValue(d0 / 3.0D);
|
||||
entityhorse1.getAttributeInstance(GenericAttributes.maxHealth).setValue(d0 / 3.0D);
|
||||
double d1 = this.getAttributeInstance(attributeJumpStrength).b() + entityageable.getAttributeInstance(attributeJumpStrength).b() + this.cW();
|
||||
|
||||
entityhorse1.getAttributeInstance(attributeJumpStrength).setValue(d1 / 3.0D);
|
||||
@ -1110,8 +1110,8 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return entityhorse1;
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
Object object = super.a(groupdataentity);
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
Object object = super.prepare(groupdataentity);
|
||||
boolean flag = false;
|
||||
int i = 0;
|
||||
int j;
|
||||
@ -1140,14 +1140,14 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
|
||||
if (j != 4 && j != 3) {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) this.cV());
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) this.cV());
|
||||
if (j == 0) {
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(this.cX());
|
||||
} else {
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.17499999701976776D);
|
||||
}
|
||||
} else {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(15.0D);
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(15.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
|
||||
}
|
||||
|
||||
@ -1161,7 +1161,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return (GroupDataEntity) object;
|
||||
}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1189,15 +1189,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
}
|
||||
|
||||
public void ab() {
|
||||
super.ab();
|
||||
public void ac() {
|
||||
super.ac();
|
||||
if (this.bM > 0.0F) {
|
||||
float f = MathHelper.sin(this.aM * 3.1415927F / 180.0F);
|
||||
float f1 = MathHelper.cos(this.aM * 3.1415927F / 180.0F);
|
||||
float f2 = 0.7F * this.bM;
|
||||
float f3 = 0.15F * this.bM;
|
||||
|
||||
this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.ad() + this.passenger.ac() + (double) f3, this.locZ - (double) (f2 * f1));
|
||||
this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.ad() + this.passenger.ad() + (double) f3, this.locZ - (double) (f2 * f1));
|
||||
if (this.passenger instanceof EntityLiving) {
|
||||
((EntityLiving) this.passenger).aM = this.aM;
|
||||
}
|
||||
|
@ -82,9 +82,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.maxFireTicks = 20;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.bb().b(GenericAttributes.e).setValue(1.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeMap().b(GenericAttributes.e).setValue(1.0D);
|
||||
}
|
||||
|
||||
protected void c() {
|
||||
@ -94,19 +94,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.datawatcher.a(18, Integer.valueOf(0));
|
||||
}
|
||||
|
||||
public boolean bx() {
|
||||
public boolean by() {
|
||||
return this.f != null;
|
||||
}
|
||||
|
||||
public void bz() {
|
||||
public void bA() {
|
||||
if (this.f != null) {
|
||||
this.f.b(this.world, this, this.g);
|
||||
}
|
||||
|
||||
this.bA();
|
||||
this.bB();
|
||||
}
|
||||
|
||||
public void bA() {
|
||||
public void bB() {
|
||||
this.f = null;
|
||||
this.g = 0;
|
||||
if (!this.world.isStatic) {
|
||||
@ -115,7 +115,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
|
||||
public boolean isBlocking() {
|
||||
return this.bx() && this.f.getItem().d(this.f) == EnumAnimation.BLOCK;
|
||||
return this.by() && this.f.getItem().d(this.f) == EnumAnimation.BLOCK;
|
||||
}
|
||||
|
||||
public void h() {
|
||||
@ -131,7 +131,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.p();
|
||||
}
|
||||
} else {
|
||||
this.bA();
|
||||
this.bB();
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,19 +214,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public int C() {
|
||||
public int D() {
|
||||
return this.abilities.isInvulnerable ? 0 : 80;
|
||||
}
|
||||
|
||||
protected String G() {
|
||||
protected String H() {
|
||||
return "game.player.swim";
|
||||
}
|
||||
|
||||
protected String N() {
|
||||
protected String O() {
|
||||
return "game.player.swim.splash";
|
||||
}
|
||||
|
||||
public int ah() {
|
||||
public int ai() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
vec3d1.a(-this.pitch * 3.1415927F / 180.0F);
|
||||
vec3d1.b(-this.yaw * 3.1415927F / 180.0F);
|
||||
vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
|
||||
String s = "iconcrack_" + Item.b(itemstack.getItem());
|
||||
String s = "iconcrack_" + Item.getId(itemstack.getItem());
|
||||
|
||||
if (itemstack.usesData()) {
|
||||
s = s + "_" + itemstack.getData();
|
||||
@ -276,7 +276,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
if (event.isCancelled()) {
|
||||
// Update client
|
||||
if (this instanceof EntityPlayer) {
|
||||
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
|
||||
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.getSlot((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -287,7 +287,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
|
||||
// Update client
|
||||
if (this instanceof EntityPlayer) {
|
||||
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
|
||||
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.getSlot((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -302,11 +302,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
this.bA();
|
||||
this.bB();
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean bg() {
|
||||
protected boolean bh() {
|
||||
return this.getHealth() <= 0.0F || this.isSleeping();
|
||||
}
|
||||
|
||||
@ -347,7 +347,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public void aa() {
|
||||
public void ab() {
|
||||
if (!this.world.isStatic && this.isSneaking()) {
|
||||
this.mount((Entity) null);
|
||||
this.setSneaking(false);
|
||||
@ -358,7 +358,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
float f = this.yaw;
|
||||
float f1 = this.pitch;
|
||||
|
||||
super.aa();
|
||||
super.ab();
|
||||
this.br = this.bs;
|
||||
this.bs = 0.0F;
|
||||
this.l(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
@ -370,9 +370,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
super.bp();
|
||||
this.ba();
|
||||
protected void bq() {
|
||||
super.bq();
|
||||
this.bb();
|
||||
}
|
||||
|
||||
public void e() {
|
||||
@ -483,11 +483,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.a(StatisticList.v, 1);
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "game.player.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "game.player.die";
|
||||
}
|
||||
|
||||
@ -775,15 +775,15 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
protected void h(float f) {
|
||||
protected void damageArmor(float f) {
|
||||
this.inventory.a(f);
|
||||
}
|
||||
|
||||
public int aU() {
|
||||
public int aV() {
|
||||
return this.inventory.l();
|
||||
}
|
||||
|
||||
public float bD() {
|
||||
public float bE() {
|
||||
int i = 0;
|
||||
ItemStack[] aitemstack = this.inventory.armor;
|
||||
int j = aitemstack.length;
|
||||
@ -810,18 +810,18 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
f = (1.0F + f) * 0.5F;
|
||||
}
|
||||
|
||||
f = this.b(damagesource, f);
|
||||
f = this.c(damagesource, f);
|
||||
f = this.applyArmorModifier(damagesource, f);
|
||||
f = this.applyMagicModifier(damagesource, f);
|
||||
float f1 = f;
|
||||
|
||||
f = Math.max(f - this.br(), 0.0F);
|
||||
this.m(this.br() - (f1 - f));
|
||||
f = Math.max(f - this.getAbsorptionHearts(), 0.0F);
|
||||
this.setAbsorptionHearts(this.getAbsorptionHearts() - (f1 - f));
|
||||
if (f != 0.0F) {
|
||||
this.a(damagesource.f());
|
||||
this.applyExhaustion(damagesource.getExhaustionCost());
|
||||
float f2 = this.getHealth();
|
||||
|
||||
this.setHealth(this.getHealth() - f);
|
||||
this.aV().a(damagesource, f2, f);
|
||||
this.aW().a(damagesource, f2, f);
|
||||
}
|
||||
}
|
||||
return false; // CraftBukkit
|
||||
@ -844,7 +844,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
public void b(ItemStack itemstack) {}
|
||||
|
||||
public boolean q(Entity entity) {
|
||||
ItemStack itemstack = this.bE();
|
||||
ItemStack itemstack = this.bF();
|
||||
ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null;
|
||||
|
||||
if (!entity.c(this)) {
|
||||
@ -856,7 +856,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
if (itemstack.a(this, (EntityLiving) entity)) {
|
||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||
if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
|
||||
this.bF();
|
||||
this.bG();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -865,9 +865,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
|
||||
return false;
|
||||
} else {
|
||||
if (itemstack != null && itemstack == this.bE()) {
|
||||
if (itemstack != null && itemstack == this.bF()) {
|
||||
if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) {
|
||||
this.bF();
|
||||
this.bG();
|
||||
} else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) {
|
||||
itemstack.count = itemstack1.count;
|
||||
}
|
||||
@ -877,20 +877,20 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack bE() {
|
||||
public ItemStack bF() {
|
||||
return this.inventory.getItemInHand();
|
||||
}
|
||||
|
||||
public void bF() {
|
||||
public void bG() {
|
||||
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
|
||||
}
|
||||
|
||||
public double ac() {
|
||||
public double ad() {
|
||||
return (double) (this.height - 0.5F);
|
||||
}
|
||||
|
||||
public void attack(Entity entity) {
|
||||
if (entity.au()) {
|
||||
if (entity.av()) {
|
||||
if (!entity.j(this)) {
|
||||
float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
|
||||
int i = 0;
|
||||
@ -906,7 +906,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
|
||||
if (f > 0.0F || f1 > 0.0F) {
|
||||
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.h_() && !this.L() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
|
||||
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.h_() && !this.M() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
|
||||
|
||||
if (flag && f > 0.0F) {
|
||||
f *= 1.5F;
|
||||
@ -956,7 +956,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
|
||||
EnchantmentManager.b(this, entity);
|
||||
ItemStack itemstack = this.bE();
|
||||
ItemStack itemstack = this.bF();
|
||||
Object object = entity;
|
||||
|
||||
if (entity instanceof EntityComplexPart) {
|
||||
@ -971,7 +971,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
itemstack.a((EntityLiving) object, this);
|
||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||
if (itemstack.count == 0) {
|
||||
this.bF();
|
||||
this.bG();
|
||||
}
|
||||
}
|
||||
|
||||
@ -989,7 +989,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
this.a(0.3F);
|
||||
this.applyExhaustion(0.3F);
|
||||
} else if (flag1) {
|
||||
entity.extinguish();
|
||||
}
|
||||
@ -1045,7 +1045,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
if (this.al()) {
|
||||
if (this.am()) {
|
||||
this.mount((Entity) null);
|
||||
}
|
||||
|
||||
@ -1245,13 +1245,13 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
|
||||
public void a(Statistic statistic, int i) {}
|
||||
|
||||
public void bi() {
|
||||
super.bi();
|
||||
public void bj() {
|
||||
super.bj();
|
||||
this.a(StatisticList.r, 1);
|
||||
if (this.isSprinting()) {
|
||||
this.a(0.8F);
|
||||
this.applyExhaustion(0.8F);
|
||||
} else {
|
||||
this.a(0.2F);
|
||||
this.applyExhaustion(0.2F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1275,7 +1275,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
}
|
||||
|
||||
public float bk() {
|
||||
public float bl() {
|
||||
return (float) this.getAttributeInstance(GenericAttributes.d).getValue();
|
||||
}
|
||||
|
||||
@ -1287,13 +1287,13 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
|
||||
if (i > 0) {
|
||||
this.a(StatisticList.m, i);
|
||||
this.a(0.015F * (float) i * 0.01F);
|
||||
this.applyExhaustion(0.015F * (float) i * 0.01F);
|
||||
}
|
||||
} else if (this.L()) {
|
||||
} else if (this.M()) {
|
||||
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
|
||||
if (i > 0) {
|
||||
this.a(StatisticList.i, i);
|
||||
this.a(0.015F * (float) i * 0.01F);
|
||||
this.applyExhaustion(0.015F * (float) i * 0.01F);
|
||||
}
|
||||
} else if (this.h_()) {
|
||||
if (d1 > 0.0D) {
|
||||
@ -1304,9 +1304,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
if (i > 0) {
|
||||
this.a(StatisticList.h, i);
|
||||
if (this.isSprinting()) {
|
||||
this.a(0.099999994F * (float) i * 0.01F);
|
||||
this.applyExhaustion(0.099999994F * (float) i * 0.01F);
|
||||
} else {
|
||||
this.a(0.01F * (float) i * 0.01F);
|
||||
this.applyExhaustion(0.01F * (float) i * 0.01F);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -1368,9 +1368,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public void ar() {
|
||||
public void as() {
|
||||
if (!this.abilities.isFlying) {
|
||||
super.ar();
|
||||
super.as();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1414,7 +1414,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return this.expLevel >= 30 ? 62 + (this.expLevel - 30) * 7 : (this.expLevel >= 15 ? 17 + (this.expLevel - 15) * 3 : 17);
|
||||
}
|
||||
|
||||
public void a(float f) {
|
||||
public void applyExhaustion(float f) {
|
||||
if (!this.abilities.isInvulnerable) {
|
||||
if (!this.world.isStatic) {
|
||||
this.foodData.a(f);
|
||||
@ -1430,7 +1430,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return (flag || this.foodData.c()) && !this.abilities.isInvulnerable;
|
||||
}
|
||||
|
||||
public boolean bQ() {
|
||||
public boolean bR() {
|
||||
return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth();
|
||||
}
|
||||
|
||||
@ -1455,8 +1455,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.bE() != null) {
|
||||
ItemStack itemstack = this.bE();
|
||||
if (this.bF() != null) {
|
||||
ItemStack itemstack = this.bF();
|
||||
|
||||
if (itemstack.b(block) || itemstack.a(block) > 1.0F) {
|
||||
return true;
|
||||
@ -1531,7 +1531,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
|
||||
}
|
||||
|
||||
public ItemStack bd() {
|
||||
public ItemStack be() {
|
||||
return this.inventory.getItemInHand();
|
||||
}
|
||||
|
||||
@ -1543,7 +1543,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return this.inventory.armor;
|
||||
}
|
||||
|
||||
public boolean aB() {
|
||||
public boolean aC() {
|
||||
return !this.abilities.isFlying;
|
||||
}
|
||||
|
||||
@ -1563,7 +1563,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return chatcomponenttext;
|
||||
}
|
||||
|
||||
public void m(float f) {
|
||||
public void setAbsorptionHearts(float f) {
|
||||
if (f < 0.0F) {
|
||||
f = 0.0F;
|
||||
}
|
||||
@ -1571,7 +1571,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.getDataWatcher().watch(17, Float.valueOf(f));
|
||||
}
|
||||
|
||||
public float br() {
|
||||
public float getAbsorptionHearts() {
|
||||
return this.getDataWatcher().getFloat(17);
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,9 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.bb().b(GenericAttributes.b).setValue(16.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeMap().b(GenericAttributes.b).setValue(16.0D);
|
||||
}
|
||||
|
||||
public ControllerLook getControllerLook() {
|
||||
@ -103,12 +103,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
String s = this.t();
|
||||
|
||||
if (s != null) {
|
||||
this.makeSound(s, this.be(), this.bf());
|
||||
this.makeSound(s, this.bf(), this.bg());
|
||||
}
|
||||
}
|
||||
|
||||
public void B() {
|
||||
super.B();
|
||||
public void C() {
|
||||
super.C();
|
||||
this.world.methodProfiler.a("mobBaseTick");
|
||||
if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
|
||||
this.a_ = -this.q();
|
||||
@ -154,7 +154,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
protected float f(float f, float f1) {
|
||||
if (this.bj()) {
|
||||
if (this.bk()) {
|
||||
this.bn.a();
|
||||
return f1;
|
||||
} else {
|
||||
@ -167,7 +167,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
protected Item getLoot() {
|
||||
return Item.d(0);
|
||||
return Item.getById(0);
|
||||
}
|
||||
|
||||
protected void dropDeathLoot(boolean flag, int i) {
|
||||
@ -362,7 +362,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bm() {
|
||||
protected void bn() {
|
||||
++this.aU;
|
||||
this.world.methodProfiler.a("checkDespawn");
|
||||
this.w();
|
||||
@ -413,7 +413,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.navigation.f();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("mob tick");
|
||||
this.bo();
|
||||
this.bp();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("controls");
|
||||
this.world.methodProfiler.a("move");
|
||||
@ -426,8 +426,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
super.bp();
|
||||
protected void bq() {
|
||||
super.bq();
|
||||
this.bd = 0.0F;
|
||||
this.be = 0.0F;
|
||||
this.w();
|
||||
@ -445,7 +445,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
if (this.bu != null) {
|
||||
this.a(this.bu, 10.0F, (float) this.bv());
|
||||
this.a(this.bu, 10.0F, (float) this.x());
|
||||
if (this.g-- <= 0 || this.bu.dead || this.bu.f((Entity) this) > (double) (f * f)) {
|
||||
this.bu = null;
|
||||
}
|
||||
@ -458,15 +458,15 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.pitch = this.f;
|
||||
}
|
||||
|
||||
boolean flag = this.L();
|
||||
boolean flag1 = this.O();
|
||||
boolean flag = this.M();
|
||||
boolean flag1 = this.P();
|
||||
|
||||
if (flag || flag1) {
|
||||
this.bc = this.random.nextFloat() < 0.8F;
|
||||
}
|
||||
}
|
||||
|
||||
public int bv() {
|
||||
public int x() {
|
||||
return 40;
|
||||
}
|
||||
|
||||
@ -513,7 +513,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public int aw() {
|
||||
public int ax() {
|
||||
if (this.getGoalTarget() == null) {
|
||||
return 3;
|
||||
} else {
|
||||
@ -528,7 +528,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack bd() {
|
||||
public ItemStack be() {
|
||||
return this.equipment[0];
|
||||
}
|
||||
|
||||
@ -695,8 +695,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
protected void bD() {
|
||||
float f = this.world.b(this.locX, this.locY, this.locZ);
|
||||
|
||||
if (this.bd() != null && this.random.nextFloat() < 0.25F * f) {
|
||||
EnchantmentManager.a(this.random, this.bd(), (int) (5.0F + f * (float) this.random.nextInt(18)));
|
||||
if (this.be() != null && this.random.nextFloat() < 0.25F * f) {
|
||||
EnchantmentManager.a(this.random, this.be(), (int) (5.0F + f * (float) this.random.nextInt(18)));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
@ -708,7 +708,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
this.getAttributeInstance(GenericAttributes.b).a(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, 1));
|
||||
return groupdataentity;
|
||||
}
|
||||
|
@ -29,11 +29,11 @@ public class EntityIronGolem extends EntityGolem {
|
||||
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void bo() {
|
||||
protected void bp() {
|
||||
if (--this.bq <= 0) {
|
||||
this.bq = 70 + this.random.nextInt(50);
|
||||
this.bp = this.world.villages.getClosestVillage(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 32);
|
||||
@ -46,12 +46,12 @@ public class EntityIronGolem extends EntityGolem {
|
||||
}
|
||||
}
|
||||
|
||||
super.bo();
|
||||
super.bp();
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(100.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(100.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ public class EntityIronGolem extends EntityGolem {
|
||||
}
|
||||
|
||||
protected void o(Entity entity) {
|
||||
if (entity instanceof IMonster && this.aH().nextInt(20) == 0) {
|
||||
if (entity instanceof IMonster && this.aI().nextInt(20) == 0) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.EntityTargetLivingEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetLivingEvent(this, (EntityLiving) entity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.COLLISION);
|
||||
if (!event.isCancelled()) {
|
||||
@ -93,7 +93,7 @@ public class EntityIronGolem extends EntityGolem {
|
||||
Block block = this.world.getType(i, j, k);
|
||||
|
||||
if (block.getMaterial() != Material.AIR) {
|
||||
this.world.addParticle("blockcrack_" + Block.b(block) + "_" + this.world.getData(i, j, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, 4.0D * ((double) this.random.nextFloat() - 0.5D), 0.5D, ((double) this.random.nextFloat() - 0.5D) * 4.0D);
|
||||
this.world.addParticle("blockcrack_" + Block.getId(block) + "_" + this.world.getData(i, j, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, 4.0D * ((double) this.random.nextFloat() - 0.5D), 0.5D, ((double) this.random.nextFloat() - 0.5D) * 4.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,11 +134,11 @@ public class EntityIronGolem extends EntityGolem {
|
||||
this.world.broadcastEntityEffect(this, (byte) 11);
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.irongolem.hit";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.irongolem.death";
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class EntityItem extends Entity {
|
||||
}
|
||||
|
||||
protected void c() {
|
||||
this.getDataWatcher().a(10, 5);
|
||||
this.getDataWatcher().add(10, 5);
|
||||
}
|
||||
|
||||
public void h() {
|
||||
@ -164,7 +164,7 @@ public class EntityItem extends Entity {
|
||||
this.age = 4800;
|
||||
}
|
||||
|
||||
public boolean M() {
|
||||
public boolean N() {
|
||||
return this.world.a(this.boundingBox, Material.WATER, (Entity) this);
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ public class EntityItem extends Entity {
|
||||
} else if (this.getItemStack() != null && this.getItemStack().getItem() == Items.NETHER_STAR && damagesource.isExplosion()) {
|
||||
return false;
|
||||
} else {
|
||||
this.P();
|
||||
this.Q();
|
||||
this.e = (int) ((float) this.e - f);
|
||||
if (this.e <= 0) {
|
||||
this.die();
|
||||
@ -301,7 +301,7 @@ public class EntityItem extends Entity {
|
||||
return LocaleI18n.get("item." + this.getItemStack().a());
|
||||
}
|
||||
|
||||
public boolean au() {
|
||||
public boolean av() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ public class EntityItem extends Entity {
|
||||
|
||||
public void setItemStack(ItemStack itemstack) {
|
||||
this.getDataWatcher().watch(10, itemstack);
|
||||
this.getDataWatcher().h(10);
|
||||
this.getDataWatcher().update(10);
|
||||
}
|
||||
|
||||
public String i() {
|
||||
|
@ -14,7 +14,7 @@ public class EntityItemFrame extends EntityHanging {
|
||||
}
|
||||
|
||||
protected void c() {
|
||||
this.getDataWatcher().a(2, 5);
|
||||
this.getDataWatcher().add(2, 5);
|
||||
this.getDataWatcher().a(3, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class EntityItemFrame extends EntityHanging {
|
||||
if (itemstack.getItem() == Items.MAP) {
|
||||
WorldMap worldmap = ((ItemWorldMap) itemstack.getItem()).getSavedMap(itemstack, this.world);
|
||||
|
||||
worldmap.g.remove("frame-" + this.getId());
|
||||
worldmap.decorations.remove("frame-" + this.getId());
|
||||
}
|
||||
|
||||
itemstack.a((EntityItemFrame) null);
|
||||
@ -98,7 +98,7 @@ public class EntityItemFrame extends EntityHanging {
|
||||
}
|
||||
|
||||
this.getDataWatcher().watch(2, itemstack);
|
||||
this.getDataWatcher().h(2);
|
||||
this.getDataWatcher().update(2);
|
||||
}
|
||||
|
||||
public int getRotation() {
|
||||
@ -135,7 +135,7 @@ public class EntityItemFrame extends EntityHanging {
|
||||
|
||||
public boolean c(EntityHuman entityhuman) {
|
||||
if (this.getItem() == null) {
|
||||
ItemStack itemstack = entityhuman.bd();
|
||||
ItemStack itemstack = entityhuman.be();
|
||||
|
||||
if (itemstack != null && !this.world.isStatic) {
|
||||
this.setItem(itemstack);
|
||||
|
@ -41,7 +41,7 @@ public class EntityLeash extends EntityHanging {
|
||||
public void a(NBTTagCompound nbttagcompound) {}
|
||||
|
||||
public boolean c(EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.bd();
|
||||
ItemStack itemstack = entityhuman.be();
|
||||
boolean flag = false;
|
||||
double d0;
|
||||
List list;
|
||||
@ -112,7 +112,7 @@ public class EntityLeash extends EntityHanging {
|
||||
public static EntityLeash a(World world, int i, int j, int k) {
|
||||
EntityLeash entityleash = new EntityLeash(world, i, j, k);
|
||||
|
||||
entityleash.n = true;
|
||||
entityleash.attachedToPlayer = true;
|
||||
world.addEntity(entityleash);
|
||||
return entityleash;
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public EntityLiving(World world) {
|
||||
super(world);
|
||||
this.aC();
|
||||
this.aD();
|
||||
// CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
|
||||
this.datawatcher.watch(6, (float) this.getAttributeInstance(GenericAttributes.a).getValue());
|
||||
this.datawatcher.watch(6, (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue());
|
||||
this.k = true;
|
||||
this.aL = (float) (Math.random() + 1.0D) * 0.01F;
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
@ -103,18 +103,18 @@ public abstract class EntityLiving extends Entity {
|
||||
this.datawatcher.a(6, Float.valueOf(1.0F));
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
this.bb().b(GenericAttributes.a);
|
||||
this.bb().b(GenericAttributes.c);
|
||||
this.bb().b(GenericAttributes.d);
|
||||
if (!this.bj()) {
|
||||
protected void aD() {
|
||||
this.getAttributeMap().b(GenericAttributes.maxHealth);
|
||||
this.getAttributeMap().b(GenericAttributes.c);
|
||||
this.getAttributeMap().b(GenericAttributes.d);
|
||||
if (!this.bk()) {
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.10000000149011612D);
|
||||
}
|
||||
}
|
||||
|
||||
protected void a(double d0, boolean flag) {
|
||||
if (!this.L()) {
|
||||
this.M();
|
||||
if (!this.M()) {
|
||||
this.N();
|
||||
}
|
||||
|
||||
if (flag && this.fallDistance > 0.0F) {
|
||||
@ -146,13 +146,13 @@ public abstract class EntityLiving extends Entity {
|
||||
super.a(d0, flag);
|
||||
}
|
||||
|
||||
public boolean aD() {
|
||||
public boolean aE() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void B() {
|
||||
public void C() {
|
||||
this.aC = this.aD;
|
||||
super.B();
|
||||
super.C();
|
||||
this.world.methodProfiler.a("livingEntityBaseTick");
|
||||
if (this.isAlive() && this.inBlock()) {
|
||||
this.damageEntity(DamageSource.STUCK, 1.0F);
|
||||
@ -165,7 +165,7 @@ public abstract class EntityLiving extends Entity {
|
||||
boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable;
|
||||
|
||||
if (this.isAlive() && this.a(Material.WATER)) {
|
||||
if (!this.aD() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) {
|
||||
if (!this.aE() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) {
|
||||
this.setAirTicks(this.j(this.getAirTicks()));
|
||||
if (this.getAirTicks() == -20) {
|
||||
this.setAirTicks(0);
|
||||
@ -182,7 +182,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.world.isStatic && this.al() && this.vehicle instanceof EntityLiving) {
|
||||
if (!this.world.isStatic && this.am() && this.vehicle instanceof EntityLiving) {
|
||||
this.mount((Entity) null);
|
||||
}
|
||||
} else {
|
||||
@ -193,7 +193,7 @@ public abstract class EntityLiving extends Entity {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
if (this.isAlive() && this.K()) {
|
||||
if (this.isAlive() && this.L()) {
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
if (this.getHealth() <= 0.0F) {
|
||||
this.aE();
|
||||
this.aF();
|
||||
}
|
||||
|
||||
if (this.lastDamageByPlayerTime > 0) {
|
||||
@ -232,7 +232,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
this.aN();
|
||||
this.aO();
|
||||
this.aY = this.aX;
|
||||
this.aN = this.aM;
|
||||
this.aP = this.aO;
|
||||
@ -245,7 +245,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public int getExpReward() {
|
||||
int exp = this.getExpValue(this.killer);
|
||||
|
||||
if (!this.world.isStatic && (this.lastDamageByPlayerTime > 0 || this.alwaysGivesExp()) && this.aF() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
if (!this.world.isStatic && (this.lastDamageByPlayerTime > 0 || this.alwaysGivesExp()) && this.aG() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
return exp;
|
||||
} else {
|
||||
return 0;
|
||||
@ -257,7 +257,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void aE() {
|
||||
protected void aF() {
|
||||
++this.deathTicks;
|
||||
if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead)
|
||||
int i;
|
||||
@ -285,7 +285,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean aF() {
|
||||
protected boolean aG() {
|
||||
return !this.isBaby();
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Random aH() {
|
||||
public Random aI() {
|
||||
return this.random;
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.lastDamager;
|
||||
}
|
||||
|
||||
public int aJ() {
|
||||
public int aK() {
|
||||
return this.bm;
|
||||
}
|
||||
|
||||
@ -320,11 +320,11 @@ public abstract class EntityLiving extends Entity {
|
||||
this.bm = this.ticksLived;
|
||||
}
|
||||
|
||||
public EntityLiving aK() {
|
||||
public EntityLiving aL() {
|
||||
return this.bn;
|
||||
}
|
||||
|
||||
public int aL() {
|
||||
public int aM() {
|
||||
return this.bo;
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.bo = this.ticksLived;
|
||||
}
|
||||
|
||||
public int aM() {
|
||||
public int aN() {
|
||||
return this.aU;
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ public abstract class EntityLiving extends Entity {
|
||||
nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
|
||||
nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
|
||||
nbttagcompound.setShort("AttackTime", (short) this.attackTicks);
|
||||
nbttagcompound.setFloat("AbsorptionAmount", this.br());
|
||||
nbttagcompound.setFloat("AbsorptionAmount", this.getAbsorptionHearts());
|
||||
ItemStack[] aitemstack = this.getEquipment();
|
||||
int i = aitemstack.length;
|
||||
|
||||
@ -362,7 +362,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
nbttagcompound.set("Attributes", GenericAttributes.a(this.bb()));
|
||||
nbttagcompound.set("Attributes", GenericAttributes.a(this.getAttributeMap()));
|
||||
aitemstack = this.getEquipment();
|
||||
i = aitemstack.length;
|
||||
|
||||
@ -388,9 +388,9 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
this.m(nbttagcompound.getFloat("AbsorptionAmount"));
|
||||
this.setAbsorptionHearts(nbttagcompound.getFloat("AbsorptionAmount"));
|
||||
if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isStatic) {
|
||||
GenericAttributes.a(this.bb(), nbttagcompound.getList("Attributes", 10));
|
||||
GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10));
|
||||
}
|
||||
|
||||
if (nbttagcompound.hasKeyOfType("ActiveEffects", 9)) {
|
||||
@ -410,9 +410,9 @@ public abstract class EntityLiving extends Entity {
|
||||
if (nbttagcompound.hasKey("Bukkit.MaxHealth")) {
|
||||
NBTBase nbtbase = nbttagcompound.get("Bukkit.MaxHealth");
|
||||
if (nbtbase.getTypeId() == 5) {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) ((NBTTagFloat) nbtbase).c());
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) ((NBTTagFloat) nbtbase).c());
|
||||
} else if (nbtbase.getTypeId() == 3) {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) ((NBTTagInt) nbtbase).d());
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) ((NBTTagInt) nbtbase).d());
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -436,7 +436,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.attackTicks = nbttagcompound.getShort("AttackTime");
|
||||
}
|
||||
|
||||
protected void aN() {
|
||||
protected void aO() {
|
||||
Iterator iterator = this.effects.keySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@ -554,7 +554,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean aQ() {
|
||||
public boolean aR() {
|
||||
return this.getMonsterType() == EnumMonsterType.UNDEAD;
|
||||
}
|
||||
|
||||
@ -569,22 +569,22 @@ public abstract class EntityLiving extends Entity {
|
||||
protected void a(MobEffect mobeffect) {
|
||||
this.updateEffects = true;
|
||||
if (!this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.bb(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.getAttributeMap(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
protected void a(MobEffect mobeffect, boolean flag) {
|
||||
this.updateEffects = true;
|
||||
if (flag && !this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.bb(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.bb(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.getAttributeMap(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.getAttributeMap(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
protected void b(MobEffect mobeffect) {
|
||||
this.updateEffects = true;
|
||||
if (!this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.bb(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.getAttributeMap(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
@ -705,7 +705,7 @@ public abstract class EntityLiving extends Entity {
|
||||
if (flag) {
|
||||
this.world.broadcastEntityEffect(this, (byte) 2);
|
||||
if (damagesource != DamageSource.DROWN) {
|
||||
this.P();
|
||||
this.Q();
|
||||
}
|
||||
|
||||
if (entity != null) {
|
||||
@ -727,16 +727,16 @@ public abstract class EntityLiving extends Entity {
|
||||
String s;
|
||||
|
||||
if (this.getHealth() <= 0.0F) {
|
||||
s = this.aT();
|
||||
s = this.aU();
|
||||
if (flag && s != null) {
|
||||
this.makeSound(s, this.be(), this.bf());
|
||||
this.makeSound(s, this.bf(), this.bg());
|
||||
}
|
||||
|
||||
this.die(damagesource);
|
||||
} else {
|
||||
s = this.aS();
|
||||
s = this.aT();
|
||||
if (flag && s != null) {
|
||||
this.makeSound(s, this.be(), this.bf());
|
||||
this.makeSound(s, this.bf(), this.bg());
|
||||
}
|
||||
}
|
||||
|
||||
@ -758,13 +758,13 @@ public abstract class EntityLiving extends Entity {
|
||||
vec3d1.a(-this.pitch * 3.1415927F / 180.0F);
|
||||
vec3d1.b(-this.yaw * 3.1415927F / 180.0F);
|
||||
vec3d1 = vec3d1.add(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
|
||||
this.world.addParticle("iconcrack_" + Item.b(itemstack.getItem()), vec3d1.a, vec3d1.b, vec3d1.c, vec3d.a, vec3d.b + 0.05D, vec3d.c);
|
||||
this.world.addParticle("iconcrack_" + Item.getId(itemstack.getItem()), vec3d1.a, vec3d1.b, vec3d1.c, vec3d.a, vec3d.b + 0.05D, vec3d.c);
|
||||
}
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
Entity entity = damagesource.getEntity();
|
||||
EntityLiving entityliving = this.aW();
|
||||
EntityLiving entityliving = this.aX();
|
||||
|
||||
if (this.ba >= 0 && entityliving != null) {
|
||||
entityliving.b(this, this.ba);
|
||||
@ -775,7 +775,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
this.aT = true;
|
||||
this.aV().g();
|
||||
this.aW().g();
|
||||
if (!this.world.isStatic) {
|
||||
int i = 0;
|
||||
|
||||
@ -783,7 +783,7 @@ public abstract class EntityLiving extends Entity {
|
||||
i = EnchantmentManager.getBonusMonsterLootEnchantmentLevel((EntityLiving) entity);
|
||||
}
|
||||
|
||||
if (this.aF() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
if (this.aG() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); // CraftBukkit - Setup drop capture
|
||||
|
||||
this.dropDeathLoot(this.lastDamageByPlayerTime > 0, i);
|
||||
@ -828,11 +828,11 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "game.neutral.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "game.neutral.die";
|
||||
}
|
||||
|
||||
@ -884,7 +884,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return i > 4 ? "game.neutral.hurt.fall.big" : "game.neutral.hurt.fall.small";
|
||||
}
|
||||
|
||||
public int aU() {
|
||||
public int aV() {
|
||||
int i = 0;
|
||||
ItemStack[] aitemstack = this.getEquipment();
|
||||
int j = aitemstack.length;
|
||||
@ -902,22 +902,22 @@ public abstract class EntityLiving extends Entity {
|
||||
return i;
|
||||
}
|
||||
|
||||
protected void h(float f) {}
|
||||
protected void damageArmor(float f) {}
|
||||
|
||||
protected float b(DamageSource damagesource, float f) {
|
||||
protected float applyArmorModifier(DamageSource damagesource, float f) {
|
||||
if (!damagesource.ignoresArmor()) {
|
||||
int i = 25 - this.aU();
|
||||
int i = 25 - this.aV();
|
||||
float f1 = f * (float) i;
|
||||
|
||||
// this.h(f); // CraftBukkit - Moved into d(DamageSource, float)
|
||||
// this.damageArmor(f); // CraftBukkit - Moved into d(DamageSource, float)
|
||||
f = f1 / 25.0F;
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
protected float c(DamageSource damagesource, float f) {
|
||||
if (damagesource.h()) {
|
||||
protected float applyMagicModifier(DamageSource damagesource, float f) {
|
||||
if (damagesource.isStarvation()) {
|
||||
return f;
|
||||
} else {
|
||||
if (this instanceof EntityZombie) {
|
||||
@ -976,11 +976,11 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
// Armor modifier
|
||||
f = this.b(damagesource, f);
|
||||
f = this.applyArmorModifier(damagesource, f);
|
||||
float armorModifier = preDamage - f;
|
||||
preDamage = f;
|
||||
// Resistance Potion Effect
|
||||
if (!damagesource.h() && this.hasEffect(MobEffectList.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
|
||||
if (!damagesource.isStarvation() && this.hasEffect(MobEffectList.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
|
||||
int i = (this.getEffect(MobEffectList.RESISTANCE).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
float f1 = f * (float) j;
|
||||
@ -989,12 +989,12 @@ public abstract class EntityLiving extends Entity {
|
||||
float resistanceModifier = preDamage - f;
|
||||
preDamage = f;
|
||||
// Magic modifier
|
||||
f = this.c(damagesource, f);
|
||||
f = this.applyMagicModifier(damagesource, f);
|
||||
float magicModifier = preDamage - f;
|
||||
float f1 = f;
|
||||
|
||||
// Absorption modifier
|
||||
f = Math.max(f - this.br(), 0.0F);
|
||||
f = Math.max(f - this.getAbsorptionHearts(), 0.0F);
|
||||
float absorptionModifier = Math.max(f1 - f, 0.0F);
|
||||
|
||||
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, -hardHatModifier, -blockingModifier, -armorModifier, -resistanceModifier, -magicModifier, -absorptionModifier);
|
||||
@ -1013,45 +1013,45 @@ public abstract class EntityLiving extends Entity {
|
||||
// Apply damage to armor
|
||||
if (!damagesource.ignoresArmor()) {
|
||||
float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT));
|
||||
this.h(armorDamage);
|
||||
this.damageArmor(armorDamage);
|
||||
}
|
||||
|
||||
absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
|
||||
this.m(Math.max(this.br() - absorptionModifier, 0.0F));
|
||||
this.setAbsorptionHearts(Math.max(this.getAbsorptionHearts() - absorptionModifier, 0.0F));
|
||||
if (f != 0.0F) {
|
||||
if (human) {
|
||||
((EntityHuman) this).a(damagesource.f());
|
||||
((EntityHuman) this).applyExhaustion(damagesource.getExhaustionCost());
|
||||
}
|
||||
// CraftBukkit end
|
||||
float f2 = this.getHealth();
|
||||
|
||||
this.setHealth(f2 - f);
|
||||
this.aV().a(damagesource, f2, f);
|
||||
this.aW().a(damagesource, f2, f);
|
||||
// CraftBukkit start
|
||||
if (human) {
|
||||
return true;
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.m(this.br() - f);
|
||||
this.setAbsorptionHearts(this.getAbsorptionHearts() - f);
|
||||
}
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
return false; // CraftBukkit
|
||||
}
|
||||
|
||||
public CombatTracker aV() {
|
||||
public CombatTracker aW() {
|
||||
return this.combatTracker;
|
||||
}
|
||||
|
||||
public EntityLiving aW() {
|
||||
public EntityLiving aX() {
|
||||
return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null)));
|
||||
}
|
||||
|
||||
public final float getMaxHealth() {
|
||||
return (float) this.getAttributeInstance(GenericAttributes.a).getValue();
|
||||
return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
|
||||
}
|
||||
|
||||
public final int aY() {
|
||||
public final int aZ() {
|
||||
return this.datawatcher.getByte(9);
|
||||
}
|
||||
|
||||
@ -1063,7 +1063,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.hasEffect(MobEffectList.FASTER_DIG) ? 6 - (1 + this.getEffect(MobEffectList.FASTER_DIG).getAmplifier()) * 1 : (this.hasEffect(MobEffectList.SLOWER_DIG) ? 6 + (1 + this.getEffect(MobEffectList.SLOWER_DIG).getAmplifier()) * 2 : 6);
|
||||
}
|
||||
|
||||
public void aZ() {
|
||||
public void ba() {
|
||||
if (!this.at || this.au >= this.j() / 2 || this.au < 0) {
|
||||
this.au = -1;
|
||||
this.at = true;
|
||||
@ -1073,11 +1073,11 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected void F() {
|
||||
protected void G() {
|
||||
this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F);
|
||||
}
|
||||
|
||||
protected void ba() {
|
||||
protected void bb() {
|
||||
int i = this.j();
|
||||
|
||||
if (this.at) {
|
||||
@ -1094,10 +1094,10 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public AttributeInstance getAttributeInstance(IAttribute iattribute) {
|
||||
return this.bb().a(iattribute);
|
||||
return this.getAttributeMap().a(iattribute);
|
||||
}
|
||||
|
||||
public AttributeMapBase bb() {
|
||||
public AttributeMapBase getAttributeMap() {
|
||||
if (this.d == null) {
|
||||
this.d = new AttributeMapServer();
|
||||
}
|
||||
@ -1109,7 +1109,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return EnumMonsterType.UNDEFINED;
|
||||
}
|
||||
|
||||
public abstract ItemStack bd();
|
||||
public abstract ItemStack be();
|
||||
|
||||
public abstract ItemStack getEquipment(int i);
|
||||
|
||||
@ -1130,15 +1130,15 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public abstract ItemStack[] getEquipment();
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
protected float bf() {
|
||||
protected float bg() {
|
||||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
|
||||
protected boolean bg() {
|
||||
protected boolean bh() {
|
||||
return this.getHealth() <= 0.0F;
|
||||
}
|
||||
|
||||
@ -1178,7 +1178,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.enderTeleportTo(d0, d1, d2);
|
||||
}
|
||||
|
||||
protected void bi() {
|
||||
protected void bj() {
|
||||
this.motY = 0.41999998688697815D;
|
||||
if (this.hasEffect(MobEffectList.JUMP)) {
|
||||
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
|
||||
@ -1197,9 +1197,9 @@ public abstract class EntityLiving extends Entity {
|
||||
public void e(float f, float f1) {
|
||||
double d0;
|
||||
|
||||
if (this.L() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
|
||||
if (this.M() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
|
||||
d0 = this.locY;
|
||||
this.a(f, f1, this.bj() ? 0.04F : 0.02F);
|
||||
this.a(f, f1, this.bk() ? 0.04F : 0.02F);
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
this.motX *= 0.800000011920929D;
|
||||
this.motY *= 0.800000011920929D;
|
||||
@ -1208,7 +1208,7 @@ public abstract class EntityLiving extends Entity {
|
||||
if (this.positionChanged && this.c(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
|
||||
this.motY = 0.30000001192092896D;
|
||||
}
|
||||
} else if (this.O() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
|
||||
} else if (this.P() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
|
||||
d0 = this.locY;
|
||||
this.a(f, f1, 0.02F);
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
@ -1230,7 +1230,7 @@ public abstract class EntityLiving extends Entity {
|
||||
float f4;
|
||||
|
||||
if (this.onGround) {
|
||||
f4 = this.bk() * f3;
|
||||
f4 = this.bl() * f3;
|
||||
} else {
|
||||
f4 = this.aQ;
|
||||
}
|
||||
@ -1305,12 +1305,12 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aG += this.aF;
|
||||
}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public float bk() {
|
||||
return this.bj() ? this.bp : 0.1F;
|
||||
public float bl() {
|
||||
return this.bk() ? this.bp : 0.1F;
|
||||
}
|
||||
|
||||
public void i(float f) {
|
||||
@ -1329,7 +1329,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public void h() {
|
||||
super.h();
|
||||
if (!this.world.isStatic) {
|
||||
int i = this.aY();
|
||||
int i = this.aZ();
|
||||
|
||||
if (i > 0) {
|
||||
if (this.av <= 0) {
|
||||
@ -1361,7 +1361,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
if (this.ticksLived % 20 == 0) {
|
||||
this.aV().g();
|
||||
this.aW().g();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1475,7 +1475,7 @@ public abstract class EntityLiving extends Entity {
|
||||
--this.bg;
|
||||
this.setPosition(d0, d1, d2);
|
||||
this.b(this.yaw, this.pitch);
|
||||
} else if (!this.bq()) {
|
||||
} else if (!this.br()) {
|
||||
this.motX *= 0.98D;
|
||||
this.motY *= 0.98D;
|
||||
this.motZ *= 0.98D;
|
||||
@ -1494,19 +1494,19 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
this.world.methodProfiler.a("ai");
|
||||
if (this.bg()) {
|
||||
if (this.bh()) {
|
||||
this.bc = false;
|
||||
this.bd = 0.0F;
|
||||
this.be = 0.0F;
|
||||
this.bf = 0.0F;
|
||||
} else if (this.bq()) {
|
||||
if (this.bj()) {
|
||||
} else if (this.br()) {
|
||||
if (this.bk()) {
|
||||
this.world.methodProfiler.a("newAi");
|
||||
this.bm();
|
||||
this.bn();
|
||||
this.world.methodProfiler.b();
|
||||
} else {
|
||||
this.world.methodProfiler.a("oldAi");
|
||||
this.bp();
|
||||
this.bq();
|
||||
this.world.methodProfiler.b();
|
||||
this.aO = this.yaw;
|
||||
}
|
||||
@ -1515,9 +1515,9 @@ public abstract class EntityLiving extends Entity {
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("jump");
|
||||
if (this.bc) {
|
||||
if (!this.L() && !this.O()) {
|
||||
if (!this.M() && !this.P()) {
|
||||
if (this.onGround && this.bq == 0) {
|
||||
this.bi();
|
||||
this.bj();
|
||||
this.bq = 10;
|
||||
}
|
||||
} else {
|
||||
@ -1536,15 +1536,15 @@ public abstract class EntityLiving extends Entity {
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("push");
|
||||
if (!this.world.isStatic) {
|
||||
this.bn();
|
||||
this.bo();
|
||||
}
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
protected void bm() {}
|
||||
protected void bn() {}
|
||||
|
||||
protected void bn() {
|
||||
protected void bo() {
|
||||
List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
|
||||
|
||||
if (list != null && !list.isEmpty()) {
|
||||
@ -1558,7 +1558,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
if (entity.R()) {
|
||||
if (entity.S()) {
|
||||
this.o(entity);
|
||||
}
|
||||
}
|
||||
@ -1569,16 +1569,16 @@ public abstract class EntityLiving extends Entity {
|
||||
entity.collide(this);
|
||||
}
|
||||
|
||||
public void aa() {
|
||||
super.aa();
|
||||
public void ab() {
|
||||
super.ab();
|
||||
this.aV = this.aW;
|
||||
this.aW = 0.0F;
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
protected void bo() {}
|
||||
protected void bp() {}
|
||||
|
||||
protected void bp() {
|
||||
protected void bq() {
|
||||
++this.aU;
|
||||
}
|
||||
|
||||
@ -1604,11 +1604,11 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean p(Entity entity) {
|
||||
public boolean hasLineOfSight(Entity entity) {
|
||||
return this.world.a(Vec3D.a(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ), Vec3D.a(entity.locX, entity.locY + (double) entity.getHeadHeight(), entity.locZ)) == null;
|
||||
}
|
||||
|
||||
public Vec3D af() {
|
||||
public Vec3D ag() {
|
||||
return this.j(1.0F);
|
||||
}
|
||||
|
||||
@ -1636,15 +1636,15 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bq() {
|
||||
public boolean br() {
|
||||
return !this.world.isStatic;
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
public boolean R() {
|
||||
public boolean S() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
@ -1652,7 +1652,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.length * 0.85F;
|
||||
}
|
||||
|
||||
protected void P() {
|
||||
protected void Q() {
|
||||
this.velocityChanged = this.random.nextDouble() >= this.getAttributeInstance(GenericAttributes.c).getValue();
|
||||
}
|
||||
|
||||
@ -1660,11 +1660,11 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.aO;
|
||||
}
|
||||
|
||||
public float br() {
|
||||
public float getAbsorptionHearts() {
|
||||
return this.br;
|
||||
}
|
||||
|
||||
public void m(float f) {
|
||||
public void setAbsorptionHearts(float f) {
|
||||
if (f < 0.0F) {
|
||||
f = 0.0F;
|
||||
}
|
||||
@ -1684,7 +1684,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false;
|
||||
}
|
||||
|
||||
public void bt() {}
|
||||
|
||||
public void bu() {}
|
||||
|
||||
public void bv() {}
|
||||
}
|
||||
|
@ -80,14 +80,14 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
}
|
||||
|
||||
public AxisAlignedBB h(Entity entity) {
|
||||
return entity.R() ? entity.boundingBox : null;
|
||||
return entity.S() ? entity.boundingBox : null;
|
||||
}
|
||||
|
||||
public AxisAlignedBB I() {
|
||||
public AxisAlignedBB J() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean R() {
|
||||
public boolean S() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
|
||||
}
|
||||
|
||||
public double ad() {
|
||||
public double ae() {
|
||||
return (double) this.length * 0.0D - 0.30000001192092896D;
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
|
||||
this.j(-this.l());
|
||||
this.c(10);
|
||||
this.P();
|
||||
this.Q();
|
||||
this.setDamage(this.getDamage() + f * 10.0F);
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
|
||||
|
||||
@ -173,7 +173,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.a(itemstack, 0.0F);
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
}
|
||||
|
||||
if (this.locY < -64.0D) {
|
||||
this.F();
|
||||
this.G();
|
||||
}
|
||||
|
||||
int i;
|
||||
@ -208,12 +208,12 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.world.methodProfiler.a("portal");
|
||||
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
|
||||
|
||||
i = this.C();
|
||||
i = this.D();
|
||||
if (this.an) {
|
||||
if (true || minecraftserver.getAllowNether()) { // CraftBukkit - multi-world should still allow teleport even if default vanilla nether disabled
|
||||
if (this.vehicle == null && this.ao++ >= i) {
|
||||
this.ao = i;
|
||||
this.portalCooldown = this.ah();
|
||||
this.portalCooldown = this.ai();
|
||||
byte b0;
|
||||
|
||||
if (this.world.worldProvider.dimension == -1) {
|
||||
@ -289,7 +289,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.b(d4);
|
||||
}
|
||||
|
||||
this.H();
|
||||
this.I();
|
||||
this.pitch = 0.0F;
|
||||
double d6 = this.lastX - this.locX;
|
||||
double d7 = this.lastZ - this.locZ;
|
||||
@ -329,7 +329,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
|
||||
if (entity != this.passenger && entity.R() && entity instanceof EntityMinecartAbstract) {
|
||||
if (entity != this.passenger && entity.S() && entity instanceof EntityMinecartAbstract) {
|
||||
entity.collide(this);
|
||||
}
|
||||
}
|
||||
@ -666,7 +666,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
protected void b(NBTTagCompound nbttagcompound) {
|
||||
if (this.t()) {
|
||||
nbttagcompound.setBoolean("CustomDisplayTile", true);
|
||||
nbttagcompound.setInt("DisplayTile", this.n().getMaterial() == Material.AIR ? 0 : Block.b(this.n()));
|
||||
nbttagcompound.setInt("DisplayTile", this.n().getMaterial() == Material.AIR ? 0 : Block.getId(this.n()));
|
||||
nbttagcompound.setInt("DisplayData", this.p());
|
||||
nbttagcompound.setInt("DisplayOffset", this.r());
|
||||
}
|
||||
@ -795,7 +795,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
} else {
|
||||
int i = this.getDataWatcher().getInt(20) & '\uffff';
|
||||
|
||||
return Block.e(i);
|
||||
return Block.getById(i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -825,7 +825,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
}
|
||||
|
||||
public void l(int i) {
|
||||
this.getDataWatcher().watch(20, Integer.valueOf(Block.b(this.n()) & '\uffff' | i << 16));
|
||||
this.getDataWatcher().watch(20, Integer.valueOf(Block.getId(this.n()) & '\uffff' | i << 16));
|
||||
this.a(true);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ public class EntityMinecartCommandBlockListener extends CommandBlockListenerAbst
|
||||
}
|
||||
|
||||
public void e() {
|
||||
this.a.getDataWatcher().watch(23, this.i());
|
||||
this.a.getDataWatcher().watch(23, this.getCommand());
|
||||
this.a.getDataWatcher().watch(24, ChatSerializer.a(this.h()));
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
|
||||
public void startOpen() {}
|
||||
|
||||
public void l_() {}
|
||||
public void closeContainer() {}
|
||||
|
||||
public boolean b(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
|
@ -11,7 +11,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
}
|
||||
|
||||
public void e() {
|
||||
this.ba();
|
||||
this.bb();
|
||||
float f = this.d(1.0F);
|
||||
|
||||
if (f > 0.5F) {
|
||||
@ -28,18 +28,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected String G() {
|
||||
protected String H() {
|
||||
return "game.hostile.swim";
|
||||
}
|
||||
|
||||
protected String N() {
|
||||
protected String O() {
|
||||
return "game.hostile.swim.splash";
|
||||
}
|
||||
|
||||
protected Entity findTarget() {
|
||||
EntityHuman entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D);
|
||||
|
||||
return entityhuman != null && this.p(entityhuman) ? entityhuman : null;
|
||||
return entityhuman != null && this.hasLineOfSight(entityhuman) ? entityhuman : null;
|
||||
}
|
||||
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
@ -76,11 +76,11 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "game.hostile.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "game.hostile.die";
|
||||
}
|
||||
|
||||
@ -166,12 +166,12 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
return this.world.difficulty != EnumDifficulty.PEACEFUL && this.j_() && super.canSpawn();
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.bb().b(GenericAttributes.e);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeMap().b(GenericAttributes.e);
|
||||
}
|
||||
|
||||
protected boolean aF() {
|
||||
protected boolean aG() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
this.datawatcher.a(18, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public void bo() {
|
||||
public void bp() {
|
||||
if (this.getControllerMove().a()) {
|
||||
double d0 = this.getControllerMove().b();
|
||||
|
||||
@ -51,13 +51,13 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||
}
|
||||
|
||||
@ -77,15 +77,15 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
return this.isTamed() ? (this.ce() ? "mob.cat.purr" : (this.random.nextInt(4) == 0 ? "mob.cat.purreow" : "mob.cat.meow")) : "";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
return "mob.cat.hitt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
return "mob.cat.hitt";
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected String aU() {
|
||||
return "mob.cat.hitt";
|
||||
}
|
||||
|
||||
protected float bf() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
@ -211,8 +211,8 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
return this.hasCustomName() ? this.getCustomName() : (this.isTamed() ? LocaleI18n.get("entity.Cat.name") : super.getName());
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.a(groupdataentity);
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.prepare(groupdataentity);
|
||||
if (this.world.random.nextInt(7) == 0) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
EntityOcelot entityocelot = new EntityOcelot(this.world);
|
||||
|
@ -22,22 +22,22 @@ public class EntityPig extends EntityAnimal {
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
protected void bm() {
|
||||
super.bm();
|
||||
protected void bn() {
|
||||
super.bn();
|
||||
}
|
||||
|
||||
public boolean bE() {
|
||||
ItemStack itemstack = ((EntityHuman) this.passenger).bd();
|
||||
ItemStack itemstack = ((EntityHuman) this.passenger).be();
|
||||
|
||||
return itemstack != null && itemstack.getItem() == Items.CARROT_STICK;
|
||||
}
|
||||
@ -61,11 +61,11 @@ public class EntityPig extends EntityAnimal {
|
||||
return "mob.pig.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.pig.say";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.pig.death";
|
||||
}
|
||||
|
||||
|
@ -18,14 +18,14 @@ public class EntityPigZombie extends EntityZombie {
|
||||
this.fireProof = true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(bp).setValue(0.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.5D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(5.0D);
|
||||
}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public class EntityPigZombie extends EntityZombie {
|
||||
|
||||
this.bu = this.target;
|
||||
if (this.soundDelay > 0 && --this.soundDelay == 0) {
|
||||
this.makeSound("mob.zombiepig.zpigangry", this.be() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
|
||||
this.makeSound("mob.zombiepig.zpigangry", this.bf() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
|
||||
}
|
||||
|
||||
super.h();
|
||||
@ -116,11 +116,11 @@ public class EntityPigZombie extends EntityZombie {
|
||||
return "mob.zombiepig.zpig";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.zombiepig.zpighurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.zombiepig.zpigdeath";
|
||||
}
|
||||
|
||||
@ -152,8 +152,8 @@ public class EntityPigZombie extends EntityZombie {
|
||||
this.setEquipment(0, new ItemStack(Items.GOLD_SWORD));
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
super.a(groupdataentity);
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
super.prepare(groupdataentity);
|
||||
this.setVillager(false);
|
||||
return groupdataentity;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public int invulnerableTicks = 60; // CraftBukkit - private -> public
|
||||
private EnumChatVisibility bV;
|
||||
private boolean bW = true;
|
||||
private long bX = 0L;
|
||||
private long bX = System.currentTimeMillis();
|
||||
private int containerCounter;
|
||||
public boolean g;
|
||||
public int ping;
|
||||
@ -105,7 +105,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (MinecraftServer.getServer().getForceGamemode()) {
|
||||
this.playerInteractManager.setGameMode(MinecraftServer.getServer().getGamemode());
|
||||
} else {
|
||||
this.playerInteractManager.setGameMode(EnumGamemode.a(nbttagcompound.getInt("playerGameType")));
|
||||
this.playerInteractManager.setGameMode(EnumGamemode.getById(nbttagcompound.getInt("playerGameType")));
|
||||
}
|
||||
}
|
||||
this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit
|
||||
@ -113,7 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
nbttagcompound.setInt("playerGameType", this.playerInteractManager.getGameMode().a());
|
||||
nbttagcompound.setInt("playerGameType", this.playerInteractManager.getGameMode().getId());
|
||||
this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (chunkcoordintpair != null) {
|
||||
if (this.world.isLoaded(chunkcoordintpair.x << 4, 0, chunkcoordintpair.z << 4)) {
|
||||
chunk = this.world.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z);
|
||||
if (chunk.k()) {
|
||||
if (chunk.isReady()) {
|
||||
arraylist.add(chunk);
|
||||
arraylist1.addAll(chunk.tileEntities.values()); // CraftBukkit - Get tile entities directly from the chunk instead of the world
|
||||
iterator1.remove();
|
||||
@ -234,10 +234,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.bX > 0L && this.server.getIdleTimeout() > 0 && MinecraftServer.ar() - this.bX > (long) (this.server.getIdleTimeout() * 1000 * 60)) {
|
||||
this.playerConnection.disconnect("You have been idle for too long!");
|
||||
}
|
||||
}
|
||||
|
||||
public void i() {
|
||||
@ -257,15 +253,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
// CraftBukkit - Optionally scale health
|
||||
if (this.getHealth() != this.bQ || this.bR != this.foodData.a() || this.foodData.e() == 0.0F != this.bS) {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.a(), this.foodData.e()));
|
||||
if (this.getHealth() != this.bQ || this.bR != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.bS) {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel()));
|
||||
this.bQ = this.getHealth();
|
||||
this.bR = this.foodData.a();
|
||||
this.bS = this.foodData.e() == 0.0F;
|
||||
this.bR = this.foodData.getFoodLevel();
|
||||
this.bS = this.foodData.getSaturationLevel() == 0.0F;
|
||||
}
|
||||
|
||||
if (this.getHealth() + this.br() != this.bP) {
|
||||
this.bP = this.getHealth() + this.br();
|
||||
if (this.getHealth() + this.getAbsorptionHearts() != this.bP) {
|
||||
this.bP = this.getHealth() + this.getAbsorptionHearts();
|
||||
// CraftBukkit - Update ALL the scores!
|
||||
this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getName(), com.google.common.collect.ImmutableList.of(this));
|
||||
}
|
||||
@ -281,7 +277,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutExperience(this.exp, this.expTotal, this.expLevel));
|
||||
}
|
||||
|
||||
if (this.ticksLived % 20 * 5 == 0 && !this.getStatisticManager().a(AchievementList.L)) {
|
||||
if (this.ticksLived % 20 * 5 == 0 && !this.getStatisticManager().hasAchievement(AchievementList.L)) {
|
||||
this.j();
|
||||
}
|
||||
|
||||
@ -367,7 +363,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
|
||||
IChatBaseComponent chatmessage = this.aV().b();
|
||||
IChatBaseComponent chatmessage = this.aW().b();
|
||||
|
||||
String deathmessage = chatmessage.c();
|
||||
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage);
|
||||
@ -406,7 +402,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
scoreboardscore.incrementScore();
|
||||
}
|
||||
|
||||
EntityLiving entityliving = this.aW();
|
||||
EntityLiving entityliving = this.aX();
|
||||
|
||||
if (entityliving != null) {
|
||||
int i = EntityTypes.a(entityliving);
|
||||
@ -420,7 +416,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
this.a(StatisticList.v, 1);
|
||||
this.aV().g();
|
||||
this.aW().g();
|
||||
}
|
||||
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
@ -626,7 +622,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerChest(this.inventory, iinventory));
|
||||
if (container == null) {
|
||||
iinventory.l_(); // Should be closeContainer
|
||||
iinventory.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -642,7 +638,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, tileentityhopper));
|
||||
if (container == null) {
|
||||
tileentityhopper.l_(); // Should be closeContainer
|
||||
tileentityhopper.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -658,7 +654,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, entityminecarthopper));
|
||||
if (container == null) {
|
||||
entityminecarthopper.l_(); // Should be closeContainer
|
||||
entityminecarthopper.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -674,7 +670,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerFurnace(this.inventory, tileentityfurnace));
|
||||
if (container == null) {
|
||||
tileentityfurnace.l_(); // Should be closeContainer
|
||||
tileentityfurnace.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -690,7 +686,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerDispenser(this.inventory, tileentitydispenser));
|
||||
if (container == null) {
|
||||
tileentitydispenser.l_(); // Should be closeContainer
|
||||
tileentitydispenser.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -706,7 +702,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBrewingStand(this.inventory, tileentitybrewingstand));
|
||||
if (container == null) {
|
||||
tileentitybrewingstand.l_(); // Should be closeContainer
|
||||
tileentitybrewingstand.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -722,7 +718,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBeacon(this.inventory, tileentitybeacon));
|
||||
if (container == null) {
|
||||
tileentitybeacon.l_(); // Should be closeContainer
|
||||
tileentitybeacon.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -770,7 +766,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start - Inventory open hook
|
||||
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHorse(this.inventory, iinventory, entityhorse));
|
||||
if (container == null) {
|
||||
iinventory.l_(); // Should be closeContainer
|
||||
iinventory.closeContainer();
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -809,7 +805,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
public void setContainerData(Container container, int i, int j) {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutCraftProgressBar(container.windowId, i, j));
|
||||
this.playerConnection.sendPacket(new PacketPlayOutWindowData(container.windowId, i, j));
|
||||
}
|
||||
|
||||
public void closeInventory() {
|
||||
@ -939,7 +935,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
public void a(EnumGamemode enumgamemode) {
|
||||
this.playerInteractManager.setGameMode(enumgamemode);
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.a()));
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.getId()));
|
||||
}
|
||||
|
||||
// CraftBukkit start - Support multi-line messages
|
||||
@ -1022,6 +1018,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.removeQueue.add(Integer.valueOf(entity.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
public long x() {
|
||||
return this.bX;
|
||||
}
|
||||
|
||||
// CraftBukkit start - Add per-player time and weather.
|
||||
public long timeOffset = 0;
|
||||
public boolean relativeTime = true;
|
||||
|
@ -127,7 +127,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
Entity entity1 = (Entity) list.get(i);
|
||||
|
||||
if (entity1.Q() && (entity1 != entityliving || this.at >= 5)) {
|
||||
if (entity1.R() && (entity1 != entityliving || this.at >= 5)) {
|
||||
float f = 0.3F;
|
||||
AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
|
||||
@ -150,7 +150,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
|
||||
if (movingobjectposition != null) {
|
||||
if (movingobjectposition.type == EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Blocks.PORTAL) {
|
||||
this.ag();
|
||||
this.ah();
|
||||
} else {
|
||||
this.a(movingobjectposition);
|
||||
// CraftBukkit start
|
||||
@ -189,7 +189,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
float f2 = 0.99F;
|
||||
float f3 = this.i();
|
||||
|
||||
if (this.L()) {
|
||||
if (this.M()) {
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
float f4 = 0.25F;
|
||||
|
||||
@ -216,7 +216,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
nbttagcompound.setShort("xTile", (short) this.blockX);
|
||||
nbttagcompound.setShort("yTile", (short) this.blockY);
|
||||
nbttagcompound.setShort("zTile", (short) this.blockZ);
|
||||
nbttagcompound.setByte("inTile", (byte) Block.b(this.inBlockId));
|
||||
nbttagcompound.setByte("inTile", (byte) Block.getId(this.inBlockId));
|
||||
nbttagcompound.setByte("shake", (byte) this.shake);
|
||||
nbttagcompound.setByte("inGround", (byte) (this.inGround ? 1 : 0));
|
||||
if ((this.shooterName == null || this.shooterName.length() == 0) && this.shooter != null && this.shooter instanceof EntityHuman) {
|
||||
@ -230,7 +230,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
this.blockX = nbttagcompound.getShort("xTile");
|
||||
this.blockY = nbttagcompound.getShort("yTile");
|
||||
this.blockZ = nbttagcompound.getShort("zTile");
|
||||
this.inBlockId = Block.e(nbttagcompound.getByte("inTile") & 255);
|
||||
this.inBlockId = Block.getById(nbttagcompound.getByte("inTile") & 255);
|
||||
this.shake = nbttagcompound.getByte("shake") & 255;
|
||||
this.inGround = nbttagcompound.getByte("inGround") == 1;
|
||||
this.shooterName = nbttagcompound.getString("ownerName");
|
||||
|
@ -32,13 +32,13 @@ public class EntitySheep extends EntityAnimal {
|
||||
this.bq.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
|
||||
}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void bm() {
|
||||
protected void bn() {
|
||||
this.br = this.bs.f();
|
||||
super.bm();
|
||||
super.bn();
|
||||
}
|
||||
|
||||
public void e() {
|
||||
@ -49,9 +49,9 @@ public class EntitySheep extends EntityAnimal {
|
||||
super.e();
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
|
||||
}
|
||||
|
||||
@ -119,11 +119,11 @@ public class EntitySheep extends EntityAnimal {
|
||||
return "mob.sheep.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.sheep.say";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.sheep.say";
|
||||
}
|
||||
|
||||
@ -185,8 +185,8 @@ public class EntitySheep extends EntityAnimal {
|
||||
}
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.a(groupdataentity);
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.prepare(groupdataentity);
|
||||
this.setColor(a(this.world.random));
|
||||
return groupdataentity;
|
||||
}
|
||||
|
@ -13,9 +13,9 @@ public class EntitySilverfish extends EntityMonster {
|
||||
this.a(0.3F, 0.7F);
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(1.0D);
|
||||
}
|
||||
@ -34,11 +34,11 @@ public class EntitySilverfish extends EntityMonster {
|
||||
return "mob.silverfish.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.silverfish.hit";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.silverfish.kill";
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
}
|
||||
|
||||
protected Item getLoot() {
|
||||
return Item.d(0);
|
||||
return Item.getById(0);
|
||||
}
|
||||
|
||||
public void h() {
|
||||
@ -74,8 +74,8 @@ public class EntitySilverfish extends EntityMonster {
|
||||
super.h();
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
super.bp();
|
||||
protected void bq() {
|
||||
super.bq();
|
||||
if (!this.world.isStatic) {
|
||||
int i;
|
||||
int j;
|
||||
@ -130,7 +130,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
l = this.world.getData(i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1]);
|
||||
if (BlockMonsterEggs.a(block)) {
|
||||
// CraftBukkit start
|
||||
if (CraftEventFactory.callEntityChangeBlockEvent(this, i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1], Blocks.MONSTER_EGGS, Block.b(BlockMonsterEggs.e(l))).isCancelled()) {
|
||||
if (CraftEventFactory.callEntityChangeBlockEvent(this, i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1], Blocks.MONSTER_EGGS, Block.getId(BlockMonsterEggs.getById(l))).isCancelled()) {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -24,8 +24,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
this.datawatcher.a(13, new Byte((byte) 0));
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,11 +42,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
return "mob.skeleton.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.skeleton.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.skeleton.death";
|
||||
}
|
||||
|
||||
@ -110,8 +110,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
super.e();
|
||||
}
|
||||
|
||||
public void aa() {
|
||||
super.aa();
|
||||
public void ab() {
|
||||
super.ab();
|
||||
if (this.vehicle instanceof EntityCreature) {
|
||||
EntityCreature entitycreature = (EntityCreature) this.vehicle;
|
||||
|
||||
@ -172,9 +172,9 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
this.setEquipment(0, new ItemStack(Items.BOW));
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.a(groupdataentity);
|
||||
if (this.world.worldProvider instanceof WorldProviderHell && this.aH().nextInt(5) > 0) {
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.prepare(groupdataentity);
|
||||
if (this.world.worldProvider instanceof WorldProviderHell && this.aI().nextInt(5) > 0) {
|
||||
this.goalSelector.a(4, this.bq);
|
||||
this.setSkeletonType(1);
|
||||
this.setEquipment(0, new ItemStack(Items.STONE_SWORD));
|
||||
@ -201,7 +201,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
public void bZ() {
|
||||
this.goalSelector.a((PathfinderGoal) this.bq);
|
||||
this.goalSelector.a((PathfinderGoal) this.bp);
|
||||
ItemStack itemstack = this.bd();
|
||||
ItemStack itemstack = this.be();
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Items.BOW) {
|
||||
this.goalSelector.a(4, this.bp);
|
||||
@ -212,8 +212,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
|
||||
public void a(EntityLiving entityliving, float f) {
|
||||
EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.difficulty.a() * 4));
|
||||
int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.bd());
|
||||
int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.bd());
|
||||
int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.be());
|
||||
int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.be());
|
||||
|
||||
entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.difficulty.a() * 0.11F));
|
||||
if (i > 0) {
|
||||
@ -224,7 +224,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
entityarrow.setKnockbackStrength(j);
|
||||
}
|
||||
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.bd()) > 0 || this.getSkeletonType() == 1) {
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.be()) > 0 || this.getSkeletonType() == 1) {
|
||||
// CraftBukkit start - call EntityCombustEvent
|
||||
EntityCombustEvent event = new EntityCombustEvent(entityarrow.getBukkitEntity(), 100);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
@ -236,7 +236,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.bd(), entityarrow, 0.8F);
|
||||
org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.be(), entityarrow, 0.8F);
|
||||
if (event.isCancelled()) {
|
||||
event.getProjectile().remove();
|
||||
return;
|
||||
@ -247,7 +247,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aH().nextFloat() * 0.4F + 0.8F));
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aI().nextFloat() * 0.4F + 0.8F));
|
||||
// this.world.addEntity(entityarrow); // CraftBukkit - moved up
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
public double ac() {
|
||||
return super.ac() - 0.5D;
|
||||
public double ad() {
|
||||
return super.ad() - 0.5D;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.datawatcher.watch(16, new Byte((byte) i));
|
||||
this.a(0.6F * (float) i, 0.6F * (float) i);
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) (i * i));
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) (i * i));
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.b = i;
|
||||
}
|
||||
@ -92,7 +92,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
|
||||
if (this.bW()) {
|
||||
this.makeSound(this.bV(), this.be(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
||||
this.makeSound(this.bV(), this.bf(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
||||
}
|
||||
|
||||
this.h = -0.5F;
|
||||
@ -107,7 +107,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
protected void bq() {
|
||||
this.w();
|
||||
// CraftBukkit start
|
||||
Entity entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // EntityHuman -> Entity
|
||||
@ -138,7 +138,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
|
||||
this.bc = true;
|
||||
if (this.bY()) {
|
||||
this.makeSound(this.bV(), this.be(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
||||
this.makeSound(this.bV(), this.bf(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
||||
}
|
||||
|
||||
this.bd = 1.0F - this.random.nextFloat() * 2.0F;
|
||||
@ -199,7 +199,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
if (this.bT()) {
|
||||
int i = this.getSize();
|
||||
|
||||
if (this.p(entityhuman) && this.f(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bU())) {
|
||||
if (this.hasLineOfSight(entityhuman) && this.f(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bU())) {
|
||||
this.makeSound("mob.attack", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
}
|
||||
}
|
||||
@ -213,16 +213,16 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
return this.getSize();
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected String aU() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected Item getLoot() {
|
||||
return this.getSize() == 1 ? Items.SLIME_BALL : Item.d(0);
|
||||
return this.getSize() == 1 ? Items.SLIME_BALL : Item.getById(0);
|
||||
}
|
||||
|
||||
public boolean canSpawn() {
|
||||
@ -247,11 +247,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 0.4F * (float) this.getSize();
|
||||
}
|
||||
|
||||
public int bv() {
|
||||
public int x() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class EntitySmallFireball extends EntityFireball {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -19,13 +19,13 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 0, true, false, IMonster.a));
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(4.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
int j = MathHelper.floor(this.locY);
|
||||
int k = MathHelper.floor(this.locZ);
|
||||
|
||||
if (this.K()) {
|
||||
if (this.L()) {
|
||||
this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
float f1 = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F;
|
||||
|
||||
entitysnowball.shoot(d0, d1 + (double) f1, d2, 1.6F, 12.0F);
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aH().nextFloat() * 0.4F + 0.8F));
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aI().nextFloat() * 0.4F + 0.8F));
|
||||
this.world.addEntity(entitysnowball);
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ public class EntitySpider extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(16.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(16.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D);
|
||||
}
|
||||
|
||||
@ -43,11 +43,11 @@ public class EntitySpider extends EntityMonster {
|
||||
return "mob.spider.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.spider.say";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.spider.death";
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public class EntitySpider extends EntityMonster {
|
||||
return this.bZ();
|
||||
}
|
||||
|
||||
public void ar() {}
|
||||
public void as() {}
|
||||
|
||||
public EnumMonsterType getMonsterType() {
|
||||
return EnumMonsterType.ARTHROPOD;
|
||||
@ -130,14 +130,14 @@ public class EntitySpider extends EntityMonster {
|
||||
this.datawatcher.watch(16, Byte.valueOf(b0));
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
Object object = super.a(groupdataentity);
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
Object object = super.prepare(groupdataentity);
|
||||
|
||||
if (this.world.random.nextInt(100) == 0) {
|
||||
EntitySkeleton entityskeleton = new EntitySkeleton(this.world);
|
||||
|
||||
entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
entityskeleton.a((GroupDataEntity) null);
|
||||
entityskeleton.prepare((GroupDataEntity) null);
|
||||
this.world.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY); // CraftBukkit - add SpawnReason
|
||||
entityskeleton.mount(this);
|
||||
}
|
||||
|
@ -25,29 +25,29 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D);
|
||||
}
|
||||
|
||||
protected String t() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected String aU() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected float bf() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
protected Item getLoot() {
|
||||
return Item.d(0);
|
||||
return Item.getById(0);
|
||||
}
|
||||
|
||||
protected boolean g_() {
|
||||
@ -63,7 +63,7 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
}
|
||||
|
||||
/* CraftBukkit start - Delegate to Entity to use existing inWater value
|
||||
public boolean L() {
|
||||
public boolean M() {
|
||||
return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, (Entity) this);
|
||||
}
|
||||
// CraftBukkit end */
|
||||
@ -82,7 +82,7 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.L()) {
|
||||
if (this.M()) {
|
||||
float f;
|
||||
|
||||
if (this.bt < 3.1415927F) {
|
||||
@ -130,7 +130,7 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
}
|
||||
|
||||
protected void bp() {
|
||||
protected void bq() {
|
||||
++this.aU;
|
||||
if (this.aU > 100) {
|
||||
this.bA = this.bB = this.bC = 0.0F;
|
||||
|
@ -37,7 +37,7 @@ public class EntityTNTPrimed extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
|
@ -248,8 +248,8 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
if (this.tracker instanceof EntityLiving) {
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).bb();
|
||||
Set set = attributemapserver.b();
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).getAttributeMap();
|
||||
Set set = attributemapserver.getAttributes();
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
// CraftBukkit start - Send scaled max health
|
||||
@ -304,7 +304,7 @@ public class EntityTrackerEntry {
|
||||
double d1 = entityplayer.locZ - (double) (this.zLoc / 32);
|
||||
|
||||
if (d0 >= (double) (-this.b) && d0 <= (double) this.b && d1 >= (double) (-this.b) && d1 <= (double) this.b) {
|
||||
if (!this.trackedPlayers.contains(entityplayer) && (this.d(entityplayer) || this.tracker.n)) {
|
||||
if (!this.trackedPlayers.contains(entityplayer) && (this.d(entityplayer) || this.tracker.attachedToPlayer)) {
|
||||
// CraftBukkit start - respect vanish API
|
||||
if (this.tracker instanceof EntityPlayer) {
|
||||
Player player = ((EntityPlayer) this.tracker).getBukkitEntity();
|
||||
@ -325,7 +325,7 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
if (this.tracker instanceof EntityLiving) {
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).bb();
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).getAttributeMap();
|
||||
Collection collection = attributemapserver.c();
|
||||
|
||||
// CraftBukkit start - If sending own attributes send scaled health instead of current maximum health
|
||||
@ -483,7 +483,7 @@ public class EntityTrackerEntry {
|
||||
} else if (this.tracker instanceof EntityFallingBlock) {
|
||||
EntityFallingBlock entityfallingblock = (EntityFallingBlock) this.tracker;
|
||||
|
||||
return new PacketPlayOutSpawnEntity(this.tracker, 70, Block.b(entityfallingblock.f()) | entityfallingblock.data << 16);
|
||||
return new PacketPlayOutSpawnEntity(this.tracker, 70, Block.getId(entityfallingblock.f()) | entityfallingblock.data << 16);
|
||||
} else if (this.tracker instanceof EntityPainting) {
|
||||
return new PacketPlayOutSpawnEntityPainting((EntityPainting) this.tracker);
|
||||
} else if (this.tracker instanceof EntityItemFrame) {
|
||||
|
@ -58,11 +58,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
return "mob.wither.idle";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.wither.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.wither.death";
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bm() {
|
||||
protected void bn() {
|
||||
int i;
|
||||
|
||||
if (this.ca() > 0) {
|
||||
@ -181,7 +181,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
this.heal(10.0F, EntityRegainHealthEvent.RegainReason.WITHER_SPAWN); // CraftBukkit
|
||||
}
|
||||
} else {
|
||||
super.bm();
|
||||
super.bn();
|
||||
|
||||
int j;
|
||||
|
||||
@ -209,7 +209,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
if (j > 0) {
|
||||
Entity entity = this.world.getEntity(j);
|
||||
|
||||
if (entity != null && entity.isAlive() && this.f(entity) <= 900.0D && this.p(entity)) {
|
||||
if (entity != null && entity.isAlive() && this.f(entity) <= 900.0D && this.hasLineOfSight(entity)) {
|
||||
this.a(i + 1, (EntityLiving) entity);
|
||||
this.bt[i - 1] = this.ticksLived + 40 + this.random.nextInt(20);
|
||||
this.bu[i - 1] = 0;
|
||||
@ -222,7 +222,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
for (int i1 = 0; i1 < 10 && !list.isEmpty(); ++i1) {
|
||||
EntityLiving entityliving = (EntityLiving) list.get(this.random.nextInt(list.size()));
|
||||
|
||||
if (entityliving != this && entityliving.isAlive() && this.p(entityliving)) {
|
||||
if (entityliving != this && entityliving.isAlive() && this.hasLineOfSight(entityliving)) {
|
||||
if (entityliving instanceof EntityHuman) {
|
||||
if (!((EntityHuman) entityliving).abilities.isInvulnerable) {
|
||||
this.b(i, entityliving.getId());
|
||||
@ -291,9 +291,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
this.setHealth(this.getMaxHealth() / 3.0F);
|
||||
}
|
||||
|
||||
public void ar() {}
|
||||
public void as() {}
|
||||
|
||||
public int aU() {
|
||||
public int aV() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.world, this, d6, d7, d8);
|
||||
|
||||
if (flag) {
|
||||
entitywitherskull.a(true);
|
||||
entitywitherskull.setCharged(true);
|
||||
}
|
||||
|
||||
entitywitherskull.locY = d4;
|
||||
@ -420,13 +420,13 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
|
||||
public void addEffect(MobEffect mobeffect) {}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(300.0D);
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(300.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
|
||||
this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public class EntityWitherSkull extends EntityFireball {
|
||||
}
|
||||
|
||||
protected float e() {
|
||||
return this.f() ? 0.73F : super.e();
|
||||
return this.isCharged() ? 0.73F : super.e();
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
@ -25,7 +25,7 @@ public class EntityWitherSkull extends EntityFireball {
|
||||
public float a(Explosion explosion, World world, int i, int j, int k, Block block) {
|
||||
float f = super.a(explosion, world, i, j, k, block);
|
||||
|
||||
if (this.f() && block != Blocks.BEDROCK && block != Blocks.ENDER_PORTAL && block != Blocks.ENDER_PORTAL_FRAME && block != Blocks.COMMAND) {
|
||||
if (this.isCharged() && block != Blocks.BEDROCK && block != Blocks.ENDER_PORTAL && block != Blocks.ENDER_PORTAL_FRAME && block != Blocks.COMMAND) {
|
||||
f = Math.min(0.8F, f);
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class EntityWitherSkull extends EntityFireball {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
public boolean R() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -83,11 +83,11 @@ public class EntityWitherSkull extends EntityFireball {
|
||||
this.datawatcher.a(10, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public boolean f() {
|
||||
public boolean isCharged() {
|
||||
return this.datawatcher.getByte(10) == 1;
|
||||
}
|
||||
|
||||
public void a(boolean flag) {
|
||||
public void setCharged(boolean flag) {
|
||||
this.datawatcher.watch(10, Byte.valueOf((byte) (flag ? 1 : 0)));
|
||||
}
|
||||
}
|
||||
|
@ -35,17 +35,17 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
this.setTamed(false);
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||
if (this.isTamed()) {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(20.0D);
|
||||
} else {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bj() {
|
||||
public boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bo() {
|
||||
protected void bp() {
|
||||
this.datawatcher.watch(18, Float.valueOf(this.getHealth()));
|
||||
}
|
||||
|
||||
@ -92,20 +92,20 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return this.isAngry() ? "mob.wolf.growl" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < (this.getMaxHealth() / 2) ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark");
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.wolf.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.wolf.death";
|
||||
}
|
||||
|
||||
protected float be() {
|
||||
protected float bf() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
protected Item getLoot() {
|
||||
return Item.d(-1);
|
||||
return Item.getById(-1);
|
||||
}
|
||||
|
||||
public void e() {
|
||||
@ -131,14 +131,14 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
this.g = 10;
|
||||
}
|
||||
|
||||
if (this.K()) {
|
||||
if (this.L()) {
|
||||
this.bs = true;
|
||||
this.bt = false;
|
||||
this.bu = 0.0F;
|
||||
this.bv = 0.0F;
|
||||
} else if ((this.bs || this.bt) && this.bt) {
|
||||
if (this.bu == 0.0F) {
|
||||
this.makeSound("mob.wolf.shake", this.be(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
this.makeSound("mob.wolf.shake", this.bf(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
}
|
||||
|
||||
this.bv = this.bu;
|
||||
@ -168,8 +168,8 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return this.length * 0.8F;
|
||||
}
|
||||
|
||||
public int bv() {
|
||||
return this.isSitting() ? 20 : super.bv();
|
||||
public int x() {
|
||||
return this.isSitting() ? 20 : super.x();
|
||||
}
|
||||
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
@ -196,9 +196,9 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
public void setTamed(boolean flag) {
|
||||
super.setTamed(flag);
|
||||
if (flag) {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(20.0D);
|
||||
} else {
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).setValue(8.0D);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,12 +42,12 @@ public class EntityZombie extends EntityMonster {
|
||||
this.a(0.6F, 1.8F);
|
||||
}
|
||||
|
||||
protected void aC() {
|
||||
super.aC();
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(3.0D);
|
||||
this.bb().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D);
|
||||
this.getAttributeMap().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D);
|
||||
}
|
||||
|
||||
protected void c() {
|
||||
@ -57,8 +57,8 @@ public class EntityZombie extends EntityMonster {
|
||||
this.getDataWatcher().a(14, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public int aU() {
|
||||
int i = super.aU() + 2;
|
||||
public int aV() {
|
||||
int i = super.aV() + 2;
|
||||
|
||||
if (i > 20) {
|
||||
i = 20;
|
||||
@ -67,7 +67,7 @@ public class EntityZombie extends EntityMonster {
|
||||
return i;
|
||||
}
|
||||
|
||||
protected boolean bj() {
|
||||
protected boolean bk() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.al() && this.getGoalTarget() != null && this.vehicle instanceof EntityChicken) {
|
||||
if (this.am() && this.getGoalTarget() != null && this.vehicle instanceof EntityChicken) {
|
||||
((EntityInsentient) this.vehicle).getNavigation().a(this.getNavigation().e(), 1.5D);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
entityzombie.a((GroupDataEntity) null);
|
||||
entityzombie.prepare((GroupDataEntity) null);
|
||||
this.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
|
||||
entityzombie.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
|
||||
break;
|
||||
@ -237,7 +237,7 @@ public class EntityZombie extends EntityMonster {
|
||||
if (flag) {
|
||||
int i = this.world.difficulty.a();
|
||||
|
||||
if (this.bd() == null && this.isBurning() && this.random.nextFloat() < (float) i * 0.3F) {
|
||||
if (this.be() == null && this.isBurning() && this.random.nextFloat() < (float) i * 0.3F) {
|
||||
// CraftBukkit start
|
||||
EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * i);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
@ -256,11 +256,11 @@ public class EntityZombie extends EntityMonster {
|
||||
return "mob.zombie.say";
|
||||
}
|
||||
|
||||
protected String aS() {
|
||||
protected String aT() {
|
||||
return "mob.zombie.hurt";
|
||||
}
|
||||
|
||||
protected String aT() {
|
||||
protected String aU() {
|
||||
return "mob.zombie.death";
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
entityzombie.k(entityliving);
|
||||
this.world.kill(entityliving);
|
||||
entityzombie.a((GroupDataEntity) null);
|
||||
entityzombie.prepare((GroupDataEntity) null);
|
||||
entityzombie.setVillager(true);
|
||||
if (entityliving.isBaby()) {
|
||||
entityzombie.setBaby(true);
|
||||
@ -357,8 +357,8 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
Object object = super.a(groupdataentity);
|
||||
public GroupDataEntity prepare(GroupDataEntity groupdataentity) {
|
||||
Object object = super.prepare(groupdataentity);
|
||||
float f = this.world.b(this.locX, this.locY, this.locZ);
|
||||
|
||||
this.h(this.random.nextFloat() < 0.55F * f);
|
||||
@ -388,7 +388,7 @@ public class EntityZombie extends EntityMonster {
|
||||
EntityChicken entitychicken1 = new EntityChicken(this.world);
|
||||
|
||||
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
entitychicken1.a((GroupDataEntity) null);
|
||||
entitychicken1.prepare((GroupDataEntity) null);
|
||||
entitychicken1.i(true);
|
||||
this.world.addEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT);
|
||||
this.mount(entitychicken1);
|
||||
@ -417,7 +417,7 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
if (this.random.nextFloat() < f * 0.05F) {
|
||||
this.getAttributeInstance(bp).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 0.25D + 0.5D, 0));
|
||||
this.getAttributeInstance(GenericAttributes.a).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 3.0D + 1.0D, 2));
|
||||
this.getAttributeInstance(GenericAttributes.maxHealth).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 3.0D + 1.0D, 2));
|
||||
this.a(true);
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.bE();
|
||||
ItemStack itemstack = entityhuman.bF();
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Items.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) {
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
@ -466,7 +466,7 @@ public class EntityZombie extends EntityMonster {
|
||||
EntityVillager entityvillager = new EntityVillager(this.world);
|
||||
|
||||
entityvillager.k(this);
|
||||
entityvillager.a((GroupDataEntity) null);
|
||||
entityvillager.prepare((GroupDataEntity) null);
|
||||
entityvillager.cd();
|
||||
if (this.isBaby()) {
|
||||
entityvillager.setAge(-24000);
|
||||
|
@ -56,7 +56,7 @@ public abstract class ExpirableListEntry extends JsonListEntry {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
boolean e() {
|
||||
boolean hasExpired() {
|
||||
return this.d == null ? false : this.d.before(new Date());
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class FoodMetaData {
|
||||
}
|
||||
}
|
||||
|
||||
if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bQ()) {
|
||||
if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bR()) {
|
||||
++this.foodTickTimer;
|
||||
if (this.foodTickTimer >= 80) {
|
||||
// CraftBukkit - added RegainReason
|
||||
@ -98,7 +98,7 @@ public class FoodMetaData {
|
||||
nbttagcompound.setFloat("foodExhaustionLevel", this.exhaustionLevel);
|
||||
}
|
||||
|
||||
public int a() {
|
||||
public int getFoodLevel() {
|
||||
return this.foodLevel;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ public class FoodMetaData {
|
||||
this.exhaustionLevel = Math.min(this.exhaustionLevel + f, 40.0F);
|
||||
}
|
||||
|
||||
public float e() {
|
||||
public float getSaturationLevel() {
|
||||
return this.saturationLevel;
|
||||
}
|
||||
}
|
||||
|
@ -64,11 +64,11 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
||||
// CraftBukkit end
|
||||
|
||||
if (packethandshakinginsetprotocol.d() > 5) {
|
||||
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.9");
|
||||
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.10");
|
||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]);
|
||||
this.b.close(chatcomponenttext);
|
||||
} else if (packethandshakinginsetprotocol.d() < 5) {
|
||||
chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.9");
|
||||
chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.10");
|
||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]);
|
||||
this.b.close(chatcomponenttext);
|
||||
} else {
|
||||
|
@ -26,7 +26,7 @@ public interface IInventory {
|
||||
|
||||
void startOpen();
|
||||
|
||||
void l_();
|
||||
void closeContainer();
|
||||
|
||||
boolean b(int i, ItemStack itemstack);
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class InventoryCraftResult implements IInventory {
|
||||
|
||||
public void startOpen() {}
|
||||
|
||||
public void l_() {}
|
||||
public void closeContainer() {}
|
||||
|
||||
public boolean b(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
|
@ -141,7 +141,7 @@ public class InventoryCrafting implements IInventory {
|
||||
|
||||
public void startOpen() {}
|
||||
|
||||
public void l_() {}
|
||||
public void closeContainer() {}
|
||||
|
||||
public boolean b(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
|
@ -99,12 +99,12 @@ public class InventoryEnderChest extends InventorySubcontainer {
|
||||
super.startOpen();
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
public void closeContainer() {
|
||||
if (this.a != null) {
|
||||
this.a.b();
|
||||
}
|
||||
|
||||
super.l_();
|
||||
super.closeContainer();
|
||||
this.a = null;
|
||||
}
|
||||
}
|
||||
|
@ -118,9 +118,9 @@ public class InventoryLargeChest implements IInventory {
|
||||
this.right.startOpen();
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
this.left.l_();
|
||||
this.right.l_();
|
||||
public void closeContainer() {
|
||||
this.left.closeContainer();
|
||||
this.right.closeContainer();
|
||||
}
|
||||
|
||||
public boolean b(int i, ItemStack itemstack) {
|
||||
|
@ -133,7 +133,7 @@ public class InventoryMerchant implements IInventory {
|
||||
|
||||
public void startOpen() {}
|
||||
|
||||
public void l_() {}
|
||||
public void closeContainer() {}
|
||||
|
||||
public boolean b(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
|
@ -112,7 +112,7 @@ public abstract class InventorySubcontainer implements IInventory { // CraftBukk
|
||||
|
||||
public void startOpen() {}
|
||||
|
||||
public void l_() {}
|
||||
public void closeContainer() {}
|
||||
|
||||
public boolean b(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
|
@ -26,16 +26,16 @@ public class Item {
|
||||
|
||||
public Item() {}
|
||||
|
||||
public static int b(Item item) {
|
||||
public static int getId(Item item) {
|
||||
return item == null ? 0 : REGISTRY.b(item);
|
||||
}
|
||||
|
||||
public static Item d(int i) {
|
||||
public static Item getById(int i) {
|
||||
return (Item) REGISTRY.a(i);
|
||||
}
|
||||
|
||||
public static Item getItemOf(Block block) {
|
||||
return d(Block.b(block));
|
||||
return getById(Block.getId(block));
|
||||
}
|
||||
|
||||
public static void l() {
|
||||
@ -217,7 +217,7 @@ public class Item {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
String s = (String) iterator.next();
|
||||
Block block = (Block) Block.REGISTRY.a(s);
|
||||
Block block = (Block) Block.REGISTRY.get(s);
|
||||
Object object;
|
||||
|
||||
if (block == Blocks.WOOL) {
|
||||
@ -296,7 +296,7 @@ public class Item {
|
||||
object = new ItemBlock(block);
|
||||
}
|
||||
|
||||
REGISTRY.a(Block.b(block), s, object);
|
||||
REGISTRY.a(Block.getId(block), s, object);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,8 @@ public class ItemBoat extends Item {
|
||||
for (i = 0; i < list.size(); ++i) {
|
||||
Entity entity = (Entity) list.get(i);
|
||||
|
||||
if (entity.Q()) {
|
||||
float f10 = entity.ae();
|
||||
if (entity.R()) {
|
||||
float f10 = entity.af();
|
||||
AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10);
|
||||
|
||||
if (axisalignedbb.a(vec3d)) {
|
||||
|
@ -15,7 +15,7 @@ public class ItemFishingRod extends Item {
|
||||
int i = entityhuman.hookedFish.e();
|
||||
|
||||
itemstack.damage(i, entityhuman);
|
||||
entityhuman.aZ();
|
||||
entityhuman.ba();
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
|
||||
@ -31,7 +31,7 @@ public class ItemFishingRod extends Item {
|
||||
world.addEntity(hook); // CraftBukkit - moved creation up
|
||||
}
|
||||
|
||||
entityhuman.aZ();
|
||||
entityhuman.ba();
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
@ -112,7 +112,7 @@ public class ItemMonsterEgg extends Item {
|
||||
entity.setPositionRotation(d0, d1, d2, MathHelper.g(world.random.nextFloat() * 360.0F), 0.0F);
|
||||
entityinsentient.aO = entityinsentient.yaw;
|
||||
entityinsentient.aM = entityinsentient.yaw;
|
||||
entityinsentient.a((GroupDataEntity) null);
|
||||
entityinsentient.prepare((GroupDataEntity) null);
|
||||
world.addEntity(entity, spawnReason); // CraftBukkit
|
||||
entityinsentient.r();
|
||||
}
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
In neuem Issue referenzieren
Einen Benutzer sperren