Jump to content

crops 1.14


Guest

Recommended Posts

6 minutes ago, Animefan8888 said:

It exists in the Block class. You need to override it in your Block class I believe is called MPlant.

there's only two things that don't have an @Override already:

 

    public MPlant(Properties builder)
    {
        super(builder);
        this.setDefaultState(this.stateContainer.getBaseState().with(this.getAgeProperty(), Integer.valueOf(0)));
    }

_____________________________________________________________________________________________________________

and this one: 

 

 @OnlyIn(Dist.CLIENT)
    public ItemStack getItem(IBlockReader worldIn, BlockPos pos, BlockState state)
    {
       return new ItemStack(this.getSeedsItem());
    }

 

 

 

I assume its the first one?

 

 

edit: nevermind. its not the first one

Edited by Guest
Link to comment
Share on other sites

  • Replies 96
  • Created
  • Last Reply

Top Posters In This Topic

Just now, DrMDGG said:

I assume its the first one?

No. You don't know Java do you? First the @Override annotation doesn't actually do anything. It just lets you know that you are overriding a method from a parent class(hurray for inheritance). Secondly the method is a new one you have to add to your class. If it doesn't exist with the name fillStateContainer then it's likely that you are using an outdated version of forge. I'm only on 28.1.19

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

38 minutes ago, Animefan8888 said:

No. You don't know Java do you? First the @Override annotation doesn't actually do anything. It just lets you know that you are overriding a method from a parent class(hurray for inheritance). Secondly the method is a new one you have to add to your class. If it doesn't exist with the name fillStateContainer then it's likely that you are using an outdated version of forge. I'm only on 28.1.19

yeah. I updated forge, and low and behold, it came up.

https://github.com/drmdgg/marijuanacraft/blob/master/src/main/java/drmdgg/marijuanacraft/init/blocks/plants/MPlant.java

 

so I added that and changed getAge to getCropAge

 

what did I do wrong?

Link to comment
Share on other sites

2 minutes ago, DrMDGG said:

what did I do wrong?

I assume the same "error" is happening?

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

On 10/13/2019 at 9:11 AM, Animefan8888 said:

I assume the same "error" is happening?

is this error happening due to the lack of references to my plant seed not being in my seed class and the mplant class not referencing my mplant?

Link to comment
Share on other sites

You only need two references:

 

  1. The block instance is passed to the seed item's constructor
  2. The item instance is returned in the block's getSeedsItem method via a ModItems (ItemList) reference.

That's it.

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

4 minutes ago, Draco18s said:

You only need two references:

 

  1. The block instance is passed to the seed item's constructor
  2. The item instance is returned in the block's getSeedsItem method via a ModItems (ItemList) reference.

That's it.

okay, well it has all that...so what's the problem. at one point I get this in my runclient:

[16:51:03] [Server-Worker-2/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'marijuanacraft:blockstates/mplant.json' in resourcepack: 'main' for variant: 'age=5': Unknown blockstate property: 'age'

 

 

Link to comment
Share on other sites

56 minutes ago, DrMDGG said:

Exception loading blockstate definition: 'marijuanacraft:blockstates/mplant.json' in resourcepack: 'main' for variant: 'age=5': Unknown blockstate property: 'age'

For some reason it isnt recognizing that your block has an age property and when it is reading the blockstate json its seeing this and going "HUH?!?!"

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

3 minutes ago, Animefan8888 said:

For some reason it isnt recognizing that your block has an age property and when it is reading the blockstate json its seeing this and going "HUH?!?!"

any guesses on how to fix that? I've checked that json file and the others a billion times against the carrots and the wheat (which are obviously the same)

Link to comment
Share on other sites

4 minutes ago, DrMDGG said:

any guesses on how to fix that? I've checked that json file and the others a billion times against the carrots and the wheat (which are obviously the same)

The problem doesnt lie within the json. The problem lies within the code. Specifically why your block isnt getting the age property. Have you looked at the f3 screen while looking at your block to see if it has the age property on the right hand side of the screen?

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

10 minutes ago, Animefan8888 said:

The problem doesnt lie within the json. The problem lies within the code. Specifically why your block isnt getting the age property. Have you looked at the f3 screen while looking at your block to see if it has the age property on the right hand side of the screen?

it definitely does not

mcraftf3.png

Link to comment
Share on other sites

6 minutes ago, DrMDGG said:

it definitely does not

Double check that in your fillStateContainer method you add your age property to the Builder parameter.

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

15 minutes ago, Animefan8888 said:

Double check that in your fillStateContainer method you add your age property to the Builder parameter.

like this?

 

    @Override
    protected void fillStateContainer(Builder<Block, BlockState> builder) {
        
        builder.add(CROP_AGE);
        
        

Link to comment
Share on other sites

2 hours ago, Animefan8888 said:

Double check that in your fillStateContainer method you add your age property to the Builder parameter.

okay, so I triple...or maybe quadruple checked the cropsblock class and the code there is "builder.add(AGE);"

but if i'm extending CropsBlock then shouldn't all the age stuff be automatically added and unnecessary for me to add?

Link to comment
Share on other sites

1 minute ago, DrMDGG said:

but if i'm extending CropsBlock then shouldn't all the age stuff be automatically added and unnecessary for me to add?

Exactly make sure your fillStateContainer is being called though. I'm curious if something is broken.

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

12 hours ago, Animefan8888 said:

Exactly make sure your fillStateContainer is being called though. I'm curious if something is broken.

i also noticed that it will spawn on any block, not just farmland

Link to comment
Share on other sites

I suspect that the block being used by your seed item is not actually your crop block. But with the code you have, I'm not sure why that is.

My guess is that the item you're holding is not the one that we've been talking about, but another item entirely.

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

1 hour ago, Draco18s said:

I suspect that the block being used by your seed item is not actually your crop block. But with the code you have, I'm not sure why that is.

My guess is that the item you're holding is not the one that we've been talking about, but another item entirely.

I've gone through all my code. i must have missed something. 

 

you've seen my code in full. what item or block could possibly be doing this?

Link to comment
Share on other sites

58 minutes ago, DrMDGG said:

you've seen my code in full. what item or block could possibly be doing this?

*Shrug*

From my point of view, you created a bunch of stuff all at once (maybe copy-pasted from an old version?) without checking any of it to make sure it worked before going for more.

 

Always work on one block or item or system at a time, make sure its working 100%* before moving on to another.

 

*Sure, there are things that interleave sometimes, such as a crop and its seed, those can be worked on as a single operational group. And sometimes you need to break a thing down into smaller pieces and work on them and they won't be 100% until the larger structure is done, but you can handle that with placeholders and TODOs, but there you know what part isn't complete when you test it (for example, my ore system relies heavily on Custom Ore Gen and several ore generation events that don't exist, but that doesn't mean I can't make the blocks, items, loot tables, recipes, and enchantments, I just know I can't test the ore gen and prospecting systems until those events exist).

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

9 minutes ago, Draco18s said:

*Shrug*

From my point of view, you created a bunch of stuff all at once (maybe copy-pasted from an old version?) without checking any of it to make sure it worked before going for more.

 

Always work on one block or item or system at a time, make sure its working 100%* before moving on to another.

 

*Sure, there are things that interleave sometimes, such as a crop and its seed, those can be worked on as a single operational group. And sometimes you need to break a thing down into smaller pieces and work on them and they won't be 100% until the larger structure is done, but you can handle that with placeholders and TODOs, but there you know what part isn't complete when you test it (for example, my ore system relies heavily on Custom Ore Gen and several ore generation events that don't exist, but that doesn't mean I can't make the blocks, items, loot tables, recipes, and enchantments, I just know I can't test the ore gen and prospecting systems until those events exist). 

the original mod I made was for 1.8.9 so I couldn't copy anything.
but now everything is working order except for these damn crops thanks to you guys. I guess I'll just have to figure this out on my own if you can't help me further. thanks for the help. you'll be in my credits lol

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

    • 🚀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.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 SLOT BCA 10K adalah bocoran slot rekomendasi gacor dari RATUASIA77 yang bisa anda temukan di SLOT BCA 10K. Situs SLOT BCA 5K hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT BSI 5K terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT BCA 10K merupakan SLOT BCA 10K 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 BSI 10K. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT BCA 10K hari ini yang telah disediakan SLOT BCA 10K. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs RATUASIA77 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 BCA 10K terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT BCA 10K di link SLOT BCA RATUASIA77.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 SLOT BSI 10K adalah bocoran slot rekomendasi gacor dari RATUASIA77 yang bisa anda temukan di SLOT BSI 10K. Situs SLOT BSI 5K hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT BSI 5K terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT BSI 10K merupakan SLOT BSI 10K 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 BSI 10K. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT BSI 10K hari ini yang telah disediakan SLOT BSI 10K. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs RATUASIA77 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 BSI 10K terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT BSI 10K di link SLOT BSI RATUASIA77.
    • DAFTAR SCATTER HITAM MAHJONG WAYS DISINI DAFTAR SCATTER HITAM MAHJONG WAYS DISINI DAFTAR SCATTER HITAM MAHJONG WAYS DISINI Mencari scatter hitam dalam permainan slot demo mahjong ways server thailand adalah salah satu jalan menuju kemenangan melalui bentuk kombinasi pola. Mengetahui bocoran pola scatter dapat meningkatkan peluang kemenangan jackpot maxwin yang cukup besar. TAG : Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam
    • DAFTAR SCATTER HITAM MAHJONG DISINI DAFTAR SCATTER HITAM MAHJONG DISINI DAFTAR SCATTER HITAM MAHJONG DISINI Scatter Hitam merupakan salah satu provider Pg Soft dari game slot mahjong ways terpopuler dan terkenal saat ini dengan inovasi terbaru scatter hitam bisa menghasilkan kemenangan maxwin jackpot yang luar biasa sangat besar. TAG : Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam
  • Topics

×
×
  • Create New...

Important Information

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