HowToAddItemsStendhal: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Blacklads
Undo revision 11672 by Ufizavipupu (Talk)
imported>Kymara
Line 108: Line 108:


= Register the class =
= Register the class =
Usually you need to register your item class unless it really does nothing. If you're adding an item which is like what we already have (i.e. just a new shield) it's done for you, the shield class is registered. Add your item to the rest in ''src/games/stendhal/client/entity/EntityMap.java''
Usually you need to register your item class unless it really does nothing. If you're adding an item which is like what we already have (i.e. just a new shield) it's done for you, the shield class is registered. Add your item to the rest in ''src/games/stendhal/client/entity/factory/EntityMap.java''


register("item",null,Item.class);
register("item",null,Item.class);
Line 116: Line 116:
register("item","money",StackableItem.class);
register("item","money",StackableItem.class);
register("item","projectiles",StackableItem.class);
register("item","projectiles",StackableItem.class);



= Add to game=
= Add to game=