本文整理汇总了Python中mcpi.minecraft.Minecraft.postToChat方法的典型用法代码示例。如果您正苦于以下问题:Python Minecraft.postToChat方法的具体用法?Python Minecraft.postToChat怎么用?Python Minecraft.postToChat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mcpi.minecraft.Minecraft
的用法示例。
在下文中一共展示了Minecraft.postToChat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from mcpi.minecraft import Minecraft [as 别名]
# 或者: from mcpi.minecraft.Minecraft import postToChat [as 别名]
for t in translations:
add = []
for k in range(1,t[0]):
delta = (t[1]*k,t[2]*k,t[3]*k)
f = partial(addVec,b=delta)
add.append(f)
for g in transforms:
add.append(lambda v,f=f,g=g : f(g(v)))
transforms += add
center = tuple(0.5 * round(2 * x) for x in playerPos)
# if (len(matrices) > 0):
# mc.conn.send("world.spawnParticle", "footstep", center, 0.0,0.0,0.0, 0, 1)
mc.conn.send("events.setting","restrict_to_sword",0)
mc.conn.send("events.setting","detect_left_click",1)
mc.postToChat("Will be drawing {} copies".format(1+len(transforms)))
mc.events.clearAll()
while True:
hits = mc.events.pollBlockHits()
time.sleep(0.25)
for h in hits:
v = tuple(x for x in h.pos)
copy(v,airOnly=True)
copy(addVec(v,faces[h.face]))