类 LootTableLoadEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.LootTableLoadEvent
- 所有已实现的接口:
net.neoforged.bus.api.ICancellableEvent
public class LootTableLoadEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
Fired when a
LootTable
is loaded from JSON.
Can be used to modify the loot table, cancel loading it, or outright replace it.
This event is currently fired for all loot tables coming from vanilla, mods, and user datapacks.
This event is fired whenever server resources are loaded or reloaded.
This event is cancellable, and does not
.
If the event is cancelled, the loot table will be made empty.引用无效
have a result
This event is fired on the main Forge event bus, only on the logical server.
-
字段概要
字段修饰符和类型字段说明private @Nullable ResourceKey
<LootTable> private final ResourceLocation
private final HolderLookup.Provider
private LootTable
-
构造器概要
构造器 -
方法概要
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
字段详细资料
-
registries
-
name
-
table
-
key
-
-
构造器详细资料
-
LootTableLoadEvent
@Internal public LootTableLoadEvent(HolderLookup.Provider registries, ResourceLocation name, LootTable table)
-
-
方法详细资料
-
getRegistries
返回 a lookup provider that can be used to access registries。- 返回:
- a lookup provider that can be used to access registries
-
getName
-
getKey
-
getTable
-
setTable
-