public class PrefabBuffer
Class PrefabBuffer. Provides prefabbuffer functionality for the Hytale server.
java.lang.Object > PrefabBuffer
Field Summary
buf
Field buf.
anchor
Field anchor.
columnIndex
Field columnIndex.
blockCount
Field blockCount.
readerIndex
Field readerIndex.
offset
Field offset.
entry
Field entry.
y
Field y.
blockId
Field blockId.
chance
Field chance.
holder
Field holder.
fluidId
Field fluidId.
fluidLevel
Field fluidLevel.
offset2
Field offset2.
hasChance
Field hasChance.
blockBytes
Field blockBytes.
offsetBytes
Field offsetBytes.
fluidBytes
Field fluidBytes.
mask
Field mask.
column
Field column.
spawnerState
Field spawnerState.
path
Field path.
weights
Field weights.
rotation
Field rotation.
buffer
Field buffer.
childPrefabArray
Field childPrefabArray.
rotatedX
Field rotatedX.
rotatedZ
Field rotatedZ.
columnData
Field columnData.
cx
Field cx.
cz
Field cz.
x2
Field x2.
z2
Field z2.
supportValue
Field supportValue.
rotation2
Field rotation2.
entityHolders
Field entityHolders.
x
Field x.
z
Field z.
position
Field position.
position2
Field position2.
filler
Field filler.
secondPrefabColumns
Field secondPrefabColumns.
columnIndexes
Field columnIndexes.
columnIterator
Field columnIterator.
firstColumn
Field firstColumn.
secondColumn
Field secondColumn.
firstColumnBlockCount
Field firstColumnBlockCount.
secondColumnBlockCount
Field secondColumnBlockCount.
oldFirstColumnY
Field oldFirstColumnY.
oldSecondColumnY
Field oldSecondColumnY.
oldFirstColumnReaderIndex
Field oldFirstColumnReaderIndex.
oldSecondColumnReaderIndex
Field oldSecondColumnReaderIndex.
test
Field test.
Method Detail
PrefabBuffer
private
PrefabBuffer
(@Nonnull final ByteBuf buf, @Nonnull final Vector3i anchor, @Nonnull final Vector3i min, @Nonnull final Vector3i max, @Nonnull final Int2ObjectMap columns, @Nonnull final ChildPrefab[] childPrefabs)
Method PrefabBuffer.
- Parameters:
@Nonnull final ByteBufbuf@Nonnull final Vector3ianchor@Nonnull final Vector3imin@Nonnull final Vector3imax@Nonnull final Int2ObjectMapcolumns@Nonnull final ChildPrefab[]childPrefabs
getAnchorX
int
getAnchorX
()
Method getAnchorX.
getAnchorY
int
getAnchorY
()
Method getAnchorY.
getAnchorZ
int
getAnchorZ
()
Method getAnchorZ.
newAccess
PrefabBufferAccessor
newAccess
()
Method newAccess.
release
void
release
()
Method release.
checkReleased
void
checkReleased
()
Method checkReleased.
getBlockMask
int
getBlockMask
(final int blockBytes, final int fluidBytes, final boolean chance, final int offsetBytes, @Nullable final Holder holder, final byte supportValue, final int rotation, final int filler)
Method getBlockMask.
- Parameters:
final intblockBytesfinal intfluidBytesfinal booleanchancefinal intoffsetBytes@Nullable final Holderholderfinal bytesupportValuefinal introtationfinal intfiller
IllegalArgumentException
new
IllegalArgumentException
("Unsupported amount of bytes for blocks (0, 1, 2, 4)
Method IllegalArgumentException.
- Parameters:
"Unsupported amount of bytes for blocks(0112244
getSkipBytes
int
getSkipBytes
(final int mask)
Method getSkipBytes.
- Parameters:
final intmask
hasChance
boolean
hasChance
(final int mask)
Method hasChance.
- Parameters:
final intmask
hasFiller
boolean
hasFiller
(final int mask)
Method hasFiller.
- Parameters:
final intmask
hasRotation
boolean
hasRotation
(final int mask)
Method hasRotation.
- Parameters:
final intmask
getBlockBytes
int
getBlockBytes
(final int mask)
Method getBlockBytes.
- Parameters:
final intmask
switch
return
switch
(mask & 0x3)
Method switch.
- Parameters:
mask &0x3
getOffsetBytes
int
getOffsetBytes
(final int mask)
Method getOffsetBytes.
- Parameters:
final intmask
getFluidBytes
int
getFluidBytes
(final int mask)
Method getFluidBytes.
- Parameters:
final intmask
getSupportValue
int
getSupportValue
(final int mask)
Method getSupportValue.
- Parameters:
final intmask
hasComponents
boolean
hasComponents
(final int mask)
Method hasComponents.
- Parameters:
final intmask
ChildPrefab
private
ChildPrefab
(final int x, final int y, final int z, @Nonnull final String path, final boolean fitHeightmap, final boolean inheritSeed, final boolean inheritHeightCondition, @Nonnull final PrefabWeights weights, @Nonnull final PrefabRotation rotation)
Method ChildPrefab.
- Parameters:
final intxfinal intyfinal intz@Nonnull final Stringpathfinal booleanfitHeightmapfinal booleaninheritSeedfinal booleaninheritHeightCondition@Nonnull final PrefabWeightsweights@Nonnull final PrefabRotationrotation
getX
int
getX
()
Method getX.
getY
int
getY
()
Method getY.
getZ
int
getZ
()
Method getZ.
getPath
String
getPath
()
Method getPath.
isFitHeightmap
boolean
isFitHeightmap
()
Method isFitHeightmap.
isInheritSeed
boolean
isInheritSeed
()
Method isInheritSeed.
isInheritHeightCondition
boolean
isInheritHeightCondition
()
Method isInheritHeightCondition.
addColumn
void
addColumn
(final int x, final int z, @Nonnull final PrefabBufferBlockEntry[] entries, @Nullable final Holder[] entityHolders)
Method addColumn.
- Parameters:
final intxfinal intz@Nonnull final PrefabBufferBlockEntry[]entries@Nullable final HolderentityHolders[]
handleBlockComponents
void
handleBlockComponents
(final int blockRotation, final int x, final int y, final int z, @Nonnull final Holder holder)
Method handleBlockComponents.
- Parameters:
final intblockRotationfinal intxfinal intyfinal intz@Nonnull final Holderholder
addChildPrefab
void
addChildPrefab
(final int x, final int y, final int z, @Nonnull final String path, final boolean fitHeightmap, final boolean inheritSeed, final boolean inheritHeightCondition, @Nullable final PrefabWeights weights, @Nonnull final PrefabRotation rotation)
Method addChildPrefab.
- Parameters:
final intxfinal intyfinal intz@Nonnull final Stringpathfinal booleanfitHeightmapfinal booleaninheritSeedfinal booleaninheritHeightCondition@Nullable final PrefabWeightsweights@Nonnull final PrefabRotationrotation
newBlockEntry
Method newBlockEntry.
- Parameters:
final inty
getMinY
int
getMinY
()
Method getMinY.
getMaxY
int
getMaxY
()
Method getMaxY.
getColumnCount
int
getColumnCount
()
Method getColumnCount.
getChildPrefabs
ChildPrefab[]
getChildPrefabs
()
Method getChildPrefabs.
getMinYAt
Method getMinYAt.
- Parameters:
@Nonnull final PrefabRotationrotationfinal intxfinal intz
getMaxYAt
Method getMaxYAt.
- Parameters:
@Nonnull final PrefabRotationrotationfinal intxfinal intz
forEach
void
forEach
(@Nonnull final ColumnPredicate columnPredicate, @Nonnull final BlockConsumer blockConsumer, @Nullable final EntityConsumer entityConsumer, @Nullable final ChildConsumer childConsumer, @Nonnull final T t)
Method forEach.
- Parameters:
@Nonnull final ColumnPredicatecolumnPredicate@Nonnull final BlockConsumerblockConsumer@Nullable final EntityConsumerentityConsumer@Nullable final ChildConsumerchildConsumer@Nonnull final Tt
forEachRaw
void
forEachRaw
(@Nonnull final ColumnPredicate columnPredicate, @Nonnull final RawBlockConsumer blockConsumer, @Nonnull final FluidConsumer fluidConsumer, @Nullable final EntityConsumer entityConsumer, @Nullable final T t)
Method forEachRaw.
- Parameters:
@Nonnull final ColumnPredicatecolumnPredicate@Nonnull final RawBlockConsumerblockConsumer@Nonnull final FluidConsumerfluidConsumer@Nullable final EntityConsumerentityConsumer@Nullable final Tt
compare
boolean
compare
(@Nonnull final BlockComparingPrefabPredicate blockComparingIterator, @Nonnull final T t, @Nonnull final IPrefabBuffer otherPrefab)
Method compare.
- Parameters:
@Nonnull final BlockComparingPrefabPredicateblockComparingIterator@Nonnull final Tt@Nonnull final IPrefabBufferotherPrefab
IntOpenHashSet
new
IntOpenHashSet
(this.prefabBuffer.columns.size()
Method IntOpenHashSet.
- Parameters:
this.prefabBuffer.columns.size(this.prefabBuffer.columns.size(
if
else
if
((firstColumnY < secondColumnY && firstColumnBlocksRead < firstColumnBlockCount)
Method if.
- Parameters:
(firstColumnY < secondColumnY && firstColumnBlocksRead <firstColumnBlockCount
getBlockId
int
getBlockId
(final int x, final int y, final int z)
Method getBlockId.
- Parameters:
final intxfinal intyfinal intz
getFiller
int
getFiller
(final int x, final int y, final int z)
Method getFiller.
- Parameters:
final intxfinal intyfinal intz
getRotationIndex
int
getRotationIndex
(final int x, final int y, final int z)
Method getRotationIndex.
- Parameters:
final intxfinal intyfinal intz