mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-18 03:39:04 -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
@ -31,18 +31,19 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
|
|
||||||
float dist;
|
float dist;
|
||||||
if (!float.TryParse(message, out dist)) {
|
if (!float.TryParse(message, out dist)) {
|
||||||
Player.Message(p, "\"" + message + "\", is not a valid distance."); return;
|
Player.Message(p, "\"{0}\" is not a valid distance.", message); return;
|
||||||
}
|
}
|
||||||
int packedDist = (int)(dist * 32);
|
int packedDist = (int)(dist * 32);
|
||||||
if (packedDist < 0) packedDist = 160;
|
if (packedDist < 0) packedDist = 160;
|
||||||
|
|
||||||
if (packedDist > short.MaxValue) {
|
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)) {
|
} else if (!p.HasCpeExt(CpeExt.ClickDistance)) {
|
||||||
Player.Message(p, "Your client doesn't support changing your reach distance.");
|
Player.Message(p, "Your client doesn't support changing your reach distance.");
|
||||||
} else {
|
} else {
|
||||||
p.SendClickDistance((short)packedDist);
|
p.SendClickDistance((short)packedDist);
|
||||||
p.ReachDistance = packedDist / 32f;
|
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)",
|
"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[] { "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 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." },
|
"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",
|
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",
|
"0 = No fog at all; 1-255 = Less to greater density",
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user