Merge branch 'master' into 1.16
# Conflicts: # src/main/java/carpet/script/CarpetExpression.java
This commit is contained in:
commit
c69f65e68e
8 files changed
+48
-8
No files matched your search
+15
-3
@@ -2362,6 +2362,8 @@ It returns a `map` with a report indicating how many chunks were affected, and h
|
|||||||
* `requested_chunks`: total number of chunks in the requested area or list
|
* `requested_chunks`: total number of chunks in the requested area or list
|
||||||
* `affected_chunks`: number of chunks that will be removed / regenerated
|
* `affected_chunks`: number of chunks that will be removed / regenerated
|
||||||
* `loaded_chunks`: number of currently loaded chunks in the requested area / list
|
* `loaded_chunks`: number of currently loaded chunks in the requested area / list
|
||||||
|
* `relight_count`: number of relit chunks
|
||||||
|
* `relight_time`: time took to relit chunks
|
||||||
* `layer_count_<status>`: number of chunks for which a `<status>` generation step has been performed
|
* `layer_count_<status>`: number of chunks for which a `<status>` generation step has been performed
|
||||||
* `layer_time_<status>`: cumulative time for all chunks spent on generating `<status>` step
|
* `layer_time_<status>`: cumulative time for all chunks spent on generating `<status>` step
|
||||||
|
|
||||||
@@ -2553,6 +2555,10 @@ query(e,'type') => villager
|
|||||||
Returns a valid string to be used in commands to address an entity. Its UUID for all entities except
|
Returns a valid string to be used in commands to address an entity. Its UUID for all entities except
|
||||||
player, where its their name.
|
player, where its their name.
|
||||||
|
|
||||||
|
## `query(e, 'persistence')`
|
||||||
|
|
||||||
|
Returns if a mob has a persistence tag or not. Returns `null` for non-mob entities.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
run('/kill ' + e~'command_name');
|
run('/kill ' + e~'command_name');
|
||||||
</pre>
|
</pre>
|
||||||
@@ -2836,9 +2842,15 @@ Sets the corresponding component of the motion vector.
|
|||||||
|
|
||||||
Adds a vector to the motion vector. Most realistic way to apply a force to an entity.
|
Adds a vector to the motion vector. Most realistic way to apply a force to an entity.
|
||||||
|
|
||||||
### `modify(e, 'custom_name'), modify(e, 'custom_name', name)`
|
### `modify(e, 'custom_name')`, `modify(e, 'custom_name', name)`, `modify(e, 'custom_name', name, visible)`
|
||||||
|
|
||||||
Sets the custom name of the entity.
|
Sets the custom name of the entity. Without arguments - clears current custom name. Optional visible affects
|
||||||
|
if the custom name is always visible, even through blocks.
|
||||||
|
|
||||||
|
### `modify(e, 'persistence', bool?)`
|
||||||
|
|
||||||
|
Sets the entity persistence tag to `true` (default) or `false`. Only affects mobs. Persistent mobs
|
||||||
|
don't despawn and don't count towards the mobcap.
|
||||||
|
|
||||||
### `modify(e, 'age', number)`
|
### `modify(e, 'age', number)`
|
||||||
|
|
||||||
@@ -3673,7 +3685,7 @@ Queries in-game statistics for certain values. Categories include:
|
|||||||
* `picked_up`: items picked up
|
* `picked_up`: items picked up
|
||||||
* `dropped`: items dropped
|
* `dropped`: items dropped
|
||||||
* `killed`: mobs killed
|
* `killed`: mobs killed
|
||||||
* `killed_by`: blocks mined
|
* `killed_by`: mobs killed by
|
||||||
* `custom`: various random stats
|
* `custom`: various random stats
|
||||||
|
|
||||||
For the options of `entry`, consult your statistics page, or give it a guess.
|
For the options of `entry`, consult your statistics page, or give it a guess.
|
||||||
|
|||||||
@@ -721,6 +721,8 @@ It returns a `map` with a report indicating how many chunks were affected, and h
|
|||||||
* `requested_chunks`: total number of chunks in the requested area or list
|
* `requested_chunks`: total number of chunks in the requested area or list
|
||||||
* `affected_chunks`: number of chunks that will be removed / regenerated
|
* `affected_chunks`: number of chunks that will be removed / regenerated
|
||||||
* `loaded_chunks`: number of currently loaded chunks in the requested area / list
|
* `loaded_chunks`: number of currently loaded chunks in the requested area / list
|
||||||
|
* `relight_count`: number of relit chunks
|
||||||
|
* `relight_time`: time took to relit chunks
|
||||||
* `layer_count_<status>`: number of chunks for which a `<status>` generation step has been performed
|
* `layer_count_<status>`: number of chunks for which a `<status>` generation step has been performed
|
||||||
* `layer_time_<status>`: cumulative time for all chunks spent on generating `<status>` step
|
* `layer_time_<status>`: cumulative time for all chunks spent on generating `<status>` step
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
loader_version=0.8.8+build.202
|
loader_version=0.8.8+build.202
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.0+v200623
|
mod_version = 1.4.1+v200701
|
||||||
maven_group = carpet
|
maven_group = carpet
|
||||||
archives_base_name = fabric-carpet
|
archives_base_name = fabric-carpet
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import static carpet.settings.RuleCategory.CLIENT;
|
|||||||
@SuppressWarnings("CanBeFinal")
|
@SuppressWarnings("CanBeFinal")
|
||||||
public class CarpetSettings
|
public class CarpetSettings
|
||||||
{
|
{
|
||||||
public static final String carpetVersion = "1.4.0+v200623";
|
public static final String carpetVersion = "1.4.1+v200701";
|
||||||
public static final Logger LOG = LogManager.getLogger();
|
public static final Logger LOG = LogManager.getLogger();
|
||||||
public static boolean skipGenerationChecks = false;
|
public static boolean skipGenerationChecks = false;
|
||||||
public static boolean impendingFillSkipUpdates = false;
|
public static boolean impendingFillSkipUpdates = false;
|
||||||
|
|||||||
@@ -9,5 +9,7 @@ public interface ThreadedAnvilChunkStorageInterface
|
|||||||
{
|
{
|
||||||
Map<String, Integer> regenerateChunkRegion(List<ChunkPos> requestedChunks);
|
Map<String, Integer> regenerateChunkRegion(List<ChunkPos> requestedChunks);
|
||||||
|
|
||||||
|
void relightChunk(ChunkPos pos);
|
||||||
|
|
||||||
void releaseRelightTicket(ChunkPos pos);
|
void releaseRelightTicket(ChunkPos pos);
|
||||||
}
|
}
|
||||||
@@ -229,6 +229,31 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
|
|||||||
return future.join();
|
return future.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void relightChunk(ChunkPos pos)
|
||||||
|
{
|
||||||
|
this.addTicket(pos);
|
||||||
|
this.tickTicketManager();
|
||||||
|
if (this.currentChunkHolders.get(pos.toLong()).getCompletedChunk() == null) // chunk unloaded
|
||||||
|
if (WorldTools.canHasChunk(this.world, pos, null, true))
|
||||||
|
this.currentChunkHolders.get(pos.toLong()).createFuture(ChunkStatus.EMPTY, (ThreadedAnvilChunkStorage) (Object) this);
|
||||||
|
final Chunk chunk = this.getCurrentChunk(pos);
|
||||||
|
if (!(chunk.getStatus().isAtLeast(ChunkStatus.LIGHT.getPrevious()))) return;
|
||||||
|
((ServerLightingProviderInterface) this.serverLightingProvider).removeLightData(chunk);
|
||||||
|
this.addRelightTicket(pos);
|
||||||
|
final CompletableFuture<?> lightFuture = this.createChunkRegionFuture(pos, 1, (pos_) -> ChunkStatus.LIGHT)
|
||||||
|
.thenCompose(
|
||||||
|
either -> either.map(
|
||||||
|
list -> ((ServerLightingProviderInterface) this.serverLightingProvider).relight(chunk),
|
||||||
|
unloaded -> {
|
||||||
|
this.releaseRelightTicket(pos);
|
||||||
|
return CompletableFuture.completedFuture(null);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
this.waitFor(lightFuture);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Integer> regenerateChunkRegion(final List<ChunkPos> requestedChunksList)
|
public Map<String, Integer> regenerateChunkRegion(final List<ChunkPos> requestedChunksList)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3196,9 +3196,8 @@ public class CarpetExpression
|
|||||||
BlockArgument locator = BlockArgument.findIn(cc, lv, 0);
|
BlockArgument locator = BlockArgument.findIn(cc, lv, 0);
|
||||||
BlockPos pos = locator.block.getPos();
|
BlockPos pos = locator.block.getPos();
|
||||||
ServerWorld world = cc.s.getWorld();
|
ServerWorld world = cc.s.getWorld();
|
||||||
((ServerLightingProviderInterface)world.getChunkManager().getLightingProvider()).resetLight(world.getChunk(pos), new ChunkPos(pos)); //light(world.getChunk(pos), false);
|
((ThreadedAnvilChunkStorageInterface) world.getChunkManager().threadedAnvilChunkStorage).relightChunk(new ChunkPos(pos));
|
||||||
forceChunkUpdate(pos, world);
|
forceChunkUpdate(pos, world);
|
||||||
world.getChunkManager().getLightingProvider().light(world.getChunk(pos), false);
|
|
||||||
return LazyValue.TRUE;
|
return LazyValue.TRUE;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "carpet",
|
"id": "carpet",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
|
|
||||||
"name": "Carpet Mod in Fabric",
|
"name": "Carpet Mod in Fabric",
|
||||||
"description": "Carpet made out of fabric",
|
"description": "Carpet made out of fabric",
|
||||||
|
|||||||
Reference in new issue
Block a user