//////////////// public bool DropCarriedItem() { if (Main.netMode == 2) { return(false); } var mymod = (EncumbranceMod)this.mod; int invMax = PlayerItemHelpers.VanillaInventoryHotbarSize + PlayerItemHelpers.VanillaInventoryMainSize; int encumbStartSlot = this.GetCurrentCapacity(); int encumbSpan = invMax - encumbStartSlot; int slot = (int)(Main.rand.NextFloat() * (float)encumbSpan) + encumbStartSlot; Item item = this.player.inventory[slot]; if (item != null && !item.IsAir) { PlayerItemHelpers.DropInventoryItem(this.player, slot, mymod.Config.DroppedItemNoGrabDelay); this.ItemDropCooldown = mymod.Config.DropCooldown; if (mymod.Config.DebugInfoMode) { Main.NewText(" Dropped " + item.Name + "(" + slot + ")"); } return(true); } return(false); }
public void DropAllCarriedItems() { if (Main.netMode == 2) { return; } var mymod = (EncumbranceMod)this.mod; this.ItemDropCooldown = mymod.Config.DropCooldown; for (int i = PlayerItemHelpers.VanillaInventoryHotbarSize; i < PlayerItemHelpers.VanillaInventoryMainSize; i++) { Item item = this.player.inventory[i]; if (item != null && !item.IsAir) { if (mymod.Config.DebugInfoMode) { Main.NewText(" Dropped " + item.Name); } PlayerItemHelpers.DropInventoryItem(this.player, i, mymod.Config.DroppedItemNoGrabDelay); } } }
//////////////// public override void SetStaticDefaults() { this.DisplayName.SetDefault("Joint Bracer"); this.Tooltip.SetDefault("Non-jump movements draw less stamina" + '\n' + "Negates knockback" + '\n' + "'For when push comes to shove.'"); ExtendedPlayerHooks.AddArmorEquipAction("Stamina:JointBracerEquip", delegate(Player player, int slot, Item myitem) { if (myitem.type != ModContent.ItemType <JointBracerItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var modplayer = player.GetModPlayer <StaminaPlayer>(); modplayer.IsWearingJointBracer = true; }); ExtendedPlayerHooks.AddArmorUnequipAction("Stamina:JointBracerUnequip", delegate(Player player, int slot, int itemType) { if (itemType != ModContent.ItemType <JointBracerItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var modplayer = player.GetModPlayer <StaminaPlayer>(); modplayer.IsWearingJointBracer = false; }); }
//////////////// /*public override bool CanRightClick() { * return true; * } * * public override bool ConsumeItem( Player player ) { * SoundEmitterItem.OpenUI( this.item ); * * return false; * }*/ //////////////// public override bool UseItem(Player player) { if (Main.netMode == NetmodeID.Server || player.whoAmI != Main.myPlayer) { return(base.UseItem(player)); } string timerName = "SoundEmitterPlace_" + player.whoAmI; if (Timers.GetTimerTickDuration(timerName) > 0) { return(base.UseItem(player)); } Timers.SetTimer(timerName, 15, false, () => false); if (this.Def == null) { Main.NewText("Sound Emitter settings must be first specified (click item's button)."); return(base.UseItem(player)); } if (SoundEmitterItem.AttemptSoundEmitterPlacementForCurrentPlayer(this.Def)) { PlayerItemHelpers.RemoveInventoryItemQuantity(player, this.item.type, 1); } else { //SoundEmitterItem.AttemptSoundEmitterToggle( Main.MouseWorld ); } return(base.UseItem(player)); }
//////////////// public override void SetStaticDefaults() { this.DisplayName.SetDefault("Rage Headband"); this.Tooltip.SetDefault("Trades exhaustion for health loss" + '\n' + "'Feel the burn!'"); ExtendedPlayerHooks.AddArmorEquipAction("Stamina:RageHeadbandEquip", delegate(Player player, int slot, Item myitem) { if (myitem.type != ModContent.ItemType <RageHeadbandItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingRageBandana = true; }); ExtendedPlayerHooks.AddArmorUnequipAction("Stamina:RageHeadbandUnequip", delegate(Player player, int slot, int itemType) { if (itemType != ModContent.ItemType <RageHeadbandItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingRageBandana = false; }); }
//////////////// public override void SetStaticDefaults() { this.DisplayName.SetDefault("Powered Exoskeleton Frame"); this.Tooltip.SetDefault("Attacks, movement, and jumping draw less stamina" + '\n' + "Negates fall damage and knockback" + '\n' + "'Oil Can not included.'"); ExtendedPlayerHooks.AddArmorEquipAction("Stamina:ExoskeletonEquip", delegate(Player player, int slot, Item myitem) { if (myitem.type != ModContent.ItemType <ExoskeletonItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingExoskeleton = true; }); ExtendedPlayerHooks.AddArmorUnequipAction("Stamina:ExoskeletonUnequip", delegate(Player player, int slot, int itemType) { if (itemType != ModContent.ItemType <ExoskeletonItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingExoskeleton = false; }); }
//////////////// public override void SetStaticDefaults() { this.DisplayName.SetDefault("Leg Spring"); this.Tooltip.SetDefault("Jumps draw less stamina" + '\n' + "Negates fall damage" + '\n' + "'Puts a spring in your step.'"); ExtendedPlayerHooks.AddArmorEquipAction("Stamina:LegSprintEquip", delegate(Player player, int slot, Item myitem) { if (myitem.type != ModContent.ItemType <LegSpringItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingLegSprings = true; }); ExtendedPlayerHooks.AddArmorUnequipAction("Stamina:LegSprintUnequip", delegate(Player player, int slot, int itemType) { if (itemType != ModContent.ItemType <LegSpringItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingLegSprings = false; }); }
//////////////// public override void SetStaticDefaults() { this.DisplayName.SetDefault("Exercise Supplements"); this.Tooltip.SetDefault("Makes exercise easier"); ExtendedPlayerHooks.AddArmorEquipAction("Stamina:ExerciseSupplementsEquip", delegate(Player player, int slot, Item myitem) { if (myitem.type != ModContent.ItemType <ExerciseSupplementsItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsUsingSupplements = true; }); ExtendedPlayerHooks.AddArmorUnequipAction("Stamina:ExerciseSupplementsUnequip", delegate(Player player, int slot, int itemType) { if (itemType != ModContent.ItemType <ExerciseSupplementsItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsUsingSupplements = false; }); }
//////////////// public override void SetStaticDefaults() { this.DisplayName.SetDefault("Champion Belt"); this.Tooltip.SetDefault("Attacks draw less stamina" + '\n' + "'We are the champions!'"); ExtendedPlayerHooks.AddArmorEquipAction("Stamina:ChampionBeltEquip", delegate(Player player, int slot, Item myitem) { if (myitem.type != ModContent.ItemType <ChampionBeltItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingMuscleBelt = true; }); ExtendedPlayerHooks.AddArmorUnequipAction("Stamina:ChampionBeltUnequip", delegate(Player player, int slot, int itemType) { if (itemType != ModContent.ItemType <ChampionBeltItem>()) { return; } if (!PlayerItemHelpers.IsAccessorySlot(player, slot)) { return; } var myplayer = player.GetModPlayer <StaminaPlayer>(); myplayer.IsWearingMuscleBelt = false; }); }
public override bool Shoot(Player player, ref Vector2 pos, ref float velX, ref float velY, ref int type, ref int dmg, ref float kb) { Vector2 worldMousePos = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition; int worldX = (int)worldMousePos.X; int worldY = (int)worldMousePos.Y; ushort tileX = (ushort)(worldX / 16); ushort tileY = (ushort)(worldY / 16); Color? dustColor = null; if (this.IsCopying) { if (!this.AttemptCopyColorAt(player, tileX, tileY)) { Main.NewText("No color found to copy from.", Color.Yellow); } this.IsCopying = false; } else { Item paintItem = this.GetCurrentPaintItem(); if (paintItem != null) { if (PaintBlasterHelpers.GetPaintAmount(paintItem) <= 0) { if (this.SwitchToNextMatchingNonemptyPaint()) { paintItem = this.GetCurrentPaintItem(); } else { paintItem = null; } } if (paintItem != null) { Color paintColor = PaintBlasterHelpers.GetPaintColor(paintItem); if (this.HasMatchingPaintAt(paintColor, tileX, tileY)) { dustColor = paintColor; } } } } if (this.BufferedPaintUses > 0 && dustColor != null) { this.BufferedPaintUses = 0f; pos = PlayerItemHelpers.TipOfHeldItem(player) - Main.screenPosition; Dust.NewDust(pos, 8, 8, 2, velX, velY, 0, (Color)dustColor, 1f); } return(false); }
protected override void ReceiveOnServer(int fromWho) { var myworld = ModContent.GetInstance <EmittersWorld>(); myworld.AddEmitter(this.GetNewEmitter(), this.TileX, this.TileY); PlayerItemHelpers.RemoveInventoryItemQuantity(Main.player[this.FromWho], ModContent.ItemType <EmitterItem>(), 1); }
//////////////// protected override void ReceiveOnClient() { var myworld = ModContent.GetInstance <EmittersWorld>(); Main.PlaySound(SoundID.Item108, new Vector2(this.TileX << 4, this.TileY << 4)); myworld.AddEmitter(this.GetNewEmitter(), this.TileX, this.TileY); PlayerItemHelpers.RemoveInventoryItemQuantity(Main.player[this.FromWho], ModContent.ItemType <EmitterItem>(), 1); }
//////////////// private void PreUpdateEquipOverride() { this._OldHeldItem = this.player.HeldItem; if (Main.mouseItem != null && !Main.mouseItem.IsAir) { PlayerItemHelpers.DropInventoryItem(this.player, this.player.selectedItem); } this.player.inventory[this.player.selectedItem] = this.ForceEquip; }
private static bool ScribeBlankContractIf(Player player, Item item) { int blankContractType = ModContent.ItemType <BlankContractItem>(); Item contractItem = PlayerItemFinderHelpers.FindFirstOfPossessedItemFor( player, new HashSet <int> { blankContractType }, false ); var myContractItem = contractItem.modItem as BlankContractItem; if (contractItem == null || myContractItem == null) { Main.NewText("No blank contract item in player's possession.", Color.Yellow); return(false); } if (item?.active != true) { if (IntrinsicsConfig.Instance.DebugModeInfo) { Main.NewText("BlankContractItem reports it cannot swap selected item"); } return(false); } if (!myContractItem.CanAddItem(item)) { Main.NewText("This item cannot be scribed.", Color.Yellow); return(false); } bool hasMadeContract = myContractItem.CreateImpartmentContract(player, item); if (IntrinsicsConfig.Instance.DebugModeInfo) { Main.NewText("Impartment contract created? " + hasMadeContract); } if (!hasMadeContract) { return(false); } PlayerItemHelpers.RemoveInventoryItemQuantity(player, item.type, 1); PlayerItemHelpers.RemoveInventoryItemQuantity(player, blankContractType, 1); Main.mouseItem = new Item(); return(hasMadeContract); }
public void PlayerPreItemCheck(Player player) { if (player.FindBuffIndex(this.Type) == -1) { return; } // Force item unselect if (!PlayerItemHelpers.UnhandItem(player)) { player.DropSelectedItem(); } }
public bool SetValue(int newTypedValue, int coinItemType) { if (newTypedValue < 0 || newTypedValue >= 100) { return(false); } long value = this.OfferTotal; switch (coinItemType) { case ItemID.PlatinumCoin: value %= 1000000L; value += (long)newTypedValue * 1000000L; break; case ItemID.GoldCoin: long plats = this.OfferTotal / 1000000L; value %= 10000; value += (long)newTypedValue * 10000; value += plats * 1000000L; break; case ItemID.SilverCoin: long golds = this.OfferTotal / 10000L; value %= 100; value += (long)newTypedValue * 100L; value += golds * 10000L; break; case ItemID.CopperCoin: long silvs = this.OfferTotal / 100L; value += (long)newTypedValue; value += silvs * 100L; break; default: return(false); } long max = PlayerItemHelpers.CountMoney(Main.LocalPlayer, false); if (value > max) { return(false); } this.OfferTotal = value; return(true); }
/// <summary> /// Gets a formatted collection of a player's body equipment. /// </summary> /// <param name="player"></param> /// <returns></returns> public static IDictionary <string, string> GetPlayerEquipment(Player player) { var dict = new Dictionary <string, string>(); int acc = 1; int van = 1; int unk = 1; for (int i = 0; i < player.armor.Length; i++) { string key; Item item = player.armor[i]; if (item == null || item.IsAir) { continue; } if (i == 0) { key = "Head"; } else if (i == 1) { key = "Body"; } else if (i == 2) { key = "Legs"; } else if (PlayerItemHelpers.IsAccessorySlot(player, i)) { key = "Accessory " + acc; acc++; } else if (PlayerItemHelpers.IsVanitySlot(player, i)) { key = "Vanity " + van; van++; } else { key = "? " + unk; unk++; } dict[key] = item.HoverName; } return(dict); }
//////////////// public override bool PreItemCheck() { if (this.player.itemAnimation > 0) { Item heldItem = this.player.HeldItem; if (heldItem.type == ModContent.ItemType <CrossDimensionalAggregatorItem>()) { Vector2 pos = PlayerItemHelpers.TipOfHeldItem(this.player); Dust.NewDust(pos, heldItem.width, heldItem.height, 15, 0, 0, 150, Main.DiscoColor, 1.2f); } } return(base.PreItemCheck()); }
//////////////// public override void Update(GameTime gameTime) { if (!this.IsOpen) { return; } base.Update(gameTime); long money = PlayerItemHelpers.CountMoney(Main.LocalPlayer, false); if (this.OfferTotal > money) { this.Reset(); Main.NewText("Don't be tryin t' pull a fast one, matey!", Color.Yellow); } }
public static IList <string> GetCurrentPlayerEquipment() { Player player = Main.LocalPlayer; var list = new List <string>(); for (int i = 0; i < player.armor.Length; i++) { string output = ""; Item item = player.armor[i]; if (item == null || item.IsAir) { continue; } if (i == 0) { output += "Head: "; } else if (i == 1) { output += "Body: "; } else if (i == 2) { output += "Legs: "; } else if (PlayerItemHelpers.IsAccessorySlot(player, i)) { output += "Accessory: "; } else if (PlayerItemHelpers.IsVanitySlot(player, i)) { output += "Vanity: "; } output += item.HoverName; list.Add(output); } return(list); }
//////////////// public void RenderRodCastFX(Player player) { var mymod = (DowsingMod)this.mod; Vector2 pos = PlayerItemHelpers.TipOfHeldItem(player); int particles = Math.Max(2, ((mymod.Config.Data.MaxDowsingRangeInTiles / 3) - this.CurrentBeamTravelDistance) / 2); int dust_type = 264; for (int i = 0; i < particles; i++) { var dust = Dust.NewDustDirect(pos, 1, 1, dust_type, 0f, 0f, 0, Color.YellowGreen, 0.8f); dust.noGravity = true; dust.noLight = true; dust.fadeIn = 0.8f; } if ((mymod.DEBUGFLAGS & 1) != 0) { DebugHelpers.Print("cast from", "particles: " + particles + ", dist: " + this.CurrentBeamTravelDistance, 20); } }
public static bool AttemptToTemporaryLicenseItem(Player player, Item item) { int trialLicenseType = ModContent.ItemType <TrialLicenseItem>(); int totalLicenses = ItemFinderHelpers.CountTotalOfEach(player.inventory, new HashSet <int> { trialLicenseType }); int needed = LicenseItem.ComputeCost(item); if (totalLicenses < needed) { return(false); } var realItemDef = new ItemDefinition(item.type); var myplayer = player.GetModPlayer <LicensesPlayer>(); myplayer.TrialLicenseItemByDefinition(realItemDef, true); PlayerItemHelpers.RemoveInventoryItemQuantity(player, trialLicenseType, needed); return(true); }
public static Item GetGrappleItem(Player player) { return(PlayerItemHelpers.GetGrappleItem(player)); }
public void Update(Player player) { if (!this.IsReady(player)) { CapitalismLogic.IsDay = Main.dayTime; return; } var mymod = CapitalismMod.Instance; if (player.talkNPC != -1) { long money = PlayerItemHelpers.CountMoney(player, false); long spent = this.LastMoney - money; this.LastMoney = money; if (spent > 0) { this.LastBuyItem = this.AccountForPurchase(player, spent, this.LastBuyItem); } else if (spent < 0) { this.AccountForSale(player, -spent); } else { this.LastBuyItem = null; } // Snapshot current inventory int len = player.inventory.Length; for (int i = 0; i < len; i++) { Item item = player.inventory[i]; if (item != null) { this.PrevInventoryInfos[i] = new KeyValuePair <int, int>(item.type, item.stack); } else { this.PrevInventoryInfos[i] = new KeyValuePair <int, int>(0, 0); } } if (Main.mouseItem != null) { this.PrevMouseInfo = new KeyValuePair <int, int>(Main.mouseItem.type, Main.mouseItem.stack); } else { this.PrevMouseInfo = new KeyValuePair <int, int>(0, 0); } } // Advance day if (CapitalismLogic.IsDay != Main.dayTime) { CapitalismLogic.IsDay = Main.dayTime; this.DecayAllVendorPrices(player); } }
/// <summary> /// Reports all the reasons a given recipe for a givne player will fail with a given set of ingredients (defaults to /// the player's inventory). /// </summary> /// <param name="player"></param> /// <param name="recipe"></param> /// <param name="missingTile">Returns the tile IDs (crafting stations) needed for the recipe.</param> /// <param name="missingItemTypesStacks">Returns the missing item ids and amounts for the recipe.</param> /// <param name="availableIngredients"></param> /// <returns></returns> public static RecipeCraftFailReason GetRecipeFailReasons(Player player, Recipe recipe, out int[] missingTile, out IDictionary <int, int> missingItemTypesStacks, IEnumerable <Item> availableIngredients = null ) { RecipeCraftFailReason reason = 0; var missingTileList = new List <int>(); missingItemTypesStacks = new Dictionary <int, int>(); // Get available item ingredients if (availableIngredients == null) { availableIngredients = player.inventory .Take(58) .Where(item => !item.IsAir); bool? _; Item[] chest = PlayerItemHelpers.GetCurrentlyOpenChest(player, out _); if (chest != null) { availableIngredients = availableIngredients.Concat(chest); } } // Process ingredients list into id + stack map IDictionary <int, int> availIngredientInfo = new Dictionary <int, int>(availableIngredients.Count()); foreach (Item item in availableIngredients) { if (availIngredientInfo.ContainsKey(item.netID)) { availIngredientInfo[item.netID] += item.stack; } else { availIngredientInfo[item.netID] = item.stack; } } // Tiles for (int i = 0; i < recipe.requiredTile.Length; i++) { int reqTileType = recipe.requiredTile[i]; if (reqTileType == -1) { break; } if (!player.adjTile[reqTileType]) { missingTileList.Add(reqTileType); reason |= RecipeCraftFailReason.MissingTile; } } // Items for (int i = 0; i < recipe.requiredItem.Length; i++) { Item reqItem = recipe.requiredItem[i]; if (reqItem == null || reqItem.type == 0) { break; } int reqStack = reqItem.stack; bool hasCheckedGroups = false; foreach (var kv in availIngredientInfo) { int itemType = kv.Key; int itemStack = kv.Value; if (recipe.useWood(itemType, reqItem.type) || recipe.useSand(itemType, reqItem.type) || recipe.useIronBar(itemType, reqItem.type) || recipe.useFragment(itemType, reqItem.type) || recipe.usePressurePlate(itemType, reqItem.type) || recipe.AcceptedByItemGroups(itemType, reqItem.type)) { reqStack -= itemStack; hasCheckedGroups = true; } } if (!hasCheckedGroups && availIngredientInfo.ContainsKey(reqItem.netID)) { reqStack -= availIngredientInfo[reqItem.netID]; } // Account for missing ingredients: if (reqStack > 0) { missingItemTypesStacks[reqItem.netID] = reqStack; reason |= RecipeCraftFailReason.MissingItem; } } if (recipe.needWater && !player.adjWater && !player.adjTile[172]) { reason |= RecipeCraftFailReason.NeedsNearbyWater; } if (recipe.needHoney && !player.adjHoney) { reason |= RecipeCraftFailReason.NeedsNearbyHoney; } if (recipe.needLava && !player.adjLava) { reason |= RecipeCraftFailReason.NeedsNearbyLava; } if (recipe.needSnowBiome && !player.ZoneSnow) { reason |= RecipeCraftFailReason.NeedsNearbySnowBiome; } missingTile = missingTileList.ToArray(); return(reason); }
//////////////// public override void PreUpdate() { Player plr = this.player; if (plr.whoAmI != Main.myPlayer) { return; } if (plr.dead) { return; } var mymod = (StarvationMod)this.mod; int buffIdx = plr.FindBuffIndex(BuffID.WellFed); bool isStarving = false; if (buffIdx == -1) { if (this.HurtDelay-- < 0) { this.HurtDelay = mymod.Config.StarvationHarmRepeatDelayInTicks; this.HungerHurt(); } isStarving = true; } else { if (plr.buffTime[buffIdx] > (mymod.Config.WellFedAddedDrainPerTick + 1)) { float mul = mymod.Config.AddedWellFedDrainRatePerTickMultiplierPerMaxHealthOver100; float addDrain = mul * (float)Math.Max(0, this.player.statLifeMax - 100); plr.buffTime[buffIdx] -= mymod.Config.WellFedAddedDrainPerTick + (int)addDrain; } } if (isStarving && isStarving != this.IsStarving) { Main.NewText("You're starving! Find food quickly.", Color.Red); if (this.player.statLifeMax == 400 && mymod.Config.CraftableUnlifeCrystal) { Main.NewText("Tip: Craft Unlife Crystals to reduce max hunger rate (but also max health).", new Color(96, 96, 96)); } } this.IsStarving = isStarving; if (Timers.GetTimerTickDuration("StarvationInventoryRotCheck") <= 0) { Timers.SetTimer("StarvationInventoryRotCheck", 60, () => { if (Main.gamePaused || !LoadHelpers.IsWorldSafelyBeingPlayed()) { return(false); } for (int i = 0; i < player.inventory.Length; i++) { Item item = player.inventory[i]; if (item == null || item.IsAir) { continue; } if (RotItem.IsRotted(item)) { if (!Main.mouseItem.IsAir && i == PlayerItemHelpers.VanillaInventorySelectedSlot) { Main.mouseItem = new Item(); } player.inventory[i] = new Item(); ItemHelpers.CreateItem(player.Center, ModContent.ItemType <RotItem>(), item.stack, RotItem.Width, RotItem.Height); } } bool?_; Item[] myChest = PlayerItemHelpers.GetCurrentlyOpenChest(player, out _); if (myChest != null) { for (int i = 0; i < myChest.Length; i++) { Item item = myChest[i]; if (item == null || item.IsAir) { continue; } if (RotItem.IsRotted(item)) { myChest[i] = new Item(); ItemHelpers.CreateItem(player.Center, ModContent.ItemType <RotItem>(), item.stack, RotItem.Width, RotItem.Height); } } } return(false); }); } }