2011-01-01 18:33:18 +00:00
|
|
|
/*
|
2014-04-04 22:03:18 +00:00
|
|
|
* WorldEdit, a Minecraft world manipulation toolkit
|
|
|
|
* Copyright (C) sk89q <http://www.sk89q.com>
|
|
|
|
* Copyright (C) WorldEdit team and contributors
|
2011-01-01 18:33:18 +00:00
|
|
|
*
|
2014-04-04 22:03:18 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or
|
2011-01-01 18:33:18 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2014-04-04 22:03:18 +00:00
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
|
|
* for more details.
|
2011-01-01 18:33:18 +00:00
|
|
|
*
|
2014-04-04 22:03:18 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
2011-01-01 18:33:18 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2011-02-18 23:49:50 +00:00
|
|
|
*/
|
2011-01-01 18:33:18 +00:00
|
|
|
|
|
|
|
package com.sk89q.worldedit;
|
|
|
|
|
2014-07-15 19:13:57 +00:00
|
|
|
import com.sk89q.worldedit.blocks.BaseBlock;
|
2012-03-17 22:24:30 +00:00
|
|
|
import com.sk89q.worldedit.util.TreeGenerator;
|
2014-04-05 05:40:29 +00:00
|
|
|
import com.sk89q.worldedit.world.AbstractWorld;
|
|
|
|
import com.sk89q.worldedit.world.World;
|
2011-01-08 19:26:27 +00:00
|
|
|
|
2011-01-01 18:33:18 +00:00
|
|
|
/**
|
2014-04-05 05:40:29 +00:00
|
|
|
* A legacy abstract implementation of {@link World}. New implementations
|
|
|
|
* should use {@link AbstractWorld} when possible.
|
2012-03-02 04:47:19 +00:00
|
|
|
*
|
2014-04-05 05:40:29 +00:00
|
|
|
* @deprecated Replace with {@link World} wherever appropriate
|
2011-01-01 18:33:18 +00:00
|
|
|
*/
|
2014-04-05 05:40:29 +00:00
|
|
|
@Deprecated
|
|
|
|
public abstract class LocalWorld extends AbstractWorld {
|
2014-03-30 21:16:06 +00:00
|
|
|
|
2014-04-05 05:40:29 +00:00
|
|
|
@Override
|
|
|
|
public BaseBlock getLazyBlock(Vector position) {
|
|
|
|
return getBlock(position);
|
|
|
|
}
|
2011-01-08 19:26:27 +00:00
|
|
|
|
2014-04-05 05:40:29 +00:00
|
|
|
@Override
|
|
|
|
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, Vector pt) throws MaxChangedBlocksException {
|
2012-03-17 22:24:30 +00:00
|
|
|
switch (type) {
|
|
|
|
case BIG_TREE:
|
|
|
|
return generateBigTree(editSession, pt);
|
|
|
|
case BIRCH:
|
|
|
|
return generateBirchTree(editSession, pt);
|
|
|
|
case REDWOOD:
|
|
|
|
return generateRedwoodTree(editSession, pt);
|
|
|
|
case TALL_REDWOOD:
|
|
|
|
return generateTallRedwoodTree(editSession, pt);
|
|
|
|
default:
|
|
|
|
case TREE:
|
|
|
|
return generateTree(editSession, pt);
|
|
|
|
}
|
|
|
|
}
|
2011-01-09 18:22:01 +00:00
|
|
|
|
2011-02-18 23:49:50 +00:00
|
|
|
@Override
|
2014-04-05 05:40:29 +00:00
|
|
|
public boolean generateTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException {
|
2011-11-28 06:13:19 +00:00
|
|
|
return false;
|
|
|
|
}
|
2011-11-29 08:09:32 +00:00
|
|
|
|
2014-03-30 04:05:09 +00:00
|
|
|
@Override
|
2014-04-05 05:40:29 +00:00
|
|
|
public boolean generateBigTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException {
|
|
|
|
return false;
|
2014-04-01 01:22:44 +00:00
|
|
|
}
|
|
|
|
|
2012-08-23 23:52:37 +00:00
|
|
|
@Override
|
2014-04-05 05:40:29 +00:00
|
|
|
public boolean generateBirchTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException {
|
|
|
|
return false;
|
2014-03-30 21:16:06 +00:00
|
|
|
}
|
|
|
|
|
2014-04-04 00:52:53 +00:00
|
|
|
@Override
|
2014-04-05 05:40:29 +00:00
|
|
|
public boolean generateRedwoodTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException {
|
|
|
|
return false;
|
2014-04-04 00:52:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-05 05:40:29 +00:00
|
|
|
public boolean generateTallRedwoodTree(EditSession editSession, Vector pt) throws MaxChangedBlocksException {
|
|
|
|
return false;
|
2014-04-04 00:52:53 +00:00
|
|
|
}
|
|
|
|
|
2011-01-01 18:33:18 +00:00
|
|
|
}
|