-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: pattern grid and pattern
- Loading branch information
Showing
267 changed files
with
5,723 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/CraftingPattern.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.refinedmods.refinedstorage.common.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceAmount; | ||
import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") | ||
public record CraftingPattern(List<List<PlatformResourceKey>> inputs, | ||
ResourceAmount output, | ||
List<ResourceAmount> byproducts) implements Pattern { | ||
@Override | ||
public Collection<ResourceAmount> getOutputs() { | ||
return List.of(output); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...mon-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/Pattern.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.refinedmods.refinedstorage.common.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceAmount; | ||
|
||
import java.util.Collection; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") | ||
public interface Pattern { | ||
Collection<ResourceAmount> getOutputs(); | ||
} |
17 changes: 17 additions & 0 deletions
17
...main/java/com/refinedmods/refinedstorage/common/api/autocrafting/PatternProviderItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.refinedmods.refinedstorage.common.api.autocrafting; | ||
|
||
import java.util.Optional; | ||
import java.util.UUID; | ||
import javax.annotation.Nullable; | ||
|
||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.Level; | ||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") | ||
public interface PatternProviderItem { | ||
@Nullable | ||
UUID getId(ItemStack stack); | ||
|
||
Optional<Pattern> getPattern(ItemStack stack, Level level); | ||
} |
16 changes: 16 additions & 0 deletions
16
...c/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/ProcessingPattern.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.refinedmods.refinedstorage.common.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceAmount; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") | ||
public record ProcessingPattern(List<List<ResourceAmount>> inputs, List<ResourceAmount> outputs) implements Pattern { | ||
@Override | ||
public Collection<ResourceAmount> getOutputs() { | ||
return outputs; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...pi/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@ParametersAreNonnullByDefault | ||
@FieldsAndMethodsAreNonnullByDefault | ||
package com.refinedmods.refinedstorage.common.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; |
110 changes: 110 additions & 0 deletions
110
...-common/src/generated/resources/assets/refinedstorage/blockstates/black_pattern_grid.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"variants": { | ||
"active=false,direction=down_east": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90, | ||
"y": -90 | ||
}, | ||
"active=false,direction=down_north": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90 | ||
}, | ||
"active=false,direction=down_south": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90, | ||
"y": 180 | ||
}, | ||
"active=false,direction=down_west": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90, | ||
"y": 90 | ||
}, | ||
"active=false,direction=east": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"y": 90 | ||
}, | ||
"active=false,direction=north": { | ||
"model": "refinedstorage:block/pattern_grid/inactive" | ||
}, | ||
"active=false,direction=south": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"y": 180 | ||
}, | ||
"active=false,direction=up_east": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90, | ||
"y": -90 | ||
}, | ||
"active=false,direction=up_north": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90, | ||
"y": 180 | ||
}, | ||
"active=false,direction=up_south": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90 | ||
}, | ||
"active=false,direction=up_west": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90, | ||
"y": 90 | ||
}, | ||
"active=false,direction=west": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"y": 270 | ||
}, | ||
"active=true,direction=down_east": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": 90, | ||
"y": -90 | ||
}, | ||
"active=true,direction=down_north": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": 90 | ||
}, | ||
"active=true,direction=down_south": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": 90, | ||
"y": 180 | ||
}, | ||
"active=true,direction=down_west": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": 90, | ||
"y": 90 | ||
}, | ||
"active=true,direction=east": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"y": 90 | ||
}, | ||
"active=true,direction=north": { | ||
"model": "refinedstorage:block/pattern_grid/black" | ||
}, | ||
"active=true,direction=south": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"y": 180 | ||
}, | ||
"active=true,direction=up_east": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": -90, | ||
"y": -90 | ||
}, | ||
"active=true,direction=up_north": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": -90, | ||
"y": 180 | ||
}, | ||
"active=true,direction=up_south": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": -90 | ||
}, | ||
"active=true,direction=up_west": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"x": -90, | ||
"y": 90 | ||
}, | ||
"active=true,direction=west": { | ||
"model": "refinedstorage:block/pattern_grid/black", | ||
"y": 270 | ||
} | ||
} | ||
} |
110 changes: 110 additions & 0 deletions
110
...e-common/src/generated/resources/assets/refinedstorage/blockstates/blue_pattern_grid.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"variants": { | ||
"active=false,direction=down_east": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90, | ||
"y": -90 | ||
}, | ||
"active=false,direction=down_north": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90 | ||
}, | ||
"active=false,direction=down_south": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90, | ||
"y": 180 | ||
}, | ||
"active=false,direction=down_west": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": 90, | ||
"y": 90 | ||
}, | ||
"active=false,direction=east": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"y": 90 | ||
}, | ||
"active=false,direction=north": { | ||
"model": "refinedstorage:block/pattern_grid/inactive" | ||
}, | ||
"active=false,direction=south": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"y": 180 | ||
}, | ||
"active=false,direction=up_east": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90, | ||
"y": -90 | ||
}, | ||
"active=false,direction=up_north": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90, | ||
"y": 180 | ||
}, | ||
"active=false,direction=up_south": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90 | ||
}, | ||
"active=false,direction=up_west": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"x": -90, | ||
"y": 90 | ||
}, | ||
"active=false,direction=west": { | ||
"model": "refinedstorage:block/pattern_grid/inactive", | ||
"y": 270 | ||
}, | ||
"active=true,direction=down_east": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": 90, | ||
"y": -90 | ||
}, | ||
"active=true,direction=down_north": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": 90 | ||
}, | ||
"active=true,direction=down_south": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": 90, | ||
"y": 180 | ||
}, | ||
"active=true,direction=down_west": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": 90, | ||
"y": 90 | ||
}, | ||
"active=true,direction=east": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"y": 90 | ||
}, | ||
"active=true,direction=north": { | ||
"model": "refinedstorage:block/pattern_grid/blue" | ||
}, | ||
"active=true,direction=south": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"y": 180 | ||
}, | ||
"active=true,direction=up_east": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": -90, | ||
"y": -90 | ||
}, | ||
"active=true,direction=up_north": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": -90, | ||
"y": 180 | ||
}, | ||
"active=true,direction=up_south": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": -90 | ||
}, | ||
"active=true,direction=up_west": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"x": -90, | ||
"y": 90 | ||
}, | ||
"active=true,direction=west": { | ||
"model": "refinedstorage:block/pattern_grid/blue", | ||
"y": 270 | ||
} | ||
} | ||
} |
Oops, something went wrong.