Jump to content

Recommended Posts

Posted (edited)

Tying to add a property which is stored inside a tile entity to a block when the block gets crafted. I can add the property with JSON files but don't want to make hundreds of files.

 

Hoping working on IRecipe for few days and hoping someone could point me in the right direction :)

 

_factory file

  Reveal hidden contents
 
 
 

RecipeTents.java

  Reveal hidden contents
 
 
 
Edited by tomtomtom09
Updated code

Developer of CampCraft

Posted
  On 8/22/2018 at 5:55 PM, tomtomtom09 said:

Tying to add a property which is stored inside a tile entity to a block when the block gets crafted. I can add the property with JSON files but don't want to make hundreds of files.

 

Hoping working on IRecipe for few days and hoping someone could point me in the right direction :)

 

_factory file.

  Reveal hidden contents
 
 
  Reveal hidden contents
 

 

Expand  

If you can make them in JSON, do. This is so that they can be disabled by data packs in 1.13, and allow customisation of your mod. If you’ve got a lot of recipes, write some code to do it for you! Your a programmer, you have god powers!

About Me

  Reveal hidden contents

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)

Posted
  On 8/23/2018 at 3:05 PM, Cadiboo said:

If you can make them in JSON, do. This is so that they can be disabled by data packs in 1.13, and allow customisation of your mod. If you’ve got a lot of recipes, write some code to do it for you! Your a programmer, you have god powers!

Expand  

I've got a lot of customisation in one block would be too many json files to even think about.

With this IRecipe file would make it easier to create the recipes, I just can't figure out how to get it to craft my block.

Do I need to register the RecipeTents file anywhere else?

Developer of CampCraft

Posted
  On 8/23/2018 at 3:28 PM, tomtomtom09 said:

Do I need to register the RecipeTents file anywhere else?

Expand  

The recommended way of adding recipes is with a JSON, why would it be too many? Create them with code if that is easier.

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.

Posted
  On 8/23/2018 at 3:28 PM, tomtomtom09 said:

I've got a lot of customisation in one block would be too many json files to even think about.

With this IRecipe file would make it easier to create the recipes, I just can't figure out how to get it to craft my block.

Do I need to register the RecipeTents file anywhere else?

Expand  

If it’s something like dyeing/repairing armor or making fireworks, use code. If it’s _anything_ else use json

About Me

  Reveal hidden contents

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)

Posted
  On 8/24/2018 at 4:56 AM, diesieben07 said:

No. Use JSON, period. Custom factories exist for a reason.

Expand  

How would you implement repairing armor with json?

About Me

  Reveal hidden contents

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)

Posted
  On 8/23/2018 at 7:07 PM, Animefan8888 said:

The recommended way of adding recipes is with a JSON, why would it be too many? Create them with code if that is easier.

Expand  

Got a lot of stored types inside the block which creates a different tent depending on the crafting input.

Just an example of the planning.

  Reveal hidden contents
 
  On 8/24/2018 at 5:45 AM, diesieben07 said:

You implement IRecipeFactory to produce an IRecipe that does the repairing based on input from JSON. You could then specify the type of armor the recipe works with in JSON.

Of course you need actual code to handle the logic of the recipe, but the registration happens through JSON.

Expand  
 

thank you, hopefully I can work it out :)

Developer of CampCraft

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



×
×
  • Create New...

Important Information

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