
Naiten
Members-
Posts
325 -
Joined
-
Last visited
Everything posted by Naiten
-
Ite, dissappears from my inventory. And data isn't saved too, it's equal to all my photo items
-
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; } }
-
In windows, you should have .NET. Not sure about Linux...
-
Khm... Is that not good enough? You have Wine.
-
USE public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("modfolder:texturename"); }
-
You should use registerIcons.
-
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?
-
Added a new tutorial. Comment, please. http://www.minecraftforge.net/wiki/Multiple_blocks_structures
-
Do you render them with TileEntitySpecialRenderer? If yes, then check this out: http://www.minecraftforge.net/wiki/Custom_Tile_Entity_Renderer
-
If you know, why are you asking and why u no fix the error? Check your ModelGearBox.renderModel...
-
Place texture wherever you want and use bindTextureByName("path_to_your_texture.png");
-
"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
-
Don't mention, glad to help.
-
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%.
-
TileEntity methods not working in onBlockPlaced()
Naiten replied to Zeretul4's topic in Modder Support
Then, give me a thank or karma, please -
Try using world.removeEntity(Entity par1);
-
Я видела на офф сайте конвертор .obj->.java, поищи там. Не знаю, как он работает... --- I've seen an .obj->.java on minecraftforums, but i'm not sure if it works good.
-
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.
-
Sorry, no telepathic people here.
-
TileEntity methods not working in onBlockPlaced()
Naiten replied to Zeretul4's topic in Modder Support
Try onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityLiving, ItemStack itemStack), or onBlockAdded(World world, int i, int j, int k). -
Rendering sometimes too dark, changes with camera angle
Naiten replied to Reika's topic in Modder Support
Okay, you should have said you don't need lighting at all... -
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?