9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-26 18:39:17 +00:00

Provide an option to use vanilla mechanic

This commit is contained in:
XiaoMoMi
2024-09-05 01:13:54 +08:00
parent db89cd25e2
commit 1a6a59a616
8 changed files with 82 additions and 51 deletions

View File

@@ -115,6 +115,7 @@ public class ConfigType {
PotConfig config = PotConfig.builder()
.id(id)
.vanillaFarmland(section.getBoolean("vanilla-farmland", false))
.storage(section.getInt("storage", 5))
.isRainDropAccepted(section.getBoolean("absorb-rainwater", false))
.isNearbyWaterAccepted(section.getBoolean("absorb-nearby-water", false))

View File

@@ -201,8 +201,8 @@ public class BukkitItemManager extends AbstractItemManager {
@Override
public void placeBlock(@NotNull Location location, @NotNull String id) {
if (StringUtils.isCapitalLetter(id)) {
location.getWorld().getBlockAt(location).setType(Material.valueOf(id), false);
if (id.startsWith("minecraft:")) {
location.getWorld().getBlockAt(location).setBlockData(Bukkit.createBlockData(id), false);
} else {
this.provider.placeCustomBlock(location, id);
}