BlockPhysicsUtil

public class BlockPhysicsUtil

Class BlockPhysicsUtil. Provides blockphysicsutil functionality for the Hytale server.

java.lang.Object > BlockPhysicsUtil

Field Summary

boundingBoxes

final BlockBoundingBoxes boundingBoxes

Field boundingBoxes.

rotatedBox

final BlockBoundingBoxes.RotatedVariantBoxes rotatedBox

Field rotatedBox.

boundingBox

final Box boundingBox

Field boundingBox.

blockWidth

final int blockWidth

Field blockWidth.

blockHeight

final int blockHeight

Field blockHeight.

blockDepth

final int blockDepth

Field blockDepth.

fillerX

final int fillerX

Field fillerX.

fillerY

final int fillerY

Field fillerY.

fillerZ

final int fillerZ

Field fillerZ.

nx

final int nx

Field nx.

ny

final int ny

Field ny.

nz

final int nz

Field nz.

neighbourFiller

final int neighbourFiller

Field neighbourFiller.

neighbourRotation

final int neighbourRotation

Field neighbourRotation.

fillerSupportDistance

final int fillerSupportDistance

Field fillerSupportDistance.

world

final World world

Field world.

chunkStore

final Store chunkStore

Field chunkStore.

currentSupport

final int currentSupport

Field currentSupport.

blockFillerOffset

final Vector3i blockFillerOffset

Field blockFillerOffset.

neighbourFillerOffset

final Vector3i neighbourFillerOffset

Field neighbourFillerOffset.

fluid

final Fluid fluid

Field fluid.

hitbox

final BlockBoundingBoxes hitbox

Field hitbox.

origin

final Vector3i origin

Field origin.

requiredSupportDistance

final int requiredSupportDistance

Field requiredSupportDistance.

requiredBlockFaceSupports

final RequiredBlockFaceSupport[] requiredBlockFaceSupports

Field requiredBlockFaceSupports.

connectingFaces

final BlockFace[] connectingFaces

Field connectingFaces.

connectingFaceOffsets

final Vector3i[] connectingFaceOffsets

Field connectingFaceOffsets.

neighbourBlockFace

final BlockFace neighbourBlockFace

Field neighbourBlockFace.

neighbourDirection

final Vector3i neighbourDirection

Field neighbourDirection.

neighbourX

final int neighbourX

Field neighbourX.

neighbourY

final int neighbourY

Field neighbourY.

neighbourZ

final int neighbourZ

Field neighbourZ.

neighbourFluidId

final int neighbourFluidId

Field neighbourFluidId.

neighbourBlockId

final int neighbourBlockId

Field neighbourBlockId.

neighbourBlockType

final BlockType neighbourBlockType

Field neighbourBlockType.

neighbourFluid

final Fluid neighbourFluid

Field neighbourFluid.

doesSatisfyRequirements

final boolean doesSatisfyRequirements

Field doesSatisfyRequirements.

supportDistance

final int supportDistance

Field supportDistance.

supportDistance2

final int supportDistance2

Field supportDistance2.

neighbourBlockTypeKey

final String neighbourBlockTypeKey

Field neighbourBlockTypeKey.

blockSetId

final int blockSetId

Field blockSetId.

requiredBlockTypeId

final String requiredBlockTypeId

Field requiredBlockTypeId.

fluidId

final String fluidId

Field fluidId.

tagIndex

final int tagIndex

Field tagIndex.

blockFaceSupports

final BlockFaceSupport[] blockFaceSupports

Field blockFaceSupports.

Method Detail

applyBlockPhysics

static Result applyBlockPhysics (@Nullable final ComponentAccessor commandBuffer, @Nonnull final Ref chunkReference, @Nonnull final BlockPhysicsSystems.CachedAccessor chunkAccessor, final BlockSection blockSection, @Nonnull final BlockPhysics blockPhysics, @Nonnull final FluidSection fluidSection, final int blockX, final int blockY, final int blockZ, @Nonnull final BlockType blockType, final int rotation, final int filler)

Method applyBlockPhysics.

Parameters:
@Nullable final ComponentAccessor commandBuffer
@Nonnull final Ref chunkReference
@Nonnull final BlockPhysicsSystems.CachedAccessor chunkAccessor
final BlockSection blockSection
@Nonnull final BlockPhysics blockPhysics
@Nonnull final FluidSection fluidSection
final int blockX
final int blockY
final int blockZ
@Nonnull final BlockType blockType
final int rotation
final int filler

Vector3i

public new Vector3i (blockX, blockY, blockZ)

Method Vector3i.

Parameters:
blockX blockX
blockY blockY
blockZ blockZ

testBlockPhysics

static int testBlockPhysics (@Nonnull final BlockPhysicsSystems.CachedAccessor chunkAccessor, final BlockSection blockSection, @Nullable final BlockPhysics blockPhysics, @Nonnull final FluidSection fluidSection, final int blockX, final int blockY, final int blockZ, @Nonnull final BlockType blockType, final int rotation, final int filler)

Method testBlockPhysics.

Parameters:
@Nonnull final BlockPhysicsSystems.CachedAccessor chunkAccessor
final BlockSection blockSection
@Nullable final BlockPhysics blockPhysics
@Nonnull final FluidSection fluidSection
final int blockX
final int blockY
final int blockZ
@Nonnull final BlockType blockType
final int rotation
final int filler

if

public else if (supportDistance < lowestSupportDistance)

Method if.

Parameters:
supportDistance < lowestSupportDistance

IllegalArgumentException

public new IllegalArgumentException ("Unknown Support Match type: " + String.valueOf(requiredBlockFaceSupport.getMatchSelf()

Method IllegalArgumentException.

Parameters:
"Unknown Support Match type: " + String.valueOf(requiredBlockFaceSupport.getMatchSelf(

doesSatisfyRequirements

static boolean doesSatisfyRequirements (@Nonnull final BlockType blockType, final Fluid fluid, final Vector3i blockFillerOffset, final Vector3i neighbourFillerOffset, final BlockFace blockFace, final BlockFace neighbourBlockFace, final int neighbourBlockId, @Nonnull final BlockType neighbourBlockType, final int neighbourRotation, final int neighbourFluidId, @Nonnull final Fluid neighbourFluid, @Nonnull final RequiredBlockFaceSupport requiredBlockFaceSupport)

Method doesSatisfyRequirements.

Parameters:
@Nonnull final BlockType blockType
final Fluid fluid
final Vector3i blockFillerOffset
final Vector3i neighbourFillerOffset
final BlockFace blockFace
final BlockFace neighbourBlockFace
final int neighbourBlockId
@Nonnull final BlockType neighbourBlockType
final int neighbourRotation
final int neighbourFluidId
@Nonnull final Fluid neighbourFluid
@Nonnull final RequiredBlockFaceSupport requiredBlockFaceSupport

doesMatchFaceType

static boolean doesMatchFaceType (final Vector3i fillerOffset, @Nonnull final String faceType, final BlockFace blockFace, @Nonnull final Map supporting)

Method doesMatchFaceType.

Parameters:
final Vector3i fillerOffset
@Nonnull final String faceType
final BlockFace blockFace
@Nonnull final Map supporting