Make /rp rainbow not be quite so laggy, also blocks such as 'wactive_water' now also alias to 'activewater' (thanks goodlyay).

This commit is contained in:
UnknownShadow200 2016-04-07 19:39:27 +10:00
parent a26e8ab3bc
commit 9ea080319c
2 changed files with 4 additions and 2 deletions

View File

@ -107,7 +107,9 @@ namespace MCGalaxy {
for (int i = 0; i < names.Length; i++) {
Properties[i].Name = names[i];
if (names[i] != "unknown")
Aliases[names[i]] = (byte)i;
Aliases[names[i]] = (byte)i;
if (names[i].IndexOf('_') >= 0)
Aliases[names[i].Replace("_", "")] = (byte)i;
}
// Add old MCGalaxy aliases

View File

@ -179,7 +179,7 @@ namespace MCGalaxy.BlockPhysics {
if (rainbownum > 2) {
byte block = lvl.blocks[C.b];
if (block < Block.red || block > Block.darkpink) {
lvl.AddUpdate(C.b, Block.red, true, C.data);
lvl.AddUpdate(C.b, Block.red, false, C.data);
} else {
byte next = block == Block.darkpink ? Block.red : (byte)(block + 1);
lvl.AddUpdate(C.b, next);