From fc498e42b4d0ed9186f2b9598fc2a95173608ca5 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 22 Nov 2024 19:01:45 +0000 Subject: [PATCH] [ci skip] delete old code_hierarchies --- .../call-hierarchy-Entity.random.txt | 1018 ----------------- .../call-hierarchy-ItemStack.damage.txt | 121 -- .../call-hierarchy-LivingEntity.getRandom.txt | 357 ------ .../method-hierarchy-Entity.damage.txt | 58 - 4 files changed, 1554 deletions(-) delete mode 100644 docs/code_hierarchies/call-hierarchy-Entity.random.txt delete mode 100644 docs/code_hierarchies/call-hierarchy-ItemStack.damage.txt delete mode 100644 docs/code_hierarchies/call-hierarchy-LivingEntity.getRandom.txt delete mode 100644 docs/code_hierarchies/method-hierarchy-Entity.damage.txt diff --git a/docs/code_hierarchies/call-hierarchy-Entity.random.txt b/docs/code_hierarchies/call-hierarchy-Entity.random.txt deleted file mode 100644 index c3661eea5..000000000 --- a/docs/code_hierarchies/call-hierarchy-Entity.random.txt +++ /dev/null @@ -1,1018 +0,0 @@ -Field -random -Usages in All Places -Value read -Gradle: net.minecraft:minecraft-project-@-mapped:1.18-rc1/net.fabricmc.yarn.1_18_rc1.1.18-rc1+build.1-v2 -net.minecraft.client.network -ClientPlayerEntity -updateNausea() - this.client.getSoundManager().play(PositionedSoundInstance.ambient(SoundEvents.BLOCK_PORTAL_TRIGGER, this.random.nextFloat() * 0.4f + 0.8f, 0.25f)); -net.minecraft.entity -AreaEffectCloudEntity -tick() - if (bl && this.random.nextBoolean()) { - float h = this.random.nextFloat() * ((float)Math.PI * 2); - float k = MathHelper.sqrt(this.random.nextFloat()) * g; - int m = bl && this.random.nextBoolean() ? 0xFFFFFF : this.getColor(); - n = (0.5 - this.random.nextDouble()) * 0.15; - p = (0.5 - this.random.nextDouble()) * 0.15; -Entity -setOnFireFromLava() - this.playSound(SoundEvents.ENTITY_GENERIC_BURN, 0.4f, 2.0f + this.random.nextFloat() * 0.4f); -playExtinguishSound() - this.playSound(SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, 0.7f, 1.6f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.playSound(SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, 0.7f, 1.6f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); -playAmethystChimeSound(BlockState) - float f = 0.5f + this.lastChimeIntensity * this.random.nextFloat() * 1.2f; -playSwimSound(float) - this.playSound(this.getSwimSound(), volume, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.playSound(this.getSwimSound(), volume, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); -onSwimmingStart() - this.playSound(this.getSplashSound(), g, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.playSound(this.getSplashSound(), g, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.playSound(this.getHighSpeedSplashSound(), g, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.playSound(this.getHighSpeedSplashSound(), g, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - d = (this.random.nextDouble() * 2.0 - 1.0) * (double)this.dimensions.width; - e = (this.random.nextDouble() * 2.0 - 1.0) * (double)this.dimensions.width; - this.world.addParticle(ParticleTypes.BUBBLE, this.getX() + d, h + 1.0f, this.getZ() + e, vec3d.x, vec3d.y - this.random.nextDouble() * (double)0.2f, vec3d.z); - d = (this.random.nextDouble() * 2.0 - 1.0) * (double)this.dimensions.width; - e = (this.random.nextDouble() * 2.0 - 1.0) * (double)this.dimensions.width; -spawnSprintingParticles() -...BLOCK, blockState), this.getX() + (this.random.nextDouble() - 0.5) * (double)this.dimensions.width, this.getY() + 0.1, this.getZ() + (this.r... -... this.getY() + 0.1, this.getZ() + (this.random.nextDouble() - 0.5) * (double)this.dimensions.width, vec3d.x * -4.0, 1.5, vec3d.z * -4.0);... -pushOutOfBlocks(double, double, double) - float g = this.random.nextFloat() * 0.2f + 0.1f; -getParticleX(double) - return this.offsetX((2.0 * this.random.nextDouble() - 1.0) * widthScale); -getRandomBodyY() - return this.getBodyY(this.random.nextDouble()); -getParticleZ(double) - return this.offsetZ((2.0 * this.random.nextDouble() - 1.0) * widthScale); - protected UUID uuid = MathHelper.randomUuid(this.random); -ExperienceOrbEntity -ExperienceOrbEntity(World, double, double, double, int) - this.setYaw((float)(this.random.nextDouble() * 360.0)); - this.setVelocity((this.random.nextDouble() * (double)0.2f - (double)0.1f) * 2.0, this.random.nextDouble() * 0.2 * 2.0, (this.random.nextDouble() * (double)0.2f - (double)0.1f) * 2.0); - this.setVelocity((this.random.nextDouble() * (double)0.2f - (double)0.1f) * 2.0, this.random.nextDouble() * 0.2 * 2.0, (this.random.nextDouble() * (double)0.2f - (double)0.1f) * 2.0); - this.setVelocity((this.random.nextDouble() * (double)0.2f - (double)0.1f) * 2.0, this.random.nextDouble() * 0.2 * 2.0, (this.random.nextDouble() * (double)0.2f - (double)0.1f) * 2.0); -tick() - this.setVelocity((this.random.nextFloat() - this.random.nextFloat()) * 0.2f, 0.2f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); - this.setVelocity((this.random.nextFloat() - this.random.nextFloat()) * 0.2f, 0.2f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); - this.setVelocity((this.random.nextFloat() - this.random.nextFloat()) * 0.2f, 0.2f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); - this.setVelocity((this.random.nextFloat() - this.random.nextFloat()) * 0.2f, 0.2f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); -EyeOfEnderEntity -initTargetPos(BlockPos) - this.dropsItem = this.random.nextInt(5) > 0; -tick() -...Types.PORTAL, d - vec3d.x * 0.25 + this.random.nextDouble() * 0.6 - 0.3, e - vec3d.y * 0.25 - 0.5, f - vec3d.z * 0.25 + this.random.nextDoub... -...* 0.25 - 0.5, f - vec3d.z * 0.25 + this.random.nextDouble() * 0.6 - 0.3, vec3d.x, vec3d.y, vec3d.z);... -FallingBlockEntity -handleFallDamage(float, float, DamageSource) - if (bl && landingBlock > 0.0f && this.random.nextFloat() < 0.05f + (float)i * 0.05f) { -ItemEntity -ItemEntity(EntityType, World) - this.uniqueOffset = this.random.nextFloat() * (float)Math.PI * 2.0f; - this.setYaw(this.random.nextFloat() * 360.0f); -LightningEntity -LightningEntity(EntityType, World) - this.seed = this.random.nextLong(); - this.remainingActions = this.random.nextInt(3) + 1; -tick() - this.world.playSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 10000.0f, 0.8f + this.random.nextFloat() * 0.2f, false); - this.world.playSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0f, 0.5f + this.random.nextFloat() * 0.2f, false); - } else if (this.ambientTick < -this.random.nextInt(10)) { - this.seed = this.random.nextLong(); -spawnFire(int) - BlockPos blockPos2 = blockPos.add(this.random.nextInt(3) - 1, this.random.nextInt(3) - 1, this.random.nextInt(3) - 1); - BlockPos blockPos2 = blockPos.add(this.random.nextInt(3) - 1, this.random.nextInt(3) - 1, this.random.nextInt(3) - 1); - BlockPos blockPos2 = blockPos.add(this.random.nextInt(3) - 1, this.random.nextInt(3) - 1, this.random.nextInt(3) - 1); -LivingEntity -baseTick() - double f = this.random.nextDouble() - this.random.nextDouble(); - double f = this.random.nextDouble() - this.random.nextDouble(); - double g = this.random.nextDouble() - this.random.nextDouble(); - double g = this.random.nextDouble() - this.random.nextDouble(); - double h = this.random.nextDouble() - this.random.nextDouble(); - double h = this.random.nextDouble() - this.random.nextDouble(); -displaySoulSpeedEffects() -...ParticleTypes.SOUL, this.getX() + (this.random.nextDouble() - 0.5) * (double)this.getWidth(), this.getY() + 0.1, this.getZ() + (this.random.... -... this.getY() + 0.1, this.getZ() + (this.random.nextDouble() - 0.5) * (double)this.getWidth(), vec3d.x * -0.2, 0.1, vec3d.z * -0.2);... - float f = this.random.nextFloat() * 0.4f + this.random.nextFloat() > 0.9f ? 0.6f : 0.0f; - float f = this.random.nextFloat() * 0.4f + this.random.nextFloat() > 0.9f ? 0.6f : 0.0f; - this.playSound(SoundEvents.PARTICLE_SOUL_ESCAPE, f, 0.6f + this.random.nextFloat() * 0.4f); -getNextAirUnderwater(int) - if (i > 0 && this.random.nextInt(i + 1) > 0) { -getRandom() - return this.random; -tickStatusEffects() - boolean bl = this.isInvisible() ? this.random.nextInt(15) == 0 : this.random.nextBoolean(); - boolean bl = this.isInvisible() ? this.random.nextInt(15) == 0 : this.random.nextBoolean(); - bl &= this.random.nextInt(5) == 0; -getLootContextBuilder(boolean, DamageSource) -...er((ServerWorld)this.world).random(this.random).parameter(LootContextParameters.THIS_ENTITY, this).parameter(LootContextParameters.ORIGIN, t... -handleStatus(byte) - this.playSound(SoundEvents.ENCHANT_THORNS_HIT, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENCHANT_THORNS_HIT, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(soundEvent, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(soundEvent, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(damageSource, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(damageSource, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - float f = (this.random.nextFloat() - 0.5f) * 0.2f; - float g = (this.random.nextFloat() - 0.5f) * 0.2f; - float h = (this.random.nextFloat() - 0.5f) * 0.2f; - double e = MathHelper.lerp(d, this.prevX, this.getX()) + (this.random.nextDouble() - 0.5) * (double)this.getWidth() * 2.0; - double i = MathHelper.lerp(d, this.prevY, this.getY()) + this.random.nextDouble() * (double)this.getHeight(); - double j = MathHelper.lerp(d, this.prevZ, this.getZ()) + (this.random.nextDouble() - 0.5) * (double)this.getWidth() * 2.0; -addDeathParticles() - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -getSoundPitch() - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.5f; - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.5f; - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f; - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f; -tickCramming() - if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) { -scheduleVelocityUpdate() - this.velocityModified = this.random.nextDouble() >= this.getAttributeValue(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE); -spawnConsumptionEffects(ItemStack, int) - this.playSound(this.getEatSound(stack), 0.5f + 0.5f * (float)this.random.nextInt(2), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(this.getEatSound(stack), 0.5f + 0.5f * (float)this.random.nextInt(2), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(this.getEatSound(stack), 0.5f + 0.5f * (float)this.random.nextInt(2), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); -spawnItemParticles(ItemStack, int) - Vec3d vec3d = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, 0.0); - double d = (double)(-this.random.nextFloat()) * 0.6 - 0.3; - Vec3d vec3d2 = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.3, d, 0.6); -net.minecraft.entity.boss -WitherEntity -tickMovement() -...le(ParticleTypes.SMOKE, entity23 + this.random.nextGaussian() * (double)0.3f, vec3d3 + this.random.nextGaussian() * (double)0.3f, m + this.r... -...aussian() * (double)0.3f, vec3d3 + this.random.nextGaussian() * (double)0.3f, m + this.random.nextGaussian() * (double)0.3f, 0.0, 0.0, 0.0);... -...nextGaussian() * (double)0.3f, m + this.random.nextGaussian() * (double)0.3f, 0.0, 0.0, 0.0);... -...cleTypes.ENTITY_EFFECT, entity23 + this.random.nextGaussian() * (double)0.3f, vec3d3 + this.random.nextGaussian() * (double)0.3f, m + this.r... -...aussian() * (double)0.3f, vec3d3 + this.random.nextGaussian() * (double)0.3f, m + this.random.nextGaussian() * (double)0.3f, 0.7f, 0.7f, 0.5... -...nextGaussian() * (double)0.3f, m + this.random.nextGaussian() * (double)0.3f, 0.7f, 0.7f, 0.5);... -...Types.ENTITY_EFFECT, this.getX() + this.random.nextGaussian(), this.getY() + (double)(this.random.nextFloat() * 3.3f), this.getZ() + this.ra... -...Gaussian(), this.getY() + (double)(this.random.nextFloat() * 3.3f), this.getZ() + this.random.nextGaussian(), 0.7f, 0.7f, 0.9f);... -...nextFloat() * 3.3f), this.getZ() + this.random.nextGaussian(), 0.7f, 0.7f, 0.9f);... -mobTick() - this.skullCooldowns[i - 1] = this.age + 10 + this.random.nextInt(10); - double d = MathHelper.nextDouble(this.random, this.getX() - 10.0, this.getX() + 10.0); - double e = MathHelper.nextDouble(this.random, this.getY() - 5.0, this.getY() + 5.0); - double g = MathHelper.nextDouble(this.random, this.getZ() - 10.0, this.getZ() + 10.0); - this.skullCooldowns[i - 1] = this.age + 40 + this.random.nextInt(20); - LivingEntity d = (LivingEntity)f.get(this.random.nextInt(f.size())); -shootSkullAt(int, LivingEntity) - this.shootSkullAt(headIndex, target.getX(), target.getY() + (double)target.getStandingEyeHeight() * 0.5, target.getZ(), headIndex == 0 && this.random.nextFloat() < 0.001f); -net.minecraft.entity.boss.dragon -EnderDragonEntity -addFlapEffects() - this.world.playSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_ENDER_DRAGON_FLAP, this.getSoundCategory(), 5.0f, 0.8f + this.random.nextFloat() * 0.3f, false); -tickMovement() - this.world.playSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_ENDER_DRAGON_GROWL, this.getSoundCategory(), 2.5f, 0.8f + this.random.nextFloat() * 0.3f, false); - this.ticksUntilNextGrowl = 200 + this.random.nextInt(200); - float f = (this.random.nextFloat() - 0.5f) * 8.0f; - float g = (this.random.nextFloat() - 0.5f) * 4.0f; - float h = (this.random.nextFloat() - 0.5f) * 8.0f; -tickWithEndCrystals() - if (this.random.nextInt(10) == 0) { -destroyBlocks(Box) - BlockPos o = new BlockPos(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(m - j + 1), k + this.random.nextInt(n - k + 1)); - BlockPos o = new BlockPos(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(m - j + 1), k + this.random.nextInt(n - k + 1)); - BlockPos o = new BlockPos(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(m - j + 1), k + this.random.nextInt(n - k + 1)); -updatePostDeath() - float f = (this.random.nextFloat() - 0.5f) * 8.0f; - float g = (this.random.nextFloat() - 0.5f) * 4.0f; - float h = (this.random.nextFloat() - 0.5f) * 8.0f; -net.minecraft.entity.decoration -EndCrystalEntity -EndCrystalEntity(EntityType, World) - this.endCrystalAge = this.random.nextInt(100000); -ItemFrameEntity -dropHeldStack(Entity, boolean) - if (this.random.nextFloat() < this.itemDropChance) { -net.minecraft.entity.decoration.painting -PaintingEntity -PaintingEntity(World, BlockPos, Direction) - this.motive = (PaintingMotive)list.get(this.random.nextInt(list.size())); -net.minecraft.entity.mob -AbstractSkeletonEntity -tickMovement() - itemStack.setDamage(itemStack.getDamage() + this.random.nextInt(2)); -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - this.setCanPickUpLoot(this.random.nextFloat() < 0.55f * difficulty.getClampedLocalDifficulty()); - if (j == 10 && i == 31 && this.random.nextFloat() < 0.25f) { - this.equipStack(EquipmentSlot.HEAD, new ItemStack(this.random.nextFloat() < 0.1f ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); -BlazeEntity -tickMovement() - if (this.random.nextInt(24) == 0 && !this.isSilent()) { -...N, this.getSoundCategory(), 1.0f + this.random.nextFloat(), this.random.nextFloat() * 0.7f + 0.3f, false);... -...), 1.0f + this.random.nextFloat(), this.random.nextFloat() * 0.7f + 0.3f, false);... -mobTick() - this.eyeOffset = 0.5f + (float)this.random.nextGaussian() * 3.0f; -CreeperEntity -interactMob(PlayerEntity, Hand) - this.world.playSound(player2, this.getX(), this.getY(), this.getZ(), SoundEvents.ITEM_FLINTANDSTEEL_USE, this.getSoundCategory(), 1.0f, this.random.nextFloat() * 0.4f + 0.8f); -DrownedEntity -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - if (this.getEquippedStack(EquipmentSlot.OFFHAND).isEmpty() && this.random.nextFloat() < 0.03f) { -initEquipment(LocalDifficulty) - if ((double)this.random.nextFloat() > 0.9) { - int i = this.random.nextInt(16); -EndermanEntity -chooseRandomAngerTime() - this.setAngerTime(ANGER_TIME_RANGE.get(this.random)); -tickMovement() -...) - 0.25, this.getParticleZ(0.5), (this.random.nextDouble() - 0.5) * 2.0, -this.random.nextDouble(), (this.random.nextDouble() - 0.5) * 2.0)... -...random.nextDouble() - 0.5) * 2.0, -this.random.nextDouble(), (this.random.nextDouble() - 0.5) * 2.0);... -...* 2.0, -this.random.nextDouble(), (this.random.nextDouble() - 0.5) * 2.0);... -mobTick() -...sSkyVisible(this.getBlockPos()) && this.random.nextFloat() * 30.0f < (f - 0.4f) * 2.0f) {... -teleportRandomly() - double d = this.getX() + (this.random.nextDouble() - 0.5) * 64.0; - double e = this.getY() + (double)(this.random.nextInt(64) - 32); - double f = this.getZ() + (this.random.nextDouble() - 0.5) * 64.0; -teleportTo(Entity) - double e = this.getX() + (this.random.nextDouble() - 0.5) * 8.0 - vec3d.x * 16.0; - double f = this.getY() + (double)(this.random.nextInt(16) - 8) - vec3d.y * 16.0; - double g = this.getZ() + (this.random.nextDouble() - 0.5) * 8.0 - vec3d.z * 16.0; -damage(DamageSource, float) - if (!this.world.isClient() && !(source.getAttacker() instanceof LivingEntity) && this.random.nextInt(10) != 0) { -EndermiteEntity -tickMovement() -...mBodyY(), this.getParticleZ(0.5), (this.random.nextDouble() - 0.5) * 2.0, -this.random.nextDouble(), (this.random.nextDouble() - 0.5) * 2.0)... -...random.nextDouble() - 0.5) * 2.0, -this.random.nextDouble(), (this.random.nextDouble() - 0.5) * 2.0);... -...* 2.0, -this.random.nextDouble(), (this.random.nextDouble() - 0.5) * 2.0);... -EvokerEntity.SummonVexGoal -canStart() - return EvokerEntity.this.random.nextInt(8) + 1 > i; -castSpell() - BlockPos blockPos = EvokerEntity.this.getBlockPos().add(-2 + EvokerEntity.this.random.nextInt(5), 1, -2 + EvokerEntity.this.random.nextInt(5)); - BlockPos blockPos = EvokerEntity.this.getBlockPos().add(-2 + EvokerEntity.this.random.nextInt(5), 1, -2 + EvokerEntity.this.random.nextInt(5)); - vexEntity.setLifeTicks(20 * (30 + EvokerEntity.this.random.nextInt(90))); -EvokerEntity.WololoGoal -canStart() - EvokerEntity.this.setWololoTarget(list.get(EvokerEntity.this.random.nextInt(list.size()))); -EvokerFangsEntity -tick() - double d = this.getX() + (this.random.nextDouble() * 2.0 - 1.0) * (double)this.getWidth() * 0.5; - double e = this.getY() + 0.05 + this.random.nextDouble(); - double f = this.getZ() + (this.random.nextDouble() * 2.0 - 1.0) * (double)this.getWidth() * 0.5; - double g = (this.random.nextDouble() * 2.0 - 1.0) * 0.3; - double h = 0.3 + this.random.nextDouble() * 0.3; - double j = (this.random.nextDouble() * 2.0 - 1.0) * 0.3; -handleStatus(byte) - this.world.playSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_EVOKER_FANGS_ATTACK, this.getSoundCategory(), 1.0f, this.random.nextFloat() * 0.2f + 0.85f, false); -GuardianEntity -GuardianEntity(EntityType, World) - this.prevTailAngle = this.tailAngle = this.random.nextFloat(); -tickMovement() -...is.isInsideWaterOrBubbleColumn() ? this.random.nextFloat() : (this.areSpikesRetracted() ? (this.spikesExtension += (0.0f - this.spikesExtens... - double h = this.random.nextDouble(); -... this.getX() + d * (h += 1.8 - i + this.random.nextDouble() * (1.7 - i)), this.getEyeY() + e * h, this.getZ() + f * h, 0.0, 0.0, 0.0);... - this.setVelocity(this.getVelocity().add((this.random.nextFloat() * 2.0f - 1.0f) * 0.4f, 0.5, (this.random.nextFloat() * 2.0f - 1.0f) * 0.4f)); - this.setVelocity(this.getVelocity().add((this.random.nextFloat() * 2.0f - 1.0f) * 0.4f, 0.5, (this.random.nextFloat() * 2.0f - 1.0f) * 0.4f)); - this.setYaw(this.random.nextFloat() * 360.0f); -IllusionerEntity -tickMovement() -... new Vec3d((double)(-6.0f + (float)this.random.nextInt(13)) * 0.5, Math.max(0, this.random.nextInt(6) - 4), (double)(-6.0f + (float)this.ran... -...om.nextInt(13)) * 0.5, Math.max(0, this.random.nextInt(6) - 4), (double)(-6.0f + (float)this.random.nextInt(13)) * 0.5);... -...t(6) - 4), (double)(-6.0f + (float)this.random.nextInt(13)) * 0.5);... -MobEntity -baseTick() - if (this.isAlive() && this.random.nextInt(1000) < this.ambientSoundChance++) { -getXpToDrop(PlayerEntity) - i += 1 + this.random.nextInt(3); - i += 1 + this.random.nextInt(3); -playSpawnEffects() - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -getLootContextBuilder(boolean, DamageSource) - return super.getLootContextBuilder(causedByPlayer, source).random(this.lootTableSeed, this.random); -tryEquip(ItemStack) - if (!itemStack.isEmpty() && (double)Math.max(this.random.nextFloat() - 0.1f, 0.0f) < d) { -checkDespawn() - if (this.despawnCounter > 600 && this.random.nextInt(800) == 0 && d > (double)l && this.canImmediatelyDespawn(d)) { -dropEquipment(DamageSource, int, boolean) -...| !allowDrops && !bl || !(Math.max(this.random.nextFloat() - (float)lootingMultiplier * 0.01f, 0.0f) < f)) continue;... - itemStack.setDamage(itemStack.getMaxDamage() - this.random.nextInt(1 + this.random.nextInt(Math.max(itemStack.getMaxDamage() - 3, 1)))); - itemStack.setDamage(itemStack.getMaxDamage() - this.random.nextInt(1 + this.random.nextInt(Math.max(itemStack.getMaxDamage() - 3, 1)))); -initEquipment(LocalDifficulty) - if (this.random.nextFloat() < 0.15f * difficulty.getClampedLocalDifficulty()) { - int i = this.random.nextInt(2); - if (this.random.nextFloat() < 0.095f) { - if (this.random.nextFloat() < 0.095f) { - if (this.random.nextFloat() < 0.095f) { - if (!bl && this.random.nextFloat() < f) break; -enchantMainHandItem(float) - if (!this.getMainHandStack().isEmpty() && this.random.nextFloat() < 0.25f * power) { - this.equipStack(EquipmentSlot.MAINHAND, EnchantmentHelper.enchant(this.random, this.getMainHandStack(), (int)(5.0f + power * (float)this.random.nextInt(18)), false)); - this.equipStack(EquipmentSlot.MAINHAND, EnchantmentHelper.enchant(this.random, this.getMainHandStack(), (int)(5.0f + power * (float)this.random.nextInt(18)), false)); -enchantEquipment(float, EquipmentSlot) - if (!itemStack.isEmpty() && this.random.nextFloat() < 0.5f * power) { - this.equipStack(slot, EnchantmentHelper.enchant(this.random, itemStack, (int)(5.0f + power * (float)this.random.nextInt(18)), false)); - this.equipStack(slot, EnchantmentHelper.enchant(this.random, itemStack, (int)(5.0f + power * (float)this.random.nextInt(18)), false)); -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) -...buteModifier("Random spawn bonus", this.random.nextGaussian() * 0.05, EntityAttributeModifier.Operation.MULTIPLY_BASE));... - if (this.random.nextFloat() < 0.05f) { -disablePlayerShield(PlayerEntity, ItemStack, ItemStack) - if (this.random.nextFloat() < f) { -isAffectedByDaylight() - if (f > 0.5f && this.random.nextFloat() * 30.0f < (f - 0.4f) * 2.0f && !bl && this.world.isSkyVisible(blockPos)) { -PatrolEntity -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - if (spawnReason != SpawnReason.PATROL && spawnReason != SpawnReason.EVENT && spawnReason != SpawnReason.STRUCTURE && this.random.nextFloat() < 0.06f && this.canLead()) { -setRandomPatrolTarget() - this.patrolTarget = this.getBlockPos().add(-500 + this.random.nextInt(1000), 0, -500 + this.random.nextInt(1000)); - this.patrolTarget = this.getBlockPos().add(-500 + this.random.nextInt(1000), 0, -500 + this.random.nextInt(1000)); -PhantomEntity -tick() -..., this.getSoundCategory(), 0.95f + this.random.nextFloat() * 0.05f, 0.95f + this.random.nextFloat() * 0.05f, false);... -...andom.nextFloat() * 0.05f, 0.95f + this.random.nextFloat() * 0.05f, false);... -PhantomEntity.CircleMovementGoal -start() - this.radius = 5.0f + PhantomEntity.this.random.nextFloat() * 10.0f; - this.yOffset = -4.0f + PhantomEntity.this.random.nextFloat() * 9.0f; - this.circlingDirection = PhantomEntity.this.random.nextBoolean() ? 1.0f : -1.0f; -tick() - if (PhantomEntity.this.random.nextInt(this.getTickCount(350)) == 0) { - this.yOffset = -4.0f + PhantomEntity.this.random.nextFloat() * 9.0f; - if (PhantomEntity.this.random.nextInt(this.getTickCount(250)) == 0) { - if (PhantomEntity.this.random.nextInt(this.getTickCount(450)) == 0) { - this.angle = PhantomEntity.this.random.nextFloat() * 2.0f * (float)Math.PI; -PhantomEntity.StartAttackGoal -stop() -...clingCenter).up(10 + PhantomEntity.this.random.nextInt(20));... -tick() - this.cooldown = this.getTickCount((8 + PhantomEntity.this.random.nextInt(4)) * 20); - PhantomEntity.this.playSound(SoundEvents.ENTITY_PHANTOM_SWOOP, 10.0f, 0.95f + PhantomEntity.this.random.nextFloat() * 0.1f); -startSwoop() - PhantomEntity.this.circlingCenter = PhantomEntity.this.getTarget().getBlockPos().up(20 + PhantomEntity.this.random.nextInt(20)); -PiglinEntity -makeInitialWeapon() - if ((double)this.random.nextFloat() < 0.5) { -PillagerEntity -enchantMainHandItem(float) - if (this.random.nextInt(300) == 0 && (itemStack = this.getMainHandStack()).isOf(Items.CROSSBOW)) { -addBonusForWave(int, boolean) - boolean bl2 = bl = this.random.nextFloat() <= raid.getEnchantmentChance(); -RavagerEntity -spawnStunnedParticles() - if (this.random.nextInt(6) == 0) { - double d = this.getX() - (double)this.getWidth() * Math.sin(this.bodyYaw * ((float)Math.PI / 180)) + (this.random.nextDouble() * 0.6 - 0.3); - double f = this.getZ() + (double)this.getWidth() * Math.cos(this.bodyYaw * ((float)Math.PI / 180)) + (this.random.nextDouble() * 0.6 - 0.3); -knockback(LivingEntity) - if (this.random.nextDouble() < 0.5) { -roar() - double d = this.random.nextGaussian() * 0.2; - double e = this.random.nextGaussian() * 0.2; - double f = this.random.nextGaussian() * 0.2; -ShulkerEntity -tryTeleport() - BlockPos blockPos2 = blockPos.add(MathHelper.nextBetween(this.random, -8, 8), MathHelper.nextBetween(this.random, -8, 8), MathHelper.nextBetween(this.random, -8, 8)); - BlockPos blockPos2 = blockPos.add(MathHelper.nextBetween(this.random, -8, 8), MathHelper.nextBetween(this.random, -8, 8), MathHelper.nextBetween(this.random, -8, 8)); - BlockPos blockPos2 = blockPos.add(MathHelper.nextBetween(this.random, -8, 8), MathHelper.nextBetween(this.random, -8, 8), MathHelper.nextBetween(this.random, -8, 8)); -damage(DamageSource, float) - if ((double)this.getHealth() < (double)this.getMaxHealth() * 0.5 && this.random.nextInt(4) == 0) { -ShulkerEntity.PeekGoal -canStart() -...tTarget() == null && ShulkerEntity.this.random.nextInt(PeekGoal.toGoalTicks(40)) == 0 && ShulkerEntity.this.canStay(ShulkerEntity.this.getBl... -start() - this.counter = this.getTickCount(20 * (1 + ShulkerEntity.this.random.nextInt(3))); -ShulkerEntity.ShootBulletGoal -tick() - this.counter = 20 + ShulkerEntity.this.random.nextInt(10) * 20 / 2; - ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0f, (ShulkerEntity.this.random.nextFloat() - ShulkerEntity.this.random.nextFloat()) * 0.2f + 1.0f); - ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0f, (ShulkerEntity.this.random.nextFloat() - ShulkerEntity.this.random.nextFloat()) * 0.2f + 1.0f); -SlimeEntity -tick() - float f = this.random.nextFloat() * ((float)Math.PI * 2); - float g = this.random.nextFloat() * 0.5f + 0.5f; - this.playSound(this.getSquishSound(), this.getSoundVolume(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f) / 0.8f); - this.playSound(this.getSquishSound(), this.getSoundVolume(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f) / 0.8f); -getTicksUntilNextJump() - return this.random.nextInt(20) + 10; -onTrackedDataSet(TrackedData) - if (this.isTouchingWater() && this.random.nextInt(20) == 0) { -remove(RemovalReason) - int k = 2 + this.random.nextInt(3); - slimeEntity.refreshPositionAndAngles(this.getX() + (double)g, this.getY() + 0.5, this.getZ() + (double)h, this.random.nextFloat() * 360.0f, 0.0f); -damage(LivingEntity) - this.playSound(SoundEvents.ENTITY_SLIME_ATTACK, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_SLIME_ATTACK, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - int i = this.random.nextInt(3); - if (i < 2 && this.random.nextFloat() < 0.5f * difficulty.getClampedLocalDifficulty()) { -getJumpSoundPitch() - return ((this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f) * f; - return ((this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f) * f; -VexEntity.ChargeTargetGoal -canStart() - if (VexEntity.this.getTarget() != null && !VexEntity.this.getMoveControl().isMoving() && VexEntity.this.random.nextInt(ChargeTargetGoal.toGoalTicks(7)) == 0) { -VexEntity.LookAtTargetGoal -canStart() - return !VexEntity.this.getMoveControl().isMoving() && VexEntity.this.random.nextInt(LookAtTargetGoal.toGoalTicks(7)) == 0; -tick() - BlockPos blockPos2 = blockPos.add(VexEntity.this.random.nextInt(15) - 7, VexEntity.this.random.nextInt(11) - 5, VexEntity.this.random.nextInt(15) - 7); - BlockPos blockPos2 = blockPos.add(VexEntity.this.random.nextInt(15) - 7, VexEntity.this.random.nextInt(11) - 5, VexEntity.this.random.nextInt(15) - 7); - BlockPos blockPos2 = blockPos.add(VexEntity.this.random.nextInt(15) - 7, VexEntity.this.random.nextInt(11) - 5, VexEntity.this.random.nextInt(15) - 7); -VindicatorEntity -addBonusForWave(int, boolean) - boolean bl2 = bl = this.random.nextFloat() <= raid.getEnchantmentChance(); -VindicatorEntity.BreakDoorGoal -canStart() - return vindicatorEntity.hasActiveRaid() && vindicatorEntity.random.nextInt(BreakDoorGoal.toGoalTicks(10)) == 0 && super.canStart(); -WitchEntity -tickMovement() - if (this.random.nextFloat() < 0.15f && this.isSubmergedIn(FluidTags.WATER) && !this.hasStatusEffect(StatusEffects.WATER_BREATHING)) { -... } else if (this.random.nextFloat() < 0.15f && (this.isOnFire() || this.getRecentDamageSource() != null && this.getRe... - } else if (this.random.nextFloat() < 0.05f && this.getHealth() < this.getMaxHealth()) { - } else if (this.random.nextFloat() < 0.5f && this.getTarget() != null && !this.hasStatusEffect(StatusEffects.SPEED) && this.getTarget().squaredDistanceTo(this) > 121.0) { - this.world.playSound(null, this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0f, 0.8f + this.random.nextFloat() * 0.4f); - if (this.random.nextFloat() < 7.5E-4f) { -handleStatus(byte) - for (int i = 0; i < this.random.nextInt(35) + 10; ++i) { -...ParticleTypes.WITCH, this.getX() + this.random.nextGaussian() * (double)0.13f, this.getBoundingBox().maxY + 0.5 + this.random.nextGaussian()... -...this.getBoundingBox().maxY + 0.5 + this.random.nextGaussian() * (double)0.13f, this.getZ() + this.random.nextGaussian() * (double)0.13f, 0.0... -...n() * (double)0.13f, this.getZ() + this.random.nextGaussian() * (double)0.13f, 0.0, 0.0, 0.0);... -attack(LivingEntity, float) - } else if (g <= 3.0 && !target.hasStatusEffect(StatusEffects.WEAKNESS) && this.random.nextFloat() < 0.25f) { - this.world.playSound(null, this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_WITCH_THROW, this.getSoundCategory(), 1.0f, 0.8f + this.random.nextFloat() * 0.4f); -ZombieEntity -tickMovement() - itemStack.setDamage(itemStack.getDamage() + this.random.nextInt(2)); -damage(DamageSource, float) -...ty() == Difficulty.HARD && (double)this.random.nextFloat() < this.getAttributeValue(EntityAttributes.ZOMBIE_SPAWN_REINFORCEMENTS) && this.wo... - int m = i + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); - int m = i + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); - int n = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); - int n = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); - int o = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); - int o = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); -tryAttack(Entity) - if (this.getMainHandStack().isEmpty() && this.isOnFire() && this.random.nextFloat() < f * 0.3f) { -initEquipment(LocalDifficulty) - float f = this.random.nextFloat(); - int i = this.random.nextInt(3); -onKilledOther(ServerWorld, LivingEntity) - if (world.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) { -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - this.setCanPickUpLoot(this.random.nextFloat() < 0.55f * f); - this.setCanBreakDoors(this.shouldBreakDoors() && this.random.nextFloat() < f * 0.1f); - if (chickenEntity == 10 && list == 31 && this.random.nextFloat() < 0.25f) { - this.equipStack(EquipmentSlot.HEAD, new ItemStack(this.random.nextFloat() < 0.1f ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); -applyAttributeModifiers(float) -...buteModifier("Random spawn bonus", this.random.nextDouble() * (double)0.05f, EntityAttributeModifier.Operation.ADDITION));... - double d = this.random.nextDouble() * 1.5 * (double)chanceMultiplier; - if (this.random.nextFloat() < chanceMultiplier * 0.05f) { -...uteModifier("Leader zombie bonus", this.random.nextDouble() * 0.25 + 0.5, EntityAttributeModifier.Operation.ADDITION));... -...uteModifier("Leader zombie bonus", this.random.nextDouble() * 3.0 + 1.0, EntityAttributeModifier.Operation.MULTIPLY_TOTAL));... -initAttributes() - this.getAttributeInstance(EntityAttributes.ZOMBIE_SPAWN_REINFORCEMENTS).setBaseValue(this.random.nextDouble() * (double)0.1f); -ZombieEntity.DestroyEggGoal -tickStepping(WorldAccess, BlockPos) - world.playSound(null, pos, SoundEvents.ENTITY_ZOMBIE_DESTROY_EGG, SoundCategory.HOSTILE, 0.5f, 0.9f + ZombieEntity.this.random.nextFloat() * 0.2f); -ZombieVillagerEntity -ZombieVillagerEntity(EntityType, World) - this.setVillagerData(this.getVillagerData().withProfession(Registry.VILLAGER_PROFESSION.getRandom(this.random))); -interactMob(PlayerEntity, Hand) - this.setConverting(player.getUuid(), this.random.nextInt(2401) + 3600); -handleStatus(byte) -...E, this.getSoundCategory(), 1.0f + this.random.nextFloat(), this.random.nextFloat() * 0.7f + 0.3f, false);... -...), 1.0f + this.random.nextFloat(), this.random.nextFloat() * 0.7f + 0.3f, false);... -getConversionRate() - if (this.random.nextFloat() < 0.01f) { - if (this.random.nextFloat() < 0.3f) { -getSoundPitch() - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 2.0f; - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 2.0f; - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f; - return (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f; -ZombifiedPiglinEntity -tickAngerPassing() - this.angerPassingCooldown = ANGER_PASSING_COOLDOWN_RANGE.get(this.random); -setTarget(LivingEntity) - this.angrySoundDelay = ANGRY_SOUND_DELAY_RANGE.get(this.random); - this.angerPassingCooldown = ANGER_PASSING_COOLDOWN_RANGE.get(this.random); -chooseRandomAngerTime() - this.setAngerTime(ANGER_TIME_RANGE.get(this.random)); -net.minecraft.entity.passive -AbstractDonkeyEntity -playAddChestSound() - this.playSound(SoundEvents.ENTITY_DONKEY_CHEST, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_DONKEY_CHEST, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); -AnimalEntity -tickMovement() - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -handleStatus(byte) - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -AxolotlEntity -createChild(ServerWorld, PassiveEntity) -...xolotlEntity.shouldBabyBeDifferent(this.random) ? Variant.getRandomUnnatural(this.random) : (this.random.nextBoolean() ? this.getVariant() :... -...ndom) ? Variant.getRandomUnnatural(this.random) : (this.random.nextBoolean() ? this.getVariant() : ((AxolotlEntity)entity).getVariant());... -...getRandomUnnatural(this.random) : (this.random.nextBoolean() ? this.getVariant() : ((AxolotlEntity)entity).getVariant());... -BatEntity -getAmbientSound() - if (this.isRoosting() && this.random.nextInt(4) != 0) { -mobTick() - if (this.random.nextInt(200) == 0) { - this.headYaw = this.random.nextInt(360); - if (this.hangingPosition == null || this.random.nextInt(30) == 0 || this.hangingPosition.isWithinDistance(this.getPos(), 2.0)) { -...new BlockPos(this.getX() + (double)this.random.nextInt(7) - (double)this.random.nextInt(7), this.getY() + (double)this.random.nextInt(6) - 2... -...e)this.random.nextInt(7) - (double)this.random.nextInt(7), this.getY() + (double)this.random.nextInt(6) - 2.0, this.getZ() + (double)this.ra... -....nextInt(7), this.getY() + (double)this.random.nextInt(6) - 2.0, this.getZ() + (double)this.random.nextInt(7) - (double)this.random.nextInt(... -...nt(6) - 2.0, this.getZ() + (double)this.random.nextInt(7) - (double)this.random.nextInt(7));... -...e)this.random.nextInt(7) - (double)this.random.nextInt(7));... - if (this.random.nextInt(100) == 0 && this.world.getBlockState(blockPos2).isSolidBlock(this.world, blockPos2)) { -BeeEntity -BeeEntity(EntityType, World) - this.ticksUntilCanPollinate = MathHelper.nextInt(this.random, 20, 60); -tick() - if (this.hasNectar() && this.getCropsGrownSincePollination() < 10 && this.random.nextFloat() < 0.05f) { - for (int i = 0; i < this.random.nextInt(2) + 1; ++i) { -mobTick() - if (this.ticksSinceSting % 5 == 0 && this.random.nextInt(MathHelper.clamp(1200 - this.ticksSinceSting, 1, 1200)) == 0) { -chooseRandomAngerTime() - this.setAngerTime(ANGER_TIME_RANGE.get(this.random)); -BeeEntity.BeeWanderAroundGoal -canStart() - return BeeEntity.this.navigation.isIdle() && BeeEntity.this.random.nextInt(10) == 0; -BeeEntity.GrowCropsGoal -canBeeStart() - if (BeeEntity.this.random.nextFloat() < 0.3f) { -tick() - if (BeeEntity.this.random.nextInt(this.getTickCount(30)) != 0) { - ((Fertilizable)((Object)blockState.getBlock())).grow((ServerWorld)BeeEntity.this.world, BeeEntity.this.random, blockPos, blockState); -BeeEntity.PollinateGoal -canBeeStart() - BeeEntity.this.ticksUntilCanPollinate = MathHelper.nextInt(BeeEntity.this.random, 20, 60); -canBeeContinue() - return BeeEntity.this.random.nextFloat() < 0.2f; -tick() - boolean bl4 = bl3 = BeeEntity.this.random.nextInt(25) == 0; - if (BeeEntity.this.random.nextFloat() < 0.05f && this.pollinationTicks > this.lastPollinationTick + 60) { -getRandomOffset() - return (BeeEntity.this.random.nextFloat() * 2.0f - 1.0f) * 0.33333334f; -CatEntity -setCatType(int) - type = this.random.nextInt(10); -getAmbientSound() - if (this.random.nextInt(4) == 0) { -updateAnimations() - this.playSound(SoundEvents.ENTITY_CAT_PURR, 0.6f + 0.4f * (this.random.nextFloat() - this.random.nextFloat()), 1.0f); - this.playSound(SoundEvents.ENTITY_CAT_PURR, 0.6f + 0.4f * (this.random.nextFloat() - this.random.nextFloat()), 1.0f); -createChild(ServerWorld, PassiveEntity) - if (this.random.nextBoolean()) { - if (this.random.nextBoolean()) { -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - this.setCatType(this.random.nextInt(11)); - this.setCatType(this.random.nextInt(10)); -interactMob(PlayerEntity, Hand) - if (this.random.nextInt(3) == 0) { -ChickenEntity -tickMovement() - this.playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.eggLayTime = this.random.nextInt(6000) + 6000; - public int eggLayTime = this.random.nextInt(6000) + 6000; -DolphinEntity -tick() - this.setVelocity(this.getVelocity().add((this.random.nextFloat() * 2.0f - 1.0f) * 0.2f, 0.5, (this.random.nextFloat() * 2.0f - 1.0f) * 0.2f)); - this.setVelocity(this.getVelocity().add((this.random.nextFloat() * 2.0f - 1.0f) * 0.2f, 0.5, (this.random.nextFloat() * 2.0f - 1.0f) * 0.2f)); - this.setYaw(this.random.nextFloat() * 360.0f); - float h = 1.2f - this.random.nextFloat() * 0.7f; -spawnParticlesAround(ParticleEffect) - double d = this.random.nextGaussian() * 0.01; - double e = this.random.nextGaussian() * 0.01; - double f = this.random.nextGaussian() * 0.01; -DolphinEntity.PlayWithItemsGoal -stop() - this.nextPlayingTime = DolphinEntity.this.age + DolphinEntity.this.random.nextInt(100); -spitOutItem(ItemStack) - float g = DolphinEntity.this.random.nextFloat() * ((float)Math.PI * 2); - float h = 0.02f * DolphinEntity.this.random.nextFloat(); -FishEntity -tickMovement() - this.setVelocity(this.getVelocity().add((this.random.nextFloat() * 2.0f - 1.0f) * 0.05f, 0.4f, (this.random.nextFloat() * 2.0f - 1.0f) * 0.05f)); - this.setVelocity(this.getVelocity().add((this.random.nextFloat() * 2.0f - 1.0f) * 0.05f, 0.4f, (this.random.nextFloat() * 2.0f - 1.0f) * 0.05f)); -FoxEntity -tickMovement() - } else if (this.eatingTime > 560 && this.random.nextFloat() < 0.1f) { - if (this.isAggressive() && this.random.nextFloat() < 0.05f) { -initEquipment(LocalDifficulty) - if (this.random.nextFloat() < 0.2f) { - float f = this.random.nextFloat(); -...temStack(Items.EGG) : (f < 0.4f ? (this.random.nextBoolean() ? new ItemStack(Items.RABBIT_FOOT) : new ItemStack(Items.RABBIT_HIDE)) : (f < 0... -handleStatus(byte) -... Vec3d vec3d = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, 0.0).rotateX(-this.getPitch() * ((float)... -createChild(ServerWorld, PassiveEntity) - foxEntity.setType(this.random.nextBoolean() ? this.getFoxType() : ((FoxEntity)passiveEntity).getFoxType()); -getAmbientSound() -... if (!this.world.isDay() && this.random.nextFloat() < 0.1f && (list = this.world.getEntitiesByClass(PlayerEntity.class, this.getBound... -FoxEntity.DelayedCalmDownGoal -DelayedCalmDownGoal() - this.timer = FoxEntity.this.random.nextInt(MAX_CALM_DOWN_TIME); -stop() - this.timer = FoxEntity.this.random.nextInt(MAX_CALM_DOWN_TIME); -FoxEntity.EatSweetBerriesGoal -tick() - } else if (!this.hasReached() && FoxEntity.this.random.nextFloat() < 0.05f) { -HorseBaseEntity -playEatingAnimation() - this.world.playSound(null, this.getX(), this.getY(), this.getZ(), soundEvent, this.getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); - this.world.playSound(null, this.getX(), this.getY(), this.getZ(), soundEvent, this.getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); -getHurtSound(DamageSource) - if (this.random.nextInt(3) == 0) { -getAmbientSound() - if (this.random.nextInt(10) == 0 && !this.isImmobile()) { -tickMovement() - if (this.random.nextInt(200) == 0) { - if (this.random.nextInt(900) == 0 && this.deathTime == 0) { - if (!this.isEatingGrass() && !this.hasPassengers() && this.random.nextInt(300) == 0 && this.world.getBlockState(this.getBlockPos().down()).isOf(Blocks.GRASS_BLOCK)) { -spawnPlayerReactionParticles(boolean) - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -getChildHealthBonus() - return 15.0f + (float)this.random.nextInt(8) + (float)this.random.nextInt(9); - return 15.0f + (float)this.random.nextInt(8) + (float)this.random.nextInt(9); -getChildJumpStrengthBonus() - return (double)0.4f + this.random.nextDouble() * 0.2 + this.random.nextDouble() * 0.2 + this.random.nextDouble() * 0.2; - return (double)0.4f + this.random.nextDouble() * 0.2 + this.random.nextDouble() * 0.2 + this.random.nextDouble() * 0.2; - return (double)0.4f + this.random.nextDouble() * 0.2 + this.random.nextDouble() * 0.2 + this.random.nextDouble() * 0.2; -getChildMovementSpeedBonus() - return ((double)0.45f + this.random.nextDouble() * 0.3 + this.random.nextDouble() * 0.3 + this.random.nextDouble() * 0.3) * 0.25; - return ((double)0.45f + this.random.nextDouble() * 0.3 + this.random.nextDouble() * 0.3 + this.random.nextDouble() * 0.3) * 0.25; - return ((double)0.45f + this.random.nextDouble() * 0.3 + this.random.nextDouble() * 0.3 + this.random.nextDouble() * 0.3) * 0.25; -HorseEntity -playWalkSound(BlockSoundGroup) - if (this.random.nextInt(10) == 0) { -createChild(ServerWorld, PassiveEntity) - int i = this.random.nextInt(9); - HorseColor horseColor = i < 4 ? this.getColor() : (i < 8 ? horseEntity.getColor() : Util.getRandom(HorseColor.values(), this.random)); - int j = this.random.nextInt(5); - HorseMarking horseMarking = j < 2 ? this.getMarking() : (j < 4 ? horseEntity.getMarking() : Util.getRandom(HorseMarking.values(), this.random)); -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - horseColor = Util.getRandom(HorseColor.values(), this.random); - this.setVariant(horseColor, Util.getRandom(HorseMarking.values(), this.random)); -IronGolemEntity -tickMovement() -...quared() > 2.500000277905201E-7 && this.random.nextInt(5) == 0 && !(blockState = this.world.getBlockState(new BlockPos(i = MathHelper.floor(... -...lockState), this.getX() + ((double)this.random.nextFloat() - 0.5) * (double)this.getWidth(), this.getY() + 0.1, this.getZ() + ((double)this.... -...tY() + 0.1, this.getZ() + ((double)this.random.nextFloat() - 0.5) * (double)this.getWidth(), 4.0 * ((double)this.random.nextFloat() - 0.5), ... -...le)this.getWidth(), 4.0 * ((double)this.random.nextFloat() - 0.5), 0.5, ((double)this.random.nextFloat() - 0.5) * 4.0);... -....nextFloat() - 0.5), 0.5, ((double)this.random.nextFloat() - 0.5) * 4.0);... -chooseRandomAngerTime() - this.setAngerTime(ANGER_TIME_RANGE.get(this.random)); -tryAttack(Entity) - float g = (int)f > 0 ? f / 2.0f + (float)this.random.nextInt((int)f) : f; -interactMob(PlayerEntity, Hand) - float g = 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f; - float g = 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f; -LlamaEntity -initializeStrength() - int i = this.random.nextFloat() < 0.04f ? 5 : 3; - this.setStrength(1 + this.random.nextInt(i)); -receiveFood(PlayerEntity, ItemStack) - this.world.playSound(null, this.getX(), this.getY(), this.getZ(), this.getEatSound(), this.getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); - this.world.playSound(null, this.getX(), this.getY(), this.getZ(), this.getEatSound(), this.getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f); -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - i = this.random.nextInt(4); -playAddChestSound() - this.playSound(SoundEvents.ENTITY_LLAMA_CHEST, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_LLAMA_CHEST, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); -createChild(ServerWorld, PassiveEntity) - int i = this.random.nextInt(Math.max(this.getStrength(), llamaEntity2.getStrength())) + 1; - if (this.random.nextFloat() < 0.03f) { - llamaEntity.setVariant(this.random.nextBoolean() ? this.getVariant() : llamaEntity2.getVariant()); -spitAt(LivingEntity) -....getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f);... -... 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f);... -MerchantEntity -produceParticles(ParticleEffect) - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -fillRecipesFromPool(TradeOfferList, Factory[], int) - set.add(this.random.nextInt(pool.length)); - TradeOffer tradeOffer = factory.create(this, this.random); -MooshroomEntity -interactMob(PlayerEntity, Hand) -...ParticleTypes.SMOKE, this.getX() + this.random.nextDouble() / 2.0, this.getBodyY(0.5), this.getZ() + this.random.nextDouble() / 2.0, 0.0, th... -... this.getBodyY(0.5), this.getZ() + this.random.nextDouble() / 2.0, 0.0, this.random.nextDouble() / 5.0, 0.0);... -...is.random.nextDouble() / 2.0, 0.0, this.random.nextDouble() / 5.0, 0.0);... -...articleTypes.EFFECT, this.getX() + this.random.nextDouble() / 2.0, this.getBodyY(0.5), this.getZ() + this.random.nextDouble() / 2.0, 0.0, th... -... this.getBodyY(0.5), this.getZ() + this.random.nextDouble() / 2.0, 0.0, this.random.nextDouble() / 5.0, 0.0);... -...is.random.nextDouble() / 2.0, 0.0, this.random.nextDouble() / 5.0, 0.0);... -chooseBabyType(MooshroomEntity) - Type type3 = type == (type2 = mooshroom.getMooshroomType()) && this.random.nextInt(1024) == 0 ? (type == Type.BROWN ? Type.RED : Type.BROWN) : (this.random.nextBoolean() ? type : type2); - Type type3 = type == (type2 = mooshroom.getMooshroomType()) && this.random.nextInt(1024) == 0 ? (type == Type.BROWN ? Type.RED : Type.BROWN) : (this.random.nextBoolean() ? type : type2); -MuleEntity -playAddChestSound() - this.playSound(SoundEvents.ENTITY_MULE_CHEST, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_MULE_CHEST, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); -OcelotEntity -interactMob(PlayerEntity, Hand) - if (this.random.nextInt(3) == 0) { -showEmoteParticle(boolean) - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -PandaEntity -setMainGene(Gene) - gene = Gene.createRandom(this.random); -setHiddenGene(Gene) - gene = Gene.createRandom(this.random); -updateEatingAnimation() - if (!this.isEating() && this.isScared() && !this.isScaredByThunderstorm() && !this.getEquippedStack(EquipmentSlot.MAINHAND).isEmpty() && this.random.nextInt(80) == 1) { - if (!this.world.isClient && this.getEatingTicks() > 80 && this.random.nextInt(20) == 1) { -playEatingAnimation() - this.playSound(SoundEvents.ENTITY_PANDA_EAT, 0.5f + 0.5f * (float)this.random.nextInt(2), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_PANDA_EAT, 0.5f + 0.5f * (float)this.random.nextInt(2), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_PANDA_EAT, 0.5f + 0.5f * (float)this.random.nextInt(2), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - Vec3d vec3d = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, ((double)this.random.nextFloat() - 0.5) * 0.1); - Vec3d vec3d = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, ((double)this.random.nextFloat() - 0.5) * 0.1); - double d = (double)(-this.random.nextFloat()) * 0.6 - 0.3; - Vec3d vec3d2 = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.8, d, 1.0 + ((double)this.random.nextFloat() - 0.5) * 0.4); - Vec3d vec3d2 = new Vec3d(((double)this.random.nextFloat() - 0.5) * 0.8, d, 1.0 + ((double)this.random.nextFloat() - 0.5) * 0.4); -sneeze() - if (!this.world.isClient() && this.random.nextInt(700) == 0 && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - this.setMainGene(Gene.createRandom(this.random)); - this.setHiddenGene(Gene.createRandom(this.random)); -initGenes(PandaEntity, PandaEntity) - if (this.random.nextBoolean()) { - this.setHiddenGene(Gene.createRandom(this.random)); - this.setMainGene(Gene.createRandom(this.random)); - } else if (this.random.nextBoolean()) { - if (this.random.nextInt(32) == 0) { - this.setMainGene(Gene.createRandom(this.random)); - if (this.random.nextInt(32) == 0) { - this.setHiddenGene(Gene.createRandom(this.random)); -getRandomGene() - if (this.random.nextBoolean()) { -PandaEntity.LieOnBackGoal -canStart() - return this.nextLieOnBackAge < this.panda.age && this.panda.isLazy() && this.panda.isIdle() && this.panda.random.nextInt(LieOnBackGoal.toGoalTicks(400)) == 1; -shouldContinue() - if (this.panda.isTouchingWater() || !this.panda.isLazy() && this.panda.random.nextInt(LieOnBackGoal.toGoalTicks(600)) == 1) { - return this.panda.random.nextInt(LieOnBackGoal.toGoalTicks(2000)) != 1; -PandaEntity.PickUpFoodGoal -shouldContinue() - if (PandaEntity.this.isTouchingWater() || !PandaEntity.this.isLazy() && PandaEntity.this.random.nextInt(PickUpFoodGoal.toGoalTicks(600)) == 1) { - return PandaEntity.this.random.nextInt(PickUpFoodGoal.toGoalTicks(2000)) != 1; -stop() - int i = PandaEntity.this.isLazy() ? PandaEntity.this.random.nextInt(50) + 10 : PandaEntity.this.random.nextInt(150) + 10; - int i = PandaEntity.this.isLazy() ? PandaEntity.this.random.nextInt(50) + 10 : PandaEntity.this.random.nextInt(150) + 10; -PandaEntity.PlayGoal -canStart() - if (this.panda.isPlayful() && this.panda.random.nextInt(PlayGoal.toGoalTicks(60)) == 1) { - return this.panda.random.nextInt(PlayGoal.toGoalTicks(500)) == 1; -PandaEntity.SneezeGoal -canStart() - if (this.panda.isWeak() && this.panda.random.nextInt(SneezeGoal.toGoalTicks(500)) == 1) { - return this.panda.random.nextInt(SneezeGoal.toGoalTicks(6000)) == 1; -ParrotEntity -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - this.setVariant(this.random.nextInt(5)); -interactMob(PlayerEntity, Hand) -....getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f);... -... 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f);... - if (this.random.nextInt(10) == 0) { -getSoundPitch() - return ParrotEntity.getSoundPitch(this.random); -PassiveEntity -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - if ((passiveData = (PassiveData)entityData).canSpawnBaby() && passiveData.getSpawnedCount() > 0 && this.random.nextFloat() <= passiveData.getBabyChance()) { -PolarBearEntity -chooseRandomAngerTime() - this.setAngerTime(ANGER_TIME_RANGE.get(this.random)); -RabbitEntity -setJumping(boolean) - this.playSound(this.getJumpSound(), this.getSoundVolume(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f) * 0.8f); - this.playSound(this.getJumpSound(), this.getSoundVolume(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f) * 0.8f); -mobTick() - this.moreCarrotTicks -= this.random.nextInt(3); -tryAttack(Entity) - this.playSound(SoundEvents.ENTITY_RABBIT_ATTACK, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_RABBIT_ATTACK, 1.0f, (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); -createChild(ServerWorld, PassiveEntity) - if (this.random.nextInt(20) != 0) { - i = passiveEntity instanceof RabbitEntity && this.random.nextBoolean() ? ((RabbitEntity)passiveEntity).getRabbitType() : this.getRabbitType(); -chooseType(WorldAccess) - int i = this.random.nextInt(100); -SheepEntity -sheared(SoundCategory) - int i = 1 + this.random.nextInt(3); -...city(itemEntity.getVelocity().add((this.random.nextFloat() - this.random.nextFloat()) * 0.1f, this.random.nextFloat() * 0.05f, (this.random.... -...y().add((this.random.nextFloat() - this.random.nextFloat()) * 0.1f, this.random.nextFloat() * 0.05f, (this.random.nextFloat() - this.random.... -...- this.random.nextFloat()) * 0.1f, this.random.nextFloat() * 0.05f, (this.random.nextFloat() - this.random.nextFloat()) * 0.1f));... -... this.random.nextFloat() * 0.05f, (this.random.nextFloat() - this.random.nextFloat()) * 0.1f));... -... 0.05f, (this.random.nextFloat() - this.random.nextFloat()) * 0.1f));... -SquidEntity -SquidEntity(EntityType, World) - this.random.setSeed(this.getId()); - this.thrustTimerSpeed = 1.0f / (this.random.nextFloat() + 1.0f) * 0.2f; -tickMovement() - if (this.random.nextInt(10) == 0) { - this.thrustTimerSpeed = 1.0f / (this.random.nextFloat() + 1.0f) * 0.2f; -squirt() - Vec3d vec3d2 = this.applyBodyRotations(new Vec3d((double)this.random.nextFloat() * 0.6 - 0.3, -1.0, (double)this.random.nextFloat() * 0.6 - 0.3)); - Vec3d vec3d2 = this.applyBodyRotations(new Vec3d((double)this.random.nextFloat() * 0.6 - 0.3, -1.0, (double)this.random.nextFloat() * 0.6 - 0.3)); - Vec3d vec3d3 = vec3d2.multiply(0.3 + (double)(this.random.nextFloat() * 2.0f)); -StriderEntity -tick() - if (this.isBeingTempted() && this.random.nextInt(140) == 0) { - } else if (this.isEscapingDanger() && this.random.nextInt(60) == 0) { -interactMob(PlayerEntity, Hand) -....getSoundCategory(), 1.0f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f);... -... 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.2f);... -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - if (this.random.nextInt(30) == 0) { - entityData = this.initializeRider(world, difficulty, mobEntity, new ZombieEntity.ZombieData(ZombieEntity.shouldBeBaby(this.random), false)); - } else if (this.random.nextInt(10) == 0) { -TameableEntity -showEmoteParticle(boolean) - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -TropicalFishEntity -initialize(ServerWorldAccess, LocalDifficulty, SpawnReason, EntityData, NbtCompound) - } else if ((double)this.random.nextFloat() < 0.9) { - int tropicalFishData = Util.getRandom(COMMON_VARIANTS, this.random); - i = this.random.nextInt(2); - j = this.random.nextInt(6); - k = this.random.nextInt(15); - l = this.random.nextInt(15); -TurtleEntity.LayEggGoal -tick() - world.setBlockState(this.targetPos.up(), (BlockState)Blocks.TURTLE_EGG.getDefaultState().with(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1), Block.NOTIFY_ALL); -TurtleEntity.TravelGoal -start() - Random random = this.turtle.random; -VillagerEntity -mobTick() - if (!this.isAiDisabled() && this.random.nextInt(100) == 0 && (raid = ((ServerWorld)this.world).getRaidAt(this.getBlockPos())) != null && raid.isActive() && !raid.isFinished()) { -afterUsing(TradeOffer) - int i = 3 + this.random.nextInt(4); -createChild(ServerWorld, PassiveEntity) - double d = this.random.nextDouble(); -talkWithVillager(ServerWorld, VillagerEntity, long) - this.gossip.shareGossipFrom(villager.gossip, this.random, 10); -WanderingTraderEntity -fillRecipes() - int i = this.random.nextInt(factorys2.length); - TradeOffer tradeOffer = factory.create(this, this.random); -afterUsing(TradeOffer) - int i = 3 + this.random.nextInt(4); -WolfEntity -getAmbientSound() - if (this.random.nextInt(3) == 0) { -tick() - this.playSound(SoundEvents.ENTITY_WOLF_SHAKE, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - this.playSound(SoundEvents.ENTITY_WOLF_SHAKE, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2f + 1.0f); - float g = (this.random.nextFloat() * 2.0f - 1.0f) * this.getWidth() * 0.5f; - float h = (this.random.nextFloat() * 2.0f - 1.0f) * this.getWidth() * 0.5f; -interactMob(PlayerEntity, Hand) - if (this.random.nextInt(3) == 0) { -chooseRandomAngerTime() - this.setAngerTime(ANGER_TIME_RANGE.get(this.random)); -WolfEntity.AvoidLlamaGoal -isScaredOf(LlamaEntity) - return llama.getStrength() >= WolfEntity.this.random.nextInt(5); -net.minecraft.entity.player -PlayerEntity -spawnParticles(ParticleEffect) - double d = this.random.nextGaussian() * 0.02; - double e = this.random.nextGaussian() * 0.02; - double f = this.random.nextGaussian() * 0.02; -tickMovement() - this.collideWithEntity((Entity)Util.getRandom(list2, this.random)); -dropItem(ItemStack, boolean, boolean) - float f = this.random.nextFloat() * 0.5f; - float g = this.random.nextFloat() * ((float)Math.PI * 2); - float k = this.random.nextFloat() * ((float)Math.PI * 2); - float l = 0.02f * this.random.nextFloat(); -...) * (double)l, -g * 0.3f + 0.1f + (this.random.nextFloat() - this.random.nextFloat()) * 0.1f, (double)(j * h * 0.3f) + Math.sin(k) * (double... -... 0.1f + (this.random.nextFloat() - this.random.nextFloat()) * 0.1f, (double)(j * h * 0.3f) + Math.sin(k) * (double)l);... -readCustomDataFromNbt(NbtCompound) - this.enchantmentTableSeed = this.random.nextInt(); -disableShield(boolean) - if (this.random.nextFloat() < f) { -applyEnchantmentCosts(ItemStack, int) - this.enchantmentTableSeed = this.random.nextInt(); -net.minecraft.entity.projectile -FireworkRocketEntity -FireworkRocketEntity(World, double, double, double, ItemStack) - this.setVelocity(this.random.nextGaussian() * 0.001, 0.05, this.random.nextGaussian() * 0.001); - this.setVelocity(this.random.nextGaussian() * 0.001, 0.05, this.random.nextGaussian() * 0.001); - this.lifeTime = 10 * i + this.random.nextInt(6) + this.random.nextInt(7); - this.lifeTime = 10 * i + this.random.nextInt(6) + this.random.nextInt(7); -tick() -...), this.getY() - 0.3, this.getZ(), this.random.nextGaussian() * 0.05, -this.getVelocity().y * 0.5, this.random.nextGaussian() * 0.05);... -...0.05, -this.getVelocity().y * 0.5, this.random.nextGaussian() * 0.05);... -handleStatus(byte) - for (int i = 0; i < this.random.nextInt(3) + 2; ++i) { - this.world.addParticle(ParticleTypes.POOF, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05, 0.005, this.random.nextGaussian() * 0.05); - this.world.addParticle(ParticleTypes.POOF, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05, 0.005, this.random.nextGaussian() * 0.05); -FishingBobberEntity -FishingBobberEntity(PlayerEntity, World, int, int) - vec3d = vec3d.multiply(0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045, 0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045, 0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045); - vec3d = vec3d.multiply(0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045, 0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045, 0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045); - vec3d = vec3d.multiply(0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045, 0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045, 0.6 / m + 0.5 + this.random.nextGaussian() * 0.0045); -tick() - this.setVelocity(vec3d.x * 0.9, vec3d.y - d * (double)this.random.nextFloat() * 0.2, vec3d.z * 0.9); -tickFishingLogic(BlockPos) - if (this.random.nextFloat() < 0.25f && this.world.hasRain(blockPos)) { - if (this.random.nextFloat() < 0.5f && !this.world.isSkyVisible(blockPos)) { - this.fishAngle = (float)((double)this.fishAngle + this.random.nextGaussian() * 4.0); - if (this.random.nextFloat() < 0.15f) { - this.playSound(SoundEvents.ENTITY_FISHING_BOBBER_SPLASH, 0.25f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.playSound(SoundEvents.ENTITY_FISHING_BOBBER_SPLASH, 0.25f, 1.0f + (this.random.nextFloat() - this.random.nextFloat()) * 0.4f); - this.hookCountdown = MathHelper.nextInt(this.random, 20, 40); - if (this.random.nextFloat() < f) { - float g = MathHelper.nextFloat(this.random, 0.0f, 360.0f) * ((float)Math.PI / 180); - float h = MathHelper.nextFloat(this.random, 25.0f, 60.0f); - serverWorld.spawnParticles(ParticleTypes.SPLASH, d, e, j, 2 + this.random.nextInt(2), 0.1f, 0.0, 0.1f, 0.0); - this.fishAngle = MathHelper.nextFloat(this.random, 0.0f, 360.0f); - this.fishTravelCountdown = MathHelper.nextInt(this.random, 20, 80); - this.waitCountdown = MathHelper.nextInt(this.random, 100, 600); -use(ItemStack) -...rameters.THIS_ENTITY, this).random(this.random).luck((float)this.luckOfTheSeaLevel + playerEntity.getLuck());... - playerEntity.world.spawnEntity(new ExperienceOrbEntity(playerEntity.world, playerEntity.getX(), playerEntity.getY() + 0.5, playerEntity.getZ() + 0.5, this.random.nextInt(6) + 1)); -PersistentProjectileEntity -fall() - this.setVelocity(vec3d.multiply(this.random.nextFloat() * 0.2f, this.random.nextFloat() * 0.2f, this.random.nextFloat() * 0.2f)); - this.setVelocity(vec3d.multiply(this.random.nextFloat() * 0.2f, this.random.nextFloat() * 0.2f, this.random.nextFloat() * 0.2f)); - this.setVelocity(vec3d.multiply(this.random.nextFloat() * 0.2f, this.random.nextFloat() * 0.2f, this.random.nextFloat() * 0.2f)); -onEntityHit(EntityHitResult) - long l2 = this.random.nextInt(i / 2 + 2); - this.playSound(this.sound, 1.0f, 1.2f / (this.random.nextFloat() * 0.2f + 0.9f)); -onBlockHit(BlockHitResult) - this.playSound(this.getSound(), 1.0f, 1.2f / (this.random.nextFloat() * 0.2f + 0.9f)); -applyEnchantmentEffects(LivingEntity, float) - this.setDamage((double)(damageModifier * 2.0f) + (this.random.nextGaussian() * 0.25 + (double)((float)this.world.getDifficulty().getId() * 0.11f))); -ProjectileEntity -setVelocity(double, double, double, float, float) -...new Vec3d(x, y, z).normalize().add(this.random.nextGaussian() * (double)0.0075f * (double)divergence, this.random.nextGaussian() * (double)0... -...uble)0.0075f * (double)divergence, this.random.nextGaussian() * (double)0.0075f * (double)divergence, this.random.nextGaussian() * (double)0... -...uble)0.0075f * (double)divergence, this.random.nextGaussian() * (double)0.0075f * (double)divergence).multiply(speed);... -ShulkerBulletEntity -method_7486(Axis) - direction = Direction.random(this.random); - direction = Direction.random(this.random); - direction = (Direction)list.get(this.random.nextInt(list.size())); - this.stepCount = 10 + this.random.nextInt(5) * 10; -net.minecraft.entity.projectile.thrown -EggEntity -handleStatus(byte) -...this.getY(), this.getZ(), ((double)this.random.nextFloat() - 0.5) * 0.08, ((double)this.random.nextFloat() - 0.5) * 0.08, ((double)this.rand... -...extFloat() - 0.5) * 0.08, ((double)this.random.nextFloat() - 0.5) * 0.08, ((double)this.random.nextFloat() - 0.5) * 0.08);... -...extFloat() - 0.5) * 0.08, ((double)this.random.nextFloat() - 0.5) * 0.08);... -onCollision(HitResult) - if (this.random.nextInt(8) == 0) { - if (this.random.nextInt(32) == 0) { -EnderPearlEntity -onCollision(HitResult) - this.world.addParticle(ParticleTypes.PORTAL, this.getX(), this.getY() + this.random.nextDouble() * 2.0, this.getZ(), this.random.nextGaussian(), 0.0, this.random.nextGaussian()); - this.world.addParticle(ParticleTypes.PORTAL, this.getX(), this.getY() + this.random.nextDouble() * 2.0, this.getZ(), this.random.nextGaussian(), 0.0, this.random.nextGaussian()); - this.world.addParticle(ParticleTypes.PORTAL, this.getX(), this.getY() + this.random.nextDouble() * 2.0, this.getZ(), this.random.nextGaussian(), 0.0, this.random.nextGaussian()); - if (this.random.nextFloat() < 0.05f && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) { -net.minecraft.entity.raid -RaiderEntity -loot(ItemEntity) - if (!itemStack2.isEmpty() && (double)Math.max(this.random.nextFloat() - 0.1f, 0.0f) < d) { -RaiderEntity.AttackHomeGoal -tryFindHome() -...onStatus.ANY, blockPos, 48, this.raider.random);... -RaiderEntity.CelebrateGoal -tick() - if (!this.raider.isSilent() && this.raider.random.nextInt(this.getTickCount(100)) == 0) { - if (!this.raider.hasVehicle() && this.raider.random.nextInt(this.getTickCount(50)) == 0) { -RaiderEntity.PatrolApproachGoal -tick() - if (this.raider.random.nextInt(50) == 0) { -net.minecraft.entity.vehicle -BoatEntity -onBubbleColumnSurfaceCollision(boolean) - this.world.addParticle(ParticleTypes.SPLASH, this.getX() + (double)this.random.nextFloat(), this.getY() + 0.7, this.getZ() + (double)this.random.nextFloat(), 0.0, 0.0, 0.0); - this.world.addParticle(ParticleTypes.SPLASH, this.getX() + (double)this.random.nextFloat(), this.getY() + 0.7, this.getZ() + (double)this.random.nextFloat(), 0.0, 0.0, 0.0); - if (this.random.nextInt(20) == 0) { - this.world.playSound(this.getX(), this.getY(), this.getZ(), this.getSplashSound(), this.getSoundCategory(), 1.0f, 0.8f + 0.4f * this.random.nextFloat(), false); -tick() - this.world.playSound(null, this.getX() + d, this.getY(), this.getZ() + e, soundEvent, this.getSoundCategory(), 1.0f, 0.8f + 0.4f * this.random.nextFloat()); -FurnaceMinecartEntity -tick() - if (this.isLit() && this.random.nextInt(4) == 0) { -TntMinecartEntity -dropItems(DamageSource) - this.fuseTicks = this.random.nextInt(20) + this.random.nextInt(20); - this.fuseTicks = this.random.nextInt(20) + this.random.nextInt(20); -explode(double) - this.world.createExplosion(this, this.getX(), this.getY(), this.getZ(), (float)(4.0 + this.random.nextDouble() * 1.5 * d), Explosion.DestructionType.BREAK); diff --git a/docs/code_hierarchies/call-hierarchy-ItemStack.damage.txt b/docs/code_hierarchies/call-hierarchy-ItemStack.damage.txt deleted file mode 100644 index c53478292..000000000 --- a/docs/code_hierarchies/call-hierarchy-ItemStack.damage.txt +++ /dev/null @@ -1,121 +0,0 @@ -Method -damage(int, T, Consumer) -Usages in All Places -Unclassified -Gradle: net.minecraft:minecraft-project-@-mapped:1.18-rc1/net.fabricmc.yarn.1_18_rc1.1.18-rc1+build.1-v2 -net.minecraft.block -BeehiveBlock -onUse(BlockState, World, BlockPos, PlayerEntity, Hand, BlockHitResult) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -PumpkinBlock -onUse(BlockState, World, BlockPos, PlayerEntity, Hand, BlockHitResult) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -TntBlock -onUse(BlockState, World, BlockPos, PlayerEntity, Hand, BlockHitResult) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -net.minecraft.enchantment -ThornsEnchantment -onUserDamaged(LivingEntity, Entity, int) - entry.getValue().damage(2, user, entity -> entity.sendEquipmentBreakStatus((EquipmentSlot)((Object)((Object)entry.getKey())))); -net.minecraft.entity -LivingEntity -addSoulSpeedBoostIfNeeded() - itemStack.damage(1, this, player -> player.sendEquipmentBreakStatus(EquipmentSlot.FEET)); -tickFallFlying() - itemStack.damage(1, this, player -> player.sendEquipmentBreakStatus(EquipmentSlot.CHEST)); -net.minecraft.entity.mob -CreeperEntity -interactMob(PlayerEntity, Hand) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -net.minecraft.entity.passive -MooshroomEntity -interactMob(PlayerEntity, Hand) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -SheepEntity -interactMob(PlayerEntity, Hand) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -SnowGolemEntity -interactMob(PlayerEntity, Hand) - itemStack.damage(1, player2, player -> player.sendToolBreakStatus(hand)); -net.minecraft.entity.player -PlayerEntity -damageShield(float) - this.activeItemStack.damage(i, this, player -> player.sendToolBreakStatus(hand)); -PlayerInventory -damageArmor(DamageSource, float, int[]) - itemStack.damage((int)amount, this.player, player -> player.sendEquipmentBreakStatus(EquipmentSlot.fromTypeIndex(EquipmentSlot.Type.ARMOR, i))); -net.minecraft.item -AxeItem -useOnBlock(ItemUsageContext) - itemStack.damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); -BowItem -onStoppedUsing(ItemStack, World, LivingEntity, int) - stack.damage(1, playerEntity, p -> p.sendToolBreakStatus(playerEntity.getActiveHand())); -CrossbowItem -shoot(World, LivingEntity, Hand, ItemStack, ItemStack, float, boolean, ...) - crossbow.damage(bl ? 3 : 1, shooter, e -> e.sendToolBreakStatus(hand)); -FishingRodItem -use(World, PlayerEntity, Hand) - itemStack.damage(i, user, p -> p.sendToolBreakStatus(hand)); -FlintAndSteelItem -useOnBlock(ItemUsageContext) - context.getStack().damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); - itemStack.damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); -HoeItem -useOnBlock(ItemUsageContext) - context.getStack().damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); -MiningToolItem -postHit(ItemStack, LivingEntity, LivingEntity) - stack.damage(2, attacker, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -postMine(ItemStack, World, BlockState, BlockPos, LivingEntity) - stack.damage(1, miner, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -OnAStickItem -use(World, PlayerEntity, Hand) - itemStack.damage(this.damagePerUse, user, p -> p.sendToolBreakStatus(hand)); -ShearsItem -postMine(ItemStack, World, BlockState, BlockPos, LivingEntity) - stack.damage(1, miner, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -useOnBlock(ItemUsageContext) - itemStack.damage(1, playerEntity, player -> player.sendToolBreakStatus(context.getHand())); -ShovelItem -useOnBlock(ItemUsageContext) - context.getStack().damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); -SwordItem -postHit(ItemStack, LivingEntity, LivingEntity) - stack.damage(1, attacker, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -postMine(ItemStack, World, BlockState, BlockPos, LivingEntity) - stack.damage(2, miner, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -TridentItem -onStoppedUsing(ItemStack, World, LivingEntity, int) - stack.damage(1, playerEntity, p -> p.sendToolBreakStatus(user.getActiveHand())); -postHit(ItemStack, LivingEntity, LivingEntity) - stack.damage(1, attacker, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -postMine(ItemStack, World, BlockState, BlockPos, LivingEntity) - stack.damage(2, miner, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); -Gradle: net_fabricmc_yarn_1_18_rc1_1_18_rc1_build_1_v2.net.fabricmc.fabric-api:fabric-entity-events-v1:1.4.5+6b21378a14 -net.fabricmc.fabric.api.entity.event.v1 -FabricElytraItem -doVanillaElytraTick(LivingEntity, ItemStack) - chestStack.damage(1, entity, p -> p.sendEquipmentBreakStatus(EquipmentSlot.CHEST)); -Usage in comments -Gradle: net_fabricmc_yarn_1_18_rc1_1_18_rc1_build_1_v2.net.fabricmc.fabric-api:fabric-item-api-v1:1.2.7+3ac43d9514 -net.fabricmc.fabric.api.item.v1 -CustomDamageHandler -damage(ItemStack, int, LivingEntity, Consumer) - * @param breakCallback Callback when the stack reaches zero damage. See {@link ItemStack#damage(int, LivingEntity, Consumer)} and its callsites for more information. - * Allows an item to run custom logic when {@link ItemStack#damage(int, LivingEntity, Consumer)} is called. -Usage in string constants -clientcommands.main -net.earthcomputer.clientcommands.mixin -MixinItemStack -onDamage(int, T, Consumer, CallbackInfo) - @Inject(method = "damage(ILnet/minecraft/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At("HEAD")) -Gradle: net_fabricmc_yarn_1_18_rc1_1_18_rc1_build_1_v2.net.fabricmc.fabric-api:fabric-item-api-v1:1.2.7+3ac43d9514 -net.fabricmc.fabric.mixin.item -ItemStackMixin -saveDamager(int, LivingEntity, Consumer, CallbackInfo) - @Inject(method = "damage(ILnet/minecraft/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At("HEAD")) -hookDamage(int) -... @ModifyArg(method = "damage(ILnet/minecraft/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At(value = "INVOK... -clearDamager(int, T, Consumer, CallbackInfo) - @Inject(method = "damage(ILnet/minecraft/entity/LivingEntity;Ljava/util/function/Consumer;)V", at = @At("RETURN")) diff --git a/docs/code_hierarchies/call-hierarchy-LivingEntity.getRandom.txt b/docs/code_hierarchies/call-hierarchy-LivingEntity.getRandom.txt deleted file mode 100644 index 88b1d89ea..000000000 --- a/docs/code_hierarchies/call-hierarchy-LivingEntity.getRandom.txt +++ /dev/null @@ -1,357 +0,0 @@ -Method -getRandom() -Usages in All Places -Unclassified -clientcommands.main -net.earthcomputer.clientcommands.features -PlayerRandCracker -singlePlayerCrackRNG() - OptionalLong seed = getSeed(serverPlayer.getRandom()); -Gradle: net.minecraft:minecraft-project-@-mapped:1.18-rc1/net.fabricmc.yarn.1_18_rc1.1.18-rc1+build.1-v2 -net.minecraft.advancement -AdvancementRewards -apply(ServerPlayerEntity) -....ORIGIN, player.getPos()).random(player.getRandom()).build(LootContextTypes.ADVANCEMENT_REWARD);... -..., SoundCategory.PLAYERS, 0.2f, ((player.getRandom().nextFloat() - player.getRandom().nextFloat()) * 0.7f + 1.0f) * 2.0f);... -...player.getRandom().nextFloat() - player.getRandom().nextFloat()) * 0.7f + 1.0f) * 2.0f);... -net.minecraft.enchantment -DamageEnchantment -onTargetDamaged(LivingEntity, Entity, int) - int i = 20 + user.getRandom().nextInt(10 * level); -EnchantmentHelper -chooseEquipmentWith(Enchantment, LivingEntity, Predicate) - return list.isEmpty() ? null : (Map.Entry)list.get(entity.getRandom().nextInt(list.size())); -FrostWalkerEnchantment -freezeWater(LivingEntity, World, BlockPos, int) - world.createAndScheduleBlockTick(blockPos2, Blocks.FROSTED_ICE, MathHelper.nextInt(entity.getRandom(), 60, 120)); -ThornsEnchantment -onUserDamaged(LivingEntity, Entity, int) - Random random = user.getRandom(); -net.minecraft.entity -CrossbowUser -shoot(LivingEntity, LivingEntity, ProjectileEntity, float, float) - entity.playSound(SoundEvents.ITEM_CROSSBOW_SHOOT, 1.0f, 1.0f / (entity.getRandom().nextFloat() * 0.4f + 0.8f)); -LivingEntity -addSoulSpeedBoostIfNeeded() - if (this.getRandom().nextFloat() < 0.04f) { -net.minecraft.entity.ai -AboveGroundTargeting -find(PathAwareEntity, int, int, double, double, float, int, ...) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange, 0, x, z, angle); -...uzzyPositions.upWhile(blockPos2, entity.getRandom().nextInt(maxAboveSolid - minAboveSolid + 1) + minAboveSolid, pathAwareEntity.world.getTop... -FuzzyTargeting -find(PathAwareEntity, int, int, ToDoubleFunction) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange); -findValid(PathAwareEntity, int, int, Vec3d, boolean) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange, 0, vec3d.x, vec3d.z, 1.5707963705062866); -towardTarget(PathAwareEntity, int, boolean, BlockPos) - BlockPos blockPos = FuzzyPositions.towardTarget(entity, horizontalRange, entity.getRandom(), relativeInRangePos); -NoPenaltySolidTargeting -tryMake(PathAwareEntity, int, int, int, double, double, double, ...) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange, startHeight, directionX, directionZ, rangeAngle); - BlockPos blockPos2 = FuzzyPositions.towardTarget(entity, horizontalRange, entity.getRandom(), blockPos); -NoPenaltyTargeting -find(PathAwareEntity, int, int) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange); -findTo(PathAwareEntity, int, int, Vec3d, double) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange, 0, vec3d.x, vec3d.z, angleRange); -findFrom(PathAwareEntity, int, int, Vec3d) - BlockPos blockPos = FuzzyPositions.localFuzz(entity.getRandom(), horizontalRange, verticalRange, 0, vec3d.x, vec3d.z, 1.5707963705062866); -tryMake(PathAwareEntity, int, boolean, BlockPos) - BlockPos blockPos = FuzzyPositions.towardTarget(entity, horizontalRange, entity.getRandom(), fuzz); -net.minecraft.entity.ai.brain.task -BreedTask -run(ServerWorld, AnimalEntity, long) - int i = 60 + animalEntity.getRandom().nextInt(50); -CelebrateRaidWinTask -keepRunning(ServerWorld, VillagerEntity, long) - Random random = villagerEntity.getRandom(); -CrossbowAttackTask -tickState(E, LivingEntity) - this.chargingCooldown = 20 + ((LivingEntity)entity).getRandom().nextInt(20); -GiveGiftsToHeroTask -getGifts(VillagerEntity) -....THIS_ENTITY, villager).random(villager.getRandom());... -HideInHomeTask -run(ServerWorld, LivingEntity, long) -...getBlockPos(), this.maxDistance, entity.getRandom())).isPresent() && (optional2 = brain.getOptionalMemory(MemoryModuleType.HOME)).isPresent(... -SeekSkyTask -findNearbySky(ServerWorld, LivingEntity) - Random random = entity.getRandom(); -StayAboveWaterTask -keepRunning(ServerWorld, MobEntity, long) - if (mobEntity.getRandom().nextFloat() < this.chance) { -VillagerBreedTask -run(ServerWorld, VillagerEntity, long) - int i = 275 + villagerEntity.getRandom().nextInt(50); -keepRunning(ServerWorld, VillagerEntity, long) - } else if (villagerEntity.getRandom().nextInt(35) == 0) { -net.minecraft.entity.ai.goal -ActiveTargetGoal -canStart() - if (this.reciprocalChance > 0 && this.mob.getRandom().nextInt(this.reciprocalChance) != 0) { -BowAttackGoal -tick() - if ((double)((LivingEntity)this.actor).getRandom().nextFloat() < 0.3) { - if ((double)((LivingEntity)this.actor).getRandom().nextFloat() < 0.3) { -BreakDoorGoal -tick() - if (this.mob.getRandom().nextInt(20) == 0) { -CrossbowAttackGoal -tick() - this.cooldown = COOLDOWN_RANGE.get(((LivingEntity)this.actor).getRandom()); - this.chargedTicksLeft = 20 + ((LivingEntity)this.actor).getRandom().nextInt(20); -DolphinJumpGoal -canStart() - if (this.dolphin.getRandom().nextInt(this.chance) != 0) { -EatGrassGoal -canStart() - if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) { -EscapeSunlightGoal -locateShadedPos() - Random random = this.mob.getRandom(); -FollowGroupLeaderGoal -getSurroundingSearchDelay(SchoolingFishEntity) - return FollowGroupLeaderGoal.toGoalTicks(200 + fish.getRandom().nextInt(200) % 20); -FollowOwnerGoal -getRandomInt(int, int) - return this.tameable.getRandom().nextInt(max - min + 1) + min; -GoToVillageGoal -canStart() - if (this.mob.getRandom().nextInt(this.searchRange) != 0) { -findOtherWaypoint() - Random random = this.mob.getRandom(); -HoldInHandsGoal -stop() - ((Entity)this.actor).playSound(this.sound, 1.0f, ((LivingEntity)this.actor).getRandom().nextFloat() * 0.2f + 0.9f); -HorseBondWithPlayerGoal -tick() - if (!this.horse.isTame() && this.horse.getRandom().nextInt(this.getTickCount(50)) == 0) { - if (j > 0 && this.horse.getRandom().nextInt(j) < i) { -IronGolemLookGoal -canStart() - if (this.golem.getRandom().nextInt(8000) != 0) { -LookAroundGoal -canStart() - return this.mob.getRandom().nextFloat() < 0.02f; -start() - double d = Math.PI * 2 * this.mob.getRandom().nextDouble(); - this.lookTime = 20 + this.mob.getRandom().nextInt(20); -LookAtEntityGoal -canStart() - if (this.mob.getRandom().nextFloat() >= this.chance) { -start() - this.lookTime = this.getTickCount(40 + this.mob.getRandom().nextInt(40)); -MeleeAttackGoal -tick() -...rgetY, this.targetZ) >= 1.0 || this.mob.getRandom().nextFloat() < 0.05f)) {... - this.updateCountdownTicks = 4 + this.mob.getRandom().nextInt(7); -MoveToTargetPosGoal -getInterval(PathAwareEntity) - return MoveToTargetPosGoal.toGoalTicks(200 + mob.getRandom().nextInt(200)); -start() - this.safeWaitingTime = this.mob.getRandom().nextInt(this.mob.getRandom().nextInt(1200) + 1200) + 1200; - this.safeWaitingTime = this.mob.getRandom().nextInt(this.mob.getRandom().nextInt(1200) + 1200) + 1200; -PounceAtTargetGoal -canStart() - return this.mob.getRandom().nextInt(PounceAtTargetGoal.toGoalTicks(5)) == 0; -RaidGoal -canStart() - if (this.cooldown > 0 || !this.mob.getRandom().nextBoolean()) { -SkeletonHorseTrapTriggerGoal -tick() - horseBaseEntity.addVelocity(this.skeletonHorse.getRandom().nextGaussian() * 0.5, 0.0, this.skeletonHorse.getRandom().nextGaussian() * 0.5); - horseBaseEntity.addVelocity(this.skeletonHorse.getRandom().nextGaussian() * 0.5, 0.0, this.skeletonHorse.getRandom().nextGaussian() * 0.5); -getSkeleton(LocalDifficulty, HorseBaseEntity) -...nchantmentHelper.enchant(skeletonEntity.getRandom(), this.removeEnchantments(skeletonEntity.getMainHandStack()), (int)(5.0f + localDifficult... -...calDifficulty() * (float)skeletonEntity.getRandom().nextInt(18)), false));... -...nchantmentHelper.enchant(skeletonEntity.getRandom(), this.removeEnchantments(skeletonEntity.getEquippedStack(EquipmentSlot.HEAD)), (int)(5.0... -...calDifficulty() * (float)skeletonEntity.getRandom().nextInt(18)), false));... -StepAndDestroyBlockGoal -tick() - Random random = this.stepAndDestroyMob.getRandom(); -SwimGoal -tick() - if (this.mob.getRandom().nextFloat() < 0.8f) { -TrackTargetGoal -canNavigateToEntity(LivingEntity) - this.checkCanNavigateCooldown = TrackTargetGoal.toGoalTicks(10 + this.mob.getRandom().nextInt(5)); -WanderAroundFarGoal -getWanderTarget() - if (this.mob.getRandom().nextFloat() >= this.probability) { -WanderAroundGoal -canStart() - if (this.mob.getRandom().nextInt(WanderAroundGoal.toGoalTicks(this.chance)) != 0) { -WolfBegGoal -start() - this.timer = this.getTickCount(40 + this.wolf.getRandom().nextInt(40)); -net.minecraft.entity.boss.dragon.phase -DyingPhase -clientTick() - float f = (this.dragon.getRandom().nextFloat() - 0.5f) * 8.0f; - float g = (this.dragon.getRandom().nextFloat() - 0.5f) * 4.0f; - float h = (this.dragon.getRandom().nextFloat() - 0.5f) * 8.0f; -HoldingPatternPhase -tickInRange() - if (this.dragon.getRandom().nextInt(i + 3) == 0) { - if (playerEntity != null && (this.dragon.getRandom().nextInt(MathHelper.abs((int)d) + 2) == 0 || this.dragon.getRandom().nextInt(i + 2) == 0)) { - if (playerEntity != null && (this.dragon.getRandom().nextInt(MathHelper.abs((int)d) + 2) == 0 || this.dragon.getRandom().nextInt(i + 2) == 0)) { - if (this.dragon.getRandom().nextInt(8) == 0) { -followPath() - while ((f = (double)((float)vec3i.getY() + this.dragon.getRandom().nextFloat() * 20.0f)) < (double)vec3i.getY()) { -LandingApproachPhase -followPath() - while ((f = (double)((float)vec3i.getY() + this.dragon.getRandom().nextFloat() * 20.0f)) < (double)vec3i.getY()) { -LandingPhase -clientTick() - Random random = this.dragon.getRandom(); -SittingAttackingPhase -clientTick() -...undCategory(), 2.5f, 0.8f + this.dragon.getRandom().nextFloat() * 0.3f, false);... -SittingFlamingPhase -clientTick() - double g = d + this.dragon.getRandom().nextGaussian() / 2.0; - double h = e + this.dragon.getRandom().nextGaussian() / 2.0; - double j = f + this.dragon.getRandom().nextGaussian() / 2.0; -StrafePlayerPhase -updatePath() - if (this.dragon.getRandom().nextInt(8) == 0) { -followPath() - while ((f = (double)((float)vec3i.getY() + this.dragon.getRandom().nextFloat() * 20.0f)) < (double)vec3i.getY()) { -TakeoffPhase -followPath() - while ((d = (double)((float)vec3i.getY() + this.dragon.getRandom().nextFloat() * 20.0f)) < (double)vec3i.getY()) { -net.minecraft.entity.mob -AbstractSkeletonEntity -attack(LivingEntity, float) - this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0f, 1.0f / (this.getRandom().nextFloat() * 0.4f + 0.8f)); -BlazeEntity.ShootFireballGoal -tick() -...blaze.world, this.blaze, e + this.blaze.getRandom().nextGaussian() * h, f, g + this.blaze.getRandom().nextGaussian() * h);... -...).nextGaussian() * h, f, g + this.blaze.getRandom().nextGaussian() * h);... -DrownedEntity -attack(LivingEntity, float) - this.playSound(SoundEvents.ENTITY_DROWNED_SHOOT, 1.0f, 1.0f / (this.getRandom().nextFloat() * 0.4f + 0.8f)); -DrownedEntity.WanderAroundOnSurfaceGoal -getWanderTarget() - Random random = this.mob.getRandom(); -EndermanEntity.PickUpBlockGoal -canStart() - return this.enderman.getRandom().nextInt(PickUpBlockGoal.toGoalTicks(20)) == 0; -tick() - Random random = this.enderman.getRandom(); -EndermanEntity.PlaceBlockGoal -canStart() - return this.enderman.getRandom().nextInt(PlaceBlockGoal.toGoalTicks(2000)) == 0; -tick() - Random random = this.enderman.getRandom(); -GhastEntity.FlyRandomlyGoal -start() - Random random = this.ghast.getRandom(); -GhastEntity.GhastMoveControl -tick() - this.collisionCheckCooldown += this.ghast.getRandom().nextInt(5) + 2; -IllusionerEntity -attack(LivingEntity, float) - this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0f, 1.0f / (this.getRandom().nextFloat() * 0.4f + 0.8f)); -PatrolEntity.PatrolGoal -wander() - Random random = ((LivingEntity)this.entity).getRandom(); -SilverfishEntity.CallForHelpGoal -tick() - Random random = this.silverfish.getRandom(); -SilverfishEntity.WanderAndInfestGoal -canStart() - Random random = this.mob.getRandom(); -SlimeEntity.RandomLookGoal -tick() - this.timer = this.getTickCount(40 + this.slime.getRandom().nextInt(60)); - this.targetYaw = this.slime.getRandom().nextInt(360); -SlimeEntity.SwimmingGoal -tick() - if (this.slime.getRandom().nextFloat() < 0.8f) { -SpiderEntity.AttackGoal -shouldContinue() - if (f >= 0.5f && this.mob.getRandom().nextInt(100) == 0) { -net.minecraft.entity.passive -AnimalEntity -breed(ServerWorld, AnimalEntity) - world.spawnEntity(new ExperienceOrbEntity(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1)); -CatEntity.SleepWithOwnerGoal -dropMorningGifts() - Random random = this.cat.getRandom(); -CatEntity.TemptGoal -tick() - if (this.player == null && this.mob.getRandom().nextInt(this.getTickCount(600)) == 0) { - } else if (this.mob.getRandom().nextInt(this.getTickCount(500)) == 0) { -FoxEntity.DefendFriendGoal -canStart() - if (this.reciprocalChance > 0 && this.mob.getRandom().nextInt(this.reciprocalChance) != 0) { -FoxEntity.MateGoal -breed() - this.world.spawnEntity(new ExperienceOrbEntity(this.world, this.animal.getX(), this.animal.getY(), this.animal.getZ(), this.animal.getRandom().nextInt(7) + 1)); -FoxEntity.PickupItemGoal -canStart() - if (FoxEntity.this.getRandom().nextInt(PickupItemGoal.toGoalTicks(10)) != 0) { -FoxEntity.SitDownAndLookAroundGoal -canStart() -...getAttacker() == null && FoxEntity.this.getRandom().nextFloat() < 0.02f && !FoxEntity.this.isSleeping() && FoxEntity.this.getTarget() == nul... -start() - this.counter = 2 + FoxEntity.this.getRandom().nextInt(3); -chooseNewAngle() - double d = Math.PI * 2 * FoxEntity.this.getRandom().nextDouble(); - this.timer = this.getTickCount(80 + FoxEntity.this.getRandom().nextInt(20)); -IronGolemEntity -pushAway(Entity) - if (entity instanceof Monster && !(entity instanceof CreeperEntity) && this.getRandom().nextInt(20) == 0) { -PandaEntity.LookAtEntityGoal -canStart() - if (this.mob.getRandom().nextFloat() >= this.chance) { -ParrotEntity.FlyOntoTreeGoal -getWanderTarget() - if (this.mob.getRandom().nextFloat() >= this.probability) { -PigEntity -consumeOnAStickItem() - return this.saddledComponent.boost(this.getRandom()); -SnowGolemEntity -attack(LivingEntity, float) - this.playSound(SoundEvents.ENTITY_SNOW_GOLEM_SHOOT, 1.0f, 0.4f / (this.getRandom().nextFloat() * 0.4f + 0.8f)); -SquidEntity.SwimGoal -tick() - } else if (this.squid.getRandom().nextInt(SwimGoal.toGoalTicks(50)) == 0 || !this.squid.touchingWater || !this.squid.hasSwimmingVector()) { - float f = this.squid.getRandom().nextFloat() * ((float)Math.PI * 2); - float h = -0.1f + this.squid.getRandom().nextFloat() * 0.2f; -StriderEntity -consumeOnAStickItem() - return this.saddledComponent.boost(this.getRandom()); -TurtleEntity.GoHomeGoal -canStart() - if (this.turtle.getRandom().nextInt(GoHomeGoal.toGoalTicks(700)) != 0) { -TurtleEntity.MateGoal -breed() - Random random = this.animal.getRandom(); -net.minecraft.item -ChorusFruitItem -finishUsing(ItemStack, World, LivingEntity) - double g = user.getX() + (user.getRandom().nextDouble() - 0.5) * 16.0; -...elper.clamp(user.getY() + (double)(user.getRandom().nextInt(16) - 8), (double)world.getBottomY(), (double)(world.getBottomY() + ((ServerWorl... - double j = user.getZ() + (user.getRandom().nextDouble() - 0.5) * 16.0; -CrossbowItem -shootAll(World, LivingEntity, Hand, ItemStack, float, float) - float[] fs = CrossbowItem.getSoundPitches(entity.getRandom()); -ItemStack -damage(int, T, Consumer) - if (this.damage(amount, entity.getRandom(), entity instanceof ServerPlayerEntity ? (ServerPlayerEntity)entity : null)) { -net.minecraft.predicate.entity -EntityPredicate -createAdvancementEntityLootContext(ServerPlayerEntity, Entity) -....ORIGIN, player.getPos()).random(player.getRandom()).build(LootContextTypes.ADVANCEMENT_ENTITY);... -net.minecraft.screen -AnvilScreenHandler -onTakeOutput(PlayerEntity, ItemStack) - if (!playerEntity.getAbilities().creativeMode && blockState.isIn(BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12f) { -net.minecraft.server.command -GiveCommand -execute(ServerCommandSource, ItemStackArgument, Collection, int) -...ory.PLAYERS, 0.2f, ((serverPlayerEntity.getRandom().nextFloat() - serverPlayerEntity.getRandom().nextFloat()) * 0.7f + 1.0f) * 2.0f);... -...ndom().nextFloat() - serverPlayerEntity.getRandom().nextFloat()) * 0.7f + 1.0f) * 2.0f);... diff --git a/docs/code_hierarchies/method-hierarchy-Entity.damage.txt b/docs/code_hierarchies/method-hierarchy-Entity.damage.txt deleted file mode 100644 index b91cebca4..000000000 --- a/docs/code_hierarchies/method-hierarchy-Entity.damage.txt +++ /dev/null @@ -1,58 +0,0 @@ -AbstractDecorationEntity (net.minecraft.entity.decoration) - ItemFrameEntity (net.minecraft.entity.decoration) -AbstractMinecartEntity (net.minecraft.entity.vehicle) - TntMinecartEntity (net.minecraft.entity.vehicle) -BoatEntity (net.minecraft.entity.vehicle) -EndCrystalEntity (net.minecraft.entity.decoration) -EnderDragonPart (net.minecraft.entity.boss.dragon) -ExperienceOrbEntity (net.minecraft.entity) -ItemEntity (net.minecraft.entity) -LivingEntity (net.minecraft.entity) - ArmorStandEntity (net.minecraft.entity.decoration) - MobEntity (net.minecraft.entity.mob) - AmbientEntity (net.minecraft.entity.mob) - BatEntity (net.minecraft.entity.passive) - EnderDragonEntity (net.minecraft.entity.boss.dragon) - FlyingEntity (net.minecraft.entity.mob) - GhastEntity (net.minecraft.entity.mob) - PathAwareEntity (net.minecraft.entity.mob) - GolemEntity (net.minecraft.entity.passive) - IronGolemEntity (net.minecraft.entity.passive) - ShulkerEntity (net.minecraft.entity.mob) - HostileEntity (net.minecraft.entity.mob) - AbstractPiglinEntity (net.minecraft.entity.mob) - PiglinBruteEntity (net.minecraft.entity.mob) - PiglinEntity (net.minecraft.entity.mob) - EndermanEntity (net.minecraft.entity.mob) - GuardianEntity (net.minecraft.entity.mob) - PatrolEntity (net.minecraft.entity.mob) - RaiderEntity (net.minecraft.entity.raid) - SilverfishEntity (net.minecraft.entity.mob) - WitherEntity (net.minecraft.entity.boss) - ZoglinEntity (net.minecraft.entity.mob) - ZombieEntity (net.minecraft.entity.mob) - PassiveEntity (net.minecraft.entity.passive) - AnimalEntity (net.minecraft.entity.passive) - AxolotlEntity (net.minecraft.entity.passive) - BeeEntity (net.minecraft.entity.passive) - HoglinEntity (net.minecraft.entity.mob) - PandaEntity (net.minecraft.entity.passive) - TameableEntity (net.minecraft.entity.passive) - TameableShoulderEntity (net.minecraft.entity.passive) - ParrotEntity (net.minecraft.entity.passive) - WolfEntity (net.minecraft.entity.passive) - WaterCreatureEntity (net.minecraft.entity.mob) - SquidEntity (net.minecraft.entity.passive) - GlowSquidEntity (net.minecraft.entity.passive) - PlayerEntity (net.minecraft.entity.player) - AbstractClientPlayerEntity (net.minecraft.client.network) - ClientPlayerEntity (net.minecraft.client.network) - OtherClientPlayerEntity (net.minecraft.client.network) - ServerPlayerEntity (net.minecraft.server.network) -ProjectileEntity (net.minecraft.entity.projectile) - ExplosiveProjectileEntity (net.minecraft.entity.projectile) - AbstractFireballEntity (net.minecraft.entity.projectile) - SmallFireballEntity (net.minecraft.entity.projectile) - DragonFireballEntity (net.minecraft.entity.projectile) - WitherSkullEntity (net.minecraft.entity.projectile) - ShulkerBulletEntity (net.minecraft.entity.projectile)