Jump to content

Recommended Posts

Posted

Hello everyone,

 

I'm making a mod based on the game "Sniper Elite v2". It would be really nice if I could slow down Minecraft to half-speed whenever I shoot my mods' sniper rifle (to imitate the x-ray killcam in Sniper Elite). Do any of you guys know if this is possible?

 

Thanks for reading!

~Geforce

Potato's have skin. I have skin. Therefore, i am a potato.

 

Follow me on Twitter!

http://www.twitter.com/I_Mod_Minecraft

Posted

Hi

 

In single player I think you could manage this ok, but multiplayer would be a problem unless, when one player scopes a rifle, all other players see the game move at half speed.

 

If you're willing to accept that, then I think you could probably make the game run at half speed if you mess around with

Minecraft.timer; it is set to 20 ticks per second, you could make it 10 instead using a technique called ASM + Reflection.

Likewise for the server side; MinecraftServer.run() there is a value you could change the same way.

 

                        while (j > 50L)
                        {
                            j -= 50L;
                            this.tick();
                        }

 

No guarantee it would work but for single player only it might be fun to try and see...

 

-TGG

 

Posted

Its rahter difficult to do, and would cause issues. Something like that typically has to be built into the engine itself.You could probably simulate it on the client side by intercepting and canceling like 1/2 the entity tick events.

But it'd probably cause sync issues with the server.

I'd be interested in seeing if you find a solution that works without major issues.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.