Add LootTableManager to the LootTableLoadEvent (#3717)

This commit is contained in:
Paulo "JCranky" Siqueira authored and LexManos committed 2017-04-07 16:22:49 -07:00
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;