Skip to content

Commit f366120

Browse files
Deprecate ChanceLogic.FIRST (#4109)
Co-authored-by: Ghostipedia / Caitlynn <[email protected]>
1 parent 873e4d4 commit f366120

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "Version 7.3.0"
3+
---
4+
5+
6+
# Updating from `7.2.1` to `7.3.0`
7+
8+
## Chance Logics
9+
10+
- `first` ChanceLogic has been Deprecated as its behavior is highly unreliable, and it will be fully removed in 8.0.0.
11+
We recommend using `xor` instead.

docs/content/Modpacks/Recipes/Adding-and-Removing-Recipes.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ ServerEvents.recipes(event => {
124124
- Valid options for chanced logic are:
125125
- `or` - (default) Any item/fluid which succeeds on its chance roll is produced/consumed.
126126
- `and` - If _all_ items/fluids succeed on their chance roll, all are produced/consumed together. Otherwise, none are.
127-
- `xor` - Guarantees that exactly one of the chanced items/fluids will be produced/consumed on every run.
128-
Behavior was changed in 7.0.0.
127+
- `xor` - Normalizes ingredient chances, and guarantees that exactly one of the chanced items/fluids will be
128+
produced/consumed on every run. XOR's behavior was changed in 7.0.0.
129129
- `first` - Makes a chance roll for each item/fluid, in order of registration. Only the first item which succeeds
130-
on its roll is returned. Prior to 7.0.0, this was the behavior of `xor` logic.
130+
on its roll is returned. Prior to 7.0.0, this was the behavior of `xor` logic.
131+
- Because of its unpredictable behavior, FIRST has been Deprecated as of 7.3.0, and is scheduled for removal
132+
in 8.0.0.
131133
- Ranged Ingredients:
132134
- Item or Fluid ingredients that will be consumed or produced in a random amount within a `min, max` range (inclusive).
133135
- Circuits

src/main/java/com/gregtechceu/gtceu/api/recipe/chance/logic/ChanceLogic.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ public String toString() {
117117

118118
/**
119119
* Chanced Output Logic where only the first ingredient succeeding its roll will be produced
120+
* Deprecated following the rewrite of XOR
120121
*/
122+
@Deprecated
121123
public static final ChanceLogic FIRST = new ChanceLogic("first") {
122124

123125
@Override

0 commit comments

Comments
 (0)