Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b96972c
Moving class UIAdaptiveWindow to UI.AdaptiveWindow
rislaed Nov 5, 2024
efe8bfe
Moving class UIWindowGroup to UI.WindowGroup
rislaed Nov 5, 2024
10fefba
Moving class UITabbedWindow to UI.TabbedWindow
rislaed Nov 5, 2024
c399ab6
Moving class UIWindowStandard to UI.Standard(t)Window
rislaed Nov 5, 2024
61612e0
Moving class UIWindow to UI.Window
rislaed Nov 5, 2024
f758cba
Moving drawing classes to UI.Drawing
rislaed Nov 5, 2024
683f2af
Moving element classes to UI.Element
rislaed Nov 5, 2024
a866d7a
Moving container classes to UI.Container
rislaed Nov 5, 2024
c9d021c
Moving font, style, location, frame and regular texture sources to UI
rislaed Nov 5, 2024
840fcac
Moving ItemContainer classes to ItemContainer
rislaed Nov 6, 2024
2de91bf
Moving window providers and factories to UI/UI.Window
rislaed Nov 6, 2024
fa78c66
Moving element factories and events to UI.Element
rislaed Nov 6, 2024
feea54b
Moving container abstracts with recipes to new classes
rislaed Nov 6, 2024
64ea2f7
Updated classes with collapsed declarations
rislaed Nov 6, 2024
f0709b9
Moving Config class to Config
rislaed Nov 6, 2024
4bb681c
Moving NativeItemInstanceExtra to ItemExtraData
rislaed Nov 6, 2024
9b57767
Moving Gui/NativeRenderMesh classes to RenderMesh
rislaed Nov 6, 2024
b462f73
Moving NativeRenderer classes to Render
rislaed Nov 6, 2024
274857b
Removing useless horizon stuff
rislaed Nov 6, 2024
a4f19b8
Removing useless resource stuff
rislaed Nov 6, 2024
f20e305
Quality life classes improvements
rislaed Nov 6, 2024
6c89006
Completing classes stuff movement
rislaed Nov 6, 2024
028d309
Removing useless things, which are actually integrated to language
rislaed Nov 6, 2024
e7a4b48
Improved TagRegistry generics, much simpler to use now
rislaed Nov 6, 2024
8967880
Moving sets, ConfigVisualizer, events to UI.Element, UI.Drawing
rislaed Nov 6, 2024
7b09373
Moving window stuff to UI.IWindow
rislaed Nov 6, 2024
afe84e8
Flattened standard window descriptions stuff
rislaed Nov 6, 2024
712c5f9
Moving texture associated stuff to UI.Texture
rislaed Nov 6, 2024
63892c7
Gut, UI now clean
rislaed Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions core-engine/BlockState.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,10 @@ declare class BlockState implements Tile {
*/
getNamedStatesScriptable(): { [key: string]: number };

/**
* @returns String representation of the following object.
*/
toString(): string;

/**
* @returns Whether the following object is equal to given,
* according to different parameters.
*/
equals(object: any): boolean;

}
}
6 changes: 3 additions & 3 deletions core-engine/Callback.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ declare namespace Callback {
* @param byUser if `true`, container was closed by user,
* from the code otherwise
*/
(container: UI.Container, window: com.zhekasmirnov.innercore.api.mod.ui.window.IWindow, byUser: boolean): void
(container: UI.Container, window: UI.IWindow, byUser: boolean): void
}

function addCallback(name: "ContainerClosed", func: ContainerClosedFunction, priority?: number): void;
Expand All @@ -859,7 +859,7 @@ declare namespace Callback {
* @param container container that was opened
* @param window window that was loaded in the container
*/
(container: UI.Container, window: com.zhekasmirnov.innercore.api.mod.ui.window.IWindow): void
(container: UI.Container, window: UI.IWindow): void
}

function addCallback(name: "ContainerOpened", func: ContainerOpenedFunction, priority?: number): void;
Expand All @@ -886,7 +886,7 @@ declare namespace Callback {
/**
* @param window window that was opened
*/
(window: com.zhekasmirnov.innercore.api.mod.ui.window.IWindow): void;
(window: UI.IWindow): void;
}

function addCallback(name: "CustomWindowOpened", func: CustomWindowFunction, priority?: number): void;
Expand Down
128 changes: 122 additions & 6 deletions core-engine/Config.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,131 @@
/**
* Json configuration file reading/writing utility.
*/
declare class Config extends com.zhekasmirnov.innercore.mod.build.Config {
static class: java.lang.Class<Config>;
declare class Config {
/**
* Creates new {@link Config} instance using specified file.
* @param file {@link java.io.File} instance of the file to use
*/
constructor(file: java.io.File);
/**
* Creates new {@link Config} instance using specified file.
* @param path path to configuration file
*/
constructor(path: string);
/**
* @since 2.2.1b96
*/
getPath(): string;
/**
* @since 2.2.1b96
*/
reload(): void;
/**
* Writes configuration JSON to the file.
*/
save(): void;
/**
* @returns Read-only ArrayList instance containing
* all the names in the current config file.
*/
getNames(): java.util.ArrayList<string>;
/**
* Gets property from the config.
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns Config instance with current config as parent if the
* property is object, {@link org.json.JSONArray} instance if the property is an
* array, raw type if the property is of that raw type, `null` otherwise.
*
* @example
* ```ts
* config.get("generation.ore_copper.max_height");
* ```
*/
get<T = Nullable<Config | org.json.JSONArray | boolean | number | string>>(name: string): T;
/**
* Same as {@link Config.get}.
*/
access<T = Nullable<Config | org.json.JSONArray | boolean | number | string>>(name: string): T;
/**
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns Boolean config value specified in config or false if no value was
* specified.
*/
getBool(name: string): boolean;
/**
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns Number object instance, containing numeric value by given name
* from the config, or `0` if no value was specified.
*/
getNumber(name: string): java.lang.Number;
/**
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns Integer of value by given name from the config, or `0` if no value was specified.
*/
getInteger(name: string): number;
/**
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns Floating-point number of value by given name from the config, or `0.0` if no value was specified.
*/
getFloat(name: string): number;
/**
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns Double number of value by given name from the config, or `0.0` if no value was specified.
*/
getDouble(name: string): number;
/**
* @param name option name, supports multi-layer calls, separated by **'.'**
* @returns String by given name from the config, or `null` if no value was specified.
*/
getString(name: string): Nullable<string>;
/**
* Sets config value. Do not use {@link org.json.JSONObject} instances to create
* nested objects, consider using dot-separated names instead.
* @param name option name, supports multi-layer calls, separated by **'.'**
* @param val value, may be {@link org.json.JSONArray} instance,
* {@link org.json.JSONObject} instance or raw data type
*/
set<T = org.json.JSONObject | org.json.JSONArray | boolean | number | string>(name: string, val: T): boolean;
/**
* @param path option name, supports multi-layer calls, separated by **'.'**
* @returns Editable {@link Config.ConfigValue} instance that can be used
* to manipulate this config option separately.
*/
getValue(path: string): Nullable<Config.ConfigValue>;
/**
* Ensures that config has all the properties the data pattern contains, if
* not, puts default values to match the pattern.
* @param jsonstr string representation of JSON object representing the data pattern
*/
checkAndRestore(jsonstr: string): void;
/**
* Ensures that config has all the properties the data pattern contains, if
* not, puts default values to match the pattern.
* @param jsonobj javascript object representing the data pattern checkAndRestore
*/
checkAndRestore(jsonobj: Scriptable): void;
/**
* Ensures that config has all the properties the data pattern contains, if
* not, puts default values to match the pattern.
* @param json {@link org.json.JSONObject} instance to be used as data pattern
*/
checkAndRestore(json: org.json.JSONObject): void;
}

declare namespace Config {
/**
* Class representing config value with it's path withing Config object.
* Class representing config value with it's path withing {@link Config} object.
*/
class ConfigValue extends com.zhekasmirnov.innercore.mod.build.Config.ConfigValue {
static class: java.lang.Class<ConfigValue>;
class ConfigValue {
/**
* Sets config value and saves configuration file.
* @param value value, may be {@link org.json.JSONArray} instance,
* {@link org.json.JSONObject} instance or raw data type.
*/
set<T = org.json.JSONArray | org.json.JSONObject | boolean | number | string>(value: T): void;
/**
* @returns Config value, result is the same as the result of {@link Config.get} call.
*/
get<T=Nullable<Config | org.json.JSONArray | boolean | number | string>>(): T;
}
}
}
Loading
Loading