mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 15:26:28 +00:00
Fixes
This commit is contained in:
@@ -434,4 +434,9 @@ public class IrisGenerator extends ParallelChunkGenerator
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
public PlacedObject randomObject(String string)
|
||||
{
|
||||
return god.randomObject(string);
|
||||
}
|
||||
}
|
||||
@@ -248,4 +248,24 @@ public class GenObjectDecorator extends BlockPopulator
|
||||
{
|
||||
return placeHistory;
|
||||
}
|
||||
|
||||
public PlacedObject randomObject(String string)
|
||||
{
|
||||
GList<PlacedObject> v = new GList<>();
|
||||
|
||||
for(PlacedObject i : placeHistory)
|
||||
{
|
||||
if(i.getF().toLowerCase().replaceAll("\\Q:\\E", "/").startsWith(string.toLowerCase()))
|
||||
{
|
||||
v.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
if(v.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return v.getRandom();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user