1111- Placing blocks
1212- Reading blocks
1313"""
14-
15- __author__ = 'Cosmo Harrigan, Morgan Creekmore'
16-
17-
1814import logging
1915
2016# Import any modules that you need in your plugin
2319from spockbot .plugins .tools .event import EVENT_UNREGISTER
2420from spockbot .vector import Vector3
2521
26- # Required import
22+ __author__ = 'Cosmo Harrigan, Morgan Creekmore'
2723
2824logger = logging .getLogger ('spockbot' )
2925
@@ -70,9 +66,7 @@ def perform_initial_actions(self, name, data):
7066 self .chat .chat ('Bot active' )
7167
7268 # Walk to target coordinates
73- self .movement .move_to (TARGET_COORDINATES .x ,
74- TARGET_COORDINATES .y ,
75- TARGET_COORDINATES .z )
69+ self .movement .move_to (* TARGET_COORDINATES )
7670
7771 def chat_event_handler (self , name , data ):
7872 """Called when a chat message occurs in the game"""
@@ -99,12 +93,12 @@ def periodic_event_handler(self):
9993 self .clientinfo .position .yaw ))
10094
10195 # Place a block in front of the player
102- self .interact .place_block (self . clientinfo . position
103- + Vector3 (- 1 , 0 , - 1 ))
96+ self .interact .place_block (
97+ self . clientinfo . position + Vector3 (- 1 , 0 , - 1 ))
10498
10599 # Read a block under the player
106100 block_pos = self .clientinfo .position .floor ()
107101 block_id , meta = self .world .get_block (* block_pos )
108102 block_at = blocks .get_block (block_id , meta )
109- self .chat .chat ('Found block %s at %s' % (block_at . display_name ,
110- block_pos ))
103+ self .chat .chat ('Found block %s at %s' % (
104+ block_at . display_name , block_pos ))
0 commit comments