Contents
Class PrefabBufferSelectionConverter
java.lang.Object
com.hypixel.hytale.server.core.prefab.selection.buffer.PrefabBufferSelectionConverter
Bridges
BlockSelection, the mutable representation the prefab editor works with, and
PrefabBuffer, the compact column-oriented representation backing the .lpf format.
Used to save large prefabs as .lpf instead of .prefab.json while keeping them
editable afterward.-
Method Summary
Modifier and TypeMethodDescriptionstatic BlockSelectiontoBlockSelection(PrefabBuffer buffer) Convertsbufferback into an editableBlockSelection, undoing the anchor-relative coordinate shiftBsonPrefabBufferDeserializerapplies to block, fluid, and entity positions.static PrefabBuffertoPrefabBuffer(Path path, BlockSelection selection) Convertsselectioninto aPrefabBufferby routing it through the same BSON shapeSelectionPrefabSerializerwrites to disk, so the anchor-relative coordinate shift the binary format needs stays defined in one place (BsonPrefabBufferDeserializer).
-
Method Details
-
toPrefabBuffer
@Nonnull public static PrefabBuffer toPrefabBuffer(@Nonnull Path path, @Nonnull BlockSelection selection) Convertsselectioninto aPrefabBufferby routing it through the same BSON shapeSelectionPrefabSerializerwrites to disk, so the anchor-relative coordinate shift the binary format needs stays defined in one place (BsonPrefabBufferDeserializer). -
toBlockSelection
Convertsbufferback into an editableBlockSelection, undoing the anchor-relative coordinate shiftBsonPrefabBufferDeserializerapplies to block, fluid, and entity positions.
-