Class BlockPlaceUtils
java.lang.Object
com.hypixel.hytale.server.core.modules.interaction.BlockPlaceUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbreakAndDropReplacedBlock(Vector3i blockPosition, WorldChunk worldChunkComponent, Ref<ChunkStore> chunkReference, Ref<EntityStore> ref, ComponentAccessor<ChunkStore> chunkStore, ComponentAccessor<EntityStore> entityStore) static booleancanPlaceBlock(com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, String placedBlockTypeKey) private static voidonPlaceBlockFailure(ItemStack itemStack, Inventory inventory, byte activeSlot, Player playerComponent, com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection blockSection, Vector3i blockPosition) private static voidonPlaceBlockSuccess(ItemStack itemStack, WorldChunk worldChunkComponent, Vector3i blockPosition) static voidplaceBlock(Ref<EntityStore> ref, ItemStack itemStack, String blockTypeKey, ItemContainer itemContainer, Vector3i placementNormal, Vector3i blockPosition, BlockRotation blockRotation, Inventory inventory, byte activeSlot, boolean removeItemInHand, Ref<ChunkStore> chunkReference, ComponentAccessor<ChunkStore> chunkStore, ComponentAccessor<EntityStore> entityStore) private static booleantryPlaceBlock(Ref<EntityStore> ref, Vector3i placementNormal, Vector3i blockPosition, String blockTypeKey, RotationTuple rotation, WorldChunk worldChunkComponent, BlockChunk blockChunkComponent, Ref<ChunkStore> chunkReference, ComponentAccessor<ChunkStore> chunkStore, ComponentAccessor<EntityStore> entityStore) private static booleanvalidateAndPlacePrefab(Vector3i blockPosition, String prefabListAssetId, PlayerRef playerRefComponent, ComponentAccessor<EntityStore> componentAccessor) private static booleanvalidateBlockToPlace(String blockTypeKey, PlayerRef playerRefComponent)
-
Field Details
-
LOGGER
@Nonnull private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
MESSAGE_MODULES_INTERACTION_FAILED_ADD_BACK_AFTER_FAILED_PLACE
@Nonnull private static final Message MESSAGE_MODULES_INTERACTION_FAILED_ADD_BACK_AFTER_FAILED_PLACE -
MESSAGE_MODULES_INTERACTION_FAILED_CHECK_BLOCK
-
MESSAGE_MODULES_INTERACTION_FAILED_CHECK_EMPTY
-
MESSAGE_MODULES_INTERACTION_FAILED_CHECK_UNKNOWN
-
MESSAGE_MODULES_INTERACTION_FAILED_CHECK
-
MESSAGE_MODULES_INTERACTION_BUILD_FORBIDDEN
-
-
Constructor Details
-
BlockPlaceUtils
public BlockPlaceUtils()
-
-
Method Details
-
placeBlock
public static void placeBlock(@Nonnull Ref<EntityStore> ref, @Nonnull ItemStack itemStack, @Nullable String blockTypeKey, @Nonnull ItemContainer itemContainer, @Nonnull Vector3i placementNormal, @Nonnull Vector3i blockPosition, @Nonnull BlockRotation blockRotation, @Nullable Inventory inventory, byte activeSlot, boolean removeItemInHand, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<ChunkStore> chunkStore, @Nonnull ComponentAccessor<EntityStore> entityStore) -
onPlaceBlockFailure
-
onPlaceBlockSuccess
private static void onPlaceBlockSuccess(@Nullable ItemStack itemStack, @Nonnull WorldChunk worldChunkComponent, @Nonnull Vector3i blockPosition) -
validateBlockToPlace
-
validateAndPlacePrefab
private static boolean validateAndPlacePrefab(@Nonnull Vector3i blockPosition, @Nonnull String prefabListAssetId, @Nullable PlayerRef playerRefComponent, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
tryPlaceBlock
private static boolean tryPlaceBlock(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i placementNormal, @Nonnull Vector3i blockPosition, @Nonnull String blockTypeKey, @Nonnull RotationTuple rotation, @Nonnull WorldChunk worldChunkComponent, @Nonnull BlockChunk blockChunkComponent, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<ChunkStore> chunkStore, @Nonnull ComponentAccessor<EntityStore> entityStore) -
breakAndDropReplacedBlock
private static void breakAndDropReplacedBlock(@Nonnull Vector3i blockPosition, @Nonnull WorldChunk worldChunkComponent, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<ChunkStore> chunkStore, @Nonnull ComponentAccessor<EntityStore> entityStore) -
canPlaceBlock
public static boolean canPlaceBlock(@Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType, @Nonnull String placedBlockTypeKey)
-