inhabited_time
This commit is contained in:
1 parent
d08a348266
commit
a867c04b11
1 file changed
+9
@@ -1281,6 +1281,15 @@ public class CarpetExpression
|
|||||||
return (_c, _t) -> result[0];
|
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()
|
private void API_Scoreboard()
|
||||||
|
|||||||
Reference in new issue
Block a user