Copy paste/merge FAWE classes to this WorldEdit fork

- so certain people can look at the diff and complain about my sloppy code :(

Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
This commit is contained in:
Jesse Boyd
2018-08-13 00:03:07 +10:00
parent a920c77cb8
commit a629d15c74
994 changed files with 117583 additions and 10745 deletions

View File

@ -19,11 +19,15 @@
package com.sk89q.worldedit.bukkit.adapter;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.jnbt.Tag;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.registry.state.Property;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.world.block.BlockType;
import net.minecraft.server.v1_13_R1.NBTBase;
import org.bukkit.Location;
import org.bukkit.block.Biome;
import org.bukkit.entity.Entity;
@ -35,7 +39,7 @@ import javax.annotation.Nullable;
/**
* An interface for adapters of various Bukkit implementations.
*/
public interface BukkitImplAdapter {
public interface BukkitImplAdapter<T> {
/**
* Get the biome ID for the given biome.
@ -63,7 +67,7 @@ public interface BukkitImplAdapter {
* @param location the location
* @return the block
*/
BaseBlock getBlock(Location location);
BlockState getBlock(Location location);
/**
* Set the block at the given location.
@ -101,4 +105,12 @@ public interface BukkitImplAdapter {
* @return The properties map
*/
Map<String, ? extends Property> getProperties(BlockType blockType);
default Tag toNative(T foreign) {
return null;
}
default T fromNative(Tag foreign) {
return null;
}
}

View File

@ -77,6 +77,10 @@ public class BukkitImplLoader {
}
}
public void addClass(Class cls) {
adapterCandidates.add(0, cls.getName());
}
/**
* Search the given JAR for candidate implementations.
*