mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 02:55:17 +00:00
Add LootTableManager to the LootTableLoadEvent (#3717)
This commit is contained in:
1 parent
b99aa9bca4
commit
be2d814155
6 files changed
+220
-7
No files matched your search
@@ -21,6 +21,7 @@ package net.minecraftforge.event;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.storage.loot.LootTable;
|
||||
import net.minecraft.world.storage.loot.LootTableManager;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
@@ -38,11 +39,21 @@ public class LootTableLoadEvent extends Event
|
||||
{
|
||||
private final ResourceLocation name;
|
||||
private LootTable table;
|
||||
private LootTableManager lootTableManager;
|
||||
|
||||
public LootTableLoadEvent(ResourceLocation name, LootTable table)
|
||||
/**
|
||||
* @deprecated Use {@link #LootTableLoadEvent(ResourceLocation, LootTable, LootTableManager)}<br>
|
||||
*/
|
||||
@Deprecated
|
||||
public LootTableLoadEvent(ResourceLocation name, LootTable table) {
|
||||
this(name, table, null);
|
||||
}
|
||||
|
||||
public LootTableLoadEvent(ResourceLocation name, LootTable table, LootTableManager lootTableManager)
|
||||
{
|
||||
this.name = name;
|
||||
this.table = table;
|
||||
this.lootTableManager = lootTableManager;
|
||||
}
|
||||
|
||||
public ResourceLocation getName()
|
||||
@@ -55,6 +66,11 @@ public class LootTableLoadEvent extends Event
|
||||
return this.table;
|
||||
}
|
||||
|
||||
public LootTableManager getLootTableManager()
|
||||
{
|
||||
return this.lootTableManager;
|
||||
}
|
||||
|
||||
public void setTable(LootTable table)
|
||||
{
|
||||
this.table = table;
|
||||
|
||||
Reference in new issue
Block a user