MinecraftForge icon indicating copy to clipboard operation
MinecraftForge copied to clipboard

[1.18.x] Changing hardcoded Items.FISHING_ROD to allow for custom fishing rods

Open rehwinkel opened this issue 3 years ago • 7 comments

1.18 port of #8168.

rehwinkel avatar Jan 25 '22 13:01 rehwinkel

Shouldn't these be using forge's instanceof transformer?

pupnewfster avatar Jan 25 '22 14:01 pupnewfster

Alternatively, is this a case that would benefit from tool actions?

Yes I know, repeat of mine and pup's comments from #8168.

KnightMiner avatar Jan 25 '22 17:01 KnightMiner

There are only two relevant patches, one of which is in the renderer hook. I don't think we need to overthink this.

eerussianguy avatar Jan 25 '22 17:01 eerussianguy

Using tool actions instead of instanceof is not about overthinking it, its about flexibility. instanceof means you prevent anyone from benefitting from this patch unless they extend the vanilla class. Is there a case where someone would want this and not be extending the vanilla class?

See also the shears patches, they use the tool action instead of instanceof shears.


The transformer suggested is also not overthinking it. Forge does not want to maintain any patches that are trivial transformers. It is a 3 line "config" file addition, does not need to be a patch.

KnightMiner avatar Jan 25 '22 18:01 KnightMiner

@KnightMiner I implemented it using ToolAction!

rehwinkel avatar Jan 26 '22 12:01 rehwinkel

@rehwinkel looks like this PR unfortunately have some conflicts now. Could you resolve those? :)

GirafiStudios avatar Feb 26 '22 14:02 GirafiStudios

um any news on this ?

mcenderdragon avatar Jun 22 '22 14:06 mcenderdragon

Hello! @rehwinkel, please leave a comment whether you wish to continue this PR. As a similar PR was merged to 1.19.2 recently -- #8681 -- this should conform to the changes in that PR, or an explanation be given on why it should differ in implementation. If we do not hear back from you after some time, this PR will be closed for inactivity.

If anyone else wishes to continue the work of this PR, please create a PR with a link to this PR for reference. Thank you for your contributions. 👋

sciwhiz12 avatar Aug 27 '22 18:08 sciwhiz12

This PR can be closed, I'm not going to be working on this any time soon.

rehwinkel avatar Aug 27 '22 18:08 rehwinkel

Closing for now. Thank you for your contributions!

sciwhiz12 avatar Aug 27 '22 18:08 sciwhiz12