aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-04-23 16:49:33 +0800
committershedaniel <daniel@shedaniel.me>2020-04-23 16:49:33 +0800
commitf701792763abfed441687b27ef91a62ed09abd9d (patch)
treec05144da7b9fd0a96e4f7dc5b820ed45d337eb6f
parent87aefabb7b9728e84e600624f8d17a8d335b61af (diff)
downloadRoughlyEnoughItems-f701792763abfed441687b27ef91a62ed09abd9d.tar.gz
RoughlyEnoughItems-f701792763abfed441687b27ef91a62ed09abd9d.tar.bz2
RoughlyEnoughItems-f701792763abfed441687b27ef91a62ed09abd9d.zip
Update to 20w17a
Signed-off-by: shedaniel <daniel@shedaniel.me>
-rwxr-xr-xbuild.gradle10
-rw-r--r--gradle.properties16
-rw-r--r--src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java8
-rw-r--r--src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java8
-rw-r--r--src/main/java/me/shedaniel/rei/api/ClientHelper.java5
-rw-r--r--src/main/java/me/shedaniel/rei/api/DrawableConsumer.java3
-rw-r--r--src/main/java/me/shedaniel/rei/api/EntryStack.java6
-rw-r--r--src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java9
-rw-r--r--src/main/java/me/shedaniel/rei/api/TransferRecipeCategory.java3
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Button.java15
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Label.java15
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Tooltip.java11
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Widgets.java14
-rw-r--r--src/main/java/me/shedaniel/rei/gui/ConfigReloadingScreen.java9
-rw-r--r--src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java108
-rw-r--r--src/main/java/me/shedaniel/rei/gui/OverlaySearchField.java23
-rw-r--r--src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java39
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java16
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java61
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java25
-rw-r--r--src/main/java/me/shedaniel/rei/gui/WarningAndErrorScreen.java73
-rw-r--r--src/main/java/me/shedaniel/rei/gui/config/entry/FilteringEntry.java60
-rw-r--r--src/main/java/me/shedaniel/rei/gui/config/entry/NoFilteringEntry.java8
-rw-r--r--src/main/java/me/shedaniel/rei/gui/config/entry/RecipeScreenTypeEntry.java21
-rw-r--r--src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java29
-rw-r--r--src/main/java/me/shedaniel/rei/gui/credits/CreditsScreen.java19
-rw-r--r--src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java9
-rw-r--r--src/main/java/me/shedaniel/rei/gui/subsets/SubsetsMenu.java9
-rw-r--r--src/main/java/me/shedaniel/rei/gui/subsets/entries/EntryStackMenuEntry.java11
-rw-r--r--src/main/java/me/shedaniel/rei/gui/subsets/entries/SubMenuEntry.java16
-rw-r--r--src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java11
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java38
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java21
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/EntryListWidget.java101
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java41
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/FavoritesListWidget.java17
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java33
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java23
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/QueuedTooltip.java19
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeArrowWidget.java7
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java18
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java12
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java60
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java15
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java30
-rw-r--r--src/main/java/me/shedaniel/rei/impl/EmptyEntryStack.java9
-rw-r--r--src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java36
-rw-r--r--src/main/java/me/shedaniel/rei/impl/InternalWidgets.java35
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java39
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ScreenHelper.java10
-rw-r--r--src/main/java/me/shedaniel/rei/impl/SearchArgument.java15
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java7
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java7
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java59
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/DrawableWidget.java5
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/FillRectangleDrawableConsumer.java3
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java82
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java27
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/TexturedDrawableConsumer.java20
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java8
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/beacon/DefaultBeaconBaseCategory.java9
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java6
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java8
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/campfire/DefaultCampfireCategory.java3
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java8
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java14
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java11
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java10
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java22
-rw-r--r--src/main/resources/rei.aw3
72 files changed, 844 insertions, 723 deletions
diff --git a/build.gradle b/build.gradle
index 7333b744a..a855b3418 100755
--- a/build.gradle
+++ b/build.gradle
@@ -53,7 +53,9 @@ dependencies {
minecraft("com.mojang:minecraft:${project.minecraft_version}")
mappings("net.fabricmc:yarn:${project.yarn_version}:v2")
modApi("net.fabricmc:fabric-loader:${project.fabricloader_version}")
- modApi("net.fabricmc.fabric-api:fabric-api:${project.fabric_api}")
+ modApi("net.fabricmc.fabric-api:fabric-api:${project.fabric_api}") {
+ exclude module: "fabric-biomes-v1"
+ }
modApi("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
transitive = false
}
@@ -67,9 +69,9 @@ dependencies {
modCompileOnly("io.github.prospector:modmenu:${modmenu_version}") {
transitive = false
}
- modRuntime("io.github.prospector:modmenu:${modmenu_version}") {
- transitive = false
- }
+// modRuntime("io.github.prospector:modmenu:${modmenu_version}") {
+// transitive = false
+// }
if (includeDep) {
afterEvaluate {
def listAdded = new ArrayList(Arrays.asList((api_exculde as String).split(',')))
diff --git a/gradle.properties b/gradle.properties
index 74ba4b4c9..b98577bd1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,13 +1,13 @@
-mod_version=4.1.15-unstable
-supported_version=20w16a
-minecraft_version=20w16a
-yarn_version=20w16a+build.1
+mod_version=4.2.0-unstable
+supported_version=20w17a
+minecraft_version=20w17a
+yarn_version=20w17a+build.2
fabricloader_version=0.8.2+build.194
-cloth_events_version=2.0.2-unstable
-cloth_config_version=3.3.2-unstable
+cloth_events_version=2.2.0-unstable
+cloth_config_version=4.0.0-unstable
modmenu_version=1.11.0+build.2
-fabric_api=0.5.11+build.322-1.16
-autoconfig1u=2.0.1
+fabric_api=0.6.2+build.327-1.16
+autoconfig1u=3.0.1-unstable
api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations
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- \ No newline at end of file
diff --git a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java
index 25d5c716f..0fd28b111 100644
--- a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java
+++ b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java
@@ -330,10 +330,10 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer {
if (!alreadyAdded)
screenHooks.cloth_getChildren().add(ScreenHelper.getLastOverlay(true, false));
});
- ClothClientHooks.SCREEN_RENDER_POST.register((minecraftClient, screen, i, i1, v) -> {
+ ClothClientHooks.SCREEN_RENDER_POST.register((matrices, minecraftClient, screen, i, i1, v) -> {
if (shouldReturn(screen))
return;
- ScreenHelper.getLastOverlay().render(i, i1, v);
+ ScreenHelper.getLastOverlay().render(matrices, i, i1, v);
});
ClothClientHooks.SCREEN_MOUSE_DRAGGED.register((minecraftClient, screen, v, v1, i, v2, v3) -> {
if (shouldReturn(screen))
@@ -371,12 +371,12 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer {
return ActionResult.SUCCESS;
return ActionResult.PASS;
});
- ClothClientHooks.SCREEN_LATE_RENDER.register((minecraftClient, screen, i, i1, v) -> {
+ ClothClientHooks.SCREEN_LATE_RENDER.register((matrices, minecraftClient, screen, i, i1, v) -> {
if (shouldReturn(screen))
return;
if (!ScreenHelper.isOverlayVisible())
return;
- ScreenHelper.getLastOverlay().lateRender(i, i1, v);
+ ScreenHelper.getLastOverlay().lateRender(matrices, i, i1, v);
});
ClothClientHooks.SCREEN_KEY_PRESSED.register((minecraftClient, screen, i, i1, i2) -> {
if (shouldReturn(screen))
diff --git a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java
index 2898983b7..bce41cdf1 100644
--- a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java
+++ b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java
@@ -65,7 +65,7 @@ public class RoughlyEnoughItemsNetwork implements ModInitializer {
ServerSidePacketRegistry.INSTANCE.register(DELETE_ITEMS_PACKET, (packetContext, packetByteBuf) -> {
ServerPlayerEntity player = (ServerPlayerEntity) packetContext.getPlayer();
if (player.getServer().getPermissionLevel(player.getGameProfile()) < player.getServer().getOpPermissionLevel()) {
- player.sendMessage(new TranslatableText("text.rei.no_permission_cheat").formatted(Formatting.RED), false);
+ player.sendMessage(new TranslatableText("text.rei.no_permission_cheat").method_27692(Formatting.RED), false);
return;
}
if (!player.inventory.getCursorStack().isEmpty())
@@ -74,7 +74,7 @@ public class RoughlyEnoughItemsNetwork implements ModInitializer {
ServerSidePacketRegistry.INSTANCE.register(CREATE_ITEMS_PACKET, (packetContext, packetByteBuf) -> {
ServerPlayerEntity player = (ServerPlayerEntity) packetContext.getPlayer();
if (player.getServer().getPermissionLevel(player.getGameProfile()) < player.getServer().getOpPermissionLevel()) {
- player.sendMessage(new TranslatableText("text.rei.no_permission_cheat").formatted(Formatting.RED), false);
+ player.sendMessage(new TranslatableText("text.rei.no_permission_cheat").method_27692(Formatting.RED), false);
return;
}
ItemStack stack = packetByteBuf.readItemStack();
@@ -118,9 +118,9 @@ public class RoughlyEnoughItemsNetwork implements ModInitializer {
ServerSidePacketRegistry.INSTANCE.sendToPlayer(player, NOT_ENOUGH_ITEMS_PACKET, buf);
}
} catch (IllegalStateException e) {
- player.sendSystemMessage(new TranslatableText(e.getMessage()).formatted(Formatting.RED));
+ player.sendSystemMessage(new TranslatableText(e.getMessage()).method_27692(Formatting.RED));
} catch (Exception e) {
- player.sendSystemMessage(new TranslatableText("error.rei.internal.error", e.getMessage()).formatted(Formatting.RED));
+ player.sendSystemMessage(new TranslatableText("error.rei.internal.error", e.getMessage()).method_27692(Formatting.RED));
e.printStackTrace();
}
} catch (Exception e) {
diff --git a/src/main/java/me/shedaniel/rei/api/ClientHelper.java b/src/main/java/me/shedaniel/rei/api/ClientHelper.java
index 20577b511..6d9fac19a 100644
--- a/src/main/java/me/shedaniel/rei/api/ClientHelper.java
+++ b/src/main/java/me/shedaniel/rei/api/ClientHelper.java
@@ -26,6 +26,7 @@ package me.shedaniel.rei.api;
import me.shedaniel.rei.impl.ClientHelperImpl;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.ApiStatus;
@@ -129,7 +130,7 @@ public interface ClientHelper {
* @param item the item to find
* @return the mod name with blue and italic formatting
*/
- String getFormattedModFromItem(Item item);
+ Text getFormattedModFromItem(Item item);
/**
* Gets the formatted mod from an identifier
@@ -137,7 +138,7 @@ public interface ClientHelper {
* @param identifier the identifier to find
* @return the mod name with blue and italic formatting
*/
- String getFormattedModFromIdentifier(Identifier identifier);
+ Text getFormattedModFromIdentifier(Identifier identifier);
/**
* Gets the mod from an identifier
diff --git a/src/main/java/me/shedaniel/rei/api/DrawableConsumer.java b/src/main/java/me/shedaniel/rei/api/DrawableConsumer.java
index cef309c89..3aaf05ba6 100644
--- a/src/main/java/me/shedaniel/rei/api/DrawableConsumer.java
+++ b/src/main/java/me/shedaniel/rei/api/DrawableConsumer.java
@@ -24,11 +24,12 @@
package me.shedaniel.rei.api;
import net.minecraft.client.gui.DrawableHelper;
+import net.minecraft.client.util.math.MatrixStack;
import org.jetbrains.annotations.NotNull;
/**
* Consumer of a {@link DrawableHelper} and information of mouse and delta.
*/
public interface DrawableConsumer {
- void render(@NotNull DrawableHelper helper, int mouseX, int mouseY, float delta);
+ void render(@NotNull DrawableHelper helper, @NotNull MatrixStack matrices, int mouseX, int mouseY, float delta);
}
diff --git a/src/main/java/me/shedaniel/rei/api/EntryStack.java b/src/main/java/me/shedaniel/rei/api/EntryStack.java
index 23c232ee1..66c711b3d 100644
--- a/src/main/java/me/shedaniel/rei/api/EntryStack.java
+++ b/src/main/java/me/shedaniel/rei/api/EntryStack.java
@@ -33,12 +33,14 @@ import me.shedaniel.rei.impl.EmptyEntryStack;
import me.shedaniel.rei.impl.FluidEntryStack;
import me.shedaniel.rei.impl.ItemEntryStack;
import net.minecraft.client.resource.language.I18n;
+import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.fluid.Fluid;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.StringNbtReader;
+import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.registry.Registry;
@@ -248,7 +250,7 @@ public interface EntryStack {
return null;
}
- void render(Rectangle bounds, int mouseX, int mouseY, float delta);
+ void render(MatrixStack matrices, Rectangle bounds, int mouseX, int mouseY, float delta);
enum Type {
ITEM,
@@ -266,7 +268,7 @@ public interface EntryStack {
public static final Settings<Supplier<Boolean>> TOOLTIP_ENABLED = new Settings<>(TRUE);
public static final Settings<Supplier<Boolean>> TOOLTIP_APPEND_MOD = new Settings<>(TRUE);
public static final Settings<Supplier<Boolean>> RENDER_COUNTS = new Settings<>(TRUE);
- public static final Settings<Function<EntryStack, List<String>>> TOOLTIP_APPEND_EXTRA = new Settings<>(stack -> Collections.emptyList());
+ public static final Settings<Function<EntryStack, List<Text>>> TOOLTIP_APPEND_EXTRA = new Settings<>(stack -> Collections.emptyList());
public static final Settings<Function<EntryStack, String>> COUNTS = new Settings<>(stack -> null);
private T defaultValue;
diff --git a/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java b/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java
index bade908d8..a7a4a4f04 100644
--- a/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java
+++ b/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java
@@ -24,19 +24,20 @@
package me.shedaniel.rei.api;
import me.shedaniel.math.Rectangle;
+import net.minecraft.client.util.math.MatrixStack;
import org.jetbrains.annotations.ApiStatus;
@ApiStatus.Internal
public interface OptimalEntryStack {
- default void optimisedRenderStart(float delta) {
+ default void optimisedRenderStart(MatrixStack matrices, float delta) {
}
- default void optimisedRenderBase(Rectangle bounds, int mouseX, int mouseY, float delta) {
+ default void optimisedRenderBase(MatrixStack matrices, Rectangle bounds, int mouseX, int mouseY, float delta) {
}
- default void optimisedRenderOverlay(Rectangle bounds, int mouseX, int mouseY, float delta) {
+ default void optimisedRenderOverlay(MatrixStack matrices, Rectangle bounds, int mouseX, int mouseY, float delta) {
}
- default void optimisedRenderEnd(float delta) {
+ default void optimisedRenderEnd(MatrixStack matrices, float delta) {
}
}
diff --git a/src/main/java/me/shedaniel/rei/api/TransferRecipeCategory.java b/src/main/java/me/shedaniel/rei/api/TransferRecipeCategory.java
index a841549ef..72fd09335 100644
--- a/src/main/java/me/shedaniel/rei/api/TransferRecipeCategory.java
+++ b/src/main/java/me/shedaniel/rei/api/TransferRecipeCategory.java
@@ -26,11 +26,12 @@ package me.shedaniel.rei.api;
import it.unimi.dsi.fastutil.ints.IntList;
import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.gui.widget.Widget;
+import net.minecraft.client.util.math.MatrixStack;
import org.jetbrains.annotations.ApiStatus;
import java.util.List;
public interface TransferRecipeCategory<T extends RecipeDisplay> extends RecipeCategory<T> {
@ApiStatus.OverrideOnly
- void renderRedSlots(List<Widget> widgets, Rectangle bounds, T display, IntList redSlots);
+ void renderRedSlots(MatrixStack matrices, List<Widget> widgets, Rectangle bounds, T display, IntList redSlots);
}
diff --git a/src/main/java/me/shedaniel/rei/api/widgets/Button.java b/src/main/java/me/shedaniel/rei/api/widgets/Button.java
index 24b3dd287..