Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocrafter manager #711

Merged
merged 9 commits into from
Nov 1, 2024
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
Loading