You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When placing a ModTile, tile's CanPlace override is not ran
Log File
No response
Steps to reproduce
Create a ModTile and a ModItem that crates that tile with Item.createTile
In ModTile, make a CanPlace override that uses Main.NewText() to display "Placed?" in the chat then checks if the tile below is dirt. Return true if it is dirt, return false if it is not
Attempt to place the tile
Expected Behavior
"Placed?" should appear in teh chat and teh tiel should only get placed if the tile under it is dirt
Actual Behavior
The tile is always placed and "Placed?" does not appear in the chat
Reproduction frequency
Consistantly
Additional Information
Followed ExampleHerb.cs when initially finding the issue
The ModTile still respects required Anchors
The text was updated successfully, but these errors were encountered:
GlobalTile.CanPlace is also not called when the tile to be placed is a Modded Tile.
GlobalTile.CanPlace is called for vanilla tiles.
Create a class that inherits from GlobalTile.
In NewGlobalTile, override CanPlace that logs the tile type: Mod.Logger.InfoFormat("CanPlace {0},{1} type {2}", i, j, type);
Try to place a ModTile
See that CanPlace is never called and the entry is never logged.
Version
Latest 1.4.4-preview
OS
Windows
Platform
Steam
This bug affects
Mod capability as a Modder
Description
When placing a ModTile, tile's CanPlace override is not ran
Log File
No response
Steps to reproduce
Expected Behavior
"Placed?" should appear in teh chat and teh tiel should only get placed if the tile under it is dirt
Actual Behavior
The tile is always placed and "Placed?" does not appear in the chat
Reproduction frequency
Consistantly
Additional Information
Followed ExampleHerb.cs when initially finding the issue
The ModTile still respects required Anchors
The text was updated successfully, but these errors were encountered: