client: removal of deprecated methods

This commit is contained in:
Justin
2021-11-02 20:53:14 +11:00
parent 77b3d38a28
commit a653dff3bc
4 changed files with 5 additions and 97 deletions

View File

@@ -50,12 +50,7 @@ public enum KitType
HAIR("Hair"),
HANDS("Hands"),
BOOTS("Boots"),
JAW("Jaw"),
// When removing these, make sure you also remove the type.ordinal() > 11 checks in RSPlayerCompositionMixin
@Deprecated(since = "4.6.2", forRemoval = true)
RING("Ring"),
@Deprecated(since = "4.6.2", forRemoval = true)
AMMUNITION("Ammo");
JAW("Jaw");
private final String name;

View File

@@ -1,72 +0,0 @@
/*
* Copyright (c) 2019, tha23rd <https://https://github.com/tha23rd>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.api.queries;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import net.runelite.api.Client;
import net.runelite.api.Constants;
import net.runelite.api.LocatableQueryResults;
import net.runelite.api.Scene;
import net.runelite.api.Tile;
@Deprecated(since = "4.2.1", forRemoval = true)
public class TileQuery extends LocatableQuery<Tile, TileQuery>
{
private List<Tile> getTiles(Client client)
{
List<Tile> tilesList = new ArrayList<>();
Scene scene = client.getScene();
Tile[][][] tiles = scene.getTiles();
int z = client.getPlane();
for (int x = 0; x < Constants.SCENE_SIZE; ++x)
{
for (int y = 0; y < Constants.SCENE_SIZE; ++y)
{
Tile tile = tiles[z][x][y];
if (tile == null)
{
continue;
}
tilesList.add(tile);
}
}
return tilesList;
}
@Deprecated(since = "4.2.1", forRemoval = true)
@Override
public LocatableQueryResults<Tile> result(Client client)
{
return new LocatableQueryResults<>(getTiles(client).stream()
.filter(Objects::nonNull)
.filter(predicate)
.distinct()
.collect(Collectors.toList()));
}
}