Jump to content

[1.7.2]Handle Client Side stuff for IMessage?


Heltrato

Recommended Posts

Hello i was having issues with that Netty packet handler it leaks and it shows like "mhfc:100" which is one reason why i tried diesieben's tutorial on SimpleMessage but i dont see any handleClientSide in there which probably will be an issue for my PacketAI's

 

Heres my progress so far

 

Packet

package mhfc.heltrato.common.network.message;

import io.netty.buffer.ByteBuf;
import mhfc.heltrato.common.entity.mob.EntityRathalos;
import net.minecraft.entity.player.EntityPlayer;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;

public class PacketAIMessageTest implements IMessage {

private static byte animID;
private static int entityID;
public PacketAIMessageTest() {

}

public PacketAIMessageTest(byte anim, EntityRathalos e){
	animID = anim;
	entityID = e.getEntityId();
}

@Override
public void fromBytes(ByteBuf buf) {
	animID = buf.readByte();
	entityID = buf.readInt();

}

@Override
public void toBytes(ByteBuf buf) {
	buf.writeByte(animID);
	buf.writeInt(entityID);
}

public static void handleTheClient(EntityPlayer player) {
	EntityRathalos entity = (EntityRathalos)player.worldObj.getEntityByID(entityID);
	if(entity != null && animID != -1){
		entity.setAnimID(animID);
		if(animID == 0) entity.setAnimTick(0);
	}
}

public static class PacketAIRathalosHandler implements IMessageHandler<PacketAIMessageTest, IMessage> {
	private EntityPlayer player;

	public IMessage onMessage(PacketAIMessageTest message,MessageContext ctx) {
		handleTheClient(player);
		return null;
	}

}
}



 

My entity packet sender

public void sendAttackPacket(int id) {
	if(MHFCMain.isEffectiveClient()) return;
	currentAttackID = id;
//	MHFCMain.packetPipeline.sendToAll(new PacketAIRathalos((byte)id, this));
	MHFCMain.network.sendToAll(new PacketAIMessageTest((byte)id, this));
}

public boolean attackEntityAsMob(Entity entity){
	if(!worldObj.isRemote) {
		if(currentAttackID == 0){
			sendAttackPacket(1);
		}
		if(currentAttackID == 0 && rand.nextInt(4) == 0){
			sendAttackPacket(2);
		}
	}
	return true;
}

Link to comment
Share on other sites

ok i think i only have a few problem how do i make an instances for EntityPlayer

well it always says i cant instantiate entityplayer

 

it sends java.lang.nullpointexception

 

crash

[00:37:51] [Client thread/ERROR]: There was a critical exception handling a packet on channel mhfcs
java.lang.NullPointerException
at mhfc.heltrato.common.network.message.PacketAIMessageTest.handleTheClient(PacketAIMessageTest.java:37) ~[PacketAIMessageTest.class:?]
at mhfc.heltrato.common.network.message.PacketAIMessageTest$PacketAIRathalosHandler.onMessage(PacketAIMessageTest.java:48) ~[PacketAIMessageTest$PacketAIRathalosHandler.class:?]
at mhfc.heltrato.common.network.message.PacketAIMessageTest$PacketAIRathalosHandler.onMessage(PacketAIMessageTest.java:1) ~[PacketAIMessageTest$PacketAIRathalosHandler.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:34) ~[simpleChannelHandlerWrapper.class:?]
at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:14) ~[simpleChannelHandlerWrapper.class:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) [NetworkManager.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1649) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:996) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:912) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]

 

I register it here btw

here my main mod

@Mod.EventHandler
public void load(FMLInitializationEvent event){

network = NetworkRegistry.INSTANCE.newSimpleChannel("mhfcs");
network.registerMessage(PacketAIMessageTest.PacketAIRathalosHandler.class, PacketAIMessageTest.class, 0, Side.CLIENT);

}

Link to comment
Share on other sites

Ok i think i got it work but during my test it suddenly crashes

 

Jul 13, 2014 1:05:14 AM io.netty.channel.embedded.EmbeddedChannel recordException
WARNING: More than one exception was raised. Will report only the first one and log others.
java.lang.RuntimeException: Timeout waiting for client thread to catch up!
at cpw.mods.fml.client.FMLClientHandler.waitForPlayClient(FMLClientHandler.java:843)
at cpw.mods.fml.client.FMLClientHandler.fireNetRegistrationEvent(FMLClientHandler.java:852)
at cpw.mods.fml.common.FMLCommonHandler.fireNetRegistrationEvent(FMLCommonHandler.java:589)
at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:28)
at cpw.mods.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:15)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98)
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169)
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:257)
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:185)
at cpw.mods.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:43)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98)
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:313)
at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:43)
at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:299)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Unknown Source)

[01:05:15] [server thread/INFO]: XxHeltratoxX lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}}
[01:05:15] [server thread/INFO]: XxHeltratoxX left the game
[01:05:15] [server thread/INFO]: Stopping singleplayer server as player logged out
[01:05:15] [server thread/INFO]: Stopping server
[01:05:15] [server thread/INFO]: Saving players
[01:05:15] [server thread/INFO]: Saving worlds
[01:05:15] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[01:05:15] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[01:05:15] [server thread/INFO]: Saving chunks for level 'New World'/The End
[01:05:17] [server thread/INFO]: Unloading dimension 0
[01:05:17] [server thread/INFO]: Unloading dimension -1
[01:05:17] [server thread/INFO]: Unloading dimension 1
[01:05:17] [server thread/INFO]: Applying holder lookups
[01:05:17] [server thread/INFO]: Holder lookups applied
[01:05:18] [server thread/INFO]: Starting integrated minecraft server version 1.7.2
[01:05:18] [server thread/INFO]: Generating keypair
[01:05:19] [server thread/INFO]: Injecting existing block and item data into this server instance
[01:05:19] [server thread/INFO]: Applying holder lookups
[01:05:19] [server thread/INFO]: Holder lookups applied
[01:05:19] [server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@40d82ea9)
[01:05:19] [server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@40d82ea9)
[01:05:19] [server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@40d82ea9)
[01:05:19] [server thread/INFO]: Preparing start region for level 0
[01:05:20] [Netty Client IO #1/INFO]: Server protocol version 1
[01:05:20] [Netty IO #3/INFO]: Client protocol version 1
[01:05:20] [Netty IO #3/INFO]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],[email protected]
[01:05:20] [Netty IO #3/INFO]: Attempting connection with missing mods [] at CLIENT
[01:05:20] [Netty Client IO #1/INFO]: Attempting connection with missing mods [] at SERVER
[01:05:20] [server thread/INFO]: [server thread] Server side modded connection established
[01:05:20] [server thread/INFO]: XxHeltratoxX[local:E:091b44fb] logged in with entity id 91 at (364.5, 4.0, 13.5)
[01:05:20] [server thread/INFO]: XxHeltratoxX joined the game
[01:05:20] [Client thread/INFO]: [Client thread] Client side modded connection established
[01:05:20] [server thread/INFO]: Saving and pausing game...
[01:05:21] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[01:05:21] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[01:05:21] [server thread/INFO]: Saving chunks for level 'New World'/The End
[01:05:31] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2781ms behind, skipping 55 tick(s)
[01:05:31] [server thread/INFO]: Saving and pausing game...
[01:05:31] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[01:05:31] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[01:05:31] [server thread/INFO]: Saving chunks for level 'New World'/The End
    ERROR MESSAGE:
        SoundSystem did not load after 30 seconds.

Starting up SoundSystem...
Switching to No Sound
    (Silent Mode)

[01:05:46] [sound Library Loader/INFO]: Sound engine started
[01:05:46] [server thread/INFO]: Stopping server
[01:05:46] [server thread/INFO]: Saving players
[01:05:46] [server thread/INFO]: Saving worlds
[01:05:46] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[01:05:46] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[01:05:46] [server thread/INFO]: Saving chunks for level 'New World'/The End
[01:05:47] [server thread/INFO]: Unloading dimension 0
[01:05:47] [server thread/INFO]: Unloading dimension -1
[01:05:47] [server thread/INFO]: Unloading dimension 1
[01:05:47] [server thread/INFO]: Applying holder lookups
[01:05:47] [server thread/INFO]: Holder lookups applied
[01:05:47] [Client thread/FATAL]: Unreported exception thrown!
java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalGetSourcei(II)I
at org.lwjgl.openal.AL10.nalGetSourcei(Native Method) ~[lwjgl-2.9.0.jar:?]
at org.lwjgl.openal.AL10.alGetSourcei(AL10.java:853) ~[lwjgl-2.9.0.jar:?]
at paulscode.sound.libraries.ChannelLWJGLOpenAL.playing(ChannelLWJGLOpenAL.java:651) ~[ChannelLWJGLOpenAL.class:?]
at paulscode.sound.Source.playing(Source.java:1213) ~[source.class:?]
at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:556) ~[soundManager$SoundSystemStarterThread.class:?]
at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:253) ~[soundManager.class:?]
at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:222) ~[soundHandler.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2071) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:996) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:912) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05]
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 ----
// On the bright side, I bought you a teddy bear!

Time: 7/13/14 1:05 AM
Description: Unexpected error

java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalGetSourcei(II)I
at org.lwjgl.openal.AL10.nalGetSourcei(Native Method)
at org.lwjgl.openal.AL10.alGetSourcei(AL10.java:853)
at paulscode.sound.libraries.ChannelLWJGLOpenAL.playing(ChannelLWJGLOpenAL.java:651)
at paulscode.sound.Source.playing(Source.java:1213)
at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:556)
at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:253)
at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:222)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2071)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:996)
at net.minecraft.client.Minecraft.run(Minecraft.java:912)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 org.lwjgl.openal.AL10.nalGetSourcei(Native Method)
at org.lwjgl.openal.AL10.alGetSourcei(AL10.java:853)
at paulscode.sound.libraries.ChannelLWJGLOpenAL.playing(ChannelLWJGLOpenAL.java:651)
at paulscode.sound.Source.playing(Source.java:1213)
at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:556)
at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:253)
at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:222)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['XxHeltratoxX'/91, l='MpServer', x=357.71, y=8.11, z=11.37]]
Chunk stats: MultiplayerChunkCache: 225, 225
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: World: (366,4,12), Chunk: (at 14,0,12 in 22,0; contains blocks 352,0,0 to 367,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 1572 game time, 1572 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 74 total; [EntitySlime['Slime'/88195, l='MpServer', x=385.31, y=4.00, z=-63.41], EntitySlime['Slime'/20867, l='MpServer', x=354.21, y=4.81, z=30.53], EntitySlime['Slime'/46340, l='MpServer', x=296.28, y=4.00, z=36.69], EntitySlime['Slime'/20869, l='MpServer', x=369.68, y=4.84, z=40.29], EntitySmallFireball['Small Fireball'/142469, l='MpServer', x=366.35, y=8.65, z=18.47], EntitySmallFireball['Small Fireball'/143493, l='MpServer', x=364.32, y=12.75, z=20.58], EntitySmallFireball['Small Fireball'/142865, l='MpServer', x=364.79, y=10.91, z=19.52], EntitySlime['Slime'/101782, l='MpServer', x=395.11, y=4.00, z=-66.59], EntityClientPlayerMP['XxHeltratoxX'/91, l='MpServer', x=357.71, y=8.11, z=11.37], EntityCow['Cow'/12080, l='MpServer', x=310.22, y=4.00, z=-13.78], EntityCow['Cow'/12081, l='MpServer', x=300.22, y=4.00, z=-5.81], EntityCow['Cow'/12082, l='MpServer', x=309.50, y=4.00, z=-11.78], EntityCow['Cow'/12083, l='MpServer', x=311.78, y=4.00, z=-12.22], EntityHorse['Donkey'/12084, l='MpServer', x=312.41, y=4.00, z=-18.53], EntityHorse['Donkey'/12085, l='MpServer', x=313.41, y=4.00, z=-20.19], EntityHorse['Donkey'/12087, l='MpServer', x=310.81, y=4.00, z=-16.25], EntitySheep['Sheep'/12089, l='MpServer', x=312.50, y=4.00, z=-15.50], EntitySheep['Sheep'/12090, l='MpServer', x=316.50, y=4.00, z=-17.50], EntitySheep['Sheep'/12091, l='MpServer', x=323.88, y=4.00, z=-22.25], EntitySlime['Slime'/61, l='MpServer', x=281.21, y=4.00, z=-4.31], EntitySlime['Slime'/63, l='MpServer', x=279.71, y=4.00, z=78.71], EntitySlime['Slime'/66, l='MpServer', x=352.28, y=4.00, z=81.13], EntityRathalos['Rathalos'/68, l='MpServer', x=363.75, y=11.52, z=21.28], EntityHorse['Horse'/11972, l='MpServer', x=339.16, y=4.00, z=-11.19], EntitySmallFireball['Small Fireball'/69, l='MpServer', x=366.19, y=6.38, z=21.91], EntitySmallFireball['Small Fireball'/70, l='MpServer', x=366.47, y=6.41, z=21.91], EntitySmallFireball['Small Fireball'/71, l='MpServer', x=367.63, y=6.47, z=19.78], EntityHorse['Horse'/11975, l='MpServer', x=338.50, y=4.00, z=-5.50], EntitySmallFireball['Small Fireball'/142149, l='MpServer', x=366.20, y=7.96, z=18.21], EntityHorse['Horse'/12104, l='MpServer', x=313.47, y=4.00, z=-39.50], EntitySheep['Sheep'/11977, l='MpServer', x=341.50, y=4.00, z=-9.50], EntityHorse['Horse'/12105, l='MpServer', x=314.75, y=4.00, z=-37.88], EntitySheep['Sheep'/11978, l='MpServer', x=337.50, y=4.00, z=-11.50], EntityHorse['Horse'/12106, l='MpServer', x=319.56, y=4.00, z=-39.16], EntitySheep['Sheep'/11979, l='MpServer', x=338.50, y=4.00, z=-15.50], EntityHorse['Horse'/12107, l='MpServer', x=319.84, y=4.00, z=-40.91], EntitySheep['Sheep'/11980, l='MpServer', x=333.82, y=4.00, z=-15.10], EntityPig['Pig'/12108, l='MpServer', x=318.84, y=4.00, z=-37.50], EntityPig['Pig'/12109, l='MpServer', x=305.06, y=4.00, z=-45.22], EntitySlime['Slime'/107852, l='MpServer', x=297.18, y=4.00, z=56.01], EntitySmallFireball['Small Fireball'/78, l='MpServer', x=366.97, y=6.19, z=18.94], EntitySheep['Sheep'/11982, l='MpServer', x=347.13, y=4.00, z=-12.94], EntityPig['Pig'/12110, l='MpServer', x=310.53, y=4.00, z=-41.84], EntitySmallFireball['Small Fireball'/143180, l='MpServer', x=364.32, y=12.38, z=20.52], EntitySlime['Slime'/79, l='MpServer', x=345.41, y=4.00, z=22.28], EntityPig['Pig'/12111, l='MpServer', x=311.09, y=4.00, z=-44.63], EntitySheep['Sheep'/12112, l='MpServer', x=305.97, y=4.00, z=-39.06], EntityTigrex['Tigrex'/81, l='MpServer', x=368.38, y=4.00, z=15.84], EntitySheep['Sheep'/12113, l='MpServer', x=307.53, y=4.00, z=-45.69], EntitySheep['Sheep'/12114, l='MpServer', x=310.50, y=4.00, z=-47.50], EntitySlime['Slime'/83, l='MpServer', x=402.66, y=4.00, z=17.69], EntitySheep['Sheep'/12115, l='MpServer', x=305.25, y=4.00, z=-49.66], EntitySlime['Slime'/46804, l='MpServer', x=288.78, y=4.00, z=41.63], EntitySlime['Slime'/85, l='MpServer', x=410.75, y=4.00, z=-59.51], EntitySlime['Slime'/86, l='MpServer', x=390.37, y=4.00, z=-13.81], EntitySlime['Slime'/87, l='MpServer', x=405.91, y=4.00, z=4.97], EntitySlime['Slime'/88, l='MpServer', x=401.84, y=4.17, z=-4.77], EntitySmallFireball['Small Fireball'/144218, l='MpServer', x=364.30, y=13.37, z=20.57], EntitySlime['Slime'/90, l='MpServer', x=415.94, y=4.00, z=-32.37], EntitySlime['Slime'/106088, l='MpServer', x=386.00, y=4.00, z=60.28], EntityPig['Pig'/12010, l='MpServer', x=282.50, y=4.00, z=-14.50], EntityPig['Pig'/12011, l='MpServer', x=282.50, y=4.00, z=-17.50], EntitySlime['Slime'/4332, l='MpServer', x=320.09, y=4.66, z=12.37], EntityCow['Cow'/12020, l='MpServer', x=347.16, y=4.00, z=75.19], EntityCow['Cow'/12021, l='MpServer', x=342.44, y=4.00, z=71.13], EntityCow['Cow'/12022, l='MpServer', x=343.50, y=4.00, z=68.50], EntityCow['Cow'/12023, l='MpServer', x=342.72, y=4.00, z=69.84], EntityHorse['Horse'/12024, l='MpServer', x=346.50, y=4.00, z=73.50], EntitySmallFireball['Small Fireball'/143866, l='MpServer', x=364.22, y=13.09, z=20.55], EntityHorse['Horse'/12027, l='MpServer', x=344.50, y=4.00, z=71.50], EntitySlime['Slime'/28539, l='MpServer', x=399.68, y=4.00, z=68.07], EntityChicken['Chicken'/12028, l='MpServer', x=352.50, y=4.00, z=71.50], EntityChicken['Chicken'/12029, l='MpServer', x=351.50, y=4.00, z=73.50], EntityChicken['Chicken'/12030, l='MpServer', x=353.50, y=4.00, z=75.50]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2523)
at net.minecraft.client.Minecraft.run(Minecraft.java:941)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

So what i did is instead of in my main mod class Side.CLIENT . i make it into Side.SERVER

 

then this is what i did in my packet and handler

 

public static void handleTheClient(EntityPlayerMP player) {
	EntityRathalos entity = (EntityRathalos)player.worldObj.getEntityByID(entityID);
	if(entity != null && animID != -1){
		entity.setAnimID(animID);
		if(animID == 0) entity.setAnimTick(0);
	}
}

public static class PacketAIRathalosHandler implements IMessageHandler<PacketAIMessageTest, IMessage> {

	public IMessage onMessage(PacketAIMessageTest message,MessageContext ctx) {
		handleTheClient(ctx.getServerHandler().playerEntity);
		return null;
	}

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I am working on a modpack. When I try to access my server, Minecraft suddenly stops responding for no apparent reason, but I tested the same modpack on my friend's PC and it functions flawlessly there. One thing I have noticed is that the message "[Render thread/WARN] [io.gi.ap.ap.Apoli/]: Received unknown attacker" appears in the log each time my game crashes. My frame rate is high, about 100, and I do not have any mods called Apoli. 9000 MB of the 16000 MB of RAM are allotted to me. Almost everything I could do has been done (updating drivers, removing some mods, lowering the graphic settings, testing singleplayer, etc.) I will leave the moderator list and the latest.log down here.   https://mclo.gs/pYqKP15 (Cannot upload due to file size on pastebin.) Mods: [✔] [1.18.2]-Medieval-Siege-Machines-v1.17 [✔] [1.18.2-forge]-Epic-Knights-8.2 [✔] AchievementOptimizer-1.18.2-1.0.2 [✔] AdvancementPlaques-1.18.2-1.4.5.1 [✔] alexsmobs-1.18.6 [✔] antiqueatlas-7.1.1-forge-mc1.18.2 [✔] Apotheosis-1.18.2-5.8.1 [✔] appleskin-forge-mc1.18.2-2.5.1 [✔] Aquaculture-1.18.2-2.3.12 [✔] aquamirae-5.api10 [✔] archbows-1.0.9-1.18.2 [✔] architectury-4.12.94-forge [✔] armorunder-mc1.18.2-3.0.1 [✔] astikorcarts-1.18.2-1.1.2 [✔] Atlas-Lib-1.18.2-1.1.8 [✔] BetterAdvancements-1.18.2-0.2.0.146 [✔] betteranimalsplus-1.18.2-11.0.10-forge [✔] betterbiomeblend-1.18.2-1.3.5-forge [✔] BetterCompatibilityChecker-1.1.21-build.48+mc1.18.2 [✔] betterfpsdist-1.18.2-1.5 [✔] BetterPingDisplay-1.18.2-1.1 [✔] blockui-1.18.2-0.0.71-ALPHA [✔] BloodAndMadness-Forge1.18.2-v2.1.4 [✔] blueprint-1.18.2-5.5.0 [✔] BOMD-Forge-1.18.2-1.0.6 [✔] Bonfires-1.18.2-1.2.18-2062213 [✔] Bookshelf-Forge-1.18.2-13.3.56 [✔] born_in_chaos_[Forge]1.18.2_1.17 [✔] BrassAmberBattleTowers-1.18.2-2.3.12 [✔] caelus-forge-1.18.1-3.0.0.2 [✔] callablehorses-1.18.2-1.2.2.5 [✔] cameraoverhaul-1.0-1.18.2 [✔] carrotslib-mc1.18.2-4.0 [✔] catalogue-1.6.2-1.18.2 [✔] champions-forge-1.18.2-2.1.6.3 [✔] citadel-1.11.3-1.18.2 [✔] cloth-config-6.5.116-forge [✔] ColdSweat-2.3-b04f [✔] collective-1.18.2-7.7 [✔] configured-2.0.1-1.18.2 [✔] connectedness-1.18.2-2.0.1a [✔] Controlling-forge-1.18.2-9.0+23 [✔] corpse-1.18.2-1.0.2 [✔] CosmeticArmorReworked-1.18.2-v2a [✔] create-1.18.2-0.5.1.f [✔] Croptopia-1.18.2-FORGE-2.1.0 [✔] ctov-2.9.4 [✔] CullLessLeaves-Reforged-1.18.2-1.0.5 [✔] curios-forge-1.18.2-5.0.9.2 [✔] DarkerSouls1.18.2Forgev1.3.1 [✔] Divine Weaponry v1.4 1.18.2 [✔] DoggyTalentsNext-1.18.2-1.18.18 [✔] domum_ornamentum-1.18.2-1.0.77-ALPHA-universal [✔] dragonmagicandrelics-1.18.2-2.1.38 [✔] dragonseeker-1.1.1-1.18.2 [✔] dungeons_enhanced-1.18.2-3.2.1 [✔] DungeonsArise-1.18.2-2.1.52-release [✔] dungeonsweaponry-1.12.2-1.18.2 [✔] EFMCompat 18.2.0 [✔] EnchantmentDescriptions-Forge-1.18.2-10.0.17 [✔] EnigmaticLegacy-2.25.0 [✔] Entity_Collision_FPS_Fix-forge-1.18.2-1.0.0 [✔] entity_model_features_forge_1.18.2-2.0.2 [✔] entity_texture_features_forge_1.18.2-6.0.1 [✔] entityculling-forge-1.6.1-mc1.18.2 [✔] epic_fight_battle_styles-1.0.2 [✔] EpicFight-18.5.24 [✔] falchionmoveset-18.5.0 [✔] FarmersDelight-1.18.2-1.2.3 [✔] Fastload-Reforged-mc1.18.2-3.4.0 [✔] ferritecore-4.2.2-forge [✔] finsandtails-1.18.2-1.1.1 [✔] fish_of_thieves-mc1.18.2-v1.1.1-forge [✔] Forge 1.18.2 Minecraft Middle Ages 0.0.4 [✔] francium-1.18.2-1.0.1 [✔] ftb-essentials-1802.2.2-build.83 [✔] ftb-library-forge-1802.3.11-build.177 [✔] geckolib-forge-1.18-3.0.57 [✔] getittogetherdrops-forge-1.18.2-1.3 [✔] Gobber2-Forge-1.18.2-2.6.37 [✔] goblintraders-1.8.0-1.18.2 [✔] goodall-1.0.2-forge [✔] gpumemleakfix-1.18.2-1.6 [✔] guardvillagers-1.18.2.1.4.4 [✔] healingcampfire-1.18.2-5.2 [✔] hexerei-0.2.2 [✔] horsecombatcontrols-1.18.2-1.0.1 [✔] iceandfire-2.1.13-1.18.2-beta-3 [✔] Iceberg-1.18.2-forge-1.0.49 [✔] ImmediatelyFastReforged-1.18.2-1.1.10 [✔] immersive_melodies-0.1.2+1.18.2-forge [✔] ironchest-1.18.2-13.2.11 [✔] ironfurnaces-1.18.2-3.3.3 [✔] irons_spellbooks-1.18.2-1.1.4.5 [✔] ItemBorders-1.18.1-1.1.5 [✔] ItShallNotTick-1.0.22-build.34 [✔] Jade-1.18.2-forge-5.3.2 [✔] JadeAddons-1.18.2-forge-2.5.0 [✔] jecalculation-forge-1.18.2-4.0.4 [✔] jeed-1.18.2-1.11 [✔] jei-1.18.2-forge-10.2.1.1008 [✔] jepp-1.18-1.0.0 [✔] JustEnoughAdvancements-1.18.2-3.2.0 [✔] justenoughbreeding-forge-1.18.2-1.2.1 [✔] JustEnoughProfessions-1.18.2-1.3.0 [✔] JustEnoughResources-1.18.2-0.14.2.206 [✔] Kobolds-2.9.3-1.18.2-final [✔] kotlinforforge-3.12.0-all [✔] L_Enders Cataclysm-0.51-changed Them -1.18.2 [✔] lazydfu-1.0-1.18+ [✔] leaky-1.18.2-1.3 [✔] LegendaryTooltips-1.18.2-1.3.1 [✔] letmedespawn-1.18.x-1.19.x-forge-1.0.3 [✔] LibX-1.18.2-3.2.19 [✔] lightspeed-1.18.2-1.0.5 [✔] lodestone-1.18.2-1.4.2 [✔] loot_journal-1.1.0-1.18 [✔] lootr-forge-1.18.2-0.3.29.71 [✔] malum-1.18.2-1.5.0.1 [✔] medieval_paintings-1.18.2-7.0 [✔] memoryleakfix-forge-1.17+-1.1.2 [✔] MerchantMarkers-1.18.2-forge-1.3.1 [✔] minecolonies-1.18.2-1.1.148-BETA [✔] MmmMmmMmmMmm-1.18.2-1.5.2 [✔] mna-2.0.0.33 [✔] modernfix-forge-5.18.0+mc1.18.2 [✔] modonomicon-1.18.2-1.33.1 [✔] mowziesmobs-1.6.3 [✔] multi-piston-1.18.2-1.2.15-ALPHA [✔] mythicmounts-18.2-7.2-forge [✔] NefsFarmDecoExpGear+v0.3(1.18.2) [✔] nutritionalbalance-1.18.2-3.2.4 [✔] obscure_api-10 [✔] occultism-1.18.2-1.84.0 [✔] octolib-1.18.2-0.3 [✔] oculus-mc1.18.2-1.6.4 [✔] OfflineSkins-1.18.2-v2 [✔] Orcz_0.83_1.18.2 [AI FIXES] [✔] origins-classes-forge-1.1.6 [✔] origins-forge-1.18.2-1.5.0.2-all [✔] Paraglider-1.18.2-1.6.0.6 [✔] Patchouli-1.18.2-71.1 [✔] physics-mod-pro-v153-forge-1.18.2 [✔] Placebo-1.18.2-6.6.7 [✔] player-animation-lib-forge-1.0.2+1.18 [✔] pluto-mc1.18.2-0.0.6 [✔] polymorph-forge-1.18.2-0.50 [✔] Prism-1.18.2-1.0.1 [✔] projectvibrantjourneys-1.18.2-4.1.1 [✔] puffish_attributes-0.5.0-1.18.2-forge [✔] puffish_skills-0.13.1-1.18.2-forge [✔] realmrpg_imps_and_demons_0.9.0_forge_1.18.2 [✔] recruits-1.18.2-1.11.4.2 [✔] reforgium-1.18.2-1.0.12a [✔] Reldas+Medieval+Armor+1.18.2(2.0) [✔] relics-1.18.2-0.6.2.4 [✔] reputation-1.18.2-1.0.0 [✔] RPG_style_more_weapons_4.9.6R [✔] Rrls-1.18.2-3.1.0-forge [✔] rubidium-0.5.6 [✔] rubidium-extra-0.4.18+mc1.18.2-build.86 [✔] saturn-mc1.18.2-0.1.5 [✔] savage_and_ravage-1.18.2-4.0.1 [✔] seaborgium-mc1.18.2-0.1.3b [✔] SereneSeasons-1.18.2-7.0.0.15 [✔] ShoulderSurfing-Forge-1.18.2-4.2.1 [✔] SimpleLogin-1.18.2-1.0.0 [✔] simplyswords-forge-1.40-1.18.2 [✔] SleepingOverhaul-2.0.2-Forge-1.18.2 [✔] smallships-forge-1.18.2-2.0.0-b1.3.1 [✔] SmartBrainLib-forge-1.18.2-1.9 [✔] smoothboot(reloaded)-mc1.18.2-0.0.4 [✔] sophisticatedbackpacks-1.18.2-3.20.2.1036 [✔] sophisticatedcore-1.18.2-0.6.4.604 [✔] soul_like_armors_reworked_1.18.2_(v138) [✔] SpartanShields-1.18.2-3.0.1 [✔] SpartanWeaponry-1.18.2-3.0.5-all [✔] SpitItOut-1.18.2-1.0.1 [✔] starterkit-1.18.2-5.3 [✔] Structory-1.18.2-1.0.2 [✔] structure_gel-1.18.2-2.4.8 [✔] structurize-1.18.2-1.0.424-ALPHA [✔] swem-forge-1.18.2-1.4.6 [✔] takesapillage-1.0.3-1.18.2 [✔] TerraForged-1.18.2-0.3.1-alpha-2 [✔] TextruesRubidiumOptions-1.0.8-mc1.18.2 [✔] theimpossiblelibrary-1.18.2-0.3.1 [✔] torchmaster-18.2.1 [✔] Totemic-forge-1.18.2-0.12.9.1 [✔] tov-0.1(ALPHA) [✔] towns_and_towers_forge-1.10.0.1+1.18.2 [✔] TravelersTitles-1.18.2-Forge-2.1.1 [✔] unoriginal-datapack [✔] untamedwilds-1.18.2-2.4.3 [✔] upgrade_aquatic-1.18.2-4.0.0 [✔] valhelsia_core-forge-1.18.2-0.4.0 [✔] valhelsia_structures-1.18.2-0.1.1 [✔] Vampirism-1.18.2-1.8.8 [✔] WeaponsOfMiracles-18.1.7.38 [✔] Werewolves-1.18.2-1.0.0.1 [✔] workers-1.18.2-1.7.8 [✔] YouDied-1.18.1-1.0.2.9 [✔] YungsApi-1.18.2-Forge-2.2.9 [✔] YungsBetterMineshafts-1.18.2-Forge-2.2 [✔] YungsBetterStrongholds-1.18.2-Forge-2.1.1 [✔] zoomerzoom-1.4
    • Turn casual moments into unforgettable dates – choose the best casual dating site! Sexy Womans from your town
    • I am trying to make a Modpack for me and my friend and the buddycard expansion mod keeps crashing is there anything I can do, I'll copy and paste the crash message and the attack a link to the crash log below: Buddycards Expainsion (buddycardsexp) encountered an error during the common_setup event phase java.lang.NoSuchMethodError: 'void com.wildcard.buddycards.item.BuddycardBinderItem.<init>(com.wildcard.buddycards.registries.BuddycardsItems$BuddycardRequirement, net.minedcraft.world.item.Item$Properties, com.wildcard.buddycards.core.BuddycardSet)'   https://drive.google.com/file/d/1XlEYKVi2uUyS_UxRKByqCKlfnVswvHbb/view?usp=sharing
    • So, my friend and I are playing modpack on version 1.20.1. Sometimes, when a friend dies, he crashes from the server and cant rejoin anymore, so I have to load backup of the world. After loading the backup, everything goes well, but then sometimes it crashes again after death. Here is lof file: https://pastebin.com/KaZTmvhc The lines where the friend crashes start at line 2471 
    • The Minecraft launcher is now "preparing" the game but is taking forever. Any suggestions?
  • Topics

×
×
  • Create New...

Important Information

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