Jump to content

Not Minecraft-related objects as a mod (Cars, etc.) - MC 1.12.1


Recommended Posts

Posted

Hello Guys,

the reason why I started this topic was my inexperience in Minecraft Modding with Forge...

As everyone wants to savor the best style in programming, I wanted to know how you could start adding for example cars or other non-Minecraft related objects into the game.

At the moment, I'm programming my cars and roads modification, in which I need a little support. I couldn't find anything helpful in other guides as reference on YouTube.

Tutorials or guidelines could help me!

 

Thanks in advance and best regards,

SuprizePlayz

Posted

I don't really know what you mean by "non-Minecraft" because all things in mods are by definition not in vanilla Minecraft.

 

However, I think you mean things that are less commonly modded (and therefore harder for a new modder to find information to help get started). However, honestly things like cars is not a new idea and there is probably lots of mod source examples out there.

 

Anyway, I would suggest that even something like a car can have parallels to other things. For example, I would suggest that a rideable vehicle like a minecart has a lot of similarities and even a rideable animal isn't that much different. in both cases, the key point is that you would use a rideable entity.

 

Once you have a hint on what might be closest thing currently in Minecraft I suggest that you look up tutorials for rideable entities.

 

Also, search for mods that already have vehicles in them and find ones who give links to their source code and review that.

 

Then try to do what you can, and come back here when you're stuck.

 

I have a lot of tutorials about general modding here that may also be useful: http://jabelarminecraft.blogspot.com/

  • Like 1

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

Posted

In case of cars, I think it can be classified as an entity because it's in the world and can move with some restrictions. There are several mods implementing that - the only problem here I could see is the collision issues.

 

On the other hand, do you have genuine custom objects which is close to nonexistent in MC, like stars?

  • Like 1

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted
On 19.9.2017 at 9:07 AM, jabelar said:

I don't really know what you mean by "non-Minecraft" because all things in mods are by definition not in vanilla Minecraft.

 

However, I think you mean things that are less commonly modded (and therefore harder for a new modder to find information to help get started). However, honestly things like cars is not a new idea and there is probably lots of mod source examples out there.

 

Anyway, I would suggest that even something like a car can have parallels to other things. For example, I would suggest that a rideable vehicle like a minecart has a lot of similarities and even a rideable animal isn't that much different. in both cases, the key point is that you would use a rideable entity.

 

Once you have a hint on what might be closest thing currently in Minecraft I suggest that you look up tutorials for rideable entities.

 

Also, search for mods that already have vehicles in them and find ones who give links to their source code and review that.

 

Then try to do what you can, and come back here when you're stuck.

 

I have a lot of tutorials about general modding here that may also be useful: http://jabelarminecraft.blogspot.com/

 

Yes, you're right. I meant the less commonly modded things instead of non-Minecraft things. :D

I also thought of Entity or rideable entities, but i needed a verification of this.

 

Now, I will try to find out more about rideable entities with inventory and will make some updates on this topic.

 

Thanks for helping!

Posted
On 19.9.2017 at 10:56 AM, Abastro said:

In case of cars, I think it can be classified as an entity because it's in the world and can move with some restrictions. There are several mods implementing that - the only problem here I could see is the collision issues.

 

On the other hand, do you have genuine custom objects which is close to nonexistent in MC, like stars?

 

The entity path is clear to me, okay... But the collision means that it will be harder to programm because Minecraft hasn't such a good collision system, right?

 

Err.... I don't think so... o.O

Posted
2 minutes ago, SuprizePlayz said:

 

The entity path is clear to me, okay... But the collision means that it will be harder to programm because Minecraft hasn't such a good collision system, right?

 

Err.... I don't think so... o.O

Anything that moves in Minecraft pretty much has to be an entity.

 

Now I'm not exactly sure what you mean by your worries about the collisions. I think what you mean is that the bounding box for an entity has some constraints which are: it doesn't rotate with the entity, it is square at the bottom.

 

So if you want to get more precise collisions what I usually do is create some invisible "child" entities that move along with main entity and when they collide you write code to affect the main entity with the collision. In other words, you can create multiple collision boxes for an entity using invisible entities that follow along.

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

Posted

You can do what @jabelar said, or afaik you can perform collision checks yourself by having big AABB collision bound containing all the possible bounds and check the real bounds later in the collision method.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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.