Jump to content

[1.7.10]cant figure out packets


mrgreaper

Recommended Posts

Ok so im trying to get back into modding and to get something done i never managed before...packets

i spent a fair while following some well made guides but nothing went right....turns out they were out of date lol

so i searched more and i see "simple network wrapper" is the way to go, and i thought i had it sorted....untill i tried to use them

 

 

in my main mod file i have

public static SimpleNetworkWrapper network;

..snip..

    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        configHandler.init(event.getSuggestedConfigurationFile());
        network = NetworkRegistry.INSTANCE.newSimpleChannel("messengerBunny"); //so we create the channel
        //here is where we add the pacets...registering one packet per class
        network.registerMessage(speechPacket.speechPacketHandler.class,speechPacket.class,0, Side.CLIENT);//so we are registering a packet called speechpacket to channel one of our network (the messenger bunny) hmmm ok can understand that
        permissions.init();//lets give the artists thier well deserved credit!
        creativeTabs.init();//set up the creative tabs
        blocks.init(); //lets load our blocks
        if (configHandler.RecordsEnabled){
            records.init();} //load the records
        if (configHandler.BunnysEnabled){
            bunnys.init();} // if bunnys are enabled we load them (this modular stuff is gonna kill me lol)
        FMLCommonHandler.instance().bus().register(new eventHandler());// load the event handlers
        MinecraftForge.EVENT_BUS.register(new eventHandler());
    }

..snip..

 

then my packet is

 

package com.mrgreaper.themrgmod.network;

import com.mrgreaper.themrgmod.themrgmod;
import cpw.mods.fml.common.network.ByteBufUtils;
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;
import net.minecraft.nbt.NBTTagCompound;

/**
* Created by david on 11/01/2015.
*/
public class speechPacket implements IMessage {
    private String message;
    private double voice;
    private float pitch;
    private float pitchRange;
    private float pitchShift;
    //private String voiceName;

    public speechPacket(){} //without this blank one the packet crashes ...why do we need it? arghhhhhhhhhh



    public speechPacket(String message,double voice,float pitch, float pitchRange, float pitchShift ){
        this.message=message;
        this.voice=voice;
        this.pitchRange = pitchRange;
        this.pitch = pitch;
        this.pitchShift= pitchShift;
    }

    @Override
    public void fromBytes(ByteBuf buf) { // so we will need an nbt tag to store the info we want to send...here we read it
        NBTTagCompound tag = ByteBufUtils.readTag(buf);
        message = tag.getString("message");
        voice = tag.getDouble("voice");
        pitch = tag.getFloat("pitch");
        pitchRange = tag.getFloat("pitchRange");
        pitchShift = tag.getFloat("pitchShift");

    }

    @Override
    public void toBytes(ByteBuf buf) { //and here we create it
        NBTTagCompound tag = new NBTTagCompound();
        tag.setString("message",message);
        tag.setDouble("voice",voice);
        tag.setFloat("pitch",pitch);
        tag.setFloat("pitchRange",pitchRange);
        tag.setFloat("pitchShift",pitchShift);
    }

    public static class speechPacketHandler implements IMessageHandler <speechPacket,IMessage> { //so dont lile classes inside classes but everything i read suggests this is the way to go...still grrrrrr
        @Override
        public IMessage onMessage(speechPacket message, MessageContext ctx) {
            themrgmod.proxy.speechCreate(message.message,message.voice,message.pitch,message.pitchRange,message.pitchShift);
            return null;
        }
    }
}

 

that has the handler class inside it too

 

now its called from my eventhandler (as a test)

 package com.mrgreaper.themrgmod.lib;

import com.mrgreaper.themrgmod.network.speechPacket;
import com.mrgreaper.themrgmod.themrgmod;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;

/**
* Created by david on 11/01/2015.
*/
public class eventHandler {


    @SubscribeEvent
    public void onConfigurationChangeEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
        if (event.modID.equalsIgnoreCase(constants.modid)) {
            configHandler.loadConfiguration();
        }
    }



    @SubscribeEvent//test event
    public void TwistedPickupEvent(PlayerEvent.ItemPickupEvent event) {
        logHelper.info("if i can read this then the event handler is working" + event.pickedUp);
        themrgmod.network.sendToAll(new speechPacket("hello i think im working",12,23,12,3));


    }
}

 

first a note on sendToAll.... i tried sentToAllAround as that seems perfect for the end goal....but it wanted a target point and nothing i tried to use as the target was valid including event.player.getPlayerCoordinates() which would be the specific co-ords to use but it wasnt having it

event.player was also not valid for send to specific player. O.o

 

anyway the above results in this when you pickup an item

 

 

[22:45:35] [server thread/INFO] [The Mr G Mod]: if i can read this then the event handler is workingEntityItem['item.tile.themrgmod_TestBlock'/602, l='New World', x=8.88, y=65.13, z=-1.88]

[22:45:35] [Client thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught

io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[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:241) [NetworkManager.class:?]

at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1682) [Minecraft.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]

at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?]

at GradleStart.main(GradleStart.java:45) [start/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]

at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

Caused by: java.lang.IndexOutOfBoundsException

at io.netty.buffer.EmptyByteBuf.readShort(EmptyByteBuf.java:449) ~[EmptyByteBuf.class:?]

at net.minecraft.network.PacketBuffer.readShort(PacketBuffer.java:569) ~[PacketBuffer.class:?]

at net.minecraft.network.PacketBuffer.readNBTTagCompoundFromBuffer(PacketBuffer.java:105) ~[PacketBuffer.class:?]

at cpw.mods.fml.common.network.ByteBufUtils.readTag(ByteBufUtils.java:206) ~[byteBufUtils.class:?]

at com.mrgreaper.themrgmod.network.speechPacket.fromBytes(speechPacket.java:35) ~[speechPacket.class:?]

at cpw.mods.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:17) ~[simpleIndexedCodec.class:?]

at cpw.mods.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:7) ~[simpleIndexedCodec.class:?]

at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:77) ~[FMLIndexedMessageToMessageCodec.class:?]

at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?]

at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]

... 25 more

[22:45:35] [Client thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception

io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[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:241) [NetworkManager.class:?]

at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1682) [Minecraft.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]

at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?]

at GradleStart.main(GradleStart.java:45) [start/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]

at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

Caused by: java.lang.IndexOutOfBoundsException

at io.netty.buffer.EmptyByteBuf.readShort(EmptyByteBuf.java:449) ~[EmptyByteBuf.class:?]

at net.minecraft.network.PacketBuffer.readShort(PacketBuffer.java:569) ~[PacketBuffer.class:?]

at net.minecraft.network.PacketBuffer.readNBTTagCompoundFromBuffer(PacketBuffer.java:105) ~[PacketBuffer.class:?]

at cpw.mods.fml.common.network.ByteBufUtils.readTag(ByteBufUtils.java:206) ~[byteBufUtils.class:?]

at com.mrgreaper.themrgmod.network.speechPacket.fromBytes(speechPacket.java:35) ~[speechPacket.class:?]

at cpw.mods.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:17) ~[simpleIndexedCodec.class:?]

at cpw.mods.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:7) ~[simpleIndexedCodec.class:?]

at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:77) ~[FMLIndexedMessageToMessageCodec.class:?]

at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?]

at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]

... 25 more

[22:45:35] [Client thread/ERROR] [FML]: There was a critical exception handling a packet on channel messengerBunny

io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[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:241) [NetworkManager.class:?]

at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1682) [Minecraft.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]

at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?]

at GradleStart.main(GradleStart.java:45) [start/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]

at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

Caused by: java.lang.IndexOutOfBoundsException

at io.netty.buffer.EmptyByteBuf.readShort(EmptyByteBuf.java:449) ~[EmptyByteBuf.class:?]

at net.minecraft.network.PacketBuffer.readShort(PacketBuffer.java:569) ~[PacketBuffer.class:?]

at net.minecraft.network.PacketBuffer.readNBTTagCompoundFromBuffer(PacketBuffer.java:105) ~[PacketBuffer.class:?]

at cpw.mods.fml.common.network.ByteBufUtils.readTag(ByteBufUtils.java:206) ~[byteBufUtils.class:?]

at com.mrgreaper.themrgmod.network.speechPacket.fromBytes(speechPacket.java:35) ~[speechPacket.class:?]

at cpw.mods.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:17) ~[simpleIndexedCodec.class:?]

at cpw.mods.fml.common.network.simpleimpl.SimpleIndexedCodec.decodeInto(SimpleIndexedCodec.java:7) ~[simpleIndexedCodec.class:?]

at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:77) ~[FMLIndexedMessageToMessageCodec.class:?]

at cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:17) ~[FMLIndexedMessageToMessageCodec.class:?]

at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]

at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]

... 25 more

 

 

I did have an unknown function error before i added the blank method call (as advised to someone with the same issue i had)

 

also i realise i have a redundent step, the packet is sent to the client side so i dont really need to use the proxy (that makes sure the code is only run on the client side) but i cant see that hurting it (unless im wrong).

Link to comment
Share on other sites

You never write the NBT tag to the byte buffer, so the buffer index goes out of bounds when you try to read values from it.

 

As for the nested handler class, it is simply convenient because you can then access the message class' private members without adding getter methods, and your handler is 99.9999999999999999999% likely to never be used in isolation anyways.

Link to comment
Share on other sites

Check out diesieben07's tutorial on packets.

 

The reply is appreciated but i  have read that a few times, thats how im as far as i am (it seemed the only uptodate one i could find and was referenced in a lot of other places)

 

That doesnt help the issue though

 

registering the packet....yep its registered

implementing the packet class ...yep thats done

implementing the packet handler...yep done (even did it inside the other class as shown, though i dont like having classes inside classes as thats new to me)

sending packets.... done...but not working

packet responses...not needed a response so havent done that, but it looks self explanatory

Link to comment
Share on other sites

You never write the NBT tag to the byte buffer, so the buffer index goes out of bounds when you try to read values from it.

 

As for the nested handler class, it is simply convenient because you can then access the message class' private members without adding getter methods, and your handler is 99.9999999999999999999% likely to never be used in isolation anyways.

 

ah! ok now its working! thank you

 

i still dont get targetpoints though.

 

Lets take an example of what i want to do,

 

a tile entity will emit the speech synth and all with in a range of x will hear it.. now how i would do that on 1.6.4 is to use the code from the beacon to get all the players in a box and then play a sound at them (or in this case send a packet to them, 1 by 1 just going through the list of players in that range), the sendToAllAround seems like a god send, but i just dont know how to make it use the tile entitiy (or any entitiy/co-ords) as the main point...or how to tell it the range

 

Link to comment
Share on other sites

You're sending the packet from your TileEntity, right? So you should have x/y/zCoord available to create the TargetPoint:

// for example, to send to all within 64 blocks:
yourNetworkInstance.sendToAllAround(message, new NetworkRegistry.TargetPoint(dimension, xCoord, yCoord, zCoord, 64.0D));

 

ah i see, for some reason i thought it took only one value....hence my confusion. seems rather simple now lol

 

thank you.

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

    • Minecraft Version: 1.8-1.20.X Forge Version: All (Tested on 49.0.27, 11.14.4.1577 and some others) Steps to Reproduce: Setup a server with IPV6 only Setup a docker container with forge Try to connect to the Forge Server Description of issue: Hello, I am reaching out to seek your expertise within this forum to clarify a technical situation I am encountering, suspecting a potential issue related to Forge in a Docker environment, specifically in an IPv6 context. Initial Configuration: Debian 12 server, configured exclusively for IPv6, with Docker installed. Using the Docker image ghcr.io/pterodactyl/yolks:java_17, launching a Minecraft Vanilla server version 1.20.4 proceeds without any issues. Problem: The issue arises when deploying a Minecraft Forge server version 1.20.4 with the same Docker image (ghcr.io/pterodactyl/yolks:java_17), where connecting to the server becomes impossible. Notably, this issue does not occur when launching outside of Docker, where the server functions as expected. Hypothesis: This situation leads me to question the interaction between Forge and Docker, particularly in an IPv6-only configuration, despite several resolution attempts (testing with different versions of Forge, adjusting container network configurations (0.0.0.0, ::/0, and the server's ipv6), trials with various network settings, and modifications of Java options). Further testing was conducted with and without the use of the Pterodactyl game panel, unsuccessfully. The parameter -Djava.net.preferIPv4Stack=false also did not provide a solution. I tried to do the same things on multiple Minecraft server (include vanilla,spigot,fabric,sponge) and this work fine. The problem only happend with Forge. This issue seem to happend on all forge versions.   I appreciate your time and assistance in advance.
    • The game crashed whilst exception ticking world Error: java.lang.NullPointerException: Cannot invoke "net.minecraft.resources.ResourceLocation.equals(Object)" because "this.lootTableId" is null Error given is above. I was already playing for around 15 minutes and wasn't doing anything specific or even breaking anything when the crashed happened. This is update 1.19.2 forge: 43.2.23 Mod list: ESSENTIAL Mod (by SparkUniverse_) Traveler's Titles (Forge) (by YUNGNICKYOUNG) Resourceful Config (by ThatGravyBoat) Dynamic Lights (by atomicstrykergrumpy) TenzinLib (by CommodoreThrawn) Nature's Compass (by Chaosyr) Library Ferret - Forge (by jtl_elisa) Cold Sweat (by Mikul) Simple Voice Chat (by henkelmax) Waystones (by BlayTheNinth) Carry On (by Tschipp) [Let's Do] Meadow (by satisfy) Creeper Overhaul (by joosh_7889) AutoRegLib (by Vazkii) Moonlight Lib (by MehVahdJukaar) AppleSkin (by squeek502) Xaero's World Map (by xaero96) Rotten Creatures (by fusionstudiomc) YUNG's API (Forge) (by YUNGNICKYOUNG) Village Artifacts (by Lothrazar) Right Click, Get Crops (by TeamCoFH) Supplementaries (by MehVahdJukaar) Automatic Tool Swap (by MelanX) Better Third Person (by Socolio) Supplementaries Squared (by plantspookable) Traveler's Backpack (by Tiviacz1337) Caelus API (Forge/NeoForge) (by TheIllusiveC4) Creatures and Beasts (by joosh_7889) Architectury API (Fabric/Forge/NeoForge) (by shedaniel) Quark Oddities (by Vazkii) Origins (Forge) (by EdwinMindcraft) Villager Names (by Serilum) GeckoLib (by Gecko) Realistic Bees (by Serilum) Illuminations Forge 🔥 (by dimadencep) Serene Seasons (by TheAdubbz) Critters and Companions (by joosh_7889) [Let's Do] Bakery (by satisfy) Falling Leaves (Forge) (by Cheaterpaul) Jade 🔍 (by Snownee) Collective (by Serilum) TerraBlender (Forge) (by TheAdubbz) [Let's Do] API (by Cristelknight) Towns and Towers (by Biban_Auriu) More Villagers (by SameDifferent) Biomes O' Plenty (by Forstride) Goblin Traders (by MrCrayfish) Corpse (by henkelmax) Tree Harvester (by Serilum) Balm (Forge Edition) (by BlayTheNinth) Mouse Tweaks (by YaLTeR) Sound Physics Remastered (by henkelmax) Xaero's Minimap (by xaero96) Just Enough Items (JEI) (by mezz) Terralith (by Starmute) Quark (by Vazkii) [Let's Do] Vinery (by satisfy) [Let's Do] Candlelight (by satisfy) Repurposed Structures (Neoforge/Forge) (by telepathicgrunt) Dusty Decorations (by flint_mischiff) Immersive Armors [Fabric/Forge] (by Conczin) Serene Seasons Fix (by Or_OS) Shutup Experimental Settings! (by Corgi_Taco) Skin Layers 3D (Fabric/Forge) (by tr7zw)
    • Make sure Java is running via Nvidia GPU https://windowsreport.com/minecraft-not-using-gpu/  
    • Also make a test with other Custom Launchers like AT Launcher, MultiMC or Technic Launcher
    • Embeddium and valkyrienskies are not working together - remove one of these mods With removing Embeddium, also remove Oculus, TexTrue's Embeddium Options and Embeddium Extras Or use Rubidium instead
  • Topics

×
×
  • Create New...

Important Information

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