mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-14 07:09:04 +00:00
Merge pull request #66 from jtara1/master
HarvesterNPC should spawn a biomass in-place after they die. Fixes #33
This commit is contained in:
@@ -3,9 +3,13 @@ package net.simon987.npcplugin;
|
||||
import com.mongodb.BasicDBObject;
|
||||
import com.mongodb.DBObject;
|
||||
import net.simon987.server.GameServer;
|
||||
import net.simon987.server.event.ObjectDeathEvent;
|
||||
import net.simon987.server.game.Direction;
|
||||
import net.simon987.server.logging.LogManager;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.lang.util.Random;
|
||||
|
||||
public class HarvesterNPC extends NonPlayerCharacter {
|
||||
|
||||
public static final int ID = 10;
|
||||
@@ -44,6 +48,12 @@ public class HarvesterNPC extends NonPlayerCharacter {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeadCallback() {
|
||||
GameServer.INSTANCE.getEventDispatcher().dispatch(
|
||||
new ObjectDeathEvent((Object)this, ID));
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject serialise() {
|
||||
JSONObject json = super.serialise();
|
||||
|
||||
Reference in New Issue
Block a user