Jump to content

[1.10] A few tick rate questions


Asweez

Recommended Posts

So I am doing a mod where I am playing with different tick rates using TickrateChanger API, and I have a few questions.

 

Is it possible to change the tickspeed of the entities in an area? I don't really care about the blocks updating, just the entities. The only way I have found to do it is to modify the server tick rate, but that is the entire server, not just the specified area.

 

How come all of the mobs (Sheep, skeleton, etc) are affected by the tick rate changes, but arrows aren't? They move at normal speed no matter what the server tick rate is.

 

Is there anyway to slow down the attack speed of the player? I know there is a way to do this, I am just really spacing it right now.

 

Thanks in advance

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Link to comment
Share on other sites

I think the forge way of doing entity update cancelation/management would be to use the event canUpdate for all entites deciding if they can update. For only living entities yse LivingUpdateEvent and if they are not supposed to update cancel it.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

The CanUpdate event doesn't seem to work; Whenever I cancel an entity (using

event.setCanUpdate(false);

) nothing changes.

 

EDIT: Looked at the code for that event, it is only called when the entity CAN'T update, so trying to change it from CAN update to CAN'T update won't work because the even is never called while the entity can update;

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Link to comment
Share on other sites

Thanks for the reply!

 

Where would I do that?

https://github.com/MinecraftForge/MinecraftForge

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Prepare for a tedious journey of writing and rewriting.

A few tips for when you're editing vanilla code:

Don't touch the vanilla lines at all if you can avoid it.  That includes blank lines.  Don't turn a blank line into anything, just insert stuff above/below it.

Always make your call a call to ForgeHooks, "its shorter."  Always use fully qualified names (no imports).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Thanks for the tips!

 

I've tried to figure it out using a core mod tutorial, and I'm having some trouble. How do I find the line of byte code that I want to edit/remove? In the tutorial it uses opcodes of the functions, but I'm not sure how to find those. Here is the tutorial: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571568-tutorial-1-6-2-changing-vanilla-without-editing

 

Also, could you clarify want you meant by making my call a call to ForgeHooks?

 

Thanks

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Link to comment
Share on other sites

Thanks for the tips!

 

I've tried to figure it out using a core mod tutorial, and I'm having some trouble. How do I find the line of byte code that I want to edit/remove? In the tutorial it uses opcodes of the functions, but I'm not sure how to find those. Here is the tutorial: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571568-tutorial-1-6-2-changing-vanilla-without-editing

 

Also, could you clarify want you meant by making my call a call to ForgeHooks?

 

Thanks

This is not what we reccomended, making coremods is not supported by forge.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I'm following Draco18s's comment. He is talking about editing vanilla classes, which is a core mod

No he was saying you edit base classes then submit the change to forge ie you actually go into a .java file and edit the code to call an event. Hence the ForgeHooks call he was talking about. NEVER a coremod

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.