Replace CachedChange class with record

This commit is contained in:
dordsor21
2021-12-29 16:16:23 +00:00
parent e5cbdec67e
commit ca5640e89e
2 changed files with 10 additions and 30 deletions

View File

@@ -275,21 +275,11 @@ public class PaperweightFaweWorldNativeAccess implements WorldNativeAccess<Level
cachedChunksToSend.clear(); cachedChunksToSend.clear();
} }
private static final class CachedChange { private static final record CachedChange(
private final LevelChunk levelChunk;
private final BlockPos blockPos;
private final net.minecraft.world.level.block.state.BlockState blockState;
private CachedChange(
LevelChunk levelChunk, LevelChunk levelChunk,
BlockPos blockPos, BlockPos blockPos,
net.minecraft.world.level.block.state.BlockState blockState net.minecraft.world.level.block.state.BlockState blockState
) { ) {
this.levelChunk = levelChunk;
this.blockPos = blockPos;
this.blockState = blockState;
}
} }

View File

@@ -275,21 +275,11 @@ public class PaperweightFaweWorldNativeAccess implements WorldNativeAccess<Level
cachedChunksToSend.clear(); cachedChunksToSend.clear();
} }
private static final class CachedChange { private static final record CachedChange(
private final LevelChunk levelChunk;
private final BlockPos blockPos;
private final net.minecraft.world.level.block.state.BlockState blockState;
private CachedChange(
LevelChunk levelChunk, LevelChunk levelChunk,
BlockPos blockPos, BlockPos blockPos,
net.minecraft.world.level.block.state.BlockState blockState net.minecraft.world.level.block.state.BlockState blockState
) { ) {
this.levelChunk = levelChunk;
this.blockPos = blockPos;
this.blockState = blockState;
}
} }