inhabited_time

This commit is contained in:
gnembon committed 2020-04-04 01:31:44 -03:00
1 parent d08a348266
commit a867c04b11
1 file changed
+9
@@ -1281,6 +1281,15 @@ public class CarpetExpression
return (_c, _t) -> result[0];
});
this.expr.addLazyFunction("inhabited_time", -1, (c, t, lv) ->
{
CarpetContext cc = (CarpetContext)c;
BlockValue.LocatorResult locator = BlockValue.fromParams(cc, lv, 0);
BlockPos pos = locator.block.getPos();
Value ret = new NumericValue(cc.s.getWorld().getChunk(pos).getInhabitedTime());
return (_c, _t) -> ret;
});
}
private void API_Scoreboard()