mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-29 23:17:41 +02:00
Tick should be int for now.
This commit is contained in:
parent
4e58ff980c
commit
8e3c4d3b8c
@ -848,7 +848,7 @@ public class BlockChangeTracker {
|
|||||||
* direction.
|
* direction.
|
||||||
* @return The matching entry, or null if there is no matching entry.
|
* @return The matching entry, or null if there is no matching entry.
|
||||||
*/
|
*/
|
||||||
public BlockChangeEntry getBlockChangeEntry(final BlockChangeReference ref, final long tick, final UUID worldId,
|
public BlockChangeEntry getBlockChangeEntry(final BlockChangeReference ref, final int tick, final UUID worldId,
|
||||||
final int x, final int y, final int z, final Direction direction) {
|
final int x, final int y, final int z, final Direction direction) {
|
||||||
final WorldNode worldNode = worldMap.get(worldId);
|
final WorldNode worldNode = worldMap.get(worldId);
|
||||||
if (worldNode == null) {
|
if (worldNode == null) {
|
||||||
@ -876,10 +876,10 @@ public class BlockChangeTracker {
|
|||||||
* direction.
|
* direction.
|
||||||
* @return The oldest matching entry, or null if there is no matching entry.
|
* @return The oldest matching entry, or null if there is no matching entry.
|
||||||
*/
|
*/
|
||||||
private BlockChangeEntry getBlockChangeEntry(final BlockChangeReference ref, final long tick, final WorldNode worldNode,
|
private BlockChangeEntry getBlockChangeEntry(final BlockChangeReference ref, final int tick, final WorldNode worldNode,
|
||||||
final int x, final int y, final int z, final Direction direction) {
|
final int x, final int y, final int z, final Direction direction) {
|
||||||
// TODO: Might add some policy (start at age, oldest first, newest first).
|
// TODO: Might add some policy (start at age, oldest first, newest first).
|
||||||
final long expireOlderThanTick = tick - expirationAgeTicks;
|
final int expireOlderThanTick = tick - expirationAgeTicks;
|
||||||
// Lazy expiration of entire world nodes.
|
// Lazy expiration of entire world nodes.
|
||||||
if (worldNode.lastChangeTick < expireOlderThanTick) {
|
if (worldNode.lastChangeTick < expireOlderThanTick) {
|
||||||
worldNode.clear();
|
worldNode.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user