Jump to content

[1.11.2] Modifying Vanilla Minecart behavior


Recommended Posts

Summary: I want to change the behavior of a vanilla entity. I can think of several possible methods, but some seem better than others. Due to not being versed in (Forge) modding, I'd like to find out what the best way (in or out of the list of things I've found) to do what I'm looking to do.


Background: Remember the OldDays mod? Yeah, that one, the one that reintroduced old bugs/behaviors into newer versions of Minecraft. I got a hankering recently for the old minecart mechanics we had before booster rails, but didn't want to boot up such an old version (either one that had the bug, or one that OldDays was compatible with). It really wasn't that difficult to re-create w/ MCP and the source code of the original mod, but I figure that I'd better use forge if I ever want to go anywhere with this. (Spoiler warning, I probably won't, but that doesn't stop me from trying to find the proper way to do things.)


Ways I can think of to do this in forge:

  • Hooking Minecart collision/update events and overriding default behavior there. (note, I haven't looked at an up-to-date list of events)
    • This wouldn't be portable to any changes besides minecart changes, for instance, if I wanted to reintroduce a form of piston block duplication.
  • Hooking a placement event and placing my extended version instead of the vanilla version.
  • Just create a seperate item that extends the vanilla minecart and makes the behavior change. Possiby replace crafting recipe?
    • This allows for some items to be the vanilla version and some items to be the modified version. Interesting for experiments. More fine-grained.
  • Create a coremod.


I think I might actually go with the completely seperate item approach for fine-grained experimentation purposes. Would allow for directly comparing these 'old' minecarts with 'new' minecarts. Essentially a per-minecart 'new or old' setting.


Am I thinking about this all wrong?

Link to comment
Share on other sites

You've got the right idea about the different possible approaches available - the choice of which to use is up to you, and the precise details of what you want to do.


I'm working on a mod which changes a lot of vanilla behaviour and I've done a lot of creating new separate versions of things to replace the vanilla versions. It's good for enabling complete control over features, but the downside is the potential for compatibility issues - what happens if someone uses the vanilla version instead? In my case I've mostly made vanilla features unavailable in survival (by removing recipes etc), which is neat but comes with more of its own downsides too. But it sounds like you're already thinking about that, and access to the vanilla version won't necessarily be a problem for your case so it sounds like a good option.

Edited by Jay Avery
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.

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.

  • Create New...

Important Information

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