-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implement old "limiter" for bulk cell compression, but on a per-ce…
…ll basis
- Loading branch information
Showing
22 changed files
with
356 additions
and
83 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/generated/resources/.cache/89b86ab0e66f527166d98df92ddbcf5416ed58f6
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,2 +1,2 @@ | ||
// 1.21.1 2024-11-17T14:07:31.916554252 Language | ||
79f2bdffe2659a931e47c3e340144ada20c70b08 assets/megacells/lang/en_us.json | ||
// 1.21.1 2024-11-18T23:07:51.796909718 Language | ||
9e9924e9ebb1aaf3dced54bdb41bfadab31c7fae assets/megacells/lang/en_us.json |
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
50 changes: 50 additions & 0 deletions
50
src/main/java/gripe/_90/megacells/client/screen/CompressionCutoffButton.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,50 @@ | ||
package gripe._90.megacells.client.screen; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.item.Item; | ||
|
||
import appeng.client.gui.Icon; | ||
import appeng.client.gui.widgets.IconButton; | ||
|
||
import gripe._90.megacells.definition.MEGATranslations; | ||
import gripe._90.megacells.misc.CompressionChain; | ||
|
||
public class CompressionCutoffButton extends IconButton { | ||
private Item item; | ||
|
||
public CompressionCutoffButton(OnPress onPress) { | ||
super(onPress); | ||
} | ||
|
||
public void setItem(CompressionChain.Variant variant) { | ||
item = variant.item().getItem(); | ||
} | ||
|
||
@Override | ||
protected Icon getIcon() { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
protected Item getItemOverlay() { | ||
return item; | ||
} | ||
|
||
@Override | ||
public List<Component> getTooltipMessage() { | ||
var message = new ArrayList<Component>(); | ||
message.add(MEGATranslations.CompressionCutoff.text()); | ||
|
||
if (item != null) { | ||
message.add(item.getDescription()); | ||
} | ||
|
||
return message; | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
src/main/java/gripe/_90/megacells/menu/CompressionCutoffHost.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,7 @@ | ||
package gripe._90.megacells.menu; | ||
|
||
public interface CompressionCutoffHost { | ||
String ACTION_SET_COMPRESSION_LIMIT = "openCompressionLimitMenu"; | ||
|
||
void mega$nextCompressionLimit(); | ||
} |
Oops, something went wrong.