diff options
Diffstat (limited to 'src')
3 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/rei/client/ConfigObject.java b/src/main/java/me/shedaniel/rei/client/ConfigObject.java index 692110c73..1a5c82bd1 100644 --- a/src/main/java/me/shedaniel/rei/client/ConfigObject.java +++ b/src/main/java/me/shedaniel/rei/client/ConfigObject.java @@ -48,6 +48,8 @@ public class ConfigObject { @Comment("Enable support for old REI plugins which uses registerSpeedCraft") public boolean enableLegacySpeedCraftSupport = false; + public boolean fish = true; + @Comment("The location of choose page dialog") public RelativePoint choosePageDialogPoint = new RelativePoint(.5, .5); diff --git a/src/main/java/me/shedaniel/rei/gui/widget/ItemSlotWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/ItemSlotWidget.java index ef01f2aa1..9b553eb7c 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/ItemSlotWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/ItemSlotWidget.java @@ -3,6 +3,7 @@ package me.shedaniel.rei.gui.widget; import com.google.common.collect.Lists; import com.mojang.blaze3d.platform.GlStateManager; import me.shedaniel.cloth.api.ClientUtils; +import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.client.ClientHelper; import me.shedaniel.rei.client.ScreenHelper; import net.minecraft.client.gui.Element; @@ -15,11 +16,13 @@ import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.Collections; +import java.util.Date; import java.util.LinkedList; import java.util.List; public class ItemSlotWidget extends HighlightableWidget { + private static final Date DATE = new Date(); private static final Identifier RECIPE_GUI = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png"); private List<ItemStack> itemList = new LinkedList<>(); private boolean drawBackground, showToolTips, clickToMoreRecipes, drawHighlightedBackground; @@ -59,7 +62,7 @@ public class ItemSlotWidget extends HighlightableWidget { @Override public void render(int mouseX, int mouseY, float delta) { - final ItemStack itemStack = getCurrentStack(); + ItemStack itemStack = getCurrentStack().copy(); if (drawBackground) { minecraft.getTextureManager().bindTexture(RECIPE_GUI); blit(this.x - 1, this.y - 1, 0, 222, 18, 18); @@ -74,6 +77,8 @@ public class ItemSlotWidget extends HighlightableWidget { GlStateManager.enableDepthTest(); } if (!itemStack.isEmpty()) { + if (!isHighlighted(mouseX, mouseY) && DATE.getMonth() == 3 && DATE.getDay() == 1 && RoughlyEnoughItemsCore.getConfigManager().getConfig().fish) + itemStack = Items.TROPICAL_FISH.getDefaultStack(); GuiLighting.enableForItems(); ItemRenderer itemRenderer = minecraft.getItemRenderer(); itemRenderer.zOffset = 200.0F; diff --git a/src/main/java/me/shedaniel/rei/utils/ClothRegistry.java b/src/main/java/me/shedaniel/rei/utils/ClothRegistry.java index 611a62811..49ce4ea14 100644 --- a/src/main/java/me/shedaniel/rei/utils/ClothRegistry.java +++ b/src/main/java/me/shedaniel/rei/utils/ClothRegistry.java @@ -99,6 +99,7 @@ public class ClothRegistry { public static void openConfigScreen(Screen parent) { ConfigScreenBuilder builder = new ClothConfigScreen.Builder(parent, I18n.translate("text.rei.config.title"), null); builder.addCategory("text.rei.config.general").addOption(new BooleanListEntry("text.rei.config.cheating", RoughlyEnoughItemsCore.getConfigManager().getConfig().cheating, "text.cloth.reset_value", () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().cheating = bool)); + builder.getCategory("text.rei.config.general").addOption(new BooleanListEntry("fish is good", RoughlyEnoughItemsCore.getConfigManager().getConfig().fish, "text.cloth.reset_value", () -> true, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().fish = bool)); ConfigScreenBuilder.CategoryBuilder appearance = builder.addCategory("text.rei.config.appearance"); appearance.addOption(new BooleanListEntry("text.rei.config.side_search_box", RoughlyEnoughItemsCore.getConfigManager().getConfig().sideSearchField, "text.cloth.reset_value", () -> false, bool -> RoughlyEnoughItemsCore.getConfigManager().getConfig().sideSearchField = bool)); appearance.addOption(new ItemListOrderingEntry("text.rei.config.list_ordering", new Pair<>(RoughlyEnoughItemsCore.getConfigManager().getConfig().itemListOrdering, RoughlyEnoughItemsCore.getConfigManager().getConfig().isAscending))); |
