aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/plugin
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-13 00:25:30 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-13 00:25:30 +0800
commitec2836c91a189dbfc6ca715c11149cb25c31d8c8 (patch)
treee1c226a7fb13f8e30d642ebd019d10600378904a /src/main/java/me/shedaniel/rei/plugin
parent270eedeacf7693095e72327611ced03bbdbd8bc8 (diff)
downloadRoughlyEnoughItems-ec2836c91a189dbfc6ca715c11149cb25c31d8c8.tar.gz
RoughlyEnoughItems-ec2836c91a189dbfc6ca715c11149cb25c31d8c8.tar.bz2
RoughlyEnoughItems-ec2836c91a189dbfc6ca715c11149cb25c31d8c8.zip
Better Recipe Tooltips
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin')
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/BrewingRecipe.java1
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java7
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java35
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java7
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java7
5 files changed, 49 insertions, 8 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/BrewingRecipe.java b/src/main/java/me/shedaniel/rei/plugin/BrewingRecipe.java
index b4bcdb39a..0d501105f 100644
--- a/src/main/java/me/shedaniel/rei/plugin/BrewingRecipe.java
+++ b/src/main/java/me/shedaniel/rei/plugin/BrewingRecipe.java
@@ -14,4 +14,5 @@ public class BrewingRecipe {
this.ingredient = ingredient_1;
this.output = object_2;
}
+
} \ No newline at end of file
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java
index 9e4855267..75c35407c 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java
@@ -57,7 +57,12 @@ public class DefaultBlastingCategory implements IRecipeCategory<DefaultBlastingD
}));
List<List<ItemStack>> input = recipeDisplay.getInput();
widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 1, input.get(0), true, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, containerGui, true));
+ widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.smelting.fuel"));
+ }
+ });
widgets.add(new ItemSlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplay.getOutput(), false, true, containerGui, true));
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java
index 1f28e1ce1..41cfcab83 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java
@@ -55,11 +55,36 @@ public class DefaultBrewingCategory implements IRecipeCategory<DefaultBrewingDis
}
}));
widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 1, Arrays.asList(new ItemStack(Items.BLAZE_POWDER)), false, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 63, startPoint.y + 1, recipeDisplay.getInput().get(0), false, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 40, startPoint.y + 1, recipeDisplay.getInput().get(1), false, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 40, startPoint.y + 35, recipeDisplay.getOutput(0), false, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 63, startPoint.y + 42, recipeDisplay.getOutput(1), false, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 86, startPoint.y + 35, recipeDisplay.getOutput(2), false, true, containerGui, true));
+ widgets.add(new ItemSlotWidget(startPoint.x + 63, startPoint.y + 1, recipeDisplay.getInput().get(0), false, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.brewing.input"));
+ }
+ });
+ widgets.add(new ItemSlotWidget(startPoint.x + 40, startPoint.y + 1, recipeDisplay.getInput().get(1), false, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.brewing.reactant"));
+ }
+ });
+ widgets.add(new ItemSlotWidget(startPoint.x + 40, startPoint.y + 35, recipeDisplay.getOutput(0), false, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.brewing.result"));
+ }
+ });
+ widgets.add(new ItemSlotWidget(startPoint.x + 63, startPoint.y + 42, recipeDisplay.getOutput(1), false, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.brewing.result"));
+ }
+ });
+ widgets.add(new ItemSlotWidget(startPoint.x + 86, startPoint.y + 35, recipeDisplay.getOutput(2), false, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.brewing.result"));
+ }
+ });
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java
index 3bd10f472..63fbbd164 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java
@@ -57,7 +57,12 @@ public class DefaultSmeltingCategory implements IRecipeCategory<DefaultSmeltingD
}));
List<List<ItemStack>> input = recipeDisplay.getInput();
widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 1, input.get(0), true, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, containerGui, true));
+ widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.smelting.fuel"));
+ }
+ });
widgets.add(new ItemSlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplay.getOutput(), false, true, containerGui, true));
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java
index dda60ba4b..eedce2977 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java
@@ -57,7 +57,12 @@ public class DefaultSmokingCategory implements IRecipeCategory<DefaultSmokingDis
}));
List<List<ItemStack>> input = recipeDisplay.getInput();
widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 1, input.get(0), true, true, containerGui, true));
- widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, containerGui, true));
+ widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, containerGui, true) {
+ @Override
+ protected List<String> getExtraToolTips(ItemStack stack) {
+ return Arrays.asList(I18n.translate("category.rei.smelting.fuel"));
+ }
+ });
widgets.add(new ItemSlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplay.getOutput(), false, true, containerGui, true));
return widgets;
}