Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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.

Posted

You need to create a class for your block, and declare it like this

 

 

public static Block objectName = new className(Material.rock);

 

and in your block class make it extend Block

Posted

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.

Posted

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!

Posted

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

Posted

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!

Posted

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.

Posted

Yes, i did, refresh and the files are in the assets package in INtelliJ, another thing to mention is the the front texture always points the opposite direction of an adjacent block

 

This is what i mean

df8ef86860.jpg

Posted
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.

Posted

^^^ 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.

Posted

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

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

    • Reach Out To Rapid Digital: What sapp Info: +1 41 4 80 7 14 85 Email INFO: rap iddi gita lrecov ery @ exe cs. com Hello, my name is Jayson, and I’m 35 years old from the United Kingdom. My family and I recently endured an incredibly challenging experience that I wouldn’t wish on anyone. We became victims of a cryptocurrency investment fraud scheme that saw us lose a staggering $807,000 in USDT and Bitcoins. The fraudsters had created a convincing facade, and we were lured into investing, only to discover later that the platform was a complete scam. We were left devastated, not just financially, but emotionally, as we had trusted these people and believed in the legitimacy of the investment. After the initial shock wore off, we desperately searched for ways to recover the lost funds. It seemed like an impossible task, and we felt as though there was no hope. That’s when, by sheer luck, we stumbled across a post about Rapid Digital Recovery, a cryptocurrency and funds recovery organization with a proven track record in cybersecurity and fraud recovery. We decided to reach out to them, and from the first interaction, we were impressed with their professionalism and transparency. They explained the recovery process in detail and reassured us that they had the skills and expertise to track down the perpetrators and recover our funds. This gave us a renewed sense of hope, something we hadn’t felt in months. What truly stood out during our experience with Rapid Digital Recovery was their dedication to the recovery process. The team went above and beyond, using sophisticated tracking tools and cyber forensics to gather critical information. Within a matter of weeks, they had successfully located the funds and traced the scam back to the fraudsters responsible. They worked with the authorities to ensure the criminals were held accountable for their actions. To our relief, the team at Rapid Digital Recovery was able to recover every single penny we had lost. The funds were returned in full, and the sense of closure we felt was invaluable. We couldn’t have imagined such a positive outcome in the early stages of our recovery journey, and we are deeply grateful for the work they did. If you ever find yourself in a similar situation, I highly recommend contacting Rapid Digital Recovery. Their expertise, transparency, and dedication to their clients make them the go-to choice for anyone seeking to recover lost cryptocurrency or funds. They truly gave us back our financial future.  
    • This is my first time modding anything, so maybe just skill issue. I'm using Forge 54.0.12 and Temurin 21.0.5+11-LTS I wanted to create a custom keybind and to check whether it works I'd like to send a chat message. I tried using Minecraft.getInstance().player.sendSystemMessage(Component.literal("test")); but IntelliJ couldnt resolve sendSystemMessage(...). Since I saw people using it in earlier versions, I tried the same thing with 1.20.6(- 50.1.0), where it works fine, now I can't figure out if this is intentional and whether there are other options for sending chat messages. On that note, is there more documentation than https://docs.minecraftforge.net/en/1.21.x/? It seems very incomplete compared to something like the Oracle Java docs
    • Hi, i'm having this error and I wanna fix it. we try: -Reload drivers -Eliminate .minecraft -Eliminate Java -Restart launcher -Verify if minecraft is using gpu -Mods  in .minecraft is empty -Install the latest and recomended version of forge idk what i have to do, help me pls. the lastest log is: https://mclo.gs/WAMao8x  
    • Read the FAQ, Rule #2. (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/)  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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