BarkingUpTheRightTree.Patches.Game1Patch.CreateObjectDebrisPrefix C# (CSharp) Метод

CreateObjectDebrisPrefix() статический приватный Метод

The prefix for the Game1.createObjectDebris(int, int, int, int, int, float, GameLocation) and Game1.createObjectDebris(int, int, int, long, StardewValley.GameLocation)) methods.
This is used for ignoring debris spawning for debris that has an id of 21.
The reason for 21 is because OpCodes.Ldc_I4_S only accepts an and sbyte.MaxValue isn't big enough to be outside of the game object ids range. As such 21 was used as it's an unused id and isn't an 'aliased' id (check the in Debris(int, int, Vector2, Vector2, float) constructor for the 'aliased' types).
static private CreateObjectDebrisPrefix ( int objectIndex ) : bool
objectIndex int
Результат bool
        internal static bool CreateObjectDebrisPrefix(int objectIndex) => objectIndex != 21;
    }