Antique Atlas

Antique Atlas

32M Downloads

[Suggestion/Request] Expose MarkerAPI to Crafttweaker/Modtweaker?

Targren opened this issue ยท 7 comments

commented

Just a humble request.

For context of what I'd like to do, my thought was to add a ZenScript that would allow players to right-click a block with their Antique Atlas and automatically add a marker (details specified by the script) at their location.

E.g., something like this for mob spawners (incomplete demonstration of concept)

events.onPlayerInteract(function(event as crafttweaker.event.PlayerInteractEvent){     
if (<antiqueatlas:antique_atlas>.matches(event.player.currentItem)) {  
        if ((<minecraft:mob_spawner>.asBlock()) in (event.block)){  
            //Getting world, dimension, atlas IDs etc...  
            //visibleAhead...maybe? Not sure what it does  
            mods.AntiqueAtlas.MarkerAPI.putMarker(worldID, visibleAhead, "skull", spawnerMob + " spawner", event.player.x, event.player.z);  
        }  
    }

I'm not sure it's worthwhile to anyone but me, but I figured it wouldn't hurt to suggest it. Thanks.

commented

Yeah, the idea was inspired by getting tired of creepers sneaking up on me while I was marking Geolosys samples in SevTech. :) I just didn't use it as an example since I was hoping to present a more universal utility. :)

commented

Would definetely lead me to use AA instead of other mapping mods, as I find it more aesthetically pleasing and immersive :D

commented

Expanding that system to allow easily defined markers to be made could lead to some interesting uses :D from marking chests, to ore deposits, to any other resource.

commented
commented

I should mention that there is a marker API. I haven't put up a 1.12.2 release on github yet, but if you want to, you can use this to markers appear at will from outside of the mod. It might be some time until I can get figure out craft tweaker.

Cloning the repository, checking out 1.12.2, and grunt build will get you the sources jar, even if I didn't release it. It's how I made AntiqueAtlasOverlay before it was integrated into the mod.

commented

@Kenkron Yeah, what I was suggesting is a CraftTweaker interface to that API itself, so that ZenScripts could access it. Learning modern Forge modding is on my to-do list, so it's just a question of whether it takes me longer to figure that out than it takes you to figure out CT. ;)

commented