Jump to content

[Un-solved] How are blocks rendered


Zealock

Recommended Posts

Hey, i'm looking for a way to modify blocks being rendered on a client.

 

For instance i want to make certain blocks become invisible until someone gets close, a good example of what i'm trying to do is to place a barrier on the ground and change your held item to something else until the barrier on the ground goes invisible, thats what i'm going for.

 

A few things have crossed my mind and one was using a core mod and modify the BlockBarrier.class and override the (getRenderType()) method to return a variable for dynamic modification (like when a player gets close i can set it to either 3 or -1). (i believe -1 ignores rendering, 3 renders like a normal block please confirm this :) ) 

 

Whats the best way to achieve this? I'm currently using minecraft forge 1.8.9

Edited by Zealock
Going to use TESR to achieve my goal, thanks all :)
Link to comment
Share on other sites

8 hours ago, Zealock said:

A few things have crossed my mind and one was using a core mod and modify the BlockBarrier.class and override the (getRenderType()) method to return a variable for dynamic modification (like when a player gets close i can set it to either 3 or -1). (i believe -1 ignores rendering, 3 renders like a normal block please confirm this :) )

This is a horrible idea. Bad modder, no cookie.  Core mods are not allowed here.

 

I suspect the easiest way to do what you want to do will be to use a TESR, although I don't know if it would be possible using a FastTESR, but if so, that would be better.

  • 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

14 hours ago, Zealock said:

core mod and modify the BlockBarrier.class

You might have missed a pillar of Forge ideology: simply extend the class, override what methods you want to change, and use this new class...

You don't HAVE to use Barrier blocks, you WANT to use something that works like Barrier blocks.
ASM is incredibly bad if you don't know what you are doing, and as time and time again has been proven by countless users in the MC modding community, unless you have a few years of expertise, chances are that you do not.
In fact, countless core-mods could do what was stated above, and look at that, no ASM needed at all.
 

To make something go invisible, a FastTESR could be used. Override getMaxRenderDistanceSquared in the TE to return the cutoff-point for (rendering->not-rendering)². Default is 4096 (64 block / 4 chunks distance)

Simple, yet effective way of turning invisible, with minimal code required.

  • Like 1

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

Got it, coremods are a no-go thanks for clearing that up :)

 

Wont using TESR for something like this become laggy if there are a lot of blocks? if so my main goal is really to just switch the texture of a block dynamically (and don't need any animation either) when a player walks too close to zones they're not allowed in yet.

 

I couldn't really find anything that suggests I can override a vanilla block which is kind of why I walked closer towards the dark arts of core mods O.o

 

I also want to keep the server vanilla, This way I can still allow vanilla clients along with an enhanced experience if people want to try out Forge.

Link to comment
Share on other sites

2 hours ago, Zealock said:

Wont using TESR for something like this become laggy if there are a lot of blocks? if so my main goal is really to just switch the texture of a block dynamically (and don't need any animation either) when a player walks too close to zones they're not allowed in yet.

Not as bad as you're thinking. You need thousands of them.  All being rendered at the same time. If the TE itself isn't ticking, it doesn't apply any impact.

2 hours ago, Zealock said:

I couldn't really find anything that suggests I can override a vanilla block which is kind of why I walked closer towards the dark arts of core mods O.o

You're not overriding a vanilla block, you're extending it.

2 hours ago, Zealock said:

I also want to keep the server vanilla, This way I can still allow vanilla clients along with an enhanced experience if people want to try out Forge.

Hahaha no.

While you could certainly tell Forge, "the client doesn't need my mod" and the client will connect, they're not going to see all the special blocks and items you've added.  This custom barrier block thing-a-jig you're making? That requires the code to exist on the client for it to work.

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

Quote

I also want to keep the server vanilla, This way I can still allow vanilla clients along with an enhanced experience if people want to try out Forge.

Hahaha no.

While you could certainly tell Forge, "the client doesn't need my mod" and the client will connect, they're not going to see all the special blocks and items you've added.  This custom barrier block thing-a-jig you're making? That requires the code to exist on the client for it to work.

Well, this is just an enhancement mod for a vanilla server minigame, which is why i wanted to modify Barriers and various other things on the forge client to behave differently to vanilla (who dont see them at all).

 

Ill use TESR/FastTESR, it does sound like the easiest way so far.

 

Sorry for mixing the terms overriding and extending you're right (extending the class, and overriding the methods), it was just my heads way of explaining what i was doing :P

 

Thanks for alerting me to TESR i probably would have done some unnecessary work if i didnt get told, saved me some future headaches 

 

Edited by Zealock
I submitted the response early, added the rest of the reply
Link to comment
Share on other sites

On 6/16/2017 at 11:53 PM, Zealock said:

Hey, i'm looking for a way to modify blocks being rendered on a client.

 

For instance i want to make certain blocks become invisible until...

Sounds like an X-ray cheat in the making. I'm surprised this thread hasn't been locked already.

Edited by jeffryfisher

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

26 minutes ago, jeffryfisher said:

Sounds like an X-ray cheat in the making. I'm surprised this thread hasn't been locked already.

Nah, he's trying to do something else. I think.

  • 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

3 hours ago, jeffryfisher said:

Sounds like an X-ray cheat in the making. I'm surprised this thread hasn't been locked already.

Quite the opposite, I'm giving barrier blocks a forcefield view/sound upon reaching close proximity.


It's an enhancement mod for a vanilla mini game I'm working on.

Link to comment
Share on other sites

So im having troubles on where to begin, i just need help getting started, i can do all the render code my self im just a little unsure on what the procedure is..

 

Is it possible to render an overlay on the barrier block using an existing block texture, such as: Rendering the overlay obsidian over the barrier using tesr?

thanks

Edited by Zealock
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Asusslot adalah bocoran slot rekomendasi gacor dari Asusslot yang bisa anda temukan di SLOT Asusslot. Situs SLOT Asusslot hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Asusslot terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Asusslot merupakan SLOT Asusslot hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Asusslot. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Asusslot hari ini yang telah disediakan SLOT Asusslot. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Asusslot terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Asusslot terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Asusslot di link SLOT Asusslot.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Galeri555 adalah bocoran slot rekomendasi gacor dari Galeri555 yang bisa anda temukan di SLOT Galeri555. Situs SLOT Galeri555 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Galeri555 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Galeri555 merupakan SLOT Galeri555 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Galeri555. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Galeri555 hari ini yang telah disediakan SLOT Galeri555. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Galeri555 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Galeri555 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Galeri555 di link SLOT Galeri555.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Kocok303 adalah bocoran slot rekomendasi gacor dari Kocok303 yang bisa anda temukan di SLOT Kocok303. Situs SLOT Kocok303 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Kocok303 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Kocok303 merupakan SLOT Kocok303 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Kocok303. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Kocok303 hari ini yang telah disediakan SLOT Kocok303. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Kocok303 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Kocok303 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Kocok303 di link SLOT Kocok303.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Slot Aster88 adalah bocoran slot rekomendasi gacor dari Aster88 yang bisa anda temukan di SLOT Aster88. Situs SLOT Aster88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Aster88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Aster88 merupakan SLOT Aster88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Aster88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Aster88 hari ini yang telah disediakan SLOT Aster88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Aster88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Aster88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Aster88 di link SLOT Aster88.
    • 🚀Link Daftar Klik Disini🚀 Tips Bermain Slot Bank Jago agar Meraih Maxwin dan Jackpot di MAXWINBET77 Bermain slot online Bank jago adalah cara yang seru dan mengasyikkan untuk mencari keuntungan besar di MAXWINBET77. Jika kamu ingin meningkatkan peluangmu untuk meraih maxwin dan jackpot secara terus-menerus, ada beberapa tips dan strategi yang bisa kamu terapkan. Berikut adalah panduan lengkapnya: Pilih Slot dengan RTP Tinggi: RTP (Return to Player) adalah persentase rata-rata dari total taruhan yang dikembalikan kepada pemain sebagai kemenangan. Pilihlah mesin slot Bank jago yang memiliki RTP tinggi, karena ini meningkatkan peluangmu untuk meraih kemenangan dalam jangka panjang. Kenali Fitur Bonus: Setiap slot Bank jago memiliki fitur bonus yang berbeda, seperti putaran gratis, simbol liar (wild), dan bonus game. Pelajari dengan baik fitur-fitur ini karena mereka dapat membantu meningkatkan peluang meraih kemenangan besar. Kelola Taruhan dengan Bijak: Tentukan batasan taruhan yang sesuai dengan budget dan jangan tergoda untuk bertaruh melebihi kemampuan finansialmu. Terapkan strategi taruhan yang bijak untuk memaksimalkan penggunaan saldo. Mainkan Slot Bank jago Progresif: Jika tujuanmu adalah meraih jackpot besar, coba mainkan slot Bank jago progresif di MAXWINBET77. Jackpot pada jenis slot Bank ini terus bertambah seiring dengan taruhan pemain lainnya, sehingga dapat mencapai jumlah yang sangat besar. Manfaatkan Promosi dan Bonus: MAXWINBET77 sering kali menawarkan promosi dan bonus kepada pemainnya. Manfaatkan bonus-bonus ini untuk meningkatkan peluangmu meraih kemenangan tanpa menggunakan modal tambahan. Berkonsentrasi dan Bersabar: Fokuslah saat bermain slot bank jago dan jangan terburu-buru. Bersabarlah meskipun tidak langsung mendapatkan hasil yang diharapkan. Kadang-kadang diperlukan waktu dan keberuntungan untuk mencapai maxwin atau jackpot. Baca Aturan Permainan: Sebelum bermain, pastikan untuk membaca aturan dan pembayaran pada slot Bank Jago yang dipilih. Mengetahui cara kerja mesin slot akan membantu mengoptimalkan strategi bermainmu. Dengan menerapkan tips-tips di atas dan tetap bermain secara bertanggung jawab, kamu dapat meningkatkan peluang meraih maxwin dan jackpot di Slot Bank Jago MAXWINBET77. Selamat bermain dan semoga sukses meraih kemenangan besar Anda Hari Ini.
  • Topics

×
×
  • Create New...

Important Information

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