mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Get rid of the string equality and convert a few more ID uses over.
This commit is contained in:
@ -25,6 +25,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.blocks.type.BlockTypes;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
@ -198,8 +199,8 @@ public class TreeGenerator {
|
||||
int trunkHeight = (int) Math.floor(Math.random() * 2) + 3;
|
||||
int height = (int) Math.floor(Math.random() * 5) + 8;
|
||||
|
||||
BaseBlock logBlock = new BaseBlock(BlockID.LOG);
|
||||
BaseBlock leavesBlock = new BaseBlock(BlockID.LEAVES);
|
||||
BaseBlock logBlock = new BaseBlock(BlockTypes.OAK_LOG);
|
||||
BaseBlock leavesBlock = new BaseBlock(BlockTypes.OAK_LEAVES);
|
||||
|
||||
// Create trunk
|
||||
for (int i = 0; i < trunkHeight; ++i) {
|
||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.util.formatting;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@ -183,9 +184,7 @@ public class ColorCodeBuilder {
|
||||
if ((transformed = transform(wordStr)) != null) {
|
||||
line.append(transformed);
|
||||
} else {
|
||||
for (String partialWord : word.toString().split("(?<=\\G.{" + lineLength + "})")) {
|
||||
lines.add(partialWord);
|
||||
}
|
||||
lines.addAll(Arrays.asList(word.toString().split("(?<=\\G.{" + lineLength + "})")));
|
||||
}
|
||||
} else if (line.length() + word.length() - lineColorChars == lineLength) { // Line exactly the correct length...newline
|
||||
line.append(' ');
|
||||
|
Reference in New Issue
Block a user