Hello everyone, I'm televis10n, and this is my first mod in Minecraft. Actually, my first time using java to program as well.
Dynamic third person is very simple. When you go inside, your perspective switches to first person view. When you go back outside, the view changes into third person mode.
The transition is actually very seamless.
Behind the Code
Starting Out
It took me maybe 2 hours to find out and create a base version of this. All I did was add a if else to the onLivingUpdate to the player checking the same way that the debug screen checks 'sl'
Personally, I don't like having to do this every update to the player, but I could not figure out in my night long session how to put an event on player movement. Transitioning from base code editing to ModLoader to Minecraft Forge didn't quicken the process either. In ModLoader, I made a simple mod_*** that put a hook onInGameTick that ran the above method. In Forge, I ended up making the game check every tick regardless if the player was updated or not.(I'm not sure if onLivingUpdate did that to, but it seemed less intensive. Same went for onInGameTick, but I'm pretty sure that means every tick)
Migration to different platforms
Changing to ModLoader
I can honestly say I don't know what I'm doing, and am very happy with the progress that I have made. A big reason I wanted to include ModLoader was so I didn't have to edit base code. The actual transition time was quite short, and I had the mod all working and I was happy. Then I wanted to add a button to the options menu to enable and disable the mod.
In comes Forge
Finding quickly that I would be directly setting where the button is positioned, I didn't want to interfere with other mods buttons as well. I found one post saying something similar to "You can do it in Modloader, or just use Forge", making me think it was all setup, and easy. It might be, but I didn't find how to do the buttons.
When I changed to Forge, I didn't spend much time on buttons as I was too busy trying to figure out how to make my method fire when either
(Ideally) The player moved a block
The player moved
The player was updated
(Not wanted at all) Every tick
Searching for both the button solution minorly, and the method going on event, 10 hours passed, and I settled on option 4 without a button.
What I have Now I have a working dynamic perspective changer. Although, that was my goal in the first place, where it stands currently, I don't think it deserves a release yet.
Known Bugs and lacking features Yes, there are bugs with the little bit of code I added.
Updates every tick. This isn't needed if I could trigger my method when the player moves. (help me please!)
Cannot disable mod (to come when I figure out the options button situation)
F3 button will not manually override mod
As a little side thing I did, I removed the crosshair when not in first person. The following line will suffice @ line 99 in an unmodded GuiInGame
if (this.mc.gameSettings.thirdPersonView == 0)
In my forge release in this post, I have not included the above feature, as that too edits the base code.
Nice Features to Add later
When third person view pushes against head of player, revert to first person.
When player is still for 3 seconds or so, revert to first person.
When player is in very open indoor environments, change to third person.
Configurable variables for users to change defining when to transition into each perspective.
More things not yet thought of.
Install
RequiresMinecraft Forge - Dynamic Third Person v0.1
You need 1.4.6 to install. (If you don't have it, use MCNostalgia when it works for your updated version)
Taking a look at for Forge install. (He's using windows 8, and steam, but it is generally the same for all windows users.)
Be sure that you have a clean install of MineCraft 1.4.6, I believe Optifine should be ok if that is installed.
He used %appdata% to find his .minecraft folder. Remember that.
If you've never done any jar edits before, the video and myself use winrar (Direct Download Link, there is a lot of download link spam on their downloads page that gets people confused)
Be sure to run MineCraft afterwards like the video to see if forge installed correctly. You should see the same screens as the video. (might be different if MCNostalgia is used, I have no experience with it)
After the install, adding my mod is simple. Go back to your .minecraft folder, go into the now added mods folder, and move the Dynamic Third Person .zip into that folder.
Run MineCraft and my mod should be active.
Terms -
This mod (plugin, a patch to Minecraft source, henceforth "Mod" or "The Mod"), by the terms of http://www.minecraft.net/copyright.jsp is sole property of the Mod author (televis10n, henceforth "Owner" or "The Owner"). By default it may only be distributed on minecraftforums.net, mcmodcenter.net. It may only be mirrored or reposted with advance written permission of the Owner. Electronic Mail is fine if you wait for a response. URL shorteners or other attempts to make money off The Owner's Mod are strictly forbidden without advance written permission
tl;dr - A dynamic third person mod that changes you to first and third person when you go outside and back inside.
As of what I can see, you pretty much removed 3rd person view?
No, this mod actively changes between first and third person. It uses third person when you are outside, right now. If you were taking about the button (f3 or f5, I cant remember which), it will eventually be a quick way to turn the mod on and off, as well as its' previous function. Currently, the button does nothing because the mod somewhat overrides it.
Could you include information about how to install this mod no matter how simple it may seem to you?
Did my best in 15 minutes for an install guide, the OP is updated with the information under Install
Anyone have any clues to do what I need in MineCraft Forge? Or is there an "even better" Mod Loading API that can do what I want in three seconds? I'm flexible for that.
Reference Behind The Code in OP for what I'm having problems with. If my post is too messy or you don't get what I'm having problems with, ask me to clarify, along with what you understand from your reading.
Currently, forge release only.
Hello everyone, I'm televis10n, and this is my first mod in Minecraft. Actually, my first time using java to program as well.
Dynamic third person is very simple. When you go inside, your perspective switches to first person view. When you go back outside, the view changes into third person mode.
The transition is actually very seamless.
Behind the Code
Starting Out
Upgrading Performance
Personally, I don't like having to do this every update to the player, but I could not figure out in my night long session how to put an event on player movement. Transitioning from base code editing to ModLoader to Minecraft Forge didn't quicken the process either. In ModLoader, I made a simple mod_*** that put a hook onInGameTick that ran the above method. In Forge, I ended up making the game check every tick regardless if the player was updated or not.(I'm not sure if onLivingUpdate did that to, but it seemed less intensive. Same went for onInGameTick, but I'm pretty sure that means every tick)
Migration to different platforms
Changing to ModLoader
I can honestly say I don't know what I'm doing, and am very happy with the progress that I have made. A big reason I wanted to include ModLoader was so I didn't have to edit base code. The actual transition time was quite short, and I had the mod all working and I was happy. Then I wanted to add a button to the options menu to enable and disable the mod.
In comes Forge
When I changed to Forge, I didn't spend much time on buttons as I was too busy trying to figure out how to make my method fire when either
What I have Now
I have a working dynamic perspective changer. Although, that was my goal in the first place, where it stands currently, I don't think it deserves a release yet.
Known Bugs and lacking features
Yes, there are bugs with the little bit of code I added.
In my forge release in this post, I have not included the above feature, as that too edits the base code.
Nice Features to Add later
Install
You need 1.4.6 to install. (If you don't have it, use MCNostalgia when it works for your updated version)
Taking a look at for Forge install. (He's using windows 8, and steam, but it is generally the same for all windows users.)
Run MineCraft and my mod should be active.
Terms -
tl;dr - A dynamic third person mod that changes you to first and third person when you go outside and back inside.
Did my best in 15 minutes for an install guide, the OP is updated with the information under Install
Anyone have any clues to do what I need in MineCraft Forge? Or is there an "even better" Mod Loading API that can do what I want in three seconds? I'm flexible for that.
Reference Behind The Code in OP for what I'm having problems with. If my post is too messy or you don't get what I'm having problems with, ask me to clarify, along with what you understand from your reading.
BDW nice mod.
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.