初始化

This commit is contained in:
Giao committed 2026-04-13 15:00:42 +08:00
1 parent dffebce01d
commit ff618906d3
2501 files changed
+1181005 -21

No files matched your search

@@ -0,0 +1,20 @@
# coding=utf-8
from ..BlueFoxTools.ItemTools import GetItemUserData
from ..BlueFoxTools.OtherTools import NbtTranslator
from ..BlueFoxTools.ToolsConfig import *
def IsBlockBelow(posDim, blockName):
"""检查指定位置下方是否为指定方块"""
x, y, z, d = posDim
return serverCompFactory.CreateBlockInfo(LevelId).GetBlockNew((x, y - 1, z), d)['name'] == blockName
def SetItemOil(itemDict, oiled):
"""设置物品含油"""
GetItemUserData(itemDict, 'rtdd')['oil'] = oiled
def GetItemOil(itemDict):
"""获取物品是否含油"""
return NbtTranslator(GetItemUserData(itemDict, 'rtdd')).get('oil', False)
@@ -0,0 +1,14 @@
# coding=utf-8
from ..BlueFoxTools.SystemTools import SystemTools
def PlaySoundToAllClient(posDim, soundName, pitch=1):
"""向所有玩家播放指定声音"""
SystemTools.GetSystemByClsName('BlueFoxServerSystem').BroadcastToAllClient('PlaySound', {
'posDim': posDim, 'soundName': soundName, 'pitch': pitch
})
def PlayAttackToClient(playerId):
"""向所有玩家播放指定声音"""
SystemTools.GetSystemByClsName('BlueFoxServerSystem').NotifyToClient(playerId, 'PlayAttackAnim', {})
@@ -0,0 +1,2 @@
import Normal
import ServerUtil