Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-2286: Don't store CraftBlockState light level
Dieser Commit ist enthalten in:
Ursprung
6d133d5440
Commit
88123f0569
@ -30,7 +30,6 @@ public class CraftBlockState implements BlockState {
|
|||||||
protected int type;
|
protected int type;
|
||||||
protected MaterialData data;
|
protected MaterialData data;
|
||||||
protected int flag;
|
protected int flag;
|
||||||
protected final byte light;
|
|
||||||
|
|
||||||
public CraftBlockState(final Block block) {
|
public CraftBlockState(final Block block) {
|
||||||
this.world = (CraftWorld) block.getWorld();
|
this.world = (CraftWorld) block.getWorld();
|
||||||
@ -38,7 +37,6 @@ public class CraftBlockState implements BlockState {
|
|||||||
this.y = block.getY();
|
this.y = block.getY();
|
||||||
this.z = block.getZ();
|
this.z = block.getZ();
|
||||||
this.type = block.getTypeId();
|
this.type = block.getTypeId();
|
||||||
this.light = block.getLightLevel();
|
|
||||||
this.chunk = (CraftChunk) block.getChunk();
|
this.chunk = (CraftChunk) block.getChunk();
|
||||||
this.flag = 3;
|
this.flag = 3;
|
||||||
|
|
||||||
@ -53,7 +51,6 @@ public class CraftBlockState implements BlockState {
|
|||||||
public CraftBlockState(Material material) {
|
public CraftBlockState(Material material) {
|
||||||
world = null;
|
world = null;
|
||||||
type = material.getId();
|
type = material.getId();
|
||||||
light = 0;
|
|
||||||
chunk = null;
|
chunk = null;
|
||||||
x = y = z = 0;
|
x = y = z = 0;
|
||||||
}
|
}
|
||||||
@ -137,7 +134,7 @@ public class CraftBlockState implements BlockState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public byte getLightLevel() {
|
public byte getLightLevel() {
|
||||||
return light;
|
return getBlock().getLightLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Block getBlock() {
|
public Block getBlock() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren