Server now starts
This commit is contained in:
parent
fbbe621074
commit
b99cac1a1c
5 changed files with 83 additions and 64 deletions
|
@ -57,6 +57,8 @@ public class Core {
|
|||
ModItems.init();
|
||||
// Recipes
|
||||
ModRecipes.init();
|
||||
//Client only init, needs to be done before parts system
|
||||
proxy.init();
|
||||
// Compat
|
||||
CompatManager.init(event);
|
||||
// WorldGen
|
||||
|
@ -73,8 +75,6 @@ public class Core {
|
|||
FMLCommonHandler.instance().bus()
|
||||
.register(new MultiblockServerTickHandler());
|
||||
|
||||
proxy.init();
|
||||
|
||||
LogHelper.info("Initialization Compleate");
|
||||
}
|
||||
|
||||
|
|
76
src/main/java/techreborn/client/render/RenderCablePart.java
Normal file
76
src/main/java/techreborn/client/render/RenderCablePart.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package techreborn.client.render;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.client.IconSupplier;
|
||||
import techreborn.lib.Functions;
|
||||
import techreborn.lib.vecmath.Vecs3d;
|
||||
import techreborn.partSystem.QLib.ModLib2QLib;
|
||||
import techreborn.partSystem.parts.CablePart;
|
||||
import uk.co.qmunity.lib.client.render.RenderHelper;
|
||||
|
||||
|
||||
public class RenderCablePart {
|
||||
public static boolean renderStatic(Vecs3d translation, RenderHelper renderer, int pass, CablePart part) {
|
||||
renderer.renderBox(ModLib2QLib.convert(part.boundingBoxes[6]), getIconFromType(part.type));
|
||||
if (part.connectedSides != null) {
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if (part.connectedSides.containsKey(dir))
|
||||
renderer.renderBox(ModLib2QLib.convert(part.boundingBoxes[Functions.getIntDirFromDirection(dir)]), getIconFromType(part.type));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static IIcon getIconFromType(int cableType){
|
||||
IIcon p = null;
|
||||
switch(cableType) {
|
||||
case 0:
|
||||
p = IconSupplier.insulatedCopperCable;
|
||||
break;
|
||||
case 1:
|
||||
p = IconSupplier.copperCable;
|
||||
break;
|
||||
case 2:
|
||||
p = IconSupplier.goldCable;
|
||||
break;
|
||||
case 3:
|
||||
p = IconSupplier.insulatedGoldCable;
|
||||
break;
|
||||
case 4:
|
||||
p = IconSupplier.doubleInsulatedGoldCable;
|
||||
break;
|
||||
case 5:
|
||||
p = IconSupplier.ironCable;
|
||||
break;
|
||||
case 6:
|
||||
p = IconSupplier.insulatedIronCable;
|
||||
break;
|
||||
case 7:
|
||||
p = IconSupplier.doubleInsulatedIronCable;
|
||||
break;
|
||||
case 8:
|
||||
p = IconSupplier.trippleInsulatedIronCable;
|
||||
break;
|
||||
case 9:
|
||||
p = IconSupplier.glassFiberCable;
|
||||
break;
|
||||
case 10:
|
||||
p = IconSupplier.tinCable;
|
||||
break;
|
||||
case 11:
|
||||
p = IconSupplier.detectorCableBlock;//Detector
|
||||
break;
|
||||
case 12:
|
||||
p = IconSupplier.splitterCableBlock;// Splitter
|
||||
break;
|
||||
case 13:
|
||||
p = IconSupplier.insulatedtinCableBlock;
|
||||
break;
|
||||
case 14:
|
||||
p = IconSupplier.copperCable; // unused?
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
}
|
|
@ -15,7 +15,6 @@ public class ModParts {
|
|||
"techreborn.partSystem.QLib.QModPartFactory", "qmunitylib");
|
||||
ModPartRegistry.addProvider("techreborn.partSystem.fmp.FMPFactory",
|
||||
"ForgeMultipart");
|
||||
ModPartRegistry.addProvider(new WorldProvider());
|
||||
ModPartRegistry.addAllPartsToSystems();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.world.WorldType;
|
|||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.client.IconSupplier;
|
||||
import techreborn.client.render.RenderCablePart;
|
||||
import techreborn.lib.Functions;
|
||||
import techreborn.lib.vecmath.Vecs3d;
|
||||
import techreborn.lib.vecmath.Vecs3dCube;
|
||||
|
@ -134,14 +135,7 @@ public class CablePart extends ModPart implements IEnergyConductor {
|
|||
|
||||
@Override
|
||||
public boolean renderStatic(Vecs3d translation, RenderHelper renderer, int pass) {
|
||||
renderer.renderBox(ModLib2QLib.convert(boundingBoxes[6]), getIconFromType(type));
|
||||
if (connectedSides != null) {
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if (connectedSides.containsKey(dir))
|
||||
renderer.renderBox(ModLib2QLib.convert(boundingBoxes[Functions.getIntDirFromDirection(dir)]), getIconFromType(type));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return RenderCablePart.renderStatic(translation, renderer, pass, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -376,59 +370,6 @@ public class CablePart extends ModPart implements IEnergyConductor {
|
|||
return p / 16.0F;
|
||||
}
|
||||
|
||||
public static IIcon getIconFromType(int cableType){
|
||||
IIcon p = null;
|
||||
switch(cableType) {
|
||||
case 0:
|
||||
p = IconSupplier.insulatedCopperCable;
|
||||
break;
|
||||
case 1:
|
||||
p = IconSupplier.copperCable;
|
||||
break;
|
||||
case 2:
|
||||
p = IconSupplier.goldCable;
|
||||
break;
|
||||
case 3:
|
||||
p = IconSupplier.insulatedGoldCable;
|
||||
break;
|
||||
case 4:
|
||||
p = IconSupplier.doubleInsulatedGoldCable;
|
||||
break;
|
||||
case 5:
|
||||
p = IconSupplier.ironCable;
|
||||
break;
|
||||
case 6:
|
||||
p = IconSupplier.insulatedIronCable;
|
||||
break;
|
||||
case 7:
|
||||
p = IconSupplier.doubleInsulatedIronCable;
|
||||
break;
|
||||
case 8:
|
||||
p = IconSupplier.trippleInsulatedIronCable;
|
||||
break;
|
||||
case 9:
|
||||
p = IconSupplier.glassFiberCable;
|
||||
break;
|
||||
case 10:
|
||||
p = IconSupplier.tinCable;
|
||||
break;
|
||||
case 11:
|
||||
p = IconSupplier.detectorCableBlock;//Detector
|
||||
break;
|
||||
case 12:
|
||||
p = IconSupplier.splitterCableBlock;// Splitter
|
||||
break;
|
||||
case 13:
|
||||
p = IconSupplier.insulatedtinCableBlock;
|
||||
break;
|
||||
case 14:
|
||||
p = IconSupplier.copperCable; // unused?
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
public static String getNameFromType(int cableType){
|
||||
String p = null;
|
||||
switch(cableType) {
|
||||
|
|
|
@ -2,6 +2,8 @@ package techreborn.proxies;
|
|||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import techreborn.client.IconSupplier;
|
||||
import techreborn.partSystem.ModPartRegistry;
|
||||
import techreborn.partSystem.block.WorldProvider;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
|
@ -10,5 +12,6 @@ public class ClientProxy extends CommonProxy {
|
|||
{
|
||||
super.init();
|
||||
MinecraftForge.EVENT_BUS.register(new IconSupplier());
|
||||
ModPartRegistry.addProvider(new WorldProvider());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue