-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
patches-deobfuscated.xml
144 lines (144 loc) · 7.96 KB
/
patches-deobfuscated.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<mods>
<minecraftCommon>
<class id="net.minecraft.world.WorldServer">
<!-- Fixes an issue where the tickNextTickLists would become out of sync -->
<synchronize>func_82740_a,scheduleBlockUpdateFromLoad,getPendingBlockUpdates,addBlockEvent</synchronize>
</class>
<class id="net.minecraft.world.World">
<!-- addedEntityList could be added to while looping -->
<newField field="TELock" class="java.lang.Object"/>
<synchronize field="TELock">addTileEntity(Ljava/util/Collection;)V,setBlockTileEntity,addTileEntity(Lany;)V,getBlockTileEntity</synchronize>
<!-- Same list was used by multiple threads -->
<replaceMethod fromClass="me.nallar.tickthreading.patched.PatchWorld">getEntitiesWithinAABBExcludingEntity</replaceMethod>
<replaceMethod fromClass="me.nallar.tickthreading.patched.PatchWorld">getCollidingBoundingBoxes</replaceMethod>
<public>releaseEntitySkin</public>
</class>
<class id="net.minecraft.world.chunk.Chunk">
<!-- The entity list could be accessed from multiple threads, as usual causes problems during iteration -->
<newField field="entityListReadWriteLock" class="me.nallar.tickthreading.util.TwoWayReentrantReadWriteLock"/>
<newField field="entityListWriteLock" class="java.util.concurrent.locks.Lock" code="this.entityListReadWriteLock.writeLock();"/>
<newField field="entityListReadLock" class="java.util.concurrent.locks.Lock" code="this.entityListReadWriteLock.readLock();"/>
<lock field="entityListWriteLock">onChunkLoad,onChunkUnload,removeEntityAtIndex,addEntity</lock>
<lock field="entityListReadLock">getEntitiesWithinAABBForEntity,getEntitiesOfTypeWithinAAAB</lock>
</class>
<class id="net.minecraft.util.Vec3Pool">
<!-- This prevents entities in multiple threads using the same Vec3 for collisions. -->
<synchronize>getVecFromPool</synchronize>
</class>
<class id="net.minecraft.util.AxisAlignedBB">
<!-- Improves performance -->
<replaceMethod fromClass="me.nallar.tickthreading.patched.PatchAxisAlignedBB">intersectsWith</replaceMethod>
</class>
<!--
<class id="net.minecraft.util.AABBPool">
Prevent multiple threads accessing the same AABB
Probably not necessary due to pool, unless MC devs messed up.
<synchronize>addOrModifyAABBInPool</synchronize>
</class>
-->
<class id="net.minecraft.util.LongHashMap">
<replace class="me.nallar.tickthreading.patched.LongHashMap"/>
</class>
<class id="net.minecraft.entity.player.EntityPlayerMP">
<!-- Concurrent access during iteration = boom -->
<newInitializer field="destroyedItemsNetCache" class="me.nallar.tickthreading.collections.ConcurrentLinkedQueueList"/>
</class>
<class id="net.minecraft.entity.Entity">
<newField static="" field="nextEntityID_" class="java.util.concurrent.atomic.AtomicInteger"/>
<insertAfter field="entityId" code="this.$field = this.nextEntityID_.getAndIncrement();"/>
</class>
<class id="net.minecraft.entity.EntityTracker">
<!-- Yet more comodification exceptions -->
<newField field="readWriteLock" class="me.nallar.tickthreading.util.TwoWayReentrantReadWriteLock"/>
<newField field="writeLock" class="java.util.concurrent.locks.Lock" code="this.readWriteLock.writeLock();"/>
<newField field="readLock" class="java.util.concurrent.locks.Lock" code="this.readWriteLock.readLock();"/>
<lock field="writeLock">addEntityToTracker(Lnet/minecraft/entity/Entity;)V,addEntityToTracker(Lnet/minecraft/entity/Entity;IIZ)V,removeEntityFromAllTrackingPlayers</lock>
<lock field="readLock">updateTrackedEntities,removeAllTrackingPlayers,func_85172_a</lock>
</class>
<class id="net.minecraft.village.VillageCollection">
<!-- Literally the most useless collection. Locking instead of voiding in case it ever does something useful in future -->
<newField field="readWriteLock" class="me.nallar.tickthreading.util.TwoWayReentrantReadWriteLock"/>
<newField field="writeLock" class="java.util.concurrent.locks.Lock" code="this.readWriteLock.writeLock();"/>
<newField field="readLock" class="java.util.concurrent.locks.Lock" code="this.readWriteLock.readLock();"/>
<lock field="writeLock">addVillagerPosition</lock>
<lock field="readLock">findNearestVillage,func_82566_a</lock>
</class>
</minecraftCommon>
<factorization>
<class id="factorization.common.TileEntityWrathLamp">
<!-- ಠ_ಠ -->
<synchronize>findLightAirParent</synchronize>
</class>
</factorization>
<liteLoader>
<class id="com.mumfrey.liteloader.core.HookProfiler">
<!-- BAAADD, LiteLoader, BAAAD. You don't take a threadsafe profiler and replace it with one which isn't. :/ -->
<synchronize>a(Ljava/lang/String;)V,b()V</synchronize>
</class>
</liteLoader>
<!-- Might not be needed
<buildCraftAPI>
<class id="buildcraft.api.power.PowerProvider">
<volatile/>
<synchronize/>
</class>
</buildCraftAPI>
-->
<buildCraftTransport>
<class id="buildcraft.transport.TileGenericPipe">
<newField field="staticLock" class="java.lang.Object" static=""/>
<synchronize field="staticLock">initialize</synchronize>
<synchronize field="facadeBlocks">blockCreated,getBlockId,getTile,computeConnections</synchronize>
</class>
<class id="buildcraft.transport.PipeTransportItems">
<!--
<synchronize field="travelingEntities">moveSolids,entityEntering</synchronize>
-->
<newInitializer field="travelingEntities" class="java.util.concurrent.ConcurrentHashMap"/>
</class>
</buildCraftTransport>
<thermalExpansionTransport>
<class id="thermalexpansion.transport.tileentity.TileConduitEnergy">
<newField field="tickLock" class="java.lang.Object" static=""/>
<synchronize field="tickLock">updateGridIfNull</synchronize>
</class>
<class id="thermalexpansion.transport.tileentity.TileConduitLiquid">
<newField field="tickLock" class="java.lang.Object" static=""/>
<synchronize field="tickLock">updateGridIfNull</synchronize>
</class>
</thermalExpansionTransport>
<redPowerCore>
<class id="com.eloraam.redpower.core.RedPowerLib">
<threadLocal field="blockUpdates" type="java.util.HashSet" threadLocalField="javassist.is.faulty.ThreadLocals.redPowerBlockUpdateSet"/>
<threadLocal field="powerSearchTest" type="java.util.HashSet" threadLocalField="javassist.is.faulty.ThreadLocals.redPowerPowerSearchTest"/>
<threadLocal field="powerSearch" type="java.util.LinkedList" threadLocalField="javassist.is.faulty.ThreadLocals.redPowerPowerSearch"/>
<!-- temporarily disabled - TODO: fix it.
<threadLocal field="searching" type="boolean" setExpression="java.lang.Boolean.valueOf($1)" threadLocalField="javassist.is.faulty.ThreadLocals.redPowerIsSearching"/> -->
</class>
</redPowerCore>
<industrialCraft>
<class id="ic2.core.EnergyNet">
<newInitializer field="energySourceToEnergyPathMap" code="java.util.Collections.synchronizedMap(new java.util.WeakHashMap<Class, Object>());"/>
<newInitializer field="entityLivingToShockEnergyMap" code="java.util.Collections.synchronizedMap(new java.util.WeakHashMap<Class, Object>());"/>
<newField field="readWriteLock" class="me.nallar.tickthreading.util.TwoWayReentrantReadWriteLock"/>
<newField field="writeLock" class="java.util.concurrent.locks.Lock" code="this.readWriteLock.writeLock();"/>
<newField field="readLock" class="java.util.concurrent.locks.Lock" code="this.readWriteLock.readLock();"/>
<lock field="writeLock">addTileEntity,removeTileEntity</lock>
<lock field="readLock">emitEnergyFrom</lock>
</class>
</industrialCraft>
<!--
This does not appear to be needed.
<stevesCarts>
<class id="vswe.stevescarts.Carts.entMCBase">
<newField field="staticLock" class="java.lang.Object" static=""/>
<synchronize field="staticLock">doUpdate,getCon</synchronize>
<synchronize>addModuleClass,d,k_</synchronize>
</class>
<class id="vswe.stevescarts.PacketHandler">
<logExceptions>receivePacketAtCart</logExceptions>
</class>
</stevesCarts>
-->
</mods>