mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 11:59:40 +00:00
Co-authored-by: Eclipse-Sol <[email protected]>
This commit is contained in:
1 parent
ea4a3cdf0b
commit
362724610c
22 files changed
+785
-96
No files matched your search
@@ -18,6 +18,10 @@ public class CapturedRenderingState {
|
||||
private int currentRenderedEntity = -1;
|
||||
private Runnable entityIdListener = null;
|
||||
|
||||
@Getter
|
||||
private int currentRenderedItem = -1;
|
||||
private Runnable itemIdListener = null;
|
||||
|
||||
@Getter
|
||||
private final Vector4f currentEntityColor = new Vector4f();
|
||||
private Runnable entityColorListener = null;
|
||||
@@ -53,6 +57,18 @@ public class CapturedRenderingState {
|
||||
}
|
||||
}
|
||||
|
||||
public void setCurrentRenderedItem(int item) {
|
||||
if (this.currentRenderedItem == item) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentRenderedItem = item;
|
||||
|
||||
if (this.itemIdListener != null) {
|
||||
this.itemIdListener.run();
|
||||
}
|
||||
}
|
||||
|
||||
public ValueUpdateNotifier getEntityIdNotifier() {
|
||||
return listener -> this.entityIdListener = listener;
|
||||
}
|
||||
@@ -61,5 +77,9 @@ public class CapturedRenderingState {
|
||||
return listener -> this.blockEntityIdListener = listener;
|
||||
}
|
||||
|
||||
public ValueUpdateNotifier getItemIdNotifier() {
|
||||
return listener -> this.itemIdListener = listener;
|
||||
}
|
||||
|
||||
public ValueUpdateNotifier getEntityColorNotifier() { return listener -> this.entityColorListener = listener; }
|
||||
}
|
||||
Reference in new issue
Block a user