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
@@ -900,17 +900,10 @@ public class CarpetSettings
|
||||
public static boolean flatWorldStructureSpawning = false;
|
||||
|
||||
@Rule(
|
||||
desc = "Edge cases are as frequent as common cases, for testing only!!",
|
||||
extra = {"Velocities of items from dispensers, blaze projectiles, fireworks ",
|
||||
"Directions of fireballs, wither skulls, fishing bobbers, ",
|
||||
"items dropped from blocks and inventories, llamas spit, triggered trap horses",
|
||||
"Damage dealt with projectiles",
|
||||
"Blaze aggro sensitivity",
|
||||
"Mobs spawned follow range"
|
||||
},
|
||||
desc = "Increases for testing purposes number of blue skulls shot by the wither",
|
||||
category = CREATIVE
|
||||
)
|
||||
public static boolean extremeBehaviours = false;
|
||||
public static boolean moreBlueSkulls = false;
|
||||
|
||||
@Rule(
|
||||
desc = "Removes fog from client in the nether and the end",
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package carpet.utils;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
||||
public class RandomTools
|
||||
{
|
||||
public static double nextGauBian(RandomSource random)
|
||||
{
|
||||
if (CarpetSettings.extremeBehaviours)
|
||||
{
|
||||
random.nextDouble();
|
||||
return 16.0D * random.nextDouble() - 8.0D;
|
||||
}
|
||||
return random.nextGaussian();
|
||||
}
|
||||
}
|
||||
@@ -131,17 +131,7 @@
|
||||
"DispenserBlock_qcMixin",
|
||||
|
||||
"PickaxeItem_missingToolsMixin",
|
||||
"DefaultDispenseItemBehavior_extremeBehavioursMixin",
|
||||
"Containers_extremeMixin",
|
||||
"FishingHook_extremeMixin",
|
||||
"SkeletonTrapGoal_extremeMixin",
|
||||
"FireworkRocketEntity_extremeMixin",
|
||||
"Blaze_extremeMixin",
|
||||
"BlazeAttackGoal_extremeMixin",
|
||||
"Mob_extremeMixin",
|
||||
"AbstractArrow_extremeMixin",
|
||||
"Projectile_extremeMixin",
|
||||
"WitherBoss_extremeMixin",
|
||||
"WitherBoss_moreBlueMixin",
|
||||
"ArmorStand_scarpetMarkerMixin",
|
||||
"Entity_scarpetEventsMixin",
|
||||
"LivingEntity_scarpetEventsMixin",
|
||||
|
||||
Reference in new issue
Block a user