@@ -29,7 +29,7 @@ public class SingleFakeBlock implements FakeBlock {
2929 @ Override
3030 public void create (Player player , String title ) {
3131 this .createAndGetLastPositions (player ).addAll (this .getPlacePositions (player ));
32- this .getPlacePositions (player ).forEach (position -> {
32+ this .getLastPositions (player ).forEach (position -> {
3333 UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket ();
3434 updateBlockPacket .blockRuntimeId = GlobalBlockPalette .getOrCreateRuntimeId (player .protocol , this .blockId , 0 );
3535 updateBlockPacket .flags = UpdateBlockPacket .FLAG_NETWORK ;
@@ -66,21 +66,22 @@ public void remove(Player player) {
6666 this .lastPositions .remove (player );
6767 }
6868
69- protected CompoundTag getBlockEntityDataAt (Vector3 position , String title ) {
70- return BlockEntity .getDefaultCompound (position , title )
71- .putString ("id" , tileId )
72- .putBoolean ("isMovable" , true )
73- .putString ("CustomName" , title );
69+ @ Override
70+ public Set <Vector3 > getLastPositions (Player player ) {
71+ return lastPositions .getOrDefault (player , new HashSet <>());
7472 }
7573
76- public Set <Vector3 > createAndGetLastPositions (Player player ) {
74+ protected Set <Vector3 > createAndGetLastPositions (Player player ) {
7775 if (!lastPositions .containsKey (player )) {
7876 lastPositions .put (player , new HashSet <>());
7977 }
8078 return lastPositions .get (player );
8179 }
8280
83- public Set <Vector3 > getLastPositions (Player player ) {
84- return lastPositions .getOrDefault (player , new HashSet <>());
81+ protected CompoundTag getBlockEntityDataAt (Vector3 position , String title ) {
82+ return BlockEntity .getDefaultCompound (position , title )
83+ .putString ("id" , tileId )
84+ .putBoolean ("isMovable" , true )
85+ .putString ("CustomName" , title );
8586 }
8687}
0 commit comments