Jump to content

flAked

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

flAked's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks! I actually have a proof-of-concept of that feature already working. The plan is that you can "build" your painting/texture with ingame blocks and then capture it as a photo that you can make into prints to hang on the wall. Those will allow custom sizes, so you could also make a simple checker wall-paper with black & white wool in 2x2 blocks for example.
  2. Thanks Spread the word if you like it, not many people responded or know about it so far. If you have any suggestions, let me know.
  3. InkMaster is a Minecraft Forge mod all about ink production and usage. You can find more information on the MC forum http://www.minecraftforum.net/topic/1610968-146forgespsmp-inkmaster-100b2/
  4. flAked

    NEI API

    Somebody knows where I can find the NEI API? Or do I have to decompile it from the official binary download? I have some custom recipes done via IRecipe in my mod, does NEI support those somehow?
  5. I don't know if his mod setup is still up-to-date on how to do things, but this might get you started: https://github.com/dries007/SimpleCore2/tree/master/src/common/dries007/SimpleCore/asm Edit: I'm however not sure how to deal with legal issues if I want to replace a base-class and upload it to github... anybody knows how to do that properly?
  6. Thanks for the input! The problem with a) and b) is that server-side we don't really know when the editing is done, so we would solve the issue of interfering but the sign won't be editable again... unless its unlocked after 2 minutes, which could lead into the outlined scenario again if someone leaves it open longer. If I need to bite the bullet and figure out the asm patching anyways (to send some sort of notification from the client), I'd rather go with option c) and have the added benefit of multi-user-editing - that would be cool. I was hoping for some way around base-class patching, but I guess its not really possible in this case.
  7. I'm currently working on a mod that is all about signs and one part of it is a multi-tool that enables editing existing signs in the world. Opening the GUI on the client side, changing the text and updating the TileEntitySign all works fine and dandy in SMP. But one caveat is that players are able to edit the same sign at the same time. This results in a scenario where PlayerA is editing, PlayerB just clicked on it, PlayerA presses "Done", PlayerB presses "Done" and the end result is the message from PlayerB - while both of them started on a copy of the original sign text. The GUI for this works slightly different than the typical container GUI, the class GuiEditSign on the client-side does all the rendering without any container class. The funny part is that TileEntitySign has a attribute named isEditable, but lets see. The rundown is as follows: [*]Player right-clicks with multi-tool on existing sign, onItemUse() gets called [*]in there, displayGUIEditSign() gets called to display the GUI on the client-side [*]on initGui() the method actually sets the TileEntitySign to being non-editable [*]onGuiClosed() a Packet130UpdateSign gets send and the TileEntitySign is editable again [*]the global packet-handler updates the TileEntitySign upon receiving the packet, showing the new text Now, the culprit lies in the fact that the isEditable attribute is only ever changed on the client. The actual TileEntitySign.isEditable in the server world still reads true and won't ever get updated. That means every player can click and edit the sign and we won't be able to block it in our onItemUse() method. The solution I have thought about so far: onItemUse() sets isEditable to false (on the server TileEntitySign) in anticipation that the GuiEditSign gets called the sign is now blocked for other players OptionA: somehow receive the Packet130UpdateSign, upon we can assume that editing was done and change isEditable to true again OptionB: somehow register an event to get notified when the TileEntitySign gets updated/changed in the world, upon we know that the editing was done The gist of it is that we don't really know when the client finishes editing the sign and I'm thinking of ways around editing base classes. If you have any ideas about this, please chip in
×
×
  • Create New...

Important Information

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