dragon3025
Terrarian
Sorry I tried to do it, but I couldn't get it to work. What Terraria uses to make the rain start is "Main.StartRain();", but I tried it and it didn't work, so I asked for help on Discord. Apparently I have to do something called a reflection, and the Heroes mod source has an example of this: HERO's Mod - Creative Mode + Server Management + And Over 25 tools [1.3.4.4 compatible]. I tried it out, but I still couldn't get it to work and it was very confusing, so if anyone would like to do it, I'd appriciate it and here are the 2 files I already have for it (also my mod is open source when you use extract in the info page for my mod in tmodlaoder's mod menu):I was wondering if you could make something that would stop/start rain?
Thanks if you do and thanks even if you don't wanna!
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ReducedGrinding.Items
{
public class Bottle_of_Rain : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bottle of Rain");
Tooltip.SetDefault("Makes it rain.");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 30;
item.maxStack = 30;
item.rare = 0;
item.useAnimation = 45;
item.useTime = 45;
item.useStyle = 4;
item.value = 5 //Place holder value
item.UseSound = SoundID.Item3;
item.consumable = true;
}
public override bool CanUseItem(Player player)
{
if (<not_raining>)
return true
else
{
Main.NewText("It's already raining.", 255, 255, 255);
return false;
}
}
public override bool UseItem(Player player)
{
<make_it_rain>
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater, 1); //place holder recipe
recipe.AddTile(TileID.Bottles);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
New update, 4.16: Reduced Trifold Map's default drop rate configuration.
Last edited: