don't return so much Env into the chunk

This commit is contained in:
Robin Bärtschi 2024-06-26 11:04:52 +02:00
parent d90374272e
commit 13455380c1

View File

@ -56,7 +56,7 @@ public class EnvDistributorBlockEntity extends BlockEntity implements ITickableB
public void serverTick(ServerLevel level, BlockPos blockPos, BlockState blockState) { public void serverTick(ServerLevel level, BlockPos blockPos, BlockState blockState) {
if (envStorage.getEnvStored() > 0) { if (envStorage.getEnvStored() > 0) {
ChunkAccess chunk = level.getChunk(blockPos); ChunkAccess chunk = level.getChunk(blockPos);
long value = Math.min(20, envStorage.getEnvStored()); long value = Math.min(5, envStorage.getEnvStored());
chunk.setData(ETAttachments.ENV, chunk.getData(ETAttachments.ENV) + value); chunk.setData(ETAttachments.ENV, chunk.getData(ETAttachments.ENV) + value);
envStorage.setEnvStored(envStorage.getEnvStored() - value); envStorage.setEnvStored(envStorage.getEnvStored() - value);
} }