Browse Source

Lower getIndirect() caching, causing problems right now

master
Robotia 9 years ago
parent
commit
9b04787a83
  1. 2
      patches/net/minecraft/world/World.java.patch

2
patches/net/minecraft/world/World.java.patch

@ -1322,7 +1322,7 @@
Block block = this.getBlock(p_72878_1_, p_72878_2_, p_72878_3_);
- return block.shouldCheckWeakPower(this, p_72878_1_, p_72878_2_, p_72878_3_, p_72878_4_) ? this.getBlockPowerInput(p_72878_1_, p_72878_2_, p_72878_3_) : block.isProvidingWeakPower(this, p_72878_1_, p_72878_2_, p_72878_3_, p_72878_4_);
+
+ if(!indirect.containsKey(block) || System.currentTimeMillis() - (indirect.get(block)[1]) > 50)
+ if(!indirect.containsKey(block) || System.currentTimeMillis() - (indirect.get(block)[1]) > 1)
+ {
+ int power = block.shouldCheckWeakPower(this, p_72878_1_, p_72878_2_, p_72878_3_, p_72878_4_) ? this.getBlockPowerInput(p_72878_1_, p_72878_2_, p_72878_3_) : block.isProvidingWeakPower(this, p_72878_1_, p_72878_2_, p_72878_3_, p_72878_4_);
+ indirect.put(block, new long[] { power, (System.currentTimeMillis()) });

Loading…
Cancel
Save