24w20a, disable reset_chunk, relight, and chunk load events
This commit is contained in:
1 parent
9fd313a672
commit
c4f8c86520
13 files changed
+60
-32
No files matched your search
@@ -804,6 +804,8 @@ public class Auxiliary
|
||||
|
||||
expression.addContextFunction("relight", -1, (c, t, lv) ->
|
||||
{
|
||||
return Value.NULL;
|
||||
/*
|
||||
CarpetContext cc = (CarpetContext) c;
|
||||
BlockArgument locator = BlockArgument.findIn(cc, lv, 0);
|
||||
BlockPos pos = locator.block.getPos();
|
||||
@@ -811,6 +813,8 @@ public class Auxiliary
|
||||
Vanilla.ChunkMap_relightChunk(world.getChunkSource().chunkMap, new ChunkPos(pos));
|
||||
WorldTools.forceChunkUpdate(pos, world);
|
||||
return Value.TRUE;
|
||||
|
||||
*/
|
||||
});
|
||||
|
||||
// Should this be deprecated for system_info('source_dimension')?
|
||||
|
||||
@@ -637,7 +637,7 @@ public class WorldAccess
|
||||
forceLoad = lv.get(blockArgument.offset).getBoolean();
|
||||
}
|
||||
ChunkAccess chunk = ((CarpetContext) c).level().getChunk(pos.getX() >> 4, pos.getZ() >> 4, ChunkStatus.EMPTY, forceLoad);
|
||||
return chunk == null ? Value.NULL : ValueConversions.of(BuiltInRegistries.CHUNK_STATUS.getKey(chunk.getStatus()));
|
||||
return chunk == null ? Value.NULL : ValueConversions.of(BuiltInRegistries.CHUNK_STATUS.getKey(chunk.getPersistedStatus()));
|
||||
});
|
||||
|
||||
expression.addContextFunction("chunk_tickets", -1, (c, t, lv) ->
|
||||
@@ -921,7 +921,7 @@ public class WorldAccess
|
||||
damageAmount = 2;
|
||||
}
|
||||
final int finalDamageAmount = damageAmount;
|
||||
tool.hurtAndBreak(damageAmount, world, null, () -> { if (finalDamageAmount > 0) toolBroke.setTrue(); } );
|
||||
tool.hurtAndBreak(damageAmount, world, null, (i) -> { if (finalDamageAmount > 0) toolBroke.setTrue(); } );
|
||||
if (!isUsingEffectiveTool)
|
||||
{
|
||||
dropLoot = false;
|
||||
@@ -1586,6 +1586,8 @@ public class WorldAccess
|
||||
// todo maybe enable chunk blending?
|
||||
expression.addContextFunction("reset_chunk", -1, (c, t, lv) ->
|
||||
{
|
||||
return Value.NULL;
|
||||
/*
|
||||
CarpetContext cc = (CarpetContext) c;
|
||||
List<ChunkPos> requestedChunks = new ArrayList<>();
|
||||
if (lv.size() == 1)
|
||||
@@ -1643,6 +1645,8 @@ public class WorldAccess
|
||||
)));
|
||||
});
|
||||
return result[0];
|
||||
|
||||
*/
|
||||
});
|
||||
|
||||
expression.addContextFunction("inhabited_time", -1, (c, t, lv) ->
|
||||
|
||||
+2
-2
@@ -100,12 +100,12 @@ public class Vanilla
|
||||
|
||||
public static void ChunkMap_relightChunk(ChunkMap chunkMap, ChunkPos pos)
|
||||
{
|
||||
((ThreadedAnvilChunkStorageInterface) chunkMap).relightChunk(pos);
|
||||
//((ThreadedAnvilChunkStorageInterface) chunkMap).relightChunk(pos);
|
||||
}
|
||||
|
||||
public static Map<String, Integer> ChunkMap_regenerateChunkRegion(ChunkMap chunkMap, List<ChunkPos> requestedChunks)
|
||||
{
|
||||
return ((ThreadedAnvilChunkStorageInterface) chunkMap).regenerateChunkRegion(requestedChunks);
|
||||
return Map.of(); //return ((ThreadedAnvilChunkStorageInterface) chunkMap).regenerateChunkRegion(requestedChunks);
|
||||
}
|
||||
|
||||
public static List<Collection<ItemStack>> Ingredient_getRecipeStacks(Ingredient ingredient)
|
||||
|
||||
Reference in new issue
Block a user