當前位置: 首頁>>代碼示例>>Java>>正文


Java World.setBlockMetadataWithNotify方法代碼示例

本文整理匯總了Java中net.minecraft.world.World.setBlockMetadataWithNotify方法的典型用法代碼示例。如果您正苦於以下問題:Java World.setBlockMetadataWithNotify方法的具體用法?Java World.setBlockMetadataWithNotify怎麽用?Java World.setBlockMetadataWithNotify使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.world.World的用法示例。


在下文中一共展示了World.setBlockMetadataWithNotify方法的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.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

示例2: 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.CentrifugeAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeAdvancedIdle);

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

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:CentrifugeAdvanced.java

示例3: 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

示例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.RepairingForgeMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.RepairingForgeMediumIdle);

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

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:RepairingForgeMedium.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.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

示例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.ElectricFurnaceMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceMediumIdle);

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

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:ElectricFurnaceMedium.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.MinerAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.MinerAdvancedIdle);

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

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:MinerAdvanced.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.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

示例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.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

示例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.WasherActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.WasherIdle);

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

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:Washer.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.RepairingForgeAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.RepairingForgeAdvancedIdle);

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

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:RepairingForgeAdvanced.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.MinerActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.MinerIdle);

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

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:Miner.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.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

示例14: 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

示例15: onBlockPlacedBy

import net.minecraft.world.World; //導入方法依賴的package包/類
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
	int direction = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;

	if (direction == 0)
		world.setBlockMetadataWithNotify(x, y, z, 2, 2);

	if (direction == 1)
		world.setBlockMetadataWithNotify(x, y, z, 5, 2);

	if (direction == 2)
		world.setBlockMetadataWithNotify(x, y, z, 3, 2);

	if (direction == 3)
		world.setBlockMetadataWithNotify(x, y, z, 4, 2);

	if (itemStack.hasDisplayName()) {
		((TileEntityMachine) world.getTileEntity(x, y, z)).setMachineName(itemStack.getDisplayName());
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:20,代碼來源:Machine.java


注:本文中的net.minecraft.world.World.setBlockMetadataWithNotify方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。