-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dadfbb6
commit 150e8df
Showing
31 changed files
with
615 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
refinedarchitectVersion=0.17.1 | ||
refinedstorageVersion=2.0.0-milestone.4.7 | ||
refinedarchitectVersion=0.19.1 | ||
refinedstorageVersion=2.0.0-milestone.4.8 | ||
# https://linkie.shedaniel.dev/dependencies?loader=neoforge&version=1.21 | ||
# https://linkie.shedaniel.dev/dependencies?loader=fabric&version=1.21 | ||
architecturyVersion=13.0.3 | ||
clothConfigVersion=15.0.127 | ||
reiVersion=16.0.729 | ||
# Gradle | ||
org.gradle.jvmargs=-Xmx1G | ||
org.gradle.configureondemand=true | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=true | ||
org.gradle.configuration-cache.problems=warn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...bric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/AbstractTransferHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.refinedmods.refinedstorage.rei.fabric; | ||
|
||
import com.refinedmods.refinedstorage.common.grid.AutocraftableResourceHint; | ||
|
||
import com.mojang.blaze3d.vertex.PoseStack; | ||
import me.shedaniel.math.Rectangle; | ||
import me.shedaniel.rei.api.client.gui.widgets.Slot; | ||
import me.shedaniel.rei.api.client.registry.transfer.TransferHandler; | ||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.network.chat.MutableComponent; | ||
|
||
abstract class AbstractTransferHandler implements TransferHandler { | ||
protected static final int AUTOCRAFTABLE_COLOR = AutocraftableResourceHint.AUTOCRAFTABLE.getColor(); | ||
|
||
protected static MutableComponent createAutocraftableHint(final Component component) { | ||
return component.copy().withColor(AUTOCRAFTABLE_COLOR); | ||
} | ||
|
||
protected static void renderSlotHighlight(final GuiGraphics graphics, final Slot slot, final int color) { | ||
final PoseStack poseStack = graphics.pose(); | ||
poseStack.pushPose(); | ||
poseStack.translate(0, 0, 50); | ||
final Rectangle innerBounds = slot.getInnerBounds(); | ||
graphics.fill( | ||
innerBounds.x, | ||
innerBounds.y, | ||
innerBounds.getMaxX(), | ||
innerBounds.getMaxY(), | ||
color | ||
); | ||
poseStack.popPose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.