Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Perform some restructuring
Dieser Commit ist enthalten in:
Ursprung
785a827f01
Commit
da33245842
@ -21,6 +21,7 @@ package com.sk89q.worldedit.sponge;
|
|||||||
|
|
||||||
import com.flowpowered.math.vector.Vector3d;
|
import com.flowpowered.math.vector.Vector3d;
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.SpongeNMSWorld;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge;
|
||||||
|
|
||||||
|
import com.sk89q.worldedit.sponge.nms.IDHelper;
|
||||||
import com.sk89q.worldedit.world.biome.BaseBiome;
|
import com.sk89q.worldedit.world.biome.BaseBiome;
|
||||||
import com.sk89q.worldedit.world.biome.BiomeData;
|
import com.sk89q.worldedit.world.biome.BiomeData;
|
||||||
import com.sk89q.worldedit.world.registry.BiomeRegistry;
|
import com.sk89q.worldedit.world.registry.BiomeRegistry;
|
||||||
|
@ -24,6 +24,7 @@ import com.sk89q.worldedit.entity.BaseEntity;
|
|||||||
import com.sk89q.worldedit.entity.Entity;
|
import com.sk89q.worldedit.entity.Entity;
|
||||||
import com.sk89q.worldedit.entity.metadata.EntityType;
|
import com.sk89q.worldedit.entity.metadata.EntityType;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.NMSHelper;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import com.sk89q.worldedit.world.NullWorld;
|
import com.sk89q.worldedit.world.NullWorld;
|
||||||
import org.spongepowered.api.world.World;
|
import org.spongepowered.api.world.World;
|
||||||
|
@ -24,6 +24,9 @@ import com.sk89q.worldedit.entity.Player;
|
|||||||
import com.sk89q.worldedit.event.platform.CommandEvent;
|
import com.sk89q.worldedit.event.platform.CommandEvent;
|
||||||
import com.sk89q.worldedit.event.platform.CommandSuggestionEvent;
|
import com.sk89q.worldedit.event.platform.CommandSuggestionEvent;
|
||||||
import com.sk89q.worldedit.extension.platform.*;
|
import com.sk89q.worldedit.extension.platform.*;
|
||||||
|
import com.sk89q.worldedit.sponge.config.SpongeConfiguration;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.IDHelper;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.SpongeNMSWorld;
|
||||||
import com.sk89q.worldedit.util.command.CommandMapping;
|
import com.sk89q.worldedit.util.command.CommandMapping;
|
||||||
import com.sk89q.worldedit.util.command.Dispatcher;
|
import com.sk89q.worldedit.util.command.Dispatcher;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
|
@ -29,6 +29,7 @@ import com.sk89q.worldedit.extent.inventory.BlockBag;
|
|||||||
import com.sk89q.worldedit.internal.LocalWorldAdapter;
|
import com.sk89q.worldedit.internal.LocalWorldAdapter;
|
||||||
import com.sk89q.worldedit.internal.cui.CUIEvent;
|
import com.sk89q.worldedit.internal.cui.CUIEvent;
|
||||||
import com.sk89q.worldedit.session.SessionKey;
|
import com.sk89q.worldedit.session.SessionKey;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.IDHelper;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import org.spongepowered.api.entity.living.player.Player;
|
import org.spongepowered.api.entity.living.player.Player;
|
||||||
import org.spongepowered.api.item.inventory.ItemStack;
|
import org.spongepowered.api.item.inventory.ItemStack;
|
||||||
|
@ -30,6 +30,7 @@ import com.sk89q.worldedit.blocks.BaseItemStack;
|
|||||||
import com.sk89q.worldedit.entity.BaseEntity;
|
import com.sk89q.worldedit.entity.BaseEntity;
|
||||||
import com.sk89q.worldedit.entity.Entity;
|
import com.sk89q.worldedit.entity.Entity;
|
||||||
import com.sk89q.worldedit.regions.Region;
|
import com.sk89q.worldedit.regions.Region;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.IDHelper;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import com.sk89q.worldedit.world.AbstractWorld;
|
import com.sk89q.worldedit.world.AbstractWorld;
|
||||||
import com.sk89q.worldedit.world.biome.BaseBiome;
|
import com.sk89q.worldedit.world.biome.BaseBiome;
|
||||||
@ -54,7 +55,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
@ -64,8 +64,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
public abstract class SpongeWorld extends AbstractWorld {
|
public abstract class SpongeWorld extends AbstractWorld {
|
||||||
|
|
||||||
protected static final Random random = new Random();
|
protected static final Random random = new Random();
|
||||||
protected static final int UPDATE = 1, NOTIFY = 2, NOTIFY_CLIENT = 4;
|
|
||||||
protected static final Logger logger = Logger.getLogger(SpongeWorld.class.getCanonicalName());
|
|
||||||
|
|
||||||
private final WeakReference<World> worldRef;
|
private final WeakReference<World> worldRef;
|
||||||
|
|
||||||
@ -74,9 +72,9 @@ public abstract class SpongeWorld extends AbstractWorld {
|
|||||||
*
|
*
|
||||||
* @param world the world
|
* @param world the world
|
||||||
*/
|
*/
|
||||||
SpongeWorld(World world) {
|
protected SpongeWorld(World world) {
|
||||||
checkNotNull(world);
|
checkNotNull(world);
|
||||||
this.worldRef = new WeakReference<World>(world);
|
this.worldRef = new WeakReference<>(world);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,6 +28,9 @@ import com.sk89q.worldedit.event.platform.PlatformReadyEvent;
|
|||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
import com.sk89q.worldedit.extension.platform.Platform;
|
import com.sk89q.worldedit.extension.platform.Platform;
|
||||||
import com.sk89q.worldedit.internal.LocalWorldAdapter;
|
import com.sk89q.worldedit.internal.LocalWorldAdapter;
|
||||||
|
import com.sk89q.worldedit.sponge.config.SpongeConfiguration;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.NMSHelper;
|
||||||
|
import com.sk89q.worldedit.sponge.nms.SpongeNMSWorld;
|
||||||
import org.spongepowered.api.Sponge;
|
import org.spongepowered.api.Sponge;
|
||||||
import org.spongepowered.api.block.BlockSnapshot;
|
import org.spongepowered.api.block.BlockSnapshot;
|
||||||
import org.spongepowered.api.block.BlockType;
|
import org.spongepowered.api.block.BlockType;
|
||||||
|
@ -17,8 +17,9 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.config;
|
||||||
|
|
||||||
|
import com.sk89q.worldedit.sponge.SpongeWorldEdit;
|
||||||
import com.sk89q.worldedit.util.PropertiesConfiguration;
|
import com.sk89q.worldedit.util.PropertiesConfiguration;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.nms;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -26,7 +26,8 @@ import org.spongepowered.api.block.BlockType;
|
|||||||
import org.spongepowered.api.item.ItemType;
|
import org.spongepowered.api.item.ItemType;
|
||||||
import org.spongepowered.api.world.biome.BiomeType;
|
import org.spongepowered.api.world.biome.BiomeType;
|
||||||
|
|
||||||
final class IDHelper {
|
@Deprecated
|
||||||
|
public final class IDHelper {
|
||||||
|
|
||||||
private IDHelper() { }
|
private IDHelper() { }
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.nms;
|
||||||
|
|
||||||
import com.sk89q.jnbt.*;
|
import com.sk89q.jnbt.*;
|
||||||
import net.minecraft.nbt.*;
|
import net.minecraft.nbt.*;
|
||||||
@ -28,6 +28,7 @@ import java.util.Map.Entry;
|
|||||||
/**
|
/**
|
||||||
* Converts between JNBT and Minecraft NBT classes.
|
* Converts between JNBT and Minecraft NBT classes.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
final class NBTConverter {
|
final class NBTConverter {
|
||||||
|
|
||||||
private NBTConverter() {
|
private NBTConverter() {
|
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.nms;
|
||||||
|
|
||||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||||
import com.sk89q.worldedit.entity.BaseEntity;
|
import com.sk89q.worldedit.entity.BaseEntity;
|
||||||
@ -28,7 +28,8 @@ import org.spongepowered.api.item.inventory.ItemStack;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
final class NMSHelper {
|
@Deprecated
|
||||||
|
public final class NMSHelper {
|
||||||
|
|
||||||
private NMSHelper() { }
|
private NMSHelper() { }
|
||||||
|
|
@ -17,17 +17,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.nms;
|
||||||
|
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldedit.Vector2D;
|
|
||||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||||
import com.sk89q.worldedit.blocks.LazyBlock;
|
import com.sk89q.worldedit.blocks.LazyBlock;
|
||||||
import com.sk89q.worldedit.entity.BaseEntity;
|
import com.sk89q.worldedit.entity.BaseEntity;
|
||||||
import com.sk89q.worldedit.internal.Constants;
|
import com.sk89q.worldedit.internal.Constants;
|
||||||
import com.sk89q.worldedit.regions.Region;
|
import com.sk89q.worldedit.sponge.SpongeWorld;
|
||||||
import com.sk89q.worldedit.util.TreeGenerator;
|
import com.sk89q.worldedit.util.TreeGenerator;
|
||||||
import net.minecraft.block.*;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
@ -37,11 +36,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.nbt.NBTTagInt;
|
import net.minecraft.nbt.NBTTagInt;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.LongHashMap;
|
|
||||||
import net.minecraft.world.ChunkCoordIntPair;
|
|
||||||
import net.minecraft.world.chunk.Chunk;
|
|
||||||
import net.minecraft.world.chunk.IChunkProvider;
|
|
||||||
import net.minecraft.world.gen.ChunkProviderServer;
|
|
||||||
import net.minecraft.world.gen.feature.*;
|
import net.minecraft.world.gen.feature.*;
|
||||||
import org.spongepowered.api.block.BlockState;
|
import org.spongepowered.api.block.BlockState;
|
||||||
import org.spongepowered.api.entity.Entity;
|
import org.spongepowered.api.entity.Entity;
|
||||||
@ -49,13 +43,10 @@ import org.spongepowered.api.world.Location;
|
|||||||
import org.spongepowered.api.world.World;
|
import org.spongepowered.api.world.World;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class SpongeNMSWorld extends SpongeWorld {
|
public class SpongeNMSWorld extends SpongeWorld {
|
||||||
|
|
||||||
private static final IBlockState JUNGLE_LOG = Blocks.log.getDefaultState().withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
private static final IBlockState JUNGLE_LOG = Blocks.log.getDefaultState().withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
@ -17,13 +17,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.nms;
|
||||||
|
|
||||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class TileEntityBaseBlock extends BaseBlock implements TileEntityBlock {
|
public class TileEntityBaseBlock extends BaseBlock implements TileEntityBlock {
|
||||||
|
|
||||||
public TileEntityBaseBlock(int type, int data, TileEntity tile) {
|
public TileEntityBaseBlock(int type, int data, TileEntity tile) {
|
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.sponge;
|
package com.sk89q.worldedit.sponge.nms;
|
||||||
|
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@ -34,6 +34,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* Utility methods for setting tile entities in the world.
|
* Utility methods for setting tile entities in the world.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
final class TileEntityUtils {
|
final class TileEntityUtils {
|
||||||
|
|
||||||
private TileEntityUtils() {
|
private TileEntityUtils() {
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren