Skip to content

Commit

Permalink
Fixed issue where flowing water could be placed on one-layer snow tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
redwallhp committed May 30, 2016
1 parent fd7524f commit 77fd2c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>SafeBuckets</groupId>
<artifactId>SafeBuckets</artifactId>
<version>0.7.9</version>
<version>0.8.0</version>
<packaging>jar</packaging>
<name>SafeBuckets</name>
<description>Make water non-flowing for water from buckets</description>
Expand Down
7 changes: 7 additions & 0 deletions src/nu/nerd/SafeBuckets/SafeBucketsListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ else if (block.getType() == Material.DISPENSER) {
public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {
Block block = event.getBlockClicked().getRelative(event.getBlockFace());

if (event.getBlockClicked().getType().equals(Material.SNOW)) {
// Handle single snow layers, which are removed when water is placed, resulting in off-by-one
if (block.getData() == 0x0) {
block = event.getBlockClicked();
}
}

if (plugin.getConfig().getBoolean("bucket.enabled")) {
if (plugin.getConfig().getBoolean("bucket.safe")) {
ItemStack itemInHand = event.getPlayer().getItemInHand();
Expand Down

0 comments on commit 77fd2c8

Please sign in to comment.