Record Class ReactorLoot
java.lang.Object
java.lang.Record
net.darkhax.retroreactors.common.data.reactor.ReactorLoot
- Record Components:
amount- The amount of loot to spawn.radius- The radius of the circle to spawn loot within.table- The loot table to spawn loot from.
public record ReactorLoot(net.minecraft.world.level.storage.loot.providers.number.NumberProvider amount, net.minecraft.world.level.storage.loot.providers.number.NumberProvider radius, net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table)
extends Record
Determines how loot generates inside the reactor tower.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReactorLoot(net.minecraft.world.level.storage.loot.providers.number.NumberProvider amount, net.minecraft.world.level.storage.loot.providers.number.NumberProvider radius, net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table) Creates an instance of aReactorLootrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.storage.loot.providers.number.NumberProvideramount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.storage.loot.providers.number.NumberProviderradius()Returns the value of theradiusrecord component.voidspawn(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos centerPos, net.minecraft.world.level.storage.loot.LootContext lootContext) Spawns loot within the reactor tower.net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ReactorLoot
public ReactorLoot(net.minecraft.world.level.storage.loot.providers.number.NumberProvider amount, net.minecraft.world.level.storage.loot.providers.number.NumberProvider radius, net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table) Creates an instance of aReactorLootrecord class.
-
-
Method Details
-
spawn
public void spawn(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos centerPos, net.minecraft.world.level.storage.loot.LootContext lootContext) Spawns loot within the reactor tower.- Parameters:
level- The level to spawn the loot within.centerPos- The center of the layer to spawn loot within.lootContext- Loot specific context.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
amount
-
radius
-
table
-