本文整理匯總了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);
}
}