mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Allow leaf decay if setting is changed
This commit is contained in:
parent
9f16fa189f
commit
953d702ed6
@ -129,6 +129,7 @@ public class IrisSettings {
|
||||
public boolean systemEntitySpawnOverrides = true;
|
||||
public boolean systemEntityInitialSpawns = true;
|
||||
public int maxBiomeChildDepth = 4;
|
||||
public boolean preventLeafDecay = true;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
@ -19,6 +19,7 @@
|
||||
package com.volmit.iris.util.data;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
@ -156,10 +157,15 @@ public class B {
|
||||
bx = Bukkit.createBlockData(ix);
|
||||
}
|
||||
|
||||
if (bx instanceof Leaves) {
|
||||
if (bx instanceof Leaves && IrisSettings.get().getGenerator().preventLeafDecay) {
|
||||
((Leaves) bx).setPersistent(true);
|
||||
}
|
||||
|
||||
else if(bx instanceof Leaves)
|
||||
{
|
||||
((Leaves) bx).setPersistent(false);
|
||||
}
|
||||
|
||||
blockDataCache.put(ix, bx);
|
||||
return bx;
|
||||
} catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user