mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Add rope/lader collide type 7
This commit is contained in:
parent
fbff9e874c
commit
17de69c671
@ -225,6 +225,7 @@ namespace MCGalaxy.Blocks {
|
||||
public const byte SlipperyIce = 4; // Solid and fully slidable on.
|
||||
public const byte LiquidWater = 5; // Water style 'swimming'/'bobbing'
|
||||
public const byte LiquidLava = 6; // Lava style 'swimming'/'bobbing'
|
||||
public const byte ClimbRope = 7; // Rope style 'climbing'
|
||||
|
||||
public static bool IsSolid(byte collide) {
|
||||
return collide >= Solid && collide <= SlipperyIce;
|
||||
|
@ -173,11 +173,11 @@ namespace MCGalaxy.Commands.CPE {
|
||||
Predicate<Player> selector = pl => pl.level == lvl;
|
||||
LevelConfig cfg = lvl.Config;
|
||||
|
||||
cfg.SkyColor = preset.Sky; LevelEnv.UpdateColor(selector, 0, cfg.SkyColor);
|
||||
cfg.CloudColor = preset.Clouds; LevelEnv.UpdateColor(selector, 1, cfg.CloudColor);
|
||||
cfg.FogColor = preset.Fog; LevelEnv.UpdateColor(selector, 2, cfg.FogColor);
|
||||
cfg.SkyColor = preset.Sky; LevelEnv.UpdateColor(selector, 0, cfg.SkyColor);
|
||||
cfg.CloudColor = preset.Clouds; LevelEnv.UpdateColor(selector, 1, cfg.CloudColor);
|
||||
cfg.FogColor = preset.Fog; LevelEnv.UpdateColor(selector, 2, cfg.FogColor);
|
||||
cfg.ShadowColor = preset.Shadow; LevelEnv.UpdateColor(selector, 3, cfg.ShadowColor);
|
||||
cfg.LightColor = preset.Sun; LevelEnv.UpdateColor(selector, 4, cfg.LightColor);
|
||||
cfg.LightColor = preset.Sun; LevelEnv.UpdateColor(selector, 4, cfg.LightColor);
|
||||
|
||||
Level.SaveSettings(p.level);
|
||||
return true;
|
||||
|
@ -255,7 +255,7 @@ namespace MCGalaxy.Commands.CPE {
|
||||
step++;
|
||||
bd.Shape = bd.MaxY;
|
||||
} else if (step == 9) {
|
||||
if (CommandParser.GetByte(p, value, "Collide type", ref bd.CollideType, 0, 6))
|
||||
if (CommandParser.GetByte(p, value, "Collide type", ref bd.CollideType, 0, 7))
|
||||
step++;
|
||||
} else if (step == 10) {
|
||||
if (Utils.TryParseDecimal(value, out bd.Speed) && bd.Speed >= 0.25f && bd.Speed <= 3.96f)
|
||||
@ -671,7 +671,7 @@ namespace MCGalaxy.Commands.CPE {
|
||||
"0 - block is walk-through (e.g. air).", "1 - block is swim-through/climbable (e.g. rope).",
|
||||
"2 - block is solid (e.g. dirt).", "3 - block is solid, but slippery like ice",
|
||||
"4 - block is solid, but even slipperier than ice", "5 - block is swim-through like water",
|
||||
"6 - block is swim-through like lava" } },
|
||||
"6 - block is swim-through like lava", "7 - block is climbable like rope" } },
|
||||
{ "speed", new string[] { "Type a number between '0.25' (25% speed) and '3.96' (396% speed).",
|
||||
"This speed is used when inside or walking on the block. Default speed is 1" }
|
||||
},
|
||||
|
@ -270,7 +270,7 @@ namespace MCGalaxy {
|
||||
} else {
|
||||
raw = Block.Convert(block);
|
||||
if (raw >= Block.CpeCount) raw = Block.Orange;
|
||||
}
|
||||
}
|
||||
if (raw > MaxRawBlock) raw = level.RawFallback(block);
|
||||
|
||||
// Custom block replaced a core block
|
||||
|
Loading…
x
Reference in New Issue
Block a user