aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/plugin
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-06-26 20:51:01 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-06-26 20:51:01 +0800
commit431cfdf77ba306f5e147c7b2d70e15c4b3c729a6 (patch)
tree4528e5482bc1360e02df0e766c254477288ecdbf /src/main/java/me/shedaniel/rei/plugin
parent281a472337c9510f2c13d5eef61a3889b1794ea0 (diff)
downloadRoughlyEnoughItems-431cfdf77ba306f5e147c7b2d70e15c4b3c729a6.tar.gz
RoughlyEnoughItems-431cfdf77ba306f5e147c7b2d70e15c4b3c729a6.tar.bz2
RoughlyEnoughItems-431cfdf77ba306f5e147c7b2d70e15c4b3c729a6.zip
Update mappings to 1.14.3
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin')
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java5
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultRecipeBookExclusionZones.java1
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingDisplay.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java12
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingDisplay.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java10
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingDisplay.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingDisplay.java2
12 files changed, 25 insertions, 27 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java b/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
index 7bd2be0fa..a1b0316a0 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
@@ -46,7 +46,6 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.util.registry.Registry;
import java.awt.*;
-import java.util.List;
import java.util.*;
public class DefaultPlugin implements REIPluginEntry {
@@ -90,7 +89,7 @@ public class DefaultPlugin implements REIPluginEntry {
@Override
public void registerItems(ItemRegistry itemRegistry) {
Registry.ITEM.stream().forEach(item -> {
- itemRegistry.registerItemStack(item.getDefaultStack());
+ itemRegistry.registerItemStack(item.getStackForRender());
try {
itemRegistry.registerItemStack(itemRegistry.getAllStacksFromItem(item));
} catch (Exception e) {
@@ -130,7 +129,7 @@ public class DefaultPlugin implements REIPluginEntry {
recipeHelper.registerRecipes(CAMPFIRE, CampfireCookingRecipe.class, DefaultCampfireDisplay::new);
recipeHelper.registerRecipes(STONE_CUTTING, StonecuttingRecipe.class, DefaultStoneCuttingDisplay::new);
BREWING_DISPLAYS.stream().forEachOrdered(display -> recipeHelper.registerDisplay(BREWING, display));
- List<ItemStack> arrowStack = Collections.singletonList(Items.ARROW.getDefaultStack());
+ List<ItemStack> arrowStack = Collections.singletonList(Items.ARROW.getStackForRender());
RoughlyEnoughItemsCore.getItemRegisterer().getItemList().stream().filter(stack -> stack.getItem().equals(Items.LINGERING_POTION)).forEach(stack -> {
List<List<ItemStack>> input = new ArrayList<>();
for(int i = 0; i < 4; i++)
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultRecipeBookExclusionZones.java b/src/main/java/me/shedaniel/rei/plugin/DefaultRecipeBookExclusionZones.java
index 2e1a8e72d..3b2df2e44 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultRecipeBookExclusionZones.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultRecipeBookExclusionZones.java
@@ -6,7 +6,6 @@
package me.shedaniel.rei.plugin;
import com.google.common.collect.Lists;
-import me.shedaniel.rei.api.BaseBoundsHandler;
import me.shedaniel.rei.client.ScreenHelper;
import me.shedaniel.rei.listeners.ContainerScreenHooks;
import net.minecraft.client.MinecraftClient;
diff --git a/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingCategory.java b/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingCategory.java
index 5fb37e6fa..4f3b586e5 100644
--- a/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingCategory.java
@@ -13,12 +13,12 @@ import me.shedaniel.rei.gui.widget.RecipeBaseWidget;
import me.shedaniel.rei.gui.widget.SlotWidget;
import me.shedaniel.rei.gui.widget.Widget;
import me.shedaniel.rei.plugin.DefaultPlugin;
-import net.minecraft.ChatFormat;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
@@ -74,7 +74,7 @@ public class DefaultBlastingCategory implements RecipeCategory<DefaultBlastingDi
widgets.add(new SlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel"));
}
});
widgets.add(new SlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplay.getOutput(), false, true, true));
diff --git a/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingDisplay.java
index 5c002b268..cda9d3c6f 100644
--- a/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingDisplay.java
+++ b/src/main/java/me/shedaniel/rei/plugin/blasting/DefaultBlastingDisplay.java
@@ -29,7 +29,7 @@ public class DefaultBlastingDisplay implements RecipeDisplay {
public DefaultBlastingDisplay(BlastingRecipe recipe) {
this.display = recipe;
this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList());
- this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList()));
+ this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getStackForRender).collect(Collectors.toList()));
this.output = Collections.singletonList(recipe.getOutput());
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
index 9d77ff2b0..bb291f9bf 100644
--- a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
@@ -12,13 +12,13 @@ import me.shedaniel.rei.gui.widget.RecipeBaseWidget;
import me.shedaniel.rei.gui.widget.SlotWidget;
import me.shedaniel.rei.gui.widget.Widget;
import me.shedaniel.rei.plugin.DefaultPlugin;
-import net.minecraft.ChatFormat;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
+import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
@@ -66,31 +66,31 @@ public class DefaultBrewingCategory implements RecipeCategory<DefaultBrewingDisp
widgets.add(new SlotWidget(startPoint.x + 63, startPoint.y + 1, recipeDisplay.getInput().get(0), false, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.input"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.input"));
}
});
widgets.add(new SlotWidget(startPoint.x + 40, startPoint.y + 1, recipeDisplay.getInput().get(1), false, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.reactant"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.reactant"));
}
});
widgets.add(new SlotWidget(startPoint.x + 40, startPoint.y + 35, recipeDisplay.getOutput(0), false, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.result"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.result"));
}
});
widgets.add(new SlotWidget(startPoint.x + 63, startPoint.y + 42, recipeDisplay.getOutput(1), false, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.result"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.result"));
}
});
widgets.add(new SlotWidget(startPoint.x + 86, startPoint.y + 35, recipeDisplay.getOutput(2), false, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.result"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.result"));
}
});
return widgets;
diff --git a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java
index a71ac5063..6d9c53bcc 100644
--- a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java
@@ -78,7 +78,7 @@ public class DefaultCompostingCategory implements RecipeCategory<DefaultComposti
int i = 0;
for(int y = 0; y < 6; y++)
for(int x = 0; x < 8; x++) {
- widgets.add(new SlotWidget((int) bounds.getCenterX() - 72 + x * 18, bounds.y + y * 18, stacks.size() > i ? Arrays.asList(stacks.get(i).asItem().getDefaultStack()) : Lists.newArrayList(), true, true, true) {
+ widgets.add(new SlotWidget((int) bounds.getCenterX() - 72 + x * 18, bounds.y + y * 18, stacks.size() > i ? Arrays.asList(stacks.get(i).asItem().getStackForRender()) : Lists.newArrayList(), true, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
final List<String>[] thing = new List[]{null};
diff --git a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingDisplay.java
index 7ef4707b8..1bb3c3d1a 100644
--- a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingDisplay.java
+++ b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingDisplay.java
@@ -38,7 +38,7 @@ public class DefaultCompostingDisplay implements RecipeDisplay {
public List<List<ItemStack>> getInput() {
List<List<ItemStack>> lists = new ArrayList<>();
allItems.stream().forEachOrdered(itemProvider -> {
- lists.add(Arrays.asList(itemProvider.asItem().getDefaultStack()));
+ lists.add(Arrays.asList(itemProvider.asItem().getStackForRender()));
});
return lists;
}
@@ -59,7 +59,7 @@ public class DefaultCompostingDisplay implements RecipeDisplay {
@Override
public List<List<ItemStack>> getRequiredItems() {
- return Arrays.asList(new LinkedList<>(allItems.stream().map(ItemConvertible::asItem).map(Item::getDefaultStack).collect(Collectors.toList())));
+ return Arrays.asList(new LinkedList<>(allItems.stream().map(ItemConvertible::asItem).map(Item::getStackForRender).collect(Collectors.toList())));
}
public List<ItemConvertible> getItemsByOrder() {
diff --git a/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java b/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java
index f63faf35e..4a34f83dd 100644
--- a/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java
@@ -13,12 +13,12 @@ import me.shedaniel.rei.gui.widget.RecipeBaseWidget;
import me.shedaniel.rei.gui.widget.SlotWidget;
import me.shedaniel.rei.gui.widget.Widget;
import me.shedaniel.rei.plugin.DefaultPlugin;
-import net.minecraft.ChatFormat;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import java.awt.*;
@@ -73,11 +73,11 @@ public class DefaultCraftingCategory implements RecipeCategory<DefaultCraftingDi
widgets.add(new SlotWidget(startPoint.x + 95, startPoint.y + 19, recipeDisplaySupplier.get().getOutput(), false, true, true) {
@Override
protected String getItemCountOverlay(ItemStack currentStack) {
- if (currentStack.getAmount() == 1)
+ if (currentStack.getCount() == 1)
return "";
- if (currentStack.getAmount() < 1)
- return ChatFormat.RED.toString() + currentStack.getAmount();
- return currentStack.getAmount() + "";
+ if (currentStack.getCount() < 1)
+ return Formatting.RED.toString() + currentStack.getCount();
+ return currentStack.getCount() + "";
}
});
return widgets;
diff --git a/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingCategory.java b/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingCategory.java
index a5c86ceea..dcecf0418 100644
--- a/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingCategory.java
@@ -13,12 +13,12 @@ import me.shedaniel.rei.gui.widget.RecipeBaseWidget;
import me.shedaniel.rei.gui.widget.SlotWidget;
import me.shedaniel.rei.gui.widget.Widget;
import me.shedaniel.rei.plugin.DefaultPlugin;
-import net.minecraft.ChatFormat;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
@@ -73,7 +73,7 @@ public class DefaultSmeltingCategory implements RecipeCategory<DefaultSmeltingDi
widgets.add(new SlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplaySupplier.get().getFuel(), true, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel"));
}
});
widgets.add(new SlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplaySupplier.get().getOutput(), false, true, true));
diff --git a/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingDisplay.java
index 80742838e..cfe5515d4 100644
--- a/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingDisplay.java
+++ b/src/main/java/me/shedaniel/rei/plugin/smelting/DefaultSmeltingDisplay.java
@@ -29,7 +29,7 @@ public class DefaultSmeltingDisplay implements RecipeDisplay {
public DefaultSmeltingDisplay(SmeltingRecipe recipe) {
this.display = recipe;
this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList());
- this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList()));
+ this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getStackForRender).collect(Collectors.toList()));
this.output = Collections.singletonList(recipe.getOutput());
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingCategory.java b/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingCategory.java
index 609af3fda..cf02d0a61 100644
--- a/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingCategory.java
@@ -13,12 +13,12 @@ import me.shedaniel.rei.gui.widget.RecipeBaseWidget;
import me.shedaniel.rei.gui.widget.SlotWidget;
import me.shedaniel.rei.gui.widget.Widget;
import me.shedaniel.rei.plugin.DefaultPlugin;
-import net.minecraft.ChatFormat;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
@@ -73,7 +73,7 @@ public class DefaultSmokingCategory implements RecipeCategory<DefaultSmokingDisp
widgets.add(new SlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplaySupplier.get().getFuel(), true, true, true) {
@Override
protected List<String> getExtraToolTips(ItemStack stack) {
- return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel"));
+ return Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel"));
}
});
widgets.add(new SlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplaySupplier.get().getOutput(), false, true, true));
diff --git a/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingDisplay.java
index 0e925025c..7c992751f 100644
--- a/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingDisplay.java
+++ b/src/main/java/me/shedaniel/rei/plugin/smoking/DefaultSmokingDisplay.java
@@ -29,7 +29,7 @@ public class DefaultSmokingDisplay implements RecipeDisplay {
public DefaultSmokingDisplay(SmokingRecipe recipe) {
this.display = recipe;
this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList());
- this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList()));
+ this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getStackForRender).collect(Collectors.toList()));
this.output = Collections.singletonList(recipe.getOutput());
}