File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
src/main/kotlin/cn/coostack/usefulmagic/utils Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ loader_version=0.16.13
1010fabric_kotlin_version =1.13.2+kotlin.2.1.20
1111
1212# Mod Properties
13- mod_version =1.1
13+ mod_version =1.12
1414maven_group =cn.coostack.usefulmagic
1515archives_base_name =usefulmagic
1616
Original file line number Diff line number Diff line change 11package cn.coostack.usefulmagic.utils
22
3+ import net.fabricmc.api.EnvType
4+ import net.fabricmc.loader.api.FabricLoader
35import net.minecraft.client.MinecraftClient
46
7+
58object ParticleOption {
69 /* *
710 * 粒子倍数
811 */
9- fun getParticleCounts (): Int =
10- 3 - (MinecraftClient .getInstance()?.options?.particles?.value?.id ? : 0 )
11-
12-
13- }
12+ fun getParticleCounts (): Int {
13+ // 判断环境
14+ if (FabricLoader .getInstance().environmentType == EnvType .SERVER ) {
15+ return 3
16+ }
17+ return 3 - (MinecraftClient .getInstance()?.options?.particles?.value?.id ? : 0 )
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments