Jump to content

Side-Only classes


sorash67

Recommended Posts

start by looking at the tutorials, play around with things and THEN ill help, someone spent time making a tutorial about it so dont make his effort be wasted

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

i managed to successfully SEND a packet, but the receiving didnt seem to work. i put a system print where the packet sends and it was fine, but where it's supposed to receive, nothing. unless im mistaken as to where the packet gets received.

 

-sorash67 || Skorpio

Link to comment
Share on other sites

i wonder if youd say this is incorrect:

@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = { "MoreOresMod" }, packetHandler = PacketHandlerMoreOres.class)

 

packet handler:

package moreores;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;

import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;

public class PacketHandlerMoreOres implements IPacketHandler{

@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {
	if(packet.channel.equals("MoreOresMod")){
		handlePacket(packet);
	}

}

public void handlePacket(Packet250CustomPayload packet){
	DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data));

	int randomInt1;
	int randomInt2;

	try{
		randomInt1 = inputStream.readInt();
		randomInt2 = inputStream.readInt();
	}catch(IOException e){
		e.printStackTrace();
		return;
	}

	System.out.println(randomInt1 + "" + randomInt2);
}

}

 

-sorash67 || Skorpio

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They are heartless scammers, they ruined my life, by making me develop an interest in investing my hard-earned money. I deposited 67,000 USD which was later turned into 110,450 USD including my payout bonus, there was an impressive improvement in a few weeks, later I had an emergency and needed money to pay my insurance fee, I tried reaching out to them to collect the money I invested, they cut the live chats and got me harassed then I realized that I was being scammed. I just wanted my money back! I was advised by a friend to seek help from a recovery firm to assist me in recovering my invested funds, God was so kind I came across some great positive reviews about BETAFORT ONLINE on how they helped scammed victims like me to recover their lost cryptocurrency assets, I took no delay and got in touch with BETAFORT ONLINE, the Expert immediately looked into my case and after providing all the required information they need, and it took them less then a day to recover all my funds. And now I really feel obligated to recommend BETAFORT ONLINE and their team, their recovery strategies, and for working relentlessly to help me recover my funds. Feel free to reach out to BETAFORT ONLINE via google search and they will guide you on how to recover your invested funds, I advise everyone to be careful with these heartless cryptocurrency scammers.  
    • yeah I believe so, its been something deep with the modpack I'm guessing. ill fix each error it states if its saying to replace or download a mod but I'm not sure where to go from here. I have been spending days and have yet to find the issue    
    • It worked, thank you very much 😭
    • https://spark.lucko.me/0ZaR1OAi2F I use spark mod to do a scan and send it here to search for help and if someone know about this issue I dont know to much about, but one thing i see in the record of the minecraft launcher when i play says: can't keep up server overloaded and etc, etc.  I assign 6GB ram to minecraft from the 16 GB of my pc, and fps is not a problem...(no to much) its something about tic rate/second and i am in SINGLE PLAYER. The funny thing is, minecraft vanilla (No mods) works normaly. My mods list (130): https://imgur.com/a/kY3yQr1  Datapacks: https://imgur.com/CTDBe7D ResourcePacks: https://imgur.com/AztTOOw so plis, is someone help me T_T a work  a loot of time in downloading and trying to all mods work but i dont know what to do anymore. Last thing  I SPEAK SPANISH so... sorry if my english is a little scuff or ... werever... bad. Thanks :3
    • Whenever I try to create an world my game crashes. I´ve tried to figure it out myself but wasnt able to do it.   Here are the logs
  • Topics

×
×
  • Create New...

Important Information

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