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

Cratthorax

Members
  • Posts

    93
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Cratthorax

  1. Oh, so load from/into memory? Like this is adding a new "serializer" to the "acceptedItems" aka -> 0_0, 0_1, 0_2 etc.???, if the length is 1? If not, it will create a new array which will serialize like 0, 1, 2, 3? I really still don't understand what I'm talking about.
  2. Lol. I didn't mean the literate word. Of course I can review that in a translator. By definition that would mean "to repeatedly, or in succession tag/label/numerize/sent/release something", if related to actual code? I may as well completely expressed myself wrongly. What I mend was, when do I want to use it? Is it comparable to a "for loop", only it automatically applies numbered variables? Does it have any relation to "produce in series"? I've seen people using it, and asking for it all the time, yet I haven't had a case to use it myself. I just want to prepared, so I actually understand when I want to use it, once it shows up. I guess I'd use it when a serializer doesn't exist for a given tag/recipe/loot_table etc.?
  3. Good Morning, by title. I haven't used it yet, prolly because I don't exactly know, or understand, what it does. Can someone explain? Thank you.
  4. As always I'd return to conclude my inquiries, if successful. To solve my issue, I just had to create a custom screen, extend any "furnace" type screen to access the recipe book functions(AbstractFurnaceScreen actually turned out to be quite a hassle, so I moved on using FurnaceScreen). To implement the recipe book button into my "ContainerScreenCampfire", I just mimicked and adjusted the client code found in AbstractFurnaceScreen, and then I had to do the following code, to close the screen, and press the right mouse button to simulate returning to the original campfire screen, instead of the furnace screen: What's left to do is importing all the client particle, and server side burn time logic functions etc., from my original campfire. But this should be pretty straight forward.
  5. Good morning, following this somewhat entertaining thread, I got some first impressions. However, I ultimately failed on the same level as the original thread maker. I couldn't figure for the life of me, how to solve the render issue for a custom Trident/Spear type. I basically reconstructed any of his code(which was a hard task, given how confusingly he was exchanging copypasta code) for 1.16.5. It almost felt like MC doesn't want you to create custom spear weapon types. Do you guys want to share some input? As a first start, I did try "circumventing" the render issue by extending ToolItem, or just Item. But the result was even worth.
  6. Good morning, one thing kept me busy thinking though, when you said:"What matters it he(is the?) amount of event subscribing methods.". Is there something like a recommended quantity of subscribed events for any range of PC specs? Something like an absolute "upper limit"? My mod is quite huge, and it's hard to unite some of its events under one event method.
  7. Uhh baby, that might have been the most extensive and comprehensive explanation I've ever gotten from you. But maybe that's just because I'm beginning to understand what you're talking about. Thank you very much, good Sir.
  8. Well, something like an "idiot" break. Something that allows me using debugging code, that, for example, scans the (any)source for client only annotations etc., and/or tells me: "Hello, you right now utilize client code commonly. Please stop doing that!", as in: if ((client only)annotation found on class/method/field || any other method to determine client code) { system.out.println("Hello, you right now utilize client code commonly. Please stop doing that!) }
  9. Can someone at least give me a hint on which file to browse, to get an understanding of importing the recipe book function? Thank you.
  10. Druidcraft has some nice examples on what you are looking for I guess.
  11. There really is no easy way of doing this. In fact I deem coding tile entitys, like a custom furnace type of container, as pretty much the most difficult thing to code. You'd have to do a custom block, container, containerScreen, tileEntiy, and code for stateData, inventoryZoneContent, and something to handle the blockStateFlags. It might not be the best address/source, but I'd recommend trying to follow the "MinecraftByExample" tutorial series. For a more rudimentary start I'd recommend KaupenJoe's Tutorials, on Fuel and Custom TileEntitys. But again, there really is no "easy" way on building completely customized furnaces. In special for your request. KaupenJoe's Fuel tutorial teaches you what you want, I guess.
  12. Good morning, apparently the (potion)effect code for healing/regeneration has changed. In the past the int/float perfectly matched the hearts refiled, but nowadays I have a hard time figuring out to set the correct variable. Is it based on a x20 tick rate?
  13. Oh, so you marked any of critical classes/events etc., or is it for just some that can't be used? Is there any "codeable" way of "stress" testing the /minecraftforge source for crash prone code? Like something that clearly debugs for me which code to not use commonly?
  14. Good Evening, so I was primarily following GrayGhost's MinecraftByExample on Github, to port my custom furnace's to 1.16.5. The problem now is, using custom ContainerScreen, I figured he never implemented, or showed a way how to bring the recipe book to your custom tile entity/container screen. I spend the better part of today to get things working, but ultimately failed on the underlying difference between a "container" type TE, and an actual "smelting" type of TE's super's. As far as I understand it, he wasn't using any kind of crafting TE as base, but rather worked with a build up tutorial structure, using a chest type of container as base. A chest is not a furnace, or not a crafting station in that regard. So my question is if it is even possible to reimport the recipe book, or make any kind of replacement, before I even start trying a different approach.
  15. By distribution you mean "the mod you've distributed", or is that java language related? Also, how exactly one defines "common" code, because I'd see that(folder/package) a lot on other mod examples. Is it mend like the German word "gewöhnlich", or more like "common" for anyone to use(server) vs "closed" not for anyone to use(client). I think I start to comprehend this a bit more. Utilizing this annotation I would crash test my mod on a LAN server world, and if any of my code crashes the server, I would annotate with @Onlyln to prevent that crash(on server), or make my code server compatible. At least that's how I understand your feedback. If that is the case, why isn't the example mod source distributed with a simple comment, like this: //use this class/method/field annotation to make sure you aren't crashing the server, if mod is present: @OnlyIn
  16. Yeah, I know 1.16.4 is outdated, but I'd still conclude this thread for the sake of personal future reference. It actually also applies to 1.16.5. So I finally got around installing DataGenerator, and the proposed event to "reflect" on a block's proper tool requirement. Just ignore the absence of proper loops, and abundance of methods/fields/constructors. The code will be refined, so it was just done for testing purposes. And tbh, I'm still to stupid to manage, to properly loop through objects lists. In this case, it wouldn't allow me to compare item vs item[]. And yes, I'm using that kind of debugging. I'm pretty oldschool in that regard, and way to lazy to browse through log files, which is also more complicated to use. You get the notion. ScriptKiddie can't be pro. Btw., is there a way to apply java code format to without needing to edit the post? Because I can't see a related button. Edit: oh, and on a side not. I still wasn't able to properly apply ObfuscationReflectionHelper.findMethod(), since it would f up my efforts with the stupid, "is not an instance of object .class" bla bla. And even if I got that solved, I'd still had to reference AbstractBlock.Properties.setRequiresTool(), which I could not invoke on Blocks.TheBlockIWantToSetRequiringProperTools. I'd appreciate if someone got that managed, to link to examples.
  17. Oh, so it does make sense, if I'm using multiple events to check for "similar" conditions, I should make sure I'm trying to achieve it with only one? Because I would often use multiple events(in one, or across multiple files/.classes) as backup. Which leads me to the question, is there a way to list definitive methods/fields/constructors/types, that are only supposed to be used by client vs server? I mean, I do know you are supposed to keep render, sound, ui stuff etc. dedicated to client, but a comprehensive list would ease up things, and stop wasting time with browsing through examples(in Google, and the forge snapshot). Hmmm, I might be wrong. But the source main .class from example mod actually exactly does that. So I had the impression that's not a problem.
  18. Well, you can run a class inside a class dedicated to client. But I take it that's not a good practice. I just wanted to rule out if it's something to worry about or not. I do practice to sort event .classes into three categories: client, server, and registry. But from a performance pov I couldn't say there really is any notable improvement, no matter how you structure the files. The only golden rule here seems to be, applying a clear distinction between client(render, sound, ui, model etc.) and server side.
  19. Good morning, I'm almost all way through my current mod port, and while I'm on it, I'd thought to improve code were due. In the past my focus wasn't necessarily on making things working for multiplayer, since I would never play MC online anyways, but now I wanna change that, since I really don't want to crash other users games. I also want to make things a bit more "efficient", if that is even what I'm trying to do? So, per title, I have a multitude of different event subscribers to intercept recipe/advancements code, which all run on server start(on a Forge bus), and are currently running inside my main file, mixed up with a couple of client related eventSubs to cancel player related render stuff. So my first question would be: is it a good idea to mix client/server events up in one .class, or am I supposed to give them dedicated .classes's? I should mention that my main file is registering for modEventBus as well as forgeEventBus. Is it even worth worrying to lump them up in one file, or does the game not bother at all, as long as I keep it structured? Edit: oh, and is multithreading with multiple .classes housing evtSubs even a thing in MC, given how low the used up resources by this game are?
  20. Success! It shall be noted you'll probably want to visit the two other references as well... https://www.cursemaven.com/ https://www.cursemaven.com/forge ...I ended up using the 3rd method "CurseMaven", which allows all three cases(using source as master, working, and running with it in Eclipse). You'll still need to export the project with the yourMod.toml edit for dependencie. I had to add... repositories { maven { url "https://cursemaven.com" } } ...over the dependencies section, and add this to the actual dependencies section... implementation fg.deobf("curse.maven:matlib-542833:3509801")
  21. Oh, I guess we cleared that one up. There is no gradle enviroment on my Eclipse when doing default installation. It never was. Hence why I would always use the CMD to build the gradle run config.
  22. The info to import the gradle run configuration(as gradle project aka wrong terminology?) into Eclipse. It only has the info to do this from inside Eclipse with the gradlew task genEclipseRun. Quote: But since there is no gradle run confguration present when starting Eclipse first time, how do I initiate any gradlew task?
  23. Uhhh baby...I love that. Thanks a lot.
  24. Wiki, .io, whatever... https://mcforge.readthedocs.io/en/latest/gettingstarted/ ...that's the place I'm going to first always. And it lacks the info, which is contained in the source's ReadMe download from here... https://files.minecraftforge.net/net/minecraftforge/forge/index_1.16.4.html ...and the misinformation came from multiple different threads. All ranging from version 1.8 to 1.17.1 versions MC with Forge. This should serve as testimony that I can't be the only getting confused with the instructions provided. For sure, we "users" f up a lot as well, but it isn't easy to keep your head cool sometimes, believe me. And it is naturally a thing I'd try to prevent, given my age.
  25. Hey there, see @07? I updated to 1.16.5 just for you...you lead, I'll follow...:D Fun aside. I do have trouble getting this to work, and I think it has primarily to do with me not even knowing/understanding the differences of a "master library" file, as I figured there might be multiple reasons why one does this. What I want to achieve: 1. making an already existing "master" mod serve as master during playtesting(in Eclipse), 2. during building my "slave" mod, 3. obviously using it in any game as prerequisite for any of my "slave" mods. I've got point 3. working with just editing the myMod.toml and adding a dependency. I also got to the point to "recompile" a deobfuscated source master(with the "creating a libs" folder in my project root directory), only my master runs obfuscated in Eclipse, which creates the notorious "there is no function forge_1.45.ebd5-whateverNumbers" etc.- crash, whenever trying to run the "slave" mod in Eclipse with its mother. It does run in a regular MC Forge install, but obviously I never imported any of the code of the master. So, I'd appreciate any extended instructions on the topic, because I've spend like a week getting absolutely nothing done.
×
×
  • Create New...

Important Information

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