本文整理汇总了C#中CraftyServer.Core.World.func_22074_c方法的典型用法代码示例。如果您正苦于以下问题:C# World.func_22074_c方法的具体用法?C# World.func_22074_c怎么用?C# World.func_22074_c使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CraftyServer.Core.World
的用法示例。
在下文中一共展示了World.func_22074_c方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onBlockAdded
public override void onBlockAdded(World world, int i, int j, int k)
{
base.onBlockAdded(world, i, j, k);
if (world.getBlockId(i, j, k) == blockID)
{
world.func_22074_c(i, j, k, blockID, tickRate());
}
}
示例2: 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 & 7;
int j1 = 8 - (l & 8);
if (j1 == 0)
{
return true;
}
world.setBlockMetadataWithNotify(i, j, k, i1 + j1);
world.markBlocksDirty(i, j, k, i, j, k);
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "random.click", 0.3F, 0.6F);
world.notifyBlocksOfNeighborChange(i, j, k, blockID);
if (i1 == 1)
{
world.notifyBlocksOfNeighborChange(i - 1, j, k, blockID);
}
else if (i1 == 2)
{
world.notifyBlocksOfNeighborChange(i + 1, j, k, blockID);
}
else if (i1 == 3)
{
world.notifyBlocksOfNeighborChange(i, j, k - 1, blockID);
}
else if (i1 == 4)
{
world.notifyBlocksOfNeighborChange(i, j, k + 1, blockID);
}
else
{
world.notifyBlocksOfNeighborChange(i, j - 1, k, blockID);
}
world.func_22074_c(i, j, k, blockID, tickRate());
return true;
}
示例3: updateTick
public override void updateTick(World world, int i, int j, int k, Random random)
{
int l = func_301_g(world, i, j, k);
byte byte0 = 1;
if (blockMaterial == Material.lava && !world.worldProvider.isHellWorld)
{
byte0 = 2;
}
bool flag = true;
if (l > 0)
{
int i1 = -100;
field_659_a = 0;
i1 = func_307_e(world, i - 1, j, k, i1);
i1 = func_307_e(world, i + 1, j, k, i1);
i1 = func_307_e(world, i, j, k - 1, i1);
i1 = func_307_e(world, i, j, k + 1, i1);
int j1 = i1 + byte0;
if (j1 >= 8 || i1 < 0)
{
j1 = -1;
}
if (func_301_g(world, i, j + 1, k) >= 0)
{
int l1 = func_301_g(world, i, j + 1, k);
if (l1 >= 8)
{
j1 = l1;
}
else
{
j1 = l1 + 8;
}
}
if (field_659_a >= 2 && blockMaterial == Material.water)
{
if (world.isBlockOpaqueCube(i, j - 1, k))
{
j1 = 0;
}
else if (world.getBlockMaterial(i, j - 1, k) == blockMaterial && world.getBlockMetadata(i, j, k) == 0)
{
j1 = 0;
}
}
if (blockMaterial == Material.lava && l < 8 && j1 < 8 && j1 > l && random.nextInt(4) != 0)
{
j1 = l;
flag = false;
}
if (j1 != l)
{
l = j1;
if (l < 0)
{
world.setBlockWithNotify(i, j, k, 0);
}
else
{
world.setBlockMetadataWithNotify(i, j, k, l);
world.func_22074_c(i, j, k, blockID, tickRate());
world.notifyBlocksOfNeighborChange(i, j, k, blockID);
}
}
else if (flag)
{
func_22024_i(world, i, j, k);
}
}
else
{
func_22024_i(world, i, j, k);
}
if (func_312_l(world, i, j - 1, k))
{
if (l >= 8)
{
world.setBlockAndMetadataWithNotify(i, j - 1, k, blockID, l);
}
else
{
world.setBlockAndMetadataWithNotify(i, j - 1, k, blockID, l + 8);
}
}
else if (l >= 0 && (l == 0 || func_309_k(world, i, j - 1, k)))
{
bool[] aflag = func_4035_j(world, i, j, k);
int k1 = l + byte0;
if (l >= 8)
{
k1 = 1;
}
if (k1 >= 8)
{
return;
}
if (aflag[0])
{
func_311_f(world, i - 1, j, k, k1);
}
//.........这里部分代码省略.........
示例4: setStateIfMobInteractsWithPlate
private void setStateIfMobInteractsWithPlate(World world, int i, int j, int k)
{
bool flag = world.getBlockMetadata(i, j, k) == 1;
bool flag1 = false;
float f = 0.125F;
List list = null;
if (triggerMobType == EnumMobType.everything)
{
list = world.getEntitiesWithinAABBExcludingEntity(null,
AxisAlignedBB.getBoundingBoxFromPool(i + f, j,
k + f,
(i + 1) -
f,
j +
0.25D,
(k + 1) -
f));
}
if (triggerMobType == EnumMobType.mobs)
{
list = world.getEntitiesWithinAABB(typeof (EntityLiving),
AxisAlignedBB.getBoundingBoxFromPool(i + f, j, k + f,
(i + 1) - f,
j + 0.25D,
(k + 1) - f));
}
if (triggerMobType == EnumMobType.players)
{
list = world.getEntitiesWithinAABB(typeof (EntityPlayer),
AxisAlignedBB.getBoundingBoxFromPool(i + f, j, k + f,
(i + 1) - f,
j + 0.25D,
(k + 1) - f));
}
if (list.size() > 0)
{
flag1 = true;
}
if (flag1 && !flag)
{
world.setBlockMetadataWithNotify(i, j, k, 1);
world.notifyBlocksOfNeighborChange(i, j, k, blockID);
world.notifyBlocksOfNeighborChange(i, j - 1, k, blockID);
world.markBlocksDirty(i, j, k, i, j, k);
world.playSoundEffect(i + 0.5D, j + 0.10000000000000001D, k + 0.5D,
"random.click", 0.3F, 0.6F);
}
if (!flag1 && flag)
{
world.setBlockMetadataWithNotify(i, j, k, 0);
world.notifyBlocksOfNeighborChange(i, j, k, blockID);
world.notifyBlocksOfNeighborChange(i, j - 1, k, blockID);
world.markBlocksDirty(i, j, k, i, j, k);
world.playSoundEffect(i + 0.5D, j + 0.10000000000000001D, k + 0.5D,
"random.click", 0.3F, 0.5F);
}
if (flag1)
{
world.func_22074_c(i, j, k, blockID, tickRate());
}
}
示例5: onNeighborBlockChange
public override void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
base.onNeighborBlockChange(world, i, j, k, l);
world.func_22074_c(i, j, k, blockID, tickRate());
}
示例6: updateTick
public override void updateTick(World world, int i, int j, int k, Random random)
{
int l = world.getBlockMetadata(i, j, k);
bool flag = func_22012_g(world, i, j, k, l);
if (field_22015_c && !flag)
{
world.setBlockAndMetadataWithNotify(i, j, k, field_22011_bh.blockID, l);
}
else if (!field_22015_c)
{
world.setBlockAndMetadataWithNotify(i, j, k, field_22010_bi.blockID, l);
if (!flag)
{
int i1 = (l & 0xc) >> 2;
world.func_22074_c(i, j, k, field_22010_bi.blockID, field_22013_b[i1]*2);
}
}
}
示例7: onNeighborBlockChange
public override void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
if (!canBlockStay(world, i, j, k))
{
dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k));
world.setBlockWithNotify(i, j, k, 0);
return;
}
int i1 = world.getBlockMetadata(i, j, k);
bool flag = func_22012_g(world, i, j, k, i1);
int j1 = (i1 & 0xc) >> 2;
if (field_22015_c && !flag)
{
world.func_22074_c(i, j, k, blockID, field_22013_b[j1]*2);
}
else if (!field_22015_c && flag)
{
world.func_22074_c(i, j, k, blockID, field_22013_b[j1]*2);
}
}
示例8: onBlockPlacedBy
public override void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = ((MathHelper.floor_double(((entityliving.rotationYaw*4F)/360F) + 0.5D) & 3) + 2)%4;
world.setBlockMetadataWithNotify(i, j, k, l);
bool flag = func_22012_g(world, i, j, k, l);
if (flag)
{
world.func_22074_c(i, j, k, blockID, 1);
}
}