Fixes some crashes, added new command, closes #165
This commit is contained in:
parent
2a314aa4bb
commit
3b7001d44f
3 changed files with 13 additions and 2 deletions
|
@ -7,6 +7,8 @@ import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
import techreborn.api.fuel.FluidPowerManager;
|
import techreborn.api.fuel.FluidPowerManager;
|
||||||
import techreborn.api.recipe.RecipeHandler;
|
import techreborn.api.recipe.RecipeHandler;
|
||||||
|
import techreborn.partSystem.IModPart;
|
||||||
|
import techreborn.partSystem.ModPartRegistry;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@ -45,6 +47,10 @@ public class TechRebornDevCommand extends CommandBase {
|
||||||
sender.addChatMessage(new ChatComponentText("Found invalid fluid entry"));
|
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()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ import codechicken.multipart.MultiPartRegistry;
|
||||||
import codechicken.multipart.NormallyOccludedPart;
|
import codechicken.multipart.NormallyOccludedPart;
|
||||||
import codechicken.multipart.TMultiPart;
|
import codechicken.multipart.TMultiPart;
|
||||||
import codechicken.multipart.TileMultipart;
|
import codechicken.multipart.TileMultipart;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
|
import ic2.api.info.IC2Classic;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
@ -76,7 +78,9 @@ public class FMPFactory implements MultiPartRegistry.IPartFactory2,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
MultiPartRegistry.registerConverter(new CableConverter());
|
if(Loader.isModLoaded("IC2")){
|
||||||
|
MultiPartRegistry.registerConverter(new CableConverter());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -50,7 +50,8 @@ public class FMPModPart extends TMultiPart implements TSlottedPart,
|
||||||
public Iterable<Cuboid6> getOcclusionBoxes() {
|
public Iterable<Cuboid6> getOcclusionBoxes() {
|
||||||
List<Cuboid6> cubes = new ArrayList<Cuboid6>();
|
List<Cuboid6> cubes = new ArrayList<Cuboid6>();
|
||||||
for (Vecs3dCube c : iModPart.getOcclusionBoxes())
|
for (Vecs3dCube c : iModPart.getOcclusionBoxes())
|
||||||
cubes.add(new Cuboid6(c.toAABB()));
|
if(c != null)
|
||||||
|
cubes.add(new Cuboid6(c.toAABB()));
|
||||||
return cubes;
|
return cubes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue