• 0

    posted a message on Yet another Hogwarts Map
    Thanks Willie. I had no idea that was possible on this forum.

    Anyhow... Update: 2013-05-14


    Just a quick video to show a couple of the more polished bits of the mod I'm making for my map.

    Posted in: Maps
  • 0

    posted a message on How to get WorldServer reference from world or EntityPlayer
    Hey, a quick update. More digging shows that I was using the wrong player.dimension (had to use EntityPlayerMP). Even here I got a null pointer exception. Turns out that MinecraftServer.getServer() returns null from the client thread.

    I'm running out of ideas... Anyone have anything I could try?
    Posted in: Modification Development
  • 0

    posted a message on How to get WorldServer reference from world or EntityPlayer
    Hey Sedridor,

    Thanks for your post. I had already tried that, but I tought it was wrong because it causes an error:


    2013-05-12 17:19:12 [INFO] [STDERR] net.minecraft.util.ReportedException: Exception in world tick
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.Minecraft.runTick(Minecraft.java:1877)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:834)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.Minecraft.run(Minecraft.java:759)
    2013-05-12 17:19:12 [INFO] [STDERR]  at java.lang.Thread.run(Unknown Source)
    2013-05-12 17:19:12 [INFO] [STDERR] Caused by: java.lang.RuntimeException: Cannot Hotload Dim: Overworld is not Loaded!
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraftforge.common.DimensionManager.initDimension(DimensionManager.java:230)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.server.MinecraftServer.worldServerForDimension(MinecraftServer.java:730)
    2013-05-12 17:19:12 [INFO] [STDERR]  at chronicide.modwarts.network.ChatPasswordPacket.execute(ChatPasswordPacket.java:81)
    2013-05-12 17:19:12 [INFO] [STDERR]  at chronicide.modwarts.network.ModwartsPacketHandler.onPacketData(ModwartsPacketHandler.java:31)
    2013-05-12 17:19:12 [INFO] [STDERR]  at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
    2013-05-12 17:19:12 [INFO] [STDERR]  at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
    2013-05-12 17:19:12 [INFO] [STDERR]  at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:83)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1571)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.network.TcpConnection.processReadPackets(TcpConnection.java:461)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:266)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:94)
    2013-05-12 17:19:12 [INFO] [STDERR]  at net.minecraft.client.Minecraft.runTick(Minecraft.java:1861)


    I've tried googling it, but it doesn't seem to be a common problem.
    Posted in: Modification Development
  • 0

    posted a message on How to get WorldServer reference from world or EntityPlayer
    Hey Meeees, thanks for the reply.

    I'm not having trouble detecting whether it's server or client...

    My block overrides isProvidingStrongPower and isProvidingWeakPower. These methods take in a worldserver reference and use that to get and set the block metadata. The same thing goes for updateTick. Whther the block is providing power is sotred in the block metadata.

    My block also has a custom method that can be called from it's tile to trigger the power source by setting it's meta data. This method takes a world, and coords to be able to get the blocks metadata, and can only be ran on the client thread

    Now, I have a serverchatevent handler that manages my server chat messages. When one of several keywords are detected, it sends a custom packet to the client. This packet contains the keyword, and loops through the loaded telentities, and if they are an instance of my custom tile, it calls a method on the tilentity that in turn tells the block to start providing power.

    This works fine in ssp, but it doesn't seem to want to work in smp. I've determined that the whole process still works as intended, all the way from the chat event on the server down through the pack, to the tile entities and into the blocks custom method. It just doesn't fire. What I've foud is that in SSP, the world beinig passed to the block from the packet is a World server that is referenced by:

    Minecraft.getMinecraft().getIntegratedServer().worldServerForDimension(Minecraft.getMinecraft().thePlayer.dimension)

    This doesn't work in SMP as getIntegratedServer returns null. I need some other way to reference the current world server for a given player from the client thread while in SMP.

    Any ideas on how to go about this?
    Posted in: Modification Development
  • 0

    posted a message on How to get WorldServer reference from world or EntityPlayer
    Hey guys,

    I'm having trouble getting a consistent reference to the worldserver instance. I have a packet that calls a method in a tileentity, that calls a method in it's block. The block method calls world.setblockmetadata... which fails to properly interact with my block because the block exists on a different worldserver.

    when I toString() the world from the block itself, I get something like net.minecraft.world.WorldServer@14f5e86.

    how can I get a reference to the same worldserver as my blocks from either the packet, tileentity or block with only a World and a EntityPlayer to play with?

    I'm sorry if this is unclear, if I need to do a better job of explaining my issue, please let me know.

    - SCott
    Posted in: Modification Development
  • 0

    posted a message on Yet another Hogwarts Map
    UPDATE: 2013-05-06 , this one showcasing my Great Hall

    Let me know what you think; Comments, suggestions, etc. I appreciate everyone's feedback!
    Posted in: Maps
  • 0

    posted a message on Yet another Hogwarts Map
    Hey everyone,

    This is the first map that I'm posting about online. I know that there are a ton of other Hogwarts maps out there. What sets this one apart from the others is that this one is made from the blueprints of the Hogwarts model used in the films.

    I found the blueprints in a book called "Harry Potter: From Page to Scene". I unbound the book to be able to cleanly scan the blueprints. From there I shrunk them down so that 1 pixel equaled a block. That gave me an accurate 'footprint' of Hogwarts. From there, I used the movies and a ton of source photos from the Studio Model to work out the heights of all the buildings and the size of various other elements of Hogwarts.

    to a youtube video I made with a quick tour of my map.

    I started this project without realizing just how many other Hogwarts maps were out there. I've put a lot of effort into ensuring that mine is as accurate as possible, but a lot of the others are pretty awesome already. While I'm having a good time, I'm not sure if I should bother with the inside. I will if there's an interest. I just don't want to expend all that effort if it's just going to sit and gather dust on my hard drive.

    Let me know what you think. Thanks!

    - Chronicide

    Edit... I do have a bit of a commentary in the video... but my mic was rather quiet so you might have to crank the volume if you're interested in hearing my rambles. =P

    Edit # 2: What the odds that the moment I post this, I see the PotterCraft post for the first time. =P
    Posted in: Maps
  • 0

    posted a message on new redstone power switch: Password Receiver
    Hey everyone,

    I tried my hand at this, but I'm abviously out of my depth. I think this would be really cool, so I decided to post this here.

    A new block that, when placed, opens a gui (like the sign) that lets you type a password in. Once placed, if the password is said by a player within a certain distance, it would act as if it were a button, supplying power for a short duration. This way, you could completely hide the 'trigger' for secret doors, or activate a powered contraption from a short distance with just a word.

    Ideally, this mod would be boundled with another mod that altered how chat was handled... limiting local chat to just be received by others within a short distance, so that you don't announce the password across the server, just to those in a certain radius.

    I've tried doing this with Forge, but Forge doesn't look like it has a chat hook, just a listener.

    I would still be willing to develop this myself, if someone else could point me in the direction of some sort of chat handling method, Forge or otherwise. I think I could work out the rest.

    - Chronicide
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Intercepting and handling chat with Forge 4.1.1.251 and MInecraft 1.3.2
    Alright, after a month of trying things, I still haven't been able to work this out. I don't think Forge is capable of this. I'm going to try my hand at bukkit. Still, if someone does come across this who knows how to accomplish this with Forge, please let me know. I'll repost if I make something work with Bukkit.

    - Chronicide
    Posted in: Modification Development
  • 0

    posted a message on Intercepting and handling chat with Forge 4.1.1.251 and MInecraft 1.3.2
    Alright, so I traced a chat message back through the stack. In short, the chat originates from GUIChat, is routed through the EntityClientPlayerMP, Is added the the MemoryConnection queue, is wrapped in a Packet3Chat, is passed to the NetServerHandler, and from there the the FMLNetworkHandler to notify all registered chat listeners.

    So, I have a better idea of the entire process, but I can't seem to find any spot where I can jump in and take over. There is no way that I can see to register a chat handler in forge. Do I have to register a whole new chat gui, and handle all of the above steps myself? I keep thinking to myself that there has to be some sort of hook somewhere, but I can't find any such thing.

    Does anyone have any idea as to where in the above process I might be able to jump in? I would appreciate any thoughts anyone might have.
    Posted in: Modification Development
  • 0

    posted a message on Intercepting and handling chat with Forge 4.1.1.251 and MInecraft 1.3.2
    Hey everyone,

    I'm trying to work out how to manually manage in-game chat. I worked out the following code, which allows me to programatically intercept and alter chat messages.

    public static GeneralChatListener chatListener = new GeneralChatListener();

    ...

    @Init
    public void load(FMLInitializationEvent event)
    {
    proxy.registerRenderers();
    NetworkRegistry.instance().registerChatListener(chatListener);
    }

    ...

    public class GeneralChatListener implements IChatListener
    {
    @Override
    public Packet3Chat serverChat(NetHandler handler, Packet3Chat message)
    {
    //alter message
    return new Packet3Chat(message);
    }

    @Override
    public Packet3Chat clientChat(NetHandler handler, Packet3Chat message)
    {
    //alter message
    return new Packet3Chat(message);
    }
    }



    ...But the above will not allow me to decide who messages go to. The result I'm aiming for is for all chat messages to only reach other players within a certain radius of player sending the given message. No matter what, the above code will send the same to all players on the server.

    What do I need to do to be able to not only intercept all chat messages, but to also programatically define who all receives them?

    I would appreciate any help anyone could offer. I've been having no luck with this for the better half of a week.

    - Chronicide
    Posted in: Modification Development
  • 0

    posted a message on How do I know what all these par# parameters are supposed to represent?
    Hey everyone,

    I'm a professional software developer, and while I primarily work in c#, I do have a lot of past experience with Java. I've set up a clean modding environment using the latest forge and mpc. Right now I'm wading through the common.net.minecraft.src package to see how the vanilla elements were created.

    A lot of it makes sense, but I'm having a lot of trouble trying to guess at what all these nameless parameters are. "int par1" could be anything from a count to a coordinate point. Some times I'm able to read the code and know what it is, but a lot of the time there aren't enough clues within the method/function to be able to work it out. Not only that, but there seems to be a lot of bit based operations (especially with metadata) with no way of knowing which bits represent what.

    I checked the forge javadoc comments, and while they are sometime useful, often a method/function won't have a javadoc comment at all, or if it does, it forgoes any information on the arguments in the signature. Is there any place where I can go to get some comprehensive documentation?

    Thanks for your help!

    - Scott
    Posted in: Mods Discussion
  • 0

    posted a message on Trouble understanding where client mods differ from server mods
    Hello everyone,

    I just recently started playing minecraft. I'm getting close to finishing my first full themed map,and I want to create a corresponding mod to add some more functionality. I'm a professional software developer and I have experience in Java (though I work primarily in .net). I've been bouncing back and forth between client and server mod tutorials, and I can't seem to work out where one starts and the other ends. It seems to me that they both can do a lot of the same things.

    If I create a client mod that adds items and blocks, install it on my PC then join a friends server, if there are no conflicts, will I be able to use my new blocks on his server? Does the server specify which mods are to be used... if so, will I not be able to join if I have my mod installed? If I can join, is my mod disabled while I'm on his server?

    Alternatively, If I create the same mod,but for a server, will all of the users need to install the mod to be able to join my server? I would imagine that adding blocks may not require this, but what if I want to add a new UI? That screams client side to me, but what about things like permissions, that are geared towards server mods?

    So, my questions are: how are server and client mods different, what are the limitations of each, and how do they interact together, if at all? Thank you for your help!

    Chronicide
    Posted in: Mods Discussion
  • To post a comment, please .