Jump to content

Recommended Posts

Posted

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?

Posted

Ok but how would I write that would I put it in my main class under the EventHandlers or do I have to make a new class file and extend off of the minecraft world pakage?

Posted

A simple way i can think of would be to subscribe to the LivingUpdateEvent and if entity is an instance of entity player set player.capabilities.allowFlying = true.

(I think there is a better option then LivingUpdateEvent but i cant remember it)

I am the author of Draconic Evolution

Posted

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.

  • 5 years later...
Posted

Hey I dont no how to code 
"At all"
so if / when you get the forge fly mod working can you post it on curseforge or somthing because i cant find a flight mod thats not a hack or with like xray or somthing ANYWHERE.

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.