Jump to content

[1.8] [Solved] Packet Issue


delpi
 Share

Recommended Posts

I followed a combo of these two tutorials and some general reading, plus previous experience.

 

http://www.minecraftforge.net/forum/index.php/topic,20135.0.html]]http://www.minecraftforge.net/forum/index.php/topic,20135.0.html '>

https://gist.github.com/CatDany/4a3df7fcb3c8270cf70b

 

I'm pretty stumped right now.  Any Help would be appreciated.

 

I'm getting a crash in the SimpleNetworkWrapper.  Log isn't much help on this one but i traced the error in debug to the following spoiler section.  I'm going to admit I don't get what that section of code does 100%.  however, it fails when it gets to the "return handler.newInstance();" portion.  If i check the newInstance and try to go to it in Eclipse, I get "Source not Found".  I'm using 1.7.  Can see all other source, not sure what the issue is with that.  Perhaps I'm missing something in the setup?

 

 

 

 

Main Class Call in PreInit

 

 

 

PacketHandler

 

 

package clandoolittle.custom_npc.Common.Utilities.Networking;

 

import clandoolittle.custom_npc.Custom_NPC;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_List;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_Member;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_Name;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Particle;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Spawner_Destination;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Spawner_Faction;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Spawner_Target;

import clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Spawner_Type;

import net.minecraftforge.fml.relauncher.Side;

 

 

public class PacketHandler {

 

// Setup Variables

    Custom_NPC instance = Custom_NPC.instance;

 

// Setup individual Variables

private int packetID= 0;

 

public void initPackets() {

 

// Register Packets

registerMessage (Faction_List.class, Faction_List.Handler.class);

registerMessage (Faction_Member.class, Faction_Member.Handler.class);

registerMessage (Faction_Name.class, Faction_Name.Handler.class);

registerMessage (Particle.class, Particle.Handler.class);

registerMessage (Spawner_Destination.class, Spawner_Destination.Handler.class);

registerMessage (Spawner_Faction.class, Spawner_Faction.Handler.class);

registerMessage (Spawner_Target.class, Spawner_Target.Handler.class);

registerMessage (Spawner_Type.class, Spawner_Type.Handler.class);

 

}

 

private void registerMessage(Class message, Class packet) {

 

// Register packet on both sides

instance.simpleNetworkWrapper().registerMessage(packet, message, packetID, Side.CLIENT);

instance.simpleNetworkWrapper().registerMessage(packet, message, packetID, Side.SERVER);

   

    // Incriment ID

    packetID++;

 

}

 

}

 

 

 

I tried commenting out the first line in "registerMessage" just to make sure the side didn't make a difference.  It didn't.

 

Faction_List (this is the first one and the one it fails on)

 

 

package clandoolittle.custom_npc.Common.Utilities.Networking.Packets;

 

import java.util.ArrayList;

import java.util.HashMap;

import java.util.List;

import java.util.Map.Entry;

 

import clandoolittle.custom_npc.Custom_NPC;

import clandoolittle.custom_npc.Common.Factions.Faction.Faction;

import io.netty.buffer.ByteBuf;

import net.minecraftforge.fml.common.network.ByteBufUtils;

import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;

import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

 

public class Faction_List implements IMessage {

 

// Setup Instance

    public static Custom_NPC instance = Custom_NPC.instance;

 

// Setup Variables

    private HashMap<String, Faction> factions = new HashMap<String, Faction>();

 

public Faction_List() {

 

}

 

public Faction_List(HashMap<String, Faction> factions) {

 

// Initialize variables

this.factions.putAll(factions);

 

}

 

@Override

public void fromBytes(ByteBuf buffer) {

 

// Clear old faction list

        factions.clear();

       

        // get count of factions

        int i_max = buffer.readInt();

 

        for (int i = 0; i < i_max; i++) {

       

            // Read faction name

            String faction = ByteBufUtils.readUTF8String(buffer);

           

            // Setup member variable

            List<String> members = new ArrayList<String>();

           

            // Get count of members

            int j_max = buffer.readInt();

 

            // Cycle through the specified member names

            for (int j = 0; j < j_max; j++) {

           

            // Get the member name

                String member = ByteBufUtils.readUTF8String(buffer);

 

                // Add to list if not already there

                if (!members.contains(member)) {

               

                    members.add(member);

                   

                }

               

            }

           

            // Build the faction and add it

            Faction faction_object = new Faction();

            faction_object.members_add(members);

            factions.put(faction, faction_object);

           

        }

 

}

 

@Override

public void toBytes(ByteBuf buffer) {

 

// Write the faction count

buffer.writeInt(factions.size());

 

// Loop through each faction

        for (Entry<String, Faction> item : factions.entrySet()) {

       

        // Write the name of the faction

        ByteBufUtils.writeUTF8String(buffer, item.getKey());

       

          // Write the size of the members

        buffer.writeInt(item.getValue().members().size());

 

            // Loop through each members

            for (String item_sub: item.getValue().members()) {

           

                ByteBufUtils.writeUTF8String(buffer, item_sub);

               

            }

           

        }

 

}

 

 

public class Handler implements IMessageHandler<Faction_List, IMessage> {

       

// Receive the message

        @Override

        public IMessage onMessage(Faction_List message, MessageContext ctx) {

       

        // Determine side

        if (ctx.side.isClient()) {

       

        // Clear out old factions list

        instance.faction_manager().faction_clear();

       

        // Add the new factions list

        instance.faction_manager().faction_update(factions);

       

       

        } else {

       

       

        }

       

        // Default Return

        return null;

 

        }

       

    }

 

}

 

 

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

I tried that, made no difference.  Besides in a conversation between diesieben07 and coolAlias it was clearly stated that you could.  Dany's example shows it as well. 

 

Here is the crash log

 

 

 

[12:51:38] [main/INFO] [GradleStart]: Extra: []

[12:51:38] [main/INFO] [GradleStart]: Running with arguments: [--tweakClass, net.minecraftforge.fml.common.launcher.FMLServerTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]

[12:51:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker

[12:51:38] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1334 for Minecraft 1.8 loading

[12:51:38] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.7.0_79, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7

[12:51:38] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[12:51:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker

[12:51:38] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin

[12:51:38] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin

[12:51:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[12:51:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[12:51:39] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[12:51:41] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[12:51:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[12:51:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[12:51:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker

[12:51:41] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[12:51:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[12:51:41] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.server.MinecraftServer}

[12:51:44] [server thread/INFO]: Starting minecraft server version 1.8

[12:51:44] [server thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[12:51:44] [server thread/INFO] [FML]: MinecraftForge v11.14.1.1334 Initialized

[12:51:44] [server thread/INFO] [FML]: Replaced 204 ore recipies

[12:51:44] [server thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[12:51:44] [server thread/INFO] [FML]: Searching E:\Desktop Drop\Forge MOD\Forge-1.8-11.14.1.1334\run\mods for mods

[12:51:46] [server thread/INFO] [FML]: Forge Mod Loader has identified 6 mods to load

[12:51:46] [server thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, dimension_manager, permissions, custom_npc] at CLIENT

[12:51:46] [server thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, dimension_manager, permissions, custom_npc] at SERVER

[12:51:47] [server thread/ERROR] [dimension_manager]: The mod dimension_manager appears to have an invalid event annotation EventHandler. This annotation can only apply to methods with recognized event arguments - it will not be called

[12:51:47] [server thread/ERROR] [permissions]: The mod permissions appears to have an invalid event annotation EventHandler. This annotation can only apply to methods with recognized event arguments - it will not be called

[12:51:47] [server thread/ERROR] [custom_npc]: The mod custom_npc appears to have an invalid event annotation EventHandler. This annotation can only apply to methods with recognized event arguments - it will not be called

[12:51:47] [server thread/INFO] [FML]: Processing ObjectHolder annotations

[12:51:47] [server thread/INFO] [FML]: Found 384 ObjectHolder annotations

[12:51:47] [server thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[12:51:47] [server thread/INFO] [FML]: Applying holder lookups

[12:51:47] [server thread/INFO] [FML]: Holder lookups applied

[12:51:47] [server thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue

[12:51:47] [server thread/ERROR] [FML]:

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized

FML{8.0.37.1334} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized

Forge{11.14.1.1334} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized

dimension_manager{1.1} [Dimension Manager] (bin) Unloaded->Constructed->Pre-initialized

permissions{1.2} [Permissions] (bin) Unloaded->Constructed->Pre-initialized

custom_npc{1.1} [Custom NPC] (bin) Unloaded->Constructed->Errored

[12:51:47] [server thread/ERROR] [FML]: The following problems were captured during this phase

[12:51:47] [server thread/ERROR] [FML]: Caught exception from custom_npc

java.lang.RuntimeException: java.lang.InstantiationException: clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_List$Handler

at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:116) ~[simpleNetworkWrapper.class:?]

at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:106) ~[simpleNetworkWrapper.class:?]

at clandoolittle.custom_npc.Common.Utilities.Networking.PacketHandler.registerMessage(PacketHandler.java:40) ~[PacketHandler.class:?]

at clandoolittle.custom_npc.Common.Utilities.Networking.PacketHandler.initPackets(PacketHandler.java:26) ~[PacketHandler.class:?]

at clandoolittle.custom_npc.Custom_NPC.preInit(Custom_NPC.java:152) ~[Custom_NPC.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518) ~[FMLModContainer.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[LoadController.class:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[LoadController.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) [Loader.class:?]

at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) [FMLServerHandler.class:?]

at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355) [FMLCommonHandler.class:?]

at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120) [DedicatedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500) [MinecraftServer.class:?]

at java.lang.Thread.run(Unknown Source) [?:1.7.0_79]

Caused by: java.lang.InstantiationException: clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_List$Handler

at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_79]

at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:113) ~[simpleNetworkWrapper.class:?]

... 36 more

[12:51:47] [server thread/ERROR]: Encountered an unexpected exception

java.lang.RuntimeException: java.lang.InstantiationException: clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_List$Handler

at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:116) ~[simpleNetworkWrapper.class:?]

at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:106) ~[simpleNetworkWrapper.class:?]

at clandoolittle.custom_npc.Common.Utilities.Networking.PacketHandler.registerMessage(PacketHandler.java:40) ~[PacketHandler.class:?]

at clandoolittle.custom_npc.Common.Utilities.Networking.PacketHandler.initPackets(PacketHandler.java:26) ~[PacketHandler.class:?]

at clandoolittle.custom_npc.Custom_NPC.preInit(Custom_NPC.java:152) ~[Custom_NPC.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518) ~[FMLModContainer.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[LoadController.class:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[LoadController.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) ~[LoadController.class:?]

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) ~[Loader.class:?]

at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) ~[FMLServerHandler.class:?]

at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355) ~[FMLCommonHandler.class:?]

at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120) ~[DedicatedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500) [MinecraftServer.class:?]

at java.lang.Thread.run(Unknown Source) [?:1.7.0_79]

Caused by: java.lang.InstantiationException: clandoolittle.custom_npc.Common.Utilities.Networking.Packets.Faction_List$Handler

at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_79]

at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:113) ~[simpleNetworkWrapper.class:?]

... 36 more

[12:51:47] [server thread/ERROR]: This crash report has been saved to: E:\Desktop Drop\Forge MOD\Forge-1.8-11.14.1.1334\run\.\crash-reports\crash-2015-07-11_12.51.47-server.txt

 

 

 

As mentioned, it doesn't show much of use.

Long time Bukkit & Forge Programmer

Happy to try and help

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
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I created an SOUL_JAR Item that has been registered for each mob like - mod:soul_jar_minecraft_cow etc.. but it all has different registry names, i have a model file name soul_jar.json and i want to know how to bind each of those items to this class (When mod iterates through all of vanilla mobs and registering items for them).   I didn't found any info about it because all of info is outdated, and forge docs is complicated asf (i wish there would be more examples) i also used AI but it showing me only outdated info, but theres some code where i registering my item and trying to bind it to model ->   public static void register(IEventBus eventBus){ ITEMS.register(eventBus); Set<ResourceLocation> entityKeyList = ForgeRegistries.ENTITY_TYPES.getKeys(); for (ResourceLocation k : entityKeyList) { EntityType<?> entityType = ForgeRegistries.ENTITY_TYPES.getValue(k); if (!entityType.getCategory().equals(MobCategory.MISC)) { RegistryObject<Item> SOUL_JAR = ITEMS.register("soul_jar" + '_' + k.toString().replace(':', '_').replace('.', '_'), () -> new JarItem(new Item.Properties().rarity(Rarity.RARE).tab(ModTabs.MAGICAL_OBSESSION_JARS), entityType)); if (Thread.currentThread().getThreadGroup() == SidedThreadGroups.CLIENT) { ItemModelShaper itemModelShaper = Minecraft.getInstance().getItemRenderer().getItemModelShaper(); itemModelShaper.register(SOUL_JAR.get().asItem(), new ModelResourceLocation("item.soul_jar", "inventory")); } } } } I also have more questions like how to iterate through all other mods mobs also, or render mob inside of a jar in inventory, but i will try to figure it out.
    • I looked into OctoEconomyAPI and saw that it was a JAR api for fabric. This means you have a fabric mod in your mods folder. I downloaded your mod folder and wasted 2 solid hours creating a Python script to try to find the faulty mod, and eventually just gave up. I suggest you create two installations with half or the mods in each, find which one doesn't launch, cut that one in half, and repeat until you find the fabric mod. Investigué OctoEconomyAPI y vi que era una API JAR para fabric. Esto significa que tienes un mod de Fabric en tu carpeta de mods. Descargué su carpeta de mods y desperdicié 2 horas completas creando un script de Python para tratar de encontrar el mod defectuoso, y finalmente me di por vencido. Le sugiero que cree dos instalaciones con la mitad o las modificaciones en cada una, encuentre cuál no se inicia, córtela por la mitad y repita hasta que encuentre la modificación Fabric.   (The Python script I made is here): (El script de Python que hice está aquí):  
    • I've got it to work now. Instead of using the texture manager I used the Render System:   RenderSystem.setShaderTexture(0, new ResourceLocation("mcaquests", "textures/item/questbook.png"));  
    • Hello ive been having the same issue over Curse Forge's auto modding or when i use manual modding. The error seems to be within either Oculus or Rubidium. Im using 1.19 with the latest 1.19 forge + 1.19 compatible Oculus and Rubidium. Just in case the versions i am using; Oculus - oculus-1.4.3a Rubidium - rubidium-0.6.3 Note: I tried removing the two and add Optifine and it opens without a problem. I didnt use all 3 together to get this error im talking tho, i know they are not compatible with optifine dont worry. Logs Debug The actual error code im getting on start-up is ''1'' and nothing else on the pop up box. I have tried finding the jar files on the internet and insert them on my own but that didnt go too far.
  • Topics

×
×
  • Create New...

Important Information

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