コード例 #1
0
    @SideOnly(Side.CLIENT)
    private void updateEffects(MovingObjectPosition res, boolean isGood) {
      double x, y, z;
      if (res != null) {
        x = res.hitVec.xCoord;
        y = res.hitVec.yCoord;
        z = res.hitVec.zCoord;
        if (res.typeOfHit == MovingObjectType.ENTITY) {
          y += res.entityHit.getEyeHeight();
        }
      } else {
        Motion3D mo = new Motion3D(player, true).move(DISTANCE);
        x = mo.px;
        y = mo.py;
        z = mo.pz;
      }
      arc.setFromTo(
          player.posX, player.posY + ACRenderingHelper.getHeightFix(player), player.posZ, x, y, z);

      if (isGood) {
        surround.updatePos(res.blockX + 0.5, res.blockY, res.blockZ + 0.5);
        surround.draw = true;
      } else {
        surround.draw = false;
      }
    }
コード例 #2
0
 @SideOnly(Side.CLIENT)
 private void startEffects() {
   ACSounds.playClient(sound = new FollowEntitySound(player, SOUND).setLoop());
   surround = new EntitySurroundArc(player);
   surround.setArcType(ArcType.THIN);
   world.spawnEntityInWorld(surround);
 }
コード例 #3
0
 @SideOnly(Side.CLIENT)
 private void endEffects() {
   sound.stop();
   surround.setDead();
 }
コード例 #4
0
 @SideOnly(Side.CLIENT)
 private void endEffects() {
   if (surround != null) surround.setDead();
   if (arc != null) arc.setDead();
   if (sound != null) sound.stop();
 }