geforkt von Mirrors/Paper
[Bleeding] Fix mistranslation affecting time of the server vs time of day.
Fixes BUKKIT-2797
Dieser Commit ist enthalten in:
Ursprung
3dd0580d50
Commit
53d24e2b22
@ -739,10 +739,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
public long getPlayerTime() {
|
public long getPlayerTime() {
|
||||||
if (this.relativeTime) {
|
if (this.relativeTime) {
|
||||||
// Adds timeOffset to the current server time.
|
// Adds timeOffset to the current server time.
|
||||||
return this.world.getTime() + this.timeOffset;
|
return this.world.F() + this.timeOffset;
|
||||||
} else {
|
} else {
|
||||||
// Adds timeOffset to the beginning of this day.
|
// Adds timeOffset to the beginning of this day.
|
||||||
return this.world.getTime() - (this.world.getTime() % 24000) + this.timeOffset;
|
return this.world.F() - (this.world.F() % 24000) + this.timeOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
|||||||
if (this.ticks % 20 == 0) {
|
if (this.ticks % 20 == 0) {
|
||||||
for (int i = 0; i < this.getServerConfigurationManager().players.size(); ++i) {
|
for (int i = 0; i < this.getServerConfigurationManager().players.size(); ++i) {
|
||||||
EntityPlayer entityplayer = (EntityPlayer) this.getServerConfigurationManager().players.get(i);
|
EntityPlayer entityplayer = (EntityPlayer) this.getServerConfigurationManager().players.get(i);
|
||||||
entityplayer.netServerHandler.sendPacket(new Packet4UpdateTime(entityplayer.getPlayerTime(), entityplayer.world.F())); // Add support for per player time
|
entityplayer.netServerHandler.sendPacket(new Packet4UpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime())); // Add support for per player time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long getFullTime() {
|
public long getFullTime() {
|
||||||
return world.getTime();
|
return world.F();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullTime(long time) {
|
public void setFullTime(long time) {
|
||||||
@ -430,7 +430,7 @@ public class CraftWorld implements World {
|
|||||||
CraftPlayer cp = (CraftPlayer) p;
|
CraftPlayer cp = (CraftPlayer) p;
|
||||||
if (cp.getHandle().netServerHandler == null) continue;
|
if (cp.getHandle().netServerHandler == null) continue;
|
||||||
|
|
||||||
cp.getHandle().netServerHandler.sendPacket(new Packet4UpdateTime(cp.getHandle().getPlayerTime(), cp.getHandle().world.F()));
|
cp.getHandle().netServerHandler.sendPacket(new Packet4UpdateTime(cp.getHandle().world.getTime(), cp.getHandle().getPlayerTime()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren