Merge branch 'master' into 1.16
This commit is contained in:
commit
ec43fd2f24
5 files changed
+29
-7
No files matched your search
@@ -1690,9 +1690,10 @@ If type is `null`, POI at position is removed. In any case, previous POI is also
|
|||||||
Interestingly, `unemployed`, and `nitwit` are not used in the game, meaning, they could be used as permanent spatial
|
Interestingly, `unemployed`, and `nitwit` are not used in the game, meaning, they could be used as permanent spatial
|
||||||
markers for scarpet apps. `meeting` is the only one with increased max occupancy of 32.
|
markers for scarpet apps. `meeting` is the only one with increased max occupancy of 32.
|
||||||
|
|
||||||
### `set_biome(pos, biome_name)`
|
### `set_biome(pos, biome_name, update=true)`
|
||||||
|
|
||||||
Changes the biome at that block position.
|
Changes the biome at that block position. if update is specified and false, then chunk will not be refreshed
|
||||||
|
on the clients. Biome changes can only be send to clients with the entire data from the chunk.
|
||||||
|
|
||||||
### `update(pos)`
|
### `update(pos)`
|
||||||
|
|
||||||
@@ -2249,6 +2250,10 @@ Feature list:
|
|||||||
* `twisting_vines` (1.16)
|
* `twisting_vines` (1.16)
|
||||||
* `basalt_pillar` (1.16)
|
* `basalt_pillar` (1.16)
|
||||||
|
|
||||||
|
### `reload_chunk(pos)`
|
||||||
|
|
||||||
|
Sends full chunk data to clients. Useful when lots stuff happened and you want to refresh it on the clients.
|
||||||
|
|
||||||
### `reset_chunk(pos)`, `reset_chunk(from_pos, to_pos)`, `reset_chunk(l(pos, ...))`
|
### `reset_chunk(pos)`, `reset_chunk(from_pos, to_pos)`, `reset_chunk(l(pos, ...))`
|
||||||
Removes and resets the chunk, all chunks in the specified area or all chunks in a list at once, removing all previous
|
Removes and resets the chunk, all chunks in the specified area or all chunks in a list at once, removing all previous
|
||||||
blocks and entities, and replacing it with a new generation. For all currently loaded chunks, they will be brought
|
blocks and entities, and replacing it with a new generation. For all currently loaded chunks, they will be brought
|
||||||
|
|||||||
@@ -134,9 +134,10 @@ If type is `null`, POI at position is removed. In any case, previous POI is also
|
|||||||
Interestingly, `unemployed`, and `nitwit` are not used in the game, meaning, they could be used as permanent spatial
|
Interestingly, `unemployed`, and `nitwit` are not used in the game, meaning, they could be used as permanent spatial
|
||||||
markers for scarpet apps. `meeting` is the only one with increased max occupancy of 32.
|
markers for scarpet apps. `meeting` is the only one with increased max occupancy of 32.
|
||||||
|
|
||||||
### `set_biome(pos, biome_name)`
|
### `set_biome(pos, biome_name, update=true)`
|
||||||
|
|
||||||
Changes the biome at that block position.
|
Changes the biome at that block position. if update is specified and false, then chunk will not be refreshed
|
||||||
|
on the clients. Biome changes can only be send to clients with the entire data from the chunk.
|
||||||
|
|
||||||
### `update(pos)`
|
### `update(pos)`
|
||||||
|
|
||||||
@@ -693,6 +694,10 @@ Feature list:
|
|||||||
* `twisting_vines` (1.16)
|
* `twisting_vines` (1.16)
|
||||||
* `basalt_pillar` (1.16)
|
* `basalt_pillar` (1.16)
|
||||||
|
|
||||||
|
### `reload_chunk(pos)`
|
||||||
|
|
||||||
|
Sends full chunk data to clients. Useful when lots stuff happened and you want to refresh it on the clients.
|
||||||
|
|
||||||
### `reset_chunk(pos)`, `reset_chunk(from_pos, to_pos)`, `reset_chunk(l(pos, ...))`
|
### `reset_chunk(pos)`, `reset_chunk(from_pos, to_pos)`, `reset_chunk(l(pos, ...))`
|
||||||
Removes and resets the chunk, all chunks in the specified area or all chunks in a list at once, removing all previous
|
Removes and resets the chunk, all chunks in the specified area or all chunks in a list at once, removing all previous
|
||||||
blocks and entities, and replacing it with a new generation. For all currently loaded chunks, they will be brought
|
blocks and entities, and replacing it with a new generation. For all currently loaded chunks, they will be brought
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ property
|
|||||||
query
|
query
|
||||||
random_tick
|
random_tick
|
||||||
rect
|
rect
|
||||||
|
reload_chunk
|
||||||
remove_all_markers
|
remove_all_markers
|
||||||
reset_chunk
|
reset_chunk
|
||||||
run
|
run
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
set without_updates
|
set without_updates
|
||||||
blocks_movement block_sound material map_colour property block_properties block_data poi set_poi
|
blocks_movement block_sound material map_colour property block_properties block_data poi set_poi
|
||||||
place_item set_biome biome loaded_status generation_status inhabited_time spawn_potential chunk_tickets
|
place_item set_biome biome loaded_status generation_status inhabited_time spawn_potential chunk_tickets
|
||||||
structure_eligibility structures structure_references set_structure reset_chunk
|
structure_eligibility structures structure_references set_structure reset_chunk reload_chunk
|
||||||
|
|
||||||
scoreboard scoreboard_add scoreboard_remove scoreboard_display
|
scoreboard scoreboard_add scoreboard_remove scoreboard_display
|
||||||
|
|
||||||
|
|||||||
@@ -1127,12 +1127,23 @@ public class CarpetExpression
|
|||||||
Biome biome = Registry.BIOME.get(new Identifier(biomeName));
|
Biome biome = Registry.BIOME.get(new Identifier(biomeName));
|
||||||
if (biome == null)
|
if (biome == null)
|
||||||
throw new InternalExpressionException("Unknown biome: "+biomeName);
|
throw new InternalExpressionException("Unknown biome: "+biomeName);
|
||||||
|
boolean doImmediateUpdate = true;
|
||||||
|
if (lv.size() > locator.offset+1)
|
||||||
|
{
|
||||||
|
doImmediateUpdate = lv.get(locator.offset+1).evalValue(c).getBoolean();
|
||||||
|
}
|
||||||
ServerWorld world = cc.s.getWorld();
|
ServerWorld world = cc.s.getWorld();
|
||||||
BlockPos pos = locator.block.getPos();
|
BlockPos pos = locator.block.getPos();
|
||||||
Chunk chunk = world.getChunk(pos.getX() >> 4, pos.getZ() >> 4, ChunkStatus.BIOMES);
|
Chunk chunk = world.getChunk(pos.getX() >> 4, pos.getZ() >> 4, ChunkStatus.BIOMES);
|
||||||
((BiomeArrayInterface)chunk.getBiomeArray()).setBiomeAtIndex(pos, world, biome);
|
((BiomeArrayInterface)chunk.getBiomeArray()).setBiomeAtIndex(pos, world, biome);
|
||||||
this.forceChunkUpdate(pos, world);
|
if (doImmediateUpdate) this.forceChunkUpdate(pos, world);
|
||||||
return LazyValue.NULL;
|
return LazyValue.TRUE;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.expr.addLazyFunction("reload_chunk", -1, (c, t, lv) -> {
|
||||||
|
CarpetContext cc = (CarpetContext)c;
|
||||||
|
this.forceChunkUpdate(BlockArgument.findIn(cc, lv, 0).block.getPos(), cc.s.getWorld());
|
||||||
|
return LazyValue.TRUE;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.expr.addLazyFunction("structure_references", -1, (c, t, lv) -> {
|
this.expr.addLazyFunction("structure_references", -1, (c, t, lv) -> {
|
||||||
|
|||||||
Reference in new issue
Block a user