|
2 | 2 |
|
3 | 3 | import net.minecraft.entity.item.EntityItem;
|
4 | 4 | import net.minecraft.item.ItemStack;
|
5 |
| -import net.minecraft.util.ResourceLocation; |
6 |
| -import net.minecraft.world.storage.loot.LootEntry; |
7 |
| -import net.minecraft.world.storage.loot.LootEntryItem; |
8 |
| -import net.minecraft.world.storage.loot.LootPool; |
9 |
| -import net.minecraft.world.storage.loot.LootTable; |
10 |
| -import net.minecraft.world.storage.loot.RandomValueRange; |
11 |
| -import net.minecraft.world.storage.loot.conditions.LootCondition; |
12 |
| -import net.minecraft.world.storage.loot.functions.LootFunction; |
13 |
| -import net.minecraft.world.storage.loot.functions.SetCount; |
14 | 5 | import net.minecraftforge.common.MinecraftForge;
|
15 |
| -import net.minecraftforge.event.LootTableLoadEvent; |
16 | 6 | import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
17 | 7 | import net.minecraftforge.fml.common.Loader;
|
18 | 8 | import net.minecraftforge.fml.common.Mod;
|
|
27 | 17 | import org.apache.logging.log4j.Logger;
|
28 | 18 | import realdrops.entities.EntityItemLoot;
|
29 | 19 | import slimeknights.tconstruct.tools.ranged.RangedEvents;
|
30 |
| -import twilightforest.item.TFItems; |
31 | 20 |
|
32 | 21 | import java.util.ArrayList;
|
33 | 22 | import java.util.List;
|
@@ -82,23 +71,6 @@ public void onServerTick(TickEvent.ServerTickEvent event) {
|
82 | 71 | }
|
83 | 72 | }
|
84 | 73 |
|
85 |
| - // Temporary loot adder |
86 |
| - // TODO: remove |
87 |
| - @SubscribeEvent |
88 |
| - public void onLootTableLoad(LootTableLoadEvent event) { |
89 |
| - ResourceLocation tableName = event.getName(); |
90 |
| - if (tableName.getNamespace().equals("twilightforest") && tableName.getPath().split("/")[0].equals("structures") && !tableName.getPath().matches(".*(common|uncommon|useless|rare|ultrarare)$")) { |
91 |
| - LootTable table = event.getTable(); |
92 |
| - LootEntry liveRoot = new LootEntryItem(TFItems.liveroot, 1, 1, new LootFunction[]{new SetCount(new LootCondition[]{}, new RandomValueRange(1, 5))}, new LootCondition[]{}, "twilightforest:liveroot"); |
93 |
| - |
94 |
| - LootPool pool = new LootPool(new LootEntry[]{liveRoot}, new LootCondition[]{}, new RandomValueRange(1), new RandomValueRange(0), "liveroot"); |
95 |
| - table.addPool(pool); |
96 |
| - |
97 |
| - Logger logger = LogManager.getLogger(); |
98 |
| - logger.debug("Adding liveroot pool to {}", tableName); |
99 |
| - } |
100 |
| - } |
101 |
| - |
102 | 74 | @Mod.EventHandler
|
103 | 75 | public void onServerStopping(FMLServerStoppingEvent event) {
|
104 | 76 | itemList.clear();
|
|
0 commit comments