Posted September 13, 20178 yr Hi again, it's me...the learner I have a problem with a model, when i pick it up. It's a machine, that uses a block, a tile entity, a container and a special render. No errors or warnings in console. Let me know, what you need to help me. Best to explain is a short video(15sec) Edited September 13, 20178 yr by Dustpuppy
September 13, 20178 yr Author All code is here -> https://github.com/dustpuppy/wizardmod/tree/master/src/main/java/thewizardmod/extractor
September 13, 20178 yr You don't need all of these: https://github.com/dustpuppy/wizardmod/blob/master/src/main/resources/assets/thewizardmod/models/item/magic_extractor.json#L4 For any model unless you want the model to be different than the default values present in item/generated. Similarly... https://github.com/dustpuppy/wizardmod/blob/master/src/main/resources/assets/thewizardmod/models/item/iron_wand_0.json#L2 Use item/generated not builtin/generated. Third: Post your log. If models don't load, there's always an error. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 13, 20178 yr Author Without all the display stuff in the json file for the item, it looks terrible in inventory, because it renders flat.
September 13, 20178 yr 4 minutes ago, Dustpuppy said: Without all the display stuff in the json file for the item, it looks terrible in inventory, because it renders flat. Read point #2: Use item/generated not builtin/generated. Look at this. LOOK AT IT. LOOK AT HOW GLORIOUSLY SIMPLE IT IS. Edited September 13, 20178 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 13, 20178 yr Author Your right, it is simple. But the wand will then be rendered in first person, like a tool item. That looks bad. With my json display stuff it will be rendered different. A tool item is hold back and my wands are pointing away from player.
September 13, 20178 yr item/handheld Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 13, 20178 yr Author But all this will not explain, why the item of the machine will loose it's textures when it's picked up. Even with simple json files it's doing this.
September 13, 20178 yr Author I am using the same code for the portable tank. This will not have the problem. Looks like it has to do with the facing variants. But can' find out, why.
September 13, 20178 yr Author Haaaaaaaa!!!!! Found it!!!!! This is wrong. It only works for normal blocks without different meta data. @Override public final ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { int meta = state.getBlock().getMetaFromState(state); ItemStack ret = new ItemStack(this, 1, meta); NBTTagCompound compound = new NBTTagCompound(); TileEntityExtractor tileEntity = (TileEntityExtractor) world.getTileEntity(pos); NBTTagCompound tileEntityTag = new NBTTagCompound(); tileEntity.writeToNBT(tileEntityTag); compound.setTag("BlockEntityTag", tileEntityTag); ret.setTagCompound(compound); return Lists.newArrayList(ret); } Fix was really simple. @Override public final ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { // int meta = state.getBlock().getMetaFromState(state); ItemStack ret = new ItemStack(this, 1, 0); NBTTagCompound compound = new NBTTagCompound(); TileEntityExtractor tileEntity = (TileEntityExtractor) world.getTileEntity(pos); NBTTagCompound tileEntityTag = new NBTTagCompound(); tileEntity.writeToNBT(tileEntityTag); compound.setTag("BlockEntityTag", tileEntityTag); ret.setTagCompound(compound); return Lists.newArrayList(ret); } Took out the line, where the meat data is get and set it for the new itemstack just to 0.
September 13, 20178 yr 31 minutes ago, Dustpuppy said: Same wand just with item/handheld Ok, so your wands need the values, which I'd even said: 1 hour ago, Draco18s said: For any model unless you want the model to be different than the default values But the rest of your items don't. You also don't need to supply "ground" (etc.) overrides if they're the same, you can just omit them. Edited September 13, 20178 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.