mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Reorganize folders for modules
This commit is contained in:
1 parent
2c14f315de
commit
e2f0558b6f
370 files changed
+4274
-4788
No files matched your search
@@ -1,35 +0,0 @@
|
||||
package tconstruct.plugins;
|
||||
|
||||
import static tconstruct.TConstruct.moduleLoader;
|
||||
import tconstruct.plugins.fmp.ForgeMultiPart;
|
||||
import tconstruct.plugins.ic2.IC2;
|
||||
import tconstruct.plugins.imc.AppEng;
|
||||
import tconstruct.plugins.imc.BuildcraftTransport;
|
||||
import tconstruct.plugins.imc.Mystcraft;
|
||||
import tconstruct.plugins.imc.Thaumcraft;
|
||||
import tconstruct.plugins.nei.NotEnoughItems;
|
||||
import tconstruct.plugins.te3.ThermalExpansion;
|
||||
import tconstruct.plugins.waila.Waila;
|
||||
|
||||
public class PluginController
|
||||
{
|
||||
|
||||
private PluginController() {} // Don't need to instantiate this.
|
||||
|
||||
public static void registerModules()
|
||||
{
|
||||
// Mystcraft is pushed in through the backdoor so it can't be disabled.
|
||||
moduleLoader.registerUncheckedModule(Mystcraft.class);
|
||||
|
||||
// Register the remaining plugin classes normally
|
||||
moduleLoader.registerModule(AppEng.class);
|
||||
moduleLoader.registerModule(BuildcraftTransport.class);
|
||||
moduleLoader.registerModule(ForgeMultiPart.class);
|
||||
moduleLoader.registerModule(IC2.class);
|
||||
moduleLoader.registerModule(Thaumcraft.class);
|
||||
moduleLoader.registerModule(NotEnoughItems.class);
|
||||
moduleLoader.registerModule(Waila.class);
|
||||
moduleLoader.registerModule(ThermalExpansion.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,586 +0,0 @@
|
||||
package tconstruct.plugins.fmp;
|
||||
|
||||
import codechicken.lib.lighting.*;
|
||||
import codechicken.lib.render.*;
|
||||
import codechicken.lib.render.uv.MultiIconTransformation;
|
||||
import codechicken.lib.vec.*;
|
||||
import codechicken.microblock.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import tconstruct.blocks.GlassBlockConnected;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
|
||||
public class ConnectedTexturesMicroMaterial extends BlockMicroMaterial
|
||||
{
|
||||
|
||||
public GlassBlockConnected b;
|
||||
|
||||
MultiIconTransformation icont = null;
|
||||
|
||||
public ConnectedTexturesMicroMaterial(GlassBlockConnected block, int meta)
|
||||
{
|
||||
super(block, meta);
|
||||
b = block;
|
||||
}
|
||||
/*
|
||||
@Override
|
||||
public void loadIcons ()
|
||||
{
|
||||
icont = new MultiIconTransformation(b.getIcons());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderMicroFace (Vertex5[] verts, int side, Vector3 pos, LightMatrix lightMatrix, IMicroMaterialRender part)
|
||||
{
|
||||
renderMicroFace(verts, side, pos, lightMatrix, getColour(part), icont);
|
||||
}
|
||||
|
||||
public int determineTextre (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if (PHConstruct.connectedTexturesMode == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
boolean isOpenUp = false, isOpenDown = false, isOpenLeft = false, isOpenRight = false;
|
||||
|
||||
switch (par5)
|
||||
{
|
||||
case 0:
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenRight)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (isOpenDown && isOpenUp)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (isOpenDown && isOpenRight)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (isOpenUp && isOpenRight)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (isOpenDown)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else if (isOpenUp)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else if (isOpenLeft)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (isOpenRight)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenRight)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (isOpenDown && isOpenUp)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (isOpenDown && isOpenRight)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (isOpenUp && isOpenRight)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (isOpenDown)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else if (isOpenUp)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else if (isOpenLeft)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (isOpenRight)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenRight)
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (isOpenDown && isOpenUp)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (isOpenDown && isOpenRight)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (isOpenUp && isOpenRight)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (isOpenDown)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (isOpenUp)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (isOpenLeft)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else if (isOpenRight)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenRight)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (isOpenDown && isOpenUp)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (isOpenDown && isOpenRight)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (isOpenUp && isOpenRight)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (isOpenDown)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (isOpenUp)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (isOpenLeft)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else if (isOpenRight)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenRight)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (isOpenDown && isOpenUp)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (isOpenDown && isOpenRight)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (isOpenUp && isOpenRight)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (isOpenDown)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (isOpenUp)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (isOpenLeft)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else if (isOpenRight)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (b.shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (isOpenUp && isOpenDown && isOpenRight)
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (isOpenDown && isOpenUp)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (isOpenLeft && isOpenRight)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (isOpenDown && isOpenLeft)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (isOpenDown && isOpenRight)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (isOpenUp && isOpenLeft)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (isOpenUp && isOpenRight)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (isOpenDown)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (isOpenUp)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (isOpenLeft)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else if (isOpenRight)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void renderMicroFace (Vertex5[] verts, int side, Vector3 pos, LightMatrix lightMatrix, int colour, IUVTransformation uvt)
|
||||
{
|
||||
UV uv = new UV();
|
||||
Tessellator t = Tessellator.instance;
|
||||
int i = 0;
|
||||
while (i < 4)
|
||||
{
|
||||
if (CCRenderState.useNormals())
|
||||
{
|
||||
Vector3 n = Rotation.axes[side % 6];
|
||||
t.setNormal((float) n.x, (float) n.y, (float) n.z);
|
||||
}
|
||||
Vertex5 vert = verts[i];
|
||||
if (lightMatrix != null)
|
||||
{
|
||||
LC lc = LC.computeO(vert.vec, side);
|
||||
if (CCRenderState.useModelColours())
|
||||
lightMatrix.setColour(t, lc, colour);
|
||||
lightMatrix.setBrightness(t, lc);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CCRenderState.useModelColours())
|
||||
CCRenderState.vertexColour(colour);
|
||||
}
|
||||
|
||||
// ((MultiIconTransformation)uvt).setIconIndex(null, determineTextre(Minecraft.getMinecraft().theWorld, (int)pos.x, (int)pos.y, (int)pos.z, side));
|
||||
|
||||
uvt.transform(uv.set(vert.uv));
|
||||
t.addVertexWithUV(vert.vec.x + pos.x, vert.vec.y + pos.y, vert.vec.z + pos.z, uv.u, uv.v);
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
public static void createAndRegister (GlassBlockConnected block)
|
||||
{
|
||||
MicroMaterialRegistry.registerMaterial(new ConnectedTexturesMicroMaterial(block, 0), block.getUnlocalizedName());
|
||||
}*/
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package tconstruct.plugins.fmp;
|
||||
|
||||
import codechicken.microblock.BlockMicroMaterial;
|
||||
import codechicken.microblock.MicroMaterialRegistry;
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.block.Block;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
public class ForgeMultiPart implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "ForgeMultipart";
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
TConstruct.logger.info("ForgeMultipart detected. Registering TConstruct decorative blocks with FMP.");
|
||||
registerBlock(TRepo.clearGlass);
|
||||
registerBlock(TRepo.stainedGlassClear, 0, 15);
|
||||
registerBlock(TRepo.multiBrick, 0, 13);
|
||||
registerBlock(TRepo.metalBlock, 0, 10);
|
||||
registerBlock(TRepo.multiBrickFancy, 0, 15);
|
||||
registerBlock(TRepo.smeltery, 2, 2);
|
||||
registerBlock(TRepo.smeltery, 4, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
//For blocks with metadata values only
|
||||
public static void registerBlock (Block block, int metastart, int metaend)
|
||||
{
|
||||
for (int meta = metastart; meta <= metaend; meta++)
|
||||
{
|
||||
String identifier = new String(block.getUnlocalizedName());
|
||||
MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), identifier + meta);
|
||||
}
|
||||
}
|
||||
|
||||
//For blocks without metadata values only.
|
||||
public static void registerBlock (Block block)
|
||||
{
|
||||
BlockMicroMaterial.createAndRegister(block, 0);
|
||||
}
|
||||
|
||||
//For blocks with metadata values and special MicroMaterial only
|
||||
public static void registerBlock (Block block, int metastart, int metaend, MicroMaterialRegistry.IMicroMaterial material)
|
||||
{
|
||||
for (int meta = metastart; meta <= metaend; meta++)
|
||||
{
|
||||
String identifier = new String(block.getUnlocalizedName());
|
||||
MicroMaterialRegistry.registerMaterial(material, identifier + meta);
|
||||
}
|
||||
}
|
||||
|
||||
//For blocks without metadata values and special MicroMaterial only.
|
||||
public static void registerBlock (Block block, MicroMaterialRegistry.IMicroMaterial material)
|
||||
{
|
||||
MicroMaterialRegistry.registerMaterial(material, new String(block.getUnlocalizedName()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package tconstruct.plugins.ic2;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
|
||||
public class IC2 implements ILoadableModule
|
||||
{
|
||||
|
||||
private static final String IC2_UUM_FLUIDNAME = "uumatter";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "IC2";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[IC2] Preparing for shenanigans.");
|
||||
|
||||
Fluid fluidUUM = FluidRegistry.getFluid(IC2_UUM_FLUIDNAME);
|
||||
if (fluidUUM == null)
|
||||
return;
|
||||
|
||||
FluidStack fluidStackBlock = new FluidStack(fluidUUM, 4500);
|
||||
LiquidCasting basinCasting = TConstructRegistry.getBasinCasting();
|
||||
|
||||
// Block casting
|
||||
basinCasting.addCastingRecipe(new ItemStack(Blocks.diamond_block), fluidStackBlock, new ItemStack(Blocks.dirt), true, 50);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class AppEng implements ILoadableModule
|
||||
{
|
||||
|
||||
private static List<String> spatialIOLogics = Arrays.asList("AdaptiveSmelteryLogic", "AqueductLogic", "CastingBasinLogic", "CastingChannelLogic", "CastingTableLogic", "CraftingStationLogic",
|
||||
"DryingRackLogic", "EssenceExtractorLogic", "FaucetLogic", "FrypanLogic", "GolemPedestalLogic", "LavaTankLogic", "PartBuilderLogic", "PatternChestLogic", "SmelteryDrainLogic",
|
||||
"SmelteryLogic", "StencilTableLogic", "TankAirLogic", "TileEntityLandmine", "ToolForgeLogic", "ToolStationLogic", "TowerFurnaceLogic", "MultiServantLogic");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "AppliedEnergistics";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[AppEng] Registering for Spatial IO.");
|
||||
for (String s : spatialIOLogics)
|
||||
{
|
||||
FMLInterModComms.sendMessage("AppliedEnergistics", "movabletile", "tconstruct.blocks.logic." + s);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class BuildcraftTransport implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "BuildCraft|Transport";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[BC|Transport] Registering facades.");
|
||||
// Smeltery Blocks
|
||||
addFacade(TRepo.smeltery, 2);
|
||||
for (int sc = 4; sc < 11; sc++)
|
||||
{
|
||||
addFacade(TRepo.smeltery, sc);
|
||||
}
|
||||
|
||||
addFacade(TRepo.searedBlock, 0);
|
||||
addFacade(TRepo.searedBlockNether, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void addFacade (Block b, int meta)
|
||||
{
|
||||
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", new ItemStack(b, 1, meta));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class Mystcraft implements ILoadableModule
|
||||
{
|
||||
|
||||
private static String[] fluids = new String[] { "invar.molten", "electrum.molten", "bronze.molten", "aluminumbrass.molten", "manyullyn.molten", "alumite.molten", "cobalt.molten", "moltenArdite",
|
||||
"ender", "steel.molten", "platinum.molten" };
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "Mystcraft";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[Mystcraft] Blacklisting Mystcraft fluid symbols.");
|
||||
for (String nm : fluids)
|
||||
sendFluidBlacklist(nm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void sendFluidBlacklist (String FluidName)
|
||||
{
|
||||
NBTTagCompound NBTMsg = new NBTTagCompound();
|
||||
NBTMsg.setTag("fluidsymbol", new NBTTagCompound());
|
||||
NBTMsg.getCompoundTag("fluidsymbol").setFloat("rarity", 0.0F);
|
||||
NBTMsg.getCompoundTag("fluidsymbol").setFloat("grammarweight", 0.0F);
|
||||
NBTMsg.getCompoundTag("fluidsymbol").setFloat("instabilityPerBlock", 10000F); // renders creative symbol useless
|
||||
NBTMsg.getCompoundTag("fluidsymbol").setString("fluidname", FluidName);
|
||||
FMLInterModComms.sendMessage("Mystcraft", "fluidsymbol", NBTMsg);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class Thaumcraft implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "Thaumcraft";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[Thaumcraft] Registering harvestables.");
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 12));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 13));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 14));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 15));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerrySecond, 1, 12));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerrySecond, 1, 13));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.recipe.DefaultOverlayHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import mantle.module.ILoadableModule;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.client.gui.CraftingStationGui;
|
||||
|
||||
public class NotEnoughItems implements ILoadableModule
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "NotEnoughItems";
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
TConstruct.logger.info("NotEnoughItems detected. Registering TConstruct NEI plugin.");
|
||||
registerNEICompat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
public static void registerNEICompat ()
|
||||
{
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
{
|
||||
API.registerGuiOverlay(CraftingStationGui.class, "crafting");
|
||||
API.registerGuiOverlayHandler(CraftingStationGui.class, new DefaultOverlayHandler(), "crafting");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package tconstruct.plugins.te3;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class TE3Helper {
|
||||
|
||||
public static void addInductionSmelterRecipe(int energy, ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int chance)
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
data.setInteger("energy", energy);
|
||||
|
||||
NBTTagCompound input1Compound = new NBTTagCompound();
|
||||
input1.writeToNBT(input1Compound);
|
||||
data.setTag("primaryInput", input1Compound);
|
||||
|
||||
NBTTagCompound input2Compound = new NBTTagCompound();
|
||||
input2.writeToNBT(input2Compound);
|
||||
data.setTag("secondaryInput", input2Compound);
|
||||
|
||||
NBTTagCompound output1Compound = new NBTTagCompound();
|
||||
output1.writeToNBT(output1Compound);
|
||||
data.setTag("primaryOutput", output1Compound);
|
||||
|
||||
if (output2 != null) {
|
||||
NBTTagCompound output2Compound = new NBTTagCompound();
|
||||
output2.writeToNBT(output2Compound);
|
||||
data.setTag("secondaryOutput", output2Compound);
|
||||
|
||||
data.setInteger("secondaryChance", chance);
|
||||
}
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", data);
|
||||
}
|
||||
|
||||
public static void addPulveriserRecipe(int energy, ItemStack input, ItemStack output, ItemStack bonus, int chance)
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
data.setInteger("energy", energy);
|
||||
|
||||
NBTTagCompound inputCompound = new NBTTagCompound();
|
||||
input.writeToNBT(inputCompound);
|
||||
data.setTag("input", inputCompound);
|
||||
|
||||
NBTTagCompound outputCompound = new NBTTagCompound();
|
||||
output.writeToNBT(outputCompound);
|
||||
data.setTag("primaryOutput", outputCompound);
|
||||
|
||||
if (bonus != null) {
|
||||
NBTTagCompound outputCompound2 = new NBTTagCompound();
|
||||
bonus.writeToNBT(outputCompound2);
|
||||
data.setTag("secondaryOutput", outputCompound2);
|
||||
|
||||
data.setInteger("secondaryChance", chance);
|
||||
}
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", data);
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package tconstruct.plugins.te3;
|
||||
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ThermalExpansion implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "ThermalExpansion";
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
ItemStack crystalCinnabar = OreDictionary.getOres("crystalCinnabar").get(0);
|
||||
|
||||
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 11), new ItemStack(TRepo.materials, 1, 40), null, 0);
|
||||
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 39), null, 0);
|
||||
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 38), null, 0);
|
||||
|
||||
TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), new ItemStack(TRepo.materials, 2, 39), GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1), 10);
|
||||
TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 3), new ItemStack(Items.iron_ingot), 100);
|
||||
TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), new ItemStack(TRepo.materials, 2, 38), GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1), 10);
|
||||
TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 4), new ItemStack(Items.gold_ingot), 100);
|
||||
|
||||
TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 5), null, 0);
|
||||
TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 9), new ItemStack(TRepo.materials, 3, 11), new ItemStack(TRepo.materials, 4, 14), null, 0);
|
||||
} @Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.blocks.logic.CastingBasinLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BasinDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof CastingBasinLogic)
|
||||
{
|
||||
return ((CastingBasinLogic) accessor.getTileEntity()).getStackInSlot(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof CastingBasinLogic && config.getConfig("tcon.basin", true))
|
||||
{
|
||||
CastingBasinLogic te = (CastingBasinLogic) accessor.getTileEntity();
|
||||
if (te.getFluidAmount() != 0)
|
||||
{
|
||||
FluidStack fs = te.getFluid();
|
||||
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add("Amount: " + fs.amount + "/" + te.getCapacity());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (te.getStackInSlot(0) != null)
|
||||
{
|
||||
currenttip.add("Contains: " + te.getStackInSlot(0).getDisplayName());
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add("§oEmpty"); // "§o" == Italics
|
||||
}
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import tconstruct.blocks.logic.CastingChannelLogic;
|
||||
|
||||
public class CastingChannelDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof CastingChannelLogic)
|
||||
{
|
||||
CastingChannelLogic te = (CastingChannelLogic) accessor.getTileEntity();
|
||||
FluidTankInfo internalTank = te.getTankInfo(null)[0];
|
||||
FluidTankInfo northTank = te.getTankInfo(ForgeDirection.NORTH)[0];
|
||||
FluidTankInfo southTank = te.getTankInfo(ForgeDirection.SOUTH)[0];
|
||||
FluidTankInfo westTank = te.getTankInfo(ForgeDirection.WEST)[0];
|
||||
FluidTankInfo eastTank = te.getTankInfo(ForgeDirection.EAST)[0];
|
||||
|
||||
if (internalTank.fluid != null && internalTank.fluid.amount > 0)
|
||||
{
|
||||
FluidStack fs = internalTank.fluid;
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag") + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount + "/" + internalTank.capacity);
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add("§o" + StatCollector.translateToLocal("tconstruct.waila.empty")); // "§o" == Italics
|
||||
}
|
||||
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.subtanks"));
|
||||
String s1, s2, s3, s4;
|
||||
s1 = s2 = s3 = s4 = "§o" + StatCollector.translateToLocal("tconstruct.waila.empty");
|
||||
|
||||
if (northTank.fluid != null)
|
||||
s1 = northTank.fluid.amount + " / " + northTank.capacity;
|
||||
if (southTank.fluid != null)
|
||||
s2 = southTank.fluid.amount + " / " + southTank.capacity;
|
||||
if (westTank.fluid != null)
|
||||
s3 = westTank.fluid.amount + " / " + westTank.capacity;
|
||||
if (eastTank.fluid != null)
|
||||
s4 = eastTank.fluid.amount + " / " + eastTank.capacity;
|
||||
currenttip.add(s1 + "; " + s2 + "; " + s3 + "; " + s4);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.blocks.logic.LavaTankLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SearedTankDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof LavaTankLogic && config.getConfig("tcon.searedtank", true))
|
||||
{
|
||||
LavaTankLogic te = (LavaTankLogic) accessor.getTileEntity();
|
||||
if (te.containsFluid())
|
||||
{
|
||||
FluidStack fs = te.tank.getFluid();
|
||||
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add("Amount: " + fs.amount + "/" + te.tank.getCapacity());
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add("§oEmpty"); // "§o" == Italics
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.blocks.logic.SmelteryLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SmelteryDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof SmelteryLogic && config.getConfig("tcon.smeltery", true))
|
||||
{
|
||||
SmelteryLogic te = (SmelteryLogic) accessor.getTileEntity();
|
||||
if (te.validStructure)
|
||||
{
|
||||
List<FluidStack> fls = te.moltenMetal;
|
||||
if (fls.size() <= 0)
|
||||
{
|
||||
currenttip.add("§oEmpty"); // "§o" == Italics
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < fls.size(); i++)
|
||||
{
|
||||
FluidStack st = fls.get(i);
|
||||
currenttip.add(WailaRegistrar.fluidNameHelper(st) + " (" + st.amount + "mB)");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add("§oInvalid structure");
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.CastingTableLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TableDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof CastingTableLogic)
|
||||
{
|
||||
CastingTableLogic te = (CastingTableLogic) accessor.getTileEntity();
|
||||
return te.getStackInSlot(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof CastingTableLogic && config.getConfig("tcon.table", true))
|
||||
{
|
||||
CastingTableLogic te = (CastingTableLogic) accessor.getTileEntity();
|
||||
if (te.getStackInSlot(1) != null)
|
||||
{
|
||||
currenttip.add("Contains: " + te.getStackInSlot(1).getDisplayName());
|
||||
}
|
||||
if (te.getFluid() != null)
|
||||
{
|
||||
currenttip.add("Fluid: " + WailaRegistrar.fluidNameHelper(te.getFluid()));
|
||||
currenttip.add("Amount: " + te.getFluidAmount() + "/" + te.getCapacity());
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
public class Waila implements ILoadableModule
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "Waila";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("Waila detected. Registering TConstruct tank blocks with Waila registry.");
|
||||
|
||||
FMLInterModComms.sendMessage("Waila", "register", "tconstruct.plugins.waila.WailaRegistrar.wailaCallback");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
// Nothing
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.LavaTankBlock;
|
||||
import tconstruct.blocks.SmelteryBlock;
|
||||
import tconstruct.blocks.logic.CastingBasinLogic;
|
||||
import tconstruct.blocks.logic.CastingChannelLogic;
|
||||
import tconstruct.blocks.logic.CastingTableLogic;
|
||||
|
||||
public class WailaRegistrar
|
||||
{
|
||||
public static void wailaCallback (IWailaRegistrar registrar)
|
||||
{
|
||||
TConstruct.logger.info("[Waila-Compat] Got registrar: " + registrar);
|
||||
|
||||
// Configs
|
||||
registrar.addConfig("Tinkers' Construct", "tcon.searedtank", "Seared Tank");
|
||||
registrar.addConfig("Tinkers' Construct", "tcon.castingchannel", "Casting Channel");
|
||||
registrar.addConfig("Tinkers' Construct", "tcon.basin", "Casting Basin");
|
||||
registrar.addConfig("Tinkers' Construct", "tcon.table", "Casting Table");
|
||||
registrar.addConfig("Tinkers' Construct", "tcon.smeltery", "Smeltery status");
|
||||
|
||||
// Tanks
|
||||
registrar.registerBodyProvider(new SearedTankDataProvider(), LavaTankBlock.class);
|
||||
registrar.registerBodyProvider(new CastingChannelDataProvider(), CastingChannelLogic.class);
|
||||
//registrar.registerBodyProvider(new EssenceExtractorDataProvider(), EssenceExtractor.class);
|
||||
|
||||
// Casting systems
|
||||
registrar.registerBodyProvider(new BasinDataProvider(), CastingBasinLogic.class);
|
||||
registrar.registerBodyProvider(new TableDataProvider(), CastingTableLogic.class);
|
||||
|
||||
// Smeltery
|
||||
registrar.registerBodyProvider(new SmelteryDataProvider(), SmelteryBlock.class);
|
||||
}
|
||||
|
||||
public static String fluidNameHelper (FluidStack f)
|
||||
{
|
||||
return StatCollector.translateToLocal(FluidRegistry.getFluidName(f));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user