Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
Update for 1.6.6
Dieser Commit ist enthalten in:
Ursprung
6dbd710bbf
Commit
62b5da4e3a
2
pom.xml
2
pom.xml
@ -39,7 +39,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>minecraft-server</artifactId>
|
<artifactId>minecraft-server</artifactId>
|
||||||
<version>1.6.5</version>
|
<version>1.6.6</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -31,8 +31,8 @@ public class CraftingManager {
|
|||||||
this.a(new ItemStack(Block.SNOW_BLOCK, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.SNOW_BALL});
|
this.a(new ItemStack(Block.SNOW_BLOCK, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.SNOW_BALL});
|
||||||
this.a(new ItemStack(Block.CLAY, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.CLAY_BALL});
|
this.a(new ItemStack(Block.CLAY, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.CLAY_BALL});
|
||||||
this.a(new ItemStack(Block.BRICK, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.CLAY_BRICK});
|
this.a(new ItemStack(Block.BRICK, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.CLAY_BRICK});
|
||||||
this.a(new ItemStack(Block.GLOWSTONE, 1), new Object[] { "###", "###", "###", Character.valueOf('#'), Item.GLOWSTONE_DUST});
|
this.a(new ItemStack(Block.GLOWSTONE, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.GLOWSTONE_DUST});
|
||||||
this.a(new ItemStack(Block.WOOL, 1), new Object[] { "###", "###", "###", Character.valueOf('#'), Item.STRING});
|
this.a(new ItemStack(Block.WOOL, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.STRING});
|
||||||
this.a(new ItemStack(Block.TNT, 1), new Object[] { "X#X", "#X#", "X#X", Character.valueOf('X'), Item.SULPHUR, Character.valueOf('#'), Block.SAND});
|
this.a(new ItemStack(Block.TNT, 1), new Object[] { "X#X", "#X#", "X#X", Character.valueOf('X'), Item.SULPHUR, Character.valueOf('#'), Block.SAND});
|
||||||
this.a(new ItemStack(Block.STEP, 3, 3), new Object[] { "###", Character.valueOf('#'), Block.COBBLESTONE});
|
this.a(new ItemStack(Block.STEP, 3, 3), new Object[] { "###", Character.valueOf('#'), Block.COBBLESTONE});
|
||||||
this.a(new ItemStack(Block.STEP, 3, 0), new Object[] { "###", Character.valueOf('#'), Block.STONE});
|
this.a(new ItemStack(Block.STEP, 3, 0), new Object[] { "###", Character.valueOf('#'), Block.STONE});
|
||||||
|
@ -89,7 +89,9 @@ public class EntityArrow extends Entity {
|
|||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
Block.byId[i].a(this.world, this.d, this.e, this.f);
|
Block.byId[i].a(this.world, this.d, this.e, this.f);
|
||||||
if (Block.byId[i].d(this.world, this.d, this.e, this.f) != null && Block.byId[i].d(this.world, this.d, this.e, this.f).a(Vec3D.create(this.locX, this.locY, this.locZ))) {
|
AxisAlignedBB axisalignedbb = Block.byId[i].d(this.world, this.d, this.e, this.f);
|
||||||
|
|
||||||
|
if (axisalignedbb != null && axisalignedbb.a(Vec3D.create(this.locX, this.locY, this.locZ))) {
|
||||||
this.i = true;
|
this.i = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,8 +140,8 @@ public class EntityArrow extends Entity {
|
|||||||
|
|
||||||
if (entity1.n_() && (entity1 != this.shooter || this.k >= 5)) {
|
if (entity1.n_() && (entity1 != this.shooter || this.k >= 5)) {
|
||||||
f1 = 0.3F;
|
f1 = 0.3F;
|
||||||
AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f1, (double) f1, (double) f1);
|
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.b((double) f1, (double) f1, (double) f1);
|
||||||
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
|
MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1);
|
||||||
|
|
||||||
if (movingobjectposition1 != null) {
|
if (movingobjectposition1 != null) {
|
||||||
double d1 = vec3d.a(movingobjectposition1.f);
|
double d1 = vec3d.a(movingobjectposition1.f);
|
||||||
|
@ -129,6 +129,10 @@ public class EntityBoat extends Entity {
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
if (this.passenger != null) {
|
||||||
|
this.passenger.mount(this);
|
||||||
|
}
|
||||||
|
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (j = 0; j < 3; ++j) {
|
for (j = 0; j < 3; ++j) {
|
||||||
@ -230,7 +234,11 @@ public class EntityBoat extends Entity {
|
|||||||
d3 = d0 * 2.0D - 1.0D;
|
d3 = d0 * 2.0D - 1.0D;
|
||||||
this.motY += 0.03999999910593033D * d3;
|
this.motY += 0.03999999910593033D * d3;
|
||||||
} else {
|
} else {
|
||||||
this.motY += 0.0010000000474974513D;
|
if (this.motY < 0.0D) {
|
||||||
|
this.motY /= 2.0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.motY += 0.007000000216066837D;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.passenger != null) {
|
if (this.passenger != null) {
|
||||||
|
@ -78,11 +78,13 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
this.sleepTicks = 100;
|
this.sleepTicks = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.world.isStatic) {
|
||||||
if (!this.o()) {
|
if (!this.o()) {
|
||||||
this.a(true, true, false);
|
this.a(true, true, false);
|
||||||
} else if (!this.world.isStatic && this.world.d()) {
|
} else if (this.world.d()) {
|
||||||
this.a(false, true, true);
|
this.a(false, true, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (this.sleepTicks > 0) {
|
} else if (this.sleepTicks > 0) {
|
||||||
++this.sleepTicks;
|
++this.sleepTicks;
|
||||||
if (this.sleepTicks >= 110) {
|
if (this.sleepTicks >= 110) {
|
||||||
@ -375,7 +377,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
if (this.health <= 0) {
|
if (this.health <= 0) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (this.isSleeping()) {
|
if (this.isSleeping() && !this.world.isStatic) {
|
||||||
this.a(true, true, false);
|
this.a(true, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,12 +570,24 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public EnumBedError a(int i, int j, int k) {
|
public EnumBedError a(int i, int j, int k) {
|
||||||
if (!this.isSleeping() && this.S()) {
|
if (!this.world.isStatic) {
|
||||||
|
if (this.isSleeping() || !this.S()) {
|
||||||
|
return EnumBedError.OTHER_PROBLEM;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.world.worldProvider.c) {
|
if (this.world.worldProvider.c) {
|
||||||
return EnumBedError.NOT_POSSIBLE_HERE;
|
return EnumBedError.NOT_POSSIBLE_HERE;
|
||||||
} else if (this.world.d()) {
|
}
|
||||||
|
|
||||||
|
if (this.world.d()) {
|
||||||
return EnumBedError.NOT_POSSIBLE_NOW;
|
return EnumBedError.NOT_POSSIBLE_NOW;
|
||||||
} else if (Math.abs(this.locX - (double) i) <= 3.0D && Math.abs(this.locY - (double) j) <= 2.0D && Math.abs(this.locZ - (double) k) <= 3.0D) {
|
}
|
||||||
|
|
||||||
|
if (Math.abs(this.locX - (double) i) > 3.0D || Math.abs(this.locY - (double) j) > 2.0D || Math.abs(this.locZ - (double) k) > 3.0D) {
|
||||||
|
return EnumBedError.TOO_FAR_AWAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.getBukkitEntity() instanceof Player) {
|
if (this.getBukkitEntity() instanceof Player) {
|
||||||
Player player = (Player) this.getBukkitEntity();
|
Player player = (Player) this.getBukkitEntity();
|
||||||
@ -628,12 +642,6 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return EnumBedError.OK;
|
return EnumBedError.OK;
|
||||||
} else {
|
|
||||||
return EnumBedError.TOO_FAR_AWAY;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return EnumBedError.OTHER_PROBLEM;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void e(int i) {
|
private void e(int i) {
|
||||||
|
@ -298,9 +298,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
|
|
||||||
if (enumbederror == EnumBedError.OK) {
|
if (enumbederror == EnumBedError.OK) {
|
||||||
EntityTracker entitytracker = this.b.b(this.dimension);
|
EntityTracker entitytracker = this.b.b(this.dimension);
|
||||||
|
Packet17 packet17 = new Packet17(this, 0, i, j, k);
|
||||||
|
|
||||||
// CraftBukkit - this is not the original method called
|
entitytracker.a(this, packet17);
|
||||||
entitytracker.b(this, new Packet17(this, 0, i, j, k));
|
this.netServerHandler.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
||||||
|
this.netServerHandler.sendPacket(packet17);
|
||||||
}
|
}
|
||||||
|
|
||||||
return enumbederror;
|
return enumbederror;
|
||||||
|
@ -179,6 +179,14 @@ public class EntityTrackerEntry {
|
|||||||
entityplayer.netServerHandler.sendPacket(new Packet5EntityEquipment(this.tracker.id, i, aitemstack[i]));
|
entityplayer.netServerHandler.sendPacket(new Packet5EntityEquipment(this.tracker.id, i, aitemstack[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.tracker instanceof EntityHuman) {
|
||||||
|
EntityHuman entityhuman = (EntityHuman) this.tracker;
|
||||||
|
|
||||||
|
if (entityhuman.isSleeping()) {
|
||||||
|
entityplayer.netServerHandler.sendPacket(new Packet17(this.tracker, 0, MathHelper.floor(this.tracker.locX), MathHelper.floor(this.tracker.locY), MathHelper.floor(this.tracker.locZ)));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (this.trackedPlayers.contains(entityplayer)) {
|
} else if (this.trackedPlayers.contains(entityplayer)) {
|
||||||
this.trackedPlayers.remove(entityplayer);
|
this.trackedPlayers.remove(entityplayer);
|
||||||
|
@ -86,7 +86,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
|
|||||||
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
|
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
log.info("Starting minecraft server version Beta 1.6.5");
|
log.info("Starting minecraft server version Beta 1.6.6");
|
||||||
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||||
log.warning("**** NOT ENOUGH RAM!");
|
log.warning("**** NOT ENOUGH RAM!");
|
||||||
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||||
|
@ -240,6 +240,13 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.player.isSleeping()) {
|
||||||
|
this.player.a(true);
|
||||||
|
this.player.setLocation(this.x, this.y, this.z, this.player.yaw, this.player.pitch);
|
||||||
|
worldserver.playerJoinedWorld(this.player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
d0 = this.player.locY;
|
d0 = this.player.locY;
|
||||||
this.x = this.player.locX;
|
this.x = this.player.locX;
|
||||||
this.y = this.player.locY;
|
this.y = this.player.locY;
|
||||||
|
@ -47,10 +47,7 @@ class PlayerInstance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void b(EntityPlayer entityplayer) {
|
public void b(EntityPlayer entityplayer) {
|
||||||
if (!this.b.contains(entityplayer)) {
|
if (this.b.contains(entityplayer)) {
|
||||||
// CraftBukkit - reduce console spam under certain conditions
|
|
||||||
// (new IllegalStateException("Failed to remove player. " + entityplayer + " isn\'t in chunk " + this.bF + ", " + this.bH)).printStackTrace();
|
|
||||||
} else {
|
|
||||||
this.b.remove(entityplayer);
|
this.b.remove(entityplayer);
|
||||||
if (this.b.size() == 0) {
|
if (this.b.size() == 0) {
|
||||||
long i = (long) this.chunkX + 2147483647L | (long) this.chunkZ + 2147483647L << 32;
|
long i = (long) this.chunkX + 2147483647L | (long) this.chunkZ + 2147483647L << 32;
|
||||||
|
@ -1482,7 +1482,10 @@ public class World implements IBlockAccess {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.b(k1, l1).g()) {
|
if (this.b(k1, l1).g()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int i2 = this.C.size();
|
int i2 = this.C.size();
|
||||||
int j2;
|
int j2;
|
||||||
|
|
||||||
@ -1507,9 +1510,6 @@ public class World implements IBlockAccess {
|
|||||||
System.out.println("More than " + j2 + " updates, aborting lighting updates");
|
System.out.println("More than " + j2 + " updates, aborting lighting updates");
|
||||||
this.C.clear();
|
this.C.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
--A;
|
--A;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ import org.bukkit.util.config.Configuration;
|
|||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = "Craftbukkit";
|
private final String serverName = "Craftbukkit";
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final String protocolVersion = "1.6.5";
|
private final String protocolVersion = "1.6.6";
|
||||||
private final PluginManager pluginManager = new SimplePluginManager(this);
|
private final PluginManager pluginManager = new SimplePluginManager(this);
|
||||||
private final ServicesManager servicesManager = new SimpleServicesManager();
|
private final ServicesManager servicesManager = new SimpleServicesManager();
|
||||||
private final BukkitScheduler scheduler = new CraftScheduler(this);
|
private final BukkitScheduler scheduler = new CraftScheduler(this);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren