Merge branch 'master' into 1.16
This commit is contained in:
commit
7369f39f06
4 files changed
+12
-3
No files matched your search
@@ -2860,7 +2860,7 @@ __on_tick_ender() // can access blocks and entities in the end
|
||||
__on_chunk_generated(x,z) // called after a chunk is promoted to the full chunk,
|
||||
// prodiving lowest x and z coords in the chunk
|
||||
// event will not work with optifine installed in the game
|
||||
__on_lightning(pos, mode) // mode is `true` if lightning caused horse trap to spawn
|
||||
__on_lightning(block, mode) // mode is `true` if lightning caused horse trap to spawn
|
||||
// player specific callbacks
|
||||
__on_player_uses_item(player, item_tuple, hand) // right click action
|
||||
__on_player_releases_item(player, item_tuple, hand) // client action (e.g. bow)
|
||||
|
||||
@@ -21,7 +21,7 @@ __on_tick_ender() // can access blocks and entities in the end
|
||||
__on_chunk_generated(x,z) // called after a chunk is promoted to the full chunk,
|
||||
// prodiving lowest x and z coords in the chunk
|
||||
// event will not work with optifine installed in the game
|
||||
__on_lightning(pos, mode) // mode is `true` if lightning caused horse trap to spawn
|
||||
__on_lightning(block, mode) // mode is `true` if lightning caused horse trap to spawn
|
||||
// player specific callbacks
|
||||
__on_player_uses_item(player, item_tuple, hand) // right click action
|
||||
__on_player_releases_item(player, item_tuple, hand) // client action (e.g. bow)
|
||||
|
||||
@@ -126,7 +126,7 @@ public class HopperCounter
|
||||
color, ticks*1.0/(20*60), (realTime?" - real time":""), total, total*1.0*(20*60*60)/ticks),
|
||||
"nb [X]", "^g reset", "!/counter "+color+" reset"
|
||||
));
|
||||
items.addAll(counter.object2LongEntrySet().stream().map(e ->
|
||||
items.addAll(counter.object2LongEntrySet().stream().sorted((e, f) -> Long.compare(f.getLongValue(), e.getLongValue())).map(e ->
|
||||
{
|
||||
BaseText itemName = new TranslatableText(e.getKey().getTranslationKey());
|
||||
long count = e.getLongValue();
|
||||
|
||||
@@ -1280,6 +1280,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()
|
||||
|
||||
Reference in new issue
Block a user