Files
MinecraftForge/src/main/java/net/minecraftforge/event/LootTableLoadEvent.java
T
sciwhiz12 c1874bb5ab Amend license header to include contributors and apply to FML subprojects (#8525)
After internal discussion, it was decided that we need to include
"contributors" to the license header. This avoids claiming that the
Java source files are under the exclusive copyright ownership of Forge
LLC, which excludes contributors that still hold copyright ownership
over their contributions (but is licensed under the LGPLv2.1 as stated
in the Forge CLA).
2022-04-13 20:42:00 -07:00

57 lines
1.5 KiB
Java

/*
* Copyright (c) Forge Development LLC and contributors
* SPDX-License-Identifier: LGPL-2.1-only
*/
package net.minecraftforge.event;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.storage.loot.LootTable;
import net.minecraft.world.level.storage.loot.LootTables;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
* Event fired when a LootTable json is loaded from json.
* This event is fired whenever resources are loaded, or when the server starts.
* This event will NOT be fired for LootTables loaded from the world folder, these are
* considered configurations files and should not be modified by mods.
*
* Canceling the event will make it load a empty loot table.
*
*/
@Cancelable
public class LootTableLoadEvent extends Event
{
private final ResourceLocation name;
private LootTable table;
private LootTables lootTableManager;
public LootTableLoadEvent(ResourceLocation name, LootTable table, LootTables lootTableManager)
{
this.name = name;
this.table = table;
this.lootTableManager = lootTableManager;
}
public ResourceLocation getName()
{
return this.name;
}
public LootTable getTable()
{
return this.table;
}
public LootTables getLootTableManager()
{
return this.lootTableManager;
}
public void setTable(LootTable table)
{
this.table = table;
}
}