Skip to content

Commit

Permalink
Fix pcb factory nei preview (#3223)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Lyfts and github-actions[bot] committed Sep 18, 2024
1 parent 6ff6f86 commit d97d3e1
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,21 @@ public void construct(ItemStack stackSize, boolean hintsOnly) {
}

public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
if (mMachine) return -1;
int built = 0;
if (Mods.BlockRenderer6343.isModLoaded() && env.getActor() instanceof ClientFakePlayer) {
if (stackSize.stackSize < 3) {
built += survivialBuildPiece(tier1, stackSize, 3, 5, 0, elementBudget, env, false, false);
built = survivialBuildPiece(tier1, stackSize, 3, 5, 0, elementBudget, env, false, true);
if (built >= 0) return built;
if (stackSize.stackSize == 2) {
built += survivialBuildPiece(tier2, stackSize, 7, 6, 2, elementBudget, env, false, false);
built = survivialBuildPiece(tier2, stackSize, 7, 6, 2, elementBudget, env, false, true);
}
} else {
built += survivialBuildPiece(tier3, stackSize, 3, 21, 0, elementBudget, env, false, false);
built = survivialBuildPiece(tier3, stackSize, 3, 21, 0, elementBudget, env, false, true);
}
return built;
}

if (mMachine) return -1;
if (mSetTier < 3) {
built += survivialBuildPiece(tier1, stackSize, 3, 5, 0, elementBudget, env, false, true);
if (mSetTier == 2) {
Expand Down

0 comments on commit d97d3e1

Please sign in to comment.