final StendhalRPZone localzone = new StendhalRPZone("testzone", 20, 20);
final Player player = createPlayer("bob");
localzone.add(player);
// first put some seeds on the floor
StackableItem item = (StackableItem) SingletonRepository.getEntityManager().getItem("seed");
item.setQuantity(5);
localzone.add(item);
assertEquals(1, localzone.getItemsOnGround().size());
assertEquals(0, localzone.getItemsOnGround().toArray(new StackableItem[0])[0].getX());
assertEquals(0, localzone.getItemsOnGround().toArray(new StackableItem[0])[0].getY());
LayerDefinition collisionLayer = new LayerDefinition(10, 10);
collisionLayer.setName("collision");
collisionLayer.build();
collisionLayer.set(0, 1, 255);
localzone.addCollisionLayer("collisionlayer", collisionLayer);
// now test the displacement action
final RPAction displace = new RPAction();
displace.put("type", "displace");
displace.put("baseitem", item.getID().getObjectID());
displace.put("quantity", "2");
displace.put("x", player.getX());
displace.put("y", player.getY()+1);
new DisplaceAction().onAction(player, displace);