Examples of BlockChange


Examples of com.forgeessentials.playerlogger.BlockChange

    {
      try
      {
        if (i.hasNext())
        {
          BlockChange bc = i.next();
          world = DimensionManager.getWorld(bc.getDimension());

          if (bc.getType() == 0)
          {
            if (!undo)
            {
              place(bc);
            }
            else
            {
              remove(bc);
            }
          }
          else if (bc.getType() == 1)
          {
            if (undo)
            {
              place(bc);
            }
            else
            {
              remove(bc);
            }
          }
          currentTickChanged++;
          world.markBlockForUpdate(bc.getX(), bc.getY(), bc.getZ());
        }
        else
        {
          isComplete = true;
        }
View Full Code Here

Examples of com.sk89q.worldedit.history.change.BlockChange

     * @param block the new block
     * @deprecated Get the change set with {@link #getChangeSet()} and add the change with that
     */
    @Deprecated
    public void rememberChange(Vector position, BaseBlock existing, BaseBlock block) {
        changeSet.add(new BlockChange(position.toBlockVector(), existing, block));
    }
View Full Code Here

Examples of com.sk89q.worldedit.history.change.BlockChange

    }

    @Override
    public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
        BaseBlock previous = getBlock(location);
        changeSet.add(new BlockChange(location.toBlockVector(), previous, block));
        return super.setBlock(location, block);
    }
View Full Code Here

Examples of com.sk89q.worldedit.history.change.BlockChange

    @Override
    public void add(Change change) {
        checkNotNull(change);

        if (change instanceof BlockChange) {
            BlockChange blockChange = (BlockChange) change;
            BlockVector position = blockChange.getPosition();
            previous.put(position, blockChange.getPrevious());
            current.put(position, blockChange.getCurrent());
        } else {
            super.add(change);
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.history.change.BlockChange

     */
    private Function<Entry<BlockVector, BaseBlock>, Change> createTransform() {
        return new Function<Entry<BlockVector, BaseBlock>, Change>() {
            @Override
            public Change apply(Entry<BlockVector, BaseBlock> entry) {
                return new BlockChange(entry.getKey(), entry.getValue(), entry.getValue());
            }
        };
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.