Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Davidee

Members
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Davidee's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Interestingly enough, it appears that loading the block/items inside of your Init method will not initialize the textures/localizations. If you move them to the PreInit method, everything works perfectly fine. It appears that on the texture side of things, if you place them inside of your Init method then registerIcons(IconRegister) is never called.
  2. I've been trying to update my NBTEdit mod, which has a couple of GUI textures. I first tried "assets/nbtedit/textures/gui/..." and a similar ResourceLocator, public static final ResourceLocation TEXTURE = new ResourceLocation("nbtedit", "textures/gui/widgets.png"); That of course didn't work, but, if I move my textures to "assets/minecraft/nbtedit/textures/gui/..." and use this code, it works. public static final ResourceLocation TEXTURE = new ResourceLocation("nbtedit/textures/gui/widgets.png"); Now, I dug into the problem, and here are my findings. SimpleReloadableResourceManager attempts to load the texture with a call to func_110536_a(ResourceLocation), which then uses the first string (normally "minecraft", attempted to set for my mod "nbtedit") to locate a ResourceManager from its ResourceManager map. Of course, nothing is mapped to "nbtedit". The reason one is mapped to "minecraft" is because in a call to SimpleReloadableResourceManager.func_110545_a(ResourcePack), the default resource pack is loaded, which contains an immutable set of strings to map with a FallbackResourceManager. The set only contains "minecraft", and when it sees "nbtedit" later, it crashes instead of creating a new FallbackResourceManager. I believe we need to wait for a proper Forge implementation of "AbstractResourcePack" or an edit of SimpleReloadableResourceManager.
  3. Alright, so I use this functionality in a couple of mods to access protected methods - NBTEdit mod - call write, load, and get the Tag map (can probably use some vanilla methods + 1 reflection call here) Mob Spawn Controls - access the spawn list fields in order to modify vanilla spawning (only option here is reflection or AT)
  4. It's just to access protected methods/fields... Why write a access transformer to change the visibility of three methods? And reflection is even uglier. Is there any easy way to add an access transformer to an existing mod?
  5. In previous versions, new classes in "net.minecraft.src" would have their package stripped upon recompilation (like other minecraft classes). However, in the newer version, new classes in a specific minecraft package (i.e. "net.minecraft.nbt") will keep their packages upon recompilation, possibly causing errors (especially when using these classes to access protected methods and fields).
  6. It doesn't get called on the client when connecting to a dedicated server. However, to fix it I just made a dummy ServerPacketHandler, so it's okay.
  7. Don't do that. It still tries to load the classes on the server, and it crashes. Use a sided proxy instead.
  8. Forge ModLoader currently only has one Packet method ("sendPacket"). In ModLoader 1.3, that has been replaced with "clientSendPacket(Packet)" and "serverSendPacket(NetServerHandler,Packet)". Without those methods, some mods will be incompatible with Forge.
  9. @NetworkMod (clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = CHANNEL,packetHandler = ClientPacketHandler.class), connectionHandler = ConnectionHandler.class) That's the Annotation. Like I said, it works fine in SinglePlayer (Integrated Server). Just doesn't work when connecting to a dedicated server, the onPacketData method isn't being called.
  10. While testing my Legendary Beasts mod by running a "dedicated" server from my computer, I noticed the following issue: Conditions: Only have a "clientPacketHandlerSpec" defined -> ----client does not receive packets when playing on a dedicated server ---- client does receive packets on an integrated server Have both a "clientPacketHandlerSpec" and "serverPacketHandlerSpec" -> ----client does receive packets on a dedicated server ----client does receive packets on an integrated server
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.