diff --git a/src/main/java/techreborn/command/TechRebornDevCommand.java b/src/main/java/techreborn/command/TechRebornDevCommand.java index 0be123a22..d7a80a1a2 100644 --- a/src/main/java/techreborn/command/TechRebornDevCommand.java +++ b/src/main/java/techreborn/command/TechRebornDevCommand.java @@ -7,6 +7,8 @@ import net.minecraft.util.ChatComponentText; import net.minecraftforge.fluids.Fluid; import techreborn.api.fuel.FluidPowerManager; import techreborn.api.recipe.RecipeHandler; +import techreborn.partSystem.IModPart; +import techreborn.partSystem.ModPartRegistry; import java.util.Objects; @@ -45,6 +47,10 @@ public class TechRebornDevCommand extends CommandBase { sender.addChatMessage(new ChatComponentText("Found invalid fluid entry")); } } + } else if ("parts".equals(args[0])){ + for (IModPart part : ModPartRegistry.parts){ + sender.addChatMessage(new ChatComponentText(part.getName())); + } } } } diff --git a/src/main/java/techreborn/partSystem/fmp/FMPFactory.java b/src/main/java/techreborn/partSystem/fmp/FMPFactory.java index 1393365bd..ea2ae5fb2 100644 --- a/src/main/java/techreborn/partSystem/fmp/FMPFactory.java +++ b/src/main/java/techreborn/partSystem/fmp/FMPFactory.java @@ -11,6 +11,8 @@ import codechicken.multipart.MultiPartRegistry; import codechicken.multipart.NormallyOccludedPart; import codechicken.multipart.TMultiPart; import codechicken.multipart.TileMultipart; +import cpw.mods.fml.common.Loader; +import ic2.api.info.IC2Classic; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -76,7 +78,9 @@ public class FMPFactory implements MultiPartRegistry.IPartFactory2, @Override public void init() { - MultiPartRegistry.registerConverter(new CableConverter()); + if(Loader.isModLoaded("IC2")){ + MultiPartRegistry.registerConverter(new CableConverter()); + } } @Override diff --git a/src/main/java/techreborn/partSystem/fmp/FMPModPart.java b/src/main/java/techreborn/partSystem/fmp/FMPModPart.java index 9aa0670c1..1cb0a8c69 100644 --- a/src/main/java/techreborn/partSystem/fmp/FMPModPart.java +++ b/src/main/java/techreborn/partSystem/fmp/FMPModPart.java @@ -50,7 +50,8 @@ public class FMPModPart extends TMultiPart implements TSlottedPart, public Iterable getOcclusionBoxes() { List cubes = new ArrayList(); for (Vecs3dCube c : iModPart.getOcclusionBoxes()) - cubes.add(new Cuboid6(c.toAABB())); + if(c != null) + cubes.add(new Cuboid6(c.toAABB())); return cubes; }