Slotting helper methods added.
This commit is contained in:
1 parent
beb9d5927e
commit
ed0f9daef3
1 file changed
+15
@@ -47,6 +47,21 @@ public enum BuildingManager {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static Vector3fImmutable getSlotLocation(Building building, int slot) {
|
||||
|
||||
if (slot == -1)
|
||||
return Vector3fImmutable.ZERO;
|
||||
|
||||
BuildingLocation buildingLocation;
|
||||
buildingLocation = _slotLocations.get(building.meshUUID).get(slot);
|
||||
|
||||
if (buildingLocation == null) {
|
||||
Logger.error("Invalid slot for building: " + building.getObjectUUID());
|
||||
}
|
||||
|
||||
return buildingLocation.getLoc();
|
||||
}
|
||||
|
||||
public static boolean playerCanManage(PlayerCharacter player, Building building) {
|
||||
|
||||
if (player == null)
|
||||
|
||||
Reference in new issue
Block a user