mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2026-01-06 15:51:52 +00:00
Fix getting water
This commit is contained in:
@@ -139,6 +139,9 @@ public class WateringCanItem extends AbstractCustomCropsItem {
|
||||
int water = getCurrentWater(itemInHand);
|
||||
|
||||
String blockID = BukkitCustomCropsPlugin.getInstance().getItemManager().blockID(targetBlock);
|
||||
if (targetBlock.getType() == Material.WATER) {
|
||||
blockID = "WATER";
|
||||
}
|
||||
if (targetBlock.getBlockData() instanceof Waterlogged waterlogged && waterlogged.isWaterlogged()) {
|
||||
blockID = "WATER";
|
||||
}
|
||||
@@ -308,6 +311,9 @@ public class WateringCanItem extends AbstractCustomCropsItem {
|
||||
// for old config compatibility
|
||||
context.arg(ContextKeys.LOCATION, new Location(player.getWorld(), vector.getX() - 0.5,vector.getY() - 1, vector.getZ() - 0.5));
|
||||
String blockID = BukkitCustomCropsPlugin.getInstance().getItemManager().blockID(targetBlock);
|
||||
if (targetBlock.getType() == Material.WATER) {
|
||||
blockID = "WATER";
|
||||
}
|
||||
if (targetBlock.getBlockData() instanceof Waterlogged waterlogged && waterlogged.isWaterlogged()) {
|
||||
blockID = "WATER";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Project settings
|
||||
# Rule: [major update].[feature update].[bug fix]
|
||||
project_version=3.6.0
|
||||
project_version=3.6.1
|
||||
config_version=38
|
||||
project_group=net.momirealms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user