9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-27 19:09:09 +00:00
This commit is contained in:
XiaoMoMi
2024-12-30 22:46:06 +08:00
parent 0693988d34
commit 176329fd1a
4 changed files with 9 additions and 2 deletions

View File

@@ -136,6 +136,8 @@ public interface CustomCropsChunk {
*/
int loadedMilliSeconds();
int loadedSeconds();
/**
* Retrieves the custom crop block state at a specific location.
*

View File

@@ -220,6 +220,11 @@ public class CustomCropsChunkImpl implements CustomCropsChunk {
return (int) (System.currentTimeMillis() - lastUnloadTime);
}
@Override
public int loadedSeconds() {
return loadedSeconds;
}
@NotNull
@Override
public Optional<CustomCropsBlockState> getBlockState(Pos3 location) {

View File

@@ -79,7 +79,7 @@ public abstract class AbstractWorldAdaptor<W> implements WorldAdaptor<W> {
return new SerializableChunk(
chunkPos.x(),
chunkPos.z(),
chunk.loadedMilliSeconds(),
chunk.loadedSeconds(),
chunk.lastLoadedTime(),
chunk.sectionsToSave().map(this::toSerializableSection).toList(),
queueToIntArray(chunk.tickTaskQueue()),