mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 09:27:45 +01:00
Fixed an issue where the block cache became out of date and events were giving erroneous block information.
This commit is contained in:
parent
c62e387879
commit
9e65c243e4
@ -35,6 +35,8 @@ public class CraftWorld implements World {
|
||||
if (block == null) {
|
||||
block = new CraftBlock(this, x, y, z, world.a(x, y, z), (byte)world.b(x, y, z));
|
||||
blockCache.put(loc, block);
|
||||
} else {
|
||||
block.update();
|
||||
}
|
||||
|
||||
return block;
|
||||
|
@ -319,5 +319,6 @@ public class CraftBlock implements Block {
|
||||
public void update() {
|
||||
type = world.getHandle().a(x, y, z);
|
||||
data = (byte)world.getHandle().b(x, y, z);
|
||||
light = (byte)world.getHandle().j(x, y, z);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user