feat/1.0 #19
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Port
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Modding/silicate!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/1.0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the Pull Request for the official 1.0 release of Silicate. The API has been completely overhauled along with many terms used in previous versions of Silicate.
The new terminology is as follows:
Predicatefunctional interface.Value Types
A
ValueTypeis a representation of aClass<T>object and (optionally) aCodec<T>. This is used when defining predicates and adds distinction between parameters and types.DynamicValueA value whose type is resolved at test-time.
DeferredA value with a static
ValueTypethat is resolved at test-time. This can also be called a 'Deferred Value', butDeferredis how it's referenced in code for brevity.typefield ->predicateGameCondition->GamePredicatea4d3796a1eContextParam->Parameter936cf2b799GlobalParameterType->GlobalParameterKeye1e158dc10ValueType<T>f2a12bebbdValueTypeandPredicateCodecBuildersystem ee544630e6GamePredicate.TypeandPredicateCodecBuildersystem 43a3ed291f@ -34,2 +34,4 @@annotationProcessor("io.github.llamalad7:mixinextras-common:${Versions.MIXIN_EXTRAS}")compileOnly("net.fabricmc:sponge-mixin:${Versions.FABRIC_MIXIN}")implementation("dev.lukebemish:codecextras:${Versions.CODEC_EXTRAS}")btw this dependency is version-agnostic, so we don't have to worry about it.
for future sylv: something I forgot is figuring out how to set
Holder's default namespace tosilicate. make sure that happens before 1.0 please, or reconsider doing that at all.PredicateCodecBuilder#withField->#withParameterd67804ca15MaybeTypedPredicate. L BOZO, REST IN PISS 68f73d7a51TypedGamePredicate19fdf98c9bI have an idea: we can replace the
minecraftnamespace withsilicatewhen convenient. It is slightly hacky, but it makes sense. Minecraft does not and will never define its own predicates or parameters.Mixin_MinecraftServer9d991ff289silicate15f3a0d3c5player->entity71d256c6ddParameterKey->Parameterresolution inParameterKey#Reference42ac47837cGlobalParameterKey->ParameterKey¶meterKey-> more descriptive baa83b60a2GlobalParameterKey3c0eaa930fParameterKey#CODEC-Codec<ParameterKey.Reference<?>>->Codec<ParameterKey<?>>5e83562014paramType->parameterKeyc87a1f1459GlobalParameterKey->ParameterKeybb13fd392blgbt.greenhouse.silicate.context.param->lgbt.greenhouse.silicate.context.parameter988bf83c02GlobalParameterKey#validateParamType618660f110ParameterSetonly applies to new contexts ae7a49233fGlobalParameterKeys are in theParameterSetae220513bfLocalParameterKey#toStringimplementation 66dfaea283ValueType#toStringimplementation f884b1de42ValueType#toStringresult to `ParameterKey#toStringimplementations 022a66e8fblocationtoid0438ed0f23ParameterKeyimplementations to classes 8715c6e839ParameterKey#scope->#getScope1e1f464a13context_param_type->global_parameter_keyecd74c51cdlgbt.greenhouse.silicate.implpackage 3246a63158SilicateTestValueTypes#registerto newValueType#<init>parameters 1bb5f2b63eimplementationCodecExtras 462a56c115SilicateValueTypes#fromHolderSet, cast toHolderSet<T>f7fc38cc73BaseCodec#andThen): don't be a dumbass and fucking castFunction.super.andThen(child)toBaseCodec<T>, just returnFunction.super.andThen(child)::applyae5f52eb4dSilicateValueTypesf9610129a2SilicateintoSilicateConstants+ removeSilicate#LOG6ca6d51a22Holder.classto genericClass<T>inSilicateValueTypes#fromHolderusingClazzy#cast64e7208d64SilicatePrimitivesactually primitive 6e273eaf81ParameterKeytoFieldEntry's inPredicateCodecBuilderea89de8572api/implsplit & fix dependent modules 417460243csilicate.api->lgbt.greenhouse.silicatef504656c38:common20773a806aexports to03df1d8ef6:commontest output to runtime classpath 672fddc7ca1.0.0-alpha.18069ba11cacommon->xplatabcf267b0ccommon->xplat" c6e67dd244javacarguments 501becfd2a--module-pathnot--update-module-path325e6c2a10Almost done! Just need a few more changes now.
@NonnullByDefaultannotation c5dcdfede2UnsafeUtil, just in case (port to cursed-fabric-hacks later) aa2c46bb8eDefinePredicate& Dynamically Typed Values d76c427acfcondition.std9e328c4c52DynamicValue& no more mixin hacks f2fa63a1c8entity_types->entity_typeinEntityTypePredicate7a924e1c71ValueDispatchede2897865a3SilicateValueTypes#ANYto typeValueType<DynamicValue>35bc94deefPredicatesTestInstancefieldconditionswaspredicates9d50b71ff8context_param->parameter_key&context_param_map->parameter_map662d948908ParameterTemplatecodec 89091f6fefParameterTemplatein its codec eedb7fd20aMethodHandle#invokeWithArgumentsinstead of#invokeExactwhen passingObject[]of fields gathered from Predicate Codec 86ead1db40PredicateCodecBuilder#build(MethodHandle)6c5a21741bOptional96792fa5efBlockEntityTypePredicatetest 16f43fba40DefinePredicate9b50c3fab69b50c3fab6tof7dc18f3011.0.0-beta.1fa5de005dcDeferred<T>for all values in predicates soParameterTemplates can be used in place of values 0d8cc0d12dParameterMap.Mutable75c1c33360getParam->getParameter751a100c79ParameterMap.MutableinParameterMapTestInstance136fa9f072IsTypePredicate(is_type) 5c25a2d197beta28d7a3eca3api.condition->api.predicate694e69826aPredicateCodecBuilder#validateSignature7df60135ebWIP: feat/1.0to feat/1.0oops, we need to remove Test NeoForge
@ -19,2 +19,4 @@const val FORGEJO_REPO = "Modding/silicate"const val FORGEJO_COMITISH = Versions.MINECRAFTval JAVAC_ARGS = listOf<String>(wat
PredicateCodecBuilder#withReferenceParameterMapVec3Condition->Vec3Predicateadd41dca5aParameterSetfor simplicity's sakeInvalidParameterException126c9eb11bParameterMap&GameContext38ed009732predicate.builtin.IsTypePredicate->predicate.std.IsTypePredicate702c44354fpredicate.builtin->predicate.minecraft5ecddae99arequires com.ibm.icu99642100d1predicate.builtinskipLocalJars = trueskipLocalJarscommon un-cached CI fail
cope
skill issue
entity_type->entity_is_type,entity_passenger->entity_has_passenger, etc. f4d2d85d2fBlockStatePredicatein favor ofEqualsPredicateEntityTypePredicate->EntityIsTypePredicatepushTestPopthat immediate returns are also okayprintlnskipLocalJarsin all buildscriptsxplatformodCompileOnlypublishGithub->publishForgejoView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.