Skip to content

Another Turtle Question #741

Answered by SquidDev
SirEndii asked this question in Q&A
Mar 17, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Easiest solution is to overwrite fillItemCategory for your upgrade items to also add the turtles. So something along the lines of:

public void fillItemCategory(@Nonnull ItemGroup group, @Nonnull NonNullList<ItemStack> list) {
  if(!allowededIn(group)) return;
  super.fillItemCategory(group, list);

  // Add turtles
  list.add(makeTurtle(TURTLE_NORMAL, "my_upgrade_id"));
  list.add(makeTurtle(TURTLE_ADVANCED, "my_upgrade_id"));
}

// Probably put this stuff in a helper class:

// Think this is the syntax for ObjectHolder??
@ObjectHolder("computercraft:turtle_normal") public static Item TURTLE_NORMAL;
@ObjectHolder("computercraft:turtle_advanced") public static Item TURTLE_ADVANCED;

public I…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SirEndii
Comment options

@SquidDev
Comment options

Answer selected by SquidDev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants