Package com.ldtteam.structurize.storage
Class ClientStructurePackLoader
java.lang.Object
com.ldtteam.structurize.storage.ClientStructurePackLoader
Client side structure pack discovery.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDifferent states of the client structure loading progress. -
Field Summary
FieldsModifier and TypeFieldDescriptionSet after the client finished loading the schematics. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidhandleSaveScanMessage(net.minecraft.nbt.CompoundTag compound, String fileName) Handles the save message of scans.static voidCalled on client mod construction.static voidonServerSyncAttempt(Map<String, Double> serverStructurePacks) On receiving server structure pack update.static voidonStructurePackTransfer(String packName, io.netty.buffer.ByteBuf payload, boolean eol) On reception of a new structure pack.static voidonWorldTick(net.minecraftforge.event.TickEvent.ClientTickEvent event) static PathzipSlipProtect(ZipEntry zipEntry, Path targetDir)
-
Field Details
-
loadingState
Set after the client finished loading the schematics.
-
-
Constructor Details
-
ClientStructurePackLoader
public ClientStructurePackLoader()
-
-
Method Details
-
onClientLoading
public static void onClientLoading()Called on client mod construction. -
onWorldTick
public static void onWorldTick(net.minecraftforge.event.TickEvent.ClientTickEvent event) -
onServerSyncAttempt
On receiving server structure pack update.- Parameters:
serverStructurePacks- the server structure packs.
-
onStructurePackTransfer
public static void onStructurePackTransfer(String packName, io.netty.buffer.ByteBuf payload, boolean eol) On reception of a new structure pack.- Parameters:
packName- the name of the structure pack.payload- the payload of the pack.eol- if last sync.
-
zipSlipProtect
- Throws:
IOException
-
handleSaveScanMessage
Handles the save message of scans.- Parameters:
compound- compound to store.fileName- milli seconds for fileName.
-