Hallam_9K
Empress of Light
Help, how do I make my ore to generate only in the Underground Jungle?
Also, how do I make it shine when I use a spelunker potion?
Also, also, how do I make the ore show up on the mini-map?
Code:
Also, how do I make it shine when I use a spelunker potion?
Also, also, how do I make the ore show up on the mini-map?
Code:
Code:
using System.IO;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.World.Generation;
using Microsoft.Xna.Framework;
using Terraria.GameContent.Generation;
namespace ModOfRandomness
{
public class ModWord : ModWorld
{
private const int saveVersion = 0;
public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
{
int ShiniesIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Shinies"));
if (ShiniesIndex == -1)
{
return;
}
tasks.Insert(ShiniesIndex + 1, new PassLegacy("Custom Mod Ores", delegate (GenerationProgress progress)
{
progress.Message = "Custom Mod Ores";
//Put your custom tile block name
for (int k = 0; k < (int)((double)(Main.maxTilesX * Main.maxTilesY) * 6E-05); k++) // |
{ // |
WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(2, 6), mod.TileType("NoobiteFossilBlock"), false, 0f, 0f, false, true);
}
}));
}
}
}
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ModOfRandomness.Items.Placeable
{
public class NoobiteFossil : ModItem
{
public override void SetDefaults()
{
item.name = "Noobite Fossil";
item.width = 16;
item.height = 16;
item.maxStack = 999;
AddTooltip("The remains of an extinct race.");
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.createTile = mod.TileType("NoobiteFossilBlock"); //put your CustomBlock Tile name
}
}
}
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace ModOfRandomness.Tiles
{
public class NoobiteFossilBlock : ModTile
{
public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileMergeDirt[Type] = true;
drop = mod.ItemType("NoobiteFossil"); //put your CustomBlock name
minPick = 60;
mineResist = 3f;
}
}
}