Skip to content

Commit

Permalink
copy DynamicLoot into BMTableLootEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
dphaldes committed Aug 8, 2023
1 parent 7eaef09 commit eef8ed6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,28 @@ public LootPoolEntryType getType()

public void createItemStack(Consumer<ItemStack> stackConsumer, LootContext context)
{
LootTable loottable = context.getLootTable(this.table);
loottable.getRandomItemsRaw(context, stackConsumer);
context.addDynamicDrops(this.table, stackConsumer);
}

public void validate(ValidationContext p_225579_1_)
{
if (p_225579_1_.hasVisitedTable(this.table))
{
p_225579_1_.reportProblem("Table " + this.table + " is recursively called");
} else
{
super.validate(p_225579_1_);
// LootTable loottable = p_225579_1_.resolveLootTable(this.table);
// if (loottable == null)
// {
// p_225579_1_.addProblem("Unknown loot table called " + this.table);
// } else
// {
// loottable.validate(p_225579_1_.enterTable("->{" + this.table + "}", this.table));
// }

}
}
// public void validate(ValidationContext p_225579_1_)
// {
// if (p_225579_1_.hasVisitedTable(this.table))
// {
// p_225579_1_.reportProblem("Table " + this.table + " is recursively called");
// } else
// {
// super.validate(p_225579_1_);
//// LootTable loottable = p_225579_1_.resolveLootTable(this.table);
//// if (loottable == null)
//// {
//// p_225579_1_.addProblem("Unknown loot table called " + this.table);
//// } else
//// {
//// loottable.validate(p_225579_1_.enterTable("->{" + this.table + "}", this.table));
//// }
//
// }
// }

public static LootPoolSingletonContainer.Builder<?> builder(ResourceLocation tableIn)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ modId="${mod_id}" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="${mod_version}" #mandatory
# A display name for the mod
displayName="${mode_name}" #mandatory
displayName="${mod_name}" #mandatory
# A file name (in the root of the mod JAR) containing a logo for display
#logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
Expand Down

0 comments on commit eef8ed6

Please sign in to comment.