readme.txt 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. This mod can register three different types of nodes, crops, grass, and plants.
  2. Crops come in two versions, and include a craft item that can be picked by punching the mature crop.
  3. Grass registers as five variations of the same plant, doesn't have to be grass.
  4. Plants are single nodes that have an option of glowing.
  5. Register a crop with plants.register_crop(name, desc, bit1, bit2)
  6. name will be the name of the node, as is also part of the texture file.
  7. desc is the node description, and will be used for all three items.
  8. bit1 and bit2 are used for the meshoptions bitflag. (Both are optional.)
  9. `paramtype2 = "meshoptions"`
  10. * Only valid for "plantlike" drawtype. `param2` encodes the shape and
  11. optional modifiers of the "plant". `param2` is a bitfield.
  12. * Bits 0 to 2 select the shape.
  13. Use only one of the values below:
  14. * 0 = a "x" shaped plant (ordinary plant)
  15. * 1 = a "+" shaped plant (just rotated 45 degrees)
  16. * 2 = a "*" shaped plant with 3 faces instead of 2
  17. * 3 = a "#" shaped plant with 4 faces instead of 2
  18. * 4 = a "#" shaped plant with 4 faces that lean outwards
  19. * 5-7 are unused and reserved for future meshes.
  20. * Bits 3 to 7 are used to enable any number of optional modifiers.
  21. Just add the corresponding value(s) below to `param2`:
  22. * 8 - Makes the plant slightly vary placement horizontally
  23. * 16 - Makes the plant mesh 1.4x larger
  24. * 32 - Moves each face randomly a small bit down (1/8 max)
  25. * values 64 and 128 (bits 6-7) are reserved for future use.
  26. * Example: `param2 = 0` selects a normal "x" shaped plant
  27. * Example: `param2 = 17` selects a "+" shaped plant, 1.4x larger (1+16)
  28. When a crop is registered two nodes will be created, you need to provide two textures.
  29. textures must be named as follows,
  30. plants_[name]_1.png This is the harvested version.
  31. plants_[name]_2.png This is the full grown version.
  32. A craftitem is also registered for the object that is harvested. It's texture is,
  33. plants_[name].png
  34. Register grass with
  35. plants.register_grass(name, desc)
  36. As with crops, name is the name of the node, and part of the texture. desc is the node description.
  37. Textures must be named accordingly;
  38. plants_[name]_1.png
  39. plants_[name]_2.png
  40. plants_[name]_3.png
  41. plants_[name]_4.png
  42. plants_[name]_5.png
  43. The inventory image of a grass will be the _3 texture, and will placing one of the five nodes will be randomly placed.
  44. Register a plant with
  45. plants.register_plant(name, desc, light)
  46. As in the above two functions name and desc do what you expect. The light field is optional, and lets a plant glow.
  47. The texture must be named plants_[name].png
  48. Plants get a random rotation upon placement using the paramtype2 of degrotate.