Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.3] Crafting Recipe Returns Multiple Items and Custom Crafting Station


ehbean
 Share

Recommended Posts

Hey there. I've got a quick 2 part question about crafting recipes.

1. I have a Json file set up that returns and item whenever you craft with it, but I would like it to return two different items. (The recipe has you using a mortar and pestle to grind something). So if at all possible I'd like to return both the mortar, and the other item that is made in the process.

 

2. How do I go about making a custom crafting station that accepts only certain items, uses a blaze powder as fuel. It would act similarly to a brewing stand, but I'd like to be able to add a new more crafting "options" going into it for later in this mod I'm working on.

 

Thank you

Link to comment
Share on other sites

3 hours ago, ehbean said:

So if at all possible I'd like to return both the mortar, and the other item that is made in the process.

That's what container items are for. Vanilla does this with buckets of milk, for example. This is not handled by the crafting recipe json, but the item's class.

3 hours ago, ehbean said:

How do I go about making a custom crafting station that accepts only certain items, uses a blaze powder as fuel. It would act similarly to a brewing stand, but I'd like to be able to add a new more crafting "options" going into it for later in this mod I'm working on.

You need slots that only accept specific items.

As an example:
https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/inventory/SaltSlotHandler.java

Used:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/entity/TannerTileEntity.java#L56

Edited by Draco18s
  • Thanks 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

23 hours ago, Draco18s said:

That's what container items are for. Vanilla does this with buckets of milk, for example. This is not handled by the crafting recipe json, but the item's class.

You need slots that only accept specific items.

As an example:
https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/inventory/SaltSlotHandler.java

Used:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/entity/TannerTileEntity.java#L56

Where would I find an example of the class that handles the buckets of items? Also, thank you for the GitHub links. Very useful.

Link to comment
Share on other sites

12 hours ago, ehbean said:

Where would I find an example of the class that handles the buckets of items?

Vanilla code, go find the MilkBucketItem

  • Thanks 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I think that is the problem. I changed to using ResourceKeys instead and haven't seen the log since. 
    • That's how, thanks a lot! (≧ ▽ ≦)
    • Sorry if this is something that is solved but i cant find anything. So when I am getting hurt or about to die the game crashes.   ---- Minecraft Crash Report ---- WARNING: coremods are present:   Plugin (NotEnoughIDs-1.5.4.4.jar)   llibrary (llibrary-core-1.0.11-1.12.2.jar)   EnderCorePlugin (EnderCore-1.12.2-0.5.76-core.jar)   LucraftCoreCoreMod (LucraftCore-1.12.2-2.4.16.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   MicdoodlePlugin (MicdoodleCore-1.12.2-4.0.2.280.jar)   JustEnoughIDs Extension Plugin (JustEnoughIDs-1.0.3-55.jar)   OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)   pymtech (PymTech-1.12.2-1.0.2.jar)   SteveKunGLibPlugin (SteveKunG's-Lib-1.12.2-1.1.10.jar)   ObfuscatePlugin (obfuscate-0.4.2-1.12.2.jar)   iceandfire (iceandfire-1.9.1-1.12.2.jar) Contact their authors BEFORE contacting forge // Uh... Did I do that? Time: 9/18/21 6:11 PM Description: Ticking entity java.lang.NoClassDefFoundError: c4/conarm/lib/capabilities/ArmorAbilityHandler     at landmaster.plustic.traits.DeathSaveTrait.timing(DeathSaveTrait.java:70)     at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1306_DeathSaveTrait_timing_LivingHurtEvent.invoke(.dynamic)     at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)     at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)     at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:604)     at net.minecraft.entity.player.EntityPlayer.func_70665_d(EntityPlayer.java:1120)     at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:918)     at net.minecraft.entity.player.EntityPlayer.func_70097_a(EntityPlayer.java:1038)     at net.minecraft.entity.player.EntityPlayerMP.func_70097_a(EntityPlayerMP.java:645)     at micdoodle8.mods.galacticraft.core.entities.player.GCEntityPlayerMP.func_70097_a(GCEntityPlayerMP.java:68)     at com.github.alexthe666.iceandfire.entity.EntityMyrmexSoldier.func_70636_d(EntityMyrmexSoldier.java:54)     at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2179)     at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:295)     at com.github.alexthe666.iceandfire.entity.EntityMyrmexBase.func_70071_h_(EntityMyrmexBase.java:240)     at net.minecraft.world.World.func_72866_a(World.java:1996)     at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:832)     at net.minecraft.world.World.func_72870_g(World.java:1958)     at net.minecraft.world.World.func_72939_s(World.java:1762)     at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)     at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)     at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)     at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)     at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: c4.conarm.lib.capabilities.ArmorAbilityHandler     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)     ... 24 more Caused by: java.lang.NullPointerException A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace:     at landmaster.plustic.traits.DeathSaveTrait.timing(DeathSaveTrait.java:70)     at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1306_DeathSaveTrait_timing_LivingHurtEvent.invoke(.dynamic)     at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)     at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)     at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:604)     at net.minecraft.entity.player.EntityPlayer.func_70665_d(EntityPlayer.java:1120)     at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:918)     at net.minecraft.entity.player.EntityPlayer.func_70097_a(EntityPlayer.java:1038)     at net.minecraft.entity.player.EntityPlayerMP.func_70097_a(EntityPlayerMP.java:645)     at micdoodle8.mods.galacticraft.core.entities.player.GCEntityPlayerMP.func_70097_a(GCEntityPlayerMP.java:68)     at com.github.alexthe666.iceandfire.entity.EntityMyrmexSoldier.func_70636_d(EntityMyrmexSoldier.java:54)     at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2179)     at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:295)     at com.github.alexthe666.iceandfire.entity.EntityMyrmexBase.func_70071_h_(EntityMyrmexBase.java:240)     at net.minecraft.world.World.func_72866_a(World.java:1996)     at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:832)     at net.minecraft.world.World.func_72870_g(World.java:1958) -- Entity being ticked -- Details:     Entity Type: iceandfire:myrmex_soldier (com.github.alexthe666.iceandfire.entity.EntityMyrmexSoldier)     Entity ID: 15     Entity Name: Myrmex Soldier     Entity's Exact location: -183.34, 61.00, -11.63     Entity's Block location: World: (-184,61,-12), Chunk: (at 8,3,4 in -12,-1; contains blocks -192,0,-16 to -177,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)     Entity's Momentum: -0.04, -0.08, -0.14     Entity's Passengers: []     Entity's Vehicle: ~~ERROR~~ NullPointerException: null Stacktrace:     at net.minecraft.world.World.func_72939_s(World.java:1762)     at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613) -- Affected level -- Details:     Level name: New World     All players: 1 total; [GCEntityPlayerMP['Altutium'/390, l='New World', x=-183.77, y=61.00, z=-12.57]]     Chunk stats: ServerChunkCache: 769 Drop: 0     Level seed: 2105410062015924141     Level generator: ID 00 - default, ver 1. Features enabled: true     Level generator options:      Level spawn location: World: (8,64,8), Chunk: (at 8,4,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)     Level time: 10758 game time, 10758 day time     Level dimension: 0     Level storage version: 0x04ABD - Anvil     Level weather: Rain time: 5018 (now: false), thunder time: 119120 (now: false)     Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false Stacktrace:     at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)     at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)     at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)     at java.lang.Thread.run(Thread.java:745) -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 2523489512 bytes (2406 MB) / 5603590144 bytes (5344 MB) up to 6442450944 bytes (6144 MB)     JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx6G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94     FML: MCP 9.42 Powered by Forge 14.23.5.2855 95 mods loaded, 95 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored  
    • Found a way to fix it! I went to the gradle folder on the right side of the project and press "Reload All Gradle Project" and now I can runClient without the errors showing up!
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.