@@ -5,11 +5,9 @@ import crafttweaker.world.IBlockPos;
5
5
import crafttweaker . data. IData;
6
6
import crafttweaker . player. IPlayer;
7
7
import crafttweaker . world. IFacing;
8
- import mods . ctutils.player. Player;
9
8
import scripts . grassUtils. Logger;
10
9
import crafttweaker . event. PlayerTickEvent;
11
10
import crafttweaker . event. PlayerRespawnEvent;
12
- import mods . ctutils.utils. Math;
13
11
14
12
static storageData as IData [string ] = {};
15
13
@@ -41,10 +39,11 @@ function spawnItem(world as IWorld, item as IItemStack, pos as IBlockPos) as boo
41
39
return world . spawnEntity(item . createEntityItem(world, pos));
42
40
}
43
41
42
+ /* Use PlayerPersisted sub tag instead
44
43
function enablePlayerDataKeeper() {
45
44
events.onPlayerTick(function(event as PlayerTickEvent) {
46
45
val player as IPlayer = event.player;
47
- if (!player . world. remote && ! Player . isFake( player) ) {
46
+ if (!player.world.remote && player.fake ) {
48
47
storageData[player.id] = player.data;
49
48
}
50
49
});
@@ -55,7 +54,7 @@ function enablePlayerDataKeeper() {
55
54
player.update(storageData[player.id]);
56
55
}
57
56
});
58
- }
57
+ } */
59
58
60
59
function defaultDataHandler (data as IData, player as IPlayer) as bool {
61
60
val map = data . asMap();
0 commit comments