mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-25 09:04:27 +00:00
some codestyle application
This commit is contained in:
@ -37,8 +37,9 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* A mob spawner block.
|
||||
*
|
||||
* @deprecated WorldEdit does not handle interpreting NBT,
|
||||
* deprecated for removal without replacement
|
||||
* deprecated for removal without replacement
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public class MobSpawnerBlock extends BaseBlock {
|
||||
@ -69,7 +70,7 @@ public class MobSpawnerBlock extends BaseBlock {
|
||||
* Construct the mob spawner block.
|
||||
*
|
||||
* @param blockState The block state
|
||||
* @param mobType mob type
|
||||
* @param mobType mob type
|
||||
*/
|
||||
public MobSpawnerBlock(BlockState blockState, String mobType) {
|
||||
super(blockState);
|
||||
@ -140,7 +141,8 @@ public class MobSpawnerBlock extends BaseBlock {
|
||||
if (spawnPotentials == null) {
|
||||
values.put("SpawnPotentials", new ListTag(CompoundTag.class, ImmutableList.of(
|
||||
new CompoundTag(ImmutableMap.of("Weight", new IntTag(1), "Entity",
|
||||
new CompoundTag(ImmutableMap.of("id", new StringTag(mobType))))))));
|
||||
new CompoundTag(ImmutableMap.of("id", new StringTag(mobType)))
|
||||
)))));
|
||||
} else {
|
||||
values.put("SpawnPotentials", new ListTag(CompoundTag.class, spawnPotentials.getValue()));
|
||||
}
|
||||
|
@ -33,25 +33,25 @@ import java.util.Map;
|
||||
* Represents a sign block.
|
||||
*
|
||||
* @deprecated WorldEdit does not handle interpreting NBT,
|
||||
* deprecated for removal without replacement
|
||||
* deprecated for removal without replacement
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public class SignBlock extends BaseBlock {
|
||||
|
||||
private String[] text;
|
||||
|
||||
private static String EMPTY = "{\"text\":\"\"}";
|
||||
private static String EMPTY = "{\"text\":\"\"}";
|
||||
|
||||
/**
|
||||
* Construct the sign with text.
|
||||
*
|
||||
* @param blockState The block state
|
||||
* @param text lines of text
|
||||
* @param text lines of text
|
||||
*/
|
||||
public SignBlock(BlockState blockState, String[] text) {
|
||||
super(blockState);
|
||||
if (text == null) {
|
||||
this.text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY };
|
||||
this.text = new String[]{EMPTY, EMPTY, EMPTY, EMPTY};
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < text.length; i++) {
|
||||
@ -115,7 +115,7 @@ public class SignBlock extends BaseBlock {
|
||||
|
||||
Tag t;
|
||||
|
||||
text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY };
|
||||
text = new String[]{EMPTY, EMPTY, EMPTY, EMPTY};
|
||||
|
||||
t = values.get("id");
|
||||
if (!(t instanceof StringTag) || !((StringTag) t).getValue().equals(getNbtId())) {
|
||||
|
@ -33,7 +33,7 @@ import java.util.Map;
|
||||
* A skull block.
|
||||
*
|
||||
* @deprecated WorldEdit does not handle interpreting NBT,
|
||||
* deprecated for removal without replacement
|
||||
* deprecated for removal without replacement
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public class SkullBlock extends BaseBlock {
|
||||
@ -42,6 +42,7 @@ public class SkullBlock extends BaseBlock {
|
||||
|
||||
/**
|
||||
* Construct the skull block with a default type of skelton.
|
||||
*
|
||||
* @param state BlockState to set
|
||||
*/
|
||||
public SkullBlock(BlockState state) {
|
||||
@ -52,8 +53,9 @@ public class SkullBlock extends BaseBlock {
|
||||
/**
|
||||
* Construct the skull block with a given rotation and owner.
|
||||
* The type is assumed to be player unless owner is null or empty.
|
||||
*
|
||||
* @param blockState BlockState to set
|
||||
* @param owner name of player
|
||||
* @param owner name of player
|
||||
*/
|
||||
public SkullBlock(BlockState blockState, String owner) {
|
||||
super(blockState);
|
||||
@ -62,6 +64,7 @@ public class SkullBlock extends BaseBlock {
|
||||
|
||||
/**
|
||||
* Set the skull's owner. Automatically sets type to player if not empty or null.
|
||||
*
|
||||
* @param owner player name to set the skull to
|
||||
*/
|
||||
public void setOwner(String owner) {
|
||||
@ -78,6 +81,7 @@ public class SkullBlock extends BaseBlock {
|
||||
|
||||
/**
|
||||
* Get the skull's owner. Returns null if unset.
|
||||
*
|
||||
* @return player name or null
|
||||
*/
|
||||
public String getOwner() {
|
||||
@ -123,4 +127,5 @@ public class SkullBlock extends BaseBlock {
|
||||
setOwner(((CompoundTag) t).getValue().get("Name").getValue().toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user