This document provides an overview of the WhatNot API mod, describing all classes, interfaces, and functions it defines. To use this in your mod, write next import necessary content from Features class:
import com.creatorsindrome.whatnot.Features.*;The Point class provides functionality related to point operations in Euclidean 2-dimensional geometry.
| Parameter | Description |
|---|---|
float x |
X coordinate of point |
float y |
Y coordinate of point |
- If you create new point without x and y - it's coordinates will be set to (0, 0)
Returns: float
Distance to second point
| Parameter | Description |
|---|---|
Point sec |
Point to find distance to |
The Snail class provides functionality related to operations with spiral, coming from center and rotating in opposite to clock direction.
| Parameter | Description |
|---|---|
float step |
Size of cell sector (need to be greater than 0) |
Returns: int
Get number of circle-layer from center
| Parameter | Description |
|---|---|
int num |
Number of cell |
Returns: Point
Get Point class variable with coordinated of specific cell
| Parameter | Description |
|---|---|
int num |
Number of cell |
The TaskScheduler class allows you to schedule tasks for running.
Returns: nothing
Add task to wait it's time
| Parameter | Description |
|---|---|
int delayTicks |
Amount of ticks before running |
Runnable task |
Function you want to run on the end of timer |
- Timer always grows, you may face troubles with adding new tasks, recommended to use
resetTimer()after running your function
Returns: nothing
Resets timer variable
The TooltipHelper class which allows you to add tooltip to any item in game.
Returns: nothing
Adding tooltip to
| Parameter | Description |
|---|---|
Component displayname |
Display name of item for tooltip to display with |
Component tooltip |
Tooltip to display |
The ClientMessageHelper class provides functionality related to clientmessagehelper operations.
Returns: nothing
Adds message to queue before sending it to player's chat
| Parameter | Description |
|---|---|
Component message |
Message to display |
Returns: nothing
Clears queue of messages
The GFunction interface defines a contract for generic functions. Classes implementing this interface represent specific mathematical or logical functions.
The following classes implement GFunction, each representing a specific function.
| Class | Represents | Parameters |
|---|---|---|
GLinary |
Represents |
float k, float b |
GBinary |
Represents |
float a, float b, float c |
GPower |
Represents |
float a, float n |
GLogarithm |
Represents |
float a |
GSin |
Represents |
float a |
GCos |
Represents |
float a |
GTan |
Represents |
float a |
GCtan |
Represents |
float a |
GHyperbole |
Represents |
float k, float b |
Return: float
Gives you Y coordinate, based on X for your function. Or NULL if function is not existing on provided X
| Parameter | Description |
|---|---|
int x |
X coordinate |
Return: boolean
Checks if point is laying on your function graphic
| Parameter | Description |
|---|---|
Point point |
Point for checking |
Return: Point or null
Returns first point of intersection between two functions on given distance. Works up to 3 digits after point
| Parameter | Description |
|---|---|
GFunction sec |
Second function to compare |
float start |
Begining of search |
float end |
End of search |
Returns: TagKey<Item>
Returns created item tag within provided information
| Parameter | Description |
|---|---|
String modid |
Mod id to create tag in |
String name |
Tag name |
Returns: TagKey<Block>
Returns created block tag within provided information
| Parameter | Description |
|---|---|
String modid |
Mod id to create tag in |
String name |
Tag name |
Returns: TagKey<Biome>
Returns created biome tag within provided information
| Parameter | Description |
|---|---|
String modid |
Mod id to create tag in |
String name |
Tag name |
Returns: TagKey<EntityType<?>>
Returns created entity type tag within provided information
| Parameter | Description |
|---|---|
String modid |
Mod id to create tag in |
String name |
Tag name |
Returns: boolean
Returns true if mod is loaded
| Parameter | Description |
|---|---|
String modId |
Your mod id |