Browse Source

4.1.4: Updates Auto Config & 20w14a

Signed-off-by: shedaniel <daniel@shedaniel.me>
shedaniel 5 years ago
parent
commit
311a8acb93

+ 1 - 1
build.gradle

@@ -131,7 +131,7 @@ curseforge {
                 embeddedLibrary 'cloth-config'
                 embeddedLibrary 'cloth-config'
             }
             }
             mainArtifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
             mainArtifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
-                displayName = "[Fabric 20w13b - 20w14infinite] v$project.version"
+                displayName = "[Fabric 20w14a] v$project.version"
             }
             }
             afterEvaluate {
             afterEvaluate {
                 uploadTask.dependsOn("remapJar")
                 uploadTask.dependsOn("remapJar")

+ 6 - 6
gradle.properties

@@ -1,12 +1,12 @@
-mod_version=4.1.3-unstable
-minecraft_version=20w13b
-yarn_version=20w13b+build.4
-fabricloader_version=0.7.8+build.189
+mod_version=4.1.4-unstable
+minecraft_version=20w14a
+yarn_version=20w14a+build.2
+fabricloader_version=0.7.9+build.190
 cloth_events_version=2.0.2-unstable
 cloth_events_version=2.0.2-unstable
 cloth_config_version=3.1.0-unstable
 cloth_config_version=3.1.0-unstable
 modmenu_version=1.11.0+build.2
 modmenu_version=1.11.0+build.2
-fabric_api=0.5.6+build.313-1.16
-autoconfig1u=1.2.4
+fabric_api=0.5.7+build.314-1.16
+autoconfig1u=1.2.5
 api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations
 api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations
 api_exculde=
 api_exculde=
 #api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric-
 #api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric-

+ 1 - 1
src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java

@@ -54,7 +54,6 @@ import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.sound.PositionedSoundInstance;
 import net.minecraft.client.sound.PositionedSoundInstance;
 import net.minecraft.client.util.NarratorManager;
 import net.minecraft.client.util.NarratorManager;
 import net.minecraft.client.util.Window;
 import net.minecraft.client.util.Window;
-import net.minecraft.client.util.math.Matrix4f;
 import net.minecraft.client.util.math.MatrixStack;
 import net.minecraft.client.util.math.MatrixStack;
 import net.minecraft.client.world.ClientWorld;
 import net.minecraft.client.world.ClientWorld;
 import net.minecraft.item.ItemStack;
 import net.minecraft.item.ItemStack;
@@ -63,6 +62,7 @@ import net.minecraft.sound.SoundEvents;
 import net.minecraft.text.TranslatableText;
 import net.minecraft.text.TranslatableText;
 import net.minecraft.util.ActionResult;
 import net.minecraft.util.ActionResult;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.Identifier;
+import net.minecraft.util.math.Matrix4f;
 import net.minecraft.world.GameMode;
 import net.minecraft.world.GameMode;
 import org.apache.logging.log4j.util.TriConsumer;
 import org.apache.logging.log4j.util.TriConsumer;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.ApiStatus;

+ 1 - 1
src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java

@@ -52,13 +52,13 @@ import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.sound.PositionedSoundInstance;
 import net.minecraft.client.sound.PositionedSoundInstance;
 import net.minecraft.client.util.NarratorManager;
 import net.minecraft.client.util.NarratorManager;
 import net.minecraft.client.util.Window;
 import net.minecraft.client.util.Window;
-import net.minecraft.client.util.math.Matrix4f;
 import net.minecraft.client.util.math.MatrixStack;
 import net.minecraft.client.util.math.MatrixStack;
 import net.minecraft.sound.SoundEvents;
 import net.minecraft.sound.SoundEvents;
 import net.minecraft.text.TranslatableText;
 import net.minecraft.text.TranslatableText;
 import net.minecraft.util.Formatting;
 import net.minecraft.util.Formatting;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.math.MathHelper;
 import net.minecraft.util.math.MathHelper;
+import net.minecraft.util.math.Matrix4f;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.annotations.Nullable;
 
 

+ 1 - 1
src/main/java/me/shedaniel/rei/gui/widget/EntryListWidget.java

@@ -45,11 +45,11 @@ import net.minecraft.client.network.ClientPlayerEntity;
 import net.minecraft.client.render.Tessellator;
 import net.minecraft.client.render.Tessellator;
 import net.minecraft.client.render.VertexConsumerProvider;
 import net.minecraft.client.render.VertexConsumerProvider;
 import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.resource.language.I18n;
-import net.minecraft.client.util.math.Matrix4f;
 import net.minecraft.client.util.math.MatrixStack;
 import net.minecraft.client.util.math.MatrixStack;
 import net.minecraft.item.ItemGroup;
 import net.minecraft.item.ItemGroup;
 import net.minecraft.util.ActionResult;
 import net.minecraft.util.ActionResult;
 import net.minecraft.util.math.MathHelper;
 import net.minecraft.util.math.MathHelper;
+import net.minecraft.util.math.Matrix4f;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.annotations.Nullable;

+ 0 - 2
src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java

@@ -97,8 +97,6 @@ public class ConfigManagerImpl implements ConfigManager {
             return it instanceof String ? EntryStack.readFromJson(gson.fromJson((String) it, JsonElement.class)) : null;
             return it instanceof String ? EntryStack.readFromJson(gson.fromJson((String) it, JsonElement.class)) : null;
         }).build()));
         }).build()));
         GuiRegistry guiRegistry = AutoConfig.getGuiRegistry(ConfigObjectImpl.class);
         GuiRegistry guiRegistry = AutoConfig.getGuiRegistry(ConfigObjectImpl.class);
-        //noinspection rawtypes
-        guiRegistry.registerAnnotationProvider((i13n, field, config, defaults, guiProvider) -> Collections.singletonList(ConfigEntryBuilder.create().startEnumSelector(i13n, (Class) field.getType(), getUnsafely(field, config, null)).setDefaultValue(() -> getUnsafely(field, defaults)).setSaveConsumer(newValue -> setUnsafely(field, config, newValue)).build()), field -> field.getType().isEnum(), ConfigObjectImpl.UseEnumSelectorInstead.class);
         guiRegistry.registerPredicateProvider((i13n, field, config, defaults, guiProvider) -> {
         guiRegistry.registerPredicateProvider((i13n, field, config, defaults, guiProvider) -> {
             if (field.isAnnotationPresent(ConfigEntry.Gui.Excluded.class))
             if (field.isAnnotationPresent(ConfigEntry.Gui.Excluded.class))
                 return Collections.emptyList();
                 return Collections.emptyList();

+ 4 - 7
src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java

@@ -340,10 +340,6 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData {
     @Target({ElementType.FIELD})
     @Target({ElementType.FIELD})
     @interface DontApplyFieldName {}
     @interface DontApplyFieldName {}
     
     
-    @Retention(RetentionPolicy.RUNTIME)
-    @Target({ElementType.FIELD})
-    @interface UseEnumSelectorInstead {}
-    
     @Retention(RetentionPolicy.RUNTIME)
     @Retention(RetentionPolicy.RUNTIME)
     @Target({ElementType.FIELD})
     @Target({ElementType.FIELD})
     @interface UseSpecialRecipeTypeScreen {}
     @interface UseSpecialRecipeTypeScreen {}
@@ -379,15 +375,16 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData {
     public static class Appearance {
     public static class Appearance {
         @UseSpecialRecipeTypeScreen private RecipeScreenType recipeScreenType = RecipeScreenType.UNSET;
         @UseSpecialRecipeTypeScreen private RecipeScreenType recipeScreenType = RecipeScreenType.UNSET;
         @Comment("Declares the appearance of REI windows.") private boolean darkTheme = false;
         @Comment("Declares the appearance of REI windows.") private boolean darkTheme = false;
-        @Comment("The ordering of the items on the item panel.") @UseEnumSelectorInstead
+        @Comment("The ordering of the items on the item panel.") @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
         private ItemListOrderingConfig itemListOrdering = ItemListOrderingConfig.REGISTRY_ASCENDING;
         private ItemListOrderingConfig itemListOrdering = ItemListOrderingConfig.REGISTRY_ASCENDING;
-        @Comment("Declares the position of the search field.") @UseEnumSelectorInstead
+        @Comment("Declares the position of the search field.") @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
         private SearchFieldLocation searchFieldLocation = SearchFieldLocation.CENTER;
         private SearchFieldLocation searchFieldLocation = SearchFieldLocation.CENTER;
         @Comment("Declares the position of the item list panel.") private boolean mirrorItemPanel = false;
         @Comment("Declares the position of the item list panel.") private boolean mirrorItemPanel = false;
         @Comment("Declares the maximum amount of recipes displayed in a page if possible.") @ConfigEntry.BoundedDiscrete(min = 2, max = 99)
         @Comment("Declares the maximum amount of recipes displayed in a page if possible.") @ConfigEntry.BoundedDiscrete(min = 2, max = 99)
         private int maxRecipePerPage = 3;
         private int maxRecipePerPage = 3;
         private boolean clickableRecipeArrows = true;
         private boolean clickableRecipeArrows = true;
-        @Comment("Declares the appearance of recipe's border.") @UseEnumSelectorInstead private RecipeBorderType recipeBorder = RecipeBorderType.DEFAULT;
+        @Comment("Declares the appearance of recipe's border.") @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
+        private RecipeBorderType recipeBorder = RecipeBorderType.DEFAULT;
         @Comment("Declares whether REI should append mod names to item stacks.") private boolean appendModNames = true;
         @Comment("Declares whether REI should append mod names to item stacks.") private boolean appendModNames = true;
         @Comment("Declares how the scrollbar in villager screen should act.") private boolean villagerScreenPermanentScrollBar = false;
         @Comment("Declares how the scrollbar in villager screen should act.") private boolean villagerScreenPermanentScrollBar = false;
         @Comment("Declares whether entry list widget is scrolled.") private boolean scrollingEntryListWidget = false;
         @Comment("Declares whether entry list widget is scrolled.") private boolean scrollingEntryListWidget = false;

+ 2 - 2
src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java

@@ -277,11 +277,11 @@ public class ItemEntryStack extends AbstractEntryStack implements OptimalEntrySt
             BakedModel model = getModelFromStack(stack);
             BakedModel model = getModelFromStack(stack);
             boolean bl = !IS_SIDE_LIT.test(model);
             boolean bl = !IS_SIDE_LIT.test(model);
             if (bl)
             if (bl)
-                GlStateManager.method_24221();
+                GlStateManager.setupGuiFlatDiffuseLighting();
             MinecraftClient.getInstance().getItemRenderer().renderItem(stack, ModelTransformation.Mode.GUI, false, MATRICES, immediate, 15728880, OverlayTexture.DEFAULT_UV, model);
             MinecraftClient.getInstance().getItemRenderer().renderItem(stack, ModelTransformation.Mode.GUI, false, MATRICES, immediate, 15728880, OverlayTexture.DEFAULT_UV, model);
             immediate.draw();
             immediate.draw();
             if (bl)
             if (bl)
-                GlStateManager.method_24222();
+                GlStateManager.setupGui3dDiffuseLighting();
             MATRICES.pop();
             MATRICES.pop();
             ((ItemStackHook) (Object) stack).rei_setRenderEnchantmentGlint(false);
             ((ItemStackHook) (Object) stack).rei_setRenderEnchantmentGlint(false);
         }
         }

+ 3 - 3
src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java

@@ -47,9 +47,9 @@ import net.minecraft.client.render.Tessellator;
 import net.minecraft.client.render.VertexFormats;
 import net.minecraft.client.render.VertexFormats;
 import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.util.Texts;
 import net.minecraft.client.util.Texts;
-import net.minecraft.client.util.math.Matrix4f;
 import net.minecraft.text.Text;
 import net.minecraft.text.Text;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.Identifier;
+import net.minecraft.util.math.Matrix4f;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.NotNull;
 
 
 import java.util.Collections;
 import java.util.Collections;
@@ -166,14 +166,14 @@ public class DefaultInformationCategory implements RecipeCategory<DefaultInforma
             }
             }
             return false;
             return false;
         }
         }
-    
+        
         @Override
         @Override
         public boolean mouseClicked(double mouseX, double mouseY, int button) {
         public boolean mouseClicked(double mouseX, double mouseY, int button) {
             if (scrolling.updateDraggingState(mouseX, mouseY, button))
             if (scrolling.updateDraggingState(mouseX, mouseY, button))
                 return true;
                 return true;
             return super.mouseClicked(mouseX, mouseY, button);
             return super.mouseClicked(mouseX, mouseY, button);
         }
         }
-    
+        
         @Override
         @Override
         public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) {
         public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) {
             if (scrolling.mouseDragged(mouseX, mouseY, button, deltaX, deltaY))
             if (scrolling.mouseDragged(mouseX, mouseY, button, deltaX, deltaY))

+ 4 - 3
src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java

@@ -36,6 +36,7 @@ import net.minecraft.screen.slot.Slot;
 import net.minecraft.server.network.ServerPlayerEntity;
 import net.minecraft.server.network.ServerPlayerEntity;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.collection.DefaultedList;
 import net.minecraft.util.collection.DefaultedList;
+
 import java.util.*;
 import java.util.*;
 
 
 public class InputSlotCrafter<C extends Inventory> implements RecipeGridAligner<Integer> {
 public class InputSlotCrafter<C extends Inventory> implements RecipeGridAligner<Integer> {
@@ -96,12 +97,12 @@ public class InputSlotCrafter<C extends Inventory> implements RecipeGridAligner<
     protected void fillInputSlot(Slot slot_1, ItemStack itemStack_1) {
     protected void fillInputSlot(Slot slot_1, ItemStack itemStack_1) {
         int int_1 = this.inventory.method_7371(itemStack_1);
         int int_1 = this.inventory.method_7371(itemStack_1);
         if (int_1 != -1) {
         if (int_1 != -1) {
-            ItemStack itemStack_2 = this.inventory.getInvStack(int_1).copy();
+            ItemStack itemStack_2 = this.inventory.getStack(int_1).copy();
             if (!itemStack_2.isEmpty()) {
             if (!itemStack_2.isEmpty()) {
                 if (itemStack_2.getCount() > 1) {
                 if (itemStack_2.getCount() > 1) {
-                    this.inventory.takeInvStack(int_1, 1);
+                    this.inventory.removeStack(int_1, 1);
                 } else {
                 } else {
-                    this.inventory.removeInvStack(int_1);
+                    this.inventory.removeStack(int_1);
                 }
                 }
                 
                 
                 itemStack_2.setCount(1);
                 itemStack_2.setCount(1);

+ 2 - 1
src/main/resources/fabric.mod.json

@@ -38,7 +38,8 @@
     "fabricloader": "*",
     "fabricloader": "*",
     "cloth": ">=2-",
     "cloth": ">=2-",
     "cloth-basic-math": "*",
     "cloth-basic-math": "*",
-    "cloth-config2": ">=3-"
+    "cloth-config2": ">=3-",
+    "minecraft": "~1.16-Snapshot.20.14.a"
   },
   },
   "mixins": [
   "mixins": [
     "mixin.roughlyenoughitems.json",
     "mixin.roughlyenoughitems.json",