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

Add recipes to upgrade computers #528

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SquidDev
Copy link
Contributor

image

This adds recipes to upgrade computers, turtles and pocket computers using gold ingots. Computers and pocket computers require 7 gold ingots, whilst turtles require 14 (in the form of 1 gold block and 5 ingots). A couple of things worth noting:

  • These recipes are currently shaped. I'd be open to converting it to be shapeless if people would prefer it.
  • The recipes are largely data-driven, which hopefully makes it easier for people to change them - especially when 1.13 (and so data packs) drop.

This also converts the current TurtleRecipe over to use the same system: changing the item rather than the family. However, this now requires the computer item to be an actual computer - previously one could use a turtle or pocket computer. This behaviour feels a little strange to me, but I'm happy to revert to that if desired.

This adds IComputerItem.withFamily(ItemStack, ComputerFamily) as well as
a ComputerFamilyRecipe class. Each type of computer (normal, turtle,
pocket) defines a recipe using this class, as they require a different
number of gold ingots to upgrade.
The two recipes are pretty similar, so this allows us to substantially
simplify the code. This now introduces the additional requirement that
computers must be used to create turtles, rather than pocket computers
or another turtle.
@SquidDev SquidDev force-pushed the feature/computer-upgrade branch from 27ceceb to bb2eab0 Compare March 21, 2018 17:52
ccserver pushed a commit to ccserver/ComputerCraft that referenced this pull request Sep 16, 2019
…computer-upgrade

Add recipes to upgrade computers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant