3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

Fixed an issue where the block cache became out of date and events were giving erroneous block information.

Dieser Commit ist enthalten in:
sk89q 2011-01-15 21:10:24 -08:00
Ursprung c62e387879
Commit 9e65c243e4
2 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -35,6 +35,8 @@ public class CraftWorld implements World {
if (block == null) { if (block == null) {
block = new CraftBlock(this, x, y, z, world.a(x, y, z), (byte)world.b(x, y, z)); block = new CraftBlock(this, x, y, z, world.a(x, y, z), (byte)world.b(x, y, z));
blockCache.put(loc, block); blockCache.put(loc, block);
} else {
block.update();
} }
return block; return block;

Datei anzeigen

@ -319,5 +319,6 @@ public class CraftBlock implements Block {
public void update() { public void update() {
type = world.getHandle().a(x, y, z); type = world.getHandle().a(x, y, z);
data = (byte)world.getHandle().b(x, y, z); data = (byte)world.getHandle().b(x, y, z);
light = (byte)world.getHandle().j(x, y, z);
} }
} }