Change autosmelt to GLM and use datagen. #365

Merged
Rover656 merged 2 commits from fix/conduit-autosmelt into dev/1.20.1 2023-07-27 20:47:07 +00:00
Rover656 commented 2023-07-27 19:20:53 +00:00 (Migrated from github.com)

Fixes #356

Description

Changes to loot modifiers for autosmelt and uses datagen for making them.

Closes #356

Checklist:

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you).
  • I have performed a self-review of my own code.
  • I have commented my code in areas it may be challenging to understand.
  • I have made corresponding changes to the documentation.
  • My changes are ready for review from a contributor.
Fixes #356 # Description Changes to loot modifiers for autosmelt and uses datagen for making them. Closes #356 <!-- For drafts, fill this in as you go; if you are leaving draft, make sure these are all done --> # Checklist: - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you). - [x] I have performed a self-review of my own code. - [x] I have commented my code in areas it may be challenging to understand. <!-- (Although we prefer code that is readable instead of over-commented) --> - [x] I have made corresponding changes to the documentation. - [x] My changes are ready for review from a contributor. <!-- Thanks to: https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/ for the building blocks of this template -->
ferriarnus (Migrated from github.com) requested changes 2023-07-27 20:36:04 +00:00
ferriarnus (Migrated from github.com) left a comment

Looks good to me, some small comments.

Looks good to me, some small comments.
@ -0,0 +29,4 @@
protected @NotNull ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) {
var level = context.getLevel();
var recipeManager = level.getRecipeManager();
return generatedLoot.stream().map(stack ->
ferriarnus (Migrated from github.com) commented 2023-07-27 20:34:25 +00:00

I think this is fine, just know we are smelting the drops, not the block itself (not sure this was different before). This means if you mine ore blocks you get the smelted chunks, not the smelted ore block (so more than just smelting the block).

I think this is fine, just know we are smelting the drops, not the block itself (not sure this was different before). This means if you mine ore blocks you get the smelted chunks, not the smelted ore block (so more than just smelting the block).
ferriarnus (Migrated from github.com) commented 2023-07-27 20:24:22 +00:00

Small thing, these imports aren't needed

Small thing, these imports aren't needed
@ -0,0 +43,4 @@
add("capacitor_loot", new CapacitorLootModifier(
new LootItemCondition[]{
LootTableIdCondition.builder(new ResourceLocation("chests/simple_dungeon")).build(),
ferriarnus (Migrated from github.com) commented 2023-07-27 20:25:59 +00:00

This is only for 1 chest? Probably fine for now, I don't know which chests we want our loot to be in.

This is only for 1 chest? Probably fine for now, I don't know which chests we want our loot to be in.
Rover656 (Migrated from github.com) reviewed 2023-07-27 20:38:54 +00:00
@ -0,0 +29,4 @@
protected @NotNull ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) {
var level = context.getLevel();
var recipeManager = level.getRecipeManager();
return generatedLoot.stream().map(stack ->
Rover656 (Migrated from github.com) commented 2023-07-27 20:38:54 +00:00

Yeah that'd be the intention :)

Yeah that'd be the intention :)
ferriarnus (Migrated from github.com) approved these changes 2023-07-27 20:42:49 +00:00
Rover656 commented 2023-07-27 20:46:59 +00:00 (Migrated from github.com)

Thanks for the review Ferri!

Thanks for the review Ferri!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#365
No description provided.