Jump to content

Achilleus

Members
  • Posts

    25
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Achilleus's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. This ended up being what works public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { ChunkCoordinates bed = par3EntityPlayer.getBedLocation(par3EntityPlayer.dimension); if(bed == null) { bed = par3EntityPlayer.worldObj.getSpawnPoint(); } par3EntityPlayer.setPositionAndUpdate(bed.posX, bed.posY, bed.posZ); return par1ItemStack; }
  2. This fixed it ChunkCoordinates bed = par3EntityPlayer.getBedLocation(par3EntityPlayer.dimension); par3EntityPlayer.setPositionAndUpdate(bed.posX, bed.posY, bed.posZ); return par1ItemStack;
  3. That didn't work, but it completely obliterated the area around my original spawn
  4. I made an item that is supposed to teleport me to my bed location using getBedLocation() but instead it keeps teleporting me to my original spawn point. Anyone know how to fix this? Here's the complete class file
  5. Yes, it is imported. The reason it's in "food" is because that's where the other "Crystals" are. One crystal heals you, one crystal is an antidote like milk, and this one is supposed to teleport you. None are really food but the other two are treated like it so I put this one in the same package with those. It's supposed to be based off the Anime, Sword Art Online (SAO). My little brother is obsessed with it so I am making this for him.
  6. There's an error on "new TeleportCrystalClass()" because it's "Undefined". I'm guessing that means it needs the "int par1" from my class file? I'm not sure what those are
  7. The start entity id was placed there by eclipse, not sure why. As for the rest of the code, I just copied it from an earlier reply suggesting what I should do. I'm trying to make an item that teleports me to my spawn point.
  8. The start entity ID was used to make a mob, but that's how the error corrector fixed it when I clicked it. I have about 15 other items with textures labeled the exact same way in this mod and they all work fine, so I don't think that's part of it Yes, I am developing for 1.7.2 Sorry for my lack of experience with code, but what would you recommend I put in "new TeleportCrystalClass()"?
  9. Thank you! I'm still learning java but have backgrounds with C#, PHP, and Python so some of it I understand but it's been a while
  10. Here is my complete Class File And this is what I currently have in my MainClass: public static Item TeleportCrystal = new TeleportCrystalClass(startEntityId).setUnlocalizedName("TeleportCrystal").setCreativeTab(saoTab); and regarding what you said about startEntityId, this is also in my main class. Would that change anything? private static int startEntityId = 300; public static int getUniqueEntityId() { do { startEntityId++; } while(EntityList.getStringFromID(startEntityId) != null ); return startEntityId++;
  11. I got rid of the error in my Main Class by making it new TeleportCrystalClass(startEntityId) but the error on super(par1); is still causing my game to crash
  12. I get two errors with this: on "super(par1)" that says "The constructor Item(int) is undefined" and another in my Main Class where I declared it, public static Item TeleportCrystal = new TeleportCrystalClass().setUnlocalizedName("TeleportCrystal").setCreativeTab(saoTab); the error is on "new TeleportCrystalClass()" and it says "The constructor TeleportCrystalClass() is undefined" Where did I go wrong?
  13. I can't figure out where exactly to put this in my food class file or what parameters. Could someone give an example of how to do it? I also need to change the itemUseDuration
  14. Could you give an example of what to put in the class file?
  15. THANK YOU! It worked perfectly
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.