Unknown 6 년 전
부모
커밋
7bf1ce7eca

+ 2 - 0
CHANGELOG.md

@@ -1,3 +1,5 @@
+## v2.6.0.77
+- fish
 ## v2.6.0.76
 - New DisplayVisibilityHandler
 - Fixed [#49](https://github.com/shedaniel/RoughlyEnoughItems/issues/49): REI Overlay added twice

+ 1 - 1
gradle.properties

@@ -1,4 +1,4 @@
-mod_version=2.6.0.76
+mod_version=2.6.0.77
 minecraft_version=19w13b
 yarn_version=19w13b.1
 fabric_version=0.2.6.117

+ 2 - 0
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);
     

+ 6 - 1
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;

+ 1 - 0
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)));