mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Remove stub injector methods
This commit is contained in:
@ -106,7 +106,5 @@ public class CombinedRegionFunction implements RegionFunction {
|
||||
}
|
||||
|
||||
|
||||
public static Class<?> inject() {
|
||||
return CombinedRegionFunction.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,8 +54,6 @@ public class BlockReplace implements RegionFunction {
|
||||
return pattern.apply(extent, position, position);
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return BlockReplace.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -119,8 +119,6 @@ public class ExtentBlockCopy implements RegionFunction {
|
||||
return state;
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return ExtentBlockCopy.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class Naturalizer implements LayerFunction {
|
||||
public Naturalizer(EditSession editSession) {
|
||||
checkNotNull(editSession);
|
||||
this.editSession = editSession;
|
||||
this.mask = new BlockTypeMask(editSession, BlockTypes.GRASS, BlockTypes.DIRT, BlockTypes.STONE);
|
||||
this.mask = new BlockTypeMask(editSession, BlockTypes.GRASS_BLOCK, BlockTypes.DIRT, BlockTypes.STONE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -75,7 +75,7 @@ public class Naturalizer implements LayerFunction {
|
||||
affected++;
|
||||
switch (depth) {
|
||||
case 0:
|
||||
editSession.setBlock(position, BlockTypes.GRASS);
|
||||
editSession.setBlock(position, BlockTypes.GRASS_BLOCK);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
@ -203,8 +203,6 @@ public class ExtentEntityCopy implements EntityFunction {
|
||||
return state;
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return ExtentEntityCopy.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class FloraGenerator implements RegionFunction {
|
||||
*/
|
||||
public static Pattern getTemperatePattern() {
|
||||
RandomPattern pattern = new RandomPattern();
|
||||
pattern.add(new BlockPattern(BlockTypes.GRASS.getDefaultState()), 300);
|
||||
pattern.add(new BlockPattern(BlockTypes.GRASS_BLOCK.getDefaultState()), 300);
|
||||
pattern.add(new BlockPattern(BlockTypes.POPPY.getDefaultState()), 5);
|
||||
pattern.add(new BlockPattern(BlockTypes.DANDELION.getDefaultState()), 5);
|
||||
return pattern;
|
||||
@ -106,7 +106,7 @@ public class FloraGenerator implements RegionFunction {
|
||||
public boolean apply(Vector position) throws WorldEditException {
|
||||
BlockStateHolder block = editSession.getBlock(position);
|
||||
|
||||
if (block.getBlockType() == BlockTypes.GRASS) {
|
||||
if (block.getBlockType() == BlockTypes.GRASS_BLOCK) {
|
||||
editSession.setBlock(position.add(0, 1, 0), temperatePattern.apply(position));
|
||||
return true;
|
||||
} else if (block.getBlockType() == BlockTypes.SAND) {
|
||||
|
@ -53,7 +53,7 @@ public class ForestGenerator implements RegionFunction {
|
||||
BlockStateHolder block = editSession.getBlock(position);
|
||||
BlockType t = block.getBlockType();
|
||||
|
||||
if (t == BlockTypes.GRASS || t == BlockTypes.DIRT) {
|
||||
if (t == BlockTypes.GRASS_BLOCK || t == BlockTypes.DIRT) {
|
||||
treeType.generate(editSession, position.add(0, 1, 0));
|
||||
return true;
|
||||
} else if (t == BlockTypes.TALL_GRASS || t == BlockTypes.DEAD_BUSH || t == BlockTypes.POPPY || t == BlockTypes.DANDELION) { // TODO: This list needs to be moved
|
||||
|
@ -163,7 +163,7 @@ public class GardenPatchGenerator implements RegionFunction {
|
||||
position = position.add(0, 1, 0);
|
||||
}
|
||||
|
||||
if (editSession.getBlock(position.add(0, -1, 0)).getBlockType() != BlockTypes.GRASS) {
|
||||
if (editSession.getBlock(position.add(0, -1, 0)).getBlockType() != BlockTypes.GRASS_BLOCK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ public class GardenPatchGenerator implements RegionFunction {
|
||||
* @return a pumpkin pattern
|
||||
*/
|
||||
public static Pattern getPumpkinPattern() {
|
||||
return new BlockPattern(BlockTypes.CARVED_PUMPKIN.getDefaultState());
|
||||
return BlockTypes.PUMPKIN.getDefaultState();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,25 +1,61 @@
|
||||
/*
|
||||
* WorldEdit, a Minecraft world manipulation toolkit
|
||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
||||
* Copyright (C) WorldEdit team and contributors
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldedit.function.mask;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
|
||||
/**
|
||||
* An abstract implementation of {@link Mask} that takes uses an {@link Extent}.
|
||||
*/
|
||||
public abstract class AbstractExtentMask extends AbstractMask {
|
||||
private transient Extent extent;
|
||||
|
||||
private Extent extent;
|
||||
|
||||
/**
|
||||
* Construct a new mask.
|
||||
*
|
||||
* @param extent the extent
|
||||
*/
|
||||
protected AbstractExtentMask(Extent extent) {
|
||||
this.setExtent(extent);
|
||||
setExtent(extent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the extent.
|
||||
*
|
||||
* @return the extent
|
||||
*/
|
||||
public Extent getExtent() {
|
||||
return this.extent;
|
||||
return extent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the extent.
|
||||
*
|
||||
* @param extent the extent
|
||||
*/
|
||||
public void setExtent(Extent extent) {
|
||||
Preconditions.checkNotNull(extent);
|
||||
checkNotNull(extent);
|
||||
this.extent = extent;
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return AbstractExtentMask.class;
|
||||
}
|
||||
}
|
||||
}
|
@ -25,7 +25,5 @@ import java.io.Serializable;
|
||||
* A base class of {@link Mask} that all masks should inherit from.
|
||||
*/
|
||||
public abstract class AbstractMask implements Mask, Serializable {
|
||||
public static Class<?> inject() {
|
||||
return AbstractMask.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -196,7 +196,5 @@ public class BlockMask extends AbstractExtentMask {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return BlockMask.class;
|
||||
}
|
||||
|
||||
}
|
@ -153,7 +153,5 @@ public final class Masks {
|
||||
}
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return Masks.class;
|
||||
}
|
||||
|
||||
}
|
@ -87,7 +87,5 @@ public class OffsetMask extends AbstractMask {
|
||||
}
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return OffsetMask.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,5 @@ public class SolidBlockMask extends BlockTypeMask {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return SolidBlockMask.class;
|
||||
}
|
||||
|
||||
}
|
@ -114,7 +114,5 @@ public class ChangeSetExecutor implements Operation {
|
||||
return new ChangeSetExecutor(changeSet, Type.REDO, context, null, 0);
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return ChangeSetExecutor.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -377,7 +377,5 @@ public class ForwardExtentCopy implements Operation {
|
||||
public void addStatusMessages(List<String> messages) {
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return ForwardExtentCopy.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -80,7 +80,5 @@ public final class Operations {
|
||||
return;
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return Operations.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,5 @@ public abstract class AbstractPattern implements Pattern, Serializable {
|
||||
public AbstractPattern() {
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return AbstractPattern.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,7 +49,5 @@ public class ClipboardPattern extends AbstractPattern {
|
||||
return clipboard.getBlock(mutable);
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return ClipboardPattern.class;
|
||||
}
|
||||
|
||||
}
|
@ -72,8 +72,6 @@ public class RandomPattern extends AbstractPattern {
|
||||
return collection.next(get.getBlockX(), get.getBlockY(), get.getBlockZ()).apply(extent, set, get);
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return RandomPattern.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -215,7 +215,5 @@ public abstract class BreadthFirstSearch implements Operation {
|
||||
public void cancel() {
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return BreadthFirstSearch.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,7 +69,5 @@ public class DownwardVisitor extends RecursiveVisitor {
|
||||
return ((fromY == this.baseY) || (to.getBlockY() - from.getBlockY() < 0)) && super.isVisitable(from, to);
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return DownwardVisitor.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -83,7 +83,5 @@ public class EntityVisitor implements Operation {
|
||||
messages.add(BBC.VISITOR_ENTITY.format(getAffected()));
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return Operations.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -100,8 +100,6 @@ public class FlatRegionVisitor implements Operation {
|
||||
messages.add(BBC.VISITOR_FLAT.format(getAffected()));
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return Operations.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -132,7 +132,5 @@ public class LayerVisitor implements Operation {
|
||||
public void addStatusMessages(final List<String> messages) {
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return Operations.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,8 +52,6 @@ public class NonRisingVisitor extends RecursiveVisitor {
|
||||
directions.add(new Vector(0, -1, 0));
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return NonRisingVisitor.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -60,7 +60,5 @@ public class RecursiveVisitor extends BreadthFirstSearch {
|
||||
return this.mask.test(to);
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return RecursiveVisitor.class;
|
||||
}
|
||||
|
||||
}
|
@ -198,7 +198,5 @@ public class RegionVisitor implements Operation {
|
||||
messages.add(BBC.VISITOR_BLOCK.format(getAffected()));
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return Operations.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user