Skip to content

Commit

Permalink
Fix Thaumcraft AuraWorldTicker NPE crash.
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jun 21, 2013
1 parent bfeedc0 commit 33705c3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/patches.xml
Expand Up @@ -1277,6 +1277,20 @@
</class>
<class id="thaumcraft.common.AuraWorldTicker">
<synchronize field="((^class:WorldServer^)$2[0]).auraLock">tickEnd</synchronize>
<replaceMethod code="{
if (thaumcraft.common.AuraManager.auraUpdateList.get(Integer.valueOf($1)) != null) {
return;
}
LinkedList temp = new ConcurrentLinkedQueueList();
Collection nodes = thaumcraft.common.AuraManager.auraNodes.values();
for (Iterator i = nodes.iterator(); i.hasNext();) {
thaumcraft.api.AuraNode node = (thaumcraft.api.AuraNode) i.next();
if (node.dimension == $1) {
temp.add(Integer.valueOf(node.key));
}
}
thaumcraft.common.AuraManager.auraUpdateList.put(Integer.valueOf($1), temp);
}">populateAuraUpdateList</replaceMethod>
</class>
<class id="thaumcraft.common.EventHandler">
<synchronize field="$1.world.auraLock">chunkLoad</synchronize>
Expand Down

0 comments on commit 33705c3

Please sign in to comment.