Skip to content

Commit

Permalink
docs: clarify autocrafter
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Oct 12, 2024
1 parent 22ca58d commit 671ed38
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Added

- Autocrafter
- Note: autocrafting itself hasn't been implemented yet. This is the in-game content, but not the autocrafting engine itself yet.
- The Relay now has support for propagating autocrafting when not in pass-through mode.

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ protected boolean hasRedstoneMode() {

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ void setFilters(final List<ResourceKey> filters) {

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ protected AbstractDestructorBlockEntity(final BlockPos pos, final BlockState sta

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

public boolean isPickupItems() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ private void schedulingModeChanged(final SchedulingMode schedulingMode) {

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ protected AbstractImporterBlockEntity(final BlockPos pos, final BlockState state

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ public void loadAdditional(final CompoundTag tag, final HolderLookup.Provider pr

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ public void writeConfiguration(final CompoundTag tag, final HolderLookup.Provide

@Override
public List<ItemStack> getUpgrades() {
return upgradeContainer.getUpgradeItems();
return upgradeContainer.getUpgrades();
}

@Override
public boolean addUpgrade(final ItemStack upgradeStack) {
return upgradeContainer.addUpgradeItem(upgradeStack);
return upgradeContainer.addUpgrade(upgradeStack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,20 @@ public long getEnergyUsage() {
return usage;
}

public List<ItemStack> getUpgradeItems() {
final List<ItemStack> upgradeItems = new ArrayList<>();
public List<ItemStack> getUpgrades() {
final List<ItemStack> upgrades = new ArrayList<>();
for (int i = 0; i < getContainerSize(); ++i) {
final ItemStack itemStack = getItem(i);
if (itemStack.isEmpty()) {
continue;
}
upgradeItems.add(itemStack.copy());
upgrades.add(itemStack.copy());
}
return upgradeItems;
return upgrades;
}

public boolean addUpgradeItem(final ItemStack upgradeItem) {
return addItem(upgradeItem).isEmpty();
public boolean addUpgrade(final ItemStack upgrade) {
return addItem(upgrade).isEmpty();
}

public NonNullList<ItemStack> getDrops() {
Expand Down

0 comments on commit 671ed38

Please sign in to comment.