Entry for Modjam #3
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
api/cofh/api
gradle/wrapper
java
models
resources
.gitignore
LICENSE.md
README.md
build.gradle
createItemJson.py
gradlew
gradlew.bat

README.md

Hydraulicraft

Build Status

Welcome to the source code of Hydraulicraft, the mod that works with fluids!

If you have bugs, please report them in the issue tracker. Please look in the closed issues, or other issues before opening a new one! Somebody may have had the same bug you have!

Also, if you want to contact me, come join me on IRC: #Hydraulicraft on esper.net

License

This mod is released under the MMPLv2

Using my API

Mod devs: Using my mod is easier than ever thanks to maven:

repositories {
    maven {
        name = "MM repo"
        url = "http://maven.k-4u.nl/"
    }
}

dependencies {
	#Either just use the API
	compile "k4unl:HydCraft:1.7.10-2.1.119:api"

	#Or use the deobf version
	compile "k4unl:HydCraft:1.7.10-2.1.119:deobf"
}

Registering recipes

in HCApi there is a getRecipeHandler() method. This returns an instance of IRecipeHandler.

You can then use a FluidShapedOreRecipe or FluidShapelessOreRecipe to register recipes. For example:

Adding a recipe to the assembler

recipeHandler.addAssemblerRecipe(new FluidShapedOreRecipe(new ItemStack(HCBlocks.hydraulicHarvesterSource, 1, 0), true,
	new Object[]{
		"WWW",
		"ICK",
		"WWW",
		'C', new ItemStack(HCBlocks.blockCore, 1, 1),
		'W', HCBlocks.hydraulicPressureWall,
		'K', HCItems.gasket,
		'I', HCBlocks.blockInterfaceValve
	}).addFluidInput(new FluidStack(Fluids.fluidLubricant, 100))
);    

Adding a recipe for the crusher

recipeHandler.addCrushingRecipe(new FluidShapelessOreRecipe(new ItemStack(Blocks.sand, 2), Blocks.cobblestone).setPressure(0.9F));

The pressure is how much pressure it should use. 1 is the normal amount of pressure. I use 1.2 for diamonds. So, the harder your material is, the higher you make this (Although i do not recommend going above 3!)

Registering trolleys

Make a normal class and implement IHarvesterTrolley (example: Flax trolley)

Then, register it in the Trolley Registrar, of which you can get an instance of through HCApi.

Links

Curse: http://minecraft.curseforge.com/mc-mods/223036-hydraulicraft

Website: http://www.hydraulicraft.eu (May be outdated!)