mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-24 03:05:56 +01:00
Preserve data in structures.
This commit is contained in:
parent
251571a33a
commit
de7e5375f6
@ -54,8 +54,9 @@ public class BlockData {
|
||||
|
||||
private boolean exactTeleport = true;
|
||||
|
||||
public BlockData(String material, int x, int y, int z, String biome) {
|
||||
public BlockData(String material, byte data, int x, int y, int z, String biome) {
|
||||
this.material = material;
|
||||
this.data = data;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.songoda.skyblock.utils.world.block;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.utils.BlockUtils;
|
||||
import com.songoda.skyblock.utils.item.ItemStackUtil;
|
||||
import com.songoda.skyblock.utils.version.NMSUtil;
|
||||
@ -22,7 +23,7 @@ import java.util.List;
|
||||
public final class BlockUtil extends BlockUtils {
|
||||
|
||||
public static BlockData convertBlockToBlockData(Block block, int x, int y, int z) {
|
||||
BlockData blockData = new BlockData(block.getType().name(), x, y, z, block.getBiome().toString());
|
||||
BlockData blockData = new BlockData(block.getType().name(), block.getData(), x, y, z, block.getBiome().toString());
|
||||
|
||||
int NMSVersion = NMSUtil.getVersionNumber();
|
||||
blockData.setVersion(NMSVersion);
|
||||
|
Loading…
Reference in New Issue
Block a user