File tree 14 files changed +4
-106
lines changed
worldedit-core/src/main/java/com/sk89q/jnbt
14 files changed +4
-106
lines changed Original file line number Diff line number Diff line change @@ -53,19 +53,6 @@ public byte[] getValue() {
53
53
return innerTag .value ();
54
54
}
55
55
56
- @ Override
57
- public String toString () {
58
- StringBuilder hex = new StringBuilder ();
59
- for (byte b : innerTag .value ()) {
60
- String hexDigits = Integer .toHexString (b ).toUpperCase (Locale .ROOT );
61
- if (hexDigits .length () == 1 ) {
62
- hex .append ("0" );
63
- }
64
- hex .append (hexDigits ).append (" " );
65
- }
66
- return "TAG_Byte_Array(" + hex + ")" ;
67
- }
68
-
69
56
@ Override
70
57
public ByteArrayBinaryTag asBinaryTag () {
71
58
return innerTag ;
Original file line number Diff line number Diff line change @@ -51,11 +51,6 @@ public Byte getValue() {
51
51
return innerTag .value ();
52
52
}
53
53
54
- @ Override
55
- public String toString () {
56
- return "TAG_Byte(" + innerTag .value () + ")" ;
57
- }
58
-
59
54
@ Override
60
55
public ByteBinaryTag asBinaryTag () {
61
56
return innerTag ;
Original file line number Diff line number Diff line change @@ -439,17 +439,6 @@ public String getString(String key) {
439
439
}
440
440
}
441
441
442
- @ Override
443
- public String toString () {
444
- StringBuilder bldr = new StringBuilder ();
445
- bldr .append ("TAG_Compound" ).append (": " ).append (value .size ()).append (" entries\r \n {\r \n " );
446
- for (Map .Entry <String , Tag > entry : value .entrySet ()) {
447
- bldr .append (" " ).append (entry .getValue ().toString ().replaceAll ("\r \n " , "\r \n " )).append ("\r \n " );
448
- }
449
- bldr .append ("}" );
450
- return bldr .toString ();
451
- }
452
-
453
442
@ Override
454
443
public CompoundBinaryTag asBinaryTag () {
455
444
CompoundBinaryTag .Builder builder = CompoundBinaryTag .builder ();
Original file line number Diff line number Diff line change @@ -56,9 +56,4 @@ public Double getValue() {
56
56
return innerTag .value ();
57
57
}
58
58
59
- @ Override
60
- public String toString () {
61
- return "TAG_Double(" + innerTag .value () + ")" ;
62
- }
63
-
64
59
}
Original file line number Diff line number Diff line change @@ -34,11 +34,6 @@ public Object getValue() {
34
34
return null ;
35
35
}
36
36
37
- @ Override
38
- public String toString () {
39
- return "TAG_End" ;
40
- }
41
-
42
37
@ Override
43
38
public EndBinaryTag asBinaryTag () {
44
39
return EndBinaryTag .get ();
Original file line number Diff line number Diff line change 19
19
20
20
package com .sk89q .jnbt ;
21
21
22
- import com .sk89q .worldedit .util .nbt .BinaryTag ;
23
22
import com .sk89q .worldedit .util .nbt .FloatBinaryTag ;
24
23
25
24
/**
@@ -57,9 +56,4 @@ public Float getValue() {
57
56
return innerTag .value ();
58
57
}
59
58
60
- @ Override
61
- public String toString () {
62
- return "TAG_Float(" + innerTag .value () + ")" ;
63
- }
64
-
65
59
}
Original file line number Diff line number Diff line change 21
21
22
22
import com .sk89q .worldedit .util .nbt .IntArrayBinaryTag ;
23
23
24
- import java .util .Locale ;
25
-
26
24
import static com .google .common .base .Preconditions .checkNotNull ;
27
25
28
26
/**
@@ -61,17 +59,4 @@ public int[] getValue() {
61
59
return innerTag .value ();
62
60
}
63
61
64
- @ Override
65
- public String toString () {
66
- StringBuilder hex = new StringBuilder ();
67
- for (int b : innerTag .value ()) {
68
- String hexDigits = Integer .toHexString (b ).toUpperCase (Locale .ROOT );
69
- if (hexDigits .length () == 1 ) {
70
- hex .append ("0" );
71
- }
72
- hex .append (hexDigits ).append (" " );
73
- }
74
- return "TAG_Int_Array(" + hex + ")" ;
75
- }
76
-
77
62
}
Original file line number Diff line number Diff line change @@ -56,9 +56,4 @@ public Integer getValue() {
56
56
return innerTag .value ();
57
57
}
58
58
59
- @ Override
60
- public String toString () {
61
- return "TAG_Int(" + innerTag .value () + ")" ;
62
- }
63
-
64
59
}
Original file line number Diff line number Diff line change @@ -449,15 +449,4 @@ public String getString(int index) {
449
449
}
450
450
}
451
451
452
- @ Override
453
- public String toString () {
454
- StringBuilder bldr = new StringBuilder ();
455
- bldr .append ("TAG_List" ).append (": " ).append (value .size ()).append (" entries of type " ).append (NBTUtils .getTypeName (type )).append ("\r \n {\r \n " );
456
- for (Tag t : value ) {
457
- bldr .append (" " ).append (t .toString ().replaceAll ("\r \n " , "\r \n " )).append ("\r \n " );
458
- }
459
- bldr .append ("}" );
460
- return bldr .toString ();
461
- }
462
-
463
452
}
Original file line number Diff line number Diff line change 21
21
22
22
import com .sk89q .worldedit .util .nbt .LongArrayBinaryTag ;
23
23
24
- import java .util .Locale ;
25
-
26
24
import static com .google .common .base .Preconditions .checkNotNull ;
27
25
28
26
/**
@@ -61,17 +59,4 @@ public long[] getValue() {
61
59
return innerTag .value ();
62
60
}
63
61
64
- @ Override
65
- public String toString () {
66
- StringBuilder hex = new StringBuilder ();
67
- for (long b : innerTag .value ()) {
68
- String hexDigits = Long .toHexString (b ).toUpperCase (Locale .ROOT );
69
- if (hexDigits .length () == 1 ) {
70
- hex .append ("0" );
71
- }
72
- hex .append (hexDigits ).append (" " );
73
- }
74
- return "TAG_Long_Array(" + hex + ")" ;
75
- }
76
-
77
62
}
Original file line number Diff line number Diff line change @@ -56,9 +56,4 @@ public Long getValue() {
56
56
return innerTag .value ();
57
57
}
58
58
59
- @ Override
60
- public String toString () {
61
- return "TAG_Long(" + innerTag .value () + ")" ;
62
- }
63
-
64
59
}
Original file line number Diff line number Diff line change @@ -56,9 +56,4 @@ public Short getValue() {
56
56
return innerTag .value ();
57
57
}
58
58
59
- @ Override
60
- public String toString () {
61
- return "TAG_Short(" + innerTag .value () + ")" ;
62
- }
63
-
64
59
}
Original file line number Diff line number Diff line change @@ -59,9 +59,4 @@ public String getValue() {
59
59
return innerTag .value ();
60
60
}
61
61
62
- @ Override
63
- public String toString () {
64
- return "TAG_String(" + innerTag .value () + ")" ;
65
- }
66
-
67
62
}
Original file line number Diff line number Diff line change @@ -36,4 +36,8 @@ public abstract class Tag implements BinaryTagLike {
36
36
*/
37
37
public abstract Object getValue ();
38
38
39
+ @ Override
40
+ public String toString () {
41
+ return asBinaryTag ().toString ();
42
+ }
39
43
}
You can’t perform that action at this time.
0 commit comments