Jump to content

Recommended Posts

Posted

Hi, so I'm new to forge and I'm trying to learn as much as I can, if any of you have suggestions please let me know ;)

 

I have a question about the Thaumcraft shock wand or whatever it's called. So I would like to know how to make those kind of shock charges like in Thaumcraft. If any of you knows something please feel free to post here ;)

If you like minecraft and you LP's and random stuff make sure to subscribe to my channel ;)https://www.youtube.com/KritX01

Posted

You can deobfuscate the Thaumcraft source using BON2 and view it's source using a Java decompiler like JD-Gui.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

If you're just starting learning to mod with Forge, I suggest you start by creating the staff item first. Create a new item, register it, get it a good model and good texture, get the crafting recipe working.

 

Thaumcraft is complicated because there is also "focus", "charging" and levels of the staff to deal with. If you want to implement each of those, then you'd make an instance int field for each and store that in the NBT.

 

After that, then it is a matter of just adding functionality when right-clicked, which would include testing the focus, level and charge, and adding functionality to change focus and recharge (this would simply be an update each tick to increase the value of the charge until it hits its limit).

 

But anyway, start simply -- just create a custom staff. Then you can make it fancy.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

If you're just starting learning to mod with Forge, I suggest you start by creating the staff item first. Create a new item, register it, get it a good model and good texture, get the crafting recipe working.

 

Thaumcraft is complicated because there is also "focus", "charging" and levels of the staff to deal with. If you want to implement each of those, then you'd make an instance int field for each and store that in the NBT.

 

After that, then it is a matter of just adding functionality when right-clicked, which would include testing the focus, level and charge, and adding functionality to change focus and recharge (this would simply be an update each tick to increase the value of the charge until it hits its limit).

 

But anyway, start simply -- just create a custom staff. Then you can make it fancy.

 

I think you missed the point xD I don't want to create a wand, what i really want is to make a block (ore) that has a charging effect and it can electrify you when you try to mine it and I just want the shocking effect from thaumcraft xD

If you like minecraft and you LP's and random stuff make sure to subscribe to my channel ;)https://www.youtube.com/KritX01

Posted

If you're just starting learning to mod with Forge, I suggest you start by creating the staff item first. Create a new item, register it, get it a good model and good texture, get the crafting recipe working.

 

Thaumcraft is complicated because there is also "focus", "charging" and levels of the staff to deal with. If you want to implement each of those, then you'd make an instance int field for each and store that in the NBT.

 

After that, then it is a matter of just adding functionality when right-clicked, which would include testing the focus, level and charge, and adding functionality to change focus and recharge (this would simply be an update each tick to increase the value of the charge until it hits its limit).

 

But anyway, start simply -- just create a custom staff. Then you can make it fancy.

 

I think you missed the point xD I don't want to create a wand, what i really want is to make a block (ore) that has a charging effect and it can electrify you when you try to mine it and I just want the shocking effect from thaumcraft xD

 

Okay, well I'd give the same advice. Start with the basics.

 

Okay, I'll assume you want something like the charging effect from the "node" in Thaumcraft. A node has a certain amount of charge and certain type of "focus" (type of charge). Also, the model / texture are animated. If you want that sort of thing (i.e. the charge can drain and there are different types of charge) then you will need to make it a TileEntity.

 

So go ahead and create the custom block and tile entity, along with the fields you want (charge level, focus type and animation step), make sure those are saved and loaded via NBT, and make sure the tile entity is enabled to tick. You'll also need a field to identity the current target of the charge (i.e. which player it is charging in your case)

 

Then in the update() method of the tile entity you can check for whether a player is close enough, set it as the charge target and start transfering charge.

 

If you want the player itself to accumulate charge (instead of a staff or item that the player is carrying), then you would need to use IExtendedEntityProperties on the player to save the charge level.

 

If you want it to look like a block (rather than floating pulsating energy like in Thaumcraft) then you'd just use the regular block state and block model system. If you want to animate it, just create a block state for the animation and a bunch of madels / textures and cycle through them.

 

If you want to draw things that are more interesting, like the lightning that shoots out or the sphere that protects nodes, then you'll have to use GL code in the rendering events. I have an example of how to render a sphere here (look down the page to the "render a sphere" section: http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-quick-tips-gl11-and.html

 

For a lightning effect, lightning is just a set of small connected lines that are a bit random. So do web search on how to draw a line (or laser, a lot of people ask about lasers and it is similar idea). Then when you want to shoot lightning, you would create a list of coordinates that are a bit random along the line between the player and the ore, and draw lines connecting those up. You can alternatively create textures of lightning and apply those to a long skinny plane between the block and player.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

If you're just starting learning to mod with Forge, I suggest you start by creating the staff item first. Create a new item, register it, get it a good model and good texture, get the crafting recipe working.

 

Thaumcraft is complicated because there is also "focus", "charging" and levels of the staff to deal with. If you want to implement each of those, then you'd make an instance int field for each and store that in the NBT.

 

After that, then it is a matter of just adding functionality when right-clicked, which would include testing the focus, level and charge, and adding functionality to change focus and recharge (this would simply be an update each tick to increase the value of the charge until it hits its limit).

 

But anyway, start simply -- just create a custom staff. Then you can make it fancy.

 

I think you missed the point xD I don't want to create a wand, what i really want is to make a block (ore) that has a charging effect and it can electrify you when you try to mine it and I just want the shocking effect from thaumcraft xD

 

Okay, well I'd give the same advice. Start with the basics.

 

Okay, I'll assume you want something like the charging effect from the "node" in Thaumcraft. A node has a certain amount of charge and certain type of "focus" (type of charge). Also, the model / texture are animated. If you want that sort of thing (i.e. the charge can drain and there are different types of charge) then you will need to make it a TileEntity.

 

So go ahead and create the custom block and tile entity, along with the fields you want (charge level, focus type and animation step), make sure those are saved and loaded via NBT, and make sure the tile entity is enabled to tick. You'll also need a field to identity the current target of the charge (i.e. which player it is charging in your case)

 

Then in the update() method of the tile entity you can check for whether a player is close enough, set it as the charge target and start transfering charge.

 

If you want the player itself to accumulate charge (instead of a staff or item that the player is carrying), then you would need to use IExtendedEntityProperties on the player to save the charge level.

 

If you want it to look like a block (rather than floating pulsating energy like in Thaumcraft) then you'd just use the regular block state and block model system. If you want to animate it, just create a block state for the animation and a bunch of madels / textures and cycle through them.

 

If you want to draw things that are more interesting, like the lightning that shoots out or the sphere that protects nodes, then you'll have to use GL code in the rendering events. I have an example of how to render a sphere here (look down the page to the "render a sphere" section: http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-quick-tips-gl11-and.html

 

For a lightning effect, lightning is just a set of small connected lines that are a bit random. So do web search on how to draw a line (or laser, a lot of people ask about lasers and it is similar idea). Then when you want to shoot lightning, you would create a list of coordinates that are a bit random along the line between the player and the ore, and draw lines connecting those up. You can alternatively create textures of lightning and apply those to a long skinny plane between the block and player.

 

So that mean that I connot extend a block class to create that type of ore? Do I really need to make a TileEntity and give it a block model? Btw thanks for your support!

If you like minecraft and you LP's and random stuff make sure to subscribe to my channel ;)https://www.youtube.com/KritX01

Posted

Yes, you'll have to create a TileEntity and follow jabelar's steps as he mentioned :)

I might be terribly wrong.. Like really, really wrong. But I'm just trying to help.

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



×
×
  • Create New...

Important Information

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