Jump to content

Recommended Posts

Posted

Hey!

 

I am making a mod that involves quite advanced crafting recipes, one of which is done in a custom furnace type block. I was wondering if when using the forge liquid API, it would be possible to have the custom crafting table require water to smelt the item instead of fuel, and as well as creating the new item, it creates another custom liquid which I already have. Overall, something like the carpenter from Forestry, in the liquid transposer from Thermal Expansion, but to also produce a liquid after.

 

If there is an easy way to hold two different types of liquid in a container, and have them be used in the crafting I would love to know. I can post any code needed from my mod is necessary.

 

Thanks!

Luis  :)

 

 

Posted

Holding two liquids is easy. My mod's mixer does this, you just need to define 2 LiquidTanks in your Tile Entity, similar to the way you define your Tile Entity's inventory.

 

public LiquidTank[] tanks = new LiquidTank[2];

tanks[0] is your first tank and tanks[1] is your second.

Posted
  On 4/27/2013 at 1:23 PM, vroominator said:

Holding two liquids is easy. My mod's mixer does this, you just need to define 2 LiquidTanks in your Tile Entity, similar to the way you define your Tile Entity's inventory.

 

public LiquidTank[] tanks = new LiquidTank[2];

tanks[0] is your first tank and tanks[1] is your second.

 

Ok, how would I use these tanks in my crafting though? I don't have much experience with liquids or how they are stored as you might be able to see...

Posted
  On 4/27/2013 at 1:41 PM, vroominator said:

I'm not good at explaining things, but I know Buildcraft makes use of Liquids, as it is where the Liquid part of Forge originally came from. BC is open source, so you could go look at the code for some good examples of LiquidTanks being used.

Here's the BC Github.

 

Yeah, I originally looked around on the BC code but didn't really find what I needed in it. Upon playing with your mod (which is great by the way!) your mixer seems very similar to what I want to do. Also I noticed in your copyright bit it says

  Quote
This mod is provided freely and may be decompiled and modified for private use

and I was wondering if I could take a look at the mixer part of your code and see if it helps me at all. If not I understand!

 

Thanks for your help so far

Luis  :)

Posted

Yeah, you can use something like jd-gui to quickly decompile some classes and take a peek. You might want to look at TileEntityMixer.class and maybe even MixerRecipes.class, but beware, my code is very messy and ugly and inefficient.

Posted
  On 4/28/2013 at 12:15 AM, vroominator said:

Yeah, you can use something like jd-gui to quickly decompile some classes and take a peek. You might want to look at TileEntityMixer.class and maybe even MixerRecipes.class, but beware, my code is very messy and ugly and inefficient.

 

Thanks :)

Posted
  On 4/28/2013 at 10:41 AM, Flenix said:

Quite off-topic, but is your mod planned to be open source? I'd love to see the source if that's ok with you; one of my mods I'm planning on something similar (An ore has to be refined to a liquid and pumped into a special crafting table in order to use it) and I'd love to see how you do it

 

Whose mod, mine or vroominators? I tried to get mine open source but my laptop does not seem to like git being installed...

Posted

I have no plans to make Sorcery an open source mod at this time. If you want to see how I handle liquids, you can take a peek at TileEntityMixer.class using jd-gui. It's quite messy, but it gets the job done 99.9% of the time.

Posted
  On 4/28/2013 at 11:31 AM, luisc99 said:

  Quote

Quite off-topic, but is your mod planned to be open source? I'd love to see the source if that's ok with you; one of my mods I'm planning on something similar (An ore has to be refined to a liquid and pumped into a special crafting table in order to use it) and I'd love to see how you do it

 

Whose mod, mine or vroominators? I tried to get mine open source but my laptop does not seem to like git being installed...

 

Yours if that's alright. Are you using the old git command line thing, or Git for windows? The latter is really easy to use but if your laptop doesn't like it obviously you can't get that far. Any chance you could email me a .zip?

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted
  On 4/28/2013 at 11:56 AM, Flenix said:

  Quote

  Quote

Quite off-topic, but is your mod planned to be open source? I'd love to see the source if that's ok with you; one of my mods I'm planning on something similar (An ore has to be refined to a liquid and pumped into a special crafting table in order to use it) and I'd love to see how you do it

 

Whose mod, mine or vroominators? I tried to get mine open source but my laptop does not seem to like git being installed...

 

Yours if that's alright. Are you using the old git command line thing, or Git for windows? The latter is really easy to use but if your laptop doesn't like it obviously you can't get that far. Any chance you could email me a .zip?

 

I tried installing git for windows but it failed to install every time and the command line thing did not work either. I could email you the mod if you like but I would have to fix up some things with the liquids first.

Posted

Upon looking at your code for the mixer, quite a large amount of it was obfuscated and made it difficult to find which methods you used for different things. If you could maybe send me the .java files for the mixer block so I could have a look at them in more detail? If not then I understand...

 

Thanks again!

Luis  :)

Posted
  On 4/28/2013 at 12:13 PM, luisc99 said:

I could email you the mod if you like but I would have to fix up some things with the liquids first.

 

If you could that'd be great :) Either PM me on here or send to flenix@silvania.co.uk

 

  Quote

Upon looking at your code for the mixer, quite a large amount of it was obfuscated and made it difficult to find which methods you used for different things. If you could maybe send me the .java files for the mixer block so I could have a look at them in more detail? If not then I understand...

 

Thanks again!

Luis  :)

 

Was this supposed to be for me? If so, no idea what you're on about. The block that I want to make using liquid crafting isn't even made yet; all I have is a stub basic block with the name etc, ready to be made.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted
  On 4/28/2013 at 1:25 PM, Flenix said:

  Quote

Upon looking at your code for the mixer, quite a large amount of it was obfuscated and made it difficult to find which methods you used for different things. If you could maybe send me the .java files for the mixer block so I could have a look at them in more detail? If not then I understand...

 

Thanks again!

Luis  :)

 

Was this supposed to be for me? If so, no idea what you're on about. The block that I want to make using liquid crafting isn't even made yet; all I have is a stub basic block with the name etc, ready to be made.

 

No sorry, I ment vroominators mod.

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

    • So i have a forge modded aternos server that worked just fine for a month untill today it suddenly crashes most of the time giving errors and idk which mod is causing the error or its smth else here is the crash log link https://mclo.gs/gGkzGKT
    • Struggling to decipher a crash report I'm getting in a custom modpack I'm tinkering with. The crash happens on startup, but weirdly, only some of the time. It seems to be related to Steves Carts, but weirdly it only started happening recently, and I can't identify if another mod is conflicting, or why it is only happening some of the time:   java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.player.Player.m_20202_()" because "player" is null at vswe.stevescarts.events.OverlayEventHandler.onRenderTick(OverlayEventHandler.java:24) ~[stevescarts-1.20.1-1.1.14.jar%23527!/:1.20.1-1.1.14] {re:classloading} at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23127!/:?] {} at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23127!/:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23127!/:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23127!/:?] {} at net.minecraftforge.event.ForgeEventFactory.onRenderTickEnd(ForgeEventFactory.java:919) ~[forge-1.20.1-47.1.106-universal.jar%23581!/:?] {re:mixin,re:classloading,pl:mixin:APP:modernfix-forge.mixins.json:perf.potential_spawns_alloc.ForgeEventFactoryMixin,pl:mixin:A} at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1148) ~[client-1.20.1-20230612.114412-srg.jar%23576!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23576!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:218) ~[minecraft-1.20.1-client.jar:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}     Including some extra info in case any of it is relevant^. Appreciate any ideas/advice!    
    • Try the JVM argument in this post, just sub xmx/xms numbers for what you want/need allocated.  https://www.reddit.com/r/feedthebeast/s/lzmKUNZFrG I'm having the same issue with a huge modpack using the 3 culprits to your issue.  Let me know if this helps!
    • i have been trying to  lauch a modpack and it crashes in the lauching phase   
    • nope, even the log is the exact same, i also tried with the Dimensional doors just in case and nothing.
  • Topics

×
×
  • Create New...

Important Information

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