mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-29 07:27:59 +01:00
I always forget that runnables exist... It just comes at the cost of self-descriptive names :/
This commit is contained in:
parent
f1a02fcf90
commit
b6d1dcafd0
2 changed files with 3 additions and 16 deletions
|
@ -1,13 +0,0 @@
|
|||
package com.voxelmodpack.hdskins;
|
||||
|
||||
/**
|
||||
* Callback for when a skin is loaded.
|
||||
*
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ISkinAvailableCallback {
|
||||
/**
|
||||
* Called when a skin loads.
|
||||
*/
|
||||
void skinAvailable();
|
||||
}
|
|
@ -13,9 +13,9 @@ public class ImageBufferDownloadHD implements IImageBuffer {
|
|||
private Graphics graphics;
|
||||
private BufferedImage image;
|
||||
|
||||
private ISkinAvailableCallback callback;
|
||||
private Runnable callback;
|
||||
|
||||
public ImageBufferDownloadHD withCallback(ISkinAvailableCallback callback) {
|
||||
public ImageBufferDownloadHD withCallback(Runnable callback) {
|
||||
this.callback = callback;
|
||||
return this;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class ImageBufferDownloadHD implements IImageBuffer {
|
|||
@Override
|
||||
public void skinAvailable() {
|
||||
if (callback != null) {
|
||||
callback.skinAvailable();
|
||||
callback.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue