Jump to content

Recommended Posts

Posted

Hello my name is digital dud3,

 

I'm trying to make a magic mod, but I'm completely new to Forge, and I have no idea what I'm doing. I heard from a couple of sources that forge is a great way to code mods into Minecraft. Here is the concept for my mod idea. I hope I can get some pointers from some of you on how to type the code to bring it into the game.

 

The Spell Book: A book that contains all the spells you find. Has to be placed in the off hand slot to be used, and will show up in your left hand.To activate it you need to click your right mouse button, in which a pop-up menu that contains all the spells you learn to show up.

-crafting recipe= 1 book and quill and 1 diamond

 

Scrolls: Contains the spell you need to learn.

 

Spells: Spells require your experience points to cast, and larger more deadly spells require more experience. Spells can be learned via scrolls dropped from witches, found in chest in dungeons/ illiger towers, nether fortresses, and can be traded from librarian type villagers. You will need to click on the spell you want to use in to pop-up menu in your spell book.

 

Spell ideas-

Fire ball- Shoots a fire ball at opponent lighting them on fire. deals 4 1/2 damage - Cost 30 XP

Freezing- Shoots a snowball that slows down opponent. deals 3 damage - Cost 25 XP

Lightning-Shocks opponent, damaging them, will cause mobs to spasm and move in wrong direction for a short period of time. ( the effect wears off in seconds ) deals 4 damage - Cost 25 XP

Healing- Heals target when cast.  heals 5 hearts - Can cause crops to grow faster to the same effect as bone meal - Cost 10 XP (because helping others is good) : )

Poison- Shoots poison projectile at target.  Deals the same effect as a potion of harming - Cost 30 XP

Calm- Calms a mob to become non aggressive. -last 1 minute - Cost 40 XP

Armor- Causes you to gain 3 armor slots even capping over a full set of nertherite or diamond armor- last for 2 minutes - Cost 50 XP

Light Source- places a small torch like block, that generates twice the amount of light a torch does. - last for 5 minutes - Cost 5 XP

Flight- lets you fly. - last 30 seconds - Cost 50 XP

 

Wands: Cast the spells you want, you can upgrade your wand ( by crafting one with better materials) to use experience more efficiently. From Wood-Lapis-(Rubies and Sapphires are = to eachother) -Amethyst-Quartz-Emerald-Diamond.

You can repair a wand via a anvil. ( I plan of adding Gemstones such as ( Rubies, Amethyst, and Sapphires ) for wand types as well, and their ores aswell.  

 

The arcane table: A table that you can place your spell book into one slot, and a scroll into the other. from there the scroll will disappear. Then the spell will appear in your spell book.

-crafting recipe= 3 obsidian places on the bottom 3 tiles, one diamond on the middle left and right tile, one lectern in the center middle tile.  

Posted

Mmmm so you are basically re making ElectroBlob's wizardry...really there are so many magic mods around that you cannot event count them..why not taking a look at their code to see how they implement wands, spells etc...Electroblob's wizardry is an open source mod, so it would be a good place to start gathering informations

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Posted
32 minutes ago, Digital_Dud3 said:

I was thinking about that, were can I find the open source code? 

Just googling Electroblob's wizardry will get you to the github page. Do note however that the source code is for 1.12, so a few things about forge have changed since then.

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

    • logs too big for one pastebin https://pastebin.com/ZjUGHu3u  https://pastebin.com/RqCUZf3X  https://pastebin.com/6ZPS99nD
    • You probably used jd-gui to open it, didn't you? Nothing wrong with that, I also made that mistake, except that Notch was a smart guy and he obfuscated the code. That's why you only see files called "a", "b", "c" and then a file that combines them all. As I said, use RetroMCP to deobfuscate the code so that you will 100% understand it and be able to navigate it.
    • Decompiling minecraft indev, infdev, alpha, beta or whichever legacy version is really easy. I'm not a plug, I just also got interested in modding legacy versions (Infdev to be specific). Use https://github.com/MCPHackers/RetroMCP-Java Once you install their client and the Zulu Architecture that they say they recommend (or use your own Java). I encountered some problems, so I run it with: "java -jar RetroMCP-Java-CLI.jar". You should run it in a seperate folder (not in downloads), otherwise the files and folders will go all over the place. How to use RetroMCP: Type setup (every time you want change version), copy-paste the version number from their list (they support indev), write "decompile" and done! The code will now be deobfuscated and filenames will be normal, instead of "a", "b" and "c"! Hope I helped you, but I don't expect you to reply, as this discussion is 9 years old! What a piece of history!  
    • I know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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