Interface WorldBorder.Builder
- All Superinterfaces:
- AbstractBuilder<WorldBorder>,- Builder<WorldBorder,,- WorldBorder.Builder> - CopyableBuilder<WorldBorder,,- WorldBorder.Builder> - ResettableBuilder<WorldBorder,- WorldBorder.Builder> 
- Enclosing interface:
- WorldBorder
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds the world border from the information given.center(double x, double z) Sets the center of this world border.damagePerBlock(double damagePerBlock) Sets the damage caused by being out of the world border.from(WorldBorder border) Copies the required data from the passedWorldBorder.initialDiameter(double size) Sets the initial diameter of this world border.Sets all values in this builder to the default border for a standard Minecraft overworld.safeZone(double safeZone) Sets the distance beyond this world border that an entity may travel before incurring damage.targetDiameter(double size) Sets the final diameter of this world border.timeToTargetDiameter(Duration time) Sets how long this border will take to contract or expand fromthe initial diametertoits target diameter.warningDistance(double warningDistance) Sets the warning distance of this world border.warningTime(Duration warningTime) Sets the warning time of this world border.
- 
Method Details- 
fromCopies the required data from the passedWorldBorder.- Specified by:
- fromin interface- CopyableBuilder<WorldBorder,- WorldBorder.Builder> 
- Parameters:
- border- The world border whose data is to be copied
- Returns:
- The builder, for chaining
 
- 
overworldDefaultsWorldBorder.Builder overworldDefaults()Sets all values in this builder to the default border for a standard Minecraft overworld.This is not the same as calling Builder.reset(), which unsets all values, requiring at atargetDiameter(double)to be set befor this can be built.- Returns:
- This builder, for chaining.
 
- 
centerSets the center of this world border.- Parameters:
- x- The x-coordinate of the new centre
- z- The z-coordinate of the new centre
- Returns:
- The builder, for chaining
 
- 
initialDiameterSets the initial diameter of this world border.If this differs from the the value supplied to targetDiameter(double), then the border size starts at the diameter specified here, growing or shrinking at a constant speed for the time provided intimeToTargetDiameter(Duration)where it will stop at the supplied target. If the supplied time is zero or not given, then this value is ignored and the target diameter is used.If this is set but targetDiameter(double)has not, then this also sets that target diameter.- Parameters:
- size- The diameter that this border will have when this- WorldBorderis set.
- Returns:
- The builder, for chaining.
 
- 
targetDiameterSets the final diameter of this world border.If no timeToTargetDiameter(Duration)is set, or it is set toDuration.ZERO, then theinitialDiameter(double)is ignored and this is the only diameter used.If this is set but initialDiameter(double)has not, then this also sets that initial diameter.- Parameters:
- size- The diameter that this border will have.
- Returns:
- The builder, for chaining.
 
- 
timeToTargetDiameterSets how long this border will take to contract or expand fromthe initial diametertoits target diameter.- Parameters:
- time- The time, as a- Duration
- Returns:
- The builder, for chaining.
 
- 
safeZoneSets the distance beyond this world border that an entity may travel before incurring damage.- Parameters:
- safeZone- The distance in blocks
- Returns:
- The builder, for chaining.
 
- 
damagePerBlockSets the damage caused by being out of the world border.- Parameters:
- damagePerBlock- The damage amount
- Returns:
- The builder, for chaining
 
- 
warningTimeSets the warning time of this world border.- Parameters:
- warningTime- The warning time
- Returns:
- The builder, for chaining
 
- 
warningDistanceSets the warning distance of this world border.- Parameters:
- warningDistance- The warning distance
- Returns:
- The builder, for chaining
 
- 
buildWorldBorder build()Builds the world border from the information given.- Specified by:
- buildin interface- AbstractBuilder<WorldBorder>
- Returns:
- The built world border
 
 
-