ObjImportPage

public class ObjImportPage extends InteractiveCustomUIPage

Class ObjImportPage. Provides objimportpage functionality for the Hytale server.

java.lang.Object > InteractiveCustomUIPage > ObjImportPage

Field Summary

objPath

private String objPath

Field objPath.

targetHeight

private int targetHeight

Field targetHeight.

useScaleMode

private boolean useScaleMode

Field useScaleMode.

scale

private float scale

Field scale.

blockPattern

private String blockPattern

Field blockPattern.

fillSolid

private boolean fillSolid

Field fillSolid.

useMaterials

private boolean useMaterials

Field useMaterials.

autoDetectTextures

private boolean autoDetectTextures

Field autoDetectTextures.

originStr

private String originStr

Field originStr.

origin

private Origin origin

Field origin.

rotationStr

private String rotationStr

Field rotationStr.

rotation

private MeshRotation rotation

Field rotation.

statusMessage

private String statusMessage

Field statusMessage.

isError

private boolean isError

Field isError.

isProcessing

private boolean isProcessing

Field isProcessing.

showBrowser

private boolean showBrowser

Field showBrowser.

config

final FileBrowserConfig config

Field config.

sizeModeEntries

final List sizeModeEntries

Field sizeModeEntries.

originEntries

final List originEntries

Field originEntries.

axisEntries

final List axisEntries

Field axisEntries.

selectedPath

final String selectedPath

Field selectedPath.

fileName

final String fileName

Field fileName.

targetPath

final Path targetPath

Field targetPath.

resolvedPath

final Path resolvedPath

Field resolvedPath.

commandBuilder

final UICommandBuilder commandBuilder

Field commandBuilder.

eventBuilder

final UIEventBuilder eventBuilder

Field eventBuilder.

result

final List result

Field result.

split

final String[] split

Field split.

parts

final String[] parts

Field parts.

pctIdx

final int pctIdx

Field pctIdx.

blockId

final int blockId

Field blockId.

roll

final int roll

Field roll.

path

final Path path

Field path.

normalizedPath

final Path normalizedPath

Field normalizedPath.

normalizedImports

final Path normalizedImports

Field normalizedImports.

blocks

final List blocks

Field blocks.

playerComponent

final Player playerComponent

Field playerComponent.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

finalHeight

final int finalHeight

Field finalHeight.

finalUseScaleMode

final boolean finalUseScaleMode

Field finalUseScaleMode.

finalScale

final float finalScale

Field finalScale.

finalPath

final String finalPath

Field finalPath.

finalFillSolid

final boolean finalFillSolid

Field finalFillSolid.

finalUseMaterials

final boolean finalUseMaterials

Field finalUseMaterials.

finalAutoDetectTextures

final boolean finalAutoDetectTextures

Field finalAutoDetectTextures.

finalOrigin

final Origin finalOrigin

Field finalOrigin.

finalRotation

final MeshRotation finalRotation

Field finalRotation.

finalBlocks

final List finalBlocks

Field finalBlocks.

objFilePath

final Path objFilePath

Field objFilePath.

mesh

final ObjParser.ObjMesh mesh

Field mesh.

bounds

final float[] bounds

Field bounds.

meshHeight

final float meshHeight

Field meshHeight.

colorIndex

final BlockColorIndex colorIndex

Field colorIndex.

hasUvTextures

final boolean hasUvTextures

Field hasUvTextures.

preserveOrigin

final boolean preserveOrigin

Field preserveOrigin.

selection

final BlockSelection selection

Field selection.

random

final Random random

Field random.

hasMaterialBlockIds

final boolean hasMaterialBlockIds

Field hasMaterialBlockIds.

blockCount

final int blockCount

Field blockCount.

textureInfo

final String textureInfo

Field textureInfo.

inventory

final Inventory inventory

Field inventory.

hotbar

final ItemContainer hotbar

Field hotbar.

storage

final ItemContainer storage

Field storage.

tools

final ItemContainer tools

Field tools.

hotbarSize

final int hotbarSize

Field hotbarSize.

itemStack

final ItemStack itemStack

Field itemStack.

itemStack2

final ItemStack itemStack2

Field itemStack2.

itemStack3

final ItemStack itemStack3

Field itemStack3.

mtlPath

final Path mtlPath

Field mtlPath.

textureDir

final Path textureDir

Field textureDir.

materialName

final String materialName

Field materialName.

material

final MtlParser.MtlMaterial material

Field material.

texture

final BufferedImage texture

Field texture.

avgColor

final int[] avgColor

Field avgColor.

rgb

final int[] rgb

Field rgb.

blockId2

final int blockId2

Field blockId2.

auto_DETECT_SUFFIXES

final String[] auto_DETECT_SUFFIXES

Field auto_DETECT_SUFFIXES.

suffix

final String suffix

Field suffix.

auto_DETECT_EXTENSIONS

final String[] auto_DETECT_EXTENSIONS

Field auto_DETECT_EXTENSIONS.

ext

final String ext

Field ext.

filename

final String filename

Field filename.

height

private Integer height

Field height.

sizeMode

private String sizeMode

Field sizeMode.

doImport

private Boolean doImport

Field doImport.

browse

private Boolean browse

Field browse.

browserSelect

private Boolean browserSelect

Field browserSelect.

browserCancel

private Boolean browserCancel

Field browserCancel.

file

private String file

Field file.

searchQuery

private String searchQuery

Field searchQuery.

searchResult

private String searchResult

Field searchResult.

Method Detail

ObjImportPage

public public ObjImportPage (@Nonnull final PlayerRef playerRef)

Method ObjImportPage.

Parameters:
@Nonnull final PlayerRef playerRef

build

public void build (@Nonnull final Ref ref, @Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder, @Nonnull final Store store)

Method build.

Parameters:
@Nonnull final Ref ref
@Nonnull final UICommandBuilder commandBuilder
@Nonnull final UIEventBuilder eventBuilder
@Nonnull final Store store

buildBrowserPage

private void buildBrowserPage (@Nonnull final UICommandBuilder commandBuilder, @Nonnull final UIEventBuilder eventBuilder)

Method buildBrowserPage.

Parameters:
@Nonnull final UICommandBuilder commandBuilder
@Nonnull final UIEventBuilder eventBuilder

updateStatus

private void updateStatus (@Nonnull final UICommandBuilder commandBuilder)

Method updateStatus.

Parameters:
@Nonnull final UICommandBuilder commandBuilder

setError

private void setError (@Nonnull final String message)

Method setError.

Parameters:
@Nonnull final String message

setStatus

private void setStatus (@Nonnull final String message)

Method setStatus.

Parameters:
@Nonnull final String message

handleDataEvent

public void handleDataEvent (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final PageData data)

Method handleDataEvent.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final PageData data

if

public else if (targetPath != null && Files.isRegularFile(targetPath, new LinkOption[0])

Method if.

Parameters:
targetPath != null && Files.isRegularFile(targetPath
new LinkOption[0]

parseBlockPattern

private List parseBlockPattern (@Nonnull final String pattern)

Method parseBlockPattern.

Parameters:
@Nonnull final String pattern

WeightedBlock

public new WeightedBlock (blockId, weight)

Method WeightedBlock.

Parameters:
blockId blockId
weight weight

selectRandomBlock

private int selectRandomBlock (@Nonnull final List blocks, @Nonnull final Random random)

Method selectRandomBlock.

Parameters:
@Nonnull final List blocks
@Nonnull final Random random

performImport

private void performImport (@Nonnull final Ref ref, @Nonnull final Store store)

Method performImport.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

BlockSelection

public new BlockSelection (result.countSolid()

Method BlockSelection.

Parameters:
result.countSolid( result.countSolid(

Vector3i

public new Vector3i (offsetX, offsetY, offsetZ)

Method Vector3i.

Parameters:
offsetX offsetX
offsetY offsetY
offsetZ offsetZ

clipboard

public to clipboard (%dx%dx%d)

Method clipboard.

Parameters:
%dx%dx%d %dx%dx%d

switchToPasteTool

private void switchToPasteTool (@Nonnull final Player playerComponent, @Nonnull final PlayerRef playerRef)

Method switchToPasteTool.

Parameters:
@Nonnull final Player playerComponent
@Nonnull final PlayerRef playerRef

SetActiveSlot

public new SetActiveSlot (-1, (byte)

Method SetActiveSlot.

Parameters:
-1 -1
(byte (byte

ItemStack

public new ItemStack (pasteToolStack.getItemId()

Method ItemStack.

Parameters:
pasteToolStack.getItemId( pasteToolStack.getItemId(

loadMaterialData

private void loadMaterialData (@Nonnull final Path objPath, @Nonnull final ObjParser.ObjMesh mesh, @Nonnull final BlockColorIndex colorIndex, @Nonnull final Map materialTextures, @Nonnull final Map materialToBlockId, final boolean autoDetectTextures)

Method loadMaterialData.

Parameters:
@Nonnull final Path objPath
@Nonnull final ObjParser.ObjMesh mesh
@Nonnull final BlockColorIndex colorIndex
@Nonnull final Map materialTextures
@Nonnull final Map materialToBlockId
final boolean autoDetectTextures

findMatchingTexture

static String findMatchingTexture (@Nonnull final Path directory, @Nonnull final String materialName)

Method findMatchingTexture.

Parameters:
@Nonnull final Path directory
@Nonnull final String materialName