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


Java EntityLightningBolt.setLocationAndAngles方法代碼示例

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


在下文中一共展示了EntityLightningBolt.setLocationAndAngles方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onBlockActivated

import net.minecraft.entity.effect.EntityLightningBolt; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack held, EnumFacing side, float par7, float par8, float par9) {
	int i = pos.getX();
	int j = pos.getY();
	int k = pos.getZ();
	
	controlRed.generate(world, i + -1, j, k, true);
	{
		WarsMod.generateBlock(world, i + -1, j, k + 1, WarsBlocks.controlYellow);
		WarsMod.generateBlock(world, i + 1, j, k + 1, WarsBlocks.controlBlue);
		WarsMod.generateBlock(world, i, j, k, WarsBlocks.controlRed);
		WarsMod.generateBlock(world, i, j, k + 2, WarsBlocks.controlGreen);
	}
	{
		EntityLightningBolt entityLightningBolt = new EntityLightningBolt(world, 1, 1, 1, true);
		entityLightningBolt.setLocationAndAngles((double) i + 0.5D, j, (double) k + 0.5D, 0.0F, 0.0F);
		world.spawnEntityInWorld(entityLightningBolt);
	}
	return false;
}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:Wars-Mod,代碼行數:21,代碼來源:BlockCRed.java

示例2: onBlockActivated

import net.minecraft.entity.effect.EntityLightningBolt; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack held, EnumFacing side, float par7, float par8, float par9) {
	int i = pos.getX();
	int j = pos.getY();
	int k = pos.getZ();
	
	controlGreen.generate(world, i + -1, j, k + -2, true);
	{
		WarsMod.generateBlock(world, i + -1, j, k + -1, WarsBlocks.controlYellow);
		WarsMod.generateBlock(world, i + 1, j, k + -1, WarsBlocks.controlBlue);
		WarsMod.generateBlock(world, i, j, k + -2, WarsBlocks.controlRed);
		WarsMod.generateBlock(world, i, j, k, WarsBlocks.controlGreen);

	}
	{
		EntityLightningBolt entityLightningBolt = new EntityLightningBolt(world, 1, 1, 1, true);
		entityLightningBolt.setLocationAndAngles((double) i + 0.5D, j, (double) k + 0.5D, 0.0F, 0.0F);
		world.spawnEntityInWorld(entityLightningBolt);
	}
	return false;

}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:Wars-Mod,代碼行數:23,代碼來源:BlockCGreen.java

示例3: onBlockActivated

import net.minecraft.entity.effect.EntityLightningBolt; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack held, EnumFacing side, float par7, float par8, float par9) {

	int i = pos.getX();
	int j = pos.getY();
	int k = pos.getZ();
	
	controlBlue.generate(world, i + -2, j, k + -1, true);
	{
		WarsMod.generateBlock(world, i + -2, j, k, WarsBlocks.controlYellow);
		WarsMod.generateBlock(world, i, j, k, WarsBlocks.controlBlue);
		WarsMod.generateBlock(world, i + -1, j, k + -1, WarsBlocks.controlRed);
		WarsMod.generateBlock(world, i + -1, j, k + 1, WarsBlocks.controlGreen);

	}
	{
		EntityLightningBolt entityLightningBolt = new EntityLightningBolt(world, 1, 1, 1, true);
		entityLightningBolt.setLocationAndAngles((double) i + 0.5D, j, (double) k + 0.5D, 0.0F, 0.0F);
		world.spawnEntityInWorld(entityLightningBolt);
	}
	return false;

}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:Wars-Mod,代碼行數:24,代碼來源:BlockCBlue.java

示例4: onBlockActivated

import net.minecraft.entity.effect.EntityLightningBolt; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack held, EnumFacing side, float par7, float par8, float par9) {

	int i = pos.getX();
	int j = pos.getY();
	int k = pos.getZ();
	
	controlYellow.generate(world, i, j, k + -1, true);
	{
		WarsMod.generateBlock(world, i, j, k, WarsBlocks.controlYellow);
		WarsMod.generateBlock(world, i + 2, j, k, WarsBlocks.controlBlue);
		WarsMod.generateBlock(world, i + 1, j, k + -1, WarsBlocks.controlRed);
		WarsMod.generateBlock(world, i + 1, j, k + 1, WarsBlocks.controlGreen);
	}
	{
		EntityLightningBolt entityLightningBolt = new EntityLightningBolt(world, 1, 1, 1, true);
		entityLightningBolt.setLocationAndAngles((double) i + 0.5D, j, (double) k + 0.5D, 0.0F, 0.0F);
		world.spawnEntityInWorld(entityLightningBolt);
	}
	return false;
}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:Wars-Mod,代碼行數:22,代碼來源:BlockCYellow.java

示例5: GenControlTower

import net.minecraft.entity.effect.EntityLightningBolt; //導入方法依賴的package包/類
public GenControlTower(EntityPlayer player, int i, int j, int k) {
	controlMain.generate(player.worldObj, i + -1, j, k + -1, true);
	{
		WarsMod.generateBlock(player.worldObj, i, j, k, Blocks.PLANKS);
		WarsMod.generateBlock(player.worldObj, i + -1, j, k, WarsBlocks.controlYellow);
		WarsMod.generateBlock(player.worldObj, i + 1, j, k, WarsBlocks.controlBlue);
		WarsMod.generateBlock(player.worldObj, i, j, k + -1, WarsBlocks.controlRed);
		WarsMod.generateBlock(player.worldObj, i, j, k + 1, WarsBlocks.controlGreen);
	}

	{
		EntityLightningBolt entityLightningBolt = new EntityLightningBolt(player.worldObj, i, j, k, true);
		entityLightningBolt.setLocationAndAngles((double) i + 0.5D, j, (double) k + 0.5D, 0.0F, 0.0F);
		player.worldObj.spawnEntityInWorld(entityLightningBolt);

	}
}
 
開發者ID:The-Fireplace-Minecraft-Mods,項目名稱:Wars-Mod,代碼行數:18,代碼來源:GenControlTower.java


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