Skip to content

Commit

Permalink
Fix T2 PCBFactory NEI structure preview (GTNewHorizons#2638)
Browse files Browse the repository at this point in the history
* Fix T2 PCBFactory NEI structure preview

* compileOnly blockrenderer
  • Loading branch information
RealSilverMoon authored and ah-OOG-ah committed Jul 31, 2024
1 parent 6abc8b6 commit ce95307
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ dependencies {
compileOnly('com.github.GTNewHorizons:SC2:2.1.1:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:Binnie:2.4.0:dev') {transitive = false}
compileOnly('curse.maven:PlayerAPI-228969:2248928') {transitive=false}
compileOnly('com.github.GTNewHorizons:BlockRenderer6343:1.2.8:dev'){transitive=false}

shadowImplementation('com.github.GTNewHorizons:AVRcore:1.0.1')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
import com.gtnewhorizons.modularui.common.widget.TextWidget;
import com.gtnewhorizons.modularui.common.widget.textfield.NumericWidget;

import blockrenderer6343.client.world.ClientFakePlayer;
import cpw.mods.fml.common.Loader;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
Expand Down Expand Up @@ -313,6 +315,17 @@ public void construct(ItemStack stackSize, boolean hintsOnly) {
public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
if (mMachine) return -1;
int built = 0;
if (Loader.isModLoaded("blockrenderer6343") && env.getActor() instanceof ClientFakePlayer) {
if (stackSize.stackSize < 3) {
built += survivialBuildPiece(tier1, stackSize, 3, 5, 0, elementBudget, env, false, false);
if (stackSize.stackSize == 2) {
built += survivialBuildPiece(tier2, stackSize, 7, 6, 2, elementBudget, env, false, false);
}
} else {
built += survivialBuildPiece(tier3, stackSize, 3, 21, 0, elementBudget, env, false, false);
}
return built;
}
if (mSetTier < 3) {
built += survivialBuildPiece(tier1, stackSize, 3, 5, 0, elementBudget, env, false, true);
if (mSetTier == 2) {
Expand Down

0 comments on commit ce95307

Please sign in to comment.