当前位置: 首页>>代码示例>>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;未经允许,请勿转载。