Skip to content

Commit 97c5450

Browse files
committed
Chunk Energy: Mark the Chunk dirty when the energy value changes
1 parent 87ad7dd commit 97c5450

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/choonster/testmod3/capability/chunkenergy/ChunkEnergy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ public void setEnergy(final int energy) {
9393
protected void onEnergyChanged() {
9494
final World world = getWorld();
9595
final ChunkPos chunkPos = getChunkPos();
96+
97+
world.getChunkFromChunkCoords(chunkPos.x, chunkPos.z).markDirty();
98+
9699
if (world.isRemote) return;
97100

98101
final PlayerChunkMapEntry playerChunkMapEntry = ((WorldServer) world).getPlayerChunkMap().getEntry(chunkPos.x, chunkPos.z);

0 commit comments

Comments
 (0)