本文整理汇总了C#中CraftyServer.Core.World.getBlockMetadata方法的典型用法代码示例。如果您正苦于以下问题:C# World.getBlockMetadata方法的具体用法?C# World.getBlockMetadata怎么用?C# World.getBlockMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CraftyServer.Core.World
的用法示例。
在下文中一共展示了World.getBlockMetadata方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: isIndirectlyPoweringTo
public override bool isIndirectlyPoweringTo(World world, int i, int j, int k, int l)
{
int i1 = world.getBlockMetadata(i, j, k);
if ((i1 & 8) == 0)
{
return false;
}
int j1 = i1 & 7;
if (j1 == 5 && l == 1)
{
return true;
}
if (j1 == 4 && l == 2)
{
return true;
}
if (j1 == 3 && l == 3)
{
return true;
}
if (j1 == 2 && l == 4)
{
return true;
}
return j1 == 1 && l == 5;
}
示例2: onBlockRemoval
public override void onBlockRemoval(World world, int i, int j, int k)
{
byte byte0 = 4;
int l = byte0 + 1;
if (world.checkChunksExist(i - l, j - l, k - l, i + l, j + l, k + l))
{
for (int i1 = -byte0; i1 <= byte0; i1++)
{
for (int j1 = -byte0; j1 <= byte0; j1++)
{
for (int k1 = -byte0; k1 <= byte0; k1++)
{
int l1 = world.getBlockId(i + i1, j + j1, k + k1);
if (l1 != leaves.blockID)
{
continue;
}
int i2 = world.getBlockMetadata(i + i1, j + j1, k + k1);
if ((i2 & 4) == 0)
{
world.setBlockMetadata(i + i1, j + j1, k + k1, i2 | 4);
}
}
}
}
}
}
示例3: getCollidingBoundingBoxes
public override void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb,
ArrayList arraylist)
{
int l = world.getBlockMetadata(i, j, k);
if (l == 0)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 1)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 2)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
示例4: collisionRayTrace
public override MovingObjectPosition collisionRayTrace(World world, int i, int j, int k, Vec3D vec3d,
Vec3D vec3d1)
{
int l = world.getBlockMetadata(i, j, k) & 7;
float f = 0.15F;
if (l == 1)
{
setBlockBounds(0.0F, 0.2F, 0.5F - f, f*2.0F, 0.8F, 0.5F + f);
}
else if (l == 2)
{
setBlockBounds(1.0F - f*2.0F, 0.2F, 0.5F - f, 1.0F, 0.8F, 0.5F + f);
}
else if (l == 3)
{
setBlockBounds(0.5F - f, 0.2F, 0.0F, 0.5F + f, 0.8F, f*2.0F);
}
else if (l == 4)
{
setBlockBounds(0.5F - f, 0.2F, 1.0F - f*2.0F, 0.5F + f, 0.8F, 1.0F);
}
else
{
float f1 = 0.1F;
setBlockBounds(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, 0.6F, 0.5F + f1);
}
return base.collisionRayTrace(world, i, j, k, vec3d, vec3d1);
}
示例5: blockActivated
public override bool blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
int l = world.getBlockMetadata(i, j, k);
int i1 = (l & 0xc) >> 2;
i1 = i1 + 1 << 2 & 0xc;
world.setBlockMetadataWithNotify(i, j, k, i1 | l & 3);
return true;
}
示例6: func_276_g
protected void func_276_g(World world, int i, int j, int k)
{
if (!canBlockStay(world, i, j, k))
{
dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k));
world.setBlockWithNotify(i, j, k, 0);
}
}
示例7: updateTick
public override void updateTick(World world, int i, int j, int k, Random random)
{
if (world.getSavedLightValue(EnumSkyBlock.Block, i, j, k) > 11 - lightOpacity[blockID])
{
dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k));
world.setBlockWithNotify(i, j, k, waterMoving.blockID);
}
}
示例8: Packet53BlockChange
public Packet53BlockChange(int i, int j, int k, World world)
{
isChunkDataPacket = true;
xPosition = i;
yPosition = j;
zPosition = k;
type = world.getBlockId(i, j, k);
metadata = world.getBlockMetadata(i, j, k);
}
示例9: getCollisionBoundingBoxFromPool
public override AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
int l = world.getBlockMetadata(i, j, k);
float f = 0.0625F;
float f1 = (1 + l*2)/16F;
float f2 = 0.5F;
return AxisAlignedBB.getBoundingBoxFromPool(i + f1, j, k + f, (i + 1) - f,
(j + f2) - f, (k + 1) - f);
}
示例10: onBlockAdded
public override void onBlockAdded(World world, int i, int j, int k)
{
if (this != stairSingle)
{
base.onBlockAdded(world, i, j, k);
}
int l = world.getBlockId(i, j - 1, k);
int i1 = world.getBlockMetadata(i, j, k);
int j1 = world.getBlockMetadata(i, j - 1, k);
if (i1 != j1)
{
return;
}
if (l == stairSingle.blockID)
{
world.setBlockWithNotify(i, j, k, 0);
world.setBlockAndMetadataWithNotify(i, j - 1, k, stairDouble.blockID, i1);
}
}
示例11: onBlockRemoval
public override void onBlockRemoval(World world, int i, int j, int k)
{
int l = world.getBlockMetadata(i, j, k);
if (l > 0)
{
world.notifyBlocksOfNeighborChange(i, j, k, blockID);
world.notifyBlocksOfNeighborChange(i, j - 1, k, blockID);
}
base.onBlockRemoval(world, i, j, k);
}
示例12: MinecartTrackLogic
public MinecartTrackLogic(BlockMinecartTrack blockminecarttrack, World world, int i, int j, int k)
{
minecartTrack = blockminecarttrack;
connectedTracks = new ArrayList();
worldObj = world;
trackX = i;
trackY = j;
trackZ = k;
trackMetadata = world.getBlockMetadata(i, j, k);
calculateConnectedTracks();
}
示例13: isIndirectlyPoweringTo
public override bool isIndirectlyPoweringTo(World world, int i, int j, int k, int l)
{
if (world.getBlockMetadata(i, j, k) == 0)
{
return false;
}
else
{
return l == 1;
}
}
示例14: onNeighborBlockChange
public override void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
bool flag = false;
if (isFreestanding)
{
if (!world.getBlockMaterial(i, j - 1, k).isSolid())
{
flag = true;
}
}
else
{
int i1 = world.getBlockMetadata(i, j, k);
flag = true;
if (i1 == 2 && world.getBlockMaterial(i, j, k + 1).isSolid())
{
flag = false;
}
if (i1 == 3 && world.getBlockMaterial(i, j, k - 1).isSolid())
{
flag = false;
}
if (i1 == 4 && world.getBlockMaterial(i + 1, j, k).isSolid())
{
flag = false;
}
if (i1 == 5 && world.getBlockMaterial(i - 1, j, k).isSolid())
{
flag = false;
}
}
if (flag)
{
dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k));
world.setBlockWithNotify(i, j, k, 0);
}
base.onNeighborBlockChange(world, i, j, k, l);
}
示例15: onEntityCollidedWithBlock
public override void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
if (world.singleplayerWorld)
{
return;
}
if (world.getBlockMetadata(i, j, k) == 1)
{
return;
}
else
{
setStateIfMobInteractsWithPlate(world, i, j, k);
return;
}
}