Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Z@Nka

Members
  • Joined

  • Last visited

Everything posted by Z@Nka

  1. Use something like: player.inventory.setInventorySlotContents(slot, new ItemStack(item)) Make sure you do it is the server.
  2. Its for 1.6.4 but its still good. Watch all the part of the multiblock tutorials. Thats the first part. If there is anything there that changed since 1.6.4 and you need help, then just post here.
  3. Z@Nka replied to Z@Nka's topic in Modder Support
    Thanks coolAlias! That's probably going to give me the info I need.
  4. Not the best thing to do but you can maybe wait for onRightClick of the item you want, then delete it from your inventory and spawn a pickaxe in its place.
  5. Ok, I didn't want to give false info so I read all of the Terms of Use and all. Apparently, there is nothing like that... I can nearly promise I saw something there when I started modding... Anyway sorry. (Lol, embarrassing)
  6. Read the Mojang Terms of use. That will tell you what you can do, can't do and how far you can go in modding.
  7. Don't want to sound rude or something.. This is also a little bit off the point but are you polish?
  8. Z@Nka replied to Z@Nka's topic in Modder Support
    My question is: is this the correct way to check if it's not null? itemstack.getTagCompound(). != null && itemstack.getTagCompound().getInteger("Enchant") == 0
  9. Z@Nka replied to Z@Nka's topic in Modder Support
    But I set in to 0 at the begining itemstack.setTagInfo("0", Enchant);
  10. Z@Nka replied to Z@Nka's topic in Modder Support
    I tried this but I crashed when I tried to right click. if(itemstack.getTagCompound() != null && itemstack.getTagCompound().getInteger("Enchant") == 0) { itemstack.setTagInfo("1", Enchant); player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } ---- Minecraft Crash Report ---- // I blame Dinnerbone. Time: 29.03.14 17:56 Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.nbt.NBTTagCompound.copy(NBTTagCompound.java:462) at net.minecraft.item.ItemStack.copy(ItemStack.java:403) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.<init>(C08PacketPlayerBlockPlacement.java:33) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:450) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1568) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2053) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038) at net.minecraft.client.Minecraft.run(Minecraft.java:954) at net.minecraft.client.main.Main.main(Main.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.nbt.NBTTagCompound.copy(NBTTagCompound.java:462) at net.minecraft.item.ItemStack.copy(ItemStack.java:403) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.<init>(C08PacketPlayerBlockPlacement.java:33) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:450) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1568) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player643'/233, l='MpServer', x=137,30, y=76,54, z=-163,77]] Chunk stats: MultiplayerChunkCache: 240, 240 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (148,64,-152), Chunk: (at 4,4,8 in 9,-10; contains blocks 144,0,-160 to 159,255,-145), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 38136 game time, 10770 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 80 total; [EntityCreeper['Creeper'/137, l='MpServer', x=162,50, y=30,00, z=-215,50], EntitySkeleton['Skeleton'/136, l='MpServer', x=177,06, y=47,00, z=-228,53], EntitySkeleton['Skeleton'/139, l='MpServer', x=160,94, y=19,00, z=-203,53], EntitySlime['Slime'/138, l='MpServer', x=166,69, y=25,00, z=-200,31], EntityCreeper['Creeper'/141, l='MpServer', x=173,50, y=20,00, z=-146,50], EntityBat['Bat'/140, l='MpServer', x=161,75, y=53,10, z=-204,25], EntitySkeleton['Skeleton'/143, l='MpServer', x=164,50, y=26,00, z=-93,50], EntityZombie['Zombie'/142, l='MpServer', x=160,91, y=40,00, z=-142,72], EntitySheep['Sheep'/135, l='MpServer', x=172,34, y=72,00, z=-240,47], EntityZombie['Zombie'/154, l='MpServer', x=177,03, y=38,00, z=-209,00], EntityZombie['Zombie'/155, l='MpServer', x=169,78, y=35,00, z=-215,13], EntityCreeper['Creeper'/156, l='MpServer', x=185,38, y=40,00, z=-217,03], EntityBat['Bat'/157, l='MpServer', x=181,44, y=50,10, z=-207,25], EntityCow['Cow'/158, l='MpServer', x=186,53, y=64,00, z=-177,66], EntityCow['Cow'/159, l='MpServer', x=188,91, y=64,00, z=-173,09], EntityZombie['Zombie'/144, l='MpServer', x=172,38, y=44,00, z=-84,66], EntitySkeleton['Skeleton'/145, l='MpServer', x=171,22, y=44,00, z=-86,31], EntityCreeper['Creeper'/170, l='MpServer', x=204,78, y=48,00, z=-127,16], EntityCow['Cow'/169, l='MpServer', x=185,97, y=64,00, z=-159,94], EntitySheep['Sheep'/168, l='MpServer', x=207,78, y=66,00, z=-174,41], EntityChicken['Chicken'/175, l='MpServer', x=209,44, y=68,00, z=-213,59], EntityCreeper['Creeper'/174, l='MpServer', x=209,09, y=12,00, z=-230,25], EntitySpider['Spider'/39, l='MpServer', x=63,25, y=52,39, z=-99,28], EntitySkeleton['Skeleton'/37, l='MpServer', x=62,50, y=21,00, z=-120,88], EntityCreeper['Creeper'/160, l='MpServer', x=187,30, y=19,20, z=-103,70], EntityZombie['Zombie'/167, l='MpServer', x=201,94, y=38,00, z=-172,44], EntityZombie['Zombie'/166, l='MpServer', x=200,84, y=19,00, z=-186,19], EntitySkeleton['Skeleton'/165, l='MpServer', x=199,94, y=36,00, z=-195,50], EntityZombie['Zombie'/164, l='MpServer', x=193,25, y=46,00, z=-214,25], EntityPig['Pig'/50, l='MpServer', x=70,94, y=62,05, z=-187,91], EntitySkeleton['Skeleton'/49, l='MpServer', x=68,31, y=47,00, z=-229,50], EntityBat['Bat'/55, l='MpServer', x=65,89, y=37,20, z=-142,44], EntityBat['Bat'/54, l='MpServer', x=58,59, y=26,85, z=-147,69], EntityBat['Bat'/53, l='MpServer', x=65,88, y=22,42, z=-114,91], EntityZombie['Zombie'/52, l='MpServer', x=72,44, y=23,00, z=-136,88], EntityZombie['Zombie'/178, l='MpServer', x=215,50, y=46,00, z=-181,50], EntityBat['Bat'/59, l='MpServer', x=68,25, y=42,00, z=-108,25], EntitySpider['Spider'/179, l='MpServer', x=215,28, y=46,00, z=-163,91], EntityBat['Bat'/58, l='MpServer', x=67,41, y=21,79, z=-122,56], EntityBat['Bat'/57, l='MpServer', x=77,25, y=13,39, z=-117,75], EntitySpider['Spider'/177, l='MpServer', x=220,81, y=43,00, z=-197,56], EntityCreeper['Creeper'/56, l='MpServer', x=77,00, y=20,00, z=-116,50], EntityZombie['Zombie'/182, l='MpServer', x=210,84, y=13,00, z=-128,31], EntityZombie['Zombie'/183, l='MpServer', x=218,50, y=24,00, z=-138,03], EntityZombie['Zombie'/180, l='MpServer', x=215,41, y=47,00, z=-159,00], EntityZombie['Zombie'/61, l='MpServer', x=79,50, y=13,00, z=-85,50], EntitySkeleton['Skeleton'/181, l='MpServer', x=215,06, y=14,00, z=-132,47], EntityZombie['Zombie'/60, l='MpServer', x=75,41, y=13,00, z=-94,00], EntityPig['Pig'/69, l='MpServer', x=81,53, y=65,00, z=-193,69], EntityPig['Pig'/70, l='MpServer', x=81,06, y=65,00, z=-195,13], EntityPig['Pig'/71, l='MpServer', x=77,13, y=63,00, z=-188,44], EntitySheep['Sheep'/72, l='MpServer', x=93,78, y=64,00, z=-189,25], EntitySpider['Spider'/73, l='MpServer', x=84,56, y=27,00, z=-153,72], EntityCow['Cow'/74, l='MpServer', x=89,47, y=68,00, z=-158,25], EntitySheep['Sheep'/81, l='MpServer', x=96,06, y=64,00, z=-172,97], EntitySheep['Sheep'/83, l='MpServer', x=99,81, y=63,00, z=-150,34], EntitySkeleton['Skeleton'/82, l='MpServer', x=104,44, y=23,00, z=-157,16], EntitySheep['Sheep'/89, l='MpServer', x=126,53, y=69,00, z=-175,47], EntitySkeleton['Skeleton'/88, l='MpServer', x=119,50, y=21,00, z=-169,50], EntityZombie['Zombie'/102, l='MpServer', x=139,66, y=34,00, z=-195,25], EntityBat['Bat'/103, l='MpServer', x=138,41, y=35,00, z=-190,97], EntityWitch['Witch'/100, l='MpServer', x=130,50, y=42,00, z=-230,09], EntityCreeper['Creeper'/101, l='MpServer', x=135,50, y=45,00, z=-219,50], EntityZombie['Zombie'/99, l='MpServer', x=132,66, y=38,00, z=-224,94], EntityClientPlayerMP['Player643'/233, l='MpServer', x=137,30, y=76,54, z=-163,77], EntitySlime['Slime'/108, l='MpServer', x=134,69, y=58,00, z=-116,26], EntityCow['Cow'/106, l='MpServer', x=140,44, y=71,00, z=-173,47], EntityBat['Bat'/107, l='MpServer', x=140,84, y=39,17, z=-149,53], EntitySkeleton['Skeleton'/104, l='MpServer', x=137,56, y=63,00, z=-184,84], EntitySheep['Sheep'/105, l='MpServer', x=131,50, y=70,00, z=-178,50], EntitySheep['Sheep'/119, l='MpServer', x=149,41, y=66,00, z=-212,53], EntitySpider['Spider'/118, l='MpServer', x=159,44, y=28,00, z=-215,50], EntityBat['Bat'/117, l='MpServer', x=150,66, y=15,10, z=-220,59], EntityZombie['Zombie'/115, l='MpServer', x=154,44, y=32,00, z=-238,91], EntitySkeleton['Skeleton'/125, l='MpServer', x=148,50, y=19,00, z=-89,50], EntityZombie['Zombie'/124, l='MpServer', x=159,50, y=41,00, z=-132,50], EntityZombie['Zombie'/123, l='MpServer', x=159,88, y=40,00, z=-144,44], EntityZombie['Zombie'/122, l='MpServer', x=151,06, y=33,00, z=-186,53], EntitySkeleton['Skeleton'/121, l='MpServer', x=147,16, y=32,00, z=-179,59], EntityCreeper['Creeper'/120, l='MpServer', x=149,38, y=19,00, z=-181,03]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:418) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2559) at net.minecraft.client.Minecraft.run(Minecraft.java:983) at net.minecraft.client.main.Main.main(Main.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_21, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 284170264 bytes (271 MB) / 598212608 bytes (570 MB) up to 1905197056 bytes (1816 MB) JVM Flags: 0 total; AABB Pool Size: 28749 (1609944 bytes; 1 MB) allocated, 2 (112 bytes; 0 MB) used IntCache: cache: 15, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.01-pre FML v7.2.125.1031 Minecraft Forge 10.12.0.1031 5 mods loaded, 5 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.125.1031} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1031.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.0.1031} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1031.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available electro{Alpha 0.1A} [Electrocuted] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: AMD Radeon HD 6800 Series GL version 4.2.12422 Compatibility Profile Context 13.152.0.0, ATI Technologies Inc. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: ~~ERROR~~ NullPointerException: null Profiler Position: N/A (disabled) Vec3 Pool Size: 1768 (99008 bytes; 0 MB) allocated, 18 (1008 bytes; 0 MB) used Anisotropic Filtering: Off (1) Then I tried this and it didn't even let me look at it. if(itemstack.getTagCompound() != null) { if(itemstack.getTagCompound().getInteger("Enchant") == 0) { itemstack.setTagInfo("1", Enchant); player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); }
  11. Z@Nka replied to Z@Nka's topic in Modder Support
    I tried the NBT thing and I don't think it really worked. public class EnrichedBoneSword extends ItemSword { public NBTBase Enchant; public EnrichedBoneSword(ToolMaterial material) { super(material); } public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { for (int i = 0; i < player.inventory.getSizeInventory(); ++i) { ItemStack stack = player.inventory.getStackInSlot(i); if(stack != null) { if(stack != null && stack.getItem() == ModItems.EnrichedBoneSword) { if(!world.isRemote) { if(player.isSneaking()) { if(itemstack.getTagCompound().getInteger("Enchant") == 0) { itemstack.setTagInfo("1", Enchant); player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } else if(itemstack.getTagCompound().getInteger("Enchant") == 1) { itemstack.setTagInfo("2", Enchant); player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } else if(itemstack.getTagCompound().getInteger("Enchant") == 2) { itemstack.setTagInfo("3", Enchant); player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } else if(itemstack.getTagCompound().getInteger("Enchant") == 3) { itemstack.setTagInfo("1", Enchant); player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } } } } } } return false; } public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { if(itemstack.getTagCompound().getInteger("Enchant") == 1) { list.add("Sharpness"); } else if(itemstack.getTagCompound().getInteger("Enchant") == 2) { list.add("Smite"); } else if(itemstack.getTagCompound().getInteger("Enchant") == 3) { list.add("Bane of Arthropods"); } } } ---- Minecraft Crash Report ---- // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~] Time: 29.03.14 15:44 Description: Rendering screen java.lang.NullPointerException: Rendering screen at bulkyzanka.electro.mod.items.tools.EnrichedBoneSword.addInformation(EnrichedBoneSword.java:80) at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:633) at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:136) at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:774) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:204) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:678) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1209) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1066) at net.minecraft.client.Minecraft.run(Minecraft.java:954) at net.minecraft.client.main.Main.main(Main.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at bulkyzanka.electro.mod.items.tools.EnrichedBoneSword.addInformation(EnrichedBoneSword.java:80) at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:633) at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:136) at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:774) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:204) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:678) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (274, 232). Absolute: (549, 577) Screen size: Scaled: (456, 521). Absolute: (911, 1042). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player328'/258, l='MpServer', x=126,98, y=71,62, z=-164,05]] Chunk stats: MultiplayerChunkCache: 225, 225 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (148,64,-152), Chunk: (at 4,4,8 in 9,-10; contains blocks 144,0,-160 to 159,255,-145), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 34073 game time, 6707 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 86 total; [EntityCreeper['Creeper'/137, l='MpServer', x=148,59, y=37,00, z=-203,00], EntitySheep['Sheep'/136, l='MpServer', x=151,38, y=65,49, z=-206,46], EntityCow['Cow'/139, l='MpServer', x=154,34, y=67,00, z=-183,38], EntityBat['Bat'/138, l='MpServer', x=146,25, y=32,00, z=-179,80], EntityZombie['Zombie'/131, l='MpServer', x=154,50, y=35,00, z=-230,06], EntityBat['Bat'/133, l='MpServer', x=147,25, y=20,10, z=-210,00], EntityBat['Bat'/132, l='MpServer', x=147,25, y=20,10, z=-208,25], EntitySkeleton['Skeleton'/135, l='MpServer', x=162,69, y=34,93, z=-212,50], EntityBat['Bat'/134, l='MpServer', x=147,25, y=20,10, z=-208,25], EntityCreeper['Creeper'/152, l='MpServer', x=163,50, y=38,00, z=-207,50], EntityCreeper['Creeper'/153, l='MpServer', x=169,73, y=39,00, z=-205,75], EntityClientPlayerMP['Player328'/258, l='MpServer', x=126,98, y=71,62, z=-164,05], EntityBat['Bat'/154, l='MpServer', x=163,25, y=17,10, z=-107,16], EntitySlime['Slime'/20, l='MpServer', x=47,69, y=54,00, z=-131,31], EntitySheep['Sheep'/146, l='MpServer', x=172,34, y=72,00, z=-240,47], EntityZombie['Zombie'/147, l='MpServer', x=165,06, y=32,00, z=-219,41], EntityZombie['Zombie'/148, l='MpServer', x=171,22, y=52,00, z=-215,16], EntitySlime['Slime'/149, l='MpServer', x=166,69, y=24,00, z=-200,31], EntityZombie['Zombie'/150, l='MpServer', x=161,31, y=18,00, z=-200,98], EntityBat['Bat'/151, l='MpServer', x=171,21, y=39,86, z=-204,93], EntitySkeleton['Skeleton'/171, l='MpServer', x=175,72, y=47,00, z=-229,25], EntitySkeleton['Skeleton'/170, l='MpServer', x=180,06, y=47,00, z=-228,41], EntityCreeper['Creeper'/35, l='MpServer', x=57,03, y=37,00, z=-225,06], EntitySpider['Spider'/169, l='MpServer', x=188,50, y=11,00, z=-231,50], EntityCreeper['Creeper'/38, l='MpServer', x=63,50, y=44,00, z=-197,50], EntityZombie['Zombie'/175, l='MpServer', x=170,31, y=51,85, z=-206,47], EntityBat['Bat'/174, l='MpServer', x=174,50, y=38,68, z=-210,57], EntitySheep['Sheep'/36, l='MpServer', x=54,63, y=64,00, z=-228,91], EntityCreeper['Creeper'/173, l='MpServer', x=182,50, y=28,00, z=-215,50], EntitySheep['Sheep'/37, l='MpServer', x=49,56, y=64,00, z=-234,56], EntityCreeper['Creeper'/172, l='MpServer', x=186,41, y=28,00, z=-212,00], EntitySkeleton['Skeleton'/46, l='MpServer', x=55,16, y=20,00, z=-130,78], EntityCreeper['Creeper'/47, l='MpServer', x=64,03, y=31,00, z=-133,44], EntitySquid['Squid'/44, l='MpServer', x=63,81, y=61,34, z=-150,25], EntitySquid['Squid'/45, l='MpServer', x=68,66, y=59,09, z=-145,75], EntitySheep['Sheep'/186, l='MpServer', x=201,44, y=66,00, z=-174,66], EntityBat['Bat'/51, l='MpServer', x=50,72, y=23,72, z=-116,36], EntityCow['Cow'/187, l='MpServer', x=192,81, y=64,00, z=-163,22], EntitySpider['Spider'/50, l='MpServer', x=60,78, y=22,00, z=-121,00], EntitySkeleton['Skeleton'/184, l='MpServer', x=201,50, y=35,00, z=-195,50], EntityBat['Bat'/49, l='MpServer', x=52,51, y=25,17, z=-114,13], EntityZombie['Zombie'/185, l='MpServer', x=187,51, y=27,69, z=-185,58], EntitySkeleton['Skeleton'/48, l='MpServer', x=54,50, y=21,00, z=-123,91], EntityBat['Bat'/55, l='MpServer', x=53,54, y=24,20, z=-112,58], EntityBat['Bat'/54, l='MpServer', x=51,48, y=25,61, z=-115,30], EntityZombie['Zombie'/53, l='MpServer', x=54,67, y=31,00, z=-129,54], EntitySkeleton['Skeleton'/52, l='MpServer', x=63,25, y=33,00, z=-119,16], EntityCow['Cow'/178, l='MpServer', x=183,53, y=63,00, z=-179,75], EntityCow['Cow'/179, l='MpServer', x=186,53, y=64,00, z=-177,66], EntityZombie['Zombie'/176, l='MpServer', x=190,50, y=49,00, z=-206,50], EntityZombie['Zombie'/177, l='MpServer', x=188,50, y=49,00, z=-204,50], EntitySpider['Spider'/182, l='MpServer', x=193,94, y=8,45, z=-218,50], EntityZombie['Zombie'/183, l='MpServer', x=206,50, y=25,00, z=-194,50], EntityCreeper['Creeper'/181, l='MpServer', x=205,84, y=27,00, z=-225,00], EntityCreeper['Creeper'/69, l='MpServer', x=60,22, y=36,00, z=-230,38], EntityCreeper['Creeper'/70, l='MpServer', x=59,44, y=36,00, z=-230,69], EntityZombie['Zombie'/71, l='MpServer', x=65,50, y=35,00, z=-231,50], EntitySquid['Squid'/76, l='MpServer', x=69,66, y=59,00, z=-139,09], EntityCreeper['Creeper'/78, l='MpServer', x=72,50, y=16,00, z=-122,50], EntityBat['Bat'/79, l='MpServer', x=76,56, y=19,10, z=-117,25], EntityCreeper['Creeper'/72, l='MpServer', x=67,59, y=44,00, z=-188,97], EntityPig['Pig'/73, l='MpServer', x=74,63, y=62,07, z=-187,53], EntitySquid['Squid'/74, l='MpServer', x=76,09, y=61,00, z=-182,47], EntitySquid['Squid'/75, l='MpServer', x=76,91, y=60,34, z=-151,81], EntityCreeper['Creeper'/81, l='MpServer', x=68,69, y=34,00, z=-126,31], EntityBat['Bat'/80, l='MpServer', x=65,68, y=24,45, z=-111,04], EntityZombie['Zombie'/93, l='MpServer', x=91,50, y=21,00, z=-205,97], EntityPig['Pig'/95, l='MpServer', x=89,25, y=66,00, z=-196,53], EntityPig['Pig'/94, l='MpServer', x=81,53, y=65,00, z=-193,69], EntitySquid['Squid'/100, l='MpServer', x=80,50, y=60,13, z=-155,50], EntitySheep['Sheep'/98, l='MpServer', x=92,09, y=63,00, z=-172,03], EntityCow['Cow'/99, l='MpServer', x=89,50, y=69,00, z=-163,25], EntityPig['Pig'/96, l='MpServer', x=81,31, y=63,00, z=-186,22], EntitySheep['Sheep'/97, l='MpServer', x=85,75, y=63,00, z=-190,41], EntitySheep['Sheep'/106, l='MpServer', x=95,91, y=63,00, z=-150,13], EntityCreeper['Creeper'/105, l='MpServer', x=100,53, y=57,00, z=-179,31], EntityItem['item.item.EnrichedBoneSpade'/115, l='MpServer', x=123,22, y=71,13, z=-174,59], EntityItem['item.item.diamond'/114, l='MpServer', x=117,66, y=65,13, z=-170,75], EntitySheep['Sheep'/113, l='MpServer', x=126,53, y=69,00, z=-175,47], EntityBat['Bat'/112, l='MpServer', x=114,25, y=15,00, z=-195,53], EntityCreeper['Creeper'/126, l='MpServer', x=134,59, y=21,00, z=-96,00], EntitySlime['Slime'/125, l='MpServer', x=134,69, y=58,00, z=-115,45], EntitySheep['Sheep'/124, l='MpServer', x=131,50, y=70,00, z=-178,50], EntitySkeleton['Skeleton'/123, l='MpServer', x=143,56, y=64,00, z=-193,94], EntityZombie['Zombie'/122, l='MpServer', x=142,50, y=39,00, z=-219,50], EntitySkeleton['Skeleton'/120, l='MpServer', x=141,50, y=30,00, z=-242,50]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:418) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2559) at net.minecraft.client.Minecraft.run(Minecraft.java:976) at net.minecraft.client.main.Main.main(Main.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_21, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 116366408 bytes (110 MB) / 532414464 bytes (507 MB) up to 1905197056 bytes (1816 MB) JVM Flags: 0 total; AABB Pool Size: 22323 (1250088 bytes; 1 MB) allocated, 9 (504 bytes; 0 MB) used IntCache: cache: 15, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.01-pre FML v7.2.125.1031 Minecraft Forge 10.12.0.1031 5 mods loaded, 5 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.125.1031} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1031.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.0.1031} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1031.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available electro{Alpha 0.1A} [Electrocuted] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: AMD Radeon HD 6800 Series GL version 4.2.12422 Compatibility Profile Context 13.152.0.0, ATI Technologies Inc. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: ~~ERROR~~ NullPointerException: null Profiler Position: N/A (disabled) Vec3 Pool Size: 3001 (168056 bytes; 0 MB) allocated, 84 (4704 bytes; 0 MB) used Anisotropic Filtering: Off (1) When ever even try to roll my mouse over the sword, it crashes. I pretty sure that I messed up with the NBT thing so whenever its trying to add a tooltip, it crashes.
  12. Z@Nka replied to Z@Nka's topic in Modder Support
    Ohh, that would be easier, thanks diesieben07 and coolAlias!!!
  13. Z@Nka replied to Z@Nka's topic in Modder Support
    Ok. I changed the: "public static int Enchant" to "public int Enchant". Now is changes all of the values but it only sets to one in the hand to a diamond. Now just to learn the NBT stuff.
  14. Z@Nka replied to Z@Nka's topic in Modder Support
    Sorry I forgot. public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { for (int i = 0; i < player.inventory.getSizeInventory(); ++i) { ItemStack stack = player.inventory.getStackInSlot(i); if(stack != null) { if(stack != null && stack.getItem() == ModItems.EnrichedBoneSword) { if(!world.isRemote) { if(player.isSneaking()) { if(this.Enchant == 0) { this.Enchant = 1; player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } else if(this.Enchant == 1) { this.Enchant = 2; player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } else if(this.Enchant == 2) { this.Enchant = 3; player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } else if(this.Enchant == 3) { this.Enchant = 1; player.inventory.setInventorySlotContents(i, new ItemStack(Items.diamond)); } } } } } } return false; } It changes all of them Would I have to set the metadata and all, because it even changes the one in the creative tab. If I set the metadata will it keep the value if I leave and rejoin the world?
  15. Like adding a new pickaxe? If yes then add a new material and make a item class, extend it with ItemPickaxe and there you go. Thats a basic pickaxe. A couple of good tuts. The second one shows how to make the tool material.
  16. Z@Nka replied to Z@Nka's topic in Modder Support
    Thanks diesieben07!! It still sets all the items in my inventory to the same as the one I pressed...
  17. Z@Nka replied to Z@Nka's topic in Modder Support
    public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { for (int i = 0; i < player.inventory.getSizeInventory(); ++i) { ItemStack stack = player.inventory.getStackInSlot(i); if(stack != null) { if(stack.getItem() != null && stack.getItem() == ModItems.EnrichedBoneSword) { } } if(world.isRemote) { if(player.isSneaking()) { if(this.Enchant == 0) { this.Enchant = 1; player.inventory.setInventorySlotContents(i, new ItemStack(ModItems.EnrichedBoneSword)); } else if(this.Enchant == 1) { this.Enchant = 2; player.inventory.setItemStack(new ItemStack(ModItems.EnrichedBoneSword)); } else if(this.Enchant == 2) { this.Enchant = 3; player.inventory.addItemStackToInventory(new ItemStack(ModItems.EnrichedBoneSword)); } else if(this.Enchant == 3) { this.Enchant = 1; player.inventoryContainer.putStackInSlot(i, new ItemStack(ModItems.EnrichedBoneSword)); } } } } return false; } I tried them sort of like that but I was spawning them in random slots because I didn't have the thing where it checks the slot done. I was add dirt, it looked like it was in my inv but it was a ghost item...
  18. Z@Nka replied to Z@Nka's topic in Modder Support
    1 second, I need to rewrite it. -.-
  19. Z@Nka replied to Z@Nka's topic in Modder Support
    These are a couple of the lines I tried but I got really confused, I sorry if this is totally wrong. player.inventory.addItemStackToInventory player.inventory.setItemStack player.inventory.setInventorySlotContents player.inventoryContainer.putStackInSlot Those are the methods I tried.... It still is just on the client.
  20. Z@Nka replied to Z@Nka's topic in Modder Support
    Ohh, ok. I looked in it more and I tried a bunch of lines... And nothing worked when I try to add it to the server.
  21. I taught I knew it but then I tried it myself so I don't give false info and it didn't work.... Too much for my brain to handle sorry.
  22. Is it supposed to just disappear like a sword when it brakes?
  23. Are you trying to get it to take 1 damage when used in crafting each time and once the durability hits 0, you can't use it for crafting anymore until repaired?
  24. Z@Nka replied to Z@Nka's topic in Modder Support
    How to get the slot index and how to add them in the server? I tought that if I add it in the container that would do it since gui is client and container is server...
  25. Z@Nka replied to Z@Nka's topic in Modder Support
    I found out how to spawn the item but, if I do: player.inventory.addItemStackToInventory(new ItemStack(Blocks.dirt)); it looks like the item is there but it isn't. I tried doing player.inventoryContainer.putStackInSlot(15, (new ItemStack(Blocks.dirt))); but the same thing happens, plus I want it to take up the slot where the deleted item was. And also I still haven't figured out how to spawn the tool damaged.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.