Jump to content

horsewithnoname

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by horsewithnoname

  1. Thank you very much for fixing this issue!
  2. I resolved the problem. It turned out that I removed one line from the mod which preload Metamorph mod before Blockbuster mod. So stupid, I know.
  3. It's from my Metamorph mod, and it's provided to Forge along side with my crashing mod: UC metamorph{1.1.2} [Metamorph] (metamorph-1.1.2-1.11.2.jar) It's just so random, it just crashes...
  4. Hello there! I encountered a really weird bug that corrupts my mod jar. This issue is exactly the same as described here. After I build my mod, I get this crash. It runs fine in Eclipse. No errors, but when I build it and run in Minecraft, it crashes, saying that it cannot find EntityActor class, but it's THERE (I checked in JD-GUI and in my code)! I tried reverting back to last stable commit, it works fine. I tried cleaning both binaries (build and bin folders, and ./gradlew clean) and eclipse, no success. I tried to move proxies into different package, also crash. I don't understand why it crashes. I checked the difference between commits, but there's nothing suspicious I could see. Does somebody can help me resolve that issue? Thank you for attention!
  5. Okay, so I have a mod which allows to record player actions and playback them using entities. I want to record breaking block animation and its progress, since my current code allows people to break blocks like in creative mode. Currently, I record all actions using event listener for multiple events, but this way, I'm quite limited of what I want to record. That's why I want to intersect incoming client packets and outgoing server packets. Well, I'm not really worry about hackiness, since I've got already few places where I use quite hacky reflection code for accessing some vanilla stuff Thanks for your time and reply! I really appreciate this!
  6. Hello there! I want to add in my mod an ability to record breaking block animation. I tried looking up, if there is such event (of course there's not, it's of too narrow use) or an event that allows reading vanilla packets on server side, but no success. I'm not sure whether it's possible without coremod, but if it possible, how to intercept a vanilla packet on both side (like the CPacketClickWindow or SPacketBlockBreakAnim)? I'm sure it somehow related to Netty and injecting some kind of decoder, or something, but I don't know where to start. Could you give me directions? Thank you for attention!
  7. Hello there! I've got few questions about implementing my own Forge events for making public API for my mods. How do you control cancel-able events? Do you simply post an event and check if post(Event event) method of EventBus returns true, then it was canceled? if (MinecraftForge.EVENT_BUS.post(event)) { return false; } /* Event wasn't canceled */ Do I understand it right? Second question is should I use MinecraftForge.EVENT_BUS or create a new event bus for my own mod and post it there? I don't know about penalties of posting my events on EVENT_BUS, however I do know that his bus is responsible for a lot of things like tick events and many much more. Just to clarify, my events aren't something that fire frequently, but depending on how frequent users will be using the features, it might turn out to be quite frequent. Thanks for attention!
  8. Oh, I get it now, thanks Of course I think I'll rewrite in the next update to the option 1.
  9. Thanks for the answer TGG, by the way, you have really nice tutorials from which I learned a lot Well, for now, yes, I'm aiming for machinima rendering. With machinima rendering, it's actually pretty good, I haven't noticed any frame desynchronization since Minema does the synchronzation work for me, but for live stuff I'm not sure about it. In the future, I would like to expand this recording/playback code to make cinematic stuff like where there are NPC's that do some pre-recorded stuff like in Borderlands 2 or Skyrim (just from the top of my head). I do not aim at multiplayer servers, though. Your offer seems a little bit less expensive than option 1, and probably will have some issues during the lag (probably, although lag is the problem itself). You're correct. Depending on the network latency it may drastically affect the playback. I tested everything only in single-player. By the way, I'm not aiming my mod toward public servers. Ok, I'll try different ways in the future, thank you P.S.: What does stress test means?
  10. Hello there! I'm working on a mod that allows recording player movement and some actions (like block interaction, dropping items, etc.). In previous versions, the record and playback of player movement and actions, was pretty primitive, it simply recorded position, rotation, etc. in separate thread and played back those actions also in separate thread. For the next release, I wanted to update recording code to the next level (so it would be very smooth and Minema compatible). I did implemented smooth recording, but I experience tick desynchroinzation issues sometime. Right now, the recording code works following way (source code if somebody needs more than an explanation): 1. Player notifies server that he wants to record himself (via command or interacting with actor mob) 2. Server starts recording and sends a message to the client that recording has started 3. Server records actions (pushed via event handler on the server-side) and client records position, rotation, motion, fall distance and some booleans (onGround, isSneaking, etc.) 4. When player asks the server to stop recording (via command or interacting with actor mob), server asks player for the recorded frames, and puts recorded actions on hold until client frames will arrive 5. When client frames are arrived, server adjusts the length of the action list and saves frames and actions to the file There are no issues with recording, but with playback, I experience tick desynchronization issue. I don't know why it happens, but sometimes, client update loop can't keep up with server loop, I guess, and in this case it makes playback look really awful (especially while flying elytra). Playback code works similar to recording code, but it's more complicated: 1. When actor is starting playing back (requested by player), actor being played from recorded record on the server 2. On the client, however, recording might not exist, so the server will send actor tracking clients record, if they don't have it, while giving an actor empty playback which will just run ticks (in order to keep up with the server) 3. When the record is finally arrived on the client, it being injected into the empty playback which will then start played back on the client every tick 4. When playback is finished, server notifies the players that an actor stopped playing 5. Clients will simply remove the playback from the actor and next time, they would be able to use the same record for playback tl;dr. Yes, it's a pretty complicated system, but I'm not asking to rewrite it for me. I described how it works, if you needed that info, to answer my question/help me with my problem. So now is the question time. How can I resolve this issue with tick desynchronization? I see only two options: 1. Rewrite playback code so it will be played only on server (i.e. every tick server going to send packets with position, rotation, motion, etc.) 2. Every N ticks, send to the client the number of ticks server has I implemented currently 2. as a workaround, but I feel that with slow connection the arrived tick will probably be outdated by the time it arrived. But with 1., I fear it will create really dense server load when there are lots of players and lots of actors being played back. What will be the optimal solution? Thanks for attention! (sorry for the wall of text)
  11. /* In your proxy on pre initialization (FMLPreInitializationEvent) or * initialization (FMLInitializationEvent): */ GuiEventHandler handler = new GuiEventHandler(); MinecraftForge.EVENT_BUS.register(handler); /* The class itself */ public class GuiEventHandler { @SubscribeEvent public void onGuiInit(InitGuiEvent.Pre event) { if (event.getGui() instanceof GuiIngameMenu) { /* Add button to top-left corner of the screen */ event.getButtonList().add(new GuiButton(42, 10, 10, ...)); } } @SubscribeEvent public void onGuiActionPerformed(ActionPerformedEvent event) { if (event.getGui() instanceof GuiIngameMenu && event.getButton().id == 42) { /* Do something... */ } } } My code doesn't really differ from SenpaiSuburaki's code, but there are few important features added/changed. Check for GuiIngameMenu – it is really important since without this check you may accidentally add your button to every GUI in the game. ActionPerformed event listener was added – where the comment "Do something..." you should write your custom code that should happen after your added button was clicked (i.e. open other GUI, Minecraft.getMinecraft().displayGuiScreen(...)). Moved registration of event handler outside of the class. Why? Because it's bad, in my opinion, since it will hardcode (add hard dependency, coupling) MinecraftForge.EVENT_BUS to this class. The code provided above is untested, but I believe it should work with minor adjustments (i.e. add imports and change some parameters to desired values).
  12. If I get you correctly (stupid autocorrect? ), you'll need to calculate the button position yourself (to put your button under other buttons). Or you could just place your button in the corner. By the way, you'll probably need to subscribe to ActionPerformedEvent also to add a callback when the button was clicked in GuiIngameMenu.
  13. Or... you can just create your event handler and listen to GuiScreenEvent.InitGuiEvent.Pre, check whether given GUI is instance of GuiIngameMenu, and then add additional buttons to the button list via event.getButtonList() (which is a List<GuiButton>).
  14. There are some: NoSleepingTest mod My Metamorph mod My capabilities example mod I also have written a tutorial on PMC about capabilities.
  15. I actually come up with another solution. Instead of wrapping every argument into ITextComponent, I create the parent ITextComponent with desired color for arguments, and then reset the color to my original color for the string, and I get what I wanted: com.example.string=§aGreen label with a dark green %s§a meme! And initiate the message like that: String key = "com.example.string"; ITextComponent text = new TextComponentTranslation(key, "dank"); text.getStyle().setColor(TextFormatting.DARK_GREEN); sender.addChatMessage(text);
  16. I'll be glad to, but I'm by no means a master or expert. I once wrote a tutorial about Capability System on PMC, but as you can see it more like "if you want this, do that, because that."
  17. Because that's how Minecraft core works. Minecraft Forge already made an astounding job by providing essentials and more for mod development. I'd rather say, why nobody created a Forge Codex/in-depth Documentation (that covers all aspects starting from adding stuff like blocks, items, etc. ending on complex stuff like client-server sync of custom entities/stuff, complex client rendering, GUI, etc.), yet? That will be much helpful, for everybody.
  18. Hello there! I stumbled across this issue, where messages formatted incorrectly when using TextComponentTranslation with formatting. See this screenshot: Message "Director block at (-580..." breaks the formatting after an argument gets replaced. The same thing happens to "The director block, that was attached..." label, however it has additional formatting, because the numbers should be colored in dark red. Both of those strings are look like this in en_US.lang: blockbuster.success.director.play=§aDirector block at (%s, %s, %s) has started playing! blockbuster.error.director.missing=§cThe director block, that was attached to this device at (§4%s§c, §4%s§c, §4%s§c), was destroyed or moved. Attach this device to another director block! And they're both sent this way (on the server): /* Director block at ... */ sender.addChatMessage(new TextComponentTranslation("blockbuster.success.director.play", args[1], args[2], args[3])); /* The director block, that was attached... */ player.addChatMessage(new TextComponentTranslation("blockbuster.error.director.missing", pos.getX(), pos.getY(), pos.getZ())); However, you as you can see also on the screenshot, there's another error message that says "Morph by name ..." colors correctly. This one, actually, sent from client side (client side command) this way: sender.addChatMessage(new TextComponentString(I18n.format("blockbuster.success.morph.enable", args[0]))); And now is the question. Is there a way to avoid formatting reset when specifying arguments to TextComponentTranslation without much hassle like creating ITextComponent for every argument with its own formatting (thus hardcoding color formatting)? I know that I can use the TextComponentString + I18n.format, but will it work on dedicated server? Thank you for attention!
  19. Dang it, forgot to update this forum post again 1.3 update was released. This update is focused on giving actors custom look. It introduces custom models and player morphing! It also changes the way director block works, making director map block useless (hence removed). This update supports both 1.9.4 and 1.10.2 versions. YouTube tutorial link: Download and change log link: https://github.com/mchorse/blockbuster/releases/tag/1.3
  20. I'm talking about ModelBase coordinate system, i.e. the one that Render<?> and entities use.
  21. Hello there! Background: I've been working on code for intergrading custom models into minecraft described in JSON format. Before that I've been writing models using ModelRenderers. Before I could using custom models described in JSON, I used to write every box in ModelRenderer format, and then I had to check if the texture mapping is correct and is coordinates are fine too by running minecraft again and again. The problem was in the coordinate system. Why the hell is ModelBase's coordinate system is so f*ck*d up?! Well, X and Z axes are kinda fine, but the Y axis is messed up completely! Why Y=0.0 isn't the bottom of the model, and instead it's something like 16 pixels (as I understand 16 pixels = 1 block (0.0625F))? That's not cool. Why did Mojang/Notch choose that kind of origin for models? P.S.: Is that the right forum for discussions?
  22. Completely forgot to update this topic, sorry for that Blockbuster 1.2 is out, and it adds better camera system which works way better than previous entity-like cameras. It is also integrated with director block. Download link, video tutorial, and change log: https://github.com/mchorse/blockbuster/releases/tag/1.2
  23. I think the README.md is empty. You should add at least the description of what your mod does, instruction of your mod (how to use, which items/blocks/entities the mod adds), screenshots or video (if you made this for youtuber then probably he made an overview or a mod showcase video). Without any kind of demo, there's less chance that your mod is going to be used. About releases: don't use separate branch for releases on github, use github releases. It's way better, because those binary jars won't mess up with your repository (i.e. increase the size of the .git folder). If you need example, see my mod's release page. Back to the beginning, what does this mod do?
×
×
  • Create New...

Important Information

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