Fix up mapmanager, untested
This commit is contained in:
parent
0d372cefaa
commit
f95bec0f15
@ -64,6 +64,7 @@ import net.minecraft.server.v1_8_R3.Block;
|
||||
import net.minecraft.server.v1_8_R3.BlockPosition;
|
||||
import net.minecraft.server.v1_8_R3.Blocks;
|
||||
import net.minecraft.server.v1_8_R3.IBlockData;
|
||||
import net.minecraft.server.v1_8_R3.MaterialMapColor;
|
||||
import net.minecraft.server.v1_8_R3.PersistentCollection;
|
||||
|
||||
public class ItemMapManager extends MiniPlugin
|
||||
@ -74,11 +75,11 @@ public class ItemMapManager extends MiniPlugin
|
||||
private int _halfMapSize = 1536 / 2;
|
||||
private int[][] _heightMap = new int[(_halfMapSize * 2) + 16][];
|
||||
private boolean _loadWorld = true;
|
||||
private Map<Integer, Byte[][]> _map = new HashMap<Integer, Byte[][]>();
|
||||
private HashMap<Integer, Byte[][]> _map = new HashMap<Integer, Byte[][]>();
|
||||
private short _mapId = -1;
|
||||
private Map<String, MapInfo> _mapInfo = new HashMap<String, MapInfo>();
|
||||
private Map<Integer, Integer> _scale = new HashMap<Integer, Integer>();
|
||||
private List<Entry<Integer, Integer>> _scanList = new ArrayList<Entry<Integer, Integer>>();
|
||||
private HashMap<String, MapInfo> _mapInfo = new HashMap<String, MapInfo>();
|
||||
private HashMap<Integer, Integer> _scale = new HashMap<Integer, Integer>();
|
||||
private ArrayList<Entry<Integer, Integer>> _scanList = new ArrayList<Entry<Integer, Integer>>();
|
||||
private World _world;
|
||||
private WorldEventManager _eventManager;
|
||||
|
||||
@ -801,37 +802,34 @@ public class ItemMapManager extends MiniPlugin
|
||||
int l3 = z & 0xF;
|
||||
|
||||
int l4 = nmsChunk.b(k3, l3) + 1;
|
||||
Block block = Blocks.AIR;
|
||||
int i5 = 0;
|
||||
IBlockData iblockdata = Blocks.AIR.getBlockData();
|
||||
|
||||
// if (l4 > 1)
|
||||
// {
|
||||
// do
|
||||
// {
|
||||
// l4--;
|
||||
// block = nmsChunk.getType(new BlockPosition(k3, l4, l3));
|
||||
// IBlockData data = nmsChunk.getBlockData(new BlockPosition(k3, l4, l3));
|
||||
// i5 = ;
|
||||
// }
|
||||
// while ((block.f(i5) == MaterialMapColor.b) && (l4 > 0));
|
||||
//
|
||||
// if ((l4 > 0) && (block.getMaterial().isLiquid()))
|
||||
// {
|
||||
// int j5 = l4 - 1;
|
||||
// Block block1;
|
||||
// do
|
||||
// {
|
||||
// block1 = nmsChunk.getType(new BlockPosition(k3, j5--, l3));
|
||||
// }
|
||||
// while ((j5 > 0) && (block1.getMaterial().isLiquid()));
|
||||
// }
|
||||
// }
|
||||
if (l4 > 1)
|
||||
{
|
||||
do
|
||||
{
|
||||
l4--;
|
||||
iblockdata= nmsChunk.getBlockData(new BlockPosition(k3, l4, l3));
|
||||
}
|
||||
while (iblockdata.getBlock().g(iblockdata) == MaterialMapColor.b && (l4 > 0));
|
||||
|
||||
if ((l4 > 0) && (iblockdata.getBlock().getMaterial().isLiquid()))
|
||||
{
|
||||
int j5 = l4 - 1;
|
||||
Block block1;
|
||||
do
|
||||
{
|
||||
block1 = nmsChunk.getType(new BlockPosition(k3, j5--, l3));
|
||||
}
|
||||
while ((j5 > 0) && (block1.getMaterial().isLiquid()));
|
||||
}
|
||||
}
|
||||
|
||||
_heightMap[x + _halfMapSize + 16][z + _halfMapSize + 16] = l4;
|
||||
|
||||
if (setColors)
|
||||
{
|
||||
// color = block.f(i5).M;
|
||||
//color = block.f(i5).M;
|
||||
IBlockData data = nmsChunk.getBlockData(new BlockPosition(k3, l4, l3));
|
||||
color = data.getBlock().g(data).M;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user