mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 15:56:27 +00:00
Base biome fixes
This commit is contained in:
@@ -318,6 +318,11 @@ public class B
|
||||
return u;
|
||||
}
|
||||
|
||||
public static boolean isFoliage(Material d)
|
||||
{
|
||||
return isFoliage(d.createBlockData());
|
||||
}
|
||||
|
||||
public static boolean isFoliage(BlockData d)
|
||||
{
|
||||
Boolean f = foliageCache.get(d.getMaterial());
|
||||
@@ -370,9 +375,9 @@ public class B
|
||||
{
|
||||
String key = mat.name() + "" + onto.name();
|
||||
|
||||
if(isFoliage(B.get(mat.name())))
|
||||
if(isFoliage(mat))
|
||||
{
|
||||
if(!isFoliagePlantable(B.get(onto.name())))
|
||||
if(!isFoliagePlantable(onto))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -503,6 +508,14 @@ public class B
|
||||
|| d.getMaterial().equals(Material.PODZOL);
|
||||
}
|
||||
|
||||
public static boolean isFoliagePlantable(Material d)
|
||||
{
|
||||
return d.equals(Material.GRASS_BLOCK)
|
||||
|| d.equals(Material.DIRT)
|
||||
|| d.equals(Material.COARSE_DIRT)
|
||||
|| d.equals(Material.PODZOL);
|
||||
}
|
||||
|
||||
public static boolean isFluid(BlockData d)
|
||||
{
|
||||
return d.getMaterial().equals(Material.WATER) || d.getMaterial().equals(Material.LAVA);
|
||||
|
||||
@@ -23,11 +23,49 @@ public class ReactiveFolder
|
||||
|
||||
public void check()
|
||||
{
|
||||
boolean modified = false;
|
||||
|
||||
if(fw.checkModified())
|
||||
{
|
||||
fw.checkModified();
|
||||
hotload.accept(fw.getCreated(), fw.getChanged(), fw.getDeleted());
|
||||
fw.checkModified();
|
||||
for(File i : fw.getCreated())
|
||||
{
|
||||
if(i.getName().endsWith(".iob") || i.getName().endsWith(".json"))
|
||||
{
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!modified)
|
||||
{
|
||||
for(File i : fw.getChanged())
|
||||
{
|
||||
if(i.getName().endsWith(".iob") || i.getName().endsWith(".json"))
|
||||
{
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!modified)
|
||||
{
|
||||
for(File i : fw.getDeleted())
|
||||
{
|
||||
if(i.getName().endsWith(".iob") || i.getName().endsWith(".json"))
|
||||
{
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(modified)
|
||||
{
|
||||
hotload.accept(fw.getCreated(), fw.getChanged(), fw.getDeleted());
|
||||
}
|
||||
|
||||
fw.checkModified();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user