mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Update to Official classnames Patchwork Make the game compile and run Merge in the new HUD overlay API Merge in the new render properties API PEEL Use Gradle 7.2 snapshot to fix eclipse integration bug in 7.1, Would use 7.0 but FG needs 7.1 for some reason. New FML installer Update to 1.17.1 Co-authored-by: LexManos <lexmanos@gmail.com> Co-authored-by: SizableShrimp <sizableshrimp@sizableshrimp.me> Co-authored-by: cpw <cpw+github@weeksfamily.ca> Co-authored-by: Curle <curle@gemwire.uk> Co-authored-by: Unnoen <Unnoen@users.noreply.github.com> Co-authored-by: covers1624 <laughlan.cov@internode.on.net> Co-authored-by: DaemonUmbra <daemon.umbra@gmail.com> Co-authored-by: gigaherz <gigaherz@gmail.com> Signed-off-by: SizableShrimp <sizableshrimp@sizableshrimp.me>
71 lines
2.1 KiB
Java
71 lines
2.1 KiB
Java
/*
|
|
* Minecraft Forge
|
|
* Copyright (c) 2016-2021.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation version 2.1
|
|
* of the License.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
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;
|
|
}
|
|
}
|