Jump to content

crops 1.14


Guest

Recommended Posts

hello,

 

i have having trouble figuring out this crop thing in 1.14. i have these two classes:

seed: https://pastebin.com/h989SBxw

plant: https://pastebin.com/bjBGfWyx

 

and this is how i register my plant in my main class:

BlockInit.mplant = new MPlant(Properties.create(Material.PLANTS).doesNotBlockMovement().sound(SoundType.CROP).tickRandomly()).setRegistryName(location("mplant"));
 

the problem is the "IBlockAccess" in "seed" which i'm sure isn't correct

and also the seed wont get planted.

what am i missing here?

Link to comment
Share on other sites

  • Replies 96
  • Created
  • Last Reply

Top Posters In This Topic

25 minutes ago, DrMDGG said:

BlockInit.mplant = new

Don't use static initializers. If this isn't static, then don't assign the field yourself, use an @ObjectHolder annotation.

 

25 minutes ago, DrMDGG said:

the problem is the "IBlockAccess" in "seed" which i'm sure isn't correct

Your seed class does not have any references to IBlockAccess, it does however have to references to IBlockReader, is that what you meant? Either way, you haven't said what "the problem" is with those lines, only that you suspect that something's wrong. Other than having wrapped it in <>...

 

25 minutes ago, DrMDGG said:

and also the seed wont get planted.

Your "seed" is a CropsBlock, so its not even an item.

You have also implemented IPlantable, which is completely unnecessary.

 

Here's an example seed:

public class WinterSeedsItem extends BlockNamedItem {

	public WinterSeedsItem(Block cropBlockIn) {
		super(cropBlockIn, new Properties().group(ItemGroup.MATERIALS));
	}

	@Override
	@OnlyIn(Dist.CLIENT)
	public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
		super.addInformation(stack, worldIn, tooltip, flagIn);
		tooltip.add(new TranslationTextComponent("tooltip.harderfarming:growsColdWeather"));
	}
}

And the only reason I need an entire class for it is because I wanted to add information to the item's tooltip. If you're not doing that, then new BlockNamedItem(...) is sufficient.

 

And example crop:

public class CropWinterWheatBlock extends CropsBlock {

	public CropWinterWheatBlock() {
		super(Properties.create(Material.PLANTS).tickRandomly().hardnessAndResistance(0.0F).doesNotBlockMovement().sound(SoundType.CROP));
	}

	protected IItemProvider getSeedsItem() {
		return HarderFarming.ModItems.winter_wheat_seeds;
	}
}

 

Edited by Draco18s

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

45 minutes ago, Draco18s said:

Don't use static initializers. If this isn't static, then don't assign the field yourself, use an @ObjectHolder annotation.

 

Your seed class does not have any references to IBlockAccess, it does however have to references to IBlockReader, is that what you meant? Either way, you haven't said what "the problem" is with those lines, only that you suspect that something's wrong. Other than having wrapped it in <>...

 

Your "seed" is a CropsBlock, so its not even an item.

You have also implemented IPlantable, which is completely unnecessary.

 

Here's an example seed:


public class WinterSeedsItem extends BlockNamedItem {

	public WinterSeedsItem(Block cropBlockIn) {
		super(cropBlockIn, new Properties().group(ItemGroup.MATERIALS));
	}

	@Override
	@OnlyIn(Dist.CLIENT)
	public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
		super.addInformation(stack, worldIn, tooltip, flagIn);
		tooltip.add(new TranslationTextComponent("tooltip.harderfarming:growsColdWeather"));
	}
}

And the only reason I need an entire class for it is because I wanted to add information to the item's tooltip. If you're not doing that, then new BlockNamedItem(...) is sufficient.

 

And example crop:


public class CropWinterWheatBlock extends CropsBlock {

	public CropWinterWheatBlock() {
		super(Properties.create(Material.PLANTS).tickRandomly().hardnessAndResistance(0.0F).doesNotBlockMovement().sound(SoundType.CROP));
	}

	protected IItemProvider getSeedsItem() {
		return HarderFarming.ModItems.winter_wheat_seeds;
	}
}

 

the main problem, I'm sure, is that i followed at 1.12 tutorial with high hopes.

i tried to add this alone, and with my previous code, still they do not plant

where do i place the @ObjectHolder after removing the static initializer?

Link to comment
Share on other sites

20 minutes ago, DrMDGG said:

where do i place the @ObjectHolder after removing the static initializer?

Refer to the documentation, but as an example:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/HarderOres.java#L174

23 minutes ago, DrMDGG said:

still they do not plant

More information is required. It would be best if you posted your project as a working git repository.

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:

Refer to the documentation, but as an example:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/HarderOres.java#L174

More information is required. It would be best if you posted your project as a working git repository.

here is my git repository:  https://github.com/drmdgg/mcraft

 

looking forward to more help this way

Link to comment
Share on other sites

All of this, use @ObjectHolder. 

This should be BlockNamedItem or BlockItem as you want the item to place a block, which a regular Item can't do. In either case, it is not pointing to the class you originally said was your seed's class (MSeed), nor is that class referenced at all.

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

27 minutes ago, Draco18s said:

All of this, use @ObjectHolder. 

This should be BlockNamedItem or BlockItem as you want the item to place a block, which a regular Item can't do. In either case, it is not pointing to the class you originally said was your seed's class (MSeed), nor is that class referenced at all.

like this? : ItemList.marijuana_seed = new BlockNamedItem(null, new Item.Properties().group(marijuanaitems)).setRegistryName(location("marijuana_seed")),

 

what do i replace null with? do i reference my mseed class there, or where do i reference it?

Link to comment
Share on other sites

1 hour ago, DrMDGG said:

like this? ItemList.marijuana_seed = new BlockNamedItem(null, new Item.Properties().group(marijuanaitems)).setRegistryName(location("marijuana_seed")),

You see this bolded underlined part?

Remove it. Use annotations.

 

As for the null, you need a block there. That block would be your crop block that the seed plants.

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:

You see this bolded underlined part?

Remove it. Use annotations.

 

As for the null, you need a block there. That block would be your crop block that the seed plants.

okay, I added the @objectholder, but I don't get how to remove that without errors. what do I add before the "="?

 

also, the block was placed with the seed after doing this:

ItemList.marijuana_seed = new BlockNamedItem(BlockInit.mplant, new Item.Properties().group(marijuanaitems)).setRegistryName(location("marijuana_seed")),
however, the block spwans the "no texture" texture and doesn't break like it should, it just disappears

Edited by Guest
Link to comment
Share on other sites

12 hours ago, DrMDGG said:

what do I add before the "="?

Nothing. Literally nothing. Remove the =, I underlined and bolded it too.

 

12 hours ago, DrMDGG said:

however, the block spwans the "no texture" texture and doesn't break like it should, it just disappears

That's a separate issue for which you have no provided any log files.

Edited by Draco18s

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

16 minutes ago, Draco18s said:

Nothing. Literally nothing. Remove the =, I underlined and bolded it too.

 

That's a separate issue for which you have no provided any log files.

okay, i did everything you told me to do. 

 

the log files though...what do you need to see?

Link to comment
Share on other sites

The thing to search for is any lines containing "Exception" or "Caused By" (note that there will always be one about failing to verify the account, as the dev environment has to be configured to use a real account).

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

41 minutes ago, Draco18s said:

The thing to search for is any lines containing "Exception" or "Caused By" (note that there will always be one about failing to verify the account, as the dev environment has to be configured to use a real account).

log: https://pastebin.com/gLUi9bhy

 

i see the "caused by" in there due to the mplant. i'm assuming its the lack of references in my classes?

Link to comment
Share on other sites

27 minutes ago, DrMDGG said:

i see the "caused by" in there due to the mplant. i'm assuming its the lack of references in my classes?

What the heck is going on on this line?

Quote

at drmdgg.marijuanacraft.MarijuanaCraft$RegistryEvents.registerBlocks(MarijuanaCraft.java:155)

 

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:

What the heck is going on on this line?

 

BlockInit.clone = new Clone(new PotPlant(),Block.Properties.create(Material.PLANTS).hardnessAndResistance(0, 0).sound(SoundType.PLANT).harvestTool(null).harvestLevel(0)).setRegistryName(location("clone")),

 

its for my trees, why?

Link to comment
Share on other sites

1 minute ago, DrMDGG said:

its for my trees, why?

Because there is an error on that line. Do you not know how to read a crash report?

 

2 minutes ago, DrMDGG said:

.harvestTool(null)

I don't believe you are allowed to pass null here. There is no reason for you to call it at all either.

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:

Because there is an error on that line. Do you not know how to read a crash report?

 

I don't believe you are allowed to pass null here. There is no reason for you to call it at all either.

yeah. i havent finished that section (havent added the tooltype yet)

 

thats not what im trying to accomplish here

Link to comment
Share on other sites

1 minute ago, DrMDGG said:

thats not what im trying to accomplish here

It looks like from the crash report it's not allowing your mod to load all the way.

Quote

[09Oct2019 09:40:54.291] [Server-Worker-1/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.

 

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

2 minutes ago, Animefan8888 said:

It looks like from the crash report it's not allowing your mod to load all the way.

 

ill change it. but the mod loads fine. its my crops im working on

Link to comment
Share on other sites

2 minutes ago, DrMDGG said:

ill change it. but the mod loads fine. its my crops im working on

Then I'd like to ask two questions.

Why aren't your textures showing up and why isnt there an error in the log file about them?

 

3 minutes ago, DrMDGG said:

its my crops im working on

You shouldn't partially work on something then before it's done move onto another thing. Its bound to cause errors like this.

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

6 minutes ago, Animefan8888 said:

Then I'd like to ask two questions.

Why aren't your textures showing up and why isnt there an error in the log file about them?

 

You shouldn't partially work on something then before it's done move onto another thing. Its bound to cause errors like this.

aside from that change (which didn't change anything to do with the textures (and all my other items and blocks are loading)) the only thing I'm still yet to work on it getting the leaves to spawn properly. which wasn't holding back anything.

 

 

Link to comment
Share on other sites

45 minutes ago, DrMDGG said:

aside from that change (which didn't change anything to do with the textures (and all my other items and blocks are loading)) the only thing I'm still yet to work on it getting the leaves to spawn properly. which wasn't holding back anything.

Post new log.

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 hours ago, DrMDGG said:

none of my recipes are working

Yes, because:

Quote
  1. [09Oct2019 11:56:44.520] [Server thread/ERROR] [net.minecraft.item.crafting.RecipeManager/]: Parsing error loading recipe marijuanacraft:alcmix2recipesmelting
  2. com.google.gson.JsonSyntaxException: Unknown item tag 'marijuanacraft:alcmix1'

And you've got ten more like it.

 

When data pack loading fails, it often causes all data packs to not be loaded (I had a bad advancement once that made vanilla recipes not work).

Edited by Draco18s

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

7 minutes ago, Draco18s said:

Yes, because:

 

i don't get it. i didn't touch that and it was working before i was told to fix the "null" for harvest tool in my trees registry

 

alcmix1

{
    "type": "minecraft:smelting",
    "ingredient": { "tag": "marijuanacraft:alcmix1" },
    "result": "marijuanacraft:alcmix2",
    "experience": 2.3,
    "cookingtime": 150
}

 

alcmix2:

 

{
    "type": "minecraft:crafting_shaped",
    
    "pattern":
    [
        " f ",
        " w ",
        " e "
    ],    
    
    "key":
    {
        "f": { "item": "marijuanacraft:fermp" },
        "w": { "item": "minecraft:water_bucket" },
        "e": { "item": "minecraft:bottle" }
        },
    
    "result": { "item": "marijuanacraft:alcmix1" },
    "count": 1
}

Edited by Guest
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 TAYO4D   Slot gacor online adalah permainan yang menarik dan menghasilkan keuntungan untuk banyak pemain di seluruh dunia. Dalam artikel ini, kita akan membahas tentang cara memilih dan memainkan slot gacor online terbaik.
    • Tayo4D : Bandar Online Togel Dan Slot Terbesar Di Indonesia     Pemain taruhan Tayo4D yang berkualitas memerlukan platform yang aman, terpercaya, dan mudah digunakan. Dalam era teknologi ini, banyak situs online yang menawarkan layanan taruhan togel 4D, tetapi memilih yang tepat menjadi tuntas. Berikut adalah cara untuk membuat artikel yang membahas tentang situs online terpercaya untuk permainan taruhan togel 4D.  
    • OLXTOTO: Platform Maxwin dan Gacor Terbesar Sepanjang Masa OLXTOTO telah menetapkan standar baru dalam dunia perjudian dengan menjadi platform terbesar untuk pengalaman gaming yang penuh kemenangan dan kegacoran, sepanjang masa. Dengan fokus yang kuat pada menyediakan permainan yang menghadirkan kesenangan tanpa batas dan peluang kemenangan besar, OLXTOTO telah menjadi pilihan utama bagi para pencinta judi berani di Indonesia. Maxwin: Mengejar Kemenangan Terbesar Maxwin bukan sekadar kata-kata kosong di OLXTOTO. Ini adalah konsep yang ditanamkan dalam setiap aspek permainan yang mereka tawarkan. Dari permainan slot yang menghadirkan jackpot besar hingga berbagai opsi permainan togel dengan hadiah fantastis, para pemain dapat memperoleh peluang nyata untuk mencapai kemenangan terbesar dalam setiap taruhan yang mereka lakukan. OLXTOTO tidak hanya menawarkan kesempatan untuk menang, tetapi juga menjadi wadah bagi para pemain untuk meraih impian mereka dalam perjudian yang berani. Gacor: Keberuntungan yang Tak Tertandingi Keberuntungan seringkali menjadi faktor penting dalam perjudian, dan OLXTOTO memahami betul akan hal ini. Dengan berbagai strategi dan analisis yang disediakan, pemain dapat menemukan peluang gacor yang tidak tertandingi dalam setiap taruhan. Dari hasil togel yang tepat hingga putaran slot yang menguntungkan, OLXTOTO memastikan bahwa setiap taruhan memiliki potensi untuk menjadi momen yang mengubah hidup. Inovasi dan Kualitas Tanpa Batas Tidak puas dengan prestasi masa lalu, OLXTOTO terus berinovasi untuk memberikan pengalaman gaming terbaik kepada para pengguna. Dengan menggabungkan teknologi terbaru dengan desain yang ramah pengguna, platform ini menyajikan antarmuka yang mudah digunakan tanpa mengorbankan kualitas. Setiap pembaruan dan peningkatan dilakukan dengan tujuan tunggal: memberikan pengalaman gaming yang tanpa kompromi kepada setiap pengguna. Komitmen Terhadap Kepuasan Pelanggan Di balik kesuksesan OLXTOTO adalah komitmen mereka terhadap kepuasan pelanggan. Tim dukungan pelanggan yang profesional siap membantu para pemain dalam setiap langkah perjalanan gaming mereka. Dari pertanyaan teknis hingga bantuan dengan transaksi keuangan, OLXTOTO selalu siap memberikan pelayanan terbaik kepada para pengguna mereka. Penutup: Mengukir Sejarah dalam Dunia Perjudian Daring OLXTOTO bukan sekadar platform perjudian berani biasa. Ini adalah ikon dalam dunia perjudian daring Indonesia, sebuah destinasi yang menyatukan kemenangan dan keberuntungan dalam satu tempat yang mengasyikkan. Dengan komitmen mereka terhadap kualitas, inovasi, dan kepuasan pelanggan, OLXTOTO terus mengukir sejarah dalam perjudian dunia berani, menjadi nama yang tak terpisahkan dari pengalaman gaming terbaik. Bersiaplah untuk mengalami sensasi kemenangan terbesar dan keberuntungan tak terduga di OLXTOTO - platform maxwin dan gacor terbesar sepanjang masa.
    • OLXTOTO - Bandar Togel Online Dan Slot Terbesar Di Indonesia OLXTOTO telah lama dikenal sebagai salah satu bandar online terkemuka di Indonesia, terutama dalam pasar togel dan slot. Dengan reputasi yang solid dan pengalaman bertahun-tahun, OLXTOTO menawarkan platform yang aman dan andal bagi para penggemar perjudian daring. DAFTAR OLXTOTO DISINI DAFTAR OLXTOTO DISINI DAFTAR OLXTOTO DISINI Beragam Permainan Togel Sebagai bandar online terbesar di Indonesia, OLXTOTO menawarkan berbagai macam permainan togel. Mulai dari togel Singapura, togel Hongkong, hingga togel Sidney, pemain memiliki banyak pilihan untuk mencoba keberuntungan mereka. Dengan sistem yang transparan dan hasil yang adil, OLXTOTO memastikan bahwa setiap taruhan diproses dengan cepat dan tanpa keadaan. Slot Online Berkualitas Selain togel, OLXTOTO juga menawarkan berbagai permainan slot online yang menarik. Dari slot klasik hingga slot video modern, pemain dapat menemukan berbagai opsi permainan yang sesuai dengan preferensi mereka. Dengan grafis yang memukau dan fitur bonus yang menggiurkan, pengalaman bermain slot di OLXTOTO tidak akan pernah membosankan. Keamanan dan Kepuasan Pelanggan Terjamin Keamanan dan kepuasan pelanggan merupakan prioritas utama di OLXTOTO. Mereka menggunakan teknologi enkripsi terbaru untuk melindungi data pribadi dan keuangan para pemain. Tim dukungan pelanggan yang ramah dan responsif siap membantu pemain dengan setiap pertanyaan atau masalah yang mereka hadapi. Promosi dan Bonus Menarik OLXTOTO sering menawarkan promosi dan bonus menarik kepada para pemainnya. Mulai dari bonus selamat datang hingga bonus deposit, pemain memiliki kesempatan untuk meningkatkan kemenangan mereka dengan memanfaatkan berbagai penawaran yang tersedia. Penutup Dengan reputasi yang solid, beragam permainan berkualitas, dan komitmen terhadap keamanan dan kepuasan pelanggan, OLXTOTO tetap menjadi salah satu pilihan utama bagi para pecinta judi online di Indonesia. Jika Anda mencari pengalaman berjudi yang menyenangkan dan terpercaya, OLXTOTO layak dipertimbangkan.
    • I have been having a problem with minecraft forge. Any version. Everytime I try to launch it it always comes back with error code 1. I have tried launching from curseforge, from the minecraft launcher. I have also tried resetting my computer to see if that would help. It works on my other computer but that one is too old to run it properly. I have tried with and without mods aswell. Fabric works, optifine works, and MultiMC works aswell but i want to use forge. If you can help with this issue please DM on discord my # is Haole_Dawg#6676
  • Topics

×
×
  • Create New...

Important Information

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