Hey,
Because i couldn't find entry for loot tables in the 1.15.x documentation, so I tried to edit the drop from a sand block with the help from the 1.13.x documentation. But I ran in two problem.
After reading the article about editing vanilla loot tables my code looks like the following:
@SubscribeEvent
public void lootLoad(LootTableLoadEvent event) {
if (event.getName().toString().equals("minecraft:blocks/sand")) {
LootEntry entry = new LootEntryTable(new ResourceLocation("mymod:inject/sand"), 100, 100, 0, "sand_entry");
LootPool pool = new LootPool(new LootEntry[] {entry}, 0, 1, 0, "sand_pool");
event.getTable().addPool(pool);
}
}
The following errors appear:
1. The documentation says, I need to create a new LootEntry with new LootEntryTable(), but there is not a Class LootEntryTable, which can be imported.
2. When trying to create the pool, the IDE says:
private LootPool(@NotNull net.minecraft.world.storage.loot.LootEntry[] p_i51268_1_,
@NotNull net.minecraft.world.storage.loot.conditions.ILootCondition[] p_i51268_2_,
@NotNull net.minecraft.world.storage.loot.functions.ILootFunction[] p_i51268_3_,
net.minecraft.world.storage.loot.IRandomRange p_i51268_4_,
net.minecraft.world.storage.loot.RandomValueRange p_i51268_5_,
String name)
No plan what the IDE wants me to say.
Due to I haven't used Java in a while and switched from NetBeans to Intellij, I a noob in this area.
I appreciate every kind of help.