コード例 #1
0
ファイル: Teleport.java プロジェクト: mosemister/MoseCraft
 @SuppressWarnings("unchecked")
 private void animation3() {
   for (Location<World> loc : POS2) {
     World world = loc.getExtent();
     Location<World>[] pos = mix(loc, POS1);
     for (Location<World> pos5 : pos) {
       Lightning light =
           (Lightning) world.createEntity(EntityTypes.LIGHTNING, pos5.getBlockPosition()).get();
       light.setEffect(true);
       world.spawnEntity(light, Causes.TELEPORT_LIGHTNING.build());
     }
   }
 }
コード例 #2
0
ファイル: Teleport.java プロジェクト: mosemister/MoseCraft
 @SuppressWarnings("unchecked")
 private void animation2() {
   for (Location<World> loc : POS2) {
     World world = loc.getExtent();
     Location<World> pos1 =
         world.getLocation(loc.getBlockX() - 3, loc.getBlockY(), loc.getBlockZ() + 3);
     Location<World> pos2 =
         world.getLocation(loc.getBlockX() + 3, loc.getBlockY(), loc.getBlockZ() + 3);
     Location<World> pos3 =
         world.getLocation(loc.getBlockX() - 3, loc.getBlockY(), loc.getBlockZ() - 3);
     Location<World> pos4 =
         world.getLocation(loc.getBlockX() + 3, loc.getBlockY(), loc.getBlockZ() + 3);
     Location<World>[] pos = mix(pos1, pos2, pos3, pos4);
     for (Location<World> pos5 : pos) {
       Lightning light =
           (Lightning) world.createEntity(EntityTypes.LIGHTNING, pos5.getBlockPosition()).get();
       light.setEffect(true);
       world.spawnEntity(light, Causes.TELEPORT_LIGHTNING.build());
     }
   }
 }