File tree 6 files changed +9
-15
lines changed
6 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ public function generatePayload(NbtSerializer $serializer): string
31
31
*/
32
32
public function setValue (float $ value ): FloatValueTag
33
33
{
34
- if ($ value !== $ this ->value ) {
35
- $ this ->resetRawValue ();
36
- }
34
+ $ this ->resetRawValue ();
37
35
return parent ::setValue ($ value );
38
36
}
39
37
@@ -48,4 +46,4 @@ protected function readPayload(Reader $reader): Tag
48
46
$ this ->value = $ reader ->getSerializer ()->decodeDouble ($ this ->rawValue );
49
47
return $ this ;
50
48
}
51
- }
49
+ }
Original file line number Diff line number Diff line change @@ -29,9 +29,7 @@ public function generatePayload(NbtSerializer $serializer): string
29
29
*/
30
30
public function setValue (float $ value ): FloatValueTag
31
31
{
32
- if ($ value !== $ this ->value ) {
33
- $ this ->resetRawValue ();
34
- }
32
+ $ this ->resetRawValue ();
35
33
return parent ::setValue ($ value );
36
34
}
37
35
@@ -46,4 +44,4 @@ protected function readPayload(Reader $reader): Tag
46
44
$ this ->value = $ reader ->getSerializer ()->decodeFloat ($ this ->rawValue );
47
45
return $ this ;
48
46
}
49
- }
47
+ }
Original file line number Diff line number Diff line change 4
4
5
5
abstract class FloatValueTag extends Tag
6
6
{
7
- protected float $ value ;
7
+ protected float $ value = 0 ;
8
8
9
9
/**
10
10
* @return float
Original file line number Diff line number Diff line change 4
4
5
5
abstract class IntValueTag extends Tag
6
6
{
7
- protected int $ value ;
7
+ protected int $ value = 0 ;
8
8
9
9
/**
10
10
* @return int
Original file line number Diff line number Diff line change @@ -30,9 +30,7 @@ public function generatePayload(NbtSerializer $serializer): string
30
30
*/
31
31
public function setValue (int $ value ): IntValueTag
32
32
{
33
- if ($ value !== $ this ->value ) {
34
- $ this ->resetRawValue ();
35
- }
33
+ $ this ->resetRawValue ();
36
34
return parent ::setValue ($ value );
37
35
}
38
36
@@ -47,4 +45,4 @@ protected function readPayload(Reader $reader): Tag
47
45
$ this ->value = $ result ->getValue ();
48
46
return $ this ;
49
47
}
50
- }
48
+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class StringTag extends Tag
10
10
{
11
11
public const TYPE = TagType::TAG_String;
12
12
13
- protected string $ value ;
13
+ protected string $ value = "" ;
14
14
15
15
/**
16
16
* @return string
You can’t perform that action at this time.
0 commit comments