
Achilleus
Members-
Posts
25 -
Joined
-
Last visited
Everything posted by Achilleus
-
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; }
-
This fixed it ChunkCoordinates bed = par3EntityPlayer.getBedLocation(par3EntityPlayer.dimension); par3EntityPlayer.setPositionAndUpdate(bed.posX, bed.posY, bed.posZ); return par1ItemStack;
-
That didn't work, but it completely obliterated the area around my original spawn
-
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
-
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.
-
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
-
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.
-
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()"?
-
how to use the "private boolean alwaysEdible;"
Achilleus replied to Achilleus's topic in Modder Support
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 -
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++;
-
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
-
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?
-
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
-
Could you give an example of what to put in the class file?
-
How to set which tools can break my block/ore?
Achilleus replied to Achilleus's topic in Modder Support
THANK YOU! It worked perfectly -
Shouldn't it be in resources instead of assets?
-
I want to assign three commands to go into effect when an item is used, and also destroy that item. Anyone know how to do this? The commands I want to add are /gamerule keepInventory true /kill /gamerule keepInventory false so that the player is teleported to their spawn point without losing anything
-
How to set which tools can break my block/ore?
Achilleus replied to Achilleus's topic in Modder Support
Could you give me an example? I don't quite understand it -
I always register mine in my main class and put the textures in the constructor in the blocks class.
-
I have made an ore block, and it generates throughout my world, but any type of pickaxe can mine it. How can I set it to Iron?
-
I LOVE YOU!!!!!!!!!!!!!!!!!!!!!!!!! IT WORKED!!!!!!!!!!!!!!!!!!!!!!!
-
No, it exists at /src/main/resources/assets/textures/entity/boar/boar.png. I've also tried ResourceLocation("sao", "textures/entities/boar/boar.png") ResourceLocation("sao","textures/entity/boar/boar.png") ResourceLocation("/src/main/resources/assets/textures/entity/boar/boar.png.")
-
I have created a custom mob that functions in minecraft using forge/eclipse, but there is no texture. It's stats are all correct, and its body shape, but it has the purple black no texture overlay. When I run minecraft I get this error: "java.io.FileNotFoundException: sao:textures/entity/boar/boar.png And this is the line of code I used to call the texture: "private static final ResourceLocation EntityTexture = new ResourceLocation("sao:textures/entity/boar/boar.png");" Does anyone know how to fix this? I have searched google and multiple forums for over 22 hours over the past two days regarding this issue and have come up with nothing. The texture and model class were made using Techne. Here's my Render class: