Skip to content

Commit 14c673a

Browse files
committed
Merge pull request #206 from Gjum/fixes
Fixes
2 parents 2afae44 + afb4b33 commit 14c673a

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

examples/basic/example.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
},
4040
}
4141

42-
# Load the plugins. Any functionality that you want to implement must be called
43-
# from a plugin. You can define new plugins that listen for arbitrary events
44-
# from the game. Furthermore, events can even be periodic timers that trigger a
45-
# method.
42+
# Load the plugins.
43+
# Any functionality that you want to implement must be called from a plugin.
44+
# You can define new plugins that listen for arbitrary events from the game.
45+
# Furthermore, events can even be periodic timers that trigger a method.
4646
plugins = default_plugins
4747
plugins.append(('example', ExamplePlugin))
4848

49-
# Instantiate and start the client, which will then run and wait for events to
50-
# occur
49+
# Instantiate and start the client, which will then
50+
# run and wait for events to occur.
5151
client = Client(plugins=plugins, settings=settings)
5252
client.start(SERVER, 25565)

spockbot/mcdata/items.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def get_item(item, meta=None, init=True):
2020

2121

2222
class Item(object):
23-
id = -1,
24-
display_name = "Item",
25-
stack_size = 0,
26-
name = "item",
23+
id = -1
24+
display_name = "Item"
25+
stack_size = 0
26+
name = "item"
2727
variations = {}
2828

2929
def __init__(self, meta=None):

spockbot/plugins/helpers/craft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def craft_task(self, recipe, amount=1):
9999
while amount > crafted_amt + inv.cursor_slot.amount:
100100
yield inv.async.click_slot(result_slot)
101101
# TODO check that cursor is non-empty, otherwise we did not craft
102-
result_stack_size = inv.cursor_slot.max_amount
102+
result_stack_size = inv.cursor_slot.stack_size
103103
if inv.cursor_slot.amount in (prev_cursor_amt, result_stack_size):
104104
# cursor full, put away
105105
crafted_amt += inv.cursor_slot.amount

spockbot/plugins/helpers/interact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ def attack_entity(self, entity):
211211
def mount_vehicle(self, entity):
212212
self.use_entity(entity)
213213

214-
def steer_vehicle(self, sideways=0.0, forward=0.0,
214+
def steer_vehicle(self, left=0.0, forward=0.0,
215215
jump=False, unmount=False):
216216
flags = 0
217217
if jump:
218218
flags += 1
219219
if unmount:
220220
flags += 2
221221
self.net.push_packet('PLAY>Steer Vehicle', {
222-
'sideways': sideways,
222+
'sideways': left,
223223
'forward': forward,
224224
'flags': flags,
225225
})

spockbot/plugins/tools/inventory_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def click_slot(self, slot, *args, **kwargs):
2828
# TODO make sure window is not closed while clicking
2929

3030
empty_cursor = old_cursor.is_empty
31-
if old_slot.amount == old_slot.max_amount and not empty_cursor \
31+
if old_slot.amount == old_slot.item.stack_size and not empty_cursor \
3232
or old_slot.is_empty and empty_cursor:
3333
return # no need to check
3434

0 commit comments

Comments
 (0)