Skip to content

Commit

Permalink
Merge pull request #711 from refinedmods/feat/GH-103/autocrafter-manager
Browse files Browse the repository at this point in the history
Autocrafter manager
  • Loading branch information
raoulvdberge authored Nov 1, 2024
2 parents 7eb6551 + 2fca720 commit b215eda
Show file tree
Hide file tree
Showing 256 changed files with 5,145 additions and 147 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Autocrafter Manager
- You can now configure the view type of the Autocrafter Manager:
- Visible (only show autocrafters that are configured to be visible to the Autocrafter Manager)
- Not full (only show autocrafters that are not full yet)
- All (show all autocrafters)

### Changed

- The search field in the Autocrafter Manager can now search in:
- Pattern inputs
- Pattern outputs
- Autocrafter names
- All of the above (by default)
- Due to technical limitations and the new filtering options listed above being client-side only, you can no longer shift-click patterns in the Autocrafter Manager.
- In the Autocrafter, you can now configure whether it is visible to the Autocrafter Manager (by default it's visible).

## [2.0.0-milestone.4.8] - 2024-10-12

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6")
public interface Pattern {
Set<ResourceKey> getInputResources();

Set<ResourceKey> getOutputResources();
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class SimplePattern implements Pattern {
this.outputs = Set.of(outputs);
}

@Override
public Set<ResourceKey> getInputResources() {
return Set.of();
}

@Override
public Set<ResourceKey> getOutputResources() {
return outputs;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.refinedmods.refinedstorage.common.api.autocrafting;

import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.world.Container;
import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9")
public interface Autocrafter {
Component getAutocrafterName();

Container getPatternContainer();

boolean isVisibleToTheAutocrafterManager();

BlockPos getLocalPosition();
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6")
public interface PatternProviderItem {
static boolean isValid(final ItemStack stack, final Level level) {
return stack.getItem() instanceof PatternProviderItem patternProviderItem
&& patternProviderItem.getPattern(stack, level).isPresent();
}

@Nullable
UUID getId(ItemStack stack);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"variants": {
"active=false,direction=down_east": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90,
"y": -90
},
"active=false,direction=down_north": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90
},
"active=false,direction=down_south": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90,
"y": 180
},
"active=false,direction=down_west": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90,
"y": 90
},
"active=false,direction=east": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"y": 90
},
"active=false,direction=north": {
"model": "refinedstorage:block/autocrafter_manager/inactive"
},
"active=false,direction=south": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"y": 180
},
"active=false,direction=up_east": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90,
"y": -90
},
"active=false,direction=up_north": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90,
"y": 180
},
"active=false,direction=up_south": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90
},
"active=false,direction=up_west": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90,
"y": 90
},
"active=false,direction=west": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"y": 270
},
"active=true,direction=down_east": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": 90,
"y": -90
},
"active=true,direction=down_north": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": 90
},
"active=true,direction=down_south": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": 90,
"y": 180
},
"active=true,direction=down_west": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": 90,
"y": 90
},
"active=true,direction=east": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"y": 90
},
"active=true,direction=north": {
"model": "refinedstorage:block/autocrafter_manager/light_blue"
},
"active=true,direction=south": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"y": 180
},
"active=true,direction=up_east": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": -90,
"y": -90
},
"active=true,direction=up_north": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": -90,
"y": 180
},
"active=true,direction=up_south": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": -90
},
"active=true,direction=up_west": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"x": -90,
"y": 90
},
"active=true,direction=west": {
"model": "refinedstorage:block/autocrafter_manager/light_blue",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"variants": {
"active=false,direction=down_east": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90,
"y": -90
},
"active=false,direction=down_north": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90
},
"active=false,direction=down_south": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90,
"y": 180
},
"active=false,direction=down_west": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": 90,
"y": 90
},
"active=false,direction=east": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"y": 90
},
"active=false,direction=north": {
"model": "refinedstorage:block/autocrafter_manager/inactive"
},
"active=false,direction=south": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"y": 180
},
"active=false,direction=up_east": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90,
"y": -90
},
"active=false,direction=up_north": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90,
"y": 180
},
"active=false,direction=up_south": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90
},
"active=false,direction=up_west": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"x": -90,
"y": 90
},
"active=false,direction=west": {
"model": "refinedstorage:block/autocrafter_manager/inactive",
"y": 270
},
"active=true,direction=down_east": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": 90,
"y": -90
},
"active=true,direction=down_north": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": 90
},
"active=true,direction=down_south": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": 90,
"y": 180
},
"active=true,direction=down_west": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": 90,
"y": 90
},
"active=true,direction=east": {
"model": "refinedstorage:block/autocrafter_manager/black",
"y": 90
},
"active=true,direction=north": {
"model": "refinedstorage:block/autocrafter_manager/black"
},
"active=true,direction=south": {
"model": "refinedstorage:block/autocrafter_manager/black",
"y": 180
},
"active=true,direction=up_east": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": -90,
"y": -90
},
"active=true,direction=up_north": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": -90,
"y": 180
},
"active=true,direction=up_south": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": -90
},
"active=true,direction=up_west": {
"model": "refinedstorage:block/autocrafter_manager/black",
"x": -90,
"y": 90
},
"active=true,direction=west": {
"model": "refinedstorage:block/autocrafter_manager/black",
"y": 270
}
}
}
Loading

0 comments on commit b215eda

Please sign in to comment.