代码:
#Enable water on plugin load?#It is disabled by default for first start and configure#You can enable water mechanincs in server with /water enable#Setting this to "true" will allow water mechaincs work when server startsEnable on start: false#The speed plugin will calculate and place water#This speed is in ticks (1/20 second)#This option doesn't effect the performance!#Default: 1 (each tick)Water speed: 1#Blocks that can be broken by waterDestroy:- SUGAR_CANE- TALL_GRASS- GRASS- DANDELION#- TALL_SEAGRASS#- SEAGRASS#- KELP_PLANT#- KELP- TORCH- REDSTONE_TORCH- REDSTONE_WIRE- REDSTONE_WALL_TORCH- REDSTONE- LEVER- STONE_BUTTON- ACACIA_BUTTON- BIRCH_BUTTON- DARK_OAK_BUTTON- JUNGLE_BUTTON- OAK_BUTTON- SPRUCE_BUTTON- ACACIA_SAPLING- BIRCH_SAPLING- DARK_OAK_SAPLING- JUNGLE_SAPLING- OAK_SAPLING- SPRUCE_SAPLING- FLOWER_POT- SUNFLOWER- CHORUS_FLOWER- DEAD_BUSH- VINE- LILAC- LILY_PAD- ROSE_BUSH- ROSE_RED#The max time plugin can take checking the water#Higher values can make water go faster, but#performance will decreaseMax ms to check: 30#Message to send when player tries to place water#When there is no enough space for waterNo enough space message: 'There is no enough space'#In which worlds will realistic mechanics workEnabled worlds:- world#Enable bucket checkBucket check: true#The distance from which water mechanics will stop workingDistance: 92#Radius of water to check#The higher this number, the flater water will be#Higher values will cost a lot of performance (Water will work slower)Radius to check: 30#Rain water (puddles) forming on groundRain: true#Forming puddles on normal waterRain on water: false#The radius in wich it will rain#Larger radius can begin to load chunks - cause lagRain radius: 64#The speed at which water will rain# Default: 500# 0 - fastestRain speed: 500#If water can rain on lowest water#This will enable forming of more water on lakes/holes#Will let regenerate water fasterRain on lowest water: true#Blocks on which it will not rain#"Destroy" blocks are includedDont rain on:- SIGN- WALL_SIGN- FENCE#Enable hopper water transfer systemHopper transfer system: true#Name of the bucket in hopper#This bucket will transfer water trough hoppers#Don't use color codes (doesn't work)Bucket name: "Water"#Enable generation edit?#It will replace blocks under water#That helps so water doesn't flow into caves#(Recommended settings is set, change at your own will)Generation edit enabled: true#Block that will be placed under water on generation#It will be placed if:#* There is air under water#* There is sand/gravel under water (block will be placed under sand/gravel)Replace block: "DIRT"#Wich rate the block will be placed under water#It will count as blocks*2/sReplace rate: 50#Replace in all chunks that is loaded or only in new chunks#true - only in new#false - in all loaded#If you put small Replace rate, set this to false#Else, put this to trueReplace only new: true#The speed at which blocks will drain#It can be from 1 to infinite#1 - fastest, default: 1Drain speed: 1#Blocks that can float on water#Use '*' to allow all blocks to float#List of all blocks: https://www.minecraftinfo.com/items.htm#Replace spaces with _List of floatable blocks:- '*'- 'block_of_readstone'- 'etc'
每个所有者都应该将 ms 速度更改为一台服务器可以处理的速度。35 很快并且不会导致延迟,但是如果您遇到一些 tps 下降,请降低它。不要将其提高到 50 以上!
代码:
/** * Replace block to water and set its data (size) * 0 - full water block * 7 - lowest * @param b Block to replace * @param size Water size */ public static boolean placeWater(Block b, int size) { } /** * Set water data (size) * 0 - full water block * 7 - lowest * @param b Block to set data * @param size Water size */ public static boolean setWaterSize(Block b, int size) { }