Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 13 additions & 1 deletion docs/content/Modpacks/Changes/v7.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ Previously, lamps were not useable with the terminal in multiblocks. There are n
The predicate to use all lamps is: `Predicates.anyLamp()`
The predicate to use a specific color is: `Predicates.lampsByColor(DyeColor.DYE_COLOR)`. Where DYE_COLOR is the name of the color you want.

## `GTRecipeBuilder#adjacentFluidTag()` and `GTRecipeBuilder#adjacentBlockTag()`
_This is only relevant to **add-on mods** with custom recipe types that use the condition(s). **KubeJS recipes are not affected.**_

The renames of `GTRecipeBuilder#adjacentFluid(TagKey<Fluid>...)` -> `#adjacentFluidTag(TagKey<Fluid>...)` and `GTRecipeBuilder#adjacentBlock(TagKey<Block>...)` -> `#adjacentBlockTag(TagKey<Block>...)`
have been deprecated in favor of naming every variant `adjacentFluids` and `adjacentBlocks`, respectively.
Please update your addon mods' recipes to use these new methods, as the now deprecated methods will be removed come 8.0.0.

A full list of all deprecated methods & their replacement is as follows:
Fluids: `adjacentFluid`, `adjacentFluidTag` -> `adjacentFluids`
Blocks: `adjacentBlock`, `adjacentBlockTag` -> `adjacentBlocks`

## Machine Recipe Failure Diagnostics
Machines now provide detailed diagnostics explaining why recipes fail to start.

Expand All @@ -100,6 +111,7 @@ public boolean beforeWorking(@Nullable GTRecipe recipe) {
return true;
}
```

## Painted Output Buses/Hatches
For some time, Spray Paint cans could be used to paint Input and Output Buses/Hatches on multiblock machines.
Version 7.0.0 added the feature that Painted Input Buses/Hatches of different colors would not share their ingredients with
Expand All @@ -119,4 +131,4 @@ Addon mods which explicitly attempt to construct, copy, or apply their own Modif
their constructor calls, or the additional `recipe.groupColor` to their copy calls.

## Added BiomeTagCondition
Added a new RecipeCondition called BiomeTagCondition for needing a specific biome tag. This can be used with KubeJS using `.biomeTag("biome")`.
Added a new RecipeCondition called BiomeTagCondition for needing a specific biome tag. This can be used with KubeJS using `.biomeTag("biome")`.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -214,7 +215,7 @@ public <T> GTRecipeBuilder output(RecipeCapability<T> capability, T... obj) {
return this;
}

public GTRecipeBuilder addCondition(RecipeCondition condition) {
public GTRecipeBuilder addCondition(RecipeCondition<?> condition) {
conditions.add(condition);
recipeType.setMinRecipeConditions(conditions.size());
return this;
Expand Down Expand Up @@ -1195,62 +1196,112 @@ public final GTRecipeBuilder adjacentFluids(Fluid... fluids) {

public final GTRecipeBuilder adjacentFluids(boolean isReverse, Fluid... fluids) {
if (fluids.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many fluids, not adding to recipe, id: {}", this.id);
GTCEu.LOGGER.error("Adjacent fluid condition has too many fluids, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(AdjacentFluidCondition.fromFluids(fluids).setReverse(isReverse));
}

public final GTRecipeBuilder adjacentFluid(Fluid... fluids) {
return adjacentFluid(false, fluids);
@SafeVarargs
public final GTRecipeBuilder adjacentFluids(TagKey<Fluid>... tags) {
return adjacentFluids(false, tags);
}

public final GTRecipeBuilder adjacentFluid(boolean isReverse, Fluid... fluids) {
if (fluids.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many fluids, not adding to recipe, id: {}", this.id);
@SafeVarargs
public final GTRecipeBuilder adjacentFluids(boolean isReverse, TagKey<Fluid>... tags) {
if (tags.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Adjacent fluid condition has too many fluids, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(AdjacentFluidCondition.fromFluids(fluids).setReverse(isReverse));
return addCondition(AdjacentFluidCondition.fromTags(tags).setReverse(isReverse));
}

public GTRecipeBuilder adjacentFluids(Collection<HolderSet<Fluid>> fluids) {
return adjacentFluids(fluids, false);
}

public GTRecipeBuilder adjacentFluids(Collection<HolderSet<Fluid>> fluids, boolean isReverse) {
if (fluids.size() > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Adjacent fluid condition has too many fluids, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(new AdjacentFluidCondition(isReverse, List.copyOf(fluids)));
}

/**
* @deprecated use {@link #adjacentFluids(Fluid...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public final GTRecipeBuilder adjacentFluid(Fluid... fluids) {
return adjacentFluids(fluids);
}

/**
* @deprecated use {@link #adjacentFluids(boolean, Fluid...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public final GTRecipeBuilder adjacentFluid(boolean isReverse, Fluid... fluids) {
return adjacentFluids(isReverse, fluids);
}

/**
* @deprecated use {@link #adjacentFluids(TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentFluidTag(TagKey<Fluid>... tags) {
return adjacentFluidTag(false, tags);
return adjacentFluids(tags);
}

/**
* @deprecated use {@link #adjacentFluids(boolean, TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentFluidTag(boolean isReverse, TagKey<Fluid>... tags) {
if (tags.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many fluids, not adding to recipe, id: {}", this.id);
return this;
}
return addCondition(AdjacentFluidCondition.fromTags(tags).setReverse(isReverse));
return adjacentFluids(isReverse, tags);
}

/**
* @deprecated use {@link #adjacentFluids(TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentFluid(TagKey<Fluid>... tags) {
return adjacentFluid(false, tags);
return adjacentFluids(tags);
}

/**
* @deprecated use {@link #adjacentFluids(boolean, TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentFluid(boolean isReverse, TagKey<Fluid>... tags) {
if (tags.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many fluids, not adding to recipe, id: {}", this.id);
return this;
}
return addCondition(AdjacentFluidCondition.fromTags(tags).setReverse(isReverse));
return adjacentFluids(isReverse, tags);
}

/**
* @deprecated use {@link #adjacentFluids(Collection)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public GTRecipeBuilder adjacentFluid(Collection<HolderSet<Fluid>> fluids) {
return adjacentFluid(fluids, false);
return adjacentFluids(fluids);
}

/**
* @deprecated use {@link #adjacentFluids(Collection, boolean)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public GTRecipeBuilder adjacentFluid(Collection<HolderSet<Fluid>> fluids, boolean isReverse) {
if (fluids.size() > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many fluids, not adding to recipe, id: {}", this.id);
return this;
}
return addCondition(new AdjacentFluidCondition(isReverse, new ArrayList<>(fluids)));
return adjacentFluids(fluids, isReverse);
}

public GTRecipeBuilder adjacentBlocks(Block... blocks) {
Expand All @@ -1259,62 +1310,116 @@ public GTRecipeBuilder adjacentBlocks(Block... blocks) {

public GTRecipeBuilder adjacentBlocks(boolean isReverse, Block... blocks) {
if (blocks.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many blocks, not adding to recipe, id: {}", this.id);
GTCEu.LOGGER.error("Adjacent block condition has too many blocks, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(AdjacentBlockCondition.fromBlocks(blocks).setReverse(isReverse));
}

@SafeVarargs
public final GTRecipeBuilder adjacentBlocks(TagKey<Block>... tags) {
return adjacentBlocks(false, tags);
}

@SafeVarargs
public final GTRecipeBuilder adjacentBlocks(boolean isReverse, TagKey<Block>... tags) {
if (tags.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Adjacent block condition has too many blocks, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(AdjacentBlockCondition.fromTags(tags).setReverse(isReverse));
}

public GTRecipeBuilder adjacentBlocks(Collection<HolderSet<Block>> blocks) {
return adjacentBlocks(blocks, false);
}

public GTRecipeBuilder adjacentBlocks(Collection<HolderSet<Block>> blocks, boolean isReverse) {
if (blocks.size() > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Adjacent block condition has too many blocks, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(new AdjacentBlockCondition(isReverse, List.copyOf(blocks)));
}

/**
* @deprecated use {@link #adjacentBlocks(Block...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public GTRecipeBuilder adjacentBlock(Block... blocks) {
return adjacentBlock(false, blocks);
}

/**
* @deprecated use {@link #adjacentBlocks(boolean, Block...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public GTRecipeBuilder adjacentBlock(boolean isReverse, Block... blocks) {
if (blocks.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many blocks, not adding to recipe, id: {}", this.id);
GTCEu.LOGGER.error("Adjacent block condition has too many blocks, not adding to recipe. id: {}", this.id);
return this;
}
return addCondition(AdjacentBlockCondition.fromBlocks(blocks).setReverse(isReverse));
}

/**
* @deprecated use {@link #adjacentBlocks(TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentBlock(TagKey<Block>... tags) {
return adjacentBlock(false, tags);
return adjacentBlocks(tags);
}

/**
* @deprecated use {@link #adjacentBlocks(boolean, TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentBlock(boolean isReverse, TagKey<Block>... tags) {
if (tags.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many blocks, not adding to recipe, id: {}", this.id);
return this;
}
return addCondition(AdjacentBlockCondition.fromTags(tags).setReverse(isReverse));
return adjacentBlocks(isReverse, tags);
}

/**
* @deprecated use {@link #adjacentBlocks(TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentBlockTag(TagKey<Block>... tags) {
return adjacentBlockTag(false, tags);
return adjacentBlocks(tags);
}

/**
* @deprecated use {@link #adjacentBlocks(boolean, TagKey...)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
@SafeVarargs
public final GTRecipeBuilder adjacentBlockTag(boolean isReverse, TagKey<Block>... tags) {
if (tags.length > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many blocks, not adding to recipe, id: {}", this.id);
return this;
}
return addCondition(AdjacentBlockCondition.fromTags(tags).setReverse(isReverse));
return adjacentBlocks(isReverse, tags);
}

/**
* @deprecated use {@link #adjacentBlocks(Collection)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public GTRecipeBuilder adjacentBlock(Collection<HolderSet<Block>> blocks) {
return adjacentBlock(blocks, false);
return adjacentBlocks(blocks);
}

/**
* @deprecated use {@link #adjacentBlocks(Collection, boolean)} instead
*/
@ApiStatus.ScheduledForRemoval(inVersion = "8.0.0")
@Deprecated(since = "7.2.1", forRemoval = true)
public GTRecipeBuilder adjacentBlock(Collection<HolderSet<Block>> blocks, boolean isReverse) {
if (blocks.size() > GTUtil.NON_CORNER_NEIGHBOURS.size()) {
GTCEu.LOGGER.error("Has too many blocks, not adding to recipe, id: {}", this.id);
return this;
}
return addCondition(new AdjacentBlockCondition(isReverse, new ArrayList<>(blocks)));
return adjacentBlocks(blocks, isReverse);
}

public GTRecipeBuilder daytime(boolean isNight) {
Expand Down
Loading