本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}