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:
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user