Jump to content

Event That Fired When the Player Pickups An Arrow From Ground?


JanneSoon

Recommended Posts

Hello everyone. I'm stuck at somewhere in modding. I need to customize the arrow drop (getting the arrow back from the ground you shot). All i want is; the EntityArrow on the ground gives Broken Arrow(my mod item) by a chance instead of Arrow item from vanilla. Isn't it possible to do?

I looked into LivingDropsEvent, EntityItemPickupEvent and ItemPickupEvent but i couldn't find a way to do it. These events fired only when the player pickups an arrow as an item(dropped item) from the ground. Help me please :(

Thank you.

I'm currently on 1.12.2

Edited by JanneSoon
Link to comment
Share on other sites

6 hours ago, JanneSoon said:

:( There's no way to do that i wish so?

You can still do it but would require doing something a bit intrusive. For example, one approach is to replace all EntityArrow with your own version that extends EntityArrow and overrides the collision method.

 

Another approach would be to set the public pickupStatus field in every EntityArrow to EntityArrow.PickupStatus.DISALLOWED and then handle the entity update event and process the collision yourself.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

  • 2 weeks later...
On 7/26/2018 at 1:12 AM, jabelar said:

You can still do it but would require doing something a bit intrusive. For example, one approach is to replace all EntityArrow with your own version that extends EntityArrow and overrides the collision method.

 

Another approach would be to set the public pickupStatus field in every EntityArrow to EntityArrow.PickupStatus.DISALLOWED and then handle the entity update event and process the collision yourself.

Could you also use reflection to replace that bit of code that handles pickups in EntityArrow with your code?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

7 minutes ago, Cadiboo said:

Could you also use reflection to replace that bit of code that handles pickups in EntityArrow with your code?

No, reflection allows you to access code that would otherwise be inaccessible, it doesn't allow you to modify a method.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Just now, Animefan8888 said:

No, reflection allows you to access code that would otherwise be inaccessible, it doesn't allow you to modify a method.

I meant ASM, isn’t ASM an advanced form of reflection?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Just now, Cadiboo said:

I meant ASM, isn’t ASM an advanced form of reflection?

No they are completely different, and ASM is a terrible thing that is not recommended on this forum.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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

    • Slot Deposit 1000 Via Dana = Situs Slot Online Gacor Modal Receh Tanpa potongan Deposit 1rb 1000 1k 1ribu 5k 5ribu 5000 Dana ▶️▶️DAFTAR◀️◀️ ▶️▶️DAFTAR◀️◀️ Dalam dunia perjudian daring, menemukan situs yang menawarkan deposit terjangkau dengan peluang besar untuk menang adalah impian setiap pemain. Salah satu situs yang patut dipertimbangkan adalah Lambo77. Berikut adalah ulasan singkat tentang situs ini: Deposit 1000 Via Dana Tanpa Potongan Lambo77 menawarkan kesempatan kepada para pemain untuk melakukan deposit melalui layanan Dana dengan nominal seribu tanpa dikenakan potongan apa pun. Ini memberi Anda kemudahan dan fleksibilitas dalam melakukan transaksi. Modal Receh dengan Deposit 1rb 1000 1k 1ribu 5k 5ribu 5000 Situs ini memahami bahwa tidak semua pemain memiliki modal besar untuk bermain. Oleh karena itu, mereka menyediakan opsi deposit dengan nominal yang sangat terjangkau, mulai dari 1rb hingga 5000, sehingga siapa pun bisa bergabung dan merasakan keseruan permainan slot. Slot Online Gacor dengan Peluang Menang Besar Lambo77 dikenal sebagai tempat di mana para pemain bisa menemukan slot online yang gacor, artinya memiliki peluang besar untuk meraih kemenangan. Dengan modal receh yang Anda depositkan, Anda bisa bermain dan memiliki kesempatan untuk memenangkan hadiah besar. Tanpa Potongan Salah satu keuntungan utama bermain di Lambo77 adalah tidak adanya potongan dalam setiap transaksi deposit. Ini berarti Anda dapat menggunakan seluruh saldo yang Anda depositkan untuk bermain tanpa kehilangan sebagian karena potongan. Dengan kombinasi deposit yang terjangkau, peluang menang yang besar, dan transaksi tanpa potongan, Lambo77 menjadi pilihan yang sangat menarik bagi para pecinta slot online. Jadi, jangan ragu untuk bergabung dan rasakan keseruannya sekarang juga!  
    • ☾☾ KLIK DAFTAR DI SINI ☽☽ ☾☾ KLIK DAFTAR DI SINI ☽☽ ☾☾ KLIK DAFTAR DI SINI ☽☽     SLOT BANK BNI merupakan situs daftar bandar judol yang deposit menggunakan bank bni hanya 1menit Langsung masuk di dalam akun anda. SLOT BANK BNI menyediakan berbagai macam game slot online terlengkap provider termasuk daftar deposit via bank bni dan semua game slot gacor maxwin terbaru 2024.    
    • Selamat datang di SLOT188 salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor SLOT188 ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini SLOT188.
    • Selamat datang di SLOT4D salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor SLOT4D ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini SLOT4D.
  • Topics

×
×
  • Create New...

Important Information

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