Skip to content

Commit

Permalink
updated example for drawing objects
Browse files Browse the repository at this point in the history
  • Loading branch information
EHAT32 committed Oct 25, 2024
1 parent 7432b03 commit 71e49c6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions examples/8_draw.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from tagilmo.utils.vereya_wrapper import MCConnector
import tagilmo.utils.mission_builder as mb

draw_str = """<DrawCuboid x1="0" y1="-60" z1="10" x2="2" y2="-59" z2="13" type="stone"/>
<DrawBlock x="8" y="-60" z="10" type="cobblestone"/>
<DrawItem x="10" y="-60" z="10" type="diamond"/>
<DrawLine x1="10" y1="-60" z1="4" x2="14" y2="-60" z2="11" type="sandstone"/>"""
#TODO: implement drawSphere <DrawSphere x="4" y="-55" z="12" radius="3" type="lapis_block"/>
miss = mb.MissionXML(serverSection=mb.ServerSection(handlers=mb.ServerHandlers(drawingdecorator_xml=draw_str)))
block = mb.DrawBlock("-1", "-60", "4", "cobblestone")
it = mb.DrawItem(0, -60, 0, "diamond")
cuboid = mb.DrawCuboid("1", -60, "0", 3, -60, 3, "sandstone")
line = mb.DrawLine(5, -60, 3, 9, -55, 8, "diamond_ore")
draw = mb.DrawingDecorator([block, it, cuboid, line])

miss = mb.MissionXML(serverSection=mb.ServerSection(handlers=mb.ServerHandlers(drawingdecorator=draw)))
miss.setWorld(mb.flatworld("",
seed= '5',
forceReset = "true"))
Expand Down

0 comments on commit 71e49c6

Please sign in to comment.