初始化

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)