Skip to content

Instantly share code, notes, and snippets.

@Shadows-of-Fire
Last active May 6, 2023 15:55
Show Gist options
  • Save Shadows-of-Fire/2e83a68a6822f9cf9f64b1fb30210b71 to your computer and use it in GitHub Desktop.
Save Shadows-of-Fire/2e83a68a6822f9cf9f64b1fb30210b71 to your computer and use it in GitHub Desktop.
Hostile Neural Networks Data Model Schema
{
"type": "string", // [Mandatory] || Registry Name of the Entity Type bound to this Data Model. Only one data model may exist for a single Entity Type.
"subtypes" [
"string" // [Optional] || An array of entity type registry names that will count towards kills for this model. Names that are invalid or not currently loaded are ignored, so you can add optional compat through this.
],
"name": "string", // [Mandatory] || The translation key for the name of the entity within this data model. Typically it is "entity.domain.path" where domain and path are the first and second half of the Registry Name (respectively).
"name_color": "string", // [Optional] || A hex integer of the form 0xRRGGBB which determines the name color of the Data Model
"gui_scale": float, // [Mandatory] || A factor to scale the displayed entity by in the Deep Learner GUI. Must be greater than zero.
"gui_x_offset": float, // [Mandatory] || X Coordinate offset for the displayed entity in the Deep Learner GUI.
"gui_y_offset": float, // [Mandatory] || Y Coordinate offset for the displayed entity in the Deep Learner GUI.
"gui_z_offset": float, // [Mandatory] || Z Coordinate offset for the displayed entity in the Deep Learner GUI.
"sim_cost": integer, // [Mandatory] || FE/t cost to simulate this data model in the Simulation Chamber.
"input": ItemStack, // [Mandatory] || The input item for simulation. This is typically the prediction matrix. May not be empty.
"base_drop": ItemStack, // [Mandatory] || The base drop item during simulation. This is typically the generic prediction. May not be empty.
"trivia": "string", // [Optional] || The translation key for the trivia shown in the Deep Learner GUI. Actual translations should be provided by a lang file. Newlines can be declared with \n (in the language file).
"fabricator_drops": [ // [Mandatory] || The list of all items that may be created using a mob prediction of this type.
ItemStack
],
"tier_data": [ // [Optional] || An array of four integers, each higher than the last. These represent the data thresholds at which the model will progress to the next tier.
integer // The first entry is the data needed to hit Basic, the second is Basic->Advanced, so on and so forth. A simulation always rewards one data, and a kill rewards data as defined by data_per_kill
], // Note that the max on the "Data Collected" stat on the model will not match these thresholds exactly, it will show the difference between the current threshold and the previous one.
"data_per_kill": [ // [Optional] || An array of four integers. These represent the data per kill for each model tier. Self Aware models always receive 0 data per kill, as they are maxed.
integer // For both tier_data and data_per_kill, all values must be greater than zero, and less than 32768.
]
}
// This file supports conditions, the same way recipes, advancements, and other things do.
// The defaults for tier_data are [6, 54, 354, 1254] and the defaults for data_per_kill are [1, 4, 10, 18].
// It takes (data-prevData)/dataPerKill kills to reach the next tier.
// For example, if you have a Basic model, it will take (54-6)/4 = 12 kills to reach Advanced
// It takes (data-prevData) simulation runs to reach the next tier.
{
"item": "string", // [Mandatory] || Registry Name of item to load.
"optional": boolean, // [Optional, defaults to false] || If False, then the parser will error if the item is not located in the registry.
"count": integer, // [Optional, defaults to 1] || Stack Size
"nbt": CompoundTag, // [Optional] || Vanilla Item NBT -- See CompoundTag.json
"cap_nbt": CompoundTag, // [Optional] || Forge Item Capability NBT -- See CompoundTag.json
}
"string" // [Mandatory] || Mojangson string representation of a Compound Tag -- See https://github.com/aramperes/Mojangson for spec
// Note for objects that use CompoundTag, "nbt": CompoundTag implies -> "nbt": "{Data:0}", not "nbt": { <stuff> }, since this class is a string primitive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment