Jump to content

Modding with C#


Brendanp01

Recommended Posts

So I was looking into modding with C#, and I came across this. Nothing helpful. Just a guy claiming "Minecraft IS Java" and "There is no way around this", which simply isn't true. I'm wondering if there are any good ways to do this. If not, are there any smaller projects trying to do this that I could contribute to? Just to be clear, I'm not looking for mods to contribute to, I'm looking for projects allowing mods to be created in C#.

 

Edit

Another thing I want to make clear: I'm not looking for somebody to tell me that MC is written in Java, or how MC works. I know all about it. Which is why I know that this kind of thing is possible if someone is willing to put in the work. I'm not looking for a lecture about everything I already know.

Edited by Brendanp01
Link to comment
Share on other sites

37 minutes ago, diesieben07 said:

There are no such projects that I am aware of.

You would have to somehow use JNI and write java wrappers that then call out to the C# code - and even then I'm not sure if it is even possible to use JNI with C#. If not, you'd have to have yet another layer written in C++ to handle the JNI part.

 

And yes, the response was right, Minecraft is written in Java so any mods need to be, firstly, written in Java. If that Java code then does random crazy stuff and calls out to other language runtimes, sure, you can in theory do that. However the entrypoint of the mod still needs to be written in Java (or more specifically in something that compiles to JVM class files) so that Minecraft and the Forge mod loader knows what to do wiht it.

Like I said, I'm not looking for someone to tell me how MC works. Pretty much everything you said is true, but also a bit obvious to anyone who isn't a beginner. The reason I did that edit was because I knew that someone would end up telling me what I already know. However, I will look into what you said in the first paragraph.

Link to comment
Share on other sites

Well, unfortunately, because of <thing you already know>, it isn't possible because <thing you already know.> As such what you want to do would require <doing things you don't want to do>.

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

49 minutes ago, Draco18s said:

Well, unfortunately, because of <thing you already know>, it isn't possible because <thing you already know.> As such what you want to do would require <doing things you don't want to do>.

Not possible? We already can compile Java to .NET assemblies using IKVM. Don't tell me it's not possible to compile C# to Java bytecode. Don't tell me there's no way to create a bridge between .NET and Java. This exact thing I'm looking for has been done before, you can see it here. However, it's no longer kept up. I'm asking for answers, not people telling me something isn't possible when it's been done before. Apparently, the last sentence of your "signature" is true, "No help will be given".

 

Edit

There is a reason I asked for projects to contribute to. If your skull is too thick to figure that out, I honestly feel bad. Since you obviously couldn't figure it out, let me explain: I asked for projects to contribute to so that I could contribute to a project. Seems obvious, but I guess not. I simply don't care enough about this to start a project like this from scratch.

Edited by Brendanp01
Link to comment
Share on other sites

2 minutes ago, diesieben07 said:

That is not what IKVM is. IKVM is a JVM written in Java, i.e. it runs java class files on .NET by being a JVM itself.

 

Of course its possible. Just requires a lot of work. Of course its possible write Minecraft mods in Brainfuck if you wanted to, you just need to put the work in to write the adapters.

 

 

Yes, you are correct, sorry.

Edited by Brendanp01
Link to comment
Share on other sites

11 minutes ago, Brendanp01 said:

Not possible? We already can compile Java to .NET assemblies using IKVM. Don't tell me it's not possible to compile C# to Java bytecode. Don't tell me there's no way to create a bridge between .NET and Java. This exact thing I'm looking for has been done before, you can see it here. However, it's no longer kept up. I'm asking for answers, not people telling me something isn't possible when it's been done before. Apparently, the last sentence of your "signature" is true, "No help will be given".

 

Edit

There is a reason I asked for projects to contribute to. If your skull is too thick to figure that out, I honestly feel bad. Since you obviously couldn't figure it out, let me explain: I asked for projects to contribute to so that I could contribute to a project. Seems obvious, but I guess not. I simply don't care enough about this to start a project like this from scratch.

I feel bad for you not being able to understand that THERE ARE NO PROJECTS TO CONTRIBUTE TO!! And that you will have to start from scratch to do this. Just use java. Way easier. 

Link to comment
Share on other sites

5 minutes ago, mandar1jn said:

I feel bad for you not being able to understand that THERE ARE NO PROJECTS TO CONTRIBUTE TO!! And that you will have to start from scratch to do this. Just use java. Way easier. 

This. I mean, unless you are trying to use C# for fun or education, just use Java. All the wrappers and who knows what else will just cause more problems and make things run slower if they work at all.

Edited by Nuke3d
Link to comment
Share on other sites

2 minutes ago, mandar1jn said:

I feel bad for you not being able to understand that THERE ARE NO PROJECTS TO CONTRIBUTE TO!! And that you will have to start from scratch to do this. Just use java. Way easier. 

One person on this entire page said anything about projects I could contribute to. And he didn't say there are none, he said he isn't aware of any. I thought at this point it was clear, I want answers. If you're just going to say something like "not possible" without looking into it at all, don't say anything.

Link to comment
Share on other sites

2 minutes ago, Nuke3d said:

This. I mean, unless you are trying to use C# for fun or education, just use Java. All the wrappers and who knows what else will just cause more problems and make things run slower if they work at all.

Yes, I'm aware. I'm not trying to do anything crazy. Just want to try out modding. Of the programming languages that I know how to use, Java is probably my least favorite. I know C# is similar to Java. However, I prefer the .NET platform, and I like the fact that I can use F# along with C#.

Link to comment
Share on other sites

3 minutes ago, Brendanp01 said:

Yes, I'm aware. I'm not trying to do anything crazy. Just want to try out modding. Of the programming languages that I know how to use, Java is probably my least favorite. I know C# is similar to Java. However, I prefer the .NET platform, and I like the fact that I can use F# along with C#.

I would recommend you start out modding in Java, and then once you feel you have decent command of that, if you still want to try doing it in C# go for it. You'll likely have the tools to make it happen on your own at that point too, and could start assembling your own group around the project. Good luck whatever you choose!

  • Like 1
Link to comment
Share on other sites

1 minute ago, Nuke3d said:

I would recommend you start out modding in Java, and then once you feel you have decent command of that, if you still want to try doing it in C# go for it. You'll likely have the tools to make it happen on your own at that point too, and could start assembling your own group around the project. Good luck whatever you choose!

Thank you! You're the most helpful anyone has been here.

Link to comment
Share on other sites

54 minutes ago, Brendanp01 said:

There is a reason I asked for projects to contribute to. If your skull is too thick to figure that out, I honestly feel bad. Since you obviously couldn't figure it out, let me explain: I asked for projects to contribute to so that I could contribute to a project. Seems obvious, but I guess not. I simply don't care enough about this to start a project like this from scratch.

The reason no projects exist is because there's no pre-written API. Because there is no pre-written API, it is not possible for you to contribute to an existing project. As such you would have to write the API yourself. In Java.

1 hour ago, Draco18s said:

Well, unfortunately, because of <thing you already know>, it isn't possible because <thing you already know.> As such what you want to do would require <doing things you don't want to do>.

 

image.png.5d5c0d93b0a395c836a500e520a602a3.png

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

11 minutes ago, Draco18s said:

The reason no projects exist is because there's no pre-written API. Because there is no pre-written API, it is not possible for you to contribute to an existing project. As such you would have to write the API yourself. In Java.

 

image.png.5d5c0d93b0a395c836a500e520a602a3.png

thing I already know = MC is written in Java

I asked if there were people who have already done this. I didn't ask what programming language MC is written, how modding with Forge works, or for you to tell me that there are none. If you don't know of any, don't say anything. If you do, great! Let me know. Icame here for help and so far you haven't said anything helpful.

Edited by Brendanp01
typo
Link to comment
Share on other sites

13 minutes ago, Brendanp01 said:

If you have a useful answer that will help me do what I want to do, then good.

You've gotten that answer. "You cannot."

13 minutes ago, Brendanp01 said:

If not, I don't want to hear it. However, if you say something stupid I'm not just going to ignore it.

Something something flies and honey.

  • Confused 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

2 minutes ago, Draco18s said:

You've gotten that answer. "You cannot."

Something something flies and honey.

Well, that's not true. I already gave you a link of an old project that did it. "You cannot", does not help me do what I want to do. It's not useful, since it isn't true.

Link to comment
Share on other sites

Let me clarify:

You cannot.

In general, yes it can be done, but you aren't interested in building those APIs and as those APIs don't already exist, the thing you want to do cannot be done.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

6 hours ago, Brendanp01 said:

Okay, I'm done arguing with idiotic people. I'll say it one more time, if you know what you're talking about, unlike some people (Draco18s), then tell me.

Look, when I decided to get into modding C# was the only language I knew. I saw forge and minecraft, were programmed in Java, but I didn't want to learn Java because I loved C#. I looked everywhere for ways to do it and couldn't find none. it's a non-sensical task: you'd need to write wrappers for all the classes that minecraft and forge provides, and then you would need to keep updating it everytime a new mapping or forge/minecraft version came out. it's a lot of work, for very little benefit, the modding communnity isn't big enough for this to be a reasonable project.

you could look into how to write c# that compiles to jar's, sure.. but you still would need access to classes that exist in Java code.

What I can tell you is that it is not worth it. We, programmers, can't fall in love for a language and try do to everything with it, it's a very common programming sin. You need to recognize the best language for the job, and accept it. And if you just ahte the language so much you can't even think of writing in it, then maybe not doing the project is just a better option

 

The best I could recommend you, if you really don't want to write Java, is to take a look at Kotlin or Scala, they are better versions of Java basically.

Or do what I did, learned Java, it isn't even that bad. but having to do C programming really lowered my bars

 

and also, maybe think a little bit before saying a Forum Moderator that has been contributing to the modding community for 8+ years, doesn't know what he's talking about. you're the newbie here, tyring to do something that is, honestly, idiotic

Edited by kiou.23
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Brendanp01 said:

Okay, I'm done arguing with idiotic people. I'll say it one more time, if you know what you're talking about, unlike some people (Draco18s), then tell me.

*sigh* <people who know what they're talking about> have already spoken up and told you what you needed to know. You didn't like what they had to say and now you're just being rude. You had some very insightful responses from people. Bottom line, it really isn't done because it really isn't feasible or worth the time. Minecraft is written in Java. I get that that may not be your favorite language, but if you want to do MC in C#, there are no known projects that will let you do this, so you'll have to do it yourself. You do not have the Java chops to do it yet and since there are no projects that will allow you to do it, your only choice is to learn to mod MC in Java until you are experienced enough to handle both the Java and C#(and possibly C++) stuff yourself. You do not sound experienced enough in any of those languages to pull it off. I've been around programmers my entire life (I'm almost 50) and experienced programmers...well, you can just tell when they are talking about what they're good at. Maybe I'm wrong(wouldn't be the first time) but my advice to you is to listen to the "elders" of the forum.

 

It sounds like you do not want to do this anyway, so, *shrug* I guess that's that.

 

And please don't take any of this as insult. It's not. It's just truth. Sometimes truth cuts deep. Life is like that.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Minecraft is written in Java.

Mods need to be written in a language that compiles to the JVM.

Any arguments over this is just stupid.

If you wanna write a mod in C# go find a game that is written in C#.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • DAFTAR DAN LOGIN DISINI   Hantogel atau handogel adalah bentuk pengumpulan duka uang yang populer di dunia judi online, khususnya dalam permainan slot gacor. Banyak situs judi online yang menawarkan handogel slot gacor, dan sebagai pemain, penting untuk mengetahui cara memilih dan mengakses situs tersebut dengan aman dan amanah. Dalam artikel ini, kami akan membahas cara memilih situs slot gacor online yang berkualitas dan tahu cara mengakses handogelnya.
    • DAFTAR & LOGIN SIRITOGEL Siritogel adalah kumpulan kata yang mungkin baru saja dikenal oleh masyarakat, namun dengan perkembangan teknologi dan banyaknya informasi yang tersedia di internet, kalau kita siritogel (mencari informasi dengan cara yang cermat dan rinci) tentang situs slot gacor online, maka kita akan menemukan banyak hal yang menarik dan membahayakan sama sekali. Dalam artikel ini, kita akan mencoba menjelaskan apa itu situs slot gacor online dan bagaimana cara mengatasi dampaknya yang negatif.
    • This honestly might just work for you @SubscribeEvent public static void onScreenRender(ScreenEvent.Render.Post event) { final var player = Minecraft.getInstance().player; final var options = Minecraft.getInstance().options; if(!hasMyEffect(player)) return; // TODO: You provide hasMyEffect float f = Mth.lerp(event.getPartialTick(), player.oSpinningEffectIntensity, player.spinningEffectIntensity); float f1 = ((Double)options.screenEffectScale().get()).floatValue(); if(f <= 0F || f1 >= 1F) return; float p_282656_ = f * (1.0F - f1); final var p_282460_ = event.getGuiGraphics(); int i = p_282460_.guiWidth(); int j = p_282460_.guiHeight(); p_282460_.pose().pushPose(); float f5 = Mth.lerp(p_282656_, 2.0F, 1.0F); p_282460_.pose().translate((float)i / 2.0F, (float)j / 2.0F, 0.0F); p_282460_.pose().scale(f5, f5, f5); p_282460_.pose().translate((float)(-i) / 2.0F, (float)(-j) / 2.0F, 0.0F); float f4 = 0.2F * p_282656_; float f2 = 0.4F * p_282656_; float f3 = 0.2F * p_282656_; RenderSystem.disableDepthTest(); RenderSystem.depthMask(false); RenderSystem.enableBlend(); RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE); p_282460_.setColor(f4, f2, f3, 1.0F); p_282460_.blit(new ResourceLocation("textures/misc/nausea.png"), 0, 0, -90, 0.0F, 0.0F, i, j, i, j); p_282460_.setColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.defaultBlendFunc(); RenderSystem.disableBlend(); RenderSystem.depthMask(true); RenderSystem.enableDepthTest(); p_282460_.pose().popPose(); }   Note: Most of this is directly copied from GameRenderer as you pointed out you found. The only thing you'll have to likely do is update the `oSpinningEffectIntensity` + `spinningEffectIntensity` variables on the player when your effect is applied. Which values should be there? Not 100% sure, might be a game of guess and check, but `handleNetherPortalClient` in LocalPlayer has some hard coded you might be able to start with.
    • Dalam dunia perjudian online yang berkembang pesat, mencari platform yang dapat memberikan kemenangan maksimal dan hasil terbaik adalah impian setiap penjudi. OLXTOTO, dengan bangga, mempersembahkan dirinya sebagai jawaban atas pencarian itu. Sebagai platform terbesar untuk kemenangan maksimal dan hasil optimal, OLXTOTO telah menciptakan gelombang besar di komunitas perjudian online. Satu dari banyak keunggulan yang dimiliki OLXTOTO adalah koleksi permainan yang luas dan beragam. Dari togel hingga slot online, dari live casino hingga permainan kartu klasik, OLXTOTO memiliki sesuatu untuk setiap pemain. Dibangun dengan teknologi terkini dan dikembangkan oleh para ahli industri, setiap permainan di platform ini dirancang untuk memberikan pengalaman yang tak tertandingi bagi para penjudi. Namun, keunggulan OLXTOTO tidak hanya terletak pada variasi permainan yang mereka tawarkan. Mereka juga menonjol karena komitmen mereka terhadap keamanan dan keadilan. Dengan sistem keamanan tingkat tinggi dan proses audit yang ketat, OLXTOTO memastikan bahwa setiap putaran permainan berjalan dengan adil dan transparan. Para pemain dapat merasa aman dan yakin bahwa pengalaman berjudi mereka di OLXTOTO tidak akan terganggu oleh masalah keamanan atau keadilan. Tak hanya itu, OLXTOTO juga terkenal karena layanan pelanggan yang luar biasa. Tim dukungan mereka selalu siap sedia untuk membantu para pemain dengan segala pertanyaan atau masalah yang mereka hadapi. Dengan respon cepat dan solusi yang efisien, OLXTOTO memastikan bahwa pengalaman berjudi para pemain tetap mulus dan menyenangkan. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi pilihan utama bagi jutaan penjudi online di seluruh dunia. Jika Anda mencari platform yang dapat memberikan kemenangan maksimal dan hasil optimal, tidak perlu mencari lebih jauh dari OLXTOTO. Bergabunglah dengan OLXTOTO hari ini dan mulailah petualangan Anda menuju kemenangan besar dan hasil terbaik!
    • Selamat datang di OLXTOTO, situs slot gacor terpanas yang sedang booming di industri perjudian online. Jika Anda mencari pengalaman bermain yang luar biasa, maka OLXTOTO adalah tempat yang tepat untuk Anda. Dapatkan sensasi tidak biasa dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering. Di sini, Anda akan merasakan keseruan yang luar biasa dalam bermain judi slot. DAFTAR OLXTOTO DISINI LOGIN OLXTOTO DISINI AKUN PRO OLXTOTO DISINI   Jackpot Slot Maxwin Sering Untuk Peluang Besar Di OLXTOTO, kami tidak hanya memberikan hadiah slot biasa, tapi juga memberikan kesempatan kepada pemain untuk memenangkan jackpot slot maxwin yang sering. Dengan demikian, Anda dapat meraih keberuntungan besar dan memenangkan ribuan rupiah sebagai hadiah jackpot slot maxwin kami. Jackpot slot maxwin merupakan peluang besar bagi para pemain judi slot untuk meraih keuntungan yang lebih besar. Dalam permainan kami, Anda tidak harus terpaku pada kemenangan biasa saja. Kami hadir dengan jackpot slot maxwin yang sering, sehingga Anda memiliki peluang yang lebih besar untuk meraih kemenangan besar dengan hadiah yang menggiurkan. Dalam permainan judi slot, pengalaman bermain bukan hanya tentang keseruan dan hiburan semata. Kami memahami bahwa para pemain juga menginginkan kesempatan untuk meraih keberuntungan besar. Oleh karena itu, OLXTOTO hadir dengan jackpot slot maxwin yang sering untuk memberikan peluang besar kepada para pemain kami. Peluang Besar Menang Jackpot Slot Maxwin Peluang menang jackpot slot maxwin di OLXTOTO sangatlah besar. Anda tidak perlu khawatir tentang batasan atau pembatasan dalam meraih jackpot tersebut. Kami ingin memberikan kesempatan kepada semua pemain kami untuk merasakan sensasi menang dalam jumlah yang luar biasa. Jackpot slot maxwin kami dibuka untuk semua pemain judi slot di OLXTOTO. Anda memiliki peluang yang sama dengan pemain lainnya untuk memenangkan hadiah jackpot yang besar. Kami percaya bahwa semua orang memiliki kesempatan untuk meraih keberuntungan besar, dan itulah mengapa kami menyediakan jackpot slot maxwin yang sering untuk memenuhi harapan dan keinginan Anda.   Kesimpulan OLXTOTO adalah situs slot gacor terbaik yang memberikan pengalaman bermain judi slot online yang tak terlupakan. Dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering, OLXTOTO menjadi pilihan terbaik bagi para pemain yang mencari kesenangan dan kemenangan besar dalam perjudian online. Di samping itu, OLXTOTO juga menawarkan layanan pelanggan yang ramah dan responsif, siap membantu setiap pemain dalam mengatasi masalah teknis atau pertanyaan seputar perjudian online. Kami menjaga integritas game dan memberikan lingkungan bermain yang adil serta menjalankan kebijakan perlindungan pelanggan yang cermat. Bergabunglah dengan OLXTOTO sekarang dan nikmati pengalaman bermain slot online yang luar biasa. Jadilah bagian dari komunitas perjudian yang mengagumkan ini dan raih kesempatan untuk meraih kemenangan besar. Dapatkan akses mudah dan praktis ke situs OLXTOTO dan rasakan sensasi bermain judi slot yang tak terlupakan.  
  • Topics

×
×
  • Create New...

Important Information

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