RuneHive-Game
Loading...
Searching...
No Matches
ObjectRemovalParser.java
Go to the documentation of this file.
1package com.runehive.util.parser.impl;
2
3import com.google.gson.JsonObject;
4import com.runehive.game.world.position.Position;
5import com.runehive.game.world.region.Region;
6import com.runehive.util.parser.GsonParser;
7
8/**
9 * Handles parsing the removed object.
10 *
11 * @author Daniel
12 */
13public class ObjectRemovalParser extends GsonParser {
14
16 super("def/object/removed_objects", false);
17 }
18
19 @Override
20 protected void parse(JsonObject data) {
21 Position position = builder.fromJson(data.get("position"), Position.class);
22 Region.SKIPPED_OBJECTS.add(position);
23 }
24}
Represents a single tile on the game world.
Definition Position.java:14
Represents a single region.
Definition Region.java:21
static final Set< Position > SKIPPED_OBJECTS
Definition Region.java:26
GsonParser(String path)
Creates a new GsonParser.
transient Gson builder
The Gson object.
void parse(JsonObject data)
The method allows a user to modify the data as its being parsed.