mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
Removed trailing whitespaces.
This commit is contained in:
@ -50,7 +50,7 @@ public class BaseBlock {
|
||||
* Construct the block with its type and data.
|
||||
*
|
||||
* @param type
|
||||
* @param data
|
||||
* @param data
|
||||
*/
|
||||
public BaseBlock(int type, int data) {
|
||||
this.type = (short) type;
|
||||
@ -93,21 +93,21 @@ public class BaseBlock {
|
||||
public boolean isAir() {
|
||||
return type == 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rotate this block 90 degrees.
|
||||
*/
|
||||
public void rotate90() {
|
||||
data = (byte) BlockData.rotate90(type, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rotate this block -90 degrees.
|
||||
*/
|
||||
public void rotate90Reverse() {
|
||||
data = (byte) BlockData.rotate90Reverse(type, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Flip this block.
|
||||
*/
|
||||
@ -132,7 +132,7 @@ public class BaseBlock {
|
||||
return (type == ((BaseBlock) o).type)
|
||||
&& (data == ((BaseBlock) o).data || data == -1 || ((BaseBlock) o).data == -1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BaseBlock id: " + getType() + " with damage: " + getData();
|
||||
|
@ -21,7 +21,7 @@ package com.sk89q.worldedit.blocks;
|
||||
|
||||
/**
|
||||
* Represents an item.
|
||||
*
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class BaseItem {
|
||||
@ -48,7 +48,7 @@ public class BaseItem {
|
||||
* Construct the object.
|
||||
*
|
||||
* @param id
|
||||
* @param damage
|
||||
* @param damage
|
||||
*/
|
||||
public BaseItem(int id, short damage) {
|
||||
this.id = id;
|
||||
|
@ -222,32 +222,32 @@ public enum BlockType {
|
||||
*/
|
||||
public static BlockType lookup(String name, boolean fuzzy) {
|
||||
String testName = name.replace(" ", "").toLowerCase();
|
||||
|
||||
|
||||
BlockType type = lookup.get(testName);
|
||||
|
||||
|
||||
if (type != null) {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
if (!fuzzy) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
int minDist = -1;
|
||||
|
||||
|
||||
for (Entry<String, BlockType> entry : lookup.entrySet()) {
|
||||
if (entry.getKey().charAt(0) != testName.charAt(0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
int dist = StringUtil.getLevenshteinDistance(entry.getKey(), testName);
|
||||
|
||||
|
||||
if ((dist < minDist || minDist == -1) && dist < 2) {
|
||||
minDist = dist;
|
||||
type = entry.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ public enum BlockType {
|
||||
|
||||
/**
|
||||
* Checks to see whether a block should be placed last.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -449,7 +449,7 @@ public enum BlockType {
|
||||
|
||||
/**
|
||||
* Returns true if the block uses its data value.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -470,7 +470,7 @@ public enum BlockType {
|
||||
|
||||
/**
|
||||
* Returns true if the block is a container block.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -726,7 +726,7 @@ public enum BlockType {
|
||||
* Get the block or item that would have been dropped. If nothing is
|
||||
* dropped, 0 will be returned. If the block should not be destroyed
|
||||
* (i.e. bedrock), -1 will be returned.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @deprecated This function ignores the data value.
|
||||
@ -739,7 +739,7 @@ public enum BlockType {
|
||||
}
|
||||
return dropped;
|
||||
}
|
||||
|
||||
|
||||
private static final Random random = new Random();
|
||||
public static BaseItemStack getBlockDrop(int id, short data) {
|
||||
switch (id) {
|
||||
|
@ -84,7 +84,7 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock, ContainerB
|
||||
|
||||
/**
|
||||
* Get the tile entity ID.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getTileEntityID() {
|
||||
|
@ -89,8 +89,8 @@ public class MobSpawnerBlock extends BaseBlock implements TileEntityBlock {
|
||||
|
||||
/**
|
||||
* Set the mob type.
|
||||
*
|
||||
* @param mobType
|
||||
*
|
||||
* @param mobType
|
||||
*/
|
||||
public void setMobType(String mobType) {
|
||||
this.mobType = mobType;
|
||||
|
@ -36,9 +36,9 @@ public class SignBlock extends BaseBlock implements TileEntityBlock {
|
||||
|
||||
/**
|
||||
* Construct the sign without text.
|
||||
*
|
||||
* @param type
|
||||
* @param data
|
||||
*
|
||||
* @param type
|
||||
* @param data
|
||||
*/
|
||||
public SignBlock(int type, int data) {
|
||||
super(type, data);
|
||||
@ -47,10 +47,10 @@ public class SignBlock extends BaseBlock implements TileEntityBlock {
|
||||
|
||||
/**
|
||||
* Construct the sign with text.
|
||||
*
|
||||
* @param type
|
||||
* @param data
|
||||
* @param text
|
||||
*
|
||||
* @param type
|
||||
* @param data
|
||||
* @param text
|
||||
*/
|
||||
public SignBlock(int type, int data, String[] text) {
|
||||
super(type, data);
|
||||
@ -79,7 +79,7 @@ public class SignBlock extends BaseBlock implements TileEntityBlock {
|
||||
public String getTileEntityID() {
|
||||
return "Sign";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store additional tile entity data. Returns true if the data is used.
|
||||
*
|
||||
@ -107,7 +107,7 @@ public class SignBlock extends BaseBlock implements TileEntityBlock {
|
||||
if (values == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Tag t;
|
||||
|
||||
text = new String[]{ "", "", "", "" };
|
||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
||||
public interface TileEntityBlock {
|
||||
/**
|
||||
* Return the name of the title entity ID.
|
||||
*
|
||||
*
|
||||
* @return title entity ID
|
||||
*/
|
||||
public String getTileEntityID();
|
||||
@ -45,7 +45,7 @@ public interface TileEntityBlock {
|
||||
throws DataException;
|
||||
/**
|
||||
* Get additional information from the title entity data.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* @throws DataException
|
||||
*/
|
||||
|
Reference in New Issue
Block a user