HowToAddGrowers: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Teiv |
imported>Teiv |
||
| Line 41: | Line 41: | ||
= Edit PassiveEntityRespawnPointFactory.java = |
= Edit PassiveEntityRespawnPointFactory.java = |
||
You have to open src/games/stendhal/server/entity/mapstuff/spawner/PassiveEntityRespawnPointFactory.java to add the apple finally to game.<br> |
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> |
<pre> |
||
clazz.contains(" |
clazz.contains("fruits") |
||
</pre> |
</pre> |
||
After the switch you have to add following code: |
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> |
<pre> |
||
case 0: |
case 0: |
||
| Line 51: | Line 51: | ||
break; |
break; |
||
</pre> |
</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 = |
= Comments = |
||