mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-16 02:37:41 -04:00
Include message about coordinates in pixels for normal sized blocks in lb/gb creation process. (Thanks goodlyay) Closes #195.
This commit is contained in:
parent
49533facba
commit
b98ffc5bf5
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user