diff options
| author | shedaniel <daniel@shedaniel.me> | 2019-12-07 18:57:27 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2019-12-07 18:57:27 +0800 |
| commit | 7d145d3265d1de8daaccc13e8a50aa8930706790 (patch) | |
| tree | c0b028a5bd20a9b15b5334e3c39e5e6a4d50cc81 /src/main/java/me/shedaniel/rei/tests/plugin/REITestPlugin.java | |
| parent | a5ede4908ce20a76bec665e27fec20acdf716476 (diff) | |
| download | RoughlyEnoughItems-7d145d3265d1de8daaccc13e8a50aa8930706790.tar.gz RoughlyEnoughItems-7d145d3265d1de8daaccc13e8a50aa8930706790.tar.bz2 RoughlyEnoughItems-7d145d3265d1de8daaccc13e8a50aa8930706790.zip | |
3.2.15
Fix #199
Close #195
Close #138
Diffstat (limited to 'src/main/java/me/shedaniel/rei/tests/plugin/REITestPlugin.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/tests/plugin/REITestPlugin.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/tests/plugin/REITestPlugin.java b/src/main/java/me/shedaniel/rei/tests/plugin/REITestPlugin.java new file mode 100644 index 000000000..da6b91ab8 --- /dev/null +++ b/src/main/java/me/shedaniel/rei/tests/plugin/REITestPlugin.java @@ -0,0 +1,43 @@ +package me.shedaniel.rei.tests.plugin; + +import me.shedaniel.rei.api.EntryRegistry; +import me.shedaniel.rei.api.EntryStack; +import me.shedaniel.rei.api.plugins.REIPluginV0; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import org.apache.logging.log4j.LogManager; +import org.jetbrains.annotations.TestOnly; + +@TestOnly +@Deprecated +public class REITestPlugin implements REIPluginV0 { + + @Override + public void preRegister() { + LogManager.getLogger().error("REI Test Plugin is enabled! If you see this unintentionally, please report this!"); + } + + @Override + public Identifier getPluginIdentifier() { + return new Identifier("roughlyenoughitems:test_dev_plugin"); + } + + @Override + public void registerEntries(EntryRegistry entryRegistry) { + for (Item item : Registry.ITEM) { + entryRegistry.registerEntryAfter(null, EntryStack.create(item), false); + entryRegistry.registerEntryAfter(null, EntryStack.create(item), false); + entryRegistry.registerEntryAfter(null, EntryStack.create(item), false); + try { + for (ItemStack stack : entryRegistry.getAllStacksFromItem(item)) { + entryRegistry.registerEntryAfter(null, EntryStack.create(stack), false); + entryRegistry.registerEntryAfter(null, EntryStack.create(stack), false); + entryRegistry.registerEntryAfter(null, EntryStack.create(stack), false); + } + } catch (Exception e) { + } + } + } +} |
