From 9707aac835899d51c3f0aa936de88caacffa02bc Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 6 Feb 2018 23:17:25 +1100 Subject: [PATCH] Fix breaking custom blocks causing error from recent commits also reduce skeleton size a little bit --- MCGalaxy/Player/Group/Group.cs | 8 +++++--- MCGalaxy/util/Math/AABB.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MCGalaxy/Player/Group/Group.cs b/MCGalaxy/Player/Group/Group.cs index b2e4720a3..ea720d472 100644 --- a/MCGalaxy/Player/Group/Group.cs +++ b/MCGalaxy/Player/Group/Group.cs @@ -21,6 +21,7 @@ using System.IO; using MCGalaxy.Blocks; using MCGalaxy.Commands; using MCGalaxy.Events.GroupEvents; +using BlockID = System.UInt16; namespace MCGalaxy { /// This is the group object, where ranks and their data are stored @@ -54,7 +55,7 @@ namespace MCGalaxy { public PlayerList Players; public List Commands; - public bool[] Blocks = new bool[256]; + public bool[] Blocks = new bool[Block.ExtendedCount]; public Group() { } private Group(LevelPermission perm, int maxB, int maxUn, string name, char colCode) { @@ -73,8 +74,9 @@ namespace MCGalaxy { } public void SetUsableBlocks() { - for (int i = 0; i < Blocks.Length; i++) - Blocks[i] = BlockPerms.UsableBy(Permission, (byte)i); + for (int i = 0; i < Blocks.Length; i++) { + Blocks[i] = BlockPerms.UsableBy(Permission, (BlockID)i); + } } public bool CanExecute(Command cmd) { return Commands.Contains(cmd); } diff --git a/MCGalaxy/util/Math/AABB.cs b/MCGalaxy/util/Math/AABB.cs index 791c947e6..39118ccab 100644 --- a/MCGalaxy/util/Math/AABB.cs +++ b/MCGalaxy/util/Math/AABB.cs @@ -140,7 +140,7 @@ namespace MCGalaxy.Maths { if (model.CaselessEq("head")) return new Vec3S32(31, 31, 31); if (model.CaselessEq("pig")) return new Vec3S32(28, 28, 28); if (model.CaselessEq("sheep")) return new Vec3S32(20, 40, 20); - if (model.CaselessEq("skeleton")) return new Vec3S32(16, 60, 16); + if (model.CaselessEq("skeleton")) return new Vec3S32(16, 56, 16); if (model.CaselessEq("spider")) return new Vec3S32(30, 24, 30); return new Vec3S32(18, 56, 18); // default humanoid size