Antique Atlas

Antique Atlas

32M Downloads

Some StitchTo methods in TextureSet are private

esotericist opened this issue ยท 6 comments

commented

in TextureSet.java not all of the methods are public.

This particular means when using the API to create custom tiles, you can't have unilateral stitching, only mutual, nor can you have stitching that is only vertical or horizontal.

commented

Available since 6.0.0, the resource pack based method of defining texture sets makes this obsolete.

commented

Further note: it'd be nice if the API directly offered a way to query the tile at a location. I was able to do it by directly accessing "ExtTileIdMap", but it'd be nice to not have to do invasive things to mods that have an API. :)

commented

It'd also be nice to be able to make use of the "isTile" property for custom markers from a mod, assuming that functionality works correctly. I can see that setIsTile() is a public function, but it isn't at all clear how you go about having a MarkerType instance. Is there a way to register markers explicitly, to have those properties accessible? The API docs just say to make a TextureSet for custom markers, which doesn't seem helpful for this.

commented

I made all useful methods of TextureSet public, and added API method to register custom TextureSet.

Also regarding MarkerTypes, you should be able to create an instance manually, and then register it via MarkerAPI.

commented

Thanks for the suggestions!
And sorry for the super late comment. The API probably needs an overhaul. At the moment though, do you think it will be enough to make all the methods in TextureSet public?

commented

Ok I'm slowly remembering how this mod works :)
For a use case like yours, when you want to have custom stitching, what do you think we make an API method like this:

void registerTextureSet (TextureSet customSet)

You can subclass TextureSet and put any custom stitching logic inside.