Minecraftmodcustomstuff Wiki
(Added clarification on the 'size' and 'rate' attributes)
(Added a 'fix' about one of the bugs.)
Line 49: Line 49:
 
*If you use damage value, and this block has "added" event (for damage value), Custom Stuff does not execute this event. This is due to the fact that the event "added" is executed before change "damage" value.
 
*If you use damage value, and this block has "added" event (for damage value), Custom Stuff does not execute this event. This is due to the fact that the event "added" is executed before change "damage" value.
 
*Generating large amounts of custom ore upon world generation is known to cause HUGE lag spikes.
 
*Generating large amounts of custom ore upon world generation is known to cause HUGE lag spikes.
  +
**To fix this, set the block type to [[simple]], which removes many of the lag-inducing properties of blocks.
 
[[Category:Oregen]]
 
[[Category:Oregen]]
 
[[Category:Examples]]
 
[[Category:Examples]]

Revision as of 04:16, 11 March 2012

2012-01-31 20.23

Flower generation with damage value

Have you created an ore or a flower, and want to add it to the world generator? No problem! Ore generation in Custom Stuff allows you to create your own blocks and have them generate throughout the world in the same way that ores and flowers in the vanilla game do.


To add your own blocks to the world generation, go to /config/customOreGeneration and create file "yourore.oregen". Next complete the file like this:

id = ID of the block;
damage = Damage of the block, if you want;
type = "normal or flower";
dimension = "normal or nether";
size = The amount of blocks generated. Not a hard amount. May be a multiplier.
rate = ore generations chunk;
generationblocks = "blocks which allow ore adjacent to it";
heightmin = min height of generation;
heightmax = max height of generation;

Now explore (on the undiscovered areas) your world or create a new world and search underground (or above ground for most flowers). Items added to the oregen will only appear in newly generated chunks, so you may have to walk quite far from your home territory in order to find one.

The type, dimension and generationblocks attributes require text and quotes " ", others attribues are numbers.

Generationblocks defines what your block will spawn near. You can define multiple blocks, separating them with a comma. Here are some examples.

generationblocks="1"; - Will generate blocks on stone
generationblocks="0"; - Will generate blocks on air
generationblocks="2,3"; - Will generate blocks on grass or dirt

Examples:

Sulfur ore:

2012-01-31 16.29

Why you fight with creeper, when you can mine sulfur from underground?

id = 200;
damage = 0;
type = "normal";
dimension = "normal";
size = 7;
rate = 8;
generationblocks = "1";
heightmin = 0;
heightmax = 48;

Blue flower:

id = 240;
damage = 6;
type = "flower"
dimension = "normal";
size = 5;
rate = 1;
generationblocks = "2,3";
heightmin = 64;
heightmax = 128;

Bugs:

  • The 'size' attribute does not work correctly when type is set to 'flower'. It will only ever generate one flower for each value point of 'rate'.
  • If you use damage value, and this block has "added" event (for damage value), Custom Stuff does not execute this event. This is due to the fact that the event "added" is executed before change "damage" value.
  • Generating large amounts of custom ore upon world generation is known to cause HUGE lag spikes.
    • To fix this, set the block type to simple, which removes many of the lag-inducing properties of blocks.