Uses of Class
net.minecraft.world.DifficultyInstance
Package
Description
-
Uses of DifficultyInstance in net.minecraft.server.level
-
Uses of DifficultyInstance in net.minecraft.world.entity
Modifier and TypeMethodDescriptionprotected void
Mob.enchantSpawnedArmor
(ServerLevelAccessor p_348675_, RandomSource p_217052_, EquipmentSlot p_217054_, DifficultyInstance p_348681_) private void
Mob.enchantSpawnedEquipment
(ServerLevelAccessor p_348676_, EquipmentSlot p_345506_, RandomSource p_345779_, float p_345423_, DifficultyInstance p_348488_) protected void
Mob.enchantSpawnedWeapon
(ServerLevelAccessor p_348685_, RandomSource p_217049_, DifficultyInstance p_348671_) AgeableMob.finalizeSpawn
(ServerLevelAccessor p_146746_, DifficultyInstance p_146747_, MobSpawnType p_146748_, SpawnGroupData p_146749_) Mob.finalizeSpawn
(ServerLevelAccessor p_21434_, DifficultyInstance p_21435_, MobSpawnType p_21436_, SpawnGroupData p_21437_) Deprecated.Override-Only.protected void
Mob.populateDefaultEquipmentEnchantments
(ServerLevelAccessor p_348529_, RandomSource p_217063_, DifficultyInstance p_217064_) protected void
Mob.populateDefaultEquipmentSlots
(RandomSource p_217055_, DifficultyInstance p_217056_) -
Uses of DifficultyInstance in net.minecraft.world.entity.animal
Modifier and TypeMethodDescriptionAbstractSchoolingFish.finalizeSpawn
(ServerLevelAccessor p_27528_, DifficultyInstance p_27529_, MobSpawnType p_27530_, SpawnGroupData p_27531_) Cat.finalizeSpawn
(ServerLevelAccessor p_28134_, DifficultyInstance p_28135_, MobSpawnType p_28136_, SpawnGroupData p_28137_) Dolphin.finalizeSpawn
(ServerLevelAccessor p_28332_, DifficultyInstance p_28333_, MobSpawnType p_28334_, SpawnGroupData p_28335_) Fox.finalizeSpawn
(ServerLevelAccessor p_28487_, DifficultyInstance p_28488_, MobSpawnType p_28489_, SpawnGroupData p_28490_) Ocelot.finalizeSpawn
(ServerLevelAccessor p_29007_, DifficultyInstance p_29008_, MobSpawnType p_29009_, SpawnGroupData p_29010_) Panda.finalizeSpawn
(ServerLevelAccessor p_29109_, DifficultyInstance p_29110_, MobSpawnType p_29111_, SpawnGroupData p_29112_) Parrot.finalizeSpawn
(ServerLevelAccessor p_29389_, DifficultyInstance p_29390_, MobSpawnType p_29391_, SpawnGroupData p_29392_) PolarBear.finalizeSpawn
(ServerLevelAccessor p_29533_, DifficultyInstance p_29534_, MobSpawnType p_29535_, SpawnGroupData p_29536_) Rabbit.finalizeSpawn
(ServerLevelAccessor p_29678_, DifficultyInstance p_29679_, MobSpawnType p_29680_, SpawnGroupData p_29681_) Sheep.finalizeSpawn
(ServerLevelAccessor p_29835_, DifficultyInstance p_29836_, MobSpawnType p_29837_, SpawnGroupData p_29838_) TropicalFish.finalizeSpawn
(ServerLevelAccessor p_30023_, DifficultyInstance p_30024_, MobSpawnType p_30025_, SpawnGroupData p_30026_) Turtle.finalizeSpawn
(ServerLevelAccessor p_30153_, DifficultyInstance p_30154_, MobSpawnType p_30155_, SpawnGroupData p_30156_) Wolf.finalizeSpawn
(ServerLevelAccessor p_332775_, DifficultyInstance p_332793_, MobSpawnType p_332761_, SpawnGroupData p_332782_) protected void
Fox.populateDefaultEquipmentSlots
(RandomSource p_218171_, DifficultyInstance p_218172_) -
Uses of DifficultyInstance in net.minecraft.world.entity.animal.axolotl
Modifier and TypeMethodDescriptionAxolotl.finalizeSpawn
(ServerLevelAccessor p_149132_, DifficultyInstance p_149133_, MobSpawnType p_149134_, SpawnGroupData p_149135_) -
Uses of DifficultyInstance in net.minecraft.world.entity.animal.camel
Modifier and TypeMethodDescriptionCamel.finalizeSpawn
(ServerLevelAccessor p_249190_, DifficultyInstance p_251264_, MobSpawnType p_250254_, SpawnGroupData p_249259_) -
Uses of DifficultyInstance in net.minecraft.world.entity.animal.frog
Modifier and TypeMethodDescriptionFrog.finalizeSpawn
(ServerLevelAccessor p_218488_, DifficultyInstance p_218489_, MobSpawnType p_218490_, SpawnGroupData p_218491_) -
Uses of DifficultyInstance in net.minecraft.world.entity.animal.goat
Modifier and TypeMethodDescriptionGoat.finalizeSpawn
(ServerLevelAccessor p_149365_, DifficultyInstance p_149366_, MobSpawnType p_149367_, SpawnGroupData p_149368_) -
Uses of DifficultyInstance in net.minecraft.world.entity.animal.horse
Modifier and TypeMethodDescriptionprivate AbstractHorse
SkeletonTrapGoal.createHorse
(DifficultyInstance p_30930_) private Skeleton
SkeletonTrapGoal.createSkeleton
(DifficultyInstance p_30932_, AbstractHorse p_30933_) private void
SkeletonTrapGoal.enchant
(Skeleton p_345688_, EquipmentSlot p_346060_, DifficultyInstance p_348658_) AbstractHorse.finalizeSpawn
(ServerLevelAccessor p_30555_, DifficultyInstance p_30556_, MobSpawnType p_30557_, SpawnGroupData p_30558_) Horse.finalizeSpawn
(ServerLevelAccessor p_30703_, DifficultyInstance p_30704_, MobSpawnType p_30705_, SpawnGroupData p_30706_) Llama.finalizeSpawn
(ServerLevelAccessor p_30774_, DifficultyInstance p_30775_, MobSpawnType p_30776_, SpawnGroupData p_30777_) TraderLlama.finalizeSpawn
(ServerLevelAccessor p_30942_, DifficultyInstance p_30943_, MobSpawnType p_30944_, SpawnGroupData p_30945_) -
Uses of DifficultyInstance in net.minecraft.world.entity.monster
Modifier and TypeMethodDescriptionprotected void
Pillager.enchantSpawnedWeapon
(ServerLevelAccessor p_348604_, RandomSource p_219056_, DifficultyInstance p_348571_) AbstractSkeleton.finalizeSpawn
(ServerLevelAccessor p_32146_, DifficultyInstance p_32147_, MobSpawnType p_32148_, SpawnGroupData p_32149_) CaveSpider.finalizeSpawn
(ServerLevelAccessor p_32259_, DifficultyInstance p_32260_, MobSpawnType p_32261_, SpawnGroupData p_32262_) Drowned.finalizeSpawn
(ServerLevelAccessor p_32372_, DifficultyInstance p_32373_, MobSpawnType p_32374_, SpawnGroupData p_32375_) Illusioner.finalizeSpawn
(ServerLevelAccessor p_32921_, DifficultyInstance p_32922_, MobSpawnType p_32923_, SpawnGroupData p_32924_) PatrollingMonster.finalizeSpawn
(ServerLevelAccessor p_33049_, DifficultyInstance p_33050_, MobSpawnType p_33051_, SpawnGroupData p_33052_) Phantom.finalizeSpawn
(ServerLevelAccessor p_33126_, DifficultyInstance p_33127_, MobSpawnType p_33128_, SpawnGroupData p_33129_) Pillager.finalizeSpawn
(ServerLevelAccessor p_33282_, DifficultyInstance p_33283_, MobSpawnType p_33284_, SpawnGroupData p_33285_) Shulker.finalizeSpawn
(ServerLevelAccessor p_149780_, DifficultyInstance p_149781_, MobSpawnType p_149782_, SpawnGroupData p_149783_) Slime.finalizeSpawn
(ServerLevelAccessor p_33601_, DifficultyInstance p_33602_, MobSpawnType p_33603_, SpawnGroupData p_33604_) Spider.finalizeSpawn
(ServerLevelAccessor p_33790_, DifficultyInstance p_33791_, MobSpawnType p_33792_, SpawnGroupData p_33793_) Strider.finalizeSpawn
(ServerLevelAccessor p_33887_, DifficultyInstance p_33888_, MobSpawnType p_33889_, SpawnGroupData p_33890_) Vex.finalizeSpawn
(ServerLevelAccessor p_34002_, DifficultyInstance p_34003_, MobSpawnType p_34004_, SpawnGroupData p_34005_) Vindicator.finalizeSpawn
(ServerLevelAccessor p_34088_, DifficultyInstance p_34089_, MobSpawnType p_34090_, SpawnGroupData p_34091_) WitherSkeleton.finalizeSpawn
(ServerLevelAccessor p_34178_, DifficultyInstance p_34179_, MobSpawnType p_34180_, SpawnGroupData p_34181_) Zombie.finalizeSpawn
(ServerLevelAccessor p_34297_, DifficultyInstance p_34298_, MobSpawnType p_34299_, SpawnGroupData p_34300_) ZombieVillager.finalizeSpawn
(ServerLevelAccessor p_34378_, DifficultyInstance p_34379_, MobSpawnType p_34380_, SpawnGroupData p_34381_) protected void
WitherSkeleton.populateDefaultEquipmentEnchantments
(ServerLevelAccessor p_348580_, RandomSource p_219157_, DifficultyInstance p_219158_) protected void
AbstractSkeleton.populateDefaultEquipmentSlots
(RandomSource p_218949_, DifficultyInstance p_218950_) protected void
Drowned.populateDefaultEquipmentSlots
(RandomSource p_218953_, DifficultyInstance p_218954_) protected void
Pillager.populateDefaultEquipmentSlots
(RandomSource p_219059_, DifficultyInstance p_219060_) protected void
Vex.populateDefaultEquipmentSlots
(RandomSource p_219135_, DifficultyInstance p_219136_) protected void
Vindicator.populateDefaultEquipmentSlots
(RandomSource p_219149_, DifficultyInstance p_219150_) protected void
WitherSkeleton.populateDefaultEquipmentSlots
(RandomSource p_219154_, DifficultyInstance p_219155_) protected void
Zombie.populateDefaultEquipmentSlots
(RandomSource p_219165_, DifficultyInstance p_219166_) protected void
ZombifiedPiglin.populateDefaultEquipmentSlots
(RandomSource p_219171_, DifficultyInstance p_219172_) private SpawnGroupData
Strider.spawnJockey
(ServerLevelAccessor p_33882_, DifficultyInstance p_33883_, Mob p_33884_, SpawnGroupData p_33885_) -
Uses of DifficultyInstance in net.minecraft.world.entity.monster.hoglin
Modifier and TypeMethodDescriptionHoglin.finalizeSpawn
(ServerLevelAccessor p_34508_, DifficultyInstance p_34509_, MobSpawnType p_34510_, SpawnGroupData p_34511_) -
Uses of DifficultyInstance in net.minecraft.world.entity.monster.piglin
Modifier and TypeMethodDescriptionPiglin.finalizeSpawn
(ServerLevelAccessor p_34717_, DifficultyInstance p_34718_, MobSpawnType p_34719_, SpawnGroupData p_34720_) PiglinBrute.finalizeSpawn
(ServerLevelAccessor p_35058_, DifficultyInstance p_35059_, MobSpawnType p_35060_, SpawnGroupData p_35061_) protected void
Piglin.populateDefaultEquipmentSlots
(RandomSource p_219189_, DifficultyInstance p_219190_) protected void
PiglinBrute.populateDefaultEquipmentSlots
(RandomSource p_219209_, DifficultyInstance p_219210_) -
Uses of DifficultyInstance in net.minecraft.world.entity.monster.warden
Modifier and TypeMethodDescriptionWarden.finalizeSpawn
(ServerLevelAccessor p_219400_, DifficultyInstance p_219401_, MobSpawnType p_219402_, SpawnGroupData p_219403_) -
Uses of DifficultyInstance in net.minecraft.world.entity.npc
Modifier and TypeMethodDescriptionAbstractVillager.finalizeSpawn
(ServerLevelAccessor p_35282_, DifficultyInstance p_35283_, MobSpawnType p_35284_, SpawnGroupData p_35285_) Villager.finalizeSpawn
(ServerLevelAccessor p_35439_, DifficultyInstance p_35440_, MobSpawnType p_35441_, SpawnGroupData p_35442_) -
Uses of DifficultyInstance in net.minecraft.world.entity.raid
Modifier and TypeMethodDescriptionRaider.finalizeSpawn
(ServerLevelAccessor p_37856_, DifficultyInstance p_37857_, MobSpawnType p_37858_, SpawnGroupData p_37859_) private int
Raid.getPotentialBonusSpawns
(Raid.RaiderType p_219829_, RandomSource p_219830_, int p_219831_, DifficultyInstance p_219832_, boolean p_219833_) -
Uses of DifficultyInstance in net.minecraft.world.item.enchantment
Modifier and TypeMethodDescriptionstatic void
EnchantmentHelper.enchantItemFromProvider
(ItemStack p_345172_, RegistryAccess p_348593_, ResourceKey<EnchantmentProvider> p_345876_, DifficultyInstance p_348599_, RandomSource p_345717_) -
Uses of DifficultyInstance in net.minecraft.world.item.enchantment.providers
Modifier and TypeMethodDescriptionvoid
EnchantmentProvider.enchant
(ItemStack p_345974_, ItemEnchantments.Mutable p_344824_, RandomSource p_346040_, DifficultyInstance p_348672_) void
EnchantmentsByCost.enchant
(ItemStack p_345483_, ItemEnchantments.Mutable p_346331_, RandomSource p_344794_, DifficultyInstance p_348577_) void
EnchantmentsByCostWithDifficulty.enchant
(ItemStack p_344777_, ItemEnchantments.Mutable p_344895_, RandomSource p_346012_, DifficultyInstance p_348635_) void
SingleEnchantment.enchant
(ItemStack p_346218_, ItemEnchantments.Mutable p_345570_, RandomSource p_345742_, DifficultyInstance p_348562_) -
Uses of DifficultyInstance in net.minecraft.world.level
Modifier and TypeMethodDescriptionLevel.getCurrentDifficultyAt
(BlockPos p_46730_) LevelAccessor.getCurrentDifficultyAt
(BlockPos p_46800_) -
Uses of DifficultyInstance in net.neoforged.neoforge.event
Modifier and TypeMethodDescriptionstatic @Nullable SpawnGroupData
EventHooks.finalizeMobSpawn
(Mob mob, ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType spawnType, @Nullable SpawnGroupData spawnData) Finalizes the spawn of a mob by firing theFinalizeSpawnEvent
and callingMob.finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.MobSpawnType, net.minecraft.world.entity.SpawnGroupData)
with the result.static FinalizeSpawnEvent
EventHooks.finalizeMobSpawnSpawner
(Mob mob, ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType spawnType, @Nullable SpawnGroupData spawnData, IOwnedSpawner spawner, boolean def) Finalizes the spawn of a mob by firing theFinalizeSpawnEvent
and callingMob.finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.MobSpawnType, net.minecraft.world.entity.SpawnGroupData)
with the result. -
Uses of DifficultyInstance in net.neoforged.neoforge.event.entity.living
Modifier and TypeMethodDescriptionFinalizeSpawnEvent.getDifficulty()
Retrieves theDifficultyInstance
for the chunk where the mob is about to be spawned.Modifier and TypeMethodDescriptionvoid
FinalizeSpawnEvent.setDifficulty
(DifficultyInstance inst) Sets the difficulty instance for this event, which will be propagated toMob.finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.MobSpawnType, net.minecraft.world.entity.SpawnGroupData)
unless cancelled.ModifierConstructorDescriptionFinalizeSpawnEvent
(Mob entity, ServerLevelAccessor level, double x, double y, double z, DifficultyInstance difficulty, MobSpawnType spawnType, @Nullable SpawnGroupData spawnData, @Nullable com.mojang.datafixers.util.Either<BlockEntity, Entity> spawner)