Jump to content

Naiten

Members
  • Posts

    325
  • Joined

  • Last visited

Everything posted by Naiten

  1. Ite, dissappears from my inventory. And data isn't saved too, it's equal to all my photo items
  2. I have an item, and it tends to get lost after i save/load. What's wrong? package net.obscuracraft.item; import java.util.Random; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemMapBase; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraft.world.storage.MapData; import net.obscuracraft.ObscuraCraft; import net.obscuracraft.camera.BlockObscura; public class ItemPhotoEmpty extends ItemMapBase { public ItemPhotoEmpty(int par1){ super(par1); this.setMaxDamage(0); this.maxStackSize = 1; this.hasSubtypes = true; setUnlocalizedName("obscuracraft:positive"); setCreativeTab(CreativeTabs.tabRedstone); } @Override public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player){ ItemStack item1 = new ItemStack(ObscuraCraft.iphoto, 1, world.getUniqueDataId("photo")); item1.attemptDamageItem(1, new Random()); String s = "photo_" + item1.getItemDamage(); MapData mapdata = new MapData(s); mapdata.colors = BlockObscura.lastColors; world.setItemData(s, mapdata); mapdata.markDirty(); item1.setItemName("Photo #" + item1.getItemDamage()); item.stackSize--; return item1; } }
  3. Everyone does... -__-
  4. In windows, you should have .NET. Not sure about Linux...
  5. Khm... Is that not good enough? You have Wine.
  6. USE public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("modfolder:texturename"); }
  7. You should use registerIcons.
  8. Thanks!
  9. Hello. I have a big problem. I'made a tile entity block with special renderer, and if i place even one (sic!) block and do absolutely nothing, it start devouring more and more memory until the game crashes with "Out of memory" notification. Is there any solution of this problem? My code: Help please?
  10. Added a new tutorial. Comment, please. http://www.minecraftforge.net/wiki/Multiple_blocks_structures
  11. Do you render them with TileEntitySpecialRenderer? If yes, then check this out: http://www.minecraftforge.net/wiki/Custom_Tile_Entity_Renderer
  12. If you know, why are you asking and why u no fix the error? Check your ModelGearBox.renderModel...
  13. Place texture wherever you want and use bindTextureByName("path_to_your_texture.png");
  14. "Already tesselating" means that the Tessellator.startDrawing was called several times, while in should be stopped by Tessellator.Draw before next call. That's all i can say
  15. Don't mention, glad to help.
  16. Actually, you do need /mods folder both in .zip and /src on 1.5.2. I've just updated my mc, forge, mcp, mod to 1.5.2 and tried different ways, and the only one to work was having .zip/mods/%modname%/textures/[items/blocks]/%texturename%.
  17. Then, give me a thank or karma, please
  18. Try using world.removeEntity(Entity par1);
  19. Я видела на офф сайте конвертор .obj->.java, поищи там. Не знаю, как он работает... --- I've seen an .obj->.java on minecraftforums, but i'm not sure if it works good.
  20. I don't know what by count is this topic, but there were several just some days ago. Please use search, don't engender similar topics.
  21. Sorry, no telepathic people here.
  22. Try onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityLiving, ItemStack itemStack), or onBlockAdded(World world, int i, int j, int k).
  23. Okay, you should have said you don't need lighting at all...
  24. Hi. I want to take a sreenshot via code. This is the code i found in Minecraft class. private void screenshotListener() { if (Keyboard.isKeyDown(60)) { if (!this.isTakingScreenshot) { this.isTakingScreenshot = true; this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(minecraftDir, this.displayWidth, this.displayHeight)); } } else { this.isTakingScreenshot = false; } } This is mine code public boolean onItemUse(ItemStack item, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffSet) { blablabla File phDir = mine.getAppDir("minecraft"); mine.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot(phDir, mine.displayWidth, mine.displayHeight)); world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); blablabla return true; } And i'm getting an error 2013-05-05 14:48:35 [iNFO] [sTDERR] java.lang.NullPointerException 2013-05-05 14:48:35 [iNFO] [sTDERR] at org.lwjgl.opengl.GL11.glPixelStorei(GL11.java:2135) 2013-05-05 14:48:35 [iNFO] [sTDERR] at net.minecraft.util.ScreenShotHelper.func_74292_a(ScreenShotHelper.java:45) 2013-05-05 14:48:35 [iNFO] [sTDERR] at net.minecraft.util.ScreenShotHelper.saveScreenshot(ScreenShotHelper.java:28) 2013-05-05 14:48:35 [iNFO] [sTDERR] at net.obscuracraft.src.ItemPlate.onItemUse(ItemPlate.java:84) Any ideas?
  25. Code or gtfo?
×
×
  • Create New...

Important Information

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