retire extreme behaviours, added moreBlueSkulls
This commit is contained in:
1 parent
b2cb70c133
commit
8101abb431
14 files changed
+5
-273
No files matched your search
@@ -1,25 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
|
||||
@Mixin(AbstractArrow.class)
|
||||
public class AbstractArrow_extremeMixin
|
||||
{
|
||||
// calculates damage
|
||||
@Redirect(method = "setEnchantmentEffectsFromEntity", expect = 1, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian2(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
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(targets = "net.minecraft.world.entity.monster.Blaze$BlazeAttackGoal")
|
||||
public class BlazeAttackGoal_extremeMixin
|
||||
{
|
||||
@Redirect(method = "tick()V", expect = 2, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.monster.Blaze;
|
||||
|
||||
@Mixin(Blaze.class)
|
||||
public class Blaze_extremeMixin
|
||||
{
|
||||
// unused actually
|
||||
@Redirect(method = "customServerAiStep", expect = 1, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.Containers;
|
||||
|
||||
@Mixin(Containers.class)
|
||||
public class Containers_extremeMixin
|
||||
{
|
||||
@Redirect(method = "dropItemStack(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/item/ItemStack;)V", expect = 3, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private static double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
|
||||
|
||||
@Mixin(DefaultDispenseItemBehavior.class)
|
||||
public class DefaultDispenseItemBehavior_extremeBehavioursMixin
|
||||
{
|
||||
@Redirect(method = "spawnItem", expect = 3, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private static double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.projectile.FireworkRocketEntity;
|
||||
|
||||
@Mixin(FireworkRocketEntity.class)
|
||||
public class FireworkRocketEntity_extremeMixin
|
||||
{
|
||||
@Redirect(method = "<init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/item/ItemStack;)V", expect = 2, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.projectile.FishingHook;
|
||||
|
||||
@Mixin(FishingHook.class)
|
||||
public class FishingHook_extremeMixin
|
||||
{
|
||||
@Redirect(method = "<init>(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/Level;II)V", expect =3, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
|
||||
@Mixin(Mob.class)
|
||||
public class Mob_extremeMixin
|
||||
{
|
||||
@Redirect(method = "finalizeSpawn", expect = 1, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.projectile.Projectile;
|
||||
|
||||
@Mixin(Projectile.class)
|
||||
public class Projectile_extremeMixin
|
||||
{
|
||||
@Redirect(method = "shoot", expect = 3, at = @At( //TODO make sure it's correct after mojmap
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.utils.RandomTools;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.animal.horse.SkeletonTrapGoal;
|
||||
|
||||
@Mixin(SkeletonTrapGoal.class)
|
||||
public class SkeletonTrapGoal_extremeMixin
|
||||
{
|
||||
@Redirect(method = "tick", expect = 2, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/util/RandomSource;nextGaussian()D"
|
||||
))
|
||||
private double nextGauBian(RandomSource random)
|
||||
{
|
||||
return RandomTools.nextGauBian(random);
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -7,11 +7,10 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.world.entity.boss.wither.WitherBoss;
|
||||
|
||||
@Mixin(WitherBoss.class)
|
||||
public class WitherBoss_extremeMixin
|
||||
public class WitherBoss_moreBlueMixin
|
||||
{
|
||||
@Redirect(method = "performRangedAttack(ILnet/minecraft/world/entity/LivingEntity;)V", at = @At(
|
||||
value = "INVOKE",
|
||||
@@ -19,7 +18,7 @@ public class WitherBoss_extremeMixin
|
||||
)
|
||||
private float nextFloatAmplfied(RandomSource random)
|
||||
{
|
||||
if (CarpetSettings.extremeBehaviours) return random.nextFloat()/100;
|
||||
if (CarpetSettings.moreBlueSkulls) return random.nextFloat()/100;
|
||||
return random.nextFloat();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user