mirror of
https://github.com/RoBaertschi/EnvironmentTech.git
synced 2025-06-07 10:53:28 +00:00
don't return so much Env into the chunk
This commit is contained in:
parent
d90374272e
commit
13455380c1
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user