Skip to content

Commit b95f0d9

Browse files
Alinshanssunnycase
authored andcommitted
Fix bug. (#53)
* Fix bug. * Fix bug. * Clean up. * Fix item id.
1 parent c096f8c commit b95f0d9

File tree

5 files changed

+242
-199
lines changed

5 files changed

+242
-199
lines changed

src/MineCase.Server.Interfaces/World/Block.cs

Lines changed: 139 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ public enum BlockId : uint
264264

265265
public enum WoodPlankType : uint
266266
{
267-
OakWoodPlanks = 0,
268-
SpruceWoodPlanks = 1,
269-
BirchWoodPlanks = 2,
270-
JungleWoodPlanks = 3,
271-
AcaciaWoodPlanks = 4,
272-
DarkOakWoodPlanks = 5
267+
Oak = 0,
268+
Spruce = 1,
269+
Birch = 2,
270+
Jungle = 3,
271+
Acacia = 4,
272+
DarkOak = 5
273273
}
274274

275275
public enum StoneType : uint
@@ -293,12 +293,12 @@ public enum DirtType : uint
293293
[Flags]
294294
public enum SaplingsType : uint
295295
{
296-
OakSapling = 0,
297-
SpruceSapling = 1,
298-
BirchSapling = 2,
299-
JungleSapling = 3,
300-
AcaciaSapling = 4,
301-
DarkOakSapling = 5,
296+
Oak = 0,
297+
Spruce = 1,
298+
Birch = 2,
299+
Jungle = 3,
300+
Acacia = 4,
301+
DarkOak = 5,
302302

303303
// 0x8 bit field : Set if sapling is ready to grow into a tree
304304
ReadyForTreeFlag = 0x8
@@ -337,10 +337,23 @@ public enum SandType : uint
337337
[Flags]
338338
public enum WoodType : uint
339339
{
340-
OakWoodOrAcaciaWood = 0,
341-
SpruceWoodOrDarkOakWood = 1,
342-
BirchWood = 2,
343-
JungleWood = 3,
340+
Oak = 0,
341+
Spruce = 1,
342+
Birch = 2,
343+
Jungle = 3,
344+
345+
// 0x4 ~ 0x8 bits field specifying the orientation of the wood
346+
FacingUpFlag = 0x0,
347+
FacingEastFlag = 0x4,
348+
FacingNorthFlag = 0x8,
349+
OnlybarkFlag = 0xC
350+
}
351+
352+
[Flags]
353+
public enum Wood2Type : uint
354+
{
355+
Acacia = 0,
356+
DarkOak = 1,
344357

345358
// 0x4 ~ 0x8 bits field specifying the orientation of the wood
346359
FacingUpFlag = 0x0,
@@ -351,22 +364,34 @@ public enum WoodType : uint
351364

352365
public enum LeaveType : uint
353366
{
354-
OakLeaves = 0,
355-
SpruceLeaves = 1,
356-
BirchLeaves = 2,
357-
JungleLeaves = 3,
358-
OakLeavesNoDecay = 4,
359-
SpruceLeavesNoDecay = 5,
360-
BirchLeavesNoDecay = 6,
361-
JungleLeavesNoDecay = 7,
362-
OakLeavesCheckDecay = 8,
363-
SpruceLeavesCheckDecay = 9,
364-
BirchLeavesCheckDecay = 10,
365-
JungleLeavesCheckDecay = 11,
366-
OakLeavesNoDecayAndCheckDecay = 12,
367-
SpruceLeavesNoDecayAndCheckDecay = 13,
368-
BirchLeavesNoDecayAndCheckDecay = 14,
369-
JungleLeavesNoDecayAndCheckDecay = 15
367+
Oak = 0,
368+
Spruce = 1,
369+
Birch = 2,
370+
Jungle = 3,
371+
OakLeaves = 4,
372+
SpruceNoDecay = 5,
373+
BirchNoDecay = 6,
374+
JungleNoDecay = 7,
375+
OakCheckDecay = 8,
376+
SpruceCheckDecay = 9,
377+
BirchCheckDecay = 10,
378+
JungleCheckDecay = 11,
379+
OakNoDecayAndCheckDecay = 12,
380+
SpruceNoDecayAndCheckDecay = 13,
381+
BirchNoDecayAndCheckDecay = 14,
382+
JungleNoDecayAndCheckDecay = 15
383+
}
384+
385+
public enum Leave2Type : uint
386+
{
387+
Acacia = 0,
388+
DarkOak = 1,
389+
AcaciaNoDecay = 4,
390+
DarkOakNoDecay = 5,
391+
AcaciaCheckDecay = 8,
392+
DarkOakCheckDecay = 9,
393+
AcaciaNoDecayAndCheckDecay = 12,
394+
DarkOakNoDecayAndCheckDecay = 13
370395
}
371396

372397
/// <summary>
@@ -403,47 +428,59 @@ public enum TorchesType : uint
403428

404429
public enum DoubleStoneSlabType : uint
405430
{
406-
DoubleStoneSlab = 0,
407-
DoubleSandstoneSlab = 1,
408-
DoubleWoodenSlab = 2,
409-
DoubleCobblestoneSlab = 3,
410-
DoubleBricksSlab = 4,
411-
DoubleStoneBrickSlab = 5,
412-
DoubleNetherBrickSlab = 6,
413-
DoubleQuartzSlab = 7,
414-
SmoothDoubleStoneSlab = 8,
415-
SmoothDoubleSandstoneSlab = 9,
416-
TileDoubleQuartzSlab = 10
431+
Stone = 0,
432+
Sandstone = 1,
433+
Wooden = 2,
434+
Cobblestone = 3,
435+
Bricks = 4,
436+
StoneBrick = 5,
437+
NetherBrick = 6,
438+
Quartz = 7,
439+
SmoothStone = 8,
440+
SmoothSandstone = 9,
441+
TileQuartz = 15
442+
}
443+
444+
public enum DoubleRedSandstoneSlabType : uint
445+
{
446+
Normal = 0,
447+
Smooth = 8
417448
}
418449

419450
public enum StoneSlabType : uint
420451
{
421-
StoneSlab = 0,
422-
SandstoneSlab = 1,
423-
WoodenSlab = 2,
424-
CobblestoneSlab = 3,
425-
BricksSlab = 4,
426-
StoneBrickSlab = 5,
427-
NetherBrickSlab = 6,
428-
QuartzSlab = 7,
429-
UpperStoneSlab = 8,
430-
UpperSandstoneSlab = 9,
431-
UpperWoodenSlab = 10,
432-
UpperCobblestoneSlab = 11,
433-
UpperBricksSlab = 12,
434-
UpperStoneBrickSlab = 13,
435-
UpperNetherBrickSlab = 14,
436-
UpperQuartzSlab = 15
452+
Stone = 0,
453+
Sandstone = 1,
454+
Wooden = 2,
455+
Cobblestone = 3,
456+
Bricks = 4,
457+
StoneBrick = 5,
458+
NetherBrick = 6,
459+
Quartz = 7,
460+
UpperStone = 8,
461+
UpperSandstone = 9,
462+
UpperWooden = 10,
463+
UpperCobblestone = 11,
464+
UpperBricks = 12,
465+
UpperStoneBrick = 13,
466+
UpperNetherBrick = 14,
467+
UpperQuartz = 15
468+
}
469+
470+
public enum RedSandstoneSlabType : uint
471+
{
472+
Normal = 0,
473+
Upper = 1
437474
}
438475

439476
public enum DoubleWoodenSlabType : uint
440477
{
441-
DoubleOak = 0,
442-
DoubleSpruce = 1,
443-
DoubleBirch = 2,
444-
DoubleJungle = 3,
445-
DoubleAcacia = 4,
446-
DoubleDarkOak = 5
478+
Oak = 0,
479+
Spruce = 1,
480+
Birch = 2,
481+
Jungle = 3,
482+
Acacia = 4,
483+
DarkOak = 5
447484
}
448485

449486
public enum WoodenSlabType : uint
@@ -470,16 +507,16 @@ public enum FireType : uint
470507

471508
public enum SandstoneType : uint
472509
{
473-
Sandstone = 0,
474-
ChiseledSandstone = 1,
475-
SmoothSandstone = 2
510+
Normal = 0,
511+
Chiseled = 1,
512+
Smooth = 2
476513
}
477514

478515
public enum RedSandstoneType : uint
479516
{
480-
RedSandstone = 0,
481-
ChiseledRedSandstone = 1,
482-
SmoothRedSandstone = 2
517+
Normal = 0,
518+
Chiseled = 1,
519+
Smooth = 2
483520
}
484521

485522
[Flags]
@@ -875,7 +912,7 @@ public enum SnowType : uint
875912

876913
public enum CactusType : uint
877914
{
878-
FreshlyPlantedCactus = 0,
915+
FreshlyPlanted = 0,
879916
Interval1 = 1,
880917
Interval2 = 2,
881918
Interval3 = 3,
@@ -895,7 +932,7 @@ public enum CactusType : uint
895932

896933
public enum SugarCaneType : uint
897934
{
898-
FreshlyPlantedSugarCane = 0,
935+
FreshlyPlanted = 0,
899936
Interval1 = 1,
900937
Interval2 = 2,
901938
Interval3 = 3,
@@ -957,10 +994,10 @@ public enum RedstoneRepeaterType : uint
957994
FacingWest = 3,
958995

959996
// 0x4 ~ 0x8 bit field specifying the redstone repeater's delay
960-
RedstoneTick1Flag = 0x0,
961-
RedstoneTick2Flag = 0x4,
962-
RedstoneTick3Flag = 0x8,
963-
RedstoneTick4Flag = 0xC
997+
Tick1Flag = 0x0,
998+
Tick2Flag = 0x4,
999+
Tick3Flag = 0x8,
1000+
Tick4Flag = 0xC
9641001
}
9651002

9661003
[Flags]
@@ -1005,10 +1042,10 @@ public enum MonsterEggType : uint
10051042

10061043
public enum StoneBrickType : uint
10071044
{
1008-
StoneBrick = 0,
1009-
MossyStoneBrick = 1,
1010-
CrackedStoneBrick = 2,
1011-
ChiseledStoneBrick = 3
1045+
Normal = 0,
1046+
Mossy = 1,
1047+
Cracked = 2,
1048+
Chiseled = 3
10121049
}
10131050

10141051
public enum PrismarineType : uint
@@ -1182,35 +1219,35 @@ public enum FlowerPotType : uint
11821219
public enum HeadForBlockType : uint
11831220
{
11841221
OnTheFloor = 1,
1185-
OnAWallFacingNorth = 2,
1186-
OnAWallFacingSouth = 3,
1187-
OnAWallFacingEast = 4,
1188-
OnAWallFacingWest = 5
1222+
OnWallFacingNorth = 2,
1223+
OnWallFacingSouth = 3,
1224+
OnWallFacingEast = 4,
1225+
OnWallFacingWest = 5
11891226
}
11901227

11911228
public enum BlockOfQuartzType : uint
11921229
{
1193-
BlockOfQuartz = 0,
1194-
ChiseledQuartzBlock = 1,
1195-
PillarQuartzBlockVertical = 2,
1196-
PillarQuartzBlockNorthSouth = 3,
1197-
PillarQuartzBlockEastWest = 4
1230+
Normal = 0,
1231+
Chiseled = 1,
1232+
Vertical = 2,
1233+
NorthSouth = 3,
1234+
EastWest = 4
11981235
}
11991236

12001237
public enum AnvilForBlockType : uint
12011238
{
1202-
AnvilNS = 0,
1203-
AnvilEW = 1,
1204-
AnvilSN = 2,
1205-
AnvilWE = 3,
1206-
SlightlyDamagedAnvilNS = 4,
1207-
SlightlyDamagedAnvilEW = 5,
1208-
SlightlyDamagedAnvilWE = 6,
1209-
SlightlyDamagedAnvilSN = 7,
1210-
VeryDamagedAnvilNS = 8,
1211-
VeryDamagedAnvilEW = 9,
1212-
VeryDamagedAnvilWE = 10,
1213-
VeryDamagedAnvilSN = 11
1239+
NorthSouth = 0,
1240+
EastWest = 1,
1241+
SouthNorth = 2,
1242+
WestEast = 3,
1243+
SlightlyDamagedNS = 4,
1244+
SlightlyDamagedEW = 5,
1245+
SlightlyDamagedWE = 6,
1246+
SlightlyDamagedSN = 7,
1247+
VeryDamagedNS = 8,
1248+
VeryDamagedEW = 9,
1249+
VeryDamagedWE = 10,
1250+
VeryDamagedSN = 11
12141251
}
12151252

12161253
public struct BlockState : IEquatable<BlockState>

0 commit comments

Comments
 (0)