From fb2fc6772e7cec4f51be9115230934701d0aeb6b Mon Sep 17 00:00:00 2001 From: ProfessorXZ Date: Fri, 14 Oct 2016 23:18:33 +0200 Subject: [PATCH 1/2] Fixes #1021 --- TShockAPI/GetDataHandlers.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 92a8b7f6..8cdf709b 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1741,6 +1741,14 @@ namespace TShockAPI continue; } + if (((Main.tile[realx, realy + 1].type == TileID.Grass && (newtile.Type == TileID.Plants || newtile.Type == TileID.Plants2)) + || (Main.tile[realx, realy + 1].type == TileID.HallowedGrass && (newtile.Type == TileID.HallowedPlants || newtile.Type == TileID.HallowedPlants2)) + || (Main.tile[realx, realy + 1].type == TileID.JungleGrass && newtile.Type == TileID.JunglePlants2)) + && size == 1 && args.Player.Accessories.Any(i => i.active && i.netID == ItemID.FlowerBoots)) + { + return false; + } + // Junction Box if (tile.type == TileID.WirePipe) return false; From ec4152df816b1a0ebc79cf6992937d1a989048ec Mon Sep 17 00:00:00 2001 From: ProfessorXZ Date: Sat, 15 Oct 2016 22:12:45 +0200 Subject: [PATCH 2/2] Separated the Flower Boots check into multiple if statements --- TShockAPI/GetDataHandlers.cs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 8cdf709b..13126f0d 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1741,12 +1741,23 @@ namespace TShockAPI continue; } - if (((Main.tile[realx, realy + 1].type == TileID.Grass && (newtile.Type == TileID.Plants || newtile.Type == TileID.Plants2)) - || (Main.tile[realx, realy + 1].type == TileID.HallowedGrass && (newtile.Type == TileID.HallowedPlants || newtile.Type == TileID.HallowedPlants2)) - || (Main.tile[realx, realy + 1].type == TileID.JungleGrass && newtile.Type == TileID.JunglePlants2)) - && size == 1 && args.Player.Accessories.Any(i => i.active && i.netID == ItemID.FlowerBoots)) + // Fixes the Flower Boots not creating flowers issue + if (size == 1 && args.Player.Accessories.Any(i => i.active && i.netID == ItemID.FlowerBoots)) { - return false; + if (Main.tile[realx, realy + 1].type == TileID.Grass && (newtile.Type == TileID.Plants || newtile.Type == TileID.Plants2)) + { + return false; + } + + if (Main.tile[realx, realy + 1].type == TileID.HallowedGrass && (newtile.Type == TileID.HallowedPlants || newtile.Type == TileID.HallowedPlants2)) + { + return false; + } + + if (Main.tile[realx, realy + 1].type == TileID.JungleGrass && newtile.Type == TileID.JunglePlants2) + { + return false; + } } // Junction Box