Archiviert
13
0

Update to Minecraft 1.11.1

Dieser Commit ist enthalten in:
md_5 2016-12-21 07:00:00 +11:00
Ursprung c8ff65136f
Commit 8ea0c87f51
29 geänderte Dateien mit 368 neuen und 334 gelöschten Zeilen

Datei anzeigen

@ -3,7 +3,7 @@
@@ -40,7 +40,18 @@ @@ -40,7 +40,18 @@
return false; return false;
} else { } else {
entityhuman.b(StatisticList.J); entityhuman.b(StatisticList.H);
- entityhuman.getFoodData().eat(2, 0.1F); - entityhuman.getFoodData().eat(2, 0.1F);
+ // CraftBukkit start + // CraftBukkit start
+ // entityhuman.getFoodData().eat(2, 0.1F); + // entityhuman.getFoodData().eat(2, 0.1F);

Datei anzeigen

@ -35,7 +35,7 @@
entityhuman.a(enumhand, new ItemStack(Items.BUCKET)); entityhuman.a(enumhand, new ItemStack(Items.BUCKET));
} }
entityhuman.b(StatisticList.K); entityhuman.b(StatisticList.I);
- this.a(world, blockposition, iblockdata, 3); - this.a(world, blockposition, iblockdata, 3);
+ // this.a(world, blockposition, iblockdata, 3); + // this.a(world, blockposition, iblockdata, 3);
+ // CraftBukkit end + // CraftBukkit end
@ -55,7 +55,7 @@
@@ -82,7 +97,8 @@ @@ -82,7 +97,8 @@
} }
entityhuman.b(StatisticList.L); entityhuman.b(StatisticList.J);
- this.a(world, blockposition, iblockdata, 0); - this.a(world, blockposition, iblockdata, 0);
+ // this.a(world, blockposition, iblockdata, 0); + // this.a(world, blockposition, iblockdata, 0);
+ // CraftBukkit end + // CraftBukkit end
@ -72,7 +72,7 @@
+ } + }
if (!entityhuman.abilities.canInstantlyBuild) { if (!entityhuman.abilities.canInstantlyBuild) {
itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.b); itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.b);
entityhuman.b(StatisticList.L); entityhuman.b(StatisticList.J);
@@ -106,12 +126,17 @@ @@ -106,12 +126,17 @@
} }
@ -91,7 +91,7 @@
+ } + }
if (!entityhuman.abilities.canInstantlyBuild) { if (!entityhuman.abilities.canInstantlyBuild) {
itemstack1 = new ItemStack(Items.GLASS_BOTTLE); itemstack1 = new ItemStack(Items.GLASS_BOTTLE);
entityhuman.b(StatisticList.L); entityhuman.b(StatisticList.J);
@@ -122,7 +147,8 @@ @@ -122,7 +147,8 @@
} }
@ -114,7 +114,7 @@
- this.a(world, blockposition, iblockdata, i - 1); - this.a(world, blockposition, iblockdata, i - 1);
+ // this.a(world, blockposition, iblockdata, i - 1); + // this.a(world, blockposition, iblockdata, i - 1);
+ // CraftBukkit end + // CraftBukkit end
entityhuman.b(StatisticList.M); entityhuman.b(StatisticList.K);
return true; return true;
} }
@@ -140,13 +171,18 @@ @@ -140,13 +171,18 @@
@ -128,7 +128,7 @@
itemstack1 = itemstack.cloneItemStack(); itemstack1 = itemstack.cloneItemStack();
itemstack1.setCount(1); itemstack1.setCount(1);
TileEntityBanner.c(itemstack1); TileEntityBanner.c(itemstack1);
entityhuman.b(StatisticList.N); entityhuman.b(StatisticList.L);
if (!entityhuman.abilities.canInstantlyBuild) { if (!entityhuman.abilities.canInstantlyBuild) {
itemstack.subtract(1); itemstack.subtract(1);
- this.a(world, blockposition, iblockdata, i - 1); - this.a(world, blockposition, iblockdata, i - 1);

Datei anzeigen

@ -3,7 +3,7 @@
@@ -17,7 +17,9 @@ @@ -17,7 +17,9 @@
public void stepOn(World world, BlockPosition blockposition, Entity entity) { public void stepOn(World world, BlockPosition blockposition, Entity entity) {
if (!entity.isFireProof() && entity instanceof EntityLiving && !EnchantmentManager.j((EntityLiving) entity)) { if (!entity.isFireProof() && entity instanceof EntityLiving && !EnchantmentManager.i((EntityLiving) entity)) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); // CraftBukkit + org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); // CraftBukkit
entity.damageEntity(DamageSource.HOT_FLOOR, 1.0F); entity.damageEntity(DamageSource.HOT_FLOOR, 1.0F);
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // CraftBukkit + org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // CraftBukkit

Datei anzeigen

@ -28,7 +28,7 @@
this.j = blockposition; this.j = blockposition;
this.i = world; this.i = world;
this.m = entityhuman; this.m = entityhuman;
@@ -110,7 +119,7 @@ @@ -117,7 +126,7 @@
byte b1 = 0; byte b1 = 0;
if (itemstack.isEmpty()) { if (itemstack.isEmpty()) {
@ -37,7 +37,7 @@
this.a = 0; this.a = 0;
} else { } else {
ItemStack itemstack1 = itemstack.cloneItemStack(); ItemStack itemstack1 = itemstack.cloneItemStack();
@@ -128,7 +137,7 @@ @@ -140,7 +149,7 @@
if (itemstack1.f() && itemstack1.getItem().a(itemstack, itemstack2)) { if (itemstack1.f() && itemstack1.getItem().a(itemstack, itemstack2)) {
k = Math.min(itemstack1.i(), itemstack1.k() / 4); k = Math.min(itemstack1.i(), itemstack1.k() / 4);
if (k <= 0) { if (k <= 0) {
@ -46,7 +46,7 @@
this.a = 0; this.a = 0;
return; return;
} }
@@ -143,7 +152,7 @@ @@ -155,7 +164,7 @@
this.k = l; this.k = l;
} else { } else {
if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.f())) { if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.f())) {
@ -55,7 +55,7 @@
this.a = 0; this.a = 0;
return; return;
} }
@@ -270,7 +279,7 @@ @@ -292,7 +301,7 @@
EnchantmentManager.a(map, itemstack1); EnchantmentManager.a(map, itemstack1);
} }
@ -64,7 +64,7 @@
this.b(); this.b();
} }
} }
@@ -295,6 +304,7 @@ @@ -317,6 +326,7 @@
} }
public boolean a(EntityHuman entityhuman) { public boolean a(EntityHuman entityhuman) {
@ -72,7 +72,7 @@
return this.i.getType(this.j).getBlock() != Blocks.ANVIL ? false : entityhuman.d((double) this.j.getX() + 0.5D, (double) this.j.getY() + 0.5D, (double) this.j.getZ() + 0.5D) <= 64.0D; return this.i.getType(this.j).getBlock() != Blocks.ANVIL ? false : entityhuman.d((double) this.j.getX() + 0.5D, (double) this.j.getY() + 0.5D, (double) this.j.getZ() + 0.5D) <= 64.0D;
} }
@@ -350,4 +360,29 @@ @@ -372,4 +382,29 @@
this.e(); this.e();
} }

Datei anzeigen

@ -98,7 +98,7 @@
+ +
thread.setDaemon(true); thread.setDaemon(true);
thread.start(); thread.start();
DedicatedServer.LOGGER.info("Starting minecraft server version 1.11"); DedicatedServer.LOGGER.info("Starting minecraft server version 1.11.1");
@@ -78,7 +125,7 @@ @@ -78,7 +125,7 @@
} }

Datei anzeigen

@ -9,7 +9,7 @@
} }
@Nullable @Nullable
@@ -149,6 +149,11 @@ @@ -154,6 +154,11 @@
Enchantment.enchantments.a(62, new MinecraftKey("lure"), new EnchantmentLure(Enchantment.Rarity.RARE, EnchantmentSlotType.FISHING_ROD, new EnumItemSlot[] { EnumItemSlot.MAINHAND})); Enchantment.enchantments.a(62, new MinecraftKey("lure"), new EnchantmentLure(Enchantment.Rarity.RARE, EnchantmentSlotType.FISHING_ROD, new EnumItemSlot[] { EnumItemSlot.MAINHAND}));
Enchantment.enchantments.a(70, new MinecraftKey("mending"), new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values())); Enchantment.enchantments.a(70, new MinecraftKey("mending"), new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values()));
Enchantment.enchantments.a(71, new MinecraftKey("vanishing_curse"), new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values())); Enchantment.enchantments.a(71, new MinecraftKey("vanishing_curse"), new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values()));

Datei anzeigen

@ -1,6 +1,6 @@
--- a/net/minecraft/server/Entity.java --- a/net/minecraft/server/Entity.java
+++ b/net/minecraft/server/Entity.java +++ b/net/minecraft/server/Entity.java
@@ -15,8 +15,48 @@ @@ -16,8 +16,48 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -49,17 +49,17 @@
private static final Logger a = LogManager.getLogger(); private static final Logger a = LogManager.getLogger();
private static final List<ItemStack> b = Collections.emptyList(); private static final List<ItemStack> b = Collections.emptyList();
private static final AxisAlignedBB c = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); private static final AxisAlignedBB c = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
@@ -98,6 +138,9 @@ @@ -101,6 +141,9 @@
public boolean glowing;
private final Set<String> aG;
private boolean aH; private boolean aH;
private double[] aI;
private long aJ;
+ public boolean valid; // CraftBukkit + public boolean valid; // CraftBukkit
+ public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only + public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
+ public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 + public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
public Entity(World world) { public Entity(World world) {
this.id = Entity.entityCount++; this.id = Entity.entityCount++;
@@ -202,6 +245,33 @@ @@ -206,6 +249,33 @@
} }
protected void setYawPitch(float f, float f1) { protected void setYawPitch(float f, float f1) {
@ -93,7 +93,7 @@
this.yaw = f % 360.0F; this.yaw = f % 360.0F;
this.pitch = f1 % 360.0F; this.pitch = f1 % 360.0F;
} }
@@ -245,7 +315,7 @@ @@ -249,7 +319,7 @@
if (this.ak) { if (this.ak) {
MinecraftServer minecraftserver = this.world.getMinecraftServer(); MinecraftServer minecraftserver = this.world.getMinecraftServer();
@ -102,7 +102,7 @@
if (!this.isPassenger()) { if (!this.isPassenger()) {
int i = this.V(); int i = this.V();
@@ -330,6 +400,27 @@ @@ -334,6 +404,27 @@
protected void burnFromLava() { protected void burnFromLava() {
if (!this.fireProof) { if (!this.fireProof) {
this.damageEntity(DamageSource.LAVA, 4.0F); this.damageEntity(DamageSource.LAVA, 4.0F);
@ -130,7 +130,7 @@
this.setOnFire(15); this.setOnFire(15);
} }
} }
@@ -370,6 +461,22 @@ @@ -374,6 +465,22 @@
this.a(this.getBoundingBox().d(d0, d1, d2)); this.a(this.getBoundingBox().d(d0, d1, d2));
this.recalcPosition(); this.recalcPosition();
} else { } else {
@ -150,28 +150,28 @@
+ return; + return;
+ } + }
+ // CraftBukkit end + // CraftBukkit end
this.world.methodProfiler.a("move"); if (enummovetype == EnumMoveType.PISTON) {
double d3 = this.locX; long i = this.world.getTime();
double d4 = this.locY;
@@ -470,7 +577,7 @@ @@ -515,7 +622,7 @@
} }
} }
- boolean flag1 = this.onGround || d1 != d1 && d1 < 0.0D; - boolean flag = this.onGround || d1 != d1 && d1 < 0.0D;
+ boolean flag1 = this.onGround || d1 != d7 && d1 < 0.0D; // CraftBukkit - decompile error + boolean flag = this.onGround || d1 != d8 && d1 < 0.0D; // CraftBukkit - decompile error
double d10; double d11;
if (this.P > 0.0F && flag1 && (d6 != d0 || d8 != d2)) { if (this.P > 0.0F && flag && (d7 != d0 || d9 != d2)) {
@@ -568,7 +675,7 @@ @@ -613,7 +720,7 @@
this.world.methodProfiler.a("rest"); this.world.methodProfiler.a("rest");
this.recalcPosition(); this.recalcPosition();
this.positionChanged = d6 != d0 || d8 != d2; this.positionChanged = d7 != d0 || d9 != d2;
- this.B = d1 != d1; - this.B = d1 != d1;
+ this.B = d1 != d7; // CraftBukkit - decompile error + this.B = d1 != d8; // CraftBukkit - decompile error
this.onGround = this.B && d7 < 0.0D; this.onGround = this.B && d8 < 0.0D;
this.C = this.positionChanged || this.B; this.C = this.positionChanged || this.B;
j = MathHelper.floor(this.locX); l = MathHelper.floor(this.locX);
@@ -603,6 +710,28 @@ @@ -648,6 +755,28 @@
block1.a(this.world, this); block1.a(this.world, this);
} }
@ -197,10 +197,10 @@
+ } + }
+ // CraftBukkit end + // CraftBukkit end
+ +
if (this.playStepSound() && !flag && !this.isPassenger()) { if (this.playStepSound() && (!this.onGround || !this.isSneaking() || !(this instanceof EntityHuman)) && !this.isPassenger()) {
double d21 = this.locX - d3; double d22 = this.locX - d4;
double d22 = this.locY - d4; double d23 = this.locY - d5;
@@ -634,6 +763,8 @@ @@ -683,6 +812,8 @@
} }
} }
@ -209,17 +209,17 @@
try { try {
this.checkBlockCollisions(); this.checkBlockCollisions();
} catch (Throwable throwable) { } catch (Throwable throwable) {
@@ -643,6 +774,8 @@ @@ -692,6 +823,8 @@
this.appendEntityCrashDetails(crashreportsystemdetails); this.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport); throw new ReportedException(crashreport);
} }
+ */ + */
+ // CraftBukkit end + // CraftBukkit end
boolean flag2 = this.ai(); boolean flag1 = this.ai();
@@ -651,7 +784,14 @@ @@ -700,7 +833,14 @@
if (!flag2) { if (!flag1) {
++this.fireTicks; ++this.fireTicks;
if (this.fireTicks == 0) { if (this.fireTicks == 0) {
- this.setOnFire(8); - this.setOnFire(8);
@ -234,7 +234,7 @@
} }
} }
} else if (this.fireTicks <= 0) { } else if (this.fireTicks <= 0) {
@@ -772,7 +912,7 @@ @@ -821,7 +961,7 @@
return null; return null;
} }
@ -243,7 +243,7 @@
if (!this.fireProof) { if (!this.fireProof) {
this.damageEntity(DamageSource.FIRE, (float) i); this.damageEntity(DamageSource.FIRE, (float) i);
} }
@@ -938,6 +1078,13 @@ @@ -991,6 +1131,13 @@
} }
public void spawnIn(World world) { public void spawnIn(World world) {
@ -257,7 +257,7 @@
this.world = world; this.world = world;
} }
@@ -1170,6 +1317,18 @@ @@ -1223,6 +1370,18 @@
try { try {
nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ})); nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ}));
nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ})); nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ}));
@ -276,7 +276,7 @@
nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch})); nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch}));
nbttagcompound.setFloat("FallDistance", this.fallDistance); nbttagcompound.setFloat("FallDistance", this.fallDistance);
nbttagcompound.setShort("Fire", (short) this.fireTicks); nbttagcompound.setShort("Fire", (short) this.fireTicks);
@@ -1179,6 +1338,12 @@ @@ -1232,6 +1391,12 @@
nbttagcompound.setBoolean("Invulnerable", this.invulnerable); nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
nbttagcompound.setInt("PortalCooldown", this.portalCooldown); nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
nbttagcompound.a("UUID", this.getUniqueID()); nbttagcompound.a("UUID", this.getUniqueID());
@ -289,7 +289,7 @@
if (this.hasCustomName()) { if (this.hasCustomName()) {
nbttagcompound.setString("CustomName", this.getCustomName()); nbttagcompound.setString("CustomName", this.getCustomName());
} }
@@ -1254,6 +1419,8 @@ @@ -1307,6 +1472,8 @@
this.motX = nbttaglist1.e(0); this.motX = nbttaglist1.e(0);
this.motY = nbttaglist1.e(1); this.motY = nbttaglist1.e(1);
this.motZ = nbttaglist1.e(2); this.motZ = nbttaglist1.e(2);
@ -298,7 +298,7 @@
if (Math.abs(this.motX) > 10.0D) { if (Math.abs(this.motX) > 10.0D) {
this.motX = 0.0D; this.motX = 0.0D;
} }
@@ -1265,6 +1432,7 @@ @@ -1318,6 +1485,7 @@
if (Math.abs(this.motZ) > 10.0D) { if (Math.abs(this.motZ) > 10.0D) {
this.motZ = 0.0D; this.motZ = 0.0D;
} }
@ -306,7 +306,7 @@
this.locX = nbttaglist.e(0); this.locX = nbttaglist.e(0);
this.locY = nbttaglist.e(1); this.locY = nbttaglist.e(1);
@@ -1322,6 +1490,58 @@ @@ -1375,6 +1543,58 @@
this.setPosition(this.locX, this.locY, this.locZ); this.setPosition(this.locX, this.locY, this.locZ);
} }
@ -365,7 +365,7 @@
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1389,6 +1609,12 @@ @@ -1442,6 +1662,12 @@
if (itemstack.isEmpty()) { if (itemstack.isEmpty()) {
return null; return null;
} else { } else {
@ -378,7 +378,7 @@
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack); EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack);
entityitem.q(); entityitem.q();
@@ -1514,6 +1740,24 @@ @@ -1567,6 +1793,24 @@
if (entity.bB() != this) { if (entity.bB() != this) {
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
} else { } else {
@ -403,7 +403,7 @@
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bw() instanceof EntityHuman)) { if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bw() instanceof EntityHuman)) {
this.passengers.add(0, entity); this.passengers.add(0, entity);
} else { } else {
@@ -1527,6 +1771,22 @@ @@ -1580,6 +1824,22 @@
if (entity.bB() == this) { if (entity.bB() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else { } else {
@ -426,7 +426,7 @@
this.passengers.remove(entity); this.passengers.remove(entity);
entity.j = 60; entity.j = 60;
} }
@@ -1666,14 +1926,48 @@ @@ -1719,14 +1979,48 @@
} }
public void setAirTicks(int i) { public void setAirTicks(int i) {
@ -478,7 +478,7 @@
} }
} }
@@ -1818,19 +2112,67 @@ @@ -1871,19 +2165,67 @@
if (!this.world.isClientSide && !this.dead) { if (!this.world.isClientSide && !this.dead) {
this.world.methodProfiler.a("changeDimension"); this.world.methodProfiler.a("changeDimension");
MinecraftServer minecraftserver = this.B_(); MinecraftServer minecraftserver = this.B_();
@ -549,7 +549,7 @@
BlockPosition blockposition; BlockPosition blockposition;
if (i == 1) { if (i == 1) {
@@ -1859,12 +2201,18 @@ @@ -1912,12 +2254,18 @@
blockposition = new BlockPosition(this); blockposition = new BlockPosition(this);
} }
@ -569,7 +569,7 @@
if (j == 1 && i == 1) { if (j == 1 && i == 1) {
BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn()); BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn());
@@ -1872,6 +2220,7 @@ @@ -1925,6 +2273,7 @@
} else { } else {
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch); entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
} }
@ -577,7 +577,7 @@
boolean flag = entity.attachedToPlayer; boolean flag = entity.attachedToPlayer;
@@ -1879,6 +2228,14 @@ @@ -1932,6 +2281,14 @@
worldserver1.addEntity(entity); worldserver1.addEntity(entity);
entity.attachedToPlayer = flag; entity.attachedToPlayer = flag;
worldserver1.entityJoinedWorld(entity, false); worldserver1.entityJoinedWorld(entity, false);
@ -592,7 +592,7 @@
} }
this.dead = true; this.dead = true;
@@ -1989,6 +2346,11 @@ @@ -2042,6 +2399,11 @@
} }
public void setCustomName(String s) { public void setCustomName(String s) {
@ -604,7 +604,7 @@
this.datawatcher.set(Entity.aA, s); this.datawatcher.set(Entity.aA, s);
} }
@@ -2046,7 +2408,26 @@ @@ -2099,7 +2461,26 @@
} }
public void a(AxisAlignedBB axisalignedbb) { public void a(AxisAlignedBB axisalignedbb) {
@ -632,7 +632,7 @@
} }
public float getHeadHeight() { public float getHeadHeight() {
@@ -2220,7 +2601,7 @@ @@ -2273,7 +2654,7 @@
for (Iterator iterator = this.bx().iterator(); iterator.hasNext(); entity.a(oclass, set)) { for (Iterator iterator = this.bx().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
entity = (Entity) iterator.next(); entity = (Entity) iterator.next();
if (oclass.isAssignableFrom(entity.getClass())) { if (oclass.isAssignableFrom(entity.getClass())) {

Datei anzeigen

@ -1,11 +1,17 @@
--- a/net/minecraft/server/EntityFireworks.java --- a/net/minecraft/server/EntityFireworks.java
+++ b/net/minecraft/server/EntityFireworks.java +++ b/net/minecraft/server/EntityFireworks.java
@@ -77,7 +77,7 @@ @@ -117,8 +117,12 @@
} }
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) { if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
- this.world.broadcastEntityEffect(this, (byte) 17); - this.world.broadcastEntityEffect(this, (byte) 17);
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) this.world.broadcastEntityEffect(this, (byte) 17); // CraftBukkit - this.k();
+ // CraftBukkit start
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
+ this.world.broadcastEntityEffect(this, (byte) 17);
+ this.k();
+ }
+ // CraftBukkit end
this.die(); this.die();
} }

Datei anzeigen

@ -12,7 +12,7 @@
public class EntityFishingHook extends Entity { public class EntityFishingHook extends Entity {
@@ -251,6 +256,7 @@ @@ -261,6 +266,7 @@
} }
if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) { if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) {
@ -20,7 +20,7 @@
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) { if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
this.hooked = movingobjectposition.entity; this.hooked = movingobjectposition.entity;
this.s(); this.s();
@@ -283,6 +289,10 @@ @@ -293,6 +299,10 @@
if (this.g <= 0) { if (this.g <= 0) {
this.h = 0; this.h = 0;
this.at = 0; this.at = 0;
@ -31,7 +31,7 @@
} else { } else {
this.motY -= 0.2D * (double) this.random.nextFloat() * (double) this.random.nextFloat(); this.motY -= 0.2D * (double) this.random.nextFloat() * (double) this.random.nextFloat();
} }
@@ -318,6 +328,13 @@ @@ -328,6 +338,13 @@
worldserver.a(EnumParticle.WATER_WAKE, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D, new int[0]); worldserver.a(EnumParticle.WATER_WAKE, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D, new int[0]);
} }
} else { } else {
@ -45,7 +45,7 @@
this.motY = (double) (-0.4F * MathHelper.a(this.random, 0.6F, 1.0F)); this.motY = (double) (-0.4F * MathHelper.a(this.random, 0.6F, 1.0F));
this.a(SoundEffects.H, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); this.a(SoundEffects.H, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
double d3 = this.getBoundingBox().b + 0.5D; double d3 = this.getBoundingBox().b + 0.5D;
@@ -374,6 +391,14 @@ @@ -384,6 +401,14 @@
int i = 0; int i = 0;
if (this.hooked != null) { if (this.hooked != null) {
@ -60,7 +60,7 @@
this.k(); this.k();
this.world.broadcastEntityEffect(this, (byte) 31); this.world.broadcastEntityEffect(this, (byte) 31);
i = this.hooked instanceof EntityItem ? 3 : 5; i = this.hooked instanceof EntityItem ? 3 : 5;
@@ -386,6 +411,15 @@ @@ -396,6 +421,15 @@
while (iterator.hasNext()) { while (iterator.hasNext()) {
ItemStack itemstack = (ItemStack) iterator.next(); ItemStack itemstack = (ItemStack) iterator.next();
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack); EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack);
@ -76,7 +76,7 @@
double d0 = this.owner.locX - this.locX; double d0 = this.owner.locX - this.locX;
double d1 = this.owner.locY - this.locY; double d1 = this.owner.locY - this.locY;
double d2 = this.owner.locZ - this.locZ; double d2 = this.owner.locZ - this.locZ;
@@ -396,15 +430,36 @@ @@ -406,7 +440,11 @@
entityitem.motY = d1 * 0.1D + (double) MathHelper.sqrt(d3) * 0.08D; entityitem.motY = d1 * 0.1D + (double) MathHelper.sqrt(d3) * 0.08D;
entityitem.motZ = d2 * 0.1D; entityitem.motZ = d2 * 0.1D;
this.world.addEntity(entityitem); this.world.addEntity(entityitem);
@ -86,9 +86,10 @@
+ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop())); + this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop()));
+ } + }
+ // CraftBukkit end + // CraftBukkit end
} Item item = itemstack.getItem();
i = 1; if (item == Items.FISH || item == Items.COOKED_FISH) {
@@ -418,8 +456,25 @@
} }
if (this.isInGround) { if (this.isInGround) {

Datei anzeigen

@ -274,20 +274,20 @@
} }
} }
@@ -945,8 +1043,11 @@ @@ -946,8 +1044,11 @@
EntityLiving entityliving = (EntityLiving) iterator.next(); EntityLiving entityliving = (EntityLiving) iterator.next();
if (entityliving != this && entityliving != entity && !this.r(entityliving) && this.h(entityliving) < 9.0D) { if (entityliving != this && entityliving != entity && !this.r(entityliving) && this.h(entityliving) < 9.0D) {
+ // CraftBukkit start - Only apply knockback if the damage hits + // CraftBukkit start - Only apply knockback if the damage hits
+ if (entityliving.damageEntity(DamageSource.playerAttack(this), 1.0F)) { + if (entityliving.damageEntity(DamageSource.playerAttack(this), f4)) {
entityliving.a(this, 0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); entityliving.a(this, 0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
- entityliving.damageEntity(DamageSource.playerAttack(this), 1.0F); - entityliving.damageEntity(DamageSource.playerAttack(this), f4);
+ } + }
+ // CraftBukkit end + // CraftBukkit end
} }
} }
@@ -955,11 +1056,28 @@ @@ -956,11 +1057,28 @@
} }
if (entity instanceof EntityPlayer && entity.velocityChanged) { if (entity instanceof EntityPlayer && entity.velocityChanged) {
@ -316,9 +316,9 @@
} }
if (flag2) { if (flag2) {
@@ -1012,7 +1130,14 @@ @@ -1013,7 +1131,14 @@
this.a(StatisticList.y, Math.round(f4 * 10.0F)); this.a(StatisticList.y, Math.round(f5 * 10.0F));
if (j > 0) { if (j > 0) {
- entity.setOnFire(j * 4); - entity.setOnFire(j * 4);
+ // CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item + // CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
@ -331,8 +331,8 @@
+ // CraftBukkit end + // CraftBukkit end
} }
if (this.world instanceof WorldServer && f4 > 2.0F) { if (this.world instanceof WorldServer && f5 > 2.0F) {
@@ -1028,6 +1153,11 @@ @@ -1029,6 +1154,11 @@
if (flag4) { if (flag4) {
entity.extinguish(); entity.extinguish();
} }
@ -344,7 +344,7 @@
} }
} }
@@ -1118,6 +1248,20 @@ @@ -1119,6 +1249,20 @@
this.stopRiding(); this.stopRiding();
} }
@ -365,7 +365,7 @@
this.setSize(0.2F, 0.2F); this.setSize(0.2F, 0.2F);
if (this.world.isLoaded(blockposition)) { if (this.world.isLoaded(blockposition)) {
float f = 0.5F + (float) enumdirection.getAdjacentX() * 0.4F; float f = 0.5F + (float) enumdirection.getAdjacentX() * 0.4F;
@@ -1177,6 +1321,23 @@ @@ -1178,6 +1322,23 @@
this.world.everyoneSleeping(); this.world.everyoneSleeping();
} }
@ -389,7 +389,7 @@
this.sleepTicks = flag ? 0 : 100; this.sleepTicks = flag ? 0 : 100;
if (flag2) { if (flag2) {
this.setRespawnPosition(this.bedPosition, false); this.setRespawnPosition(this.bedPosition, false);
@@ -1228,9 +1389,11 @@ @@ -1229,9 +1390,11 @@
if (blockposition != null) { if (blockposition != null) {
this.e = blockposition; this.e = blockposition;
this.f = flag; this.f = flag;

Datei anzeigen

@ -9,7 +9,7 @@
public class EntityPig extends EntityAnimal { public class EntityPig extends EntityAnimal {
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityPig.class, DataWatcherRegistry.h); private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityPig.class, DataWatcherRegistry.h);
@@ -144,6 +146,12 @@ @@ -156,6 +158,12 @@
if (!this.world.isClientSide && !this.dead) { if (!this.world.isClientSide && !this.dead) {
EntityPigZombie entitypigzombie = new EntityPigZombie(this.world); EntityPigZombie entitypigzombie = new EntityPigZombie(this.world);
@ -22,7 +22,7 @@
entitypigzombie.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD)); entitypigzombie.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
entitypigzombie.setAI(this.hasAI()); entitypigzombie.setAI(this.hasAI());
@@ -152,7 +160,8 @@ @@ -164,7 +172,8 @@
entitypigzombie.setCustomNameVisible(this.getCustomNameVisible()); entitypigzombie.setCustomNameVisible(this.getCustomNameVisible());
} }

Datei anzeigen

@ -66,8 +66,8 @@
+ this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit + this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit
} }
public void b(NBTTagCompound nbttagcompound) { public static void a(DataConverterManager dataconvertermanager) {
@@ -102,8 +133,33 @@ @@ -119,8 +150,33 @@
nbttagcompound1.set("Entity", nbttagcompound2); nbttagcompound1.set("Entity", nbttagcompound2);
nbttagcompound.set("RootVehicle", nbttagcompound1); nbttagcompound.set("RootVehicle", nbttagcompound1);
} }
@ -101,7 +101,7 @@
public void levelDown(int i) { public void levelDown(int i) {
super.levelDown(i); super.levelDown(i);
@@ -134,6 +190,11 @@ @@ -151,6 +207,11 @@
} }
public void A_() { public void A_() {
@ -113,7 +113,7 @@
this.playerInteractManager.a(); this.playerInteractManager.a();
--this.invulnerableTicks; --this.invulnerableTicks;
if (this.noDamageTicks > 0) { if (this.noDamageTicks > 0) {
@@ -193,7 +254,7 @@ @@ -210,7 +271,7 @@
} }
if (this.getHealth() != this.lastHealthSent || this.cc != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.cd) { if (this.getHealth() != this.lastHealthSent || this.cc != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.cd) {
@ -122,7 +122,7 @@
this.lastHealthSent = this.getHealth(); this.lastHealthSent = this.getHealth();
this.cc = this.foodData.getFoodLevel(); this.cc = this.foodData.getFoodLevel();
this.cd = this.foodData.getSaturationLevel() == 0.0F; this.cd = this.foodData.getSaturationLevel() == 0.0F;
@@ -214,6 +275,12 @@ @@ -231,6 +292,12 @@
this.a(IScoreboardCriteria.i, MathHelper.f((float) this.bX)); this.a(IScoreboardCriteria.i, MathHelper.f((float) this.bX));
} }
@ -135,7 +135,7 @@
if (this.getArmorStrength() != this.bY) { if (this.getArmorStrength() != this.bY) {
this.bY = this.getArmorStrength(); this.bY = this.getArmorStrength();
this.a(IScoreboardCriteria.j, MathHelper.f((float) this.bY)); this.a(IScoreboardCriteria.j, MathHelper.f((float) this.bY));
@@ -238,6 +305,16 @@ @@ -255,6 +322,16 @@
this.o(); this.o();
} }
@ -152,7 +152,7 @@
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking player"); CrashReport crashreport = CrashReport.a(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked");
@@ -248,12 +325,11 @@ @@ -265,12 +342,11 @@
} }
private void a(IScoreboardCriteria iscoreboardcriteria, int i) { private void a(IScoreboardCriteria iscoreboardcriteria, int i) {
@ -167,7 +167,7 @@
scoreboardscore.setScore(i); scoreboardscore.setScore(i);
} }
@@ -302,31 +378,61 @@ @@ -319,31 +395,61 @@
boolean flag = this.world.getGameRules().getBoolean("showDeathMessages"); boolean flag = this.world.getGameRules().getBoolean("showDeathMessages");
this.playerConnection.sendPacket(new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, flag)); this.playerConnection.sendPacket(new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, flag));
@ -182,7 +182,7 @@
+ +
+ if (!keepInventory) { + if (!keepInventory) {
+ for (ItemStack item : this.inventory.getContents()) { + for (ItemStack item : this.inventory.getContents()) {
+ if (!item.isEmpty() && !EnchantmentManager.c(item)) { // PAIL: shouldNotDrop (Vanishing enchant) + if (!item.isEmpty() && !EnchantmentManager.e(item)) { // PAIL: shouldNotDrop (Vanishing enchant)
+ loot.add(CraftItemStack.asCraftMirror(item)); + loot.add(CraftItemStack.asCraftMirror(item));
+ } + }
+ } + }
@ -243,7 +243,7 @@
scoreboardscore.incrementScore(); scoreboardscore.incrementScore();
} }
@@ -385,13 +491,15 @@ @@ -402,13 +508,15 @@
} }
private boolean canPvP() { private boolean canPvP() {
@ -261,7 +261,7 @@
this.world.kill(this); this.world.kill(this);
if (!this.viewingCredits) { if (!this.viewingCredits) {
this.viewingCredits = true; this.viewingCredits = true;
@@ -412,7 +520,10 @@ @@ -429,7 +537,10 @@
this.b((Statistic) AchievementList.y); this.b((Statistic) AchievementList.y);
} }
@ -273,7 +273,7 @@
this.playerConnection.sendPacket(new PacketPlayOutWorldEvent(1032, BlockPosition.ZERO, 0, false)); this.playerConnection.sendPacket(new PacketPlayOutWorldEvent(1032, BlockPosition.ZERO, 0, false));
this.lastSentExp = -1; this.lastSentExp = -1;
this.lastHealthSent = -1.0F; this.lastHealthSent = -1.0F;
@@ -457,6 +568,7 @@ @@ -474,6 +585,7 @@
} }
public void a(boolean flag, boolean flag1, boolean flag2) { public void a(boolean flag, boolean flag1, boolean flag2) {
@ -281,7 +281,7 @@
if (this.isSleeping()) { if (this.isSleeping()) {
this.x().getTracker().sendPacketToEntity(this, new PacketPlayOutAnimation(this, 2)); this.x().getTracker().sendPacketToEntity(this, new PacketPlayOutAnimation(this, 2));
} }
@@ -535,23 +647,52 @@ @@ -552,23 +664,52 @@
this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition())); this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
} }
@ -337,7 +337,7 @@
if (iinventory instanceof ILootable && ((ILootable) iinventory).b() != null && this.isSpectator()) { if (iinventory instanceof ILootable && ((ILootable) iinventory).b() != null && this.isSpectator()) {
this.a((new ChatMessage("container.spectatorCantOpen", new Object[0])).setChatModifier((new ChatModifier()).setColor(EnumChatFormat.RED)), true); this.a((new ChatMessage("container.spectatorCantOpen", new Object[0])).setChatModifier((new ChatModifier()).setColor(EnumChatFormat.RED)), true);
} else { } else {
@@ -565,18 +706,21 @@ @@ -582,18 +723,21 @@
if (itileinventory.isLocked() && !this.a(itileinventory.getLock()) && !this.isSpectator()) { if (itileinventory.isLocked() && !this.a(itileinventory.getLock()) && !this.isSpectator()) {
this.playerConnection.sendPacket(new PacketPlayOutChat(new ChatMessage("container.isLocked", new Object[] { iinventory.getScoreboardDisplayName()}), (byte) 2)); this.playerConnection.sendPacket(new PacketPlayOutChat(new ChatMessage("container.isLocked", new Object[] { iinventory.getScoreboardDisplayName()}), (byte) 2));
this.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.Y, SoundCategory.BLOCKS, this.locX, this.locY, this.locZ, 1.0F, 1.0F)); this.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.Y, SoundCategory.BLOCKS, this.locX, this.locY, this.locZ, 1.0F, 1.0F));
@ -361,7 +361,7 @@
this.activeContainer.windowId = this.containerCounter; this.activeContainer.windowId = this.containerCounter;
this.activeContainer.addSlotListener(this); this.activeContainer.addSlotListener(this);
@@ -584,8 +728,14 @@ @@ -601,8 +745,14 @@
} }
public void openTrade(IMerchant imerchant) { public void openTrade(IMerchant imerchant) {
@ -377,7 +377,7 @@
this.activeContainer.windowId = this.containerCounter; this.activeContainer.windowId = this.containerCounter;
this.activeContainer.addSlotListener(this); this.activeContainer.addSlotListener(this);
InventoryMerchant inventorymerchant = ((ContainerMerchant) this.activeContainer).e(); InventoryMerchant inventorymerchant = ((ContainerMerchant) this.activeContainer).e();
@@ -605,13 +755,20 @@ @@ -622,13 +772,20 @@
} }
public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) { public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) {
@ -399,7 +399,7 @@
this.activeContainer.windowId = this.containerCounter; this.activeContainer.windowId = this.containerCounter;
this.activeContainer.addSlotListener(this); this.activeContainer.addSlotListener(this);
} }
@@ -648,6 +805,11 @@ @@ -665,6 +822,11 @@
public void a(Container container, NonNullList<ItemStack> nonnulllist) { public void a(Container container, NonNullList<ItemStack> nonnulllist) {
this.playerConnection.sendPacket(new PacketPlayOutWindowItems(container.windowId, nonnulllist)); this.playerConnection.sendPacket(new PacketPlayOutWindowItems(container.windowId, nonnulllist));
this.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.inventory.getCarried())); this.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.inventory.getCarried()));
@ -411,7 +411,7 @@
} }
public void setContainerData(Container container, int i, int j) { public void setContainerData(Container container, int i, int j) {
@@ -662,6 +824,7 @@ @@ -679,6 +841,7 @@
} }
public void closeInventory() { public void closeInventory() {
@ -419,7 +419,7 @@
this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId)); this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId));
this.s(); this.s();
} }
@@ -743,7 +906,16 @@ @@ -760,7 +923,16 @@
public void triggerHealthUpdate() { public void triggerHealthUpdate() {
this.lastHealthSent = -1.0E8F; this.lastHealthSent = -1.0E8F;
@ -436,7 +436,7 @@
public void a(IChatBaseComponent ichatbasecomponent, boolean flag) { public void a(IChatBaseComponent ichatbasecomponent, boolean flag) {
this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, (byte) (flag ? 2 : 0))); this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, (byte) (flag ? 2 : 0)));
@@ -804,6 +976,8 @@ @@ -821,6 +993,8 @@
} }
public void a(EnumGamemode enumgamemode) { public void a(EnumGamemode enumgamemode) {
@ -445,7 +445,7 @@
this.playerInteractManager.setGameMode(enumgamemode); this.playerInteractManager.setGameMode(enumgamemode);
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.getId())); this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.getId()));
if (enumgamemode == EnumGamemode.SPECTATOR) { if (enumgamemode == EnumGamemode.SPECTATOR) {
@@ -814,6 +988,7 @@ @@ -831,6 +1005,7 @@
this.updateAbilities(); this.updateAbilities();
this.cw(); this.cw();
@ -453,7 +453,7 @@
} }
public boolean isSpectator() { public boolean isSpectator() {
@@ -829,6 +1004,7 @@ @@ -846,6 +1021,7 @@
} }
public boolean a(int i, String s) { public boolean a(int i, String s) {
@ -461,7 +461,7 @@
if ("seed".equals(s) && !this.server.aa()) { if ("seed".equals(s) && !this.server.aa()) {
return true; return true;
} else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) { } else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) {
@@ -842,6 +1018,15 @@ @@ -859,6 +1035,15 @@
} else { } else {
return true; return true;
} }
@ -477,7 +477,7 @@
} }
public String A() { public String A() {
@@ -853,6 +1038,12 @@ @@ -870,6 +1055,12 @@
} }
public void a(PacketPlayInSettings packetplayinsettings) { public void a(PacketPlayInSettings packetplayinsettings) {
@ -490,7 +490,7 @@
this.locale = packetplayinsettings.a(); this.locale = packetplayinsettings.a();
this.cg = packetplayinsettings.c(); this.cg = packetplayinsettings.c();
this.ch = packetplayinsettings.d(); this.ch = packetplayinsettings.d();
@@ -941,7 +1132,7 @@ @@ -958,7 +1149,7 @@
@Nullable @Nullable
public IChatBaseComponent getPlayerListName() { public IChatBaseComponent getPlayerListName() {
@ -499,7 +499,7 @@
} }
public void a(EnumHand enumhand) { public void a(EnumHand enumhand) {
@@ -958,11 +1149,150 @@ @@ -975,11 +1166,150 @@
} }
public void M() { public void M() {

Datei anzeigen

@ -99,8 +99,8 @@
entityareaeffectcloud.setSource(this.getShooter()); entityareaeffectcloud.setSource(this.getShooter());
entityareaeffectcloud.setRadius(3.0F); entityareaeffectcloud.setRadius(3.0F);
entityareaeffectcloud.setRadiusOnUse(-0.5F); entityareaeffectcloud.setRadiusOnUse(-0.5F);
@@ -181,7 +214,14 @@ @@ -187,7 +220,14 @@
entityareaeffectcloud.a(new MobEffect(mobeffect)); entityareaeffectcloud.setColor(nbttagcompound.getInt("CustomPotionColor"));
} }
- this.world.addEntity(entityareaeffectcloud); - this.world.addEntity(entityareaeffectcloud);

Datei anzeigen

@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityTippedArrow.java --- a/net/minecraft/server/EntityTippedArrow.java
+++ b/net/minecraft/server/EntityTippedArrow.java +++ b/net/minecraft/server/EntityTippedArrow.java
@@ -102,6 +102,25 @@ @@ -116,6 +116,25 @@
} }
} }
@ -23,6 +23,6 @@
+ } + }
+ // CraftBukkit end + // CraftBukkit end
+ +
public int q() { public int o() {
return ((Integer) this.datawatcher.get(EntityTippedArrow.f)).intValue(); return ((Integer) this.datawatcher.get(EntityTippedArrow.f)).intValue();
} }

Datei anzeigen

@ -13,7 +13,7 @@
public class EntityWither extends EntityMonster implements IRangedEntity { public class EntityWither extends EntityMonster implements IRangedEntity {
private static final DataWatcherObject<Integer> a = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b); private static final DataWatcherObject<Integer> a = DataWatcher.a(EntityWither.class, DataWatcherRegistry.b);
@@ -188,13 +194,38 @@ @@ -193,13 +199,38 @@
if (this.dh() > 0) { if (this.dh() > 0) {
i = this.dh() - 1; i = this.dh() - 1;
if (i <= 0) { if (i <= 0) {
@ -55,7 +55,7 @@
} }
} else { } else {
@@ -285,6 +316,11 @@ @@ -290,6 +321,11 @@
Block block = iblockdata.getBlock(); Block block = iblockdata.getBlock();
if (iblockdata.getMaterial() != Material.AIR && a(block)) { if (iblockdata.getMaterial() != Material.AIR && a(block)) {
@ -67,7 +67,7 @@
flag = this.world.setAir(blockposition, true) || flag; flag = this.world.setAir(blockposition, true) || flag;
} }
} }
@@ -298,7 +334,7 @@ @@ -303,7 +339,7 @@
} }
if (this.ticksLived % 20 == 0) { if (this.ticksLived % 20 == 0) {

Datei anzeigen

@ -57,8 +57,8 @@
+ } + }
+ // CraftBukkit end + // CraftBukkit end
+ +
if (packethandshakinginsetprotocol.b() > 315) { if (packethandshakinginsetprotocol.b() > 316) {
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.11"); chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.11.1");
this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext)); this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
@@ -26,6 +71,7 @@ @@ -26,6 +71,7 @@
this.b.close(chatcomponenttext); this.b.close(chatcomponenttext);

Datei anzeigen

@ -8,14 +8,19 @@
public class ItemFishingRod extends Item { public class ItemFishingRod extends Item {
public ItemFishingRod() { public ItemFishingRod() {
@@ -19,9 +21,18 @@ @@ -19,7 +21,6 @@
itemstack.damage(i, entityhuman); itemstack.damage(i, entityhuman);
entityhuman.a(enumhand); entityhuman.a(enumhand);
} else { } else {
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F)); - world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
if (!world.isClientSide) { if (!world.isClientSide) {
+ // CraftBukkit start
EntityFishingHook entityfishinghook = new EntityFishingHook(world, entityhuman); EntityFishingHook entityfishinghook = new EntityFishingHook(world, entityhuman);
int j = EnchantmentManager.c(itemstack);
@@ -34,6 +35,17 @@
entityfishinghook.b(k);
}
+ // CraftBukkit start
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING); + PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING);
+ world.getServer().getPluginManager().callEvent(playerFishEvent); + world.getServer().getPluginManager().callEvent(playerFishEvent);
+ +
@ -25,6 +30,7 @@
+ } + }
+ world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F)); + world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
+ // CraftBukkit end + // CraftBukkit end
+
world.addEntity(entityfishinghook); world.addEntity(entityfishinghook);
} }

Datei anzeigen

@ -1,6 +1,6 @@
--- a/net/minecraft/server/ItemMonsterEgg.java --- a/net/minecraft/server/ItemMonsterEgg.java
+++ b/net/minecraft/server/ItemMonsterEgg.java +++ b/net/minecraft/server/ItemMonsterEgg.java
@@ -153,6 +153,11 @@ @@ -152,6 +152,11 @@
@Nullable @Nullable
public static Entity a(World world, @Nullable MinecraftKey minecraftkey, double d0, double d1, double d2) { public static Entity a(World world, @Nullable MinecraftKey minecraftkey, double d0, double d1, double d2) {
@ -12,7 +12,7 @@
if (minecraftkey != null && EntityTypes.eggInfo.containsKey(minecraftkey)) { if (minecraftkey != null && EntityTypes.eggInfo.containsKey(minecraftkey)) {
Entity entity = null; Entity entity = null;
@@ -165,8 +170,13 @@ @@ -164,8 +169,13 @@
entityinsentient.aP = entityinsentient.yaw; entityinsentient.aP = entityinsentient.yaw;
entityinsentient.aN = entityinsentient.yaw; entityinsentient.aN = entityinsentient.yaw;
entityinsentient.prepare(world.D(new BlockPosition(entityinsentient)), (GroupDataEntity) null); entityinsentient.prepare(world.D(new BlockPosition(entityinsentient)), (GroupDataEntity) null);

Datei anzeigen

@ -1,6 +1,6 @@
--- a/net/minecraft/server/MobSpawnerAbstract.java --- a/net/minecraft/server/MobSpawnerAbstract.java
+++ b/net/minecraft/server/MobSpawnerAbstract.java +++ b/net/minecraft/server/MobSpawnerAbstract.java
@@ -104,7 +104,7 @@ @@ -102,7 +102,7 @@
((EntityInsentient) entity).prepare(world.D(new BlockPosition(entity)), (GroupDataEntity) null); ((EntityInsentient) entity).prepare(world.D(new BlockPosition(entity)), (GroupDataEntity) null);
} }

Datei anzeigen

@ -267,7 +267,7 @@
+ +
this.minecraftServer.getPlayerList().d(this.player); this.minecraftServer.getPlayerList().d(this.player);
this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2); this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2);
this.D = d11 >= -0.03125D && !this.minecraftServer.getAllowFlight() && !worldserver.d(entity.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D)); this.D = d11 >= -0.03125D && !this.minecraftServer.getAllowFlight() && !worldserver.c(entity.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D));
@@ -260,7 +442,7 @@ @@ -260,7 +442,7 @@
} else { } else {
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
@ -300,113 +300,113 @@
double d0 = this.player.locX; double d0 = this.player.locX;
double d1 = this.player.locY; double d1 = this.player.locY;
double d2 = this.player.locZ; double d2 = this.player.locZ;
@@ -295,15 +485,33 @@ @@ -301,15 +491,33 @@
++this.receivedMovePackets; ++this.receivedMovePackets;
int i = this.receivedMovePackets - this.processedMovePackets; int i = this.receivedMovePackets - this.processedMovePackets;
- if (i > 5) { - if (i > 5) {
+ // CraftBukkit start - handle custom speeds and skipped ticks + // CraftBukkit start - handle custom speeds and skipped ticks
+ this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick; + this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
+ this.allowedPlayerTicks = Math.max(this.allowedPlayerTicks, 1); + this.allowedPlayerTicks = Math.max(this.allowedPlayerTicks, 1);
+ this.lastTick = (int) (System.currentTimeMillis() / 50); + this.lastTick = (int) (System.currentTimeMillis() / 50);
+ +
+ if (i > Math.max(this.allowedPlayerTicks, 5)) { + if (i > Math.max(this.allowedPlayerTicks, 5)) {
PlayerConnection.LOGGER.debug("{} is sending move packets too frequently ({} packets since last tick)", new Object[] { this.player.getName(), Integer.valueOf(i)}); PlayerConnection.LOGGER.debug("{} is sending move packets too frequently ({} packets since last tick)", new Object[] { this.player.getName(), Integer.valueOf(i)});
i = 1; i = 1;
}
+ if (packetplayinflying.hasLook || d11 > 0) {
+ allowedPlayerTicks -= 1;
+ } else {
+ allowedPlayerTicks = 20;
+ }
+ float speed;
+ if (player.abilities.isFlying) {
+ speed = player.abilities.flySpeed * 20f;
+ } else {
+ speed = player.abilities.walkSpeed * 10f;
+ }
+
if (!this.player.K() && (!this.player.x().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.cH())) {
float f2 = this.player.cH() ? 300.0F : 100.0F;
- if (d11 - d10 > (double) (f2 * (float) i) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
+ if (d11 - d10 > Math.max(f2, Math.pow((double) (10.0F * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
+ // CraftBukkit end
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[] { this.player.getName(), Double.valueOf(d7), Double.valueOf(d8), Double.valueOf(d9)});
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
return;
@@ -349,6 +557,69 @@
} }
}
+ // CraftBukkit start - fire PlayerMoveEvent + if (packetplayinflying.hasLook || d11 > 0) {
+ // Rest to old location first + allowedPlayerTicks -= 1;
+ this.player.setLocation(prevX, prevY, prevZ, prevYaw, prevPitch); + } else {
+ allowedPlayerTicks = 20;
+ }
+ float speed;
+ if (player.abilities.isFlying) {
+ speed = player.abilities.flySpeed * 20f;
+ } else {
+ speed = player.abilities.walkSpeed * 10f;
+ }
+ +
+ Player player = this.getPlayer(); if (!this.player.K() && (!this.player.x().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.cH())) {
+ Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location. float f2 = this.player.cH() ? 300.0F : 100.0F;
+ Location to = player.getLocation().clone(); // Start off the To location as the Players current location.
- if (d11 - d10 > (double) (f2 * (float) i) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
+ if (d11 - d10 > Math.max(f2, Math.pow((double) (10.0F * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
+ // CraftBukkit end
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[] { this.player.getName(), Double.valueOf(d7), Double.valueOf(d8), Double.valueOf(d9)});
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
return;
@@ -355,6 +563,69 @@
}
}
+ // CraftBukkit start - fire PlayerMoveEvent
+ // Rest to old location first
+ this.player.setLocation(prevX, prevY, prevZ, prevYaw, prevPitch);
+ +
+ // If the packet contains movement information then we update the To location with the correct XYZ. + Player player = this.getPlayer();
+ if (packetplayinflying.hasPos) { + Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location.
+ to.setX(packetplayinflying.x); + Location to = player.getLocation().clone(); // Start off the To location as the Players current location.
+ to.setY(packetplayinflying.y);
+ to.setZ(packetplayinflying.z);
+ }
+ +
+ // If the packet contains look information then we update the To location with the correct Yaw & Pitch. + // If the packet contains movement information then we update the To location with the correct XYZ.
+ if (packetplayinflying.hasLook) { + if (packetplayinflying.hasPos) {
+ to.setYaw(packetplayinflying.yaw); + to.setX(packetplayinflying.x);
+ to.setPitch(packetplayinflying.pitch); + to.setY(packetplayinflying.y);
+ } + to.setZ(packetplayinflying.z);
+ }
+ +
+ // Prevent 40 event-calls for less than a single pixel of movement >.> + // If the packet contains look information then we update the To location with the correct Yaw & Pitch.
+ double delta = Math.pow(this.lastPosX - to.getX(), 2) + Math.pow(this.lastPosY - to.getY(), 2) + Math.pow(this.lastPosZ - to.getZ(), 2); + if (packetplayinflying.hasLook) {
+ float deltaAngle = Math.abs(this.lastYaw - to.getYaw()) + Math.abs(this.lastPitch - to.getPitch()); + to.setYaw(packetplayinflying.yaw);
+ to.setPitch(packetplayinflying.pitch);
+ }
+ +
+ if ((delta > 1f / 256 || deltaAngle > 10f) && !this.player.isFrozen()) { + // Prevent 40 event-calls for less than a single pixel of movement >.>
+ this.lastPosX = to.getX(); + double delta = Math.pow(this.lastPosX - to.getX(), 2) + Math.pow(this.lastPosY - to.getY(), 2) + Math.pow(this.lastPosZ - to.getZ(), 2);
+ this.lastPosY = to.getY(); + float deltaAngle = Math.abs(this.lastYaw - to.getYaw()) + Math.abs(this.lastPitch - to.getPitch());
+ this.lastPosZ = to.getZ();
+ this.lastYaw = to.getYaw();
+ this.lastPitch = to.getPitch();
+ +
+ // Skip the first time we do this + if ((delta > 1f / 256 || deltaAngle > 10f) && !this.player.isFrozen()) {
+ if (from.getX() != Double.MAX_VALUE) { + this.lastPosX = to.getX();
+ Location oldTo = to.clone(); + this.lastPosY = to.getY();
+ PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); + this.lastPosZ = to.getZ();
+ this.server.getPluginManager().callEvent(event); + this.lastYaw = to.getYaw();
+ this.lastPitch = to.getPitch();
+ +
+ // If the event is cancelled we move the player back to their old location. + // Skip the first time we do this
+ if (event.isCancelled()) { + if (from.getX() != Double.MAX_VALUE) {
+ teleport(from); + Location oldTo = to.clone();
+ return; + PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
+ } + this.server.getPluginManager().callEvent(event);
+ +
+ // If a Plugin has changed the To destination then we teleport the Player + // If the event is cancelled we move the player back to their old location.
+ // there to avoid any 'Moved wrongly' or 'Moved too quickly' errors. + if (event.isCancelled()) {
+ // We only do this if the Event was not cancelled. + teleport(from);
+ if (!oldTo.equals(event.getTo()) && !event.isCancelled()) { + return;
+ this.player.getBukkitEntity().teleport(event.getTo(), PlayerTeleportEvent.TeleportCause.UNKNOWN); + }
+ return;
+ }
+ +
+ // Check to see if the Players Location has some how changed during the call of the event. + // If a Plugin has changed the To destination then we teleport the Player
+ // This can happen due to a plugin teleporting the player instead of using .setTo() + // there to avoid any 'Moved wrongly' or 'Moved too quickly' errors.
+ if (!from.equals(this.getPlayer().getLocation()) && this.justTeleported) { + // We only do this if the Event was not cancelled.
+ this.justTeleported = false; + if (!oldTo.equals(event.getTo()) && !event.isCancelled()) {
+ return; + this.player.getBukkitEntity().teleport(event.getTo(), PlayerTeleportEvent.TeleportCause.UNKNOWN);
+ return;
+ }
+
+ // Check to see if the Players Location has some how changed during the call of the event.
+ // This can happen due to a plugin teleporting the player instead of using .setTo()
+ if (!from.equals(this.getPlayer().getLocation()) && this.justTeleported) {
+ this.justTeleported = false;
+ return;
+ }
+ } + }
+ } + }
+ } + this.player.setLocation(d4, d5, d6, f, f1); // Copied from above
+ this.player.setLocation(d4, d5, d6, f, f1); // Copied from above + // CraftBukkit end
+ // CraftBukkit end
+ +
this.B = d12 >= -0.03125D; this.B = d12 >= -0.03125D;
this.B &= !this.minecraftServer.getAllowFlight() && !this.player.abilities.canFly; this.B &= !this.minecraftServer.getAllowFlight() && !this.player.abilities.canFly;
this.B &= !this.player.hasEffect(MobEffects.LEVITATION) && !this.player.cH() && !worldserver.d(this.player.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D)); this.B &= !this.player.hasEffect(MobEffects.LEVITATION) && !this.player.cH() && !worldserver.c(this.player.getBoundingBox().g(0.0625D).b(0.0D, -0.55D, 0.0D));
@@ -365,10 +636,68 @@ @@ -372,10 +643,68 @@
} }
public void a(double d0, double d1, double d2, float f, float f1) { public void a(double d0, double d1, double d2, float f, float f1) {
@ -476,7 +476,7 @@
double d3 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.X) ? this.player.locX : 0.0D; double d3 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.X) ? this.player.locX : 0.0D;
double d4 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Y) ? this.player.locY : 0.0D; double d4 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Y) ? this.player.locY : 0.0D;
double d5 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Z) ? this.player.locZ : 0.0D; double d5 = set.contains(PacketPlayOutPosition.EnumPlayerTeleportFlags.Z) ? this.player.locZ : 0.0D;
@@ -385,6 +714,14 @@ @@ -392,6 +721,14 @@
f3 = f1 + this.player.pitch; f3 = f1 + this.player.pitch;
} }
@ -491,7 +491,7 @@
if (++this.teleportAwait == Integer.MAX_VALUE) { if (++this.teleportAwait == Integer.MAX_VALUE) {
this.teleportAwait = 0; this.teleportAwait = 0;
} }
@@ -396,6 +733,7 @@ @@ -403,6 +740,7 @@
public void a(PacketPlayInBlockDig packetplayinblockdig) { public void a(PacketPlayInBlockDig packetplayinblockdig) {
PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.x());
@ -499,7 +499,7 @@
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
BlockPosition blockposition = packetplayinblockdig.a(); BlockPosition blockposition = packetplayinblockdig.a();
@@ -405,7 +743,15 @@ @@ -412,7 +750,15 @@
if (!this.player.isSpectator()) { if (!this.player.isSpectator()) {
ItemStack itemstack = this.player.b(EnumHand.OFF_HAND); ItemStack itemstack = this.player.b(EnumHand.OFF_HAND);
@ -516,7 +516,7 @@
this.player.a(EnumHand.MAIN_HAND, itemstack); this.player.a(EnumHand.MAIN_HAND, itemstack);
} }
@@ -413,6 +759,21 @@ @@ -420,6 +766,21 @@
case DROP_ITEM: case DROP_ITEM:
if (!this.player.isSpectator()) { if (!this.player.isSpectator()) {
@ -538,7 +538,7 @@
this.player.a(false); this.player.a(false);
} }
@@ -446,7 +807,15 @@ @@ -453,7 +814,15 @@
if (!this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) { if (!this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
this.player.playerInteractManager.a(blockposition, packetplayinblockdig.b()); this.player.playerInteractManager.a(blockposition, packetplayinblockdig.b());
} else { } else {
@ -554,7 +554,7 @@
} }
} else { } else {
if (packetplayinblockdig.c() == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) { if (packetplayinblockdig.c() == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) {
@@ -466,10 +835,12 @@ @@ -473,10 +842,12 @@
default: default:
throw new IllegalArgumentException("Invalid player action"); throw new IllegalArgumentException("Invalid player action");
} }
@ -567,7 +567,7 @@
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
EnumHand enumhand = packetplayinuseitem.c(); EnumHand enumhand = packetplayinuseitem.c();
ItemStack itemstack = this.player.b(enumhand); ItemStack itemstack = this.player.b(enumhand);
@@ -483,6 +854,13 @@ @@ -490,6 +861,13 @@
chatmessage.getChatModifier().setColor(EnumChatFormat.RED); chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
this.player.playerConnection.sendPacket(new PacketPlayOutChat(chatmessage, (byte) 2)); this.player.playerConnection.sendPacket(new PacketPlayOutChat(chatmessage, (byte) 2));
} else if (this.teleportPos == null && this.player.d((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && !this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) { } else if (this.teleportPos == null && this.player.d((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && !this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
@ -581,7 +581,7 @@
this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand, blockposition, enumdirection, packetplayinuseitem.d(), packetplayinuseitem.e(), packetplayinuseitem.f()); this.player.playerInteractManager.a(this.player, worldserver, itemstack, enumhand, blockposition, enumdirection, packetplayinuseitem.d(), packetplayinuseitem.e(), packetplayinuseitem.f());
} }
@@ -492,13 +870,52 @@ @@ -499,13 +877,52 @@
public void a(PacketPlayInBlockPlace packetplayinblockplace) { public void a(PacketPlayInBlockPlace packetplayinblockplace) {
PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.x());
@ -635,7 +635,7 @@
} }
} }
@@ -509,8 +926,8 @@ @@ -516,8 +933,8 @@
WorldServer[] aworldserver = this.minecraftServer.worldServer; WorldServer[] aworldserver = this.minecraftServer.worldServer;
int i = aworldserver.length; int i = aworldserver.length;
@ -646,7 +646,7 @@
if (worldserver != null) { if (worldserver != null) {
entity = packetplayinspectate.a(worldserver); entity = packetplayinspectate.a(worldserver);
@@ -523,6 +940,8 @@ @@ -530,6 +947,8 @@
if (entity != null) { if (entity != null) {
this.player.setSpectatorTarget(this.player); this.player.setSpectatorTarget(this.player);
this.player.stopRiding(); this.player.stopRiding();
@ -655,7 +655,7 @@
if (entity.world == this.player.world) { if (entity.world == this.player.world) {
this.player.enderTeleportTo(entity.locX, entity.locY, entity.locZ); this.player.enderTeleportTo(entity.locX, entity.locY, entity.locZ);
} else { } else {
@@ -548,12 +967,19 @@ @@ -555,12 +974,19 @@
this.minecraftServer.getPlayerList().b(this.player, worldserver2); this.minecraftServer.getPlayerList().b(this.player, worldserver2);
this.minecraftServer.getPlayerList().updateClient(this.player); this.minecraftServer.getPlayerList().updateClient(this.player);
} }
@ -676,7 +676,7 @@
public void a(PacketPlayInBoatMove packetplayinboatmove) { public void a(PacketPlayInBoatMove packetplayinboatmove) {
PlayerConnectionUtils.ensureMainThread(packetplayinboatmove, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinboatmove, this, this.player.x());
@@ -566,14 +992,29 @@ @@ -573,14 +999,29 @@
} }
public void a(IChatBaseComponent ichatbasecomponent) { public void a(IChatBaseComponent ichatbasecomponent) {
@ -708,7 +708,7 @@
if (this.minecraftServer.R() && this.player.getName().equals(this.minecraftServer.Q())) { if (this.minecraftServer.R() && this.player.getName().equals(this.minecraftServer.Q())) {
PlayerConnection.LOGGER.info("Stopping singleplayer server as player logged out"); PlayerConnection.LOGGER.info("Stopping singleplayer server as player logged out");
this.minecraftServer.safeShutdown(); this.minecraftServer.safeShutdown();
@@ -595,6 +1036,15 @@ @@ -602,6 +1043,15 @@
} }
} }
@ -724,7 +724,7 @@
try { try {
this.networkManager.sendPacket(packet); this.networkManager.sendPacket(packet);
} catch (Throwable throwable) { } catch (Throwable throwable) {
@@ -616,17 +1066,32 @@ @@ -623,17 +1073,32 @@
public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) { public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) {
PlayerConnectionUtils.ensureMainThread(packetplayinhelditemslot, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinhelditemslot, this, this.player.x());
@ -759,7 +759,7 @@
ChatMessage chatmessage = new ChatMessage("chat.cannotSend", new Object[0]); ChatMessage chatmessage = new ChatMessage("chat.cannotSend", new Object[0]);
chatmessage.getChatModifier().setColor(EnumChatFormat.RED); chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
@@ -639,39 +1104,249 @@ @@ -646,39 +1111,249 @@
for (int i = 0; i < s.length(); ++i) { for (int i = 0; i < s.length(); ++i) {
if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) { if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) {
@ -1017,7 +1017,7 @@
this.player.resetIdleTimer(); this.player.resetIdleTimer();
IJumpable ijumpable; IJumpable ijumpable;
@@ -743,6 +1418,7 @@ @@ -750,6 +1425,7 @@
public void a(PacketPlayInUseEntity packetplayinuseentity) { public void a(PacketPlayInUseEntity packetplayinuseentity) {
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.x());
@ -1025,7 +1025,7 @@
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
Entity entity = packetplayinuseentity.a((World) worldserver); Entity entity = packetplayinuseentity.a((World) worldserver);
@@ -758,20 +1434,68 @@ @@ -765,20 +1441,68 @@
if (this.player.h(entity) < d0) { if (this.player.h(entity) < d0) {
EnumHand enumhand; EnumHand enumhand;
@ -1095,7 +1095,7 @@
} }
} }
} }
@@ -787,7 +1511,8 @@ @@ -794,7 +1518,8 @@
case PERFORM_RESPAWN: case PERFORM_RESPAWN:
if (this.player.viewingCredits) { if (this.player.viewingCredits) {
this.player.viewingCredits = false; this.player.viewingCredits = false;
@ -1105,7 +1105,7 @@
} else { } else {
if (this.player.getHealth() > 0.0F) { if (this.player.getHealth() > 0.0F) {
return; return;
@@ -813,14 +1538,20 @@ @@ -820,14 +1545,20 @@
public void a(PacketPlayInCloseWindow packetplayinclosewindow) { public void a(PacketPlayInCloseWindow packetplayinclosewindow) {
PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.x());
@ -1127,7 +1127,7 @@
NonNullList nonnulllist = NonNullList.a(); NonNullList nonnulllist = NonNullList.a();
for (int i = 0; i < this.player.activeContainer.c.size(); ++i) { for (int i = 0; i < this.player.activeContainer.c.size(); ++i) {
@@ -829,8 +1560,279 @@ @@ -836,8 +1567,279 @@
this.player.a(this.player.activeContainer, nonnulllist); this.player.a(this.player.activeContainer, nonnulllist);
} else { } else {
@ -1136,10 +1136,10 @@
+ if (packetplayinwindowclick.b() < -1 && packetplayinwindowclick.b() != -999) { + if (packetplayinwindowclick.b() < -1 && packetplayinwindowclick.b() != -999) {
+ return; + return;
+ } + }
+
+ InventoryView inventory = this.player.activeContainer.getBukkitView(); + InventoryView inventory = this.player.activeContainer.getBukkitView();
+ SlotType type = CraftInventoryView.getSlotType(inventory, packetplayinwindowclick.b()); + SlotType type = CraftInventoryView.getSlotType(inventory, packetplayinwindowclick.b());
+
+ InventoryClickEvent event; + InventoryClickEvent event;
+ ClickType click = ClickType.UNKNOWN; + ClickType click = ClickType.UNKNOWN;
+ InventoryAction action = InventoryAction.UNKNOWN; + InventoryAction action = InventoryAction.UNKNOWN;
@ -1408,7 +1408,7 @@
if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) { if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) {
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true)); this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true));
this.player.f = true; this.player.f = true;
@@ -859,6 +1861,7 @@ @@ -866,6 +1868,7 @@
public void a(PacketPlayInEnchantItem packetplayinenchantitem) { public void a(PacketPlayInEnchantItem packetplayinenchantitem) {
PlayerConnectionUtils.ensureMainThread(packetplayinenchantitem, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinenchantitem, this, this.player.x());
@ -1416,7 +1416,7 @@
this.player.resetIdleTimer(); this.player.resetIdleTimer();
if (this.player.activeContainer.windowId == packetplayinenchantitem.a() && this.player.activeContainer.c(this.player) && !this.player.isSpectator()) { if (this.player.activeContainer.windowId == packetplayinenchantitem.a() && this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
this.player.activeContainer.a(this.player, packetplayinenchantitem.b()); this.player.activeContainer.a(this.player, packetplayinenchantitem.b());
@@ -892,7 +1895,46 @@ @@ -899,7 +1902,46 @@
} }
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() <= 45; boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() <= 45;
@ -1464,7 +1464,7 @@
if (flag1 && flag2) { if (flag1 && flag2) {
if (itemstack.isEmpty()) { if (itemstack.isEmpty()) {
@@ -916,6 +1958,7 @@ @@ -923,6 +1965,7 @@
public void a(PacketPlayInTransaction packetplayintransaction) { public void a(PacketPlayInTransaction packetplayintransaction) {
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.x());
@ -1472,7 +1472,7 @@
Short oshort = (Short) this.k.get(this.player.activeContainer.windowId); Short oshort = (Short) this.k.get(this.player.activeContainer.windowId);
if (oshort != null && packetplayintransaction.b() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) { if (oshort != null && packetplayintransaction.b() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
@@ -926,6 +1969,7 @@ @@ -933,6 +1976,7 @@
public void a(PacketPlayInUpdateSign packetplayinupdatesign) { public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.x());
@ -1480,7 +1480,7 @@
this.player.resetIdleTimer(); this.player.resetIdleTimer();
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
BlockPosition blockposition = packetplayinupdatesign.a(); BlockPosition blockposition = packetplayinupdatesign.a();
@@ -942,14 +1986,30 @@ @@ -949,14 +1993,30 @@
if (!tileentitysign.a() || tileentitysign.e() != this.player) { if (!tileentitysign.a() || tileentitysign.e() != this.player) {
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign"); this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
@ -1512,7 +1512,7 @@
tileentitysign.update(); tileentitysign.update();
worldserver.notify(blockposition, iblockdata, iblockdata, 3); worldserver.notify(blockposition, iblockdata, iblockdata, 3);
@@ -972,11 +2032,27 @@ @@ -979,11 +2039,27 @@
public void a(PacketPlayInAbilities packetplayinabilities) { public void a(PacketPlayInAbilities packetplayinabilities) {
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x()); PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
@ -1541,7 +1541,7 @@
ArrayList arraylist = Lists.newArrayList(); ArrayList arraylist = Lists.newArrayList();
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator(); Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator();
@@ -1020,10 +2096,13 @@ @@ -1027,10 +2103,13 @@
} }
if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) { if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
@ -1555,7 +1555,7 @@
} }
} else { } else {
String s1; String s1;
@@ -1062,10 +2141,11 @@ @@ -1069,10 +2148,11 @@
} }
itemstack2.a("pages", (NBTBase) nbttaglist); itemstack2.a("pages", (NBTBase) nbttaglist);
@ -1568,7 +1568,7 @@
} }
} else if ("MC|TrSel".equals(s)) { } else if ("MC|TrSel".equals(s)) {
try { try {
@@ -1077,6 +2157,7 @@ @@ -1084,6 +2164,7 @@
} }
} catch (Exception exception2) { } catch (Exception exception2) {
PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2); PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
@ -1576,7 +1576,7 @@
} }
} else { } else {
TileEntity tileentity; TileEntity tileentity;
@@ -1126,6 +2207,7 @@ @@ -1133,6 +2214,7 @@
} }
} catch (Exception exception3) { } catch (Exception exception3) {
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3); PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3);
@ -1584,7 +1584,7 @@
} }
} else if ("MC|AutoCmd".equals(s)) { } else if ("MC|AutoCmd".equals(s)) {
if (!this.minecraftServer.getEnableCommandBlock()) { if (!this.minecraftServer.getEnableCommandBlock()) {
@@ -1193,6 +2275,7 @@ @@ -1200,6 +2282,7 @@
} }
} catch (Exception exception4) { } catch (Exception exception4) {
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4); PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4);
@ -1592,7 +1592,7 @@
} }
} else { } else {
int k; int k;
@@ -1216,6 +2299,7 @@ @@ -1223,6 +2306,7 @@
} }
} catch (Exception exception5) { } catch (Exception exception5) {
PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5); PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
@ -1600,7 +1600,7 @@
} }
} }
} else if ("MC|ItemName".equals(s)) { } else if ("MC|ItemName".equals(s)) {
@@ -1302,6 +2386,7 @@ @@ -1309,6 +2393,7 @@
} }
} catch (Exception exception6) { } catch (Exception exception6) {
PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6); PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6);
@ -1608,7 +1608,7 @@
} }
} else if ("MC|PickItem".equals(s)) { } else if ("MC|PickItem".equals(s)) {
packetdataserializer = packetplayincustompayload.b(); packetdataserializer = packetplayincustompayload.b();
@@ -1316,9 +2401,31 @@ @@ -1323,9 +2408,31 @@
PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7); PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
} }
} }

Datei anzeigen

@ -116,7 +116,7 @@
playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
this.b(entityplayer, worldserver); this.b(entityplayer, worldserver);
if (!this.server.getResourcePack().isEmpty()) { if (!this.server.getResourcePack().isEmpty()) {
@@ -159,6 +204,8 @@ @@ -151,6 +196,8 @@
} }
entityplayer.syncInventory(); entityplayer.syncInventory();
@ -125,7 +125,7 @@
} }
public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
@@ -191,26 +238,27 @@ @@ -183,26 +230,27 @@
} }
public void setPlayerFileData(WorldServer[] aworldserver) { public void setPlayerFileData(WorldServer[] aworldserver) {
@ -158,16 +158,16 @@
} }
public void b(WorldBorder worldborder, double d0) {} public void b(WorldBorder worldborder, double d0) {}
@@ -235,7 +283,7 @@ @@ -228,7 +276,7 @@
}
@Nullable
public NBTTagCompound a(EntityPlayer entityplayer) { public NBTTagCompound a(EntityPlayer entityplayer) {
- NBTTagCompound nbttagcompound = this.server.worldServer[0].getWorldData().h(); - NBTTagCompound nbttagcompound = this.server.worldServer[0].getWorldData().h();
+ NBTTagCompound nbttagcompound = this.server.worlds.get(0).getWorldData().h(); // CraftBukkit + NBTTagCompound nbttagcompound = this.server.worlds.get(0).getWorldData().h(); // CraftBukkit
NBTTagCompound nbttagcompound1; NBTTagCompound nbttagcompound1;
if (entityplayer.getName().equals(this.server.Q()) && nbttagcompound != null) { if (entityplayer.getName().equals(this.server.Q()) && nbttagcompound != null) {
@@ -259,28 +307,72 @@ @@ -252,28 +300,72 @@
} }
@ -246,7 +246,7 @@
this.savePlayerFile(entityplayer); this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) { if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getVehicle(); Entity entity = entityplayer.getVehicle();
@@ -312,13 +404,61 @@ @@ -305,13 +397,61 @@
this.o.remove(uuid); this.o.remove(uuid);
} }
@ -311,7 +311,7 @@
GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile); GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile);
s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason(); s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason();
@@ -326,10 +466,12 @@ @@ -319,10 +459,12 @@
s = s + "\nYour ban will be removed on " + PlayerList.g.format(gameprofilebanentry.getExpires()); s = s + "\nYour ban will be removed on " + PlayerList.g.format(gameprofilebanentry.getExpires());
} }
@ -327,7 +327,7 @@
IpBanEntry ipbanentry = this.l.get(socketaddress); IpBanEntry ipbanentry = this.l.get(socketaddress);
s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason(); s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason();
@@ -337,13 +479,25 @@ @@ -330,13 +472,25 @@
s = s + "\nYour ban will be removed on " + PlayerList.g.format(ipbanentry.getExpires()); s = s + "\nYour ban will be removed on " + PlayerList.g.format(ipbanentry.getExpires());
} }
@ -356,7 +356,7 @@
UUID uuid = EntityHuman.a(gameprofile); UUID uuid = EntityHuman.a(gameprofile);
ArrayList arraylist = Lists.newArrayList(); ArrayList arraylist = Lists.newArrayList();
@@ -378,17 +532,26 @@ @@ -371,17 +525,26 @@
} }
return new EntityPlayer(this.server, this.server.getWorldServer(0), gameprofile, (PlayerInteractManager) object); return new EntityPlayer(this.server, this.server.getWorldServer(0), gameprofile, (PlayerInteractManager) object);
@ -384,7 +384,7 @@
entityplayer.dimension = i; entityplayer.dimension = i;
Object object; Object object;
@@ -399,6 +562,11 @@ @@ -392,6 +555,11 @@
} }
EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object); EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object);
@ -396,7 +396,7 @@
entityplayer1.playerConnection = entityplayer.playerConnection; entityplayer1.playerConnection = entityplayer.playerConnection;
entityplayer1.copyTo(entityplayer, flag); entityplayer1.copyTo(entityplayer, flag);
@@ -413,43 +581,157 @@ @@ -406,43 +574,157 @@
entityplayer1.a(s); entityplayer1.a(s);
} }
@ -427,13 +427,13 @@
+ entityplayer1.setRespawnPosition(null, true); + entityplayer1.setRespawnPosition(null, true);
+ entityplayer1.playerConnection.sendPacket(new PacketPlayOutGameStateChange(0, 0.0F)); + entityplayer1.playerConnection.sendPacket(new PacketPlayOutGameStateChange(0, 0.0F));
+ } + }
} + }
+ +
+ if (location == null) { + if (location == null) {
+ cworld = (CraftWorld) this.server.server.getWorlds().get(0); + cworld = (CraftWorld) this.server.server.getWorlds().get(0);
+ blockposition = cworld.getHandle().getSpawn(); + blockposition = cworld.getHandle().getSpawn();
+ location = new Location(cworld, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F)); + location = new Location(cworld, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F));
+ } }
+ +
+ Player respawnPlayer = cserver.getPlayer(entityplayer1); + Player respawnPlayer = cserver.getPlayer(entityplayer1);
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn); + PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
@ -571,7 +571,7 @@
public void f(EntityPlayer entityplayer) { public void f(EntityPlayer entityplayer) {
GameProfile gameprofile = entityplayer.getProfile(); GameProfile gameprofile = entityplayer.getProfile();
int i = this.isOp(gameprofile) ? this.operators.a(gameprofile) : 0; int i = this.isOp(gameprofile) ? this.operators.a(gameprofile) : 0;
@@ -488,12 +770,111 @@ @@ -481,12 +763,111 @@
} }
public void changeWorld(Entity entity, int i, WorldServer worldserver, WorldServer worldserver1) { public void changeWorld(Entity entity, int i, WorldServer worldserver, WorldServer worldserver1) {
@ -593,12 +593,12 @@
+ double d1 = enter.getZ(); + double d1 = enter.getZ();
+ double d2 = 8.0D; + double d2 = 8.0D;
+ /* + /*
double d0 = entity.locX; + double d0 = entity.locX;
double d1 = entity.locZ; + double d1 = entity.locZ;
double d2 = 8.0D; + double d2 = 8.0D;
float f = entity.yaw; + float f = entity.yaw;
+
worldserver.methodProfiler.a("moving"); + worldserver.methodProfiler.a("moving");
+ */ + */
+ if (worldserver1.dimension == -1) { + if (worldserver1.dimension == -1) {
+ d0 = MathHelper.a(d0 / d2, worldserver1.getWorldBorder().b()+ 16.0D, worldserver1.getWorldBorder().d() - 16.0D); + d0 = MathHelper.a(d0 / d2, worldserver1.getWorldBorder().b()+ 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
@ -668,12 +668,12 @@
+ int i = worldserver.dimension; + int i = worldserver.dimension;
+ +
+ /* + /*
+ double d0 = entity.locX; double d0 = entity.locX;
+ double d1 = entity.locZ; double d1 = entity.locZ;
+ double d2 = 8.0D; double d2 = 8.0D;
+ float f = entity.yaw; float f = entity.yaw;
+
+ worldserver.methodProfiler.a("moving"); worldserver.methodProfiler.a("moving");
+ */ + */
+ entity.setPositionRotation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch()); + entity.setPositionRotation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch());
+ if (entity.isAlive()) { + if (entity.isAlive()) {
@ -683,7 +683,7 @@
if (entity.dimension == -1) { if (entity.dimension == -1) {
d0 = MathHelper.a(d0 / 8.0D, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D); d0 = MathHelper.a(d0 / 8.0D, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
d1 = MathHelper.a(d1 / 8.0D, worldserver1.getWorldBorder().c() + 16.0D, worldserver1.getWorldBorder().e() - 16.0D); d1 = MathHelper.a(d1 / 8.0D, worldserver1.getWorldBorder().c() + 16.0D, worldserver1.getWorldBorder().e() - 16.0D);
@@ -512,6 +893,8 @@ @@ -505,6 +886,8 @@
BlockPosition blockposition; BlockPosition blockposition;
if (i == 1) { if (i == 1) {
@ -692,7 +692,7 @@
blockposition = worldserver1.getSpawn(); blockposition = worldserver1.getSpawn();
} else { } else {
blockposition = worldserver1.getDimensionSpawn(); blockposition = worldserver1.getDimensionSpawn();
@@ -525,16 +908,27 @@ @@ -518,16 +901,27 @@
worldserver.entityJoinedWorld(entity, false); worldserver.entityJoinedWorld(entity, false);
} }
} }
@ -723,7 +723,7 @@
worldserver1.entityJoinedWorld(entity, false); worldserver1.entityJoinedWorld(entity, false);
} }
@@ -542,11 +936,23 @@ @@ -535,11 +929,23 @@
} }
entity.spawnIn(worldserver1); entity.spawnIn(worldserver1);
@ -748,7 +748,7 @@
this.u = 0; this.u = 0;
} }
@@ -559,6 +965,25 @@ @@ -552,6 +958,25 @@
} }
@ -774,7 +774,7 @@
public void a(Packet<?> packet, int i) { public void a(Packet<?> packet, int i) {
for (int j = 0; j < this.players.size(); ++j) { for (int j = 0; j < this.players.size(); ++j) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(j); EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
@@ -657,11 +1082,23 @@ @@ -650,11 +1075,23 @@
this.operators.add(new OpListEntry(gameprofile, this.server.q(), this.operators.b(gameprofile))); this.operators.add(new OpListEntry(gameprofile, this.server.q(), this.operators.b(gameprofile)));
this.b(this.a(gameprofile.getId()), i); this.b(this.a(gameprofile.getId()), i);
@ -798,7 +798,7 @@
} }
private void b(EntityPlayer entityplayer, int i) { private void b(EntityPlayer entityplayer, int i) {
@@ -686,7 +1123,7 @@ @@ -679,7 +1116,7 @@
} }
public boolean isOp(GameProfile gameprofile) { public boolean isOp(GameProfile gameprofile) {
@ -807,7 +807,7 @@
} }
@Nullable @Nullable
@@ -710,6 +1147,12 @@ @@ -703,6 +1140,12 @@
for (int j = 0; j < this.players.size(); ++j) { for (int j = 0; j < this.players.size(); ++j) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(j); EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
@ -820,7 +820,7 @@
if (entityplayer != entityhuman && entityplayer.dimension == i) { if (entityplayer != entityhuman && entityplayer.dimension == i) {
double d4 = d0 - entityplayer.locX; double d4 = d0 - entityplayer.locX;
double d5 = d1 - entityplayer.locY; double d5 = d1 - entityplayer.locY;
@@ -757,7 +1200,7 @@ @@ -750,7 +1193,7 @@
public void reloadWhitelist() {} public void reloadWhitelist() {}
public void b(EntityPlayer entityplayer, WorldServer worldserver) { public void b(EntityPlayer entityplayer, WorldServer worldserver) {
@ -829,7 +829,7 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE)); entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE));
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean("doDaylightCycle"))); entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean("doDaylightCycle")));
@@ -765,16 +1208,21 @@ @@ -758,16 +1201,21 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
if (worldserver.W()) { if (worldserver.W()) {
@ -855,7 +855,7 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
} }
@@ -787,7 +1235,7 @@ @@ -780,7 +1228,7 @@
} }
public String[] getSeenPlayers() { public String[] getSeenPlayers() {
@ -864,7 +864,7 @@
} }
public boolean getHasWhitelist() { public boolean getHasWhitelist() {
@@ -836,17 +1284,29 @@ @@ -829,17 +1277,29 @@
} }
public void u() { public void u() {
@ -875,17 +875,17 @@
+ player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message + player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
} }
+ // CraftBukkit end + // CraftBukkit end
+
+ } }
+ // CraftBukkit start + // CraftBukkit start
+ public void sendMessage(IChatBaseComponent[] iChatBaseComponents) { + public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
+ for (IChatBaseComponent component : iChatBaseComponents) { + for (IChatBaseComponent component : iChatBaseComponents) {
+ sendMessage(component, true); + sendMessage(component, true);
+ } + }
} + }
+ // CraftBukkit end + // CraftBukkit end
+
public void sendMessage(IChatBaseComponent ichatbasecomponent, boolean flag) { public void sendMessage(IChatBaseComponent ichatbasecomponent, boolean flag) {
this.server.sendMessage(ichatbasecomponent); this.server.sendMessage(ichatbasecomponent);
int i = flag ? 1 : 0; int i = flag ? 1 : 0;
@ -897,7 +897,7 @@
} }
public void sendMessage(IChatBaseComponent ichatbasecomponent) { public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@@ -883,8 +1343,10 @@ @@ -876,8 +1336,10 @@
WorldServer[] aworldserver = this.server.worldServer; WorldServer[] aworldserver = this.server.worldServer;
int j = aworldserver.length; int j = aworldserver.length;

Datei anzeigen

@ -12,8 +12,8 @@
public static RecipesFurnace getInstance() { public static RecipesFurnace getInstance() {
return RecipesFurnace.a; return RecipesFurnace.a;
@@ -54,6 +56,12 @@ @@ -78,6 +80,12 @@
this.registerRecipe(Blocks.QUARTZ_ORE, new ItemStack(Items.QUARTZ), 0.2F); this.a(Items.GOLDEN_HORSE_ARMOR, new ItemStack(Items.GOLD_NUGGET), 0.1F);
} }
+ // CraftBukkit start - add method + // CraftBukkit start - add method
@ -25,7 +25,7 @@
public void registerRecipe(Block block, ItemStack itemstack, float f) { public void registerRecipe(Block block, ItemStack itemstack, float f) {
this.a(Item.getItemOf(block), itemstack, f); this.a(Item.getItemOf(block), itemstack, f);
} }
@@ -68,13 +76,23 @@ @@ -92,13 +100,23 @@
} }
public ItemStack getResult(ItemStack itemstack) { public ItemStack getResult(ItemStack itemstack) {
@ -51,7 +51,7 @@
} }
entry = (Entry) iterator.next(); entry = (Entry) iterator.next();
@@ -92,13 +110,23 @@ @@ -116,13 +134,23 @@
} }
public float b(ItemStack itemstack) { public float b(ItemStack itemstack) {

Datei anzeigen

@ -9,7 +9,7 @@
public abstract class TileEntity { public abstract class TileEntity {
private static final Logger a = LogManager.getLogger(); private static final Logger a = LogManager.getLogger();
@@ -255,4 +257,13 @@ @@ -250,4 +252,13 @@
a("command_block", TileEntityCommand.class); a("command_block", TileEntityCommand.class);
a("shulker_box", TileEntityShulkerBox.class); a("shulker_box", TileEntityShulkerBox.class);
} }

Datei anzeigen

@ -341,7 +341,26 @@
this.c(entity); this.c(entity);
} }
@@ -1068,6 +1291,11 @@ @@ -872,6 +1095,9 @@
int l = MathHelper.f(axisalignedbb.e) + 1;
int i1 = MathHelper.floor(axisalignedbb.c) - 1;
int j1 = MathHelper.f(axisalignedbb.f) + 1;
+ // CraftBukkit start - filter out large ranges
+ com.google.common.base.Preconditions.checkArgument(j - i <= 32 && l - k <= 32 && j1 - i1 <= 32, "Filtered out large getCubes call %s,%s %s,%s %s,%s", i, j, k, l, i1, j1);
+ // CraftBukkit end
WorldBorder worldborder = this.getWorldBorder();
boolean flag1 = entity != null && entity.br();
boolean flag2 = entity != null && this.g(entity);
@@ -974,7 +1200,7 @@
}
public boolean a(AxisAlignedBB axisalignedbb) {
- return this.a((Entity) null, axisalignedbb, true, Lists.newArrayList());
+ return this.a((Entity) null, axisalignedbb, true, Lists.<AxisAlignedBB>newArrayList()); // CraftBukkit - decompile error
}
public int a(float f) {
@@ -1044,6 +1270,11 @@
for (i = 0; i < this.j.size(); ++i) { for (i = 0; i < this.j.size(); ++i) {
entity = (Entity) this.j.get(i); entity = (Entity) this.j.get(i);
@ -353,7 +372,7 @@
try { try {
++entity.ticksLived; ++entity.ticksLived;
@@ -1116,8 +1344,10 @@ @@ -1092,8 +1323,10 @@
CrashReportSystemDetails crashreportsystemdetails1; CrashReportSystemDetails crashreportsystemdetails1;
CrashReport crashreport1; CrashReport crashreport1;
@ -366,7 +385,7 @@
Entity entity1 = entity.bB(); Entity entity1 = entity.bB();
if (entity1 != null) { if (entity1 != null) {
@@ -1150,7 +1380,7 @@ @@ -1126,7 +1359,7 @@
this.getChunkAt(j, l).b(entity); this.getChunkAt(j, l).b(entity);
} }
@ -375,7 +394,7 @@
this.c(entity); this.c(entity);
} }
@@ -1159,6 +1389,13 @@ @@ -1135,6 +1368,13 @@
this.methodProfiler.c("blockEntities"); this.methodProfiler.c("blockEntities");
this.M = true; this.M = true;
@ -389,7 +408,7 @@
Iterator iterator = this.tileEntityListTick.iterator(); Iterator iterator = this.tileEntityListTick.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1169,7 +1406,7 @@ @@ -1145,7 +1385,7 @@
if (this.isLoaded(blockposition) && this.N.a(blockposition)) { if (this.isLoaded(blockposition) && this.N.a(blockposition)) {
try { try {
@ -398,7 +417,7 @@
((ITickable) tileentity).F_(); ((ITickable) tileentity).F_();
this.methodProfiler.b(); this.methodProfiler.b();
} catch (Throwable throwable2) { } catch (Throwable throwable2) {
@@ -1191,11 +1428,13 @@ @@ -1167,11 +1407,13 @@
} }
this.M = false; this.M = false;
@ -412,7 +431,7 @@
this.methodProfiler.c("pendingBlockEntities"); this.methodProfiler.c("pendingBlockEntities");
if (!this.b.isEmpty()) { if (!this.b.isEmpty()) {
@@ -1203,9 +1442,11 @@ @@ -1179,9 +1421,11 @@
TileEntity tileentity1 = (TileEntity) this.b.get(i1); TileEntity tileentity1 = (TileEntity) this.b.get(i1);
if (!tileentity1.y()) { if (!tileentity1.y()) {
@ -424,7 +443,7 @@
if (this.isLoaded(tileentity1.getPosition())) { if (this.isLoaded(tileentity1.getPosition())) {
Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition()); Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition());
@@ -1213,6 +1454,12 @@ @@ -1189,6 +1433,12 @@
chunk.a(tileentity1.getPosition(), tileentity1); chunk.a(tileentity1.getPosition(), tileentity1);
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
@ -437,7 +456,7 @@
} }
} }
} }
@@ -1267,7 +1514,10 @@ @@ -1243,7 +1493,10 @@
int j = MathHelper.floor(entity.locZ); int j = MathHelper.floor(entity.locZ);
boolean flag1 = true; boolean flag1 = true;
@ -449,7 +468,7 @@
entity.M = entity.locX; entity.M = entity.locX;
entity.N = entity.locY; entity.N = entity.locY;
entity.O = entity.locZ; entity.O = entity.locZ;
@@ -1571,11 +1821,18 @@ @@ -1547,11 +1800,18 @@
} }
} }
@ -468,7 +487,7 @@
TileEntity tileentity = null; TileEntity tileentity = null;
if (this.M) { if (this.M) {
@@ -1610,6 +1867,14 @@ @@ -1586,6 +1846,14 @@
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
if (!this.E(blockposition)) { if (!this.E(blockposition)) {
if (tileentity != null && !tileentity.y()) { if (tileentity != null && !tileentity.y()) {
@ -483,7 +502,7 @@
if (this.M) { if (this.M) {
tileentity.setPosition(blockposition); tileentity.setPosition(blockposition);
Iterator iterator = this.b.iterator(); Iterator iterator = this.b.iterator();
@@ -1769,6 +2034,14 @@ @@ -1745,6 +2013,14 @@
} }
this.o = MathHelper.a(this.o, 0.0F, 1.0F); this.o = MathHelper.a(this.o, 0.0F, 1.0F);
@ -498,7 +517,7 @@
} }
} }
} }
@@ -1900,7 +2173,10 @@ @@ -1876,7 +2152,10 @@
} }
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) { public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
@ -510,7 +529,7 @@
return false; return false;
} else { } else {
int i = 0; int i = 0;
@@ -2067,7 +2343,7 @@ @@ -2043,7 +2322,7 @@
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -519,7 +538,7 @@
arraylist.add(entity); arraylist.add(entity);
} }
} }
@@ -2082,7 +2358,7 @@ @@ -2058,7 +2337,7 @@
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -528,7 +547,7 @@
arraylist.add(entity); arraylist.add(entity);
} }
} }
@@ -2131,7 +2407,7 @@ @@ -2107,7 +2386,7 @@
} }
} }
@ -537,7 +556,7 @@
} }
@Nullable @Nullable
@@ -2152,8 +2428,17 @@ @@ -2128,8 +2407,17 @@
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -557,7 +576,7 @@
++i; ++i;
} }
} }
@@ -2162,12 +2447,18 @@ @@ -2138,12 +2426,18 @@
} }
public void a(Collection<Entity> collection) { public void a(Collection<Entity> collection) {
@ -577,7 +596,7 @@
this.b(entity); this.b(entity);
} }
@@ -2181,7 +2472,13 @@ @@ -2157,7 +2451,13 @@
IBlockData iblockdata = this.getType(blockposition); IBlockData iblockdata = this.getType(blockposition);
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition); AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition);
@ -592,7 +611,7 @@
} }
public int K() { public int K() {
@@ -2291,6 +2588,11 @@ @@ -2267,6 +2567,11 @@
for (int i = 0; i < this.players.size(); ++i) { for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i); EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
@ -604,7 +623,7 @@
if (predicate.apply(entityhuman1)) { if (predicate.apply(entityhuman1)) {
double d5 = entityhuman1.d(d0, d1, d2); double d5 = entityhuman1.d(d0, d1, d2);
@@ -2459,6 +2761,16 @@ @@ -2435,6 +2740,16 @@
public void everyoneSleeping() {} public void everyoneSleeping() {}
@ -621,7 +640,7 @@
public float h(float f) { public float h(float f) {
return (this.p + (this.q - this.p) * f) * this.j(f); return (this.p + (this.q - this.p) * f) * this.j(f);
} }
@@ -2676,7 +2988,7 @@ @@ -2652,7 +2967,7 @@
int l = j * 16 + 8 - blockposition.getZ(); int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true; boolean flag = true;

Datei anzeigen

@ -20,7 +20,7 @@
public WorldNBTStorage(File file, String s, boolean flag, DataConverterManager dataconvertermanager) { public WorldNBTStorage(File file, String s, boolean flag, DataConverterManager dataconvertermanager) {
this.a = dataconvertermanager; this.a = dataconvertermanager;
@@ -167,12 +173,38 @@ @@ -168,12 +174,38 @@
} }
if (nbttagcompound != null) { if (nbttagcompound != null) {
@ -59,7 +59,7 @@
public IPlayerFileData getPlayerFileData() { public IPlayerFileData getPlayerFileData() {
return this; return this;
} }
@@ -202,4 +234,50 @@ @@ -203,4 +235,50 @@
public DefinedStructureManager h() { public DefinedStructureManager h() {
return this.h; return this.h;
} }

Datei anzeigen

@ -501,12 +501,12 @@
} }
- public boolean addEntity(Entity entity) { - public boolean addEntity(Entity entity) {
- return this.i(entity) ? super.addEntity(entity) : false; - return this.j(entity) ? super.addEntity(entity) : false;
+ // CraftBukkit start + // CraftBukkit start
+ public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason + public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
+ // World.addEntity(Entity) will call this, and we still want to perform + // World.addEntity(Entity) will call this, and we still want to perform
+ // existing entity checking when it's called with a SpawnReason + // existing entity checking when it's called with a SpawnReason
+ return this.i(entity) ? super.addEntity(entity, spawnReason) : false; + return this.j(entity) ? super.addEntity(entity, spawnReason) : false;
} }
+ // CraftBukkit end + // CraftBukkit end
@ -514,7 +514,7 @@
ArrayList arraylist = Lists.newArrayList(collection); ArrayList arraylist = Lists.newArrayList(collection);
@@ -837,7 +1062,7 @@ @@ -837,7 +1062,7 @@
private boolean i(Entity entity) { private boolean j(Entity entity) {
if (entity.dead) { if (entity.dead) {
- WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", new Object[] { EntityTypes.a(entity)}); - WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", new Object[] { EntityTypes.a(entity)});
+ // WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", new Object[] { EntityTypes.a(entity)}); // CraftBukkit + // WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", new Object[] { EntityTypes.a(entity)}); // CraftBukkit

Datei anzeigen

@ -4,14 +4,14 @@
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.11-R0.1-SNAPSHOT</version> <version>1.11.1-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name> <name>CraftBukkit</name>
<url>http://www.bukkit.org</url> <url>http://www.bukkit.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version> <api.version>unknown</api.version>
<minecraft.version>1.11</minecraft.version> <minecraft.version>1.11.1</minecraft.version>
<minecraft_version>1_11_R1</minecraft_version> <minecraft_version>1_11_R1</minecraft_version>
<buildtag.prefix>git-Bukkit-</buildtag.prefix> <buildtag.prefix>git-Bukkit-</buildtag.prefix>
<buildtag.suffix></buildtag.suffix> <buildtag.suffix></buildtag.suffix>

Datei anzeigen

@ -173,7 +173,7 @@ public class Main {
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor()); Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
Calendar deadline = Calendar.getInstance(); Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -10); deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) { if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***"); System.err.println("*** Error, this build is outdated ***");
System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***"); System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***");

Datei anzeigen

@ -106,6 +106,8 @@ public class CraftEnchantment extends Enchantment {
return "FIRE_ASPECT"; return "FIRE_ASPECT";
case 21: case 21:
return "LOOT_BONUS_MOBS"; return "LOOT_BONUS_MOBS";
case 22:
return "SWEEPING";
case 32: case 32:
return "DIG_SPEED"; return "DIG_SPEED";
case 33: case 33:
@ -156,7 +158,7 @@ public class CraftEnchantment extends Enchantment {
return false; return false;
} }
CraftEnchantment ench = (CraftEnchantment) other; CraftEnchantment ench = (CraftEnchantment) other;
return !target.a(ench.target); return !target.c(ench.target);
} }
public net.minecraft.server.Enchantment getHandle() { public net.minecraft.server.Enchantment getHandle() {