First you would need a new Class that extend the <code>LootTableProvider</code>. In this class you would override the <code>act</code> and optionally <code>getName</code> Method.
First you would need a new Class that extend the <code>LootTableProvider</code>. In this class you would override the <code>act</code> and optionally <code>getName</code> Method.
In the <code>getName</code> you just return the Name shown in the Logs.
In the <code>getName</code> you just return the Name shown in the Logs.
−
Also you should create a abstract Method which you would override in subclasses but this is not strickly needded.
+
Also you should create a abstract Method which you would override in subclasses but this is not strictly needed.
Also you need a Gson constant. You would create it like this <code> private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create(); </code>
Also you need a Gson constant. You would create it like this <code> private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create(); </code>
You should also save the <code>DataGenerator</code> for later use since you can't access from the <code>LootTableProvider</code>.
You should also save the <code>DataGenerator</code> for later use since you can't access from the <code>LootTableProvider</code>.
−
Also you would need two Maps, one with the the Class witch is used to get the Lootable Resource Location in this example the Block and one the Loot Table Builder.
+
Also you would need two Maps, one with the the Class which is used to get the Lootable Resource Location in this example the Block and one the Loot Table Builder.
The second Map consist of a <code>ResourceLocation</code> and the actual <code>LootTable</code>. Look at the Code for more info.
The second Map consist of a <code>ResourceLocation</code> and the actual <code>LootTable</code>. Look at the Code for more info.