9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-26 10:29:10 +00:00
This commit is contained in:
Xiao-MoMi
2022-08-21 22:25:02 +08:00
parent 14f5af297e
commit aa8be827d7
40 changed files with 1991 additions and 864 deletions

View File

@@ -1,12 +1,54 @@
#Don't change
config-version: 3
config-version: '4'
#Want to sell the crops?
#Try this plugin: https://www.spigotmc.org/resources/shipping-bin.104591/
#You can use it with a command binding to an ItemsAdder furniture
#Shipping Bin is similar to the way how players sell items in Stardrew Valley
config:
#english spanish chinese
# lang: english / spanish / chinese
lang: english
# mode: tripwire / item_frame
# This option requires a server restart
# ------------ tripwire ------------
# Advantage:
# ● async check, less lag
# ● Real block hitbox like vanilla
#
# Disadvantage:
# ● limited amount
# ● visual problem when breaking crops
# ● Can't remove tripwire break sound
#
# ------------ item_frame ------------
# Advantage:
# ● unlimited amount
# ● No tripwire break sound
# ● Rotation
#
# Disadvantage:
# ● entities are very laggy(loading every 5 item frames need 0.01 mspt)
# ● spigot optimized the view distance of entities
# ● crops would go missing if server is lagging
# ● No real block hitbox
# ● itemsAdder loot system doesn't apply to furnitures.
#
crop-mode: tripwire
# Should crops be planted in random rotation?
# only works in item_frame mode
rotation:
enable: false
# 4 / 8
variant: 4
integration:
#integration to prevent other players' grief
Residence: false
@@ -28,62 +70,64 @@ config:
#Mode 1:
# Crops in loaded chunks will grow
#Mode 2:
# Online players' crops will grow
#Mode 3:
# Recommended
# Mode 1 + Mode 2
#Mode 4:
# Please disable season in this mode!
# All the crops will grow
# Mode 1:
# Crops in loaded chunks will grow
# Mode 2:
# Online players' crops will grow
# Mode 3:
# Recommended Mode 1 + Mode 2
# Mode 4:
# ● Please disable season in this mode!
# ● All the crops will grow
grow-mode: 3
#The time to start growing(ticks)
#1000ticks is 7am in game. (0-23999)
#Sprinklers will work after all crops finish growing
# The time to start growing(ticks)
# 1000ticks is 7am in game. (0-23999)
# Sprinklers will work after all crops finish growing
grow-time:
- 1000
#Time in random a single crop need to growseconds
#This prevents a large amount of crops grow at the same time
#Large amount of block replacement would cause lag.
# Time in random a single crop need to growseconds
# This prevents a large amount of crops grow at the same time
# Large amount of block replacement would cause lag.
time-to-grow: 60
#Similar to "time-to-grow", this prevent all sprinklers work at the same time
# Similar to "time-to-grow", this prevent all sprinklers work at the same time
time-to-work: 30
#Async Time Check (requires restart)
#Crops might not grow when using async.
#It is not really necessary to be Async
# Async Time Check (requires restart)
# Crops might not grow when using async.
# It is not really necessary to be Async
async-time-check: false
#Worlds where crops would grow
# Worlds where crops would grow
whitelist-worlds:
- world
#Should all the worlds' crops grow?
#This is useful for per player per world server.
#In this mode, whitelist world can only have one as the standard of time & season judgment.
# Should all the worlds' crops grow?
# This is useful for per player per world server.
# In this mode, whitelist world can only have one for time & season judgment.
all-world-grow: false
# How does gigantic work?
# In stardrew valley, crops will still absorb water every day after it is ripe to be gigantic
# But you can give it only one chance to be gigantic(This is also good for performance)
gigantic-only-one-try: false
quality:
#If disabled, you need to configurate the loot in ItemsAdder config
# If disabled, you need to configurate the loots in ItemsAdder config
enable: true
#Default ratio
# Default ratio
default-ratio: 17/2/1
#Water Amount to refill when using water bucket
# Water Amount to refill when using water bucket
sprinkler-refill: 2
#Water Amount to refill with a sigle click to water block
# Water Amount to refill with a single click to water block
water-can-refill: 1
#Can watering-can add water to sprinklers?
# Can watering-can add water to sprinklers?
water-can-add-water-to-sprinkler: true
#Should particles be displayed when using watering can?
# Should particles be displayed when using watering can?
water-particles: true
#Will bone meal accelerate the growth of crop
# Will bone meal accelerate the growth of crop
bone-meal:
enable: true
chance: 0.5
@@ -91,9 +135,9 @@ config:
#Should we limit the max amount of crops and sprinkler in one chunk
#Recommended to enable because ItemsAdder might throw StackOverFlow
#when there are too many custom blocks in one chunk
# Should we limit the max amount of crops and sprinkler in one chunk
# Recommended to enable because ItemsAdder might throw StackOverFlow
# when there are too many custom blocks in one chunk
limit:
enable: true
crop: 64
@@ -101,13 +145,13 @@ config:
#can player harvest crops with right click?
#if set "false" crops can't be harvested repeatedly
# can player harvest crops with right click?
# if set "false" crops can't be harvested repeatedly
right-click-harvest: true
#If "right-click-harvest" is true
#Should player be allowed to harvest with items in hand
# If "right-click-harvest" is true
# Should player must harvest with empty hands?
harvest-with-empty-hand: true
#Should player be prevented from planting if wrong season
# Should player be prevented from planting if wrong season
prevent-plant-if-wrong-season: true
#Should notify player of the wrong season?
# Should player be notified of the wrong season?
should-notify-if-wrong-season: true

View File

@@ -13,10 +13,18 @@ crops:
2: customcrops:tomato_silver_star
3: customcrops:tomato_golden_star
#When harvesting, should the crop drop the loots from ItemsAdder too
#This is useful for dropping seeds and other items
#When you break the crop, the event will be handled by ItemsAdder & Customcrops so IA loots would be certainly dropped
#When you right click the crop, the event will only be handled by Customcrops so IA loots would be optional
#**right click** harvest, should the crop drop the loots from ItemsAdder too
#This is useful for dropping seeds and other items(only works in tripwire mode, furnitures don't support loot at the moment)
drop-ia-loots: false
#**right click** harvest, should the crop drop other loots
#This is useful for dropping seeds and other items(Works in both tripwire/item_frame mode)
drop-other-loots:
- customcrops:tomato_seeds
#optional
#The chance that a crop grow a stage at grow time
grow-chance: 0.9
@@ -27,6 +35,12 @@ crops:
block: customcrops:gigantic_tomato
chance: 0.01
#If you want to use item_frame/armor_stand for gigantic crops
#You should config like this
#gigantic:
# furniture: customcrops:gigantic_tomato
# chance: 0.01
#optional
commands:
- 'say {player} harvested a tomato! lol'

View File

@@ -1,7 +1,7 @@
name: CustomCrops
version: '${version}'
main: net.momirealms.customcrops.CustomCrops
api-version: 1.16
api-version: 1.17
authors: [ XiaoMoMi ]
depend:
- ItemsAdder

View File

@@ -1,9 +1,50 @@
#Don't change
config-version: 1
#请不要修改此值
config-version: '4'
config:
#插件兼容
# 语言: english / spanish / chinese
lang: chinese
# 模式: tripwire / item_frame
# 此设置需要重启服务器
# ------------ tripwire ------------
# 优势:
# ● 几乎完全异步
# ● 有原版一样的真实碰撞体积
#
# 劣势:
# ● 拌线数量限制127
# ● 破坏拌线产生的视觉问题
# ● 无法移除破坏拌线的音效
#
# ------------ item_frame ------------
# 优势:
# ● 无限制农作物数量
# ● 支持旋转
#
# 劣势:
# ● 展示框是实体,相对较卡
# ● Spigot优化了实体可见距离
# ● 没有真实的碰撞体积
# ● ItemsAdder的战利品系统无法应用于家具
#
crop-mode: tripwire
# 农作物会有随机的朝向吗?
# 这只在展示框模式中生效
rotation:
enable: false
# 4 / 8
variant: 4
integration:
#领地保护
Residence: false
WorldGuard: false
Kingdoms: false
@@ -11,91 +52,99 @@ config:
PlotSquared: false
Towny: false
Lands: false
GriefPrevention: false
CrashClaim: false
#增加技能经验
AureliumSkills: false
mcMMO: false
MMOCore: false
EcoSkills: false
#季节同步
RealisticSeasons: false
#生长时间点(tick)
#1000代表上午7点农作物陆续开始生长
#洒水器将会在农作物全部完成生长后开始工作
# Mode 1:
# ● 农作物仅在加载中的区块生长
# Mode 2:
# ● 在线玩家种植的农作物会生长
# Mode 3:
# ● (推荐) Mode 1 + Mode 2
# Mode 4:
# ● 在这个模式下请关闭季节
# ● 所有数据内的农作物都会生长
grow-mode: 3
# 开始生长的时间(ticks)
# 1000ticks 代表游戏时间 7点 (0-23999)
# 洒水器将在所有农作物完成生长后开始工作
grow-time:
- 1000
#生长点后农作物成长所需的时间(秒)
#农作物将在60秒内随机完成生长以避免在短时间内大量方块替换造成卡顿
#但也不建议设置过长时间,否则内存无法及时释放,区块会被持续加载
#配合上方的默认时间点意思为每天上午7点后农作物将在60秒内完成生长过程
# 农作物将在开始生长的时间点后多少秒内完成生长seconds
# 这是为了避免大量农作物在同一时间点进行判断和方块替换,否则会造成卡顿
# 假如你有100个农作物默认配置代表在游戏时间7点后的现实时间60秒内100个农作物会在这60秒内随机时间点完成生长
time-to-grow: 60
#农作物全部完成生长后洒水器工作所需的时间
# 和上面的配置类似,只不过这一次是洒水器工作的时间
time-to-work: 30
#产物品质
quality:
#若不启用则植物成熟阶段会掉落IA配置里的loot
#如果关闭产物品质需要在IA物品配置内自行添加最后一阶段掉落物
enable: true
#默认品质权重比
default-ratio: 17/2/1
#异步时间检测,此设置需要重启生效
#启用异步时间检测会带来更好的性能但是可能会因为服务器的跳tick原因错过一些生长时间点
# 异步时间检测 (需要重启)
# 服务端可能因为某些原因跳tick所以异步模式下可能会错过生长判断
# 异步检测不是很有必要,同步的检测也不会造成性能问题,除非你设置了几百个白名单世界
async-time-check: false
#使用一次水桶可以补充几个洒水器水槽
sprinkler-refill: 2
#水壶右键一次水方块能补充多少水量
water-can-refill: 1
#是否可以用水壶为洒水器加水
water-can-add-water-to-sprinkler: true
#使用水的时候是否产生粒子效果
water-particles: true
#生长生效的世界
# 哪些世界的农作物能够生长(即白名单世界)
whitelist-worlds:
- world
# 所有世界的农作物都生长吗?
# 此选项适用于单玩家单世界服务器.
# 这种模式下你只能填写一个白名单世界作为时间,季节的判断依据.
all-world-grow: false
# 农作物巨大化是否仅进行一次尝试
# 如果你喜欢星露谷模式,农作物将在成熟后继续吸收水分,每天都有概率巨大化
# 如果你喜欢起源模式,你可以设置巨大化农作物为金农作物,并且仅有一次成为金农作物的机会
gigantic-only-one-try: false
#每个区块最大农作物数量和洒水器数量
#是否启用限制
quality:
# 如果禁用品质系统你需要在ItemsAdder的配置文件中单独设置每个农作物的掉落物
enable: true
# 默认品质比例
default-ratio: 17/2/1
# 使用水桶右键洒水器能够补充几格水量
sprinkler-refill: 2
# 使用水壶右键水方块的时候能够为水壶补充多少水量
water-can-refill: 1
# 能否使用水壶为洒水器加水
water-can-add-water-to-sprinkler: true
# 使用水壶的时候发送水花粒子效果吗
water-particles: true
# 是否启用骨粉特性
bone-meal:
enable: true
chance: 0.5
success-particle: VILLAGER_HAPPY
# 区块限制最大农作物和洒水器数量
# 建议开启限制因为一个区块内过多的农作物方块会导致IA插件报错Stack Overflow
limit:
enable: true
crop: 64
sprinkler: 8
#记录生长判断和洒水所需的时间(测试性能用)
log-time-consume: false
#Mode 1:
# 加载中区块的农作物生长
#Mode 2:
# 在线玩家的农作物生长
#Mode 3:
# Mode 1 + Mode 2
#Mode 4:
# 所有农作物生长
# 可能会造成卡顿!不建议使用此模式
grow-mode: 3
#是否所有加载中的世界都要进行生长判断
#本选项适用于使用玩家独立世界的服务器
#因为有大量世界所以无法通过添加白名单世界的方式生长
#在此选项开启的状态下,白名单世界只能填写一个
#作为所有世界农作物生长的时间、季节判断依据
all-world-grow: false
#玩家是否能右键收获
# 玩家是否可以使用右键收获农作物
# 如果禁用右键收获,那么重复收获的特性也会被关闭
right-click-harvest: true
#玩家是否需要空手右键收获
# 玩家是否必须要空手才能右键收获
harvest-with-empty-hand: true
#是否阻止玩家在错误的季节种植
# 是否阻止玩家在错误季节的种植
prevent-plant-if-wrong-season: true
#是否告知玩家这是错误的季节
should-notify-if-wrong-season: true
#骨粉设置
bone-meal:
enable: true
chance: 0.5
success-particle: VILLAGER_HAPPY
# 是否告知玩家这是错误的季节
should-notify-if-wrong-season: true

View File

@@ -3,45 +3,73 @@
#农作物生长阶段请以 _stage_X 结尾
#生长阶段从1开始依次累加
#若无法理解可以参考范例配置文件
crops:
tomato:
#收获时获取的基础数量
#收获时候掉落多少个农产品
amount: 1~4
#农作物收获得到的三种品质
#品质农作物掉落
quality:
1: customcrops:tomato
2: customcrops:tomato_silver_star
3: customcrops:tomato_golden_star
#农作物每个时间点生长一个阶段的概率
#不设置默认为1
grow-chance: 0.9
#收获的时候是否额外掉落IA配置里的战利品
#可用于最后一阶段掉落种子等操作
#当你破坏农作物的时候这个事件会同时被ItemsAdder和CustomCrops处理所以IA配置内的掉落物会被必定掉落
#当你右键收获农作物的时候这个事件仅被CustomCrops处理因此是否掉落IA配置内的掉落物为可选项目
#右键收获的时候是否掉落IA配置内的掉落物
#这对于那些需要农作物掉落额外物品的用户帮助很大,比如掉落种子(但是此设置仅适用于拌线模式因为IA的家具没有掉落物系统)
drop-ia-loots: false
#巨大化植物,以极低的概率生长为另一种形态
#右键收获的时候是否额外掉落IA物品
#这对于那些需要农作物掉落额外物品的用户帮助很大,比如掉落种子(这是本插件提供的额外掉落物系统独立于IA存在所以拌线和展示框模式都适用)
drop-other-loots:
- customcrops:tomato_seeds
#可选
#农作物在某个生长点的生长概率
#比如你可以设置一天在0点6点12点18点进行生长判断不建议设置太多每次生长概率为0.25,这样即可增大玩家加载到农作物区块的概率
#但是同一时间点种植的农作物,可能会出现一个已经成熟,而另一个还在第一阶段(如果你喜欢这种模式,可以这样设置)
grow-chance: 0.9
#可选
#巨大化农作物
gigantic:
block: customcrops:gigantic_tomato
chance: 0.01
#收获时候执行指令
#如果你想要使用展示框/盔甲架作为巨大化农作物的载体
#你需要像这样填写注意IA的API不提供solid屏障方块的放置
#所以家具模式下的巨大化作物无法被屏障包裹
#gigantic:
# furniture: customcrops:gigantic_tomato
# chance: 0.01
#可选
commands:
- 'say {player} harvested a tomato! lol'
#生长季节
#可选
#如果你启用了技能插件的兼容,那么可以设置收获该农作物的经验值
#skill-xp: 100
#可选
#若不填写则农作物四季生长
season:
- summer
- autumn
#种植所需的条件
#可选
#一些农作物种植的其他条件
requirements:
#适宜的生长高度
yPos:
- 50~100
- 150~200
#适宜的生长群系
biome:
- minecraft:plains
#适宜的世界
world:
- world
#种植此农作物需要玩家有什么权限
permission: 'customcrops.plant.tomato'
cabbage:
@@ -62,13 +90,14 @@ crops:
1: customcrops:grape
2: customcrops:grape_silver_star
3: customcrops:grape_golden_star
#空手收获后返回第几个生长状态
#可选
#右键收获的时候农作物返回哪一个阶段
return: customcrops:grape_stage_4
season:
- autumn
corn:
amount: 1~2
amount: 2~3
quality:
1: customcrops:corn
2: customcrops:corn_silver_star

View File

@@ -1,60 +0,0 @@
#MiniMessage Format
#https://docs.adventure.kyori.net/minimessage/format.html
messages:
prefix: '<gradient:#ff206c:#fdee55>[CustomCrops] </gradient>'
reload: '<white>重载成功! 耗时 <green>{time}ms'
no-perm: '<red>权限不足!'
lack-args: '<white>参数不足!'
wrong-args: '<white>参数错误!'
spring: '春'
summer: '夏'
autumn: '秋'
winter: '冬'
sprinkler-limit: '<white>此区块的洒水器已到达上限{max}'
crop-limit: '<white>此区块的农作物数量已到达上限{max}'
not-configed: '<white>此种子未在配置文件中配置!'
bad-Y: '<white>此高度不适合这种农作物生长!'
bad-biome: '<white>此生物群系不适合这种农作物生长!'
bad-perm: '<white>你还没有权限种植这种农作物呢!'
bad-world: '<white>这个农作物无法在这个世界生长!'
bad-season: '<white>当前季节不适合这种农作物生长!'
force-grow: '<white>成功强制 {world} 的农作物生长!'
force-water: '<white>成功强制 {world} 的洒水器洒水!'
force-save: '<white>成功强制保存缓存信息!'
back-up: '<white>已完成数据备份!'
set-season: '<white>成功切换世界 {world} 的季节为 {season}!'
before-plant: '<white>这种肥料必须在种植前使用!'
no-season: '当前世界没有季节'
#全息信息显示
hologram:
#农作物肥料信息
grow-info:
enable: true
#悬浮信息高度偏移
y-offset: 0.8
#悬浮信息持续时间(秒)
duration: 1
#悬浮信息内容
#可用变量 {fertilizer}肥料名 {times}剩余生效次数 {max_times}最大生效次数
text: '<font:customcrops:default>{fertilizer} </font><white>{times}<gray>/<white>{max_times}'
#洒水器信息
sprinkler-info:
enable: true
y-offset: -0.2
duration: 1
#可用变量 {water}当前水量 {max_water}最大蓄水量
left: '<font:customcrops:default>뀂'
full: '뀁뀃'
empty: '뀁뀄'
right: '뀁뀅</font>'
actionbar:
#使用水壶的时候是否发送actionbar
watering-can:
enable: true
#可用变量 {water}当前水量 {max_water}最大蓄水量
left: '<font:customcrops:default>뀂'
full: '뀁뀃'
empty: '뀁뀄'
right: '뀁뀅</font>'