Jump to content

[1.6.4] BugSnag4MC v1.0.0 - Allowing Modders to Utilize BugSnag


dmillerw

Recommended Posts

dk2PoYI.png

 

BugSnag4MC allows modders to easily utilize the full power of BugSnag with no extra work on their part, other than a few simple method calls. This allows modders to easily keep track of crash reports automatically, so they don't have to rely on the player to supply it.

 

What is BugSnag you ask? Well, I think the devs themselves explain it best.

Bugsnag detects crashes in web and mobile apps, collecting diagnostic information and notifying your dev team over email, sms or chat. You can then use Bugsnag's sophisticated dashboard to find exactly where and how each error happened.

 

Okay, so I'm your average player. What does this mean for me?

On the surface, nothing. All you have to do is include this mod along with whatever mods you choose to play with. If any of those mods have support, those authors will instantly be informed of any crashes you may encounter, without any work on your end. It means less hassle for the Player, less hassle for the mod author, and hopefully less work for everyone involved.

 

Okay, so I'm a modder. What does this mean for me?

BugSnag logs all crashes sent to it, and categorizes them in an easy to read format. It also has automatic submission support for most of the main issue trackers out there, including GitHub issues and JIRA. By implementing this mod you no longer have to rely on users to report crashes, they're instantly stored to your BugSnag account and you're notified in whatever way you choose.

 

Now unfortunately, even if you do use the API supplied, it won't do anything unless the Player has BugSnag4MC installed along with their other mods, but I would highly advise you to recommend it!

 

API Usage:

This section is only useful for modders. If you're just interested in including this mod, skip down to the section marked Download

 

In the download section there is a separate link for the API. I've tried to make this API as simple to use as possible, while still retaining all the features of BugSnap I feel like modders will use. If there's a feature you'd like added specifically, please let me know and I'll accommodate if I can.

 

All functionality of the mod is centered around the ICrashHandler interface. Said interface does have a complete JavaDoc included, so I won't go over it here, I'll just explain the most basic implementation. Included with the API is a class called BasicCrashHandler. Simply making a new instance of this class, supplying it with an ID, API key, and base package, and registering it, will give you all the basic functionality you'll need. If you'd like more, either extend this class or make a new one implementing the appropriate interface.

 

Examples:

4ZFEF.png

By simply doing as listed above, you'll receive this info each time there's a crash relating to your mod. You'll receive the full stacktrace, as well as information relevant to Minecraft (Cause of the crash, the full Mincraft crash log, and the side that crashed).

 

Download:

For modders and Players:

Mod File

For modders:

API

 

If you encounter any issues, report them to my issue tracker here

 

Feel like supporting my work?

width=110 height=23https://www.paypal.com/en_US/i/btn/x-click-but21.gif[/img]

Buy me a miscellaneous beverage of my own choosing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It does but I'm struggling to see how to make it work in my recipe? (Its structure is the same as OP's, with a serializer subclass)
    • That looks pretty cool, nice!   Sure, so looking at that JSON file I posted, I pretty much made a record class for each "custom" data type in that JSON. The Input is a good example of why ``` "inputs": [ { "ingredient": { "item": "relativedimensions:aberrant_shard" }, "count": 8 } ], ``` So here's the inputs, it's an array, which we can use the Codec builder's builder.listOf to define an array. Each Item is of some arbitrary object with keys "ingredient" (which we know is an Ingredient) and a "count" which is an int. You don't have to have an intermediate class to map this to necessarily but I found that it's just easier to see the data that way, hence the 'ParticleReboundIngredient' represents one of these inputs.   Let me know if that makes sense or not. 
    • Pretty much, although all the recipes im planning to make on it are shapeless. The idea is that the chamber uses energy to "fuse" the items in each of the center slots together, in this case an ingot. The two slots at the sides are fuel. (A special kind of wood in this case). Here is an image of the interface just for reference (The center slot is the output)   As for the code- Can you elaborate a little bit on it? Seeing three different record classes has confused me a lot. (Elaborate as in why make them in three different records. I understand the code itself more or less)
    • Hello im trying to make a mod and the past few days GSON has almost killed me, when i export the mod and then launch it through minecraft launcher i get java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement; i have literally tried everything here is my build config   dependencies { minecraft("com.mojang:minecraft:1.8.9") mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9") forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9") compileOnly("cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha+") shadowImpl("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") { isTransitive = false exclude(module = "gson") } shadowImpl("org.spongepowered:mixin:0.7.11-SNAPSHOT") { isTransitive = false exclude(module = "gson") } annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT") shadowImpl("org.javassist:javassist:3.15.0-GA") { isTransitive = false exclude(module = "gson") } shadowImpl("com.neovisionaries:nv-i18n:1.28") { isTransitive = false exclude(module = "gson") } shadowImpl("org.apache.commons:commons-lang3:3.4") { isTransitive = false exclude(module = "gson") } shadowImpl("org.apache.httpcomponents:httpcore:4.4.5") { isTransitive = false exclude(module = "gson") } compileOnly("com.google.code.gson:gson:2.8.6") { isTransitive = false } configurations.all { resolutionStrategy { force("com.google.code.gson:gson:2.8.6") } } shadowImpl(fileTree( mapOf( "dir" to "libs", "include" to listOf("*.jar"), "exclude" to listOf( "asm", "asm-commons", "asm-tree", "gson", "unspecified", "nv-i18n" ) ) )) }  
    • @chxr Looks like you're making some sort of a crafting table / furnace hybrid? Are the inputs needing arranging like a shaped recipe, or is it shapeless? I'll assume it's shapeless since that just adds a lot more complexity. In that case I'd probably do something like this { "type": "relativedimensions:particle_rebound", "inputs": [ { "ingredient": { "item": "relativedimensions:aberrant_shard" }, "count": 8 } ], "fuel": { "tag": "relativedimensions:block/aberrant_fuel" }, "output": { "Count": 1, "id": "relativedimensions:aberrant_ingot" } } inputs: A list of ingredients and how many are needed. The count among each input adds up to 8. Since there's only 1 ingredient, the count is set to 8. fuel: Same thing as before but remove the list and just make it an object with a tag. output: Kept the same.   In this case the Codec I would make is public record ParticleReboundIngredient(Ingredient ingredient, int count) { public static final Codec<ParticleReboundIngredient> CODEC = RecordCodecBuilder.create( builder -> builder.group( Ingredient.CODEC.fieldOf("ingredient").forGetter((i) -> i.ingredient), Codec.INT.fieldOf("count").forGetter(i -> i.count) ).apply(builder, ParticleReboundIngredient::new) ); } public record ParticleReboundFuel(String tag) { public static final Codec<ParticleReboundFuel> CODEC = RecordCodecBuilder.create( builder -> builder.group(Codec.STRING.fieldOf("tag").forGetter(f -> f.tag)).apply(builder, ParticleReboundFuel::new) ); public boolean isFuel(ItemStack stack) { // TODO: Check if fuel item matches the tag } } public record ParticleReboundRecipe(List<ParticleReboundIngredient> inputs, ParticleReboundFuel fuel, ItemStack output) { public static final Codec<ParticleReboundRecipe> CODEC = RecordCodecBuilder.create( builder -> builder.group( ParticleReboundIngredient.CODEC.listOf().fieldOf("inputs").forGetter(r -> r.inputs), ParticleReboundFuel.CODEC.fieldOf("fuel").forGetter(r -> r.fuel), ItemStack.CODEC.fieldOf("output").forGetter(r -> r.output) ).apply(builder, ParticleReboundRecipe::new) ); }   There might be a more proper Codec for the fuel and the tag that's built into minecraft / forge, but I didn't look
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.