Skip to content

Commit

Permalink
Suppress some warnings from name proposal (#3926)
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 authored Aug 16, 2024
1 parent 09cef53 commit e0d1d73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootst

for (int i = 2; i < bootstrapMethodArguments.length; i++) {
if (bootstrapMethodArguments[i] instanceof Handle handle) {
if (!handle.getName().startsWith("comp_")) {
// Valid record bytecode, but doesn't have an intermediary name, making it impossible to match up with the record field or method
continue;
}

if (handle.getTag() == Opcodes.H_GETFIELD && handle.getOwner().equals(recordClassName)) {
var argName = names[i - 2];
put(recordNames, handle.getName(), argName);
Expand Down
1 change: 0 additions & 1 deletion mappings/net/minecraft/component/type/BookContent.mapping
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CLASS net/minecraft/class_9364 net/minecraft/component/type/BookContent
METHOD comp_2422 pages ()Ljava/util/List;
METHOD method_58186 withPages (Ljava/util/List;)Ljava/lang/Object;
ARG 1 pages
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CLASS net/minecraft/class_9302 net/minecraft/component/type/WrittenBookContentComponent
FIELD comp_2422 pages Ljava/util/List;
FIELD field_49375 MAX_SERIALIZED_PAGE_LENGTH I
FIELD field_49378 MAX_TITLE_LENGTH I
FIELD field_49379 MAX_GENERATION I
Expand Down

0 comments on commit e0d1d73

Please sign in to comment.