Silicate
Silicate (or "silly predicates") is a library that provides powerful client-server-agnostic predicates with a simple API.
Important
This library is new; use it with caution. The API may change frequently, and not all features have been implemented. Check the issue tracker for updates.
Usage
Add this to your build.gradle(.kts)
repositories {
exclusiveContent {
forRepositories(
maven("https://maven.greenhouse.lgbt/releases") {
name = "Greenhouse"
}
)
filter { includeGroup("lgbt.greenhouse.silicate") }
}
}
dependencies {
// If using multiloader, use each platform as below for silicate in their respective modules
compileOnly("net.modgarden.silicate:silicate-xplat:VERSION")
runtimeOnly("net.modgarden.silicate:silicate-PLATFORM:VERSION")
// If using multiloader, put this in your "common" module
// compileOnly("net.modgarden.silicate:silicate-xplat:VERSION")
}
Goal
The goal of Silicate is to complete a context-aware predicate system on par with Minecraft's Loot Context-aware predicates. Available for Fabric and NeoForge, Silicate provides a common API for interfacing advanced predicates between mods, across platforms. Silicate achieves this by implementing a clean-slate predicate architecture, initially independent of Minecraft.
Features
Silicate provides out-of-the-box Codec and datapack support, enabling developers and modpack designers to more easily implement and configure desired behavior. Silicate also comes with built-in predicates for Minecraft's various game interactions, easing the amount of boilerplate necessary.
Contributing
Before you contribute, please read about Conventional Commits. This repository uses Conventional Commits for all commit messages, and any non-conforming commit messages will be converted.
How to Install Silicate (Mod)
Silicate by Sylv is verified for Fabric, Neoforge across Minecraft versions 1.21.1, 1.21.10, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.8 (latest release: 1.0.0-beta.1+1.21.10-fabric, file size: 378 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21.1, 1.21.10, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.8) and platform (Fabric, Neoforge).
- Make sure you have the compatible loader or environment installed for Fabric, Neoforge.
- Move the downloaded Silicate file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 |
1.0.0-beta.1 will not have a changelog because I'm lazy lol.[//]: # (## Breaking Changes)
[//]: # (- Everything. The entire system has been replaced by the new one.)
[//]: # (- "Conditions" are now Predicates, and "Condition Templates" are now Conditions.)
[//]: # (- You must (should) now use the
PredicateCodecBuilder and GamePredicate.Type system when defining new Predicates.)silicate:entity_vehiclemust now use thesilicate:vehicle_entityparam type to reference the vehicle entity, with other fields remaining the exact same.silicate:entity_passengermust now use thesilicate:passenger_entityparam type to reference the passenger entity, with other fields remaining the exact same.silicate:entity_tame_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.silicate:entity_projectile_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.- The ContextParamType codec will now return a data error if not present within the registry, or if the class of the registered param type is unable to be casted to the specified class. On a success, this will return the original context param type if it is an exact match in class, otherwise, this will create a new param type if the resulting class can be cast to the specified class.
## Added
- Ported to 1.21.5.
## Fixed
- Fixed
entity_vehicle,entity_passenger,entity_tame_owner,entity_projectile_ownerconditions overriding the original field with the target entity within their inner conditions' context. - Fixed issues with registering custom game conditions on NeoForge.
- Fixed ContextParamType codec creating entirely new param types without checking if a param type of the sort exists already.
- Fixed ContextParamType codec's entirely new param types not being equal to any param type in the case of casted classes.
silicate:entity_vehiclemust now use thesilicate:vehicle_entityparam type to reference the vehicle entity, with other fields remaining the exact same.silicate:entity_passengermust now use thesilicate:passenger_entityparam type to reference the passenger entity, with other fields remaining the exact same.silicate:entity_tame_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.silicate:entity_projectile_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.- The ContextParamType codec will now return a data error if not present within the registry, or if the class of the registered param type is unable to be casted to the specified class. On a success, this will return the original context param type if it is an exact match in class, otherwise, this will create a new param type if the resulting class can be cast to the specified class.
## Added
- Ported to 1.21.5.
## Fixed
- Fixed
entity_vehicle,entity_passenger,entity_tame_owner,entity_projectile_ownerconditions overriding the original field with the target entity within their inner conditions' context. - Fixed issues with registering custom game conditions on NeoForge.
- Fixed ContextParamType codec creating entirely new param types without checking if a param type of the sort exists already.
- Fixed ContextParamType codec's entirely new param types not being equal to any param type in the case of casted classes.
silicate:entity_vehiclemust now use thesilicate:vehicle_entityparam type to reference the vehicle entity, with other fields remaining the exact same.silicate:entity_passengermust now use thesilicate:passenger_entityparam type to reference the passenger entity, with other fields remaining the exact same.silicate:entity_tame_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.silicate:entity_projectile_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.- The ContextParamType codec will now return a data error if not present within the registry, or if the class of the registered param type is unable to be casted to the specified class. On a success, this will return the original context param type if it is an exact match in class, otherwise, this will create a new param type if the resulting class can be cast to the specified class.
## Added
- Ported to 1.21.5.
## Fixed
- Fixed
entity_vehicle,entity_passenger,entity_tame_owner,entity_projectile_ownerconditions overriding the original field with the target entity within their inner conditions' context. - Fixed issues with registering custom game conditions on NeoForge.
- Fixed ContextParamType codec creating entirely new param types without checking if a param type of the sort exists already.
- Fixed ContextParamType codec's entirely new param types not being equal to any param type in the case of casted classes.
silicate:entity_vehiclemust now use thesilicate:vehicle_entityparam type to reference the vehicle entity, with other fields remaining the exact same.silicate:entity_passengermust now use thesilicate:passenger_entityparam type to reference the passenger entity, with other fields remaining the exact same.silicate:entity_tame_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.silicate:entity_projectile_ownermust now use thesilicate:owner_entityparam type to reference the owner entity, with other fields remaining the exact same.- The ContextParamType codec will now return a data error if not present within the registry, or if the class of the registered param type is unable to be casted to the specified class. On a success, this will return the original context param type if it is an exact match in class, otherwise, this will create a new param type if the resulting class can be cast to the specified class.
## Added
- Ported to 1.21.5.
## Fixed
- Fixed
entity_vehicle,entity_passenger,entity_tame_owner,entity_projectile_ownerconditions overriding the original field with the target entity within their inner conditions' context. - Fixed issues with registering custom game conditions on NeoForge.
- Fixed ContextParamType codec creating entirely new param types without checking if a param type of the sort exists already.
- Fixed ContextParamType codec's entirely new param types not being equal to any param type in the case of casted classes.
- tweak: add
GameCondition#getTemplatefor ease of access to condition templates
## Fixed
- fix(GameTest): add fake player to player list
- tweak: add
GameCondition#getTemplatefor ease of access to condition templates
## Fixed
- fix(GameTest): add fake player to player list
- tweak: add
GameCondition#getTemplatefor ease of access to condition templates
## Fixed
- fix(GameTest): add fake player to player list
- tweak: add
GameCondition#getTemplatefor ease of access to condition templates
## Fixed
- fix(GameTest): add fake player to player list
- Fixed a ClassCastException within TypedGameCondition.
- Fixed a ClassCastException within TypedGameCondition.
- Swapped ConditionTemplate out for Holders.
## Fixed
- Fixed GameConditions being unable to be sent from the server to clients.
- Swapped ConditionTemplate out for Holders.
## Fixed
- Fixed GameConditions being unable to be sent from the server to clients.
EntityProjectileOwnerCondition- Checks the owner of a projectile entity/TraceableEntity(mojmap).EntityTameOwnerCondition- Checks the owner of a tamed entity/OwnableEntity(mojmap).
EntityProjectileOwnerCondition- Checks the owner of a projectile entity/TraceableEntity(mojmap).EntityTameOwnerCondition- Checks the owner of a tamed entity/OwnableEntity(mojmap).