mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-09 15:04:56 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f19399ba3 | ||
|
|
4982bb780d |
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
modGroup = com.gtnewhorizon
|
||||
modVersion = 1.0.9
|
||||
modVersion = 1.0.10
|
||||
modBaseName = StructureLib
|
||||
|
||||
forgeVersion = 1.7.10-10.13.4.1614-1.7.10
|
||||
@@ -13,8 +13,11 @@ public interface IStructureDefinition<T> {
|
||||
/**
|
||||
* Used internally
|
||||
*
|
||||
* Might, but is not required, to throw {@link java.util.NoSuchElementException} if the given structure piece is not found.
|
||||
*
|
||||
* @param name same name as for other methods here
|
||||
* @return the array of elements to process
|
||||
* @throws java.util.NoSuchElementException if the given structure piece is not found and the moon phase perfectly matches
|
||||
*/
|
||||
IStructureElement<T>[] getStructureFor(String name);
|
||||
|
||||
|
||||
@@ -193,6 +193,9 @@ public class StructureDefinition<T> implements IStructureDefinition<T> {
|
||||
|
||||
@Override
|
||||
public IStructureElement<T>[] getStructureFor(String name) {
|
||||
return structures.get(name);
|
||||
IStructureElement<T>[] elements = structures.get(name);
|
||||
if (elements == null)
|
||||
throw new NoSuchElementException(name);
|
||||
return elements;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user