mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Update configs, and remove unused BlockData methods.
This commit is contained in:
@ -366,13 +366,11 @@ public class ForgeWorld extends AbstractWorld {
|
||||
|
||||
@Override
|
||||
public BaseBlock getFullBlock(Vector position) {
|
||||
World world = getWorld();
|
||||
BlockPos pos = new BlockPos(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
TileEntity tile = getWorld().getTileEntity(pos);
|
||||
|
||||
if (tile != null) {
|
||||
return new TileEntityBaseBlock(Block.getIdFromBlock(state.getBlock()), state.getBlock().getMetaFromState(state), tile);
|
||||
return new TileEntityBaseBlock(getBlock(position), tile);
|
||||
} else {
|
||||
return new BaseBlock(getBlock(position));
|
||||
}
|
||||
|
@ -21,14 +21,14 @@ package com.sk89q.worldedit.forge;
|
||||
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityBaseBlock extends BaseBlock implements TileEntityBlock {
|
||||
|
||||
public TileEntityBaseBlock(int type, int data, TileEntity tile) {
|
||||
super(type, data);
|
||||
setNbtData(NBTConverter.fromNative(copyNbtData(tile)));
|
||||
public TileEntityBaseBlock(BlockState state, TileEntity tile) {
|
||||
super(state, NBTConverter.fromNative(copyNbtData(tile)));
|
||||
}
|
||||
|
||||
private static NBTTagCompound copyNbtData(TileEntity tile) {
|
||||
|
Reference in New Issue
Block a user