I want to create a new block that has all of the functionality of a barrel, but without the villager_job_sites tag (and keep the original barrel as is) .
Is the correct approach to re-implement all of the functionality of the barrel in my new block / item, or is there a simpler approach I can use by extending the existing barrel. If it's possible, the second option seems better to me, since that way if the original barrel's functionality changed in the future, my barrel's implementation wouldn't need to be updated.
#What is the right approach -- Creating a new block that is (almost) identical to an existing block
8 messages · Page 1 of 1 (latest)
Checking into what registers it as a job site, that is done on a Block by block basis in PointOfInterestTypes.java
PointOfInterestTypes.register(registry, FISHERMAN, PointOfInterestTypes.getStatesOfBlock(Blocks.BARREL), 1, 1);```
you should be able to simply create a Block that Extends the Barrel
ok great! thank you!
oh interesting, if I'm understanding correctly, if I created duplicate barrel it, by default, wouldn't be recognized by a fisherman unless I ALSO registered. and I can just not do that second part
although that makes me wonder about other ways the default barrel is being registered (for non villager related things) that I might also want to register my barrel for.
I'm still getting my mind around what happens internal vs external to a block/item class definition