This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Chain's profile picture

Request for a Peripheral Tutorial

Started by Chain, 08 September 2012 - 11:06 AM
Chain #1
Posted 08 September 2012 - 01:06 PM
Hello I like to see a CC Peripheral and TurtleUpgrades tutorial because im stuck with my Upgrade and don't have a clue why it dosn't work.
I'm sure many other ppl have the same problem or just don't know how to Program ther own Upgrades and Peripherals.

Best regards Chain
1lann #2
Posted 09 September 2012 - 03:13 PM
http://www.computercraft.info/forums2/index.php?/topic/606-creating-peripherals-and-turtle-upgrades-updated-for-141/

Also, next time post in the Peripheral help and discussion section as I believe it applies to turtle upgrades too
Chain #3
Posted 09 September 2012 - 08:19 PM
I already read this. And I meant a full tutorial.
Cloudy #4
Posted 09 September 2012 - 09:13 PM
To be honest with only a tiny bit of Java knowledge you should be able to manage. First, learn to make a Minecraft mod using Tile Entities - then the rest will follow.
Chain #5
Posted 10 September 2012 - 10:48 AM
To be honest with only a tiny bit of Java knowledge you should be able to manage. First, learn to make a Minecraft mod using Tile Entities - then the rest will follow.

I wanted to make a Turtle Upgrade, and according to the post there isn't a Tile Entity needed. And I've already written the code. But my turtle just dont show up. I did write all the stuff the same way as "Apeture Sience Turtle Upgrades", I decompiled his classes and used them as reference but it just dont work.
Cloudy #6
Posted 10 September 2012 - 10:52 AM
To be honest with only a tiny bit of Java knowledge you should be able to manage. First, learn to make a Minecraft mod using Tile Entities - then the rest will follow.

I wanted to make a Turtle Upgrade, and according to the post there isn't a Tile Entity needed. And I've already written the code. But my turtle just dont show up. I did write all the stuff the same way as "Apeture Sience Turtle Upgrades", I decompiled his classes and used them as reference but it just dont work.

Did you register the upgrade?
Xfel #7
Posted 10 September 2012 - 10:55 AM
And if you did, did you change the ids?
Chain #8
Posted 10 September 2012 - 12:42 PM
yes I did both.

here are 2 snippets from the classes.

mod_DetectingTurtles Class:

public void load() {
  // TODO Auto-generated method stub

  ModLoader.setInGameHook(this, true, true);
  TurtleDetecting tDetecting = new TurtleDetecting();
  System.out.println(tDetecting);

  try {
   TurtleAPI.registerUpgrade(tDetecting);
  } catch (Exception e) {
   System.out.println("Failed to register Upgrade!");
  }

  System.out.println("Successfully registered the Upgrade!");

}

TurtleDetecting Class:


public class TurtleDetecting implements ITurtleUpgrade {

@Override
public int getUpgradeID() {
// TODO Auto-generated method stub
return 166;
}

@Override
public String getAdjective() {
// TODO Auto-generated method stub
return "Detecting";
}

@Override
public TurtleUpgradeType getType() {
// TODO Auto-generated method stub
return TurtleUpgradeType.Peripheral;
}

@Override
public ItemStack getCraftingItem() {
// TODO Auto-generated method stub
return new ItemStack(Item.feather);
}