初始化
This commit is contained in:
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)
|
||||
Reference in new issue
Block a user