Skip to content

Commit

Permalink
fix agent start
Browse files Browse the repository at this point in the history
  • Loading branch information
noskill committed Nov 13, 2024
1 parent 0cfefac commit 581b85d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions tagilmo/utils/mission_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def defaultworld(seed=None, forceReset=False, forceReuse=False):
world_str += '/>'
return world_str


def fileworld(uri2save, forceReset="false"):
str = '<FileWorldGenerator '
str += 'src="' + uri2save + '" '
Expand Down
5 changes: 4 additions & 1 deletion tests/vereya/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ def init_mission(mc, start_x, start_z, seed, forceReset="false",

print('starting at ({0}, {1})'.format(start_x, start_y))

start = [start_x, start_y, start_z, 1]
if all(x is None for x in [start_x, start_y, start_z]):
start = None
#miss = mb.MissionXML(namespace="ProjectMalmo.microsoft.com",
miss = mb.MissionXML(
agentSections=[mb.AgentSection(name='Cristina',
agenthandlers=agent_handlers,
# depth
agentstart=mb.AgentStart([start_x, start_y, start_z, 1]))])
agentstart=mb.AgentStart(start))])
flat_json = {"biome":"minecraft:plains",
"layers":[{"block":"minecraft:diamond_block","height":1}],
"structures":{"structures": {"village":{}}}}
Expand Down
2 changes: 1 addition & 1 deletion tests/vereya/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class TestAgentServer(TestAgent):
@classmethod
def setUpClass(self, *args, **kwargs):
start = (4.0, 69.0, 68)
mc, obs = init_mission(None, start_x=start[0], start_y=start[1], start_z=start[2], forceReset='false', forceReuse=True, seed='2', serverIp='127.0.0.1', serverPort=25565)
mc, obs = init_mission(None, start_x=None, start_y=None, start_z=None, forceReset='false', forceReuse=True, seed='2', serverIp='127.0.0.1', serverPort=25565)
self.mc = mc
self.rob = obs
assert mc.safeStart()
Expand Down

0 comments on commit 581b85d

Please sign in to comment.