public class RegionSectionCache<R extends IDynamicSerializable>
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
private it.unimi.dsi.fastutil.longs.Long2ObjectMap<java.util.Optional<R>> |
data |
private it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet |
dirtySections |
private static org.apache.logging.log4j.Logger |
field_219120_a |
private java.util.function.BiFunction<java.lang.Runnable,com.mojang.datafixers.Dynamic<?>,R> |
field_219123_e |
private java.util.function.Function<java.lang.Runnable,R> |
field_219124_f |
private com.mojang.datafixers.DataFixer |
field_219125_g |
private DefaultTypeReferences |
field_219126_h |
private IOWorker |
field_227173_b_ |
Constructor and Description |
---|
RegionSectionCache(java.io.File p_i49937_1_,
java.util.function.BiFunction<java.lang.Runnable,com.mojang.datafixers.Dynamic<?>,R> p_i49937_2_,
java.util.function.Function<java.lang.Runnable,R> p_i49937_3_,
com.mojang.datafixers.DataFixer p_i49937_4_,
DefaultTypeReferences p_i49937_5_) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private static int |
func_219103_a(com.mojang.datafixers.Dynamic<?> p_219103_0_) |
protected java.util.Optional<R> |
func_219106_c(long p_219106_1_) |
private void |
func_219107_b(ChunkPos p_219107_1_) |
protected R |
func_219110_e(long p_219110_1_) |
protected java.util.Optional<R> |
func_219113_d(long p_219113_1_) |
protected boolean |
func_219114_b(SectionPos p_219114_1_) |
private <T> void |
func_219119_a(ChunkPos p_219119_1_,
com.mojang.datafixers.types.DynamicOps<T> p_219119_2_,
T p_219119_3_) |
private CompoundNBT |
func_223138_c(ChunkPos p_223138_1_) |
protected void |
markDirty(long sectionPosIn) |
protected void |
onSectionLoad(long p_219111_1_) |
private void |
save(ChunkPos p_219117_1_) |
void |
saveIfDirty(ChunkPos p_219112_1_) |
private <T> com.mojang.datafixers.Dynamic<T> |
serialize(ChunkPos p_219108_1_,
com.mojang.datafixers.types.DynamicOps<T> p_219108_2_) |
protected void |
tick(java.util.function.BooleanSupplier p_219115_1_) |
private static final org.apache.logging.log4j.Logger field_219120_a
private final IOWorker field_227173_b_
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<java.util.Optional<R extends IDynamicSerializable>> data
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet dirtySections
private final java.util.function.BiFunction<java.lang.Runnable,com.mojang.datafixers.Dynamic<?>,R extends IDynamicSerializable> field_219123_e
private final java.util.function.Function<java.lang.Runnable,R extends IDynamicSerializable> field_219124_f
private final com.mojang.datafixers.DataFixer field_219125_g
private final DefaultTypeReferences field_219126_h
public RegionSectionCache(java.io.File p_i49937_1_, java.util.function.BiFunction<java.lang.Runnable,com.mojang.datafixers.Dynamic<?>,R> p_i49937_2_, java.util.function.Function<java.lang.Runnable,R> p_i49937_3_, com.mojang.datafixers.DataFixer p_i49937_4_, DefaultTypeReferences p_i49937_5_)
protected void tick(java.util.function.BooleanSupplier p_219115_1_)
@Nullable protected java.util.Optional<R> func_219106_c(long p_219106_1_)
protected java.util.Optional<R> func_219113_d(long p_219113_1_)
protected boolean func_219114_b(SectionPos p_219114_1_)
protected R func_219110_e(long p_219110_1_)
private void func_219107_b(ChunkPos p_219107_1_)
@Nullable private CompoundNBT func_223138_c(ChunkPos p_223138_1_)
private <T> void func_219119_a(ChunkPos p_219119_1_, com.mojang.datafixers.types.DynamicOps<T> p_219119_2_, @Nullable T p_219119_3_)
private void save(ChunkPos p_219117_1_)
private <T> com.mojang.datafixers.Dynamic<T> serialize(ChunkPos p_219108_1_, com.mojang.datafixers.types.DynamicOps<T> p_219108_2_)
protected void onSectionLoad(long p_219111_1_)
protected void markDirty(long sectionPosIn)
private static int func_219103_a(com.mojang.datafixers.Dynamic<?> p_219103_0_)
public void saveIfDirty(ChunkPos p_219112_1_)
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException