extremeBenchmark

This commit is contained in:
gnembon committed 2019-12-12 17:22:06 -04:00
1 parent 657acc3c6e
commit 05ac5dee2c
15 files changed
+307 -25

No files matched your search

@@ -0,0 +1,33 @@
package carpet.mixins;
import carpet.utils.RandomTools;
import net.minecraft.entity.projectile.ProjectileEntity;
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(ProjectileEntity.class)
public class ProjectileEntity_extremeMixin
{
@Redirect(method = "setVelocity", expect = 3, at = @At(
value = "INVOKE",
target = "Ljava/util/Random;nextGaussian()D"
))
private double nextGauBian(Random random)
{
return RandomTools.nextGauBian(random);
}
// calculates damage
@Redirect(method = "method_7435", expect = 1, at = @At(
value = "INVOKE",
target = "Ljava/util/Random;nextGaussian()D"
))
private double nextGauBian2(Random random)
{
return RandomTools.nextGauBian(random);
}
}