extremeBenchmark
This commit is contained in:
1 parent
657acc3c6e
commit
05ac5dee2c
15 files changed
+307
-25
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.entity.FireworkEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@Mixin(FireworkEntity.class)
|
||||
public class FireworkEntity_extremeMixin
|
||||
{
|
||||
@Redirect(method = "<init>(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)V", expect = 2, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Ljava/util/Random;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(Random random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
|
||||
@Redirect(method = "setVelocity", expect = 3, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Ljava/util/Random;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian2(Random random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user