Jump to content

Packet Handling - How to send an item with IMessage classes (packets)


Recommended Posts

Posted

1. Is it possible to send an item via a message (I am following the SimpleNetworkWrapper tutorial by diesieben07)? If so, how would one do it?

 

2. If I want to have a bit of information (not a bit bit, just a small amount of information) that I want to be synced, how do I go about this? I have an IExtendedEntityProperties that has stuff I want synced for me, but I am not entirely sure how to go about it.

 

For reference, here is my PlayerInformation class:

package com.kwibble.dendri.entity.player;

import com.kwibble.dendri.item.ItemDendrikBelt;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;

import com.kwibble.dendri.ModDendri;
import com.kwibble.dendri.item.ItemDendri;

public class PlayerInformation implements IExtendedEntityProperties
{
public static final String IDENTIFIER = ModDendri.MODID + "_playerProperties";

private static final String IS_OVERLAY_MINIMIZED_IDENTIFIER = IDENTIFIER + "_isOverlayMinimized";

public static PlayerInformation forPlayer(Entity player) {
        return (PlayerInformation) player.getExtendedProperties(IDENTIFIER);
    }

private EntityPlayer player;

private ItemDendrikBelt currentDendrikBelt;

private boolean isOverlayMinimized;

public PlayerInformation(EntityPlayer player) {
        this.player = player;
    }

@Override
public void init(Entity entity, World world)
{

}

@Override
public void saveNBTData(NBTTagCompound compound)
{
	System.out.println("Saving NBT Data:");
	compound.setBoolean(IS_OVERLAY_MINIMIZED_IDENTIFIER, this.isOverlayMinimized);
	System.out.println("Saved isOverlayMinimized with value of: " + this.isOverlayMinimized);
	System.out.println("NBT Data Saved");
}

@Override
public void loadNBTData(NBTTagCompound compound)
{
	System.out.println("Loading NBT Data:");
	this.isOverlayMinimized = compound.getBoolean(IS_OVERLAY_MINIMIZED_IDENTIFIER);
	System.out.println("Loaded isOverlayMinimized with value of: " + this.isOverlayMinimized);
	System.out.println("Loaded NBT Data");
}

public void setCurrentDendrikBelt(ItemDendri belt)
{
	if (belt instanceof ItemDendrikBelt)
		this.currentDendrikBelt = (ItemDendrikBelt) belt;
	else
		System.out.println("A Dendrik Belt was not passed in");
}

public ItemDendrikBelt getCurrentDendrikBelt()
{
	return this.currentDendrikBelt;
}

public void setIsOverlayMinimized(boolean isOverlayMinimized)
{
	this.isOverlayMinimized = isOverlayMinimized;
}

public boolean getIsOverlayMinimized()
{
	return this.isOverlayMinimized;
}
}

 

[EDIT] Now I know that I need an IMessage, and I have that. It's more a question of do I need a packet for sending from the server to the client, and another from the client to the server? Or can it be done in one IMessage/ImessageHandler.

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

So I have solved question one. I discovered that using ByteBufUtils you can send an ItemStack. That was easier than I thought it would be.

 

Question 2 still stands though.

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

That makes sense. But what if I have say a GUI that updates something in the IExtendedEntityPrroperties? Do I have to create a nee IMessage to sync the data to the server?

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Okay, thanks.

 

The "anti-hacking" packet makes sense, but I am not sure how to go about it. Could you steer me in the right direction please?

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Also... I am trying to register a testing packet, and it isn't working and throwing this error:


java.lang.IllegalStateException: cannot determine the type of the type parameter 'REQ': class cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper
at io.netty.util.internal.TypeParameterMatcher.fail(TypeParameterMatcher.java:171) ~[TypeParameterMatcher.class:?]
at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:165) ~[TypeParameterMatcher.class:?]
at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:93) ~[TypeParameterMatcher.class:?]
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:60) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:50) ~[simpleChannelInboundHandler.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.<init>(SimpleChannelHandlerWrapper.java:17) ~[simpleChannelHandlerWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.getHandlerWrapper(SimpleNetworkWrapper.java:85) ~[simpleNetworkWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.addClientHandlerAfter(SimpleNetworkWrapper.java:79) ~[simpleNetworkWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:67) ~[simpleNetworkWrapper.class:?]
at com.kwibble.dendri.network.DendriNetwork.registerNetwork(DendriNetwork.java:22) ~[DendriNetwork.class:?]
at com.kwibble.dendri.ModDendri.preInit(ModDendri.java:31) ~[ModDendri.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_65]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_65]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) ~[LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_65]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at cpw.mods.fml.common.Loader.loadMods(Loader.java:500) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:520) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:890) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_65]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
---- Minecraft Crash Report ----
// I just don't know what went wrong 

Time: 6/19/14 7:22 AM
Description: Initializing game

java.lang.IllegalStateException: cannot determine the type of the type parameter 'REQ': class cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper
at io.netty.util.internal.TypeParameterMatcher.fail(TypeParameterMatcher.java:171)
at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:165)
at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:93)
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:60)
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:50)
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.<init>(SimpleChannelHandlerWrapper.java:17)
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.getHandlerWrapper(SimpleNetworkWrapper.java:85)
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.addClientHandlerAfter(SimpleNetworkWrapper.java:79)
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:67)
at com.kwibble.dendri.network.DendriNetwork.registerNetwork(DendriNetwork.java:22)
at com.kwibble.dendri.ModDendri.preInit(ModDendri.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:500)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:520)
at net.minecraft.client.Minecraft.run(Minecraft.java:890)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at io.netty.util.internal.TypeParameterMatcher.fail(TypeParameterMatcher.java:171)
at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:165)
at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:93)
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:60)
at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:50)
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.<init>(SimpleChannelHandlerWrapper.java:17)
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.getHandlerWrapper(SimpleNetworkWrapper.java:85)
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.addClientHandlerAfter(SimpleNetworkWrapper.java:79)
at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:67)
at com.kwibble.dendri.network.DendriNetwork.registerNetwork(DendriNetwork.java:22)
at com.kwibble.dendri.ModDendri.preInit(ModDendri.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:500)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:520)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:890)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Mac OS X (x86_64) version 10.8.5
Java Version: 1.6.0_65, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 921977528 bytes (879 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.156.1060} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.1.1060} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized
dendri{1.7.2_0.1} [Dendri] (Dendri) Unloaded->Constructed->Errored
Launched Version: 1.7
LWJGL: 2.9.1
OpenGL: Intel HD Graphics 4000 OpenGL Engine GL version 2.1 INTEL-8.16.74, Intel Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: ~~ERROR~~ NullPointerException: null
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)
#@!@# Game crashed! Crash report saved to: #@!@# /Volumes/Data/Users/102676/Developer/IDEA/MinecraftModding/MCMOD/./crash-reports/crash-2014-06-19_07.22.09-client.txt

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Oops, forgot to supply my IMessage + IMessageHandler and registry...

 

Here it is:

IMessage/IMessageHandler:


package com.kwibble.dendri.network.message;

import com.kwibble.dendri.entity.player.PlayerInformation;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import io.netty.buffer.ByteBuf;

/**
* Created by 102676 on 18/06/14.
*/
public class MessagePlayerInfo implements IMessage
{
private boolean isOverlayMinimized;

public MessagePlayerInfo(){}

public MessagePlayerInfo(PlayerInformation playerinfo)
{
	this.isOverlayMinimized = playerinfo.getIsOverlayMinimized();
}

@Override
public void fromBytes(ByteBuf buf)
{
	this.isOverlayMinimized = buf.readBoolean();
}

@Override
public void toBytes(ByteBuf buf)
{
	buf.writeBoolean(this.isOverlayMinimized);
}

public static class Handler implements IMessageHandler<MessagePlayerInfo, IMessage>
{
	@Override
	public IMessage onMessage(MessagePlayerInfo message, MessageContext ctx)
	{
		System.out.println("Test recieve: " + message.isOverlayMinimized);
		return null;
	}
}
}

 

DendriNetwork:


package com.kwibble.dendri.network;

import com.kwibble.dendri.ModDendri;
import com.kwibble.dendri.network.message.MessagePlayerInfo;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;

/**
* Created by 102676 on 19/06/14.
*/
public class DendriNetwork
{
private static final String CHANNEL_NAME = ModDendri.MODID;

public static SimpleNetworkWrapper dendriNetwork;

public static void registerNetwork()
{
	dendriNetwork = NetworkRegistry.INSTANCE.newSimpleChannel(CHANNEL_NAME);

	dendriNetwork.registerMessage(MessagePlayerInfo.class, MessagePlayerInfo.class, 0, Side.CLIENT);
}
}

 

And in my main mod, in the preInit method, I call DendriNetwork.registerNetwork()

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Oh, okay. Still a little confused, but good to go!

 

Also... Noob gradle man is me. I know you can update forge without destroying ones workspace, but how do you do it???

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

The client then reads the data back, gets the PalyerInformation instance and updates the values.

 

Can you give me an example of retrieving the PlayerInformation from the Message? I am a bit confused as to how this works..

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Oh, that's what you meant. I thought you meant store an instance of PlayerInformation INSIDE the message and retrieve it * facepalms *. Thanks :D

We all stuff up sometimes... But I seem to be at the bottom of that pot.

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.