Skip to content

Commit

Permalink
添加Namemap方法(水提交,大概
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuqi154 committed Aug 15, 2024
1 parent eabad32 commit 6219efb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public WhisperGrove(IEventBus modEventBus, ModContainer modContainer)
WGRicipeSerializer.RECIPE_SERIALIZERS.register(modEventBus);
WGBlockEntity.BLOCK_ENTITIES.register(modEventBus);

NeoForge.EVENT_BUS.register(this);
//NeoForge.EVENT_BUS.register(this);


modContainer.registerConfig(ModConfig.Type.COMMON, Config.SPEC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,12 @@ public void rename(List<String> key, String value) {
}
}
}

public NameMap getNameMap(Player player) {
return player.getData(WGAttachment.NAMEMAP);
}

public void setNameMap(Player player) {
player.setData(WGAttachment.NAMEMAP, new NameMap(nameMap()));
}
}

0 comments on commit 6219efb

Please sign in to comment.