Skip to content

Commit 5b1f11c

Browse files
committedMay 18, 2023
remove ctutils deps
1 parent f0d6609 commit 5b1f11c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# GrassUtils
2+
23
A bunch of utils to make crafttweaker and contenttweaker easy to use.(MC 1.12.2)
34

45
提供了一些工具来方便地使用CoT和CrT(MC1.12.2)
56

67
## Mod Dependencies
7-
[Crafttweaker](https://www.curseforge.com/minecraft/mc-mods/crafttweaker)
88

9-
[Crafttweaker Utils](https://www.curseforge.com/minecraft/mc-mods/crafttweaker-utils)
9+
[Crafttweaker](https://www.curseforge.com/minecraft/mc-mods/crafttweaker)
1010

1111
[ZenUtils](https://www.curseforge.com/minecraft/mc-mods/zenutil)
1212

‎main/EventUtils.zs

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ import crafttweaker.world.IBlockPos;
55
import crafttweaker.data.IData;
66
import crafttweaker.player.IPlayer;
77
import crafttweaker.world.IFacing;
8-
import mods.ctutils.player.Player;
98
import scripts.grassUtils.Logger;
109
import crafttweaker.event.PlayerTickEvent;
1110
import crafttweaker.event.PlayerRespawnEvent;
12-
import mods.ctutils.utils.Math;
1311

1412
static storageData as IData[string] = {};
1513

@@ -41,10 +39,11 @@ function spawnItem(world as IWorld, item as IItemStack, pos as IBlockPos) as boo
4139
return world.spawnEntity(item.createEntityItem(world, pos));
4240
}
4341

42+
/* Use PlayerPersisted sub tag instead
4443
function enablePlayerDataKeeper() {
4544
events.onPlayerTick(function(event as PlayerTickEvent) {
4645
val player as IPlayer = event.player;
47-
if (!player.world.remote && !Player.isFake(player)) {
46+
if (!player.world.remote && player.fake) {
4847
storageData[player.id] = player.data;
4948
}
5049
});
@@ -55,7 +54,7 @@ function enablePlayerDataKeeper() {
5554
player.update(storageData[player.id]);
5655
}
5756
});
58-
}
57+
} */
5958

6059
function defaultDataHandler(data as IData, player as IPlayer) as bool {
6160
val map = data.asMap();

0 commit comments

Comments
 (0)
Please sign in to comment.