本文整理汇总了Java中codechicken.multipart.PartMap类的典型用法代码示例。如果您正苦于以下问题:Java PartMap类的具体用法?Java PartMap怎么用?Java PartMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PartMap类属于codechicken.multipart包,在下文中一共展示了PartMap类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMovementType
import codechicken.multipart.PartMap; //导入依赖的package包/类
@Override
@Priority(PriorityEnum.OVERRIDE)
public BlockMovementType getMovementType(World world, int x, int y, int z, ForgeDirection side, IMovement movement) {
TileMultipart tmp = TileMultipart.getTile(world, new BlockCoord(x, y, z));
if (tmp == null)
return null;
for (TMultiPart p : tmp.jPartList()) {
if (p instanceof TSlottedPart) {
int slot = ((TSlottedPart) p).getSlotMask();
if (slot == PartMap.face(side.ordinal()).mask && (p instanceof FaceMicroblock || p instanceof HollowMicroblock)) {
if (((CommonMicroblock) p).getSize() == 1)
return BlockMovementType.UNMOVABLE;
}
}
}
return null;
}
示例2: isSideSticky
import codechicken.multipart.PartMap; //导入依赖的package包/类
@Override
public boolean isSideSticky(World world, int x, int y, int z, ForgeDirection side, IMovement movement) {
TileMultipart tmp = TileMultipart.getTile(world, new BlockCoord(x, y, z));
if (tmp == null)
return false;
boolean is = false;
for (TMultiPart p : tmp.jPartList()) {
if (p instanceof TSlottedPart) {
int slot = ((TSlottedPart) p).getSlotMask();
if (PartMap.face(side.ordinal()).mask == slot) {
if (p instanceof ISticky) {
return ((ISticky) p).isSideSticky(world, x, y, z, side, movement);
} else if (p instanceof FaceMicroblock || p instanceof HollowMicroblock) {
if (((CommonMicroblock) p).getSize() == 1)
return false;
}
} else if (slot == PartMap.CENTER.mask && p instanceof ISticky)
return ((ISticky) p).isSideSticky(world, x, y, z, side, movement);
} else if (p instanceof ISticky)
is |= ((ISticky) p).isSideSticky(world, x, y, z, side, movement);
}
return is;
}
示例3: getSlotMask
import codechicken.multipart.PartMap; //导入依赖的package包/类
@Override
public int getSlotMask() {
for (IPart p : getParts())
if (p instanceof IPartCenter)
return PartMap.CENTER.mask;
return 0;
}
示例4: updateBlock
import codechicken.multipart.PartMap; //导入依赖的package包/类
public static void updateBlock(World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileMultipart)
{
TMultiPart part = ((TileMultipart) tile).partMap(PartMap.CENTER.i);
if (part instanceof PartRelocator)
{
part.sendDescUpdate();
}
}
}
示例5: getSlotMask
import codechicken.multipart.PartMap; //导入依赖的package包/类
@Override
public int getSlotMask()
{
return PartMap.CENTER.mask;
}
示例6: getSlotMask
import codechicken.multipart.PartMap; //导入依赖的package包/类
@Override
public int getSlotMask() {
return PartMap.BOTTOM.mask;
}
示例7: getSlotMask
import codechicken.multipart.PartMap; //导入依赖的package包/类
@Override
public int getSlotMask(){
return PartMap.CENTER.mask;
}