Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by Notunknown

  1. Oh, I thought he wanted a block which contains an item. I guess that you probably would not need a TileEntitySpecialRenderer in either case. But it is easier than trying to do it with models.
  2. You need a TileEntity and a TileEntitySpecialRenderer. The TileEntitySpecialRenderer renders the item inside the block, and the model renders the block itself.
  3. You should be using GlStateManager, but it should not make a difference in this scenario. Also, check to make sure the element rendering is the one you need or else it will render multiple times. Why that it would cause that effect, I am not sure, but try putting it this block: if (event.getType() == TEXT) { //CODE }
  4. As for rendering the item itself, I use this method: GlStateManager.pushMatrix(); GlStateManager.translate((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); Minecraft.getMinecraft().getRenderItem().renderItem(ITEM, TransformType.GROUND); GlStateManager.popMatrix(); Not quite sure if this is the best method for doing this, but it does work perfectly fine. Of course you will need to replace ITEM with an ItemStack.
  5. I found a workaround, in the event that I cannot find a proper method: I used GuiScreenEvent#DrawScreenEvent and recreated GuiUtils#drawHoveringText , removing all the rendering code (this gets me the X and Y of the tooltip, as well as its size). Its a bit messy, but it works for my purposes.
  6. That allows me to add to a tooltip (I am using that event) but it does not allow me to render additional information - such as what Thaumcraft does with its aspects.
  7. Which event do I need to handle rendering with Tooltips? Its for something a little similar to Thaumcraft's Aspect display above the tooltip.
  8. ItemPickaxe should have a method in it which works fine. After all, the pickaxe can harvest the stone just fine.
  9. If its just your own item can't you just store the recipe somewhere?
  10. Some blocks do not respond correctly to getHarvestLevel - I find that it is mostly the various Stone based blocks, having no proper harvest tool.
  11. I was not quite sure what you were asking. To be honest I am still not 100%, but do you want ItemPickaxe#canHarvestBlock(IBlockState) ?
  12. You are checking world.getBlock(x, y, z).isToolEffective("pickaxe", 3) , right? If so, then world.getBlock(x+1, y, z).isToolEffective("pickaxe", 3) is redundant, as you also check that world.getBlock(x, y, z) and world.getBlock(x+1, y, z) are the same block (and if the pickaxe is effective against the block it is effective against the block).
  13. Wait - I just found font/glyph_sizes.bin. But what does this do? I can only see one of them - does it need to contain information about all the fonts? How can I add to this file?
  14. It IS defined - and is a valid ResourceLocation. There is no log because there is no error - the font just wont render. I think it is something around creating fonts which I don't understand - maybe fonts require a special png format?
  15. Okay, this is really annoying me. Currently I have managed to do it, but it seems really inefficient. ModelLoaderRegistry.getModel(new ResourceLocation(model_location)).bake(new SimpleModelState(ImmutableMap.<IModelPart, TRSRTransformation>of()), DefaultVertexFormats.ITEM, ModelLoader.defaultTextureGetter()); I have gotten it to work for models which belong to pre-existing items with this, but when I try to load a model which does not belong to an actual item it returns the default model (the pink/black cube thing) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getModel(model_location); What am I missing? There must be a method that I have simply overlooked...
  16. This is really annoying me. I am attempting to add a new "runes" based font to the game, but I am really struggling to get it to work. It only adds a-zA-Z, but no matter what I try it just fails to render anything. I am putting this at the top of my method (so I can change it easily) and, well, nothing renders (except for special characters, such as \20. But I didn't add those, so I am guessing Minecraft did.) This is me attempting to create the font: final FontRenderer runeFont = new FontRenderer(Minecraft.getMinecraft().gameSettings, FONT_TEXTURE_ASCII, Minecraft.getMinecraft().renderEngine, false);
  17. You can change/disable that feature, but you probably shouldn't.
  18. I am quite sure that "" + ChatFormatting.BLACK + name should work.
  19. Sorry to bump this, but is there any info on this sort of thing? I have gotten it to (in theory) work, but additional input would be greatly appreciated!
  20. Ok, so I think I have gotten the basics down. I just need some help with getting models from ModelResourceLocations, or preferably a String. I may also need help with getting custom data from a model's json.
  21. ScreenGui#drawScreen draws all the buttons and labels. If you use those you would probably want to call it last, to prevent them from being behind background objects.
  22. Okay, so I believe that I have gotten the basic system set up. Just a few questions: 1: How can I have a texture stitched into the texture atlas without an associated item or block to go with it (or does it automatically do this with everything in textures/items?) 2: How can I load a model without an associated item or block (for components to be used in composite models) (again, does it automatically do this with everything in the models folder?) 3: How can I load non-standard data from a model file (for use in composite models, things like relative translation and scales)? Edit: For (2), I basically want to turn a ModelResourceLocation into an IBakedModel. My attempts are failing... :'(
  23. Ah - well that is what I was asking - if it were possible to do rendering in GL for items for items which require freaky effects to pull off.
  24. What is wrong with using an NBTTagCompound either way, and just converting the keys to strings in a way which can be reverted?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.