Skip to content

Rework Project Red Project Bench and Autocrafting Bench - #63

Open
PLASMAchicken wants to merge 26 commits into
GTNewHorizons:masterfrom
PLASMAchicken:rework-projectred-crafting
Open

Rework Project Red Project Bench and Autocrafting Bench#63
PLASMAchicken wants to merge 26 commits into
GTNewHorizons:masterfrom
PLASMAchicken:rework-projectred-crafting

Conversation

@PLASMAchicken

@PLASMAchicken PLASMAchicken commented Dec 25, 2025

Copy link
Copy Markdown
Member

Changelog:

  • Item Plan Preview now behaves like AE2 EncodedPattern
    • No more Issues with GT Items or other special Icons
    • Works outside of Autocrafter too now
    • No issue with ItemPlan Icon showing ontop of Item
  • Autocrafter + Project Bench applied NBT check
  • Autocrafter + Project Bench fixed OreDict check
    • Would need a complete rewrite
      -> Autocrafter + Project Bench removed OreDict check because it ignores NBT check
  • Project Bench return Container Items ( GT Tools / Buckets )
  • Project Bench Shift click dupe fix
  • Project Bench take materials out of crafting grid when not using RecipePlan

Ports #16 to Project Bench


@PLASMAchicken
PLASMAchicken force-pushed the rework-projectred-crafting branch from 3fc1b09 to f810218 Compare December 25, 2025 21:51
@PLASMAchicken
PLASMAchicken marked this pull request as ready for review June 3, 2026 23:34
@PLASMAchicken
PLASMAchicken requested review from Caedis and Ranzuu June 3, 2026 23:34

@Ranzuu Ranzuu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Localization
en_US.lang

> item.projectred.expansion.plan.name=Recipe Plan
item.projectred.expansion.plan.tooltip.output=Output: %s
item.projectred.expansion.plan.tooltip.inputs=Inputs:
item.projectred.expansion.plan.tooltip.empty=Empty

Comment thread src/main/scala/mrtjp/projectred/expansion/items.scala
Comment thread src/main/scala/mrtjp/projectred/expansion/items.scala
Comment thread src/main/scala/mrtjp/projectred/expansion/items.scala
Comment thread src/main/scala/mrtjp/projectred/expansion/items.scala
PLASMAchicken and others added 2 commits June 4, 2026 20:26
Co-authored-by: Ranzu <66495944+Ranzuu@users.noreply.github.com>
Co-Authored-By: Ranzu <66495944+Ranzuu@users.noreply.github.com>
@PLASMAchicken
PLASMAchicken requested a review from a team June 13, 2026 08:44

@Guvante Guvante left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM mostly beyond some nitpicks

Keyboard.KEY_RSHIFT
)
if (
!this.recursive && (`type` eq IItemRenderer.ItemRenderType.INVENTORY) && isShiftHeld

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to check this.recursive first and early out since it avoids Keyboard.isKeyDown checks (also makes it clearer that it is a bypass for this function)

Especially since you already have two if statements

tile.currentInputs,
storage
)
) && tile.currentRecipe.matches(tile.invCrafting, tile.world)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears this matches logic could be lifted as an early out to avoid duplicating it

FMLCommonHandler
.instance()
.firePlayerCraftingEvent(player, stack, invCrafting)
FMLCommonHandler.instance.firePlayerCraftingEvent(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did the () go?

TIL Scala is totally okay without parens here but I think it should be consistent with the rest of the file.


if (remainder != null && gridStack != null) {
// Case 1: No plan active AND this grid slot is now empty → put remainder back in grid
if (!tile.isPlanRecipe && (gridStack.isItemEqual(remainder))) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how gridStack.isItemEqual(remainder) means it is now empty

recipe.matches(tile.invCrafting, world)
}

private var i = 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holly shadowing, I know it is old code but this should be renamed

if (!tile.isPlanRecipe) increment()
val start = i
do {
val stack2 = storage(i)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming these from 1/2 to something more descriptive would also be nice

storage(i) = null;
}

val copy = stack2.copy();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it is worth it but would skipping the copy when the item is deleted be beneficial?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants