Include message about coordinates in pixels for normal sized blocks in lb/gb creation process. (Thanks goodlyay) Closes #195.

This commit is contained in:
UnknownShadow200 2016-07-11 20:21:57 +10:00
parent 49533facba
commit b98ffc5bf5
2 changed files with 8 additions and 5 deletions

View File

@ -30,19 +30,20 @@ namespace MCGalaxy.Commands.CPE {
if (message == "") { Help(p); return; }
float dist;
if( !float.TryParse(message, out dist)) {
Player.Message(p, "\"" + message + "\", is not a valid distance."); return;
if (!float.TryParse(message, out dist)) {
Player.Message(p, "\"{0}\" is not a valid distance.", message); return;
}
int packedDist = (int)(dist * 32);
if (packedDist < 0) packedDist = 160;
if (packedDist > short.MaxValue) {
Player.Message(p, "\"" + message + "\", is too long a reach distance. Max is 1023 blocks.");
Player.Message(p, "\"{0}\", is too long a reach distance. Max is 1023 blocks.", message);
} else if (!p.HasCpeExt(CpeExt.ClickDistance)) {
Player.Message(p, "Your client doesn't support changing your reach distance.");
} else {
p.SendClickDistance((short)packedDist);
p.ReachDistance = packedDist / 32f;
Player.Message(p, "Set your reach distance to {0} blocks.", dist); return;
}
}

View File

@ -528,8 +528,10 @@ namespace MCGalaxy.Commands.CPE {
"2 = Transparent (Like leaves), 3 = Translucent (Like ice), 4 = Gas (Like air)",
},
new[] { "Type '0' if the block is treated as a cube, '1' if a sprite(e.g roses)." },
new[] { "Enter the three minimum coordinates of the cube in pixels (separated by spaces). There are 16 pixels per block." },
new[] { "Enter the three maximum coordinates of the cube in pixels (separated by spaces). There are 16 pixels per block." },
new[] { "Enter the three minimum coordinates of the cube in pixels (separated by spaces). There are 16 pixels per block.",
"Minimum coordinates for a normal block are 0 0 0." },
new[] { "Enter the three maximum coordinates of the cube in pixels (separated by spaces). There are 16 pixels per block.",
"Maximum coordinates for a normal block are 16 16 16." },
new[] { "Define the block's fog density (The density of it inside, i.e water, lava",
"0 = No fog at all; 1-255 = Less to greater density",
},