diff --git a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/ItemManagerImpl.java b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/ItemManagerImpl.java index 809e34f..c0990bb 100644 --- a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/ItemManagerImpl.java +++ b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/ItemManagerImpl.java @@ -1842,7 +1842,7 @@ public class ItemManagerImpl implements ItemManager { boolean enableFertilizedAppearance = section.getBoolean("fertilized-pots.enable", false); PotConfig pot = new PotConfig( - key, storage, section.getBoolean("absorb-rainwater", true), section.getBoolean("absorb-nearby-water", false), + key, storage, section.getBoolean("absorb-rainwater", false), section.getBoolean("absorb-nearby-water", false), dryModel, wetModel, enableFertilizedAppearance, enableFertilizedAppearance ? ConfigUtils.getFertilizedPotMap(section.getConfigurationSection("fertilized-pots")) : new HashMap<>(), diff --git a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/itemsadder/ItemsAdderProvider.java b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/itemsadder/ItemsAdderProvider.java index eeaf47c..f616521 100644 --- a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/itemsadder/ItemsAdderProvider.java +++ b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/itemsadder/ItemsAdderProvider.java @@ -20,6 +20,7 @@ package net.momirealms.customcrops.mechanic.item.custom.itemsadder; import dev.lone.itemsadder.api.CustomBlock; import dev.lone.itemsadder.api.CustomFurniture; import dev.lone.itemsadder.api.CustomStack; +import net.momirealms.customcrops.api.util.LogUtils; import net.momirealms.customcrops.mechanic.item.CustomProvider; import org.bukkit.Location; import org.bukkit.Material; @@ -42,16 +43,25 @@ public class ItemsAdderProvider implements CustomProvider { @Override public void placeCustomBlock(Location location, String id) { - CustomBlock.place(id, location); + CustomBlock block = CustomBlock.place(id, location); + if (block == null) { + LogUtils.warn("Detected that custom block(" + id + ") doesn't exist in ItemsAdder configs. Please double check if that block exists."); + } } @Override public Entity placeFurniture(Location location, String id) { - Location center = location.toCenterLocation(); - center.setY(center.getBlockY()); - CustomFurniture furniture = CustomFurniture.spawnPreciseNonSolid(id, location); - if (furniture == null) return null; - return furniture.getEntity(); + try { + Location center = location.toCenterLocation(); + center.setY(center.getBlockY()); + CustomFurniture furniture = CustomFurniture.spawnPreciseNonSolid(id, location); + if (furniture == null) return null; + return furniture.getEntity(); + } catch (RuntimeException e) { + LogUtils.warn("Failed to place ItemsAdder furniture. If this is not a problem caused by furniture not existing, consider increasing max-furniture-vehicles-per-chunk in ItemsAdder config.yml."); + e.printStackTrace(); + return null; + } } @Override diff --git a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/oraxen/OraxenProvider.java b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/oraxen/OraxenProvider.java index 73b2589..77b577f 100644 --- a/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/oraxen/OraxenProvider.java +++ b/plugin/src/main/java/net/momirealms/customcrops/mechanic/item/custom/oraxen/OraxenProvider.java @@ -23,6 +23,7 @@ import io.th0rgal.oraxen.api.OraxenItems; import io.th0rgal.oraxen.items.ItemBuilder; import io.th0rgal.oraxen.mechanics.Mechanic; import io.th0rgal.oraxen.mechanics.provided.gameplay.furniture.FurnitureMechanic; +import net.momirealms.customcrops.api.util.LogUtils; import net.momirealms.customcrops.mechanic.item.CustomProvider; import org.bukkit.Location; import org.bukkit.Material; @@ -55,7 +56,11 @@ public class OraxenProvider implements CustomProvider { public Entity placeFurniture(Location location, String id) { Location center = location.toCenterLocation(); center.setY(center.getBlockY()); - return OraxenFurniture.place(id, location, Rotation.NONE, BlockFace.UP); + Entity entity = OraxenFurniture.place(id, location, Rotation.NONE, BlockFace.UP); + if (entity == null) { + LogUtils.warn("Furniture(" + id +") doesn't exist in Oraxen configs. Please double check if that furniture exists."); + } + return entity; } @Override