resonant-induction/minecraft/liquidmechanics/common/MetaGroup.java
Rseifert 8b1179699f Added model to release valve
Model is not fully done since i want to get the valve to set on diffrent
faces when the top is in use. Also want it to rotate a bit when powered
by redstone.

Also worked on connectionHelper and switch a few of the itemRenders to
an actual itemRenderHelper so they look nice in the inventory and in the
players hand.
2013-01-07 15:19:00 -05:00

47 lines
No EOL
991 B
Java

package liquidmechanics.common;
import net.minecraftforge.common.ForgeDirection;
public class MetaGroup
{
public static int getFacingMeta(int metaData)
{
int meta = metaData % 4;
int newMeta = 0;
switch (meta)
{
case 0:
newMeta = 2;
break;
case 1:
newMeta = 5;
break;
case 2:
newMeta = 3;
break;
case 3:
newMeta = 4;
}
return newMeta;
}
public static int getGrouping(int meta)
{
if ((meta >= 0) && (meta <= 3))
return 0;
if ((meta >= 4) && (meta <= 7))
return 1;
if ((meta >= 8) && (meta <= 11))
return 2;
if ((meta >= 12) && (meta <= 15))
return 3;
return 0;
}
public static int getGroupStartMeta(int grouping)
{
return grouping * 4;
}
}