当前位置: 首页>>代码示例>>Java>>正文


Java World.getBlockMetadata方法代码示例

本文整理汇总了Java中net.minecraft.world.World.getBlockMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java World.getBlockMetadata方法的具体用法?Java World.getBlockMetadata怎么用?Java World.getBlockMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.World的用法示例。


在下文中一共展示了World.getBlockMetadata方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceAdvancedIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:BlastFurnaceAdvanced.java

示例2: func_149957_e

import net.minecraft.world.World; //导入方法依赖的package包/类
@Override
public void func_149957_e(World world, int x, int y, int z) {
	if (!world.provider.hasNoSky) {
		int meta = world.getBlockMetadata(x, y, z);
		int light = world.getSavedLightValue(EnumSkyBlock.Sky, x, y, z) - world.skylightSubtracted;
		float angle = world.getCelestialAngleRadians(1.0F);

		if (angle < (float) Math.PI)
			angle += (0.0F - angle) * 0.2F;
		else
			angle += ((float) Math.PI * 2F - angle) * 0.2F;

		light = Math.round(light * MathHelper.cos(angle));

		if (light < 0)
			light = 0;
		if (light > 15)
			light = 15;

		light = invertedValues[light];
		if (meta != light)
			world.setBlockMetadataWithNotify(x, y, z, light, 3);
	}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:25,代码来源:InvertedDaylightDetector.java

示例3: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeMediumIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:CentrifugeMedium.java

示例4: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:Centrifuge.java

示例5: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.RepairingForgeActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.RepairingForgeIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:RepairingForge.java

示例6: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.ElectrolyserActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.ElectrolyserIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:Electrolyser.java

示例7: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.WasherMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.WasherMediumIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:WasherMedium.java

示例8: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceMediumIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:BlastFurnaceMedium.java

示例9: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceAdvancedIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:ElectricFurnaceAdvanced.java

示例10: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:BlastFurnace.java

示例11: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.PumpActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.PumpIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:Pump.java

示例12: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceBasicActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceBasicIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:ElectricFurnaceBasic.java

示例13: updateBlockState

import net.minecraft.world.World; //导入方法依赖的package包/类
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.GrinderMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.GrinderMediumIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
开发者ID:viddeno,项目名称:Technical,代码行数:19,代码来源:GrinderMedium.java

示例14: randomDisplayTick

import net.minecraft.world.World; //导入方法依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
	if (world.getBlockMetadata(x, y, z) == 1) {
		ForgeDirection dir = getRandomDirection(rand);

		if (dir != ForgeDirection.UP && !World.doesBlockHaveSolidTopSurface(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ)) {
			double d0 = x;
			double d1 = y;
			double d2 = z;

			if (dir == ForgeDirection.DOWN) {
				d1 -= 0.05D;
				d0 += rand.nextDouble();
				d2 += rand.nextDouble();
			} else {
				d1 += rand.nextDouble() * 0.8D;

				if (dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) {
					d2 += rand.nextDouble();

					if (dir == ForgeDirection.EAST)
						d0++;
					else
						d0 += 0.05D;
				} else {
					d0 += rand.nextDouble();

					if (dir == ForgeDirection.SOUTH)
						d2++;
					else
						d2 += 0.05D;
				}
			}

			world.spawnParticle("dripWater", d0, d1, d2, 0.0D, 0.0D, 0.0D);
		}
	}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:40,代码来源:Sponge.java

示例15: onNeighborBlockChange

import net.minecraft.world.World; //导入方法依赖的package包/类
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
	if (isTop(world, x, y, z)) {
		super.onNeighborBlockChange(world, x, y, z, b);
	} else if (world.getBlock(x, y+1, z) != this || world.getBlockMetadata(x, y+1, z) != 1) {
		world.setBlockToAir(x, y, z);
	}
}
 
开发者ID:azacock,项目名称:Prospecting,代码行数:9,代码来源:BlockIndicatorFlowerDouble.java


注:本文中的net.minecraft.world.World.getBlockMetadata方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。