Posted October 20, 2015 as asked already here http://forum.wurmonline.com/index.php?/topic/130029-make-diging-same-way-as-mining/ would be atlast great in WU if is not too late! 1 Share this post Link to post Share on other sites
Posted October 22, 2015 Code for placing a rock shard on your tile when mining is Item newItem = ItemFactory.createItem(146, (float)power, performer.getPosX(), performer.getPosY(), Server.rand.nextFloat() * 360.0F, performer.isOnSurface(), act.getRarity(), -10L, null); newItem.setLastOwnerId(performer.getWurmId()); newItem.setDataXY(tilex, tiley);For digging dirt the code to put it in your inventory or a dredge's is Item created = ItemFactory.createItem(createdItemTemplate, Math.min((float)(power + source.getRarity()), 100.0F), null); created.setRarity(act.getRarity()); if ((dredging) && (h < -0.5D)) { source.insertItem(created, true); } else { performer.getInventory().insertItem(created); }The method used by mining is public static Item createItem(int templateId, float qualityLevel, float posX, float posY, float rot, boolean onSurface, byte rarity, long bridgeId, @Nullable String creator) throws NoSuchTemplateException, FailedException { return createItem(templateId, qualityLevel, posX, posY, rot, onSurface, (byte)0, rarity, bridgeId, creator); }So in Terraforming.class the method call used when you finish digging should be changed to Item newItem = ItemFactory.createItem(createdItemTemplate, Math.min((float)(power + source.getRarity()), 100.0F), performer.getPosX(), performer.getPosY(), Server.rand.nextFloat() * 360.0F, performer.isOnSurface(), act.getRarity(), -10L, null); if ((dredging) && (h < -0.5D)) { source.insertItem(created, true); } else { newItem.setLastOwnerId(performer.getWurmId()); newItem.setDataXY(performer.getPosX(), performer.getPosY()); }This should work to drop dirt at your feet when you dig it, unless you use a dredge, in which case it puts it in the dredge still because I figure it would be hard to go around picking up dirt off the sea floor. 1 Share this post Link to post Share on other sites
Posted October 22, 2015 And in fact it does work. >https://www.youtube.com/watch?v=kKKGXPy9j0s WIP Digging like Mining Share this post Link to post Share on other sites