diff --git a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs index fc8e5ab63..97e9a7ef5 100644 --- a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs +++ b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs @@ -539,9 +539,6 @@ namespace MCGalaxy.Commands.CPE { if (blockId <= 0 || blockId >= 255) { Player.Message(p, "&cBlock id must be between 1-254"); return false; } - if (!global && blockId < Block.CpeCount) { - Player.Message(p, "&cYou can only redefine standard blocks with /gb."); return false; - } return true; } diff --git a/MCGalaxy/Levels/BlockDefinitions.cs b/MCGalaxy/Levels/BlockDefinitions.cs index f879f4cbf..ad20fb2fc 100644 --- a/MCGalaxy/Levels/BlockDefinitions.cs +++ b/MCGalaxy/Levels/BlockDefinitions.cs @@ -187,12 +187,13 @@ namespace MCGalaxy { for (int i = 1; i < defs.Length; i++) { BlockDefinition def = defs[i]; if (def == null) continue; - if (pl.HasCpeExt(CpeExt.BlockDefinitionsExt, 2) && def.Shape != 0) + if (pl.HasCpeExt(CpeExt.BlockDefinitionsExt, 2) && def.Shape != 0) { SendDefineBlockExt(pl, def, true); - else if (pl.HasCpeExt(CpeExt.BlockDefinitionsExt) && def.Shape != 0) + } else if (pl.HasCpeExt(CpeExt.BlockDefinitionsExt) && def.Shape != 0) { SendDefineBlockExt(pl, def, false); - else + } else { SendDefineBlock(pl, def); + } if (pl.HasCpeExt(CpeExt.BlockPermissions)) pl.SendSetBlockPermission(def.BlockID, pl.level.CanPlace, pl.level.CanDelete); diff --git a/MCGalaxy/Network/Player.Networking.cs b/MCGalaxy/Network/Player.Networking.cs index 992c3fe0a..9606aa041 100644 --- a/MCGalaxy/Network/Player.Networking.cs +++ b/MCGalaxy/Network/Player.Networking.cs @@ -381,7 +381,7 @@ namespace MCGalaxy { void RemoveOldLevelCustomBlocks(Level oldLevel) { BlockDefinition[] defs = oldLevel.CustomBlockDefs; - for (int i = Block.CpeCount; i < 256; i++) { + for (int i = 1; i < 256; i++) { BlockDefinition def = defs[i]; if (def == null || def == BlockDefinition.GlobalDefs[i]) continue; SendRaw(Opcode.CpeRemoveBlockDefinition, (byte)i);