-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use mixin to remap threading fixes rather than hardcoded in…
…termediary names
- Loading branch information
Showing
18 changed files
with
215 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...sues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/asm/MakeVolatile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.asm; | ||
|
||
public @interface MakeVolatile { | ||
} |
30 changes: 0 additions & 30 deletions
30
.../src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/asm/ASMTargets.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...s/worldgen/threading_issues/mixin/threading/MixinMineshaftGeneratorMineshaftCorridor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.MineshaftGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(MineshaftGenerator.MineshaftCorridor.class) | ||
public class MixinMineshaftGeneratorMineshaftCorridor { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean hasSpawner; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...worldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorBridgePlatform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.NetherFortressGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(NetherFortressGenerator.BridgePlatform.class) | ||
public class MixinNetherFortressGeneratorBridgePlatform { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean hasBlazeSpawner; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...rldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorCorridorLeftTurn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.NetherFortressGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(NetherFortressGenerator.CorridorLeftTurn.class) | ||
public class MixinNetherFortressGeneratorCorridorLeftTurn { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean containsChest; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...ldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorCorridorRightTurn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.NetherFortressGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(NetherFortressGenerator.CorridorRightTurn.class) | ||
public class MixinNetherFortressGeneratorCorridorRightTurn { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean containsChest; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...c2me/fixes/worldgen/threading_issues/mixin/threading/MixinOceanMonumentGeneratorBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.OceanMonumentGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(OceanMonumentGenerator.Base.class) | ||
public class MixinOceanMonumentGeneratorBase { | ||
|
||
@MakeVolatile | ||
@Shadow private OceanMonumentGenerator.PieceSetting entryPieceSetting; | ||
|
||
@MakeVolatile | ||
@Shadow private OceanMonumentGenerator.PieceSetting coreRoomPieceSetting; | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...es/worldgen/threading_issues/mixin/threading/MixinOceanMonumentGeneratorPieceSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.OceanMonumentGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(OceanMonumentGenerator.PieceSetting.class) | ||
public class MixinOceanMonumentGeneratorPieceSetting { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean used; | ||
|
||
@MakeVolatile | ||
@Shadow private boolean field_14484; | ||
|
||
@MakeVolatile | ||
@Shadow private int field_14483; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...nd/c2me/fixes/worldgen/threading_issues/mixin/threading/MixinShiftableStructurePiece.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.ShiftableStructurePiece; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(ShiftableStructurePiece.class) | ||
public class MixinShiftableStructurePiece { | ||
|
||
@MakeVolatile | ||
@Shadow protected int hPos; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...ixes/worldgen/threading_issues/mixin/threading/MixinStrongholdGeneratorChestCorridor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.StrongholdGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(StrongholdGenerator.ChestCorridor.class) | ||
public class MixinStrongholdGeneratorChestCorridor { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean chestGenerated; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...e/fixes/worldgen/threading_issues/mixin/threading/MixinStrongholdGeneratorPortalRoom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.StrongholdGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(StrongholdGenerator.PortalRoom.class) | ||
public class MixinStrongholdGeneratorPortalRoom { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean spawnerPlaced; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.../ishland/c2me/fixes/worldgen/threading_issues/mixin/threading/MixinSwampHutGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.ishland.c2me.fixes.worldgen.threading_issues.mixin.threading; | ||
|
||
import com.ishland.c2me.fixes.worldgen.threading_issues.asm.MakeVolatile; | ||
import net.minecraft.structure.SwampHutGenerator; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(SwampHutGenerator.class) | ||
public class MixinSwampHutGenerator { | ||
|
||
@MakeVolatile | ||
@Shadow private boolean hasWitch; | ||
|
||
@MakeVolatile | ||
@Shadow private boolean hasCat; | ||
|
||
} |
Oops, something went wrong.