Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f2da49d
Initial CraftTweaker compat
semenishchev Feb 18, 2024
d006200
Update upstream
semenishchev Feb 18, 2024
ddedfac
Moved CraftTweaker into its own package
semenishchev Feb 18, 2024
5ab1cfd
Tiden code up a bit
semenishchev Feb 18, 2024
b53b720
Optimised some parts to use primitive types instead of wrappers
semenishchev Feb 19, 2024
82d9469
Optimised Map operations
semenishchev Feb 19, 2024
b34ded0
You can create chemical reactions and create your own molecules with …
semenishchev Feb 20, 2024
662ab81
Created recipe handlers and 1 manager to test
semenishchev Feb 21, 2024
b5fa166
Exposed Mixture and the way to create them to CraftTweaker
semenishchev Feb 21, 2024
4940bdf
Proper NBT of mixtures for recipes
semenishchev Feb 22, 2024
92afdea
Fixed a crash if right clicking on decorative sides of the vat
semenishchev Feb 22, 2024
36c4574
fixed horrendous russian translation
semenishchev Feb 22, 2024
045d69a
finally made custom recipes work with mixtures (rip 8 hours of my lif…
semenishchev Feb 23, 2024
cf8dc9a
All recipe managers are implemented
semenishchev Feb 23, 2024
4890d76
Proper registry handling of the molecule to make removing/adding logi…
semenishchev Feb 23, 2024
2887cb4
a way to create crafttweaker docs
semenishchev Feb 23, 2024
f5787a9
Docs for CraftTweaker
semenishchev Feb 23, 2024
66e0cd3
Fixed ItemTags
semenishchev Feb 24, 2024
252eeab
stupid bug
semenishchev Feb 24, 2024
be018c9
Update upstream
semenishchev Feb 24, 2024
b41b3a4
Fixed amount required with mixtures
semenishchev Feb 27, 2024
1725f98
Extrusion Recipe support (I forgot about it for some reason)
semenishchev Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildscript {

plugins {
id 'com.matthewprenger.cursegradle' version "${cursegradle_version}"
// id 'com.blamejared.createtweaker.default'
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
Expand Down Expand Up @@ -115,6 +116,15 @@ repositories {
url = "https://maven.jaackson.me"
}

maven {
url = 'https://maven.blamejared.com'
name = 'BlameJared Maven'
}

maven {
url = 'https://www.jitpack.io'
}

exclusiveContent {
forRepository {
maven {
Expand Down Expand Up @@ -176,9 +186,14 @@ dependencies {
compileOnly fg.deobf("com.teamabnormals:blueprint:${minecraft_version}-${blueprint_version}")
implementation fg.deobf("com.teamabnormals:blueprint:${minecraft_version}-${blueprint_version}")


// CraftTweaker
var tweaker = "com.blamejared.crafttweaker:CraftTweaker-forge-${minecraft_version}:${crafttweaker_version}"
implementation fg.deobf(tweaker)
annotationProcessor(tweaker)
compileOnly("com.blamejared.crafttweaker:CraftTweaker-common-${minecraft_version}:${crafttweaker_version}")
// ANNOTATION PROCESSORS

// implementation fg.deobf("com.blamejared:CreateTweaker:1.0.0.12")
annotationProcessor("com.blamejared.crafttweaker:Crafttweaker_Annotation_Processors:3.0.0.15")
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
}

Expand All @@ -197,6 +212,10 @@ jar {
}
}

javadoc {
options.encoding = 'UTF-8'
}

// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
Expand Down
1 change: 1 addition & 0 deletions docsOut/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"nav":{"Mods":{"Destroy":{"AgingManager":"mods/destroy/AgingManager.md","Atom":"mods/destroy/Atom.md","CentrifugationManager":"mods/destroy/CentrifugationManager.md","ChargingManager":"mods/destroy/ChargingManager.md","DistillationManager":"mods/destroy/DistillationManager.md","ElectrolysisManager":"mods/destroy/ElectrolysisManager.md","Element":"mods/destroy/Element.md","Formula":"mods/destroy/Formula.md","IDestroyRecipeManager":"mods/destroy/IDestroyRecipeManager.md","Mixture":"mods/destroy/Mixture.md","Molecule":"mods/destroy/Molecule.md","MoleculeBuilder":"mods/destroy/MoleculeBuilder.md","Molecules":"mods/destroy/Molecules.md","Reaction":"mods/destroy/Reaction.md","ReactionBuilder":"mods/destroy/ReactionBuilder.md","Reactions":"mods/destroy/Reactions.md"}}}}
1 change: 1 addition & 0 deletions docsOut/docs/mods/destroy/AgingManager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"mods/destroy/AgingManager.md","zenCodeName":"mods.destroy.AgingManager","searchTerms":["getRecipeByName","addJsonRecipe","allRecipes","removeByModid","remove","recipeMap","addRecipe","removeAll","removeByName","getRecipeMap","getAllRecipes","registerRecipe","removeByInput","mods.destroy.IDestroyRecipeManager","getRecipesByOutput","removeByRegex"]}
207 changes: 207 additions & 0 deletions docsOut/docs/mods/destroy/AgingManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
# AgingManager

## Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
```zenscript
import mods.destroy.AgingManager;
```


## Implemented Interfaces
AgingManager implements the following interfaces. That means all methods defined in these interfaces are also available in AgingManager

- [IDestroyRecipeManager](/mods/destroy/IDestroyRecipeManager)

## Methods

:::group{name=addJsonRecipe}

```zenscript
AgingManager.addJsonRecipe(name as string, mapData as MapData)
```

| Parameter | Type |
|-----------|--------------------------------------|
| name | string |
| mapData | [MapData](/vanilla/api/data/MapData) |


:::

:::group{name=addRecipe}

Adds an aging recipe to the aging barrel

```zenscript
// AgingManager.addRecipe(name as string, input as FluidIngredient, items as IIngredient[], result as IFluidStack, processingTime as int)

myAgingManager.addRecipe("wine_aging", <fluid:minecraft:water>, [<item:minecraft:apple>, <item:minecraft:bonemeal>], <fluid:minecraft:lava> per 1 bucket of input, 1200);
```

| Parameter | Type | Description | Optional | Default Value |
|----------------|------------------------------------------------------|----------------------------------------|----------|---------------|
| name | string | Name of the recipe | false | |
| input | [FluidIngredient](/forge/api/fluid/FluidIngredient) | Input fluid of the recipe | false | |
| items | [IIngredient](/vanilla/api/ingredient/IIngredient)[] | Additional items to the aging process | false | |
| result | [IFluidStack](/vanilla/api/fluid/IFluidStack) | Resulting fluid | false | |
| processingTime | int | Processing time of the recipe in ticks | true | 1200 |


:::

:::group{name=getAllRecipes}

Return Type: stdlib.List&lt;T&gt;

```zenscript
// AgingManager.getAllRecipes() as stdlib.List<T>

myAgingManager.getAllRecipes();
```

:::

:::group{name=getRecipeByName}

Return Type: T

```zenscript
AgingManager.getRecipeByName(name as string) as T
```

| Parameter | Type |
|-----------|--------|
| name | string |


:::

:::group{name=getRecipeMap}

Return Type: T[[ResourceLocation](/vanilla/api/resource/ResourceLocation)]

```zenscript
// AgingManager.getRecipeMap() as T[ResourceLocation]

myAgingManager.getRecipeMap();
```

:::

:::group{name=getRecipesByOutput}

Return Type: stdlib.List&lt;T&gt;

```zenscript
AgingManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
```

| Parameter | Type |
|-----------|----------------------------------------------------|
| output | [IIngredient](/vanilla/api/ingredient/IIngredient) |


:::

:::group{name=registerRecipe}

Registers a recipe using a builder approach.

```zenscript
AgingManager.registerRecipe(name as string, recipeBuilder as Consumer)
```

| Parameter | Type | Description |
|---------------|----------|-------------------------|
| name | string | The name of the recipe. |
| recipeBuilder | Consumer | The recipe builder. |


:::

:::group{name=remove}

```zenscript
AgingManager.remove(output as IIngredient)
```

| Parameter | Type |
|-----------|----------------------------------------------------|
| output | [IIngredient](/vanilla/api/ingredient/IIngredient) |


:::

:::group{name=removeAll}

```zenscript
// AgingManager.removeAll()

myAgingManager.removeAll();
```

:::

:::group{name=removeByInput}

```zenscript
AgingManager.removeByInput(input as IItemStack)
```

| Parameter | Type |
|-----------|--------------------------------------------|
| input | [IItemStack](/vanilla/api/item/IItemStack) |


:::

:::group{name=removeByModid}

```zenscript
AgingManager.removeByModid(modid as string, exclude as Predicate<string>)
```

| Parameter | Type | Optional | Default Value |
|-----------|-------------------------|----------|-----------------------------------|
| modid | string | false | |
| exclude | Predicate&lt;string&gt; | true | (name as string) as bool => false |


:::

:::group{name=removeByName}

```zenscript
AgingManager.removeByName(names as string[])
```

| Parameter | Type |
|-----------|----------|
| names | string[] |


:::

:::group{name=removeByRegex}

```zenscript
AgingManager.removeByRegex(regex as string, exclude as Predicate<string>)
```

| Parameter | Type | Optional | Default Value |
|-----------|-------------------------|----------|-----------------------------------|
| regex | string | false | |
| exclude | Predicate&lt;string&gt; | true | (name as string) as bool => false |


:::


## Properties

| Name | Type | Has Getter | Has Setter |
|------------|---------------------------------------------------------------|------------|------------|
| allRecipes | stdlib.List&lt;T&gt; | true | false |
| recipeMap | T[[ResourceLocation](/vanilla/api/resource/ResourceLocation)] | true | false |

1 change: 1 addition & 0 deletions docsOut/docs/mods/destroy/Atom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"mods/destroy/Atom.md","zenCodeName":"mods.destroy.Atom","searchTerms":["getPartial","getElement","isHydrogen"]}
49 changes: 49 additions & 0 deletions docsOut/docs/mods/destroy/Atom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Atom

## Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
```zenscript
import mods.destroy.Atom;
```


## Methods

:::group{name=getElement}

Return Type: [Element](/mods/destroy/Element)

```zenscript
// Atom.getElement() as Element

myAtom.getElement();
```

:::

:::group{name=getPartial}

Return Type: **invalid**

```zenscript
// Atom.getPartial() as invalid

myAtom.getPartial();
```

:::

:::group{name=isHydrogen}

Return Type: boolean

```zenscript
// Atom.isHydrogen() as boolean

myAtom.isHydrogen();
```

:::


1 change: 1 addition & 0 deletions docsOut/docs/mods/destroy/CentrifugationManager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"mods/destroy/CentrifugationManager.md","zenCodeName":"mods.destroy.CentrifugationManager","searchTerms":["getRecipeByName","addJsonRecipe","allRecipes","removeByModid","remove","recipeMap","addRecipe","removeAll","removeByName","getRecipeMap","getAllRecipes","registerRecipe","removeByInput","mods.destroy.IDestroyRecipeManager","getRecipesByOutput","removeByRegex"]}
Loading