Skip to content

Commit

Permalink
Minor adjustment to Watering Can to better prevent Fake Player usage.
Browse files Browse the repository at this point in the history
Signed-off-by: King Lemming <[email protected]>
  • Loading branch information
KingLemming committed Nov 29, 2017
1 parent 625cee7 commit 51dce9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player
BlockPos tracePos = traceResult.getBlockPos();
ItemStack stack = player.getHeldItem(hand);

if (!player.isSneaking() || !world.isBlockModifiable(player, tracePos)) {
if (!player.isSneaking() || !world.isBlockModifiable(player, tracePos) || player instanceof FakePlayer && !allowFakePlayers) {
return new ActionResult<>(EnumActionResult.FAIL, stack);
}
if (isWater(world.getBlockState(tracePos)) && getSpace(stack) > 0) {
Expand Down

0 comments on commit 51dce9e

Please sign in to comment.