├── .idea
├── .name
├── highlighting.xml
├── scopes
│ ├── lib.xml
│ ├── main.xml
│ └── scope_settings.xml
├── vcs.xml
├── encodings.xml
├── modules.xml
├── inspectionProfiles
│ ├── profiles_settings.xml
│ └── Project_Default.xml
├── copyright
│ ├── profiles_settings.xml
│ ├── MMPL__lib_.xml
│ └── MMPL__neiaddons_.xml
├── scala_settings.xml
├── scala_compiler.xml
├── gradle.xml
├── compiler.xml
├── misc.xml
├── codeStyleSettings.xml
└── uiDesigner.xml
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── resources
├── assets
│ └── neiaddons
│ │ ├── textures
│ │ ├── gui
│ │ │ ├── breeding.png
│ │ │ ├── breeding.psd
│ │ │ ├── exnihilo.png
│ │ │ ├── exnihilo.psd
│ │ │ ├── isolator.png
│ │ │ ├── isolator.psd
│ │ │ ├── products.png
│ │ │ └── products.psd
│ │ └── items
│ │ │ └── invalid.png
│ │ └── lang
│ │ ├── ru_RU.lang
│ │ ├── it_IT.lang
│ │ ├── zh_CN.lang
│ │ ├── cs_CZ.lang
│ │ ├── en_US.lang
│ │ ├── fr_CA.lang
│ │ └── fr_FR.lang
├── neiaddons_at.cfg
└── mcmod.info
├── .gitignore
├── readme.md
├── src
└── net
│ └── bdew
│ └── neiaddons
│ ├── appeng
│ ├── AppEngHelper.java
│ ├── SlotHelper.java
│ ├── SetFakeSlotCommandHandler.java
│ ├── AddonAppeng.java
│ └── AppEngGuiHandler.java
│ ├── api
│ ├── SubPacketHandler.java
│ └── NEIAddon.java
│ ├── developer
│ ├── DeveloperHelper.java
│ ├── AddonDeveloper.java
│ └── DeveloperGuiHandler.java
│ ├── forestry
│ ├── bees
│ │ ├── BeeBreedingHandler.java
│ │ ├── BeeProduceHandler.java
│ │ └── BeeHelper.java
│ ├── trees
│ │ ├── TreeBreedingHandler.java
│ │ ├── TreeProduceHandler.java
│ │ └── TreeHelper.java
│ ├── butterflies
│ │ ├── ButterflyBreedingHandler.java
│ │ └── ButterflyHelper.java
│ ├── MutationDumper.scala
│ ├── AddonForestry.java
│ ├── GeneticsUtils.java
│ ├── BaseProduceRecipeHandler.java
│ └── BaseBreedingRecipeHandler.java
│ ├── utils
│ ├── PositionedStackWithTip.java
│ ├── ItemStackWithTip.java
│ ├── LabeledPositionedStack.java
│ ├── TypedField.java
│ ├── ModItemFilter.java
│ ├── TypedMethod.java
│ ├── SetRecipeCommandHandler.java
│ └── CustomOverlayHandler.java
│ ├── botany
│ ├── flowers
│ │ ├── FlowerBreedingHandler.java
│ │ └── FlowerHelper.java
│ └── AddonBotany.java
│ ├── crafting
│ ├── AddonCraftingTablesClient.java
│ └── AddonCraftingTables.java
│ ├── network
│ ├── PacketHelper.java
│ ├── NBTMessageCodec.java
│ ├── ClientHandler.java
│ ├── NetChannel.java
│ └── ServerHandler.java
│ ├── NEIAddonsConfig.java
│ ├── exnihilo
│ ├── WailaHandler.java
│ ├── AddonExnihilo.java
│ └── waila
│ │ ├── BeeTrapHandler.java
│ │ ├── BarrelHandler.java
│ │ └── CrucibleHandler.java
│ ├── BaseAddon.java
│ ├── NEIAddons.java
│ └── Utils.java
├── gradlew.bat
├── MMPL-1.0.txt
└── gradlew
/.idea/.name:
--------------------------------------------------------------------------------
1 | neiaddons
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'neiaddons'
--------------------------------------------------------------------------------
/.idea/highlighting.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.idea/scopes/lib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/breeding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/breeding.png
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/breeding.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/breeding.psd
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/exnihilo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/exnihilo.png
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/exnihilo.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/exnihilo.psd
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/isolator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/isolator.png
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/isolator.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/isolator.psd
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/products.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/products.png
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/gui/products.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/gui/products.psd
--------------------------------------------------------------------------------
/resources/assets/neiaddons/textures/items/invalid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bdew-minecraft/neiaddons/HEAD/resources/assets/neiaddons/textures/items/invalid.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /out
3 | /build
4 | /run
5 | /.idea/workspace.xml
6 | /.idea/dictionaries
7 | /eclipse
8 | /.gradle
9 | /*.iml
10 | /*.ipr
11 | /.idea/libraries/Gradle__*
12 |
--------------------------------------------------------------------------------
/.idea/scopes/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Jul 02 15:54:47 CDT 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/scala_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/resources/neiaddons_at.cfg:
--------------------------------------------------------------------------------
1 | # Shamelessly stolen from NEI
2 | public net.minecraft.client.gui.inventory.GuiContainer field_146999_f #xSize
3 | public net.minecraft.client.gui.inventory.GuiContainer field_147000_g #ySize
4 | public net.minecraft.client.gui.inventory.GuiContainer field_147003_i #guiLeft
5 | public net.minecraft.client.gui.inventory.GuiContainer field_147009_r #guiTop
6 |
--------------------------------------------------------------------------------
/.idea/scala_compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | NEI Addons
2 | ==========
3 |
4 | ### [Mod documentation and downloads](http://bdew.net/neiaddons)
5 | ### [Downloads on CurseForge](http://minecraft.curseforge.com/mc-mods/nei-addons/files/)
6 | ### [Minecraft Forums thread](http://www.minecraftforum.net/topic/1803460-)
7 |
8 |
9 | This mod is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL.
10 |
11 | Please check the contents of the license located in https://raw.github.com/bdew/neiaddons/master/MMPL-1.0.txt
12 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/appeng/AppEngHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.appeng;
11 |
12 | import codechicken.nei.api.API;
13 |
14 | public class AppEngHelper {
15 | public static void init() {
16 | API.registerNEIGuiHandler(new AppEngGuiHandler());
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/api/SubPacketHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.api;
11 |
12 | import net.minecraft.entity.player.EntityPlayerMP;
13 | import net.minecraft.nbt.NBTTagCompound;
14 |
15 | public interface SubPacketHandler {
16 | void handle(NBTTagCompound data, EntityPlayerMP player);
17 | }
18 |
--------------------------------------------------------------------------------
/.idea/copyright/MMPL__lib_.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/developer/DeveloperHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.developer;
11 |
12 | import codechicken.nei.guihook.GuiContainerManager;
13 |
14 | public class DeveloperHelper {
15 | public static void init() {
16 | GuiContainerManager.addTooltipHandler(new DeveloperGuiHandler());
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.idea/copyright/MMPL__neiaddons_.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/forestry/bees/BeeBreedingHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.forestry.bees;
11 |
12 | import net.bdew.neiaddons.forestry.BaseBreedingRecipeHandler;
13 |
14 | public class BeeBreedingHandler extends BaseBreedingRecipeHandler {
15 |
16 | public BeeBreedingHandler() {
17 | super(BeeHelper.root);
18 | }
19 |
20 | @Override
21 | public String getRecipeIdent() {
22 | return "beebreeding";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/utils/PositionedStackWithTip.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.utils;
11 |
12 | import codechicken.nei.PositionedStack;
13 |
14 | import java.util.List;
15 |
16 | public class PositionedStackWithTip extends PositionedStack {
17 | public List tip;
18 |
19 | public PositionedStackWithTip(ItemStackWithTip stack, int x, int y) {
20 | super(stack.itemStack, x, y);
21 | this.tip = stack.tip;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/forestry/trees/TreeBreedingHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.forestry.trees;
11 |
12 | import net.bdew.neiaddons.forestry.BaseBreedingRecipeHandler;
13 |
14 | public class TreeBreedingHandler extends BaseBreedingRecipeHandler {
15 |
16 | public TreeBreedingHandler() {
17 | super(TreeHelper.root);
18 | }
19 |
20 | @Override
21 | public String getRecipeIdent() {
22 | return "treebreeding";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/botany/flowers/FlowerBreedingHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.botany.flowers;
11 |
12 | import net.bdew.neiaddons.forestry.BaseBreedingRecipeHandler;
13 |
14 | public class FlowerBreedingHandler extends BaseBreedingRecipeHandler {
15 |
16 | public FlowerBreedingHandler() {
17 | super(FlowerHelper.root);
18 | }
19 |
20 | @Override
21 | public String getRecipeIdent() {
22 | return "flowerbreeding";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/forestry/butterflies/ButterflyBreedingHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.forestry.butterflies;
11 |
12 | import net.bdew.neiaddons.forestry.BaseBreedingRecipeHandler;
13 |
14 | public class ButterflyBreedingHandler extends BaseBreedingRecipeHandler {
15 |
16 | public ButterflyBreedingHandler() {
17 | super(ButterflyHelper.root);
18 | }
19 |
20 | @Override
21 | public String getRecipeIdent() {
22 | return "butterflybreeding";
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/appeng/SlotHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.appeng;
11 |
12 | import net.minecraft.inventory.Slot;
13 |
14 | public class SlotHelper {
15 | public static boolean isSlotEnabled(Slot s) {
16 | if (AddonAppeng.clsSlotFake.isInstance(s)) {
17 | try {
18 | return (Boolean) AddonAppeng.mSlotFakeIsEnabled.invoke(s);
19 | } catch (Throwable e) {
20 | return false;
21 | }
22 | } else {
23 | return false;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/api/NEIAddon.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.api;
11 |
12 | import cpw.mods.fml.relauncher.Side;
13 |
14 | public interface NEIAddon {
15 | String getName();
16 |
17 | boolean isActive();
18 |
19 | boolean isEnabledByDefault();
20 |
21 | /**
22 | * Called from FMLPreInitializationEvent
23 | *
24 | * @throws Exception
25 | */
26 | @SuppressWarnings("RedundantThrows")
27 | void init(Side side) throws Exception;
28 |
29 | /**
30 | * Called from NEI loadConfig
31 | */
32 | void loadClient();
33 | }
34 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/ru_RU.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=Forestry: Генетика
2 | bdew.neiaddons.exnihilo=Ex Nihilo
3 |
4 | bdew.neiaddons.breeding.beebreeding=Разведение пчёл
5 | bdew.neiaddons.produce.beeproduce=Продукты пчёл
6 |
7 | bdew.neiaddons.breeding.treebreeding=Разведение деревьев
8 | bdew.neiaddons.produce.treeproduce=Продукты деревьев
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=Разведение цветов
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=Разведение бабочек
13 |
14 | bdew.exnihilo.hammer.label=Молот ExNihilo
15 | bdew.exnihilo.sieve.label=Сито ExNihilo
16 |
17 | bdew.exnihilo.barrel.burn=Сгорит через %s секунд(-ы)!!!
18 | bdew.exnihilo.beetrap.spawn=Cпаунит: %s%%
19 | bdew.exnihilo.crucible.fluid=Жидкость: %s %s мВ
20 | bdew.exnihilo.crucible.solid=Твёрдая масса: %s %s
21 |
22 | bdew.neiaddons.noserver=Для этой функции NEI Addons требуется установить на сервер
23 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/it_IT.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=Forestry genetica
2 | bdew.neiaddons.exnihilo=Ex Nihilo
3 |
4 | bdew.neiaddons.breeding.beebreeding=Incrocio di api
5 | bdew.neiaddons.produce.beeproduce=Produz. di api
6 |
7 | bdew.neiaddons.breeding.treebreeding=Incrocio di alberi
8 | bdew.neiaddons.produce.treeproduce=Produz. di alberi
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=Incrocio di fiori
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=Incroc. di farfalle
13 |
14 | bdew.exnihilo.hammer.label=ExNihilo Martello
15 | bdew.exnihilo.sieve.label=ExNihilo Setaccio
16 |
17 | bdew.exnihilo.barrel.burn=Brucierà per %s secondi!!!
18 | bdew.exnihilo.beetrap.spawn=Generazione: %s%%
19 | bdew.exnihilo.crucible.fluid=Fluidi: %s %s mB
20 | bdew.exnihilo.crucible.solid=Solidi: %s %s
21 |
22 | bdew.neiaddons.noserver=Questa funzione richiede che NEI Addons sia insallato sul server
23 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/utils/ItemStackWithTip.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.utils;
11 |
12 | import net.minecraft.item.ItemStack;
13 |
14 | import java.util.ArrayList;
15 | import java.util.List;
16 |
17 | public class ItemStackWithTip {
18 | public ItemStack itemStack;
19 | public List tip;
20 |
21 | public ItemStackWithTip(ItemStack itemStack) {
22 | this(itemStack, new ArrayList());
23 | }
24 |
25 | public ItemStackWithTip(ItemStack itemStack, List tip) {
26 | this.itemStack = itemStack;
27 | this.tip = tip;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/crafting/AddonCraftingTablesClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.crafting;
11 |
12 | import codechicken.nei.api.API;
13 | import codechicken.nei.recipe.DefaultOverlayHandler;
14 | import net.minecraft.client.gui.inventory.GuiContainer;
15 |
16 | class AddonCraftingTablesClient {
17 | public static void load() {
18 | for (Class extends GuiContainer> tableClass : AddonCraftingTables.craftingTables) {
19 | API.registerGuiOverlay(tableClass, "crafting");
20 | API.registerGuiOverlayHandler(tableClass, new DefaultOverlayHandler(), "crafting");
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/zh_CN.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=林业基因
2 | bdew.neiaddons.exnihilo=无中生有
3 |
4 | bdew.neiaddons.breeding.beebreeding=蜜蜂杂交
5 | bdew.neiaddons.produce.beeproduce=蜜蜂产物
6 |
7 | bdew.neiaddons.breeding.treebreeding=树木杂交
8 | bdew.neiaddons.produce.treeproduce=树木产物
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=花卉杂交
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=蝴蝶杂交
13 |
14 | bdew.exnihilo.hammer.label=无中生有-锤
15 | bdew.exnihilo.sieve.label=无中生有-筛子
16 |
17 | bdew.exnihilo.barrel.burn=将在 %s 后燃烧!!!
18 | bdew.exnihilo.beetrap.spawn=生成: %s%%
19 | bdew.exnihilo.crucible.fluid=流体: %s %s mB
20 | bdew.exnihilo.crucible.solid=固体: %s %s
21 |
22 | bdew.neiaddons.noserver=本功能需要在NEI Addons被安装到服务器端后才被支持
23 |
24 | nei.options.tools.dump.neiaddons=NEI Addons
25 | nei.options.tools.dump.neiaddons.dumped=%s 已导出至 %s
26 | nei.options.tools.dump.neiaddons.bee_mutations=蜜蜂变异
27 | nei.options.tools.dump.neiaddons.tree_mutations=树木变异
28 | nei.options.tools.dump.neiaddons.flower_mutations=花卉变异
29 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/cs_CZ.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=Forestry Genetics
2 | bdew.neiaddons.exnihilo=Ex Nihilo
3 |
4 | bdew.neiaddons.breeding.beebreeding=Množení včel
5 | bdew.neiaddons.produce.beeproduce=Produkce včel
6 |
7 | bdew.neiaddons.breeding.treebreeding=Množení stromů
8 | bdew.neiaddons.produce.treeproduce=Produkce stromů
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=Množení kytek
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=Množení motýlů
13 |
14 | bdew.exnihilo.hammer.label=ExNihilovo kladivo
15 | bdew.exnihilo.sieve.label=ExNihilovo síto
16 |
17 | bdew.exnihilo.barrel.burn=Shoří za %s sekund!!!
18 | bdew.exnihilo.beetrap.spawn=Spawnuji: %s%%
19 | bdew.exnihilo.crucible.fluid=Tekutina: %s %s mB
20 | bdew.exnihilo.crucible.solid=Pevné: %s %s
21 |
22 | bdew.neiaddons.noserver=Tato funkce vyžaduje instalaci NEI Addons na server
23 |
24 | nei.options.tools.dump.neiaddons=NEI Addons
25 | nei.options.tools.dump.neiaddons.dumped=%s vypsáno do %s
26 | nei.options.tools.dump.neiaddons.bee_mutations=Mutace včel
27 | nei.options.tools.dump.neiaddons.tree_mutations=Mutace stromů
28 | nei.options.tools.dump.neiaddons.flower_mutations=Mutace kytek
29 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/en_US.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=Forestry Genetics
2 | bdew.neiaddons.exnihilo=Ex Nihilo
3 |
4 | bdew.neiaddons.breeding.beebreeding=Bee Breeding
5 | bdew.neiaddons.produce.beeproduce=Bee Produce
6 |
7 | bdew.neiaddons.breeding.treebreeding=Tree Breeding
8 | bdew.neiaddons.produce.treeproduce=Tree Produce
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=Flower Breeding
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=Butterfly Breeding
13 |
14 | bdew.exnihilo.hammer.label=ExNihilo Hammer
15 | bdew.exnihilo.sieve.label=ExNihilo Sieve
16 |
17 | bdew.exnihilo.barrel.burn=Will burn in %s seconds!!!
18 | bdew.exnihilo.beetrap.spawn=Spawning: %s%%
19 | bdew.exnihilo.crucible.fluid=Fluid: %s %s mB
20 | bdew.exnihilo.crucible.solid=Solid: %s %s
21 |
22 | bdew.neiaddons.noserver=This function requires NEI Addons to be installed on the server
23 |
24 | nei.options.tools.dump.neiaddons=NEI Addons
25 | nei.options.tools.dump.neiaddons.dumped=%s dumped to %s
26 | nei.options.tools.dump.neiaddons.bee_mutations=Bee Mutations
27 | nei.options.tools.dump.neiaddons.tree_mutations=Tree Mutations
28 | nei.options.tools.dump.neiaddons.flower_mutations=Flower Mutations
29 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/network/PacketHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.network;
11 |
12 | import net.bdew.neiaddons.NEIAddons;
13 | import net.minecraft.entity.player.EntityPlayerMP;
14 | import net.minecraft.nbt.NBTTagCompound;
15 |
16 | public class PacketHelper {
17 | private static NBTTagCompound makePacket(String cmd, NBTTagCompound data) {
18 | NBTTagCompound nbt = new NBTTagCompound();
19 |
20 | nbt.setString("cmd", cmd);
21 | nbt.setTag("data", data);
22 |
23 | return nbt;
24 | }
25 |
26 | public static void sendToServer(String cmd, NBTTagCompound data) {
27 |
28 | NEIAddons.channel.sendToServer(makePacket(cmd, data));
29 | }
30 |
31 | public static void sendToClient(String cmd, NBTTagCompound data, EntityPlayerMP player) {
32 | NEIAddons.channel.sendTo(makePacket(cmd, data), player);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/NEIAddonsConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons;
11 |
12 | import codechicken.nei.api.IConfigureNEI;
13 | import net.bdew.neiaddons.api.NEIAddon;
14 |
15 | public class NEIAddonsConfig implements IConfigureNEI {
16 | @Override
17 | public void loadConfig() {
18 | for (NEIAddon addon : NEIAddons.addons) {
19 | if (addon.isActive()) {
20 | try {
21 | addon.loadClient();
22 | } catch (Throwable e) {
23 | NEIAddons.logWarningExc(e, "Addon %s failed client initialization", addon.getName());
24 | }
25 | }
26 | }
27 | }
28 |
29 | @Override
30 | public String getName() {
31 | return "NEI Addons";
32 | }
33 |
34 | @Override
35 | public String getVersion() {
36 | return "NEIADDONS_VER";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/fr_CA.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=Forestry Genetics
2 | bdew.neiaddons.exnihilo=Ex Nihilo
3 |
4 | bdew.neiaddons.breeding.beebreeding=Élevage d'abeille
5 | bdew.neiaddons.produce.beeproduce=Production d'abeille
6 |
7 | bdew.neiaddons.breeding.treebreeding=Arboriculture
8 | bdew.neiaddons.produce.treeproduce=Production arboricole
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=Horticulture
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=Élevage de papillon
13 |
14 | bdew.exnihilo.hammer.label=Marteau ExNihilo
15 | bdew.exnihilo.sieve.label=Tamis ExNihilo
16 |
17 | bdew.exnihilo.barrel.burn=Brulera en %s secondes!!!
18 | bdew.exnihilo.beetrap.spawn=Engendrement: %s%%
19 | bdew.exnihilo.crucible.fluid=Fluide: %s %s mB
20 | bdew.exnihilo.crucible.solid=Solide: %s %s
21 |
22 | bdew.neiaddons.noserver=Cette fonction exige que NEI Addons soit installé sur le serveur
23 |
24 | nei.options.tools.dump.neiaddons=NEI Addons
25 | nei.options.tools.dump.neiaddons.dumped=%s a déposé à %s
26 | nei.options.tools.dump.neiaddons.bee_mutations=Mutations d'abeille
27 | nei.options.tools.dump.neiaddons.tree_mutations=Mutations d'arbre
28 | nei.options.tools.dump.neiaddons.flower_mutations=Mutations de fleur
29 |
--------------------------------------------------------------------------------
/resources/assets/neiaddons/lang/fr_FR.lang:
--------------------------------------------------------------------------------
1 | bdew.neiaddons.genetics=Forestry Genetics
2 | bdew.neiaddons.exnihilo=Ex Nihilo
3 |
4 | bdew.neiaddons.breeding.beebreeding=Élevage d'abeille
5 | bdew.neiaddons.produce.beeproduce=Production d'abeille
6 |
7 | bdew.neiaddons.breeding.treebreeding=Arboriculture
8 | bdew.neiaddons.produce.treeproduce=Production arboricole
9 |
10 | bdew.neiaddons.breeding.flowerbreeding=Horticulture
11 |
12 | bdew.neiaddons.breeding.butterflybreeding=Élevage de papillon
13 |
14 | bdew.exnihilo.hammer.label=Marteau ExNihilo
15 | bdew.exnihilo.sieve.label=Tamis ExNihilo
16 |
17 | bdew.exnihilo.barrel.burn=Brulera en %s secondes!!!
18 | bdew.exnihilo.beetrap.spawn=Engendrement: %s%%
19 | bdew.exnihilo.crucible.fluid=Fluide: %s %s mB
20 | bdew.exnihilo.crucible.solid=Solide: %s %s
21 |
22 | bdew.neiaddons.noserver=Cette fonction exige que NEI Addons soit installé sur le serveur
23 |
24 | nei.options.tools.dump.neiaddons=NEI Addons
25 | nei.options.tools.dump.neiaddons.dumped=%s a déposé à %s
26 | nei.options.tools.dump.neiaddons.bee_mutations=Mutations d'abeille
27 | nei.options.tools.dump.neiaddons.tree_mutations=Mutations d'arbre
28 | nei.options.tools.dump.neiaddons.flower_mutations=Mutations de fleur
29 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/forestry/bees/BeeProduceHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.forestry.bees;
11 |
12 | import forestry.api.apiculture.IAlleleBeeSpecies;
13 | import forestry.api.genetics.IAlleleSpecies;
14 | import net.bdew.neiaddons.forestry.BaseProduceRecipeHandler;
15 | import net.minecraft.item.Item;
16 |
17 | import java.util.Collection;
18 | import java.util.Map;
19 |
20 | public class BeeProduceHandler extends BaseProduceRecipeHandler {
21 |
22 | public BeeProduceHandler() {
23 | super(BeeHelper.root);
24 | }
25 |
26 | @Override
27 | public String getRecipeIdent() {
28 | return "beeproduce";
29 | }
30 |
31 | @Override
32 | public Collection getAllSpecies() {
33 | return BeeHelper.allSpecies;
34 | }
35 |
36 | @Override
37 | public Map- > getProduceCache() {
38 | return BeeHelper.productsCache;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/forestry/trees/TreeProduceHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.forestry.trees;
11 |
12 | import forestry.api.arboriculture.IAlleleTreeSpecies;
13 | import forestry.api.genetics.IAlleleSpecies;
14 | import net.bdew.neiaddons.forestry.BaseProduceRecipeHandler;
15 | import net.minecraft.item.Item;
16 |
17 | import java.util.Collection;
18 | import java.util.Map;
19 |
20 | public class TreeProduceHandler extends BaseProduceRecipeHandler {
21 |
22 | public TreeProduceHandler() {
23 | super(TreeHelper.root);
24 | }
25 |
26 | @Override
27 | public String getRecipeIdent() {
28 | return "treeproduce";
29 | }
30 |
31 | @Override
32 | public Collection getAllSpecies() {
33 | return TreeHelper.allSpecies;
34 | }
35 |
36 | @Override
37 | public Map
- > getProduceCache() {
38 | return TreeHelper.productsCache;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/utils/LabeledPositionedStack.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.utils;
11 |
12 | import codechicken.nei.PositionedStack;
13 | import net.bdew.neiaddons.Utils;
14 |
15 | public class LabeledPositionedStack extends PositionedStack {
16 |
17 | private final String label;
18 | private final int yoffs;
19 |
20 | public LabeledPositionedStack(Object stack, int x, int y, String label, int yoffs) {
21 | super(stack, x, y);
22 | this.label = label;
23 | this.yoffs = yoffs;
24 | }
25 |
26 | public void drawLabel() {
27 | if (label.contains(" ")) {
28 | String[] parts = label.split(" ");
29 | for (int i = 0; i < parts.length; i++) {
30 | Utils.drawCenteredString(parts[i], relx + 8, rely + 8 + yoffs + 9 * i, 0xFFFFFF);
31 | }
32 | } else {
33 | Utils.drawCenteredString(label, relx + 8, rely + 8 + yoffs, 0xFFFFFF);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/.idea/codeStyleSettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/utils/TypedField.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.utils;
11 |
12 | import java.lang.reflect.Field;
13 |
14 | public class TypedField {
15 | private Field field;
16 | private Class cls;
17 |
18 | public TypedField(Field field, Class cls) {
19 | this.field = field;
20 | this.cls = cls;
21 | }
22 |
23 | @SuppressWarnings("unchecked")
24 | public T get(Object obj) {
25 | try {
26 | Object res = field.get(obj);
27 | if (cls.isInstance(res))
28 | return (T) res;
29 | else
30 | throw new RuntimeException(String.format("Wrong field type. Expected %s, got %s", cls, res.getClass()));
31 | } catch (IllegalAccessException e) {
32 | throw new RuntimeException(e);
33 | }
34 | }
35 |
36 | public static TypedField from(Class> cls, String name, Class result) throws NoSuchFieldException {
37 | return new TypedField(cls.getField(name), result);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/utils/ModItemFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.utils;
11 |
12 | import codechicken.nei.api.ItemFilter;
13 | import net.minecraft.item.Item;
14 | import net.minecraft.item.ItemBlock;
15 | import net.minecraft.item.ItemStack;
16 |
17 | public class ModItemFilter implements ItemFilter {
18 | private String modId;
19 | private Boolean items;
20 |
21 | public ModItemFilter(String modId, Boolean items) {
22 | this.modId = modId;
23 | this.items = items;
24 | }
25 |
26 | @Override
27 | public boolean matches(ItemStack item) {
28 | if (item == null || item.getItem() == null) return false;
29 | if (item.getItem() instanceof ItemBlock && items) return false;
30 | if (!(item.getItem() instanceof ItemBlock) && !items) return false;
31 | String itemName = Item.itemRegistry.getNameForObject(item.getItem());
32 | if (itemName == null) return false;
33 | String[] s = itemName.split(":");
34 | return (s.length > 1) && s[0].equals(modId);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/appeng/SetFakeSlotCommandHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.appeng;
11 |
12 | import net.bdew.neiaddons.api.SubPacketHandler;
13 | import net.minecraft.entity.player.EntityPlayerMP;
14 | import net.minecraft.inventory.Container;
15 | import net.minecraft.inventory.Slot;
16 | import net.minecraft.item.ItemStack;
17 | import net.minecraft.nbt.NBTTagCompound;
18 |
19 | public class SetFakeSlotCommandHandler implements SubPacketHandler {
20 | @Override
21 | public void handle(NBTTagCompound data, EntityPlayerMP player) {
22 | ItemStack stack = ItemStack.loadItemStackFromNBT(data.getCompoundTag("item"));
23 | int slotNum = data.getInteger("slot");
24 | Container cont = player.openContainer;
25 | if ((cont != null) && AddonAppeng.clsBaseContainer.isInstance(cont)) {
26 | Slot slot = cont.getSlot(slotNum);
27 | if ((slot != null) && AddonAppeng.clsSlotFake.isInstance(slot) && SlotHelper.isSlotEnabled(slot)) {
28 | slot.putStack(stack);
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/utils/TypedMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.utils;
11 |
12 | import java.lang.reflect.InvocationTargetException;
13 | import java.lang.reflect.Method;
14 |
15 | public class TypedMethod {
16 | private Method field;
17 | private Class cls;
18 |
19 | public TypedMethod(Method method, Class cls) {
20 | this.field = method;
21 | this.cls = cls;
22 | }
23 |
24 | @SuppressWarnings("unchecked")
25 | public T call(Object obj, Object... args) {
26 | try {
27 | Object res = field.invoke(obj, args);
28 | if (cls.isInstance(res))
29 | return (T) res;
30 | else
31 | throw new RuntimeException(String.format("Wrong return type. Expected %s, got %s", cls, res.getClass()));
32 | } catch (IllegalAccessException e) {
33 | throw new RuntimeException(e);
34 | } catch (InvocationTargetException e) {
35 | throw new RuntimeException(e);
36 | }
37 | }
38 |
39 | public static TypedMethod from(Class> cls, String name, Class result) throws NoSuchMethodException {
40 | return new TypedMethod(cls.getMethod(name), result);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/developer/AddonDeveloper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.developer;
11 |
12 | import cpw.mods.fml.common.Mod;
13 | import cpw.mods.fml.common.Mod.EventHandler;
14 | import cpw.mods.fml.common.Mod.Instance;
15 | import cpw.mods.fml.common.event.FMLPreInitializationEvent;
16 | import cpw.mods.fml.relauncher.Side;
17 | import cpw.mods.fml.relauncher.SideOnly;
18 | import net.bdew.neiaddons.BaseAddon;
19 | import net.bdew.neiaddons.NEIAddons;
20 |
21 | @Mod(modid = NEIAddons.modId + "|Developer", name = "NEI Addons: Developer Tools", version = "NEIADDONS_VER", dependencies = "after:NEIAddons")
22 | public class AddonDeveloper extends BaseAddon {
23 |
24 | @Instance(NEIAddons.modId + "|Developer")
25 | public static AddonDeveloper instance;
26 |
27 | @Override
28 | public String getName() {
29 | return "Developer Tools";
30 | }
31 |
32 | @Override
33 | public boolean checkSide(Side side) {
34 | return side.isClient();
35 | }
36 |
37 | @Override
38 | public boolean isEnabledByDefault() {
39 | return false;
40 | }
41 |
42 | @Override
43 | @EventHandler
44 | public void preInit(FMLPreInitializationEvent ev) {
45 | doPreInit(ev);
46 | }
47 |
48 | @Override
49 | public void init(Side side) throws Exception {
50 | active = true;
51 | }
52 |
53 | @Override
54 | @SideOnly(Side.CLIENT)
55 | public void loadClient() {
56 | DeveloperHelper.init();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/exnihilo/WailaHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.exnihilo;
11 |
12 | import mcp.mobius.waila.api.IWailaRegistrar;
13 | import net.bdew.neiaddons.Utils;
14 | import net.bdew.neiaddons.exnihilo.waila.BarrelHandler;
15 | import net.bdew.neiaddons.exnihilo.waila.BeeTrapHandler;
16 | import net.bdew.neiaddons.exnihilo.waila.CrucibleHandler;
17 | import net.minecraft.tileentity.TileEntity;
18 |
19 | public class WailaHandler {
20 | static public Class extends TileEntity> clsTeBarrel;
21 | static public Class extends TileEntity> clsTeCrucible;
22 | static public Class extends TileEntity> clsTeBeeTrap;
23 |
24 | static private void loadClasses() throws ClassNotFoundException {
25 | clsTeBarrel = Utils.getAndCheckClass("exnihilo.blocks.tileentities.TileEntityBarrel", TileEntity.class);
26 | clsTeCrucible = Utils.getAndCheckClass("exnihilo.blocks.tileentities.TileEntityCrucible", TileEntity.class);
27 | clsTeBeeTrap = Utils.getAndCheckClass("exnihilo.blocks.tileentities.TileEntityBeeTrap", TileEntity.class);
28 | }
29 |
30 | static public void loadCallback(IWailaRegistrar reg) {
31 | try {
32 | loadClasses();
33 | reg.registerBodyProvider(new CrucibleHandler(), clsTeCrucible);
34 | reg.registerBodyProvider(new BarrelHandler(), clsTeBarrel);
35 | reg.registerBodyProvider(new BeeTrapHandler(), clsTeBeeTrap);
36 | } catch (Throwable t) {
37 | AddonExnihilo.instance.logWarning("WAILA support load failed: %s", t.toString());
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/exnihilo/AddonExnihilo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.exnihilo;
11 |
12 | import cpw.mods.fml.common.Mod;
13 | import cpw.mods.fml.common.Mod.EventHandler;
14 | import cpw.mods.fml.common.event.FMLInterModComms;
15 | import cpw.mods.fml.common.event.FMLPreInitializationEvent;
16 | import cpw.mods.fml.relauncher.Side;
17 | import cpw.mods.fml.relauncher.SideOnly;
18 | import net.bdew.neiaddons.BaseAddon;
19 | import net.bdew.neiaddons.NEIAddons;
20 |
21 | @Mod(modid = NEIAddons.modId + "|ExNihilo", name = "NEI Addons: Ex Nihilo", version = "NEIADDONS_VER", dependencies = "after:exnihilo")
22 | public class AddonExnihilo extends BaseAddon {
23 | @Mod.Instance(NEIAddons.modId + "|ExNihilo")
24 | public static AddonExnihilo instance;
25 |
26 | @Override
27 | public String getName() {
28 | return "Ex Nihilo";
29 | }
30 |
31 | @Override
32 | public boolean checkSide(Side side) {
33 | return side.isClient();
34 | }
35 |
36 | @Override
37 | public String[] getDependencies() {
38 | return new String[]{"exnihilo", "Waila"};
39 | }
40 |
41 | @EventHandler
42 | public void preInit(FMLPreInitializationEvent ev) {
43 | doPreInit(ev);
44 | }
45 |
46 | @Override
47 | public void init(Side side) throws Exception {
48 | active = true;
49 | FMLInterModComms.sendMessage("Waila", "register", "net.bdew.neiaddons.exnihilo.WailaHandler.loadCallback");
50 | }
51 |
52 | @Override
53 | @SideOnly(Side.CLIENT)
54 | public void loadClient() {
55 | // Currently this addon includes only some WAILA handlers
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/forestry/MutationDumper.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.forestry
11 |
12 | import java.io.File
13 |
14 | import codechicken.nei.config.ArrayDumper
15 | import forestry.api.genetics.{IMutation, ISpeciesRoot}
16 | import net.minecraft.util.{ChatComponentTranslation, IChatComponent}
17 |
18 | class MutationDumper(root: ISpeciesRoot, suffix: String) extends ArrayDumper[IMutation]("tools.dump.neiaddons." + suffix) {
19 |
20 | import scala.collection.JavaConversions._
21 |
22 | override def header() = Array("UID", "Name", "Allele0", "Allele1", "isSecret", "baseChance", "conditions")
23 |
24 | override def array(): Array[IMutation] = root.getMutations(false).toArray(Array.empty)
25 |
26 | override def dump(mutation: IMutation, id: Int) = {
27 | val speciesKey = root.getKaryotypeKey.ordinal()
28 | val conditions = try {
29 | Option(mutation.getSpecialConditions) map (x => x.mkString("|")) getOrElse ""
30 | } catch {
31 | case t: Throwable =>
32 | AddonForestry.instance.logSevereExc(t, "Error in mutation.getSpecialConditions for mutation %s + %s -> %s",
33 | mutation.getAllele0.getUID, mutation.getAllele1.getUID, mutation.getTemplate()(0).getUID)
34 | "[Error]"
35 | }
36 | Array(
37 | mutation.getTemplate()(speciesKey).getUID,
38 | mutation.getTemplate()(speciesKey).getName,
39 | mutation.getAllele0.getUID,
40 | mutation.getAllele1.getUID,
41 | mutation.isSecret.toString,
42 | "%.1f".format(mutation.getBaseChance),
43 | conditions
44 | )
45 | }
46 |
47 | override def dumpMessage(file: File): IChatComponent =
48 | new ChatComponentTranslation("nei.options.tools.dump.neiaddons.dumped", translateN(name + "s"), "dumps/" + file.getName)
49 |
50 | override def modeCount() = 0
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/botany/flowers/FlowerHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.botany.flowers;
11 |
12 | import codechicken.nei.api.API;
13 | import forestry.api.genetics.AlleleManager;
14 | import forestry.api.genetics.IAlleleSpecies;
15 | import forestry.api.genetics.ISpeciesRoot;
16 | import net.bdew.neiaddons.Utils;
17 | import net.bdew.neiaddons.botany.AddonBotany;
18 | import net.bdew.neiaddons.forestry.MutationDumper;
19 |
20 | public class FlowerHelper {
21 |
22 | public static Class extends IAlleleSpecies> flowerSpeciesClass;
23 |
24 | public static ISpeciesRoot root;
25 |
26 | public static void setup() {
27 | root = AlleleManager.alleleRegistry.getSpeciesRoot("rootFlowers");
28 |
29 | if (root == null) {
30 | AddonBotany.instance.logWarning("Failed to load Flower root, Botany support disabled");
31 | return;
32 | }
33 |
34 | try {
35 | flowerSpeciesClass = Utils.getAndCheckClass("binnie.botany.api.IAlleleFlowerSpecies", IAlleleSpecies.class);
36 | } catch (Throwable e) {
37 | AddonBotany.instance.logWarningExc(e, "Failed to load Flower species interface, Botany support disabled");
38 | return;
39 | }
40 |
41 | AddonBotany.instance.logInfo("Root=%s Species=%s", root, flowerSpeciesClass);
42 |
43 | if (AddonBotany.showFlowerMutations) {
44 | FlowerBreedingHandler breedingRecipeHandler = new FlowerBreedingHandler();
45 | API.registerRecipeHandler(breedingRecipeHandler);
46 | API.registerUsageHandler(breedingRecipeHandler);
47 | AddonBotany.instance.registerWithNEIPlugins(breedingRecipeHandler.getRecipeName(), breedingRecipeHandler.getRecipeIdent());
48 | }
49 |
50 | API.addOption(new MutationDumper(root, "flower_mutation"));
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/net/bdew/neiaddons/network/NBTMessageCodec.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) bdew, 2013 - 2015
3 | * https://github.com/bdew/neiaddons
4 | *
5 | * This mod is distributed under the terms of the Minecraft Mod Public
6 | * License 1.0, or MMPL. Please check the contents of the license located in
7 | * http://bdew.net/minecraft-mod-public-license/
8 | */
9 |
10 | package net.bdew.neiaddons.network;
11 |
12 | import cpw.mods.fml.common.network.NetworkRegistry;
13 | import cpw.mods.fml.common.network.internal.FMLProxyPacket;
14 | import io.netty.buffer.ByteBuf;
15 | import io.netty.buffer.ByteBufInputStream;
16 | import io.netty.buffer.ByteBufOutputStream;
17 | import io.netty.buffer.Unpooled;
18 | import io.netty.channel.ChannelHandler;
19 | import io.netty.channel.ChannelHandlerContext;
20 | import io.netty.handler.codec.MessageToMessageCodec;
21 | import net.bdew.neiaddons.NEIAddons;
22 | import net.minecraft.nbt.CompressedStreamTools;
23 | import net.minecraft.nbt.NBTTagCompound;
24 |
25 | import java.io.DataInputStream;
26 | import java.io.DataOutputStream;
27 | import java.util.List;
28 |
29 | @ChannelHandler.Sharable
30 | public class NBTMessageCodec extends MessageToMessageCodec {
31 | @Override
32 | protected void encode(ChannelHandlerContext ctx, NBTTagCompound msg, List