diff options
author | Dico200 <dico.karssiens@gmail.com> | 2015-04-29 17:12:39 +0200 |
---|---|---|
committer | Dico200 <dico.karssiens@gmail.com> | 2015-04-29 17:12:39 +0200 |
commit | ad9de19d5da0030621573939c9dbb817e3e866d1 (patch) | |
tree | c95d604c9547f35644f0afa8e9afe8237494ba68 /blockplacemods.py | |
parent | 884e0a349138a49a0b15fc37bd470c7a51a288a6 (diff) |
right clicking empty cauldron fills it
Diffstat (limited to 'blockplacemods.py')
-rw-r--r-- | blockplacemods.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/blockplacemods.py b/blockplacemods.py index 4f0dc2d..a8f15d8 100644 --- a/blockplacemods.py +++ b/blockplacemods.py @@ -112,5 +112,9 @@ def on_interact(event): block = event.getClickedBlock() event2 = BlockBreakEvent(block, player) server.getPluginManager().callEvent(event2) - if not event2.isCancelled() and str(block.getType()) == "CAULDRON" and block.getData() > 0: - block.setData(block.getData() - 1) #Lower water level by one + data = block.getData() + if not event2.isCancelled() and str(block.getType()) == "CAULDRON": + if data > 0: + block.setData(data - 1) #Lower water level by one + else: + block.setData(3) #Set water level back to 3 |