b5c9d38 rework context structure - Machine-Maker
#codebook
1 messages · Page 1 of 1 (latest)
7b3314d add helper methods - Machine-Maker
42b6977 combine 2 util classes - Machine-Maker
ea70422 Map lambda params from their source method - Machine-Maker
[PaperMC/codebook] New branch created: lambda-method-mappings
Various methods on CompoundTag return a type based on a key input which is a string. Very commonly, that string is a constant which is easy to lookup when choosing a name for the local var. The local var should be named based on that string, completely ignoring the expected type.
[PaperMC/codebook] New tag created: v1.0.6
8734b75 update for latest hypo snapshot - Machine-Maker
820c205 Get classes in LvtTypeSuggester up front - DenWav
[PaperMC/codebook] branch deleted: refactor-suggesters
[PaperMC/codebook] branch deleted: context
There are several useful reports that could be generated from a run of codebook.
- Missing parameter mappings
- All locals assigned from methods that don't have a suggester match
- All locals assigned from fields that don't have a suggester match
- Any mapped param that is renamed due to a conflict
[codebook] Branch lambda-method-mappings was force-pushed to `1f10ebe`
Can wait until there's a hypo release
6c15b30 add snapshots repo temporarily - Machine-Maker
[codebook] Branch lambda-method-mappings was force-pushed to `2ad185e`
[PaperMC/codebook] branch deleted: lambda-method-mappings
[PaperMC/codebook] New branch created: report-system
Creates a general injectable system for creating reports that can be generated via the CLI or by using the library directly. Should be helpful for generating separate logs of any important information from any point in codebook without having 1 big log file.
It's possible this should just be done with separate loggers that point to different files, but I like this because it creates a more abstract way on how formatting of various information would look.
2bc1182 logic for logging missing params - Machine-Maker
[PaperMC/codebook] New branch created: missing-param-report
e562658 Fix handling of capitalization in clas types - Owen1212055
[PaperMC/codebook] New branch created: capitalization-fixes
Before:
After:
In general, capital crazy classes will be less aggressive now.
Most notiably, types of UUID will now be uuid rather than uUID
Before:
uUid, aABB, abstractUUIDFix
After:
uuid, aabb, abstractUuidFix
21c24fd restore naming nbt collections by their concret... - Machine-Maker
[PaperMC/codebook] New branch created: fix/nbt-collections
Fixes a regression caused by the migration to the modular suggester system.
[PaperMC/codebook] New branch created: improve-min-max-loops
2381de6 Improve naming for min/max for loops - Machine-Maker
The getMin.../getMax... methods made loop variables named poorly, as it should not include the min or max part in the name since it is being incremented. This detects if a getMin and getMax call are on the same line, which means they are most likely part of a for loop. If there is a better way to detect that, I can change it.
c5fa834 1.0.8: ignore missing random source class - MiniDigger
[PaperMC/codebook] New tag created: v1.0.8
I would instead check if the type class has a generic
cce7c7d make stuff run if we have no reports - MiniDigger
[PaperMC/codebook] branch deleted: report-system
043435a restore naming nbt collections by their concret... - Machine-Maker
[PaperMC/codebook] branch deleted: fix/nbt-collections
2fb576f add tests for and fix some edge cases - MiniDigger
71c74c5 Fix handling of capitalization in class types (... - Owen1212055
[PaperMC/codebook] branch deleted: capitalization-fixes
needs to skip intValue, booleanValue...., plus get
maybe we can even ignore the autoboxing and use the "inner" method? or we special case block state properties

another case for block state properties: boolean booleanValue = hookState.getOptionalValue(ATTACHED).orElse(false);
f21db75 Handle fluent getters for primitive return type... - Machine-Maker
[PaperMC/codebook] branch deleted: fluent-getters
a6f7366 Use local var context with static position methods - Machine-Maker
[PaperMC/codebook] branch deleted: better-positions
8e81698 Improve naming for min/max for loops (#24) - Machine-Maker
[PaperMC/codebook] branch deleted: improve-min-max-loops
Absolutely amazing logic that I totally remember exactly how it works.
f5d3ee0 refactor a bit to separate methods - Machine-Maker
ab06286 skip primitive unboxing - Machine-Maker
[PaperMC/codebook] New branch created: feature/skip-primitive-unboxing
In the future we can skip all CHECKCASTs but atm, that introduces way too much incorrect diff, so more handling should be in place before that.
code and diff looks alright
b96d924 fix format (again) - MiniDigger
[PaperMC/codebook] branch deleted: feature/skip-primitive-unboxing
I feel like all the stuff in lvtnamer should be in a separate class and the work should be skipped if the report isn't enabled
7ebe550 move methods out of LvtNamer - Machine-Maker
29c9add Report for missing method parameter names (#25) - Machine-Maker
[PaperMC/codebook] branch deleted: missing-param-report
738baa6 Unwrap checkcasts for blockstate & loot contexts - Machine-Maker
[PaperMC/codebook] New branch created: feature/check-cast-unwraps
Also centralizing the unwrapping logic in a separate class
2c752cd fix: make param mappings properly optional - MiniDigger
[PaperMC/codebook] New branch created: optional-param-mappings
also makes the report cli param optional
@DenWav idk how much experience you have with this cli stuff, but if I dont add this, I get a weird error about missing args (like its missing (()) )
turned on debug logging for it, said something about making stuff required because its not exclusive and did that, but idk what effect this has, stuff seems to work tho
The codebook jars attached in the GitHub releases are missing their manifest's (they don't run). Cloning the project and using Intellij to build it works fine.
175ea4c fix: make param mappings properly optional (#28) - MiniDigger
[PaperMC/codebook] branch deleted: optional-param-mappings
0c9e5d0 fix: include shadowed cli jar in github release... - MiniDigger
[PaperMC/codebook] New tag created: v1.0.9
For more consistent cross-version comparisons it would be useful for codebook to be able to name parameters similarly to how it names the lvt.
If we don't apply any parameter names, we will get a different mess depending on the version ($$x or snowman emoji names).
And when using parchment, we don't have mappings for every snapshot, so there is a large amount of redundant diff each version from the mappings getting more or less in sync/complete.
Having codebook generate parameter n...
apparently a vineflower issue, will need to be confirmed and opened (and maybe fixed) there
[PaperMC/codebook] New branch created: hypo-config
34fc170 feat: allow configuring hypo-parallelism - MiniDigger
b3c8d79 feat: allow configuring hypo-parallelism (#32) - MiniDigger
[PaperMC/codebook] branch deleted: hypo-config
6dfd8ed chore: prepare for next development cycle - MiniDigger
[PaperMC/codebook] New tag created: v1.0.12
i.e. Tadpole#addAdditionalSaveData, Entity has it as tag, all other sub classes as compound, tadpole itself has none.
its a race whether tag or compound (correct) is used.
it seems like hypo doesn't iterate the hierarchy properly, it looks at all child methods, not only direct childs, so it can't properly stop if it encounters a mapping.
[PaperMC/codebook] branch deleted: asm-bump
[PaperMC/codebook] New tag created: v1.0.13
[PaperMC/codebook] New branch created: build-updates
This was needed for it to compile on my machine with latest JDK 21
[PaperMC/codebook] branch deleted: build-updates
[PaperMC/codebook] New branch created: bugfix/lowercasing
Codebook uses toLowerCase for fully upper-cased type names like UUID.
The call uses the default locale, which might incorrectly map characters
like 'I' to lowercase versions that are not 'i'.
This prevents further patching of the mache sources.
Correctly specify the ROOT locale instead, making the logic independent
from the JVM default locale.
Languages were a mistake.
I assume you checked all other places in codebook?
Yea that is the only usage of String#toLowerCase or String#toUpperCase in the project.
Character#toUpper/Lower has a lot of usages, however that context cannot really do locale.
[PaperMC/codebook] branch deleted: bugfix/lowercasing
[PaperMC/codebook] New branch created: bugfix/gh-action
[PaperMC/codebook] branch deleted: bugfix/gh-action
[PaperMC/codebook] New branch created: bugfix/deploy-updates
[PaperMC/codebook] branch deleted: bugfix/deploy-updates
[PaperMC/codebook] New tag created: v1.0.14
[PaperMC/codebook] New branch created: bugfix/lvt-missing-param-fetching
8b3d72d Correctly source param mappings on missing lvt - lynxplay
Codebook did not correctly respect the difference between parameter and
lvt indexing when sourcing parameter names from mappings on missing lvt
tables.
This caused parameter mappings to appear shifted after long/double
params.
d6217a1 Correctly source param mappings on missing lvt - lynxplay
[PaperMC/codebook] branch deleted: bugfix/lvt-missing-param-fetching
[PaperMC/codebook] New tag created: v1.0.15
[PaperMC/codebook] branch deleted: renovate/configure
bac7cad Update Gradle Wrapper and switch to GradleUp Shado... - jpenilla
[PaperMC/codebook] branch deleted: renovate/asm
815cdf3 chore(deps): update gradle/actions action to v5 - renovate[bot]
[PaperMC/codebook] branch deleted: renovate/gradle-actions-5.x
e3e606c chore(deps): update actions/setup-java action to v... - renovate[bot]
[PaperMC/codebook] branch deleted: renovate/actions-setup-java-5.x
35b6ff2 fix(deps): update dependency com.google.code.gson:... - renovate[bot]
[PaperMC/codebook] branch deleted: renovate/com.google.code.gson-gson-2.x
1a3afd1 fix(deps): update mockito monorepo to v5.20.0 - renovate[bot]
[PaperMC/codebook] branch deleted: renovate/mockito-monorepo
2553657 chore(deps): update actions/checkout action to v5 - renovate[bot]
[PaperMC/codebook] branch deleted: renovate/actions-checkout-5.x
7defd01 fix(deps): update dependency org.checkerframework:... - renovate[bot]
[PaperMC/codebook] branch deleted: renovate/org.checkerframework-checker-qual-3.x
[PaperMC/codebook] New tag created: v1.0.16
[PaperMC/codebook] New branch created: unpick-v3-4
test data:
unpick v3
group long chunk_ticket_type_expiration
net.minecraft.server.level.TicketType.NO_TIMEOUT
group int chunk_ticket_type_flags
@flags
net.minecraft.server.level.TicketType.FLAG_PERSIST
net.minecraft.server.level.TicketType.FLAG_LOADING
net.minecraft.server.level.TicketType.FLAG_SIMULATION
net.minecraft.server.level.TicketType.FLAG_KEEP_DIMENSION_ACTIVE
net.minecraft.server.level.TicketType.FLAG_CAN_EXPIRE_IF_UNLOADED
target_method net.minecraft.server.level.TicketType register (Ljava/lang/String;JI)Lnet/minecraft/server/level/TicketType;
param 1 chunk_ticket_type_expiration
param 2 chunk_ticket_type_flags
target_method net.minecraft.server.level.TicketType <init> (JI)V
param 0 chunk_ticket_type_expiration
param 1 chunk_ticket_type_flags
target_method net.minecraft.server.level.TicketType timeout ()J
return chunk_ticket_type_expiration
target_method net.minecraft.server.level.TicketType flags ()I
return chunk_ticket_type_flags
Index: versio```...
<img width="508" height="168" alt="image" src="https://github.com/user-attachments/assets/8f5b46f4-39a0-455b-acb8-6b8a85ab7449" />
also waiting on yarn PR and unpick releases
[PaperMC/codebook] branch deleted: unpick-v3-4
[PaperMC/codebook] branch deleted: renovate/unpick
[PaperMC/codebook] New tag created: v1.0.17
42cbfdf Emit classes with COMPUTE_MAXS to account for unpi... - jpenilla
[PaperMC/codebook] New tag created: v1.0.18