aboutsummaryrefslogtreecommitdiff
path: root/default-plugin/src/main/java/me
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-11-18 19:09:36 +0800
committershedaniel <daniel@shedaniel.me>2021-11-18 19:09:36 +0800
commitbbf66fdbd167b326839bf37091e71042ebbaef75 (patch)
treea0a60ff9bdcd019b49ac5cf35ec6c0df79053aef /default-plugin/src/main/java/me
parentbce9ba7f161bd47125b8f1cf0125d5672ce1d8e3 (diff)
parentce27d89d05738ea4cba2ab8ed6c52f093e988275 (diff)
downloadRoughlyEnoughItems-bbf66fdbd167b326839bf37091e71042ebbaef75.tar.gz
RoughlyEnoughItems-bbf66fdbd167b326839bf37091e71042ebbaef75.tar.bz2
RoughlyEnoughItems-bbf66fdbd167b326839bf37091e71042ebbaef75.zip
Merge remote-tracking branch 'origin/6.x-1.17' into 7.x-1.18
Diffstat (limited to 'default-plugin/src/main/java/me')
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/DefaultClientPlugin.java33
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidationScrapingCategory.java77
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidizingCategory.java77
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxScrapingCategory.java77
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxingCategory.java77
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/BuiltinPlugin.java9
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/DefaultPlugin.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidationScrapingDisplay.java62
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidizingDisplay.java62
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultWaxScrapingDisplay.java62
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultWaxingDisplay.java62
11 files changed, 600 insertions, 2 deletions
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/DefaultClientPlugin.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/DefaultClientPlugin.java
index e469d078c..779b21e0b 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/DefaultClientPlugin.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/DefaultClientPlugin.java
@@ -95,6 +95,7 @@ import net.minecraft.world.level.GameType;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.ComposterBlock;
+import net.minecraft.world.level.block.WeatheringCopper;
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
@@ -146,7 +147,8 @@ public class DefaultClientPlugin implements REIClientPlugin, BuiltinClientPlugin
new DefaultCraftingCategory(),
new DefaultCookingCategory(SMELTING, EntryStacks.of(Items.FURNACE), "category.rei.smelting"),
new DefaultCookingCategory(SMOKING, EntryStacks.of(Items.SMOKER), "category.rei.smoking"),
- new DefaultCookingCategory(BLASTING, EntryStacks.of(Items.BLAST_FURNACE), "category.rei.blasting"), new DefaultCampfireCategory(),
+ new DefaultCookingCategory(BLASTING, EntryStacks.of(Items.BLAST_FURNACE), "category.rei.blasting"),
+ new DefaultCampfireCategory(),
new DefaultStoneCuttingCategory(),
new DefaultFuelCategory(),
new DefaultBrewingCategory(),
@@ -158,6 +160,10 @@ public class DefaultClientPlugin implements REIClientPlugin, BuiltinClientPlugin
new DefaultBeaconPaymentCategory(),
new DefaultTillingCategory(),
new DefaultPathingCategory(),
+ new DefaultWaxingCategory(),
+ new DefaultWaxScrapingCategory(),
+ new DefaultOxidizingCategory(),
+ new DefaultOxidationScrapingCategory(),
new DefaultInformationCategory()
);
@@ -169,6 +175,10 @@ public class DefaultClientPlugin implements REIClientPlugin, BuiltinClientPlugin
registry.removePlusButton(STRIPPING);
registry.removePlusButton(TILLING);
registry.removePlusButton(PATHING);
+ registry.removePlusButton(WAXING);
+ registry.removePlusButton(WAX_SCRAPING);
+ registry.removePlusButton(OXIDIZING);
+ registry.removePlusButton(OXIDATION_SCRAPING);
registry.addWorkstations(CRAFTING, EntryStacks.of(Items.CRAFTING_TABLE));
registry.addWorkstations(SMELTING, EntryStacks.of(Items.FURNACE));
@@ -183,11 +193,14 @@ public class DefaultClientPlugin implements REIClientPlugin, BuiltinClientPlugin
registry.addWorkstations(SMITHING, EntryStacks.of(Items.SMITHING_TABLE));
registry.addWorkstations(BEACON_BASE, EntryStacks.of(Items.BEACON));
registry.addWorkstations(BEACON_PAYMENT, EntryStacks.of(Items.BEACON));
+ registry.addWorkstations(WAXING, EntryStacks.of(Items.HONEYCOMB));
Set<Item> axes = Sets.newHashSet(), hoes = Sets.newHashSet(), shovels = Sets.newHashSet();
EntryRegistry.getInstance().getEntryStacks().filter(stack -> stack.getValueType() == ItemStack.class).map(stack -> ((ItemStack) stack.getValue()).getItem()).forEach(item -> {
if (item instanceof AxeItem && axes.add(item)) {
registry.addWorkstations(STRIPPING, EntryStacks.of(item));
+ registry.addWorkstations(WAX_SCRAPING, EntryStacks.of(item));
+ registry.addWorkstations(OXIDATION_SCRAPING, EntryStacks.of(item));
}
if (item instanceof HoeItem && hoes.add(item)) {
registry.addWorkstations(TILLING, EntryStacks.of(item));
@@ -200,7 +213,11 @@ public class DefaultClientPlugin implements REIClientPlugin, BuiltinClientPlugin
Tag<Item> axesTag = itemTagCollection.getTag(new ResourceLocation("c", "axes"));
if (axesTag != null) {
for (Item item : axesTag.getValues()) {
- if (axes.add(item)) registry.addWorkstations(STRIPPING, EntryStacks.of(item));
+ if (axes.add(item)) {
+ registry.addWorkstations(STRIPPING, EntryStacks.of(item));
+ registry.addWorkstations(WAX_SCRAPING, EntryStacks.of(item));
+ registry.addWorkstations(OXIDATION_SCRAPING, EntryStacks.of(item));
+ }
}
}
Tag<Item> hoesTag = itemTagCollection.getTag(new ResourceLocation("c", "hoes"));
@@ -268,6 +285,18 @@ public class DefaultClientPlugin implements REIClientPlugin, BuiltinClientPlugin
});
registry.add(new DefaultBeaconBaseDisplay(CollectionUtils.map(Lists.newArrayList(BlockTags.BEACON_BASE_BLOCKS.getValues()), ItemStack::new)));
registry.add(new DefaultBeaconPaymentDisplay(CollectionUtils.map(Lists.newArrayList(ItemTags.BEACON_PAYMENT_ITEMS.getValues()), ItemStack::new)));
+ HoneycombItem.WAXABLES.get().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getKey(b.getKey()))).forEach(set -> {
+ registry.add(new DefaultWaxingDisplay(EntryStacks.of(set.getKey()), EntryStacks.of(set.getValue())));
+ });
+ HoneycombItem.WAX_OFF_BY_BLOCK.get().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getKey(b.getKey()))).forEach(set -> {
+ registry.add(new DefaultWaxScrapingDisplay(EntryStacks.of(set.getKey()), EntryStacks.of(set.getValue())));
+ });
+ WeatheringCopper.NEXT_BY_BLOCK.get().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getKey(b.getKey()))).forEach(set -> {
+ registry.add(new DefaultOxidizingDisplay(EntryStacks.of(set.getKey()), EntryStacks.of(set.getValue())));
+ });
+ WeatheringCopper.PREVIOUS_BY_BLOCK.get().entrySet().stream().sorted(Comparator.comparing(b -> Registry.BLOCK.getKey(b.getKey()))).forEach(set -> {
+ registry.add(new DefaultOxidationScrapingDisplay(EntryStacks.of(set.getKey()), EntryStacks.of(set.getValue())));
+ });
if (Platform.isFabric()) {
Set<Potion> potions = Sets.newLinkedHashSet();
for (Ingredient container : PotionBrewing.ALLOWED_CONTAINERS) {
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidationScrapingCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidationScrapingCategory.java
new file mode 100644
index 000000000..3be29e857
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidationScrapingCategory.java
@@ -0,0 +1,77 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.client.categories;
+
+import com.google.common.collect.Lists;
+import me.shedaniel.math.Point;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.client.gui.Renderer;
+import me.shedaniel.rei.api.client.gui.widgets.Widget;
+import me.shedaniel.rei.api.client.gui.widgets.Widgets;
+import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
+import me.shedaniel.rei.api.common.category.CategoryIdentifier;
+import me.shedaniel.rei.api.common.util.EntryStacks;
+import me.shedaniel.rei.plugin.common.BuiltinPlugin;
+import me.shedaniel.rei.plugin.common.displays.DefaultOxidationScrapingDisplay;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.TranslatableComponent;
+import net.minecraft.world.item.Items;
+import org.jetbrains.annotations.ApiStatus;
+
+import java.util.List;
+
+@ApiStatus.Experimental
+public class DefaultOxidationScrapingCategory implements DisplayCategory<DefaultOxidationScrapingDisplay> {
+ @Override
+ public CategoryIdentifier<? extends DefaultOxidationScrapingDisplay> getCategoryIdentifier() {
+ return BuiltinPlugin.OXIDATION_SCRAPING;
+ }
+
+ @Override
+ public Renderer getIcon() {
+ return EntryStacks.of(Items.STONE_AXE);
+ }
+
+ @Override
+ public Component getTitle() {
+ return new TranslatableComponent("category.rei.oxidation_scraping");
+ }
+
+ @Override
+ public List<Widget> setupDisplay(DefaultOxidationScrapingDisplay display, Rectangle bounds) {
+ Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 13);
+ List<Widget> widgets = Lists.newArrayList();
+ widgets.add(Widgets.createRecipeBase(bounds));
+ widgets.add(Widgets.createArrow(new Point(startPoint.x + 27, startPoint.y + 4)));
+ widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 5)));
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 4, startPoint.y + 5)).entries(display.getIn()).markInput());
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 5)).entries(display.getOut()).disableBackground().markInput());
+ return widgets;
+ }
+
+ @Override
+ public int getDisplayHeight() {
+ return 36;
+ }
+}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidizingCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidizingCategory.java
new file mode 100644
index 000000000..89cdde113
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultOxidizingCategory.java
@@ -0,0 +1,77 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.client.categories;
+
+import com.google.common.collect.Lists;
+import me.shedaniel.math.Point;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.client.gui.Renderer;
+import me.shedaniel.rei.api.client.gui.widgets.Widget;
+import me.shedaniel.rei.api.client.gui.widgets.Widgets;
+import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
+import me.shedaniel.rei.api.common.category.CategoryIdentifier;
+import me.shedaniel.rei.api.common.util.EntryStacks;
+import me.shedaniel.rei.plugin.common.BuiltinPlugin;
+import me.shedaniel.rei.plugin.common.displays.DefaultOxidizingDisplay;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.TranslatableComponent;
+import net.minecraft.world.item.Items;
+import org.jetbrains.annotations.ApiStatus;
+
+import java.util.List;
+
+@ApiStatus.Experimental
+public class DefaultOxidizingCategory implements DisplayCategory<DefaultOxidizingDisplay> {
+ @Override
+ public CategoryIdentifier<? extends DefaultOxidizingDisplay> getCategoryIdentifier() {
+ return BuiltinPlugin.OXIDIZING;
+ }
+
+ @Override
+ public Renderer getIcon() {
+ return EntryStacks.of(Items.CLOCK);
+ }
+
+ @Override
+ public Component getTitle() {
+ return new TranslatableComponent("category.rei.oxidizing");
+ }
+
+ @Override
+ public List<Widget> setupDisplay(DefaultOxidizingDisplay display, Rectangle bounds) {
+ Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 13);
+ List<Widget> widgets = Lists.newArrayList();
+ widgets.add(Widgets.createRecipeBase(bounds));
+ widgets.add(Widgets.createArrow(new Point(startPoint.x + 27, startPoint.y + 4)));
+ widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 5)));
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 4, startPoint.y + 5)).entries(display.getIn()).markInput());
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 5)).entries(display.getOut()).disableBackground().markInput());
+ return widgets;
+ }
+
+ @Override
+ public int getDisplayHeight() {
+ return 36;
+ }
+}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxScrapingCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxScrapingCategory.java
new file mode 100644
index 000000000..90fa6020b
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxScrapingCategory.java
@@ -0,0 +1,77 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.client.categories;
+
+import com.google.common.collect.Lists;
+import me.shedaniel.math.Point;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.client.gui.Renderer;
+import me.shedaniel.rei.api.client.gui.widgets.Widget;
+import me.shedaniel.rei.api.client.gui.widgets.Widgets;
+import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
+import me.shedaniel.rei.api.common.category.CategoryIdentifier;
+import me.shedaniel.rei.api.common.util.EntryStacks;
+import me.shedaniel.rei.plugin.common.BuiltinPlugin;
+import me.shedaniel.rei.plugin.common.displays.DefaultWaxScrapingDisplay;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.TranslatableComponent;
+import net.minecraft.world.item.Items;
+import org.jetbrains.annotations.ApiStatus;
+
+import java.util.List;
+
+@ApiStatus.Experimental
+public class DefaultWaxScrapingCategory implements DisplayCategory<DefaultWaxScrapingDisplay> {
+ @Override
+ public CategoryIdentifier<? extends DefaultWaxScrapingDisplay> getCategoryIdentifier() {
+ return BuiltinPlugin.WAX_SCRAPING;
+ }
+
+ @Override
+ public Renderer getIcon() {
+ return EntryStacks.of(Items.GOLDEN_AXE);
+ }
+
+ @Override
+ public Component getTitle() {
+ return new TranslatableComponent("category.rei.wax_scraping");
+ }
+
+ @Override
+ public List<Widget> setupDisplay(DefaultWaxScrapingDisplay display, Rectangle bounds) {
+ Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 13);
+ List<Widget> widgets = Lists.newArrayList();
+ widgets.add(Widgets.createRecipeBase(bounds));
+ widgets.add(Widgets.createArrow(new Point(startPoint.x + 27, startPoint.y + 4)));
+ widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 5)));
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 4, startPoint.y + 5)).entries(display.getIn()).markInput());
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 5)).entries(display.getOut()).disableBackground().markInput());
+ return widgets;
+ }
+
+ @Override
+ public int getDisplayHeight() {
+ return 36;
+ }
+}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxingCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxingCategory.java
new file mode 100644
index 000000000..a64105a45
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultWaxingCategory.java
@@ -0,0 +1,77 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.client.categories;
+
+import com.google.common.collect.Lists;
+import me.shedaniel.math.Point;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.client.gui.Renderer;
+import me.shedaniel.rei.api.client.gui.widgets.Widget;
+import me.shedaniel.rei.api.client.gui.widgets.Widgets;
+import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
+import me.shedaniel.rei.api.common.category.CategoryIdentifier;
+import me.shedaniel.rei.api.common.util.EntryStacks;
+import me.shedaniel.rei.plugin.common.BuiltinPlugin;
+import me.shedaniel.rei.plugin.common.displays.DefaultWaxingDisplay;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.TranslatableComponent;
+import net.minecraft.world.item.Items;
+import org.jetbrains.annotations.ApiStatus;
+
+import java.util.List;
+
+@ApiStatus.Experimental
+public class DefaultWaxingCategory implements DisplayCategory<DefaultWaxingDisplay> {
+ @Override
+ public CategoryIdentifier<? extends DefaultWaxingDisplay> getCategoryIdentifier() {
+ return BuiltinPlugin.WAXING;
+ }
+
+ @Override
+ public Renderer getIcon() {
+ return EntryStacks.of(Items.HONEYCOMB);
+ }
+
+ @Override
+ public Component getTitle() {
+ return new TranslatableComponent("category.rei.waxing");
+ }
+
+ @Override
+ public List<Widget> setupDisplay(DefaultWaxingDisplay display, Rectangle bounds) {
+ Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 13);
+ List<Widget> widgets = Lists.newArrayList();
+ widgets.add(Widgets.createRecipeBase(bounds));
+ widgets.add(Widgets.createArrow(new Point(startPoint.x + 27, startPoint.y + 4)));
+ widgets.add(Widgets.createResultSlotBackground(new Point(startPoint.x + 61, startPoint.y + 5)));
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 4, startPoint.y + 5)).entries(display.getIn()).markInput());
+ widgets.add(Widgets.createSlot(new Point(startPoint.x + 61, startPoint.y + 5)).entries(display.getOut()).disableBackground().markInput());
+ return widgets;
+ }
+
+ @Override
+ public int getDisplayHeight() {
+ return 36;
+ }
+}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/BuiltinPlugin.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/BuiltinPlugin.java
index b0dfa5be7..1a26117c0 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/BuiltinPlugin.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/BuiltinPlugin.java
@@ -33,6 +33,7 @@ import me.shedaniel.rei.plugin.common.displays.cooking.DefaultBlastingDisplay;
import me.shedaniel.rei.plugin.common.displays.cooking.DefaultSmeltingDisplay;
import me.shedaniel.rei.plugin.common.displays.cooking.DefaultSmokingDisplay;
import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCraftingDisplay;
+import org.jetbrains.annotations.ApiStatus;
public interface BuiltinPlugin {
CategoryIdentifier<DefaultCraftingDisplay<?>> CRAFTING = CategoryIdentifier.of("minecraft", "plugins/crafting");
@@ -51,5 +52,13 @@ public interface BuiltinPlugin {
CategoryIdentifier<DefaultBeaconPaymentDisplay> BEACON_PAYMENT = CategoryIdentifier.of("minecraft", "plugins/beacon_payment");
CategoryIdentifier<DefaultTillingDisplay> TILLING = CategoryIdentifier.of("minecraft", "plugins/tilling");
CategoryIdentifier<DefaultPathingDisplay> PATHING = CategoryIdentifier.of("minecraft", "plugins/pathing");
+ @ApiStatus.Experimental
+ CategoryIdentifier<DefaultWaxingDisplay> WAXING = CategoryIdentifier.of("minecraft", "plugins/waxing");
+ @ApiStatus.Experimental
+ CategoryIdentifier<DefaultWaxScrapingDisplay> WAX_SCRAPING = CategoryIdentifier.of("minecraft", "plugins/wax_scraping");
+ @ApiStatus.Experimental
+ CategoryIdentifier<DefaultOxidizingDisplay> OXIDIZING = CategoryIdentifier.of("minecraft", "plugins/oxidizing");
+ @ApiStatus.Experimental
+ CategoryIdentifier<DefaultOxidationScrapingDisplay> OXIDATION_SCRAPING = CategoryIdentifier.of("minecraft", "plugins/oxidation_scraping");
CategoryIdentifier<DefaultInformationDisplay> INFO = CategoryIdentifier.of("roughlyenoughitems", "plugins/information");
}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/DefaultPlugin.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/DefaultPlugin.java
index b9eb3b585..39586f095 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/DefaultPlugin.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/DefaultPlugin.java
@@ -123,6 +123,10 @@ public class DefaultPlugin implements BuiltinPlugin, REIServerPlugin {
registry.register(BEACON_PAYMENT, DefaultBeaconDisplay.serializer(DefaultBeaconPaymentDisplay::new));
registry.register(TILLING, DefaultTillingDisplay.serializer());
registry.register(PATHING, DefaultPathingDisplay.serializer());
+ registry.register(WAXING, DefaultWaxingDisplay.serializer());
+ registry.register(WAX_SCRAPING, DefaultWaxScrapingDisplay.serializer());
+ registry.register(OXIDIZING, DefaultOxidizingDisplay.serializer());
+ registry.register(OXIDATION_SCRAPING, DefaultOxidationScrapingDisplay.serializer());
registry.register(INFO, DefaultInformationDisplay.serializer());
}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidationScrapingDisplay.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidationScrapingDisplay.java
new file mode 100644
index 000000000..e74103ea6
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidationScrapingDisplay.java
@@ -0,0 +1,62 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.common.displays;
+
+import me.shedaniel.rei.api.common.category.CategoryIdentifier;
+import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
+import me.shedaniel.rei.api.common.entry.EntryIngredient;
+import me.shedaniel.rei.api.common.entry.EntryStack;
+import me.shedaniel.rei.plugin.common.BuiltinPlugin;
+import org.jetbrains.annotations.ApiStatus;
+
+import java.util.Collections;
+import java.util.List;
+
+@ApiStatus.Experimental
+public class DefaultOxidationScrapingDisplay extends BasicDisplay {
+ public DefaultOxidationScrapingDisplay(EntryStack<?> in, EntryStack<?> out) {
+ this(Collections.singletonList(EntryIngredient.of(in)), Collections.singletonList(EntryIngredient.of(out)));
+ }
+
+ public DefaultOxidationScrapingDisplay(List<EntryIngredient> inputs, List<EntryIngredient> outputs) {
+ super(inputs, outputs);
+ }
+
+ public final EntryIngredient getIn() {
+ return getInputEntries().get(0);
+ }
+
+ public final EntryIngredient getOut() {
+ return getOutputEntries().get(0);
+ }
+
+ @Override
+ public CategoryIdentifier<?> getCategoryIdentifier() {
+ return BuiltinPlugin.OXIDATION_SCRAPING;
+ }
+
+ public static Serializer<DefaultOxidationScrapingDisplay> serializer() {
+ return Serializer.ofSimpleRecipeLess(DefaultOxidationScrapingDisplay::new);
+ }
+}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidizingDisplay.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidizingDisplay.java
new file mode 100644
index 000000000..118270074
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultOxidizingDisplay.java
@@ -0,0 +1,62 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.plugin.common.displays;
+
+import me.shedaniel.rei.api.common.category.CategoryIdentifier;
+import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
+import me.shedaniel.rei.api.common.entry.EntryIngredient;
+import me.shedaniel.rei.api.common.entry.EntryStack;
+import me.shedaniel.rei.plugin.common.BuiltinPlugin;
+import org.jetbrains.annotations.ApiStatus;
+
+import java.util.Collections;
+import java.util.List;
+
+@ApiStatus.Experimental
+public class DefaultOxidizingDisplay extends BasicDisplay {
+ public DefaultOxidizingDisplay(EntryStack<?> in, EntryStack<?> out) {
+ this(Collections.singletonList(EntryIngredient.of(in)), Collections.singletonList(EntryIngredient.of(out)));
+ }
+
+ public DefaultOxidizingDisplay(List<EntryIngredient> inputs, List<EntryIngredient> outputs) {
+ super(inputs, outputs);
+ }
+
+ public final EntryIngredient getIn() {
+ return getInputEntries().get(0);
+ }
+
+ public final EntryIngredient getOut() {
+ return getOutputEntries().get(0);
+ }
+
+ @Override
+ public CategoryIdentifier<?> getCategoryIdentifier() {
+ return BuiltinPlugin.OXIDIZING;
+ }
+
+ public static Serializer<DefaultOxidizingDisplay> serializer() {
+ return Serializer.ofSimpleRecipeLess(DefaultOxidizingDisplay::new);
+ }
+}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultWaxScrapingDisplay.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultWaxScrapingDisplay.java
new file mode 100644
index 000000000..85e3edf43
--- /dev/null
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/DefaultWaxScrapingDisplay.java
@@ -0,0 +1,62 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERW