Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useBlockDescriptionPrefix() calls for block items in DR and tests #1597

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

Technici4n
Copy link
Member

Not sure we want to do it there for DR.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@@ -496,7 +496,8 @@ public <I extends Item> DeferredItem<I> register(String name, Supplier<? extends
* @see #registerSimpleBlockItem(Holder)
*/
public DeferredItem<BlockItem> registerSimpleBlockItem(String name, Supplier<? extends Block> block, Item.Properties properties) {
return this.register(name, key -> new BlockItem(block.get(), properties.setId(ResourceKey.create(Registries.ITEM, key))));
// TODO: is this a good idea? It prevents callers from overriding the description key. :(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overload?

@XFactHD
Copy link
Member

XFactHD commented Oct 16, 2024

I think this solution is fine. The method is for simple cases after all. If more control is needed, then the other registerItem() methods provide that while still being reasonably simple.

@Technici4n
Copy link
Member Author

I think this solution is fine. The method is for simple cases after all. If more control is needed, then the other registerItem() methods provide that while still being reasonably simple.

I agree.

@Technici4n Technici4n merged commit 47d4034 into neoforged:port/1.21.2 Oct 16, 2024
1 of 4 checks passed
@Technici4n Technici4n deleted the block-description-prefix branch October 16, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants