grounditems/Lootbeam: handle loading models correctly

models are streamed over js5 so loadModel can return null until it is
downloaded
This commit is contained in:
Max Weber
2021-12-28 20:16:16 -07:00
parent 98279d4cfd
commit 6c15080bfb
3 changed files with 25 additions and 7 deletions

View File

@@ -1057,7 +1057,9 @@ public interface Client extends GameEngine
* Loads a model from the cache
*
* @param id the ID of the model
* @return the model or null if it is loading or nonexistent
*/
@Nullable
Model loadModel(int id);
/**
@@ -1066,7 +1068,9 @@ public interface Client extends GameEngine
* @param id the ID of the model
* @param colorToFind array of hsl color values to find in the model to replace
* @param colorToReplace array of hsl color values to replace in the model
* @return the model or null if it is loading or nonexistent
*/
@Nullable
Model loadModel(int id, short[] colorToFind, short[] colorToReplace);
/**