Jump to content

Tinkers Construct like upgrading system


Phyyrus

Recommended Posts

Hey there, i was wondering if anybody could help me making a Tinkers like upgrading system, the mod is gonna add a whole bunch of armor and weapons, what i wanna do is that i have this certain material, i place the material into the swrod and its ginna be +1,  then +2 then +3, after that i want it to require a higher tier material in order to go up to+6and so on and forth until +10

Link to comment
Share on other sites

Small moves.

 

Implement features and test them out one by one. What you are describing is a fairly large-scale mod.

 

First, I suggest trying to just add +1 attack damage to a sword. Or just add a sword, first.

Link to comment
Share on other sites

Ok, but i dont wanna add like 30 materials for every sword, i wanna make it like, if the Weapon Class = dagger then do 4 hearts of damage, i dont wanna add 30 diffrent materials for each weapon class bcause also depending on what type of dagger it i, depends the durabiluty and the damage it does

Link to comment
Share on other sites

Ok, so to start, the first block, in order to create the weapons is gonna be something called a Titanite Blacksmith anvil, it has to be a tile entity, how will i code that, ive search all over the internet and i havent been able to understand them and also i would like to make it a 3-d Model, kinda like the Vanilla Anvil

Link to comment
Share on other sites

My advice would be to research how to create a custom furnace and go from there (changing the GUI, recipes, fuel, whatever you need to change). Once you learn how a furnace works, modifying it to make different machines isn't that difficult.

Link to comment
Share on other sites

You should be calling

registerBlock

somewhere else. In preinit or - I believe I heard this was better - the constructor of your block?

 

It is pretty basic Java knowledge not to write (most) code directly in your class, but write it in methods instead, which are then called.

 

I suggest you start writing a few programs like Hello World, a banking simulator, a number guessing game etc. :)

 

From there, you can move to modding.

 

Or you could just jump into it - expect harsh remarks when your issue is not with your code but your basic understanding of programming, though.

 

Either way, if you run into any Minecraft- or Forge-related issues, we are here to help. If you run into any programming issues in general, you could always throw me a PM and I will have a look at it :)

 

I almost have zero experience working with Minecraft and even less with Forge, but I do consider myself a fairly experienced programmer.

Link to comment
Share on other sites

You are lack of knowlage even in the basics.

I don't know you are actually learnt java or not but you must watch some basic tutorials!

If you not understand the TileEntity tutorial you are probably has to learn java first.

 

Don't do what i did because i never learnt java, but i can still make mods.

After 2 years of modding i understands Minecraft, Forge and Java!

If you learn java first and than modding you probably save 1,5 year!

Link to comment
Share on other sites

Hey, im making the Tile entity, and im getting this texture error in-game

http://prntscr.com/403vsn

 

This is my GitHub, please someone tell me what i did wrong

https://github.com/Phyyrus/Dark-Souls/blob/master/src/main/java/com/phyyrus/ds/TileEntity/TitaniteAnvil.java

^

Thats where my block is beaing coded at

 

And this is the tutorial im following

 

Edit:

The furnace texture is gonna be temporary, i wanna make the tile entity a custom Rendered block

Link to comment
Share on other sites

I will, like to people before me, strongly recommend that you learn java before you start making a mod! If you want to be impatient, then you could hop right in but, again, it will take longer in the long run. Once you have a basic understand of the concepts of OOP, then start by looking at other mods and try to make something (ie a custom furnace like above) that behaves in a different way. Then once you have this firmly grasped move on to the next thing. I can speak in your point of view because I too am just starting out and this is what seems to be working for me!  :)

I am currently learning java, but afterwards have some ideas for a mod that may or may not include some bitcoin aspects!

Link to comment
Share on other sites

I watched it.

 

Do you want a list?

This gave me a good laugh :D I haven't watched the video in question, but I've seen others that were absolute garbage. Sadly, knowledge of Java is not required to make a video tutorial.

 

@OP As many have mentioned, having at least a decent grasp of basic Java (or any other programming language) will help you immensely in your efforts at creating a mod. A site that I find myself going back to again and again is Oracle's own Java site, which not only has all of the Java docs, but also an excellent tutorial series on all the fundamentals that you will need.

 

As for your code, first of all I recommend adding @Override above all your class methods, just to make sure you didn't make any typos in the names and such. Note that this only goes for inherited methods (i.e. ones that are from the vanilla 'Block' class).

 

It looks like your png files are named correctly, so one thing that could be wrong is that Eclipse has not yet recognized the files as existing - this can happen if you copy/paste the files into your folder using Windows Explorer instead of pasting them in using Eclipse. Just to double-check, right-click your assets folder in the Eclipse package explorer and click 'Refresh' to re-scan the directory. This has happened to me lots of times.

Link to comment
Share on other sites

Yes Sure Elyon

 

"I watched it.

 

Do you want a list?"

  • The ModID used is not all lowercase
  • Vanilla code is obviously just being written into
    setDefaultDirection

    (have a look at BlockFurnace.java), with no thought or critical thinking. While being inspired by vanilla code is acceptable, you must keep in mind that vanilla code is not always perfect and can often times be written more concise or performant

  • byte b0

    in

    setDefaultDirection

    is the metadata, but the person talking in the video seems oblivious to this and just copies the code from BlockFurnace.java verbatim, save for variable names

  • The person talking in the video seems to have little to no idea the reason for what they are actually doing most of the time, and as such doesn't explain it, either
  • Vanilla code is also being copied into
    onBlockPlacedBy

    . This code in particular also suffers from terrible redundancies, but the person talking in the video probably has no idea about this, either

  • If you're going to outright copy so much from the vanilla furnace anyway, you might as well
    extend BlockFurnace

    and just override the methods that differ

This list is not exhaustive. I had a look at the next video in the series, and the quality of the code as well as the educational content does not improve.

Link to comment
Share on other sites

^^^ Great stuff, there xD Pretty amazing for someone 'not too familiar' with Minecraft modding and Forge!

 

@OP - don't take it personally that the tutorial you happened to watch has things wrong with it; it is certainly no reflection upon your character, but rather should spur you on to become more proficient in Java so you can select which tutorials to watch with a more discerning eye.

 

At any rate, you have two methods that can affect the facing of your block: onBlockAdded, which you have call setDefaultDirection and I'm pretty sure is called every time a block is added to the world, and onBlockPlacedBy, in which you also set a direction, but which is only called when the player places a block.

 

Now I can't remember in which order these are called, i.e. placed by player first or block added first, but that is where you should start your debugging. The fact that you still have a missing texture is concerning as well.

Link to comment
Share on other sites

What should i do then? To fix all of this,

And BTW, this is the GUI im gonna use for my anvil

and it wont exactly consume the hammer, what u want to to do is to take durability/time depending on what weapon your making

The more complex the weapon the longer it will take and the more durability it will take

 

5c7d7383f0.png

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



×
×
  • Create New...

Important Information

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