Skip to content

Commit

Permalink
Fix #4345 by invalidating the tile and chunk caches MUCH more often
Browse files Browse the repository at this point in the history
...if this continues I'm just going to end up invalidataing the caches in every method call.

And bump version for release.
  • Loading branch information
AlexIIL committed Mar 14, 2019
1 parent 81d672c commit dfb6584
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.properties
@@ -1,4 +1,4 @@
mc_version=1.12.2
forge_version=14.23.0.2544
mappings_version=snapshot_20171120
mod_version=7.99.23-pre1
mod_version=7.99.23
1 change: 1 addition & 0 deletions buildcraft_resources/changelog/7.99.23
Expand Up @@ -7,6 +7,7 @@ Improvements:

Bug fixes:

* [#4345] Fixed a cache issue which caused pipes with wires on to disconnect randomly.
* [#4359] Fixed a cache issue which caused items to disappear from transport pipes.
* Made the pump a bit less likely to dupe fluids when sending them out to neighbouring blocks.
* Fixed gui container and tile update packets not releasing some byte buffers properly
Expand Down
23 changes: 22 additions & 1 deletion common/buildcraft/lib/tile/TileBC_Neptune.java
Expand Up @@ -273,6 +273,27 @@ public void invalidate() {
tileCache.invalidate();
}

@Override
public void validate() {
super.validate();
chunkCache.invalidate();
tileCache.invalidate();
}

@Override
public void onLoad() {
super.onLoad();
chunkCache.invalidate();
tileCache.invalidate();
}

@Override
public void onChunkUnload() {
super.onChunkUnload();
chunkCache.invalidate();
tileCache.invalidate();
}

/** Called whenever {@link Block#getDrops(NonNullList, IBlockAccess, BlockPos, IBlockState, int)}, or
* {@link #onRemove()} is called (by default). */
public void addDrops(NonNullList<ItemStack> toDrop, int fortune) {
Expand Down Expand Up @@ -315,7 +336,7 @@ public boolean onActivated(EntityPlayer player, EnumHand hand, EnumFacing facing
}

public void onNeighbourBlockChanged(Block block, BlockPos nehighbour) {

tileCache.invalidate();
}

@Override
Expand Down

0 comments on commit dfb6584

Please sign in to comment.