File tree Expand file tree Collapse file tree
api/src/main/java/me/tofaa/entitylib/meta Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import com .github .retrooper .packetevents .protocol .world .states .WrappedBlockState ;
66import me .tofaa .entitylib .meta .Metadata ;
77import me .tofaa .entitylib .meta .types .MobMeta ;
8- import org .jetbrains .annotations .Nullable ;
9-
108import java .util .Optional ;
9+ import org .jetbrains .annotations .Nullable ;
1110
1211public class EndermanMeta extends MobMeta {
1312
@@ -33,6 +32,10 @@ public WrappedBlockState getCarriedBlockState() {
3332 }
3433
3534 public void setCarriedBlockState (WrappedBlockState blockState ) {
35+ if (blockState == null ) {
36+ setCarriedBlockID (null );
37+ return ;
38+ }
3639 setCarriedBlockID (blockState .getGlobalId ());
3740 }
3841
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public WrappedBlockState getBlockState() {
4040 return WrappedBlockState .getByGlobalId (PacketEvents .getAPI ().getServerManager ().getVersion ().toClientVersion (), getBlockStateId ());
4141 }
4242
43- public void setBlockStateId (WrappedBlockState blockState ) {
43+ public void setBlockState (WrappedBlockState blockState ) {
4444 setBlockStateId (blockState .getGlobalId ());
4545 }
4646
You can’t perform that action at this time.
0 commit comments