Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Oct 24, 2023
1 parent 594527f commit 5a39197
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
import org.spigotmc.SpigotConfig;
import org.spigotmc.WatchdogThread;

import javax.annotation.Nullable;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
Expand All @@ -158,7 +159,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.annotation.Nullable;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter;
import com.sk89q.worldedit.bukkit.adapter.ext.fawe.v1_20_R2.PaperweightServerLevelDelegateProxy;
import com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_20_R2.nbt.PaperweightLazyCompoundTag;
import com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_20_R2.regen.PaperweightRegen;
import com.sk89q.worldedit.entity.BaseEntity;
Expand Down Expand Up @@ -74,7 +73,6 @@
import net.minecraft.world.entity.Entity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
Expand Down Expand Up @@ -103,15 +101,13 @@
import org.bukkit.craftbukkit.v1_20_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_20_R2.util.CraftNamespacedKey;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nullable;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand All @@ -120,7 +116,6 @@
import java.util.Objects;
import java.util.OptionalInt;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ default boolean clearContainerBlockContents(World world, BlockVector3 pt) {
* @param session The EditSession
* @param pt The location
* @return If it succeeded
*
* @since TODO
*/
default boolean generateFeature(ConfiguredFeatureType feature, World world, EditSession session, BlockVector3 pt) {
throw new UnsupportedOperationException("This adapter does not support generating features.");
Expand All @@ -304,6 +306,8 @@ default boolean generateFeature(ConfiguredFeatureType feature, World world, Edit
* @param session The EditSession
* @param pt The location
* @return If it succeeded
*
* @since TODO
*/
default boolean generateStructure(StructureType feature, World world, EditSession session, BlockVector3 pt) {
throw new UnsupportedOperationException("This adapter does not support generating features.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import javax.annotation.Nullable;

/**
* Places a feature
* Places a structure
*
* @since TODO
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.generation.StructureType;

/**
* Generate a structure at the given location
*
* @since TODO
*/
public class StructureGenerator implements RegionFunction {

private final StructureType structureType;
Expand All @@ -16,6 +21,8 @@ public class StructureGenerator implements RegionFunction {
*
* @param editSession the edit session
* @param structureType the structure type
*
* @since TODO
*/
public StructureGenerator(EditSession editSession, StructureType structureType) {
this.editSession = editSession;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4026,6 +4026,8 @@ public int makeBlob(
* @param feature feature to generate
* @param position position to generate at
* @return blocks affected
*
* @since TODO
*/
public int generateFeature(ConfiguredFeatureType feature, BlockVector3 position) {
feature.place(this, position);
Expand All @@ -4038,6 +4040,8 @@ public int generateFeature(ConfiguredFeatureType feature, BlockVector3 position)
* @param structure structure to generate
* @param position position to generate at
* @return blocks affected
*
* @since TODO
*/
public int generateStructure(StructureType structure, BlockVector3 position) {
structure.place(this, position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
import com.sk89q.worldedit.world.generation.ConfiguredFeatureType;

/**
* Generates forests by searching for the ground starting from the given upper Y
* coordinate for every column given.
* Generate a feature at the given location
*
* @since TODO
*/
public class FeatureGenerator implements RegionFunction {

Expand All @@ -39,6 +40,8 @@ public class FeatureGenerator implements RegionFunction {
*
* @param editSession the edit session
* @param featureType the feature type
*
* @since TODO
*/
public FeatureGenerator(EditSession editSession, ConfiguredFeatureType featureType) {
this.editSession = editSession;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, Block
* @param editSession The {@link EditSession}
* @param position The position
* @return True if the generation was successful
*
* @since TODO
*/
default boolean generateStructure(StructureType type, EditSession editSession, BlockVector3 position) {
return false;
Expand All @@ -332,6 +334,8 @@ default boolean generateStructure(StructureType type, EditSession editSession, B
* @param editSession The {@link EditSession}
* @param position The position
* @return True if the generation was successful
*
* @since TODO
*/
default boolean generateFeature(ConfiguredFeatureType type, EditSession editSession, BlockVector3 position) {
return false;
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 5a39197

Please sign in to comment.