Jump to content

Recommended Posts

Posted

Hello Everyone. I am just getting started learning java and the forge api at the same time. I know I need to get better at Java before I can be a good modder. But I learn best when I have a practical project to put my code to test. I have some programming experience in other languages but modding and java is a first for me. So as a educational exercise I created a fake mod that has a road map and everything (road map is WIP)

 

It's currently called "Patina" and ads some weathered looking blocks to the game. But I plan to add some items, and machines as part of my learning process. I thought I would post a link to the source code and solicit your feedback and suggestions on best practices or point out what is a dumb idea, or how we can do things better. In my other programming user groups we call these "pimp my code" sessions. Basically people open up their source code so others can learn from it, or use it as a teaching aid. We find the open discussions make us all better programmers...

 

I don't know how big this modding community is on helping people get better, but I thought I would stick my neck out there and hope it doesn't get bitten off.  :D

 

Source: https://github.com/markaplet/Patina/

Fake Mod Site: https://dl.dropboxusercontent.com/u/693086/patina/index.html

 

Fire Away....

Posted

Thanks for the critique diesieben07. I definitely felt my code could use some refactoring.  I assume that by using metadata I could could pass it all the necessary args like hardness, footstep, unlocalized name etc. Is that correct? Is that what you meant?

 

Thanks for the tip on the language file. I will look at that in more detail. Sounds like a good idea.

Posted

Thanks for the clarification. Let me reply with a scenario. What if two blocks have different hardness levels  or harvest levels. Example. Iron blocks can be mined with a stone pickaxe, but a diamond block requires an iron pickaxe or better. Can this be achieved with metadata? My initial thought is no but I am probably wrong :D

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.