Skip to content

Commit a633a1d

Browse files
committed
....
1 parent d6efa80 commit a633a1d

File tree

2 files changed

+1
-36
lines changed

2 files changed

+1
-36
lines changed

src/MiNET/MiNET/Player.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ protected virtual bool AcceptPlayerMove(PlayerLocation message, bool isOnGround,
22162216

22172217
protected virtual bool DetectSimpleFly(PlayerLocation message, bool isOnGround)
22182218
{
2219-
double d = Math.Abs(KnownPosition.Y - (message.X - 1.62f));
2219+
double d = Math.Abs(KnownPosition.Y - (message.Y - 1.62f));
22202220
return !(AllowFly || IsOnGround || isOnGround || d > 0.001);
22212221
}
22222222

src/MiNET/MiNET/Worlds/Level.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,41 +1061,6 @@ public Block GetBlock(BlockCoordinates blockCoordinates, ChunkColumn tryChunk =
10611061
return block;
10621062
}
10631063

1064-
public Block GetBlock2(BlockCoordinates blockCoordinates, ChunkColumn tryChunk = null)
1065-
{
1066-
ChunkColumn chunk = null;
1067-
1068-
var chunkCoordinates = new ChunkCoordinates(blockCoordinates.X >> 4, blockCoordinates.Z >> 4);
1069-
if (tryChunk != null && tryChunk.X == chunkCoordinates.X && tryChunk.Z == chunkCoordinates.Z)
1070-
{
1071-
chunk = tryChunk;
1072-
}
1073-
else
1074-
{
1075-
chunk = GetChunk(chunkCoordinates);
1076-
}
1077-
if (chunk == null)
1078-
return new Air
1079-
{
1080-
Coordinates = blockCoordinates,
1081-
SkyLight = 15
1082-
};
1083-
1084-
var block = chunk.GetBlockObject(blockCoordinates.X & 0x0f, blockCoordinates.Y, blockCoordinates.Z & 0x0f);
1085-
byte blockLight = chunk.GetBlocklight(blockCoordinates.X & 0x0f, blockCoordinates.Y, blockCoordinates.Z & 0x0f);
1086-
byte skyLight = chunk.GetSkylight(blockCoordinates.X & 0x0f, blockCoordinates.Y, blockCoordinates.Z & 0x0f);
1087-
byte biomeId = chunk.GetBiome(blockCoordinates.X & 0x0f, blockCoordinates.Z & 0x0f);
1088-
1089-
block.Coordinates = blockCoordinates;
1090-
block.BlockLight = blockLight;
1091-
block.SkyLight = skyLight;
1092-
block.BiomeId = biomeId;
1093-
1094-
BlockFactory.BlockPalette.TryGetValue((int) BlockFactory.GetRuntimeId(block.Id, block.Metadata), out BlockStateContainer blockState);
1095-
block.SetState(blockState);
1096-
1097-
return block;
1098-
}
10991064

11001065
public bool IsBlock(int x, int y, int z, int blockId)
11011066
{

0 commit comments

Comments
 (0)