Jump to content

How to make a fly mod


tminor1

Recommended Posts

Hey so I was wondering how do I make a mod that tells mincraft to allow people to fly in survival. I think the way you would do it would be to tell minecraft to use you code instead of its code that way you set allowflying to true and minecraft will go by your allowflying instead of using its allowflying. How would I do something like that, or is there a way to change things in the game without having to tell minecraft to use you code and not its code?

Link to comment
Share on other sites

I am sorry I am new to modding and I just want to make sure that I under stand. So from what I am getting is that I need to take my main file that would look this.

 

package net.Fly.mod;

 

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

 

 

@Mod(modid = FlyMod.modid, version = FlyMod.version)

public class SandItems {

 

public static final String modid = "FlyMod";

public static final String version = "v1.0";

 

@EventHandler

public void PreInit(FMLPreInitializationEvent preEvent){

 

}

 

@EventHandler

public void Init(FMLInitializationEvent event){

 

}

 

@EventHandler

public void PostInit(FMLPostInitializationEvent PostEvent){

 

}

 

}

 

I would need to import the PlayerickEvent then I need to put player.capabilities.alowFlying = ture all in here. Or do I hava to create a new class and do that in. I am sorry that I don't understand I am new to modding so I don't know how overriding minecraft code stuff works.

Link to comment
Share on other sites

  • 5 years later...

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.