9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-24 01:19:28 +00:00

Added more vanilla blocks support

This commit is contained in:
XiaoMoMi
2024-09-07 18:22:27 +08:00
parent eb3cb7b0d6
commit 558ced3517
9 changed files with 58 additions and 22 deletions

View File

@@ -65,8 +65,9 @@ public class DebugDataCommand extends BukkitCommandFeature<CommandSender> {
.sendMessage(AdventureHelper.miniMessage("<red>CustomCrops Data not found"));
}
});
String bData = block.getBlockData().getAsString();
BukkitCustomCropsPlugin.getInstance().getSenderFactory().wrap(player)
.sendMessage(AdventureHelper.miniMessage("<green>Vanilla crop data: " + block.getBlockData().getAsString()));
.sendMessage(AdventureHelper.miniMessage("<green>Vanilla crop data: <hover:show_text:'<yellow>Copy'><click:copy_to_clipboard:'"+bData+"'>" + bData + "</click>"));
});
}

View File

@@ -36,6 +36,7 @@ import net.momirealms.customcrops.api.core.world.CustomCropsBlockState;
import net.momirealms.customcrops.api.misc.value.TextValue;
import net.momirealms.customcrops.api.misc.water.WaterBar;
import net.momirealms.customcrops.api.requirement.RequirementManager;
import net.momirealms.customcrops.common.util.ListUtils;
import net.momirealms.customcrops.common.util.Pair;
import net.momirealms.customcrops.common.util.TriFunction;
import org.bukkit.entity.Player;
@@ -116,6 +117,7 @@ public class ConfigType {
PotConfig config = PotConfig.builder()
.id(id)
.vanillaFarmland(section.getBoolean("vanilla-farmland", false))
.vanillaPots(ListUtils.toList(section.get("vanilla-blocks")))
.storage(section.getInt("storage", 5))
.isRainDropAccepted(section.getBoolean("absorb-rainwater", false))
.isNearbyWaterAccepted(section.getBoolean("absorb-nearby-water", false))