From 2408984a6bab07ad9372611b4db2eb02e4808315 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 10 Dec 2016 07:56:09 +1100 Subject: [PATCH] Core: fix custom blocks with collide type swimthrough replacing core block ids not working (Thanks Daeslender) --- ClassicalSharp/Blocks/AutoRotate.cs | 2 +- ClassicalSharp/Entities/Components/PhysicsComponent.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ClassicalSharp/Blocks/AutoRotate.cs b/ClassicalSharp/Blocks/AutoRotate.cs index 6f165e5d7..eb4262482 100644 --- a/ClassicalSharp/Blocks/AutoRotate.cs +++ b/ClassicalSharp/Blocks/AutoRotate.cs @@ -61,7 +61,7 @@ namespace ClassicalSharp { } static byte RotateDirection(Game game, byte block, string name, Vector3 offset) { - Vector3 southEast = new Vector3 (1,0,1); + Vector3 southEast = new Vector3 (1, 0, 1); Vector3 southWest = new Vector3 (-1, 0, 1); Vector3I pos = game.SelectedPos.TranslatedPos; diff --git a/ClassicalSharp/Entities/Components/PhysicsComponent.cs b/ClassicalSharp/Entities/Components/PhysicsComponent.cs index 9f691a66e..5860dcf6b 100644 --- a/ClassicalSharp/Entities/Components/PhysicsComponent.cs +++ b/ClassicalSharp/Entities/Components/PhysicsComponent.cs @@ -227,7 +227,7 @@ namespace ClassicalSharp.Entities { if (!blockBB.Intersects(bounds)) continue; modifier = Math.Min(modifier, info.SpeedMultiplier[block]); - if (block >= Block.CpeCount && type == CollideType.SwimThrough) + if (!info.IsLiquid(block) && type == CollideType.SwimThrough) useLiquidGravity = true; } return modifier;