-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed shields not working - Fixed crashes when lithium was not present - Improved compatibility with Vulkanmod - Merged some Random optimizations - Removed useless Random optimizations
- Loading branch information
Showing
12 changed files
with
23 additions
and
84 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
2 changes: 2 additions & 0 deletions
2
...m/github/tatercertified/potatoptimize/mixin/fastmath/rounding/FastRoundingQuadsMixin.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
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: 0 additions & 17 deletions
17
...n/java/com/github/tatercertified/potatoptimize/mixin/random/entity/RandomEntityMixin.java
This file was deleted.
Oops, something went wrong.
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
13 changes: 11 additions & 2 deletions
13
...m/github/tatercertified/potatoptimize/mixin/random/generators/GaussianGeneratorMixin.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
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
17 changes: 1 addition & 16 deletions
17
...ain/java/com/github/tatercertified/potatoptimize/mixin/random/world/RandomWorldMixin.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 |
---|---|---|
@@ -1,34 +1,19 @@ | ||
package com.github.tatercertified.potatoptimize.mixin.random.world; | ||
|
||
import com.github.tatercertified.potatoptimize.utils.random.ThreadLocalRandomImpl; | ||
import com.github.tatercertified.potatoptimize.utils.random.XorShiftRandomImpl; | ||
import com.moulberry.mixinconstraints.annotations.IfModAbsent; | ||
import net.minecraft.util.math.random.Random; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Mutable; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@IfModAbsent(value = "faster-random", aliases = {"c2me-fixes-worldgen-threading-issues"}) | ||
@Mixin(value = World.class) | ||
public class RandomWorldMixin { | ||
@Shadow @Final public Random random; | ||
|
||
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/random/Random;create()Lnet/minecraft/util/math/random/Random;")) | ||
private Random redirectRandomCreation() { | ||
return new XorShiftRandomImpl(); | ||
} | ||
|
||
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/random/Random;createThreadSafe()Lnet/minecraft/util/math/random/Random;")) | ||
private Random redirectThreadSafeRandomCreation() { | ||
return new ThreadLocalRandomImpl(); | ||
} | ||
|
||
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/random/Random;nextInt()I")) | ||
private int redirectRandomNextInt(Random instance) { | ||
return this.random.nextInt(); | ||
return ThreadLocalRandomImpl.INSTANCE.nextInt(); | ||
} | ||
} |
16 changes: 0 additions & 16 deletions
16
...github/tatercertified/potatoptimize/mixin/unstable/reduce_random/RandomCreationMixin.java
This file was deleted.
Oops, something went wrong.
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