HowToAddGrowers: Difference between revisions

Content deleted Content added
imported>Teiv
imported>Teiv
Line 41:
= Edit PassiveEntityRespawnPointFactory.java =
You have to open src/games/stendhal/server/entity/mapstuff/spawner/PassiveEntityRespawnPointFactory.java to add the apple finally to game.<br>
If you add apple to fruits.png in tileset you have to add apple to:
Search for a line like this:
<pre>
clazz.contains("vegetablefruits")
</pre>
When you add a new kind of grower you have to add a new '''clazz''', an example you find in the file itself. After the switch you have to add following code:
<pre>
case 0:
Line 51:
break;
</pre>
The number after '''case''', is the number of the picture in your tileset file (starting with zero). Between the brackets belong the information for the item you wish to add. The '''500''' means that the apple will respawn in 500 turns.
 
= Comments =