Skip to content

Commit

Permalink
Fixed a bug where interaction was allowed if you held a block or a bu…
Browse files Browse the repository at this point in the history
…cket
  • Loading branch information
Visual-Vincent committed May 26, 2021
1 parent 7986c07 commit 2f570f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'

ext {
modVersion = '0.1'
modVersion = '0.2'
mcVersion = '1.16.5'
modAuthor = 'Visual Vincent'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ public void OnRightClick(RightClickBlock event)
{
Item item = itemStack.getItem();

if(item instanceof BucketItem)
return; // Handled by ItemEvents.OnUseBucket()

if(item instanceof BlockItem)
return;

logMessage = String.format("%s using \"%s\"", logMessage, item.getRegistryName().toString());
if(!(
item instanceof BucketItem ||
item instanceof BlockItem
))
{
logMessage = String.format("%s using \"%s\"", logMessage, item.getRegistryName().toString());
}
}

RegionEventCallbacks.RegionDefaultEventCallback(event, world, player, pos, logMessage);
Expand Down

0 comments on commit 2f570f1

Please sign in to comment.