Skip to content

Commit

Permalink
Allow any values for block draw and collide type
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Nov 20, 2017
1 parent f5004f2 commit 5bd4631
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fCraft/Commands/CpeCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ static class CpeCommands {
p.Message(" &bSet name to: " + def.Name);
break;
case 1:
if (byte.TryParse(args, out value) && value <= 2) {
if (byte.TryParse(args, out value)) {
step++; def.CollideType = value;
p.Message(" &bSet solidity to: " + value);
}
Expand Down Expand Up @@ -1585,7 +1585,7 @@ static class CpeCommands {
p.Message(" &bSet maximum coords to X:{0} Y:{1} Z:{2}", maxx, maxy, maxz);
break;
case 11:
if (byte.TryParse(args, out value) && value <= 4) {
if (byte.TryParse(args, out value)) {
step++; def.BlockDraw = value;
p.Message(" &bSet block draw type to: " + value);
}
Expand Down Expand Up @@ -1725,7 +1725,7 @@ static class CpeCommands {
case "solidity":
case "collide":
case "collidetype":
if (byte.TryParse(args, out value) && value <= 2) {
if (byte.TryParse(args, out value)) {
p.Message("&bChanged solidity of &a{0}&b from &a{1}&b to &a{2}", def.Name, def.CollideType, value);
def.CollideType = value;
hasChanged = true;
Expand Down Expand Up @@ -1847,7 +1847,7 @@ static class CpeCommands {
break;
case "draw":
case "blockdraw":
if (byte.TryParse(args, out value) && value <= 4) {
if (byte.TryParse(args, out value)) {
p.Message("&bChanged block draw type of &a{0}&b from &a{1}&b to &a{2}", def.Name, def.BlockDraw, value);
def.BlockDraw = value;
hasChanged = true;
Expand Down

0 comments on commit 5bd4631

Please sign in to comment.