CC-Tweaked/projects/common/src/main/java/dan200/computercraft/shared/computer/items
Jonathan Coates 9d8c933a14
Remove several usages of ComputerFamily
While ComputerFamily is still useful, there's definitely some places
where it adds an extra layer of indirection. This commit attempts to
clean up some places where we no longer need it.

 - Remove ComputerFamily from AbstractComputerBlock. The only place this
   was needed is in TurtleBlock, and that can be replaced with normal
   Minecraft explosion resistence!

 - Pass in the fuel limit to the turtle block entity, rather than
   deriving it from current family.

 - The turtle BERs now derive their model from the turtle's item, rather
   than the turtle's family.

 - When creating upgrade/overlay recipes, use the item's name, rather
   than {pocket,turtle}_family. This means we can drop getFamily() from
   IComputerItem (it is still needed on to handle the UI).

 - We replace IComputerItem.withFamily with a method to change to a
   different item of the same type. ComputerUpgradeRecipe no longer
   takes a family, and instead just uses the result's item.

 - Computer blocks now use the normal Block.asItem() to find their
   corresponding item, rather than looking it up via family.

The above means we can remove all the family-based XyzItem.create(...)
methods, which have always felt a little ugly.

We still need ComputerFamily for a couple of things:
 - Permission checks for command computers.
 - Checks for mouse/colour support in ServerComputer.
 - UI textures.
2023-12-20 14:17:38 +00:00
..
AbstractComputerItem.java Remove several usages of ComputerFamily 2023-12-20 14:17:38 +00:00
CommandComputerItem.java Make command computer permission checks stricter 2023-09-05 18:44:16 +01:00
ComputerItem.java Remove several usages of ComputerFamily 2023-12-20 14:17:38 +00:00
IComputerItem.java Remove several usages of ComputerFamily 2023-12-20 14:17:38 +00:00