GithubHelp home page GithubHelp logo

object-object / emptyhexcastingaddon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from talia-12/emptyhexcastingaddon

0.0 0.0 0.0 2.95 MB

An empty project that you can use to start your very own Hex Casting Addon!

License: MIT License

Java 67.84% Kotlin 32.16%

emptyhexcastingaddon's Introduction

Empty Hex Casting Addon Framework

This is a stripped-down template for 1.92.2 Fabric+Forge Hex Casting addons. It's heavily derived (aka, taken wholesale) from HexCasting's excellent project layout, and was created by stripping everything from Hexal's repository that wasn't relevant.

This has all the dependencies necessary for functioning as an addon, as well as the dependencies and code for a config system that will work for both forge and fabric. There is an example Action, and an example Spell, and you can look at the existing HexCasting or Hexal code to see how actual Actions and Spells are written.

The approach here does not actually avoid the various complexities of cross-modloader programming. You still need to very carefully maintain functions that are distinct between the two environments. It's just a very well-designed approach for separating these fields, without having to duplicate a lot of work.

There will be some follow-up work to turn it from a generic "Hello World" mod into your Generic "Hello World" mod. Some keywords to look at:

yourmod.name.here is the default package name. While valid for test purposes, you will need to change this before release (and ideally immediately after forking) or risk (near-certain) collisions and annoying bugs, and it's easier the earlier you change it. IntelliJ (and most other IDEAs) will allow bulk refactoring, though expect to need to change a few package settings at the top of files.

See this page for information about package naming rules, particularly don't use a popular TLD that you don't actually own or control.

yourmod is the default modID. AFTER you've refactored your package name, this is the next thing to change. It's only referenced in a few places, but other mods, compile-time behavior (both Forge and Fabric) and maven will interact with it heavily.

See this page for some naming conventions specific to this ID.

After you've made these changes, it's safe to leave YourAPI and YourConfig as their current names, but do feel free to rename them; something specific to your modId or your package will make regularly importing them less obnoxious.

Your Mod is the default mod name. This is more for aesthetics than code relevance, but it does show up in a good few places and it's kinda embarrassing if it's left at default.

Check your mods.toml (for Forge) and fabric.mod.json (for Fabric) regarding other mod-specific settings, such as author, icon, dependencies you want presented to the user, so on. There's a lot I'm not going to summarize here.

Actually Running:

Once you've made those updates, you'll need to reload Gradle. Do it a couple of times, for safety's sake.

The automatically generated Run configurations won't work. Sorry. You'll need to use Gradle->Fabric>Tasks->Fabric->run* or Gradle->Forge->Tasks->forgegradle runs->run*. There's probably a way to fix this, but good luck.

emptyhexcastingaddon's People

Contributors

talia-12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.