mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-20 03:59:34 +00:00
Add Context Parameter to get Description (#60)
Yes this is breaking, but only to the changes that where merged not even 24 hours ago.
This commit is contained in:
4 files changed
+27
-30
No files matched your search
@@ -57,11 +57,13 @@ public interface IStructureElement<T> {
|
||||
* {@code StatCollector.translateToLocal()}. If a key has no matching translation, {@code translateToLocal} returns
|
||||
* the input string unchanged, so pre-translated fallback strings also work.
|
||||
*
|
||||
* @param context the context object (e.g. the multiblock controller), used to determine state-dependent
|
||||
* descriptions
|
||||
* @return a list of accepted block descriptions as lang keys (or display names as fallback), or null if no
|
||||
* description is available
|
||||
*/
|
||||
@Nullable
|
||||
default List<String> getDescription() {
|
||||
default List<String> getDescription(T context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -230,8 +232,8 @@ public interface IStructureElement<T> {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getDescription() {
|
||||
return IStructureElement.this.getDescription();
|
||||
public List<String> getDescription(T context) {
|
||||
return IStructureElement.this.getDescription(context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user