mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Rewrote block parsing, and further switch to BlockState
This commit is contained in:
@ -22,6 +22,7 @@ package com.sk89q.worldedit.blocks;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.StringTag;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.blocks.type.BlockState;
|
||||
import com.sk89q.worldedit.util.gson.GsonUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -36,26 +37,14 @@ public class SignBlock extends BaseBlock implements TileEntityBlock {
|
||||
|
||||
private static String EMPTY = "{\"text\":\"\"}";
|
||||
|
||||
/**
|
||||
* Construct the sign without text.
|
||||
*
|
||||
* @param type type ID
|
||||
* @param data data value (orientation)
|
||||
*/
|
||||
public SignBlock(int type, int data) {
|
||||
super(type, data);
|
||||
this.text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY };
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the sign with text.
|
||||
*
|
||||
* @param type type ID
|
||||
* @param data data value (orientation)
|
||||
* @param blockState The block state
|
||||
* @param text lines of text
|
||||
*/
|
||||
public SignBlock(int type, int data, String[] text) {
|
||||
super(type, data);
|
||||
public SignBlock(BlockState blockState, String[] text) {
|
||||
super(blockState);
|
||||
if (text == null) {
|
||||
this.text = new String[] { EMPTY, EMPTY, EMPTY, EMPTY };
|
||||
return;
|
||||
|
Reference in New Issue
Block a user