Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followup to Fluid Supplier overhaul #63

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
api('com.github.GTNewHorizons:BuildCraft:7.1.39:dev')
implementation('com.github.GTNewHorizons:GT5-Unofficial:5.09.49.05:dev')
implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.26-GTNH:dev')
implementation('com.github.GTNewHorizons:ModularUI2:2.1.1-1.7.10:dev')
implementation('com.github.GTNewHorizons:ModularUI2:2.1.2-1.7.10:dev')
implementation('com.github.GTNewHorizons:CodeChickenLib:1.3.0:dev')

compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.20-GTNH:api') { transitive = false }
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/logisticspipes/compat/ModularUIHelper.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package logisticspipes.compat;

import java.util.function.Supplier;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

import com.cleanroommc.modularui.api.drawable.IKey;
import com.cleanroommc.modularui.drawable.UITexture;
import com.cleanroommc.modularui.factory.TileEntityGuiFactory;

Expand All @@ -23,8 +20,4 @@ public static void openPipeUI(EntityPlayer player, CoreUnroutedPipe pipe) {

TileEntityGuiFactory.open(player, pipe.getX(), pipe.getY(), pipe.getZ());
}

public static IKey reallyDynamicKey(Supplier<IKey> keySupplier) {
return IKey.dynamic(() -> keySupplier.get().get());
}
}
9 changes: 4 additions & 5 deletions src/main/java/logisticspipes/pipes/PipeFluidSupplierMk2.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ public void addUIWidgets(ModularPanel panel, PosGuiData data, PanelSyncManager s
() -> this.requestPartials,
value -> this.requestPartials = value))
.overlay(
ModularUIHelper.reallyDynamicKey(
() -> this.requestPartials ? IKey.lang(
"gui.fluidsuppliermk2.partial.yes")
: IKey.lang(
"gui.fluidsuppliermk2.partial.no")))
IKey.lang(
() -> this.requestPartials
? "gui.fluidsuppliermk2.partial.yes"
: "gui.fluidsuppliermk2.partial.no"))
.tooltipBuilder((tooltip -> {
tooltip.addLine(
IKey.lang("gui.fluidsuppliermk2.partial.tip"));
Expand Down
Loading