Jump to content

Recommended Posts

Posted

So im working on a mod that adds ridable entitys to the game. but in survival when you get off you are telported back to when you got on. that and in LAN the serve is not even aware that that the entity is moving. Currently i do not have anything relating to muiltiplayer, so my question is what do i need to add and how will i go about setting it up?

main mod class

package net.minecraft.src.GridMod;

import net.minecraft.src.*;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;

@Mod(modid = "GridMod", name = "GridMod", version = "V0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = { "TheGrid" }
//packetHandler = GridPacketHandler.class
//connectionHandler = ConnectionHandler.class
)
public class TronBase 
{
    public static final Item YellowBaton = new TronItemBaton(201, 0).setItemName("YellowBaton");
    public static final Item BlueBaton = new TronItemBaton(202, 1).setItemName("BlueBaton");
    public static final Item GreenBaton = new TronItemBaton(203, 2).setItemName("greenBaton");


public static final String items = "/Tron/items.png", blocks = "/Tron/blocks.png";

@Init
public void LoadMethod(FMLInitializationEvent event) 
{
        ModLoader.addName(YellowBaton, "Yellow Baton");
        ModLoader.addName(BlueBaton, "Blue Baton");
        ModLoader.addName(GreenBaton, "Green Baton");


	MinecraftForgeClient.preloadTexture(items);
	MinecraftForgeClient.preloadTexture(blocks);
	EntityRegistry.registerModEntity(TronEntityLightCycle.class, "PlayerLightCycle", 1, this, 250, 5, false);
	  RenderingRegistry.instance().registerEntityRenderingHandler(TronEntityLightCycle.class, new TronRenderLightCycle(new TronModelLightCycle(), 0.5F));
}

}

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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.