Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi This link might be useful for background info. http://greyminecraftcoder.blogspot.com.au/2014/12/block-rendering-18.html @Yakman - try override Block.isOpaqueCube() to return false. -TGG
  2. Hi from http://minecraft.gamepedia.com/Models: uvlock: Can be true or false (default). Locks the rotation of the texture of a block, if set to true. This way the texture will not rotate with the block when using the x and y-tags above. -TGG
  3. Hi Unfortunately I don't see the problem, but something you could try: A useful breakpoint to solve registration problems is to set a breakpoint at ItemModelMesher:: public IBakedModel getItemModel(ItemStack stack) { Item item = stack.getItem(); IBakedModel ibakedmodel = this.getItemModel(item, this.getMetadata(stack)); } You can then trace in, to compare 1) the model that your item is looking for, against 2) the contents of the registry. Where they don't match, you can usually see why immediately. -TGG
  4. Hi CleverPanda's suggestion is the way to go I think. You also might also be interested in this working example from a tutorial project https://github.com/TheGreyGhost/MinecraftByExample -see MBE03 -TGG
  5. Hi. Based on the System.out.println code it looks to me like you are overwriting the same int [] each time. You need to make a copy of the int [] each time you make another baked quad. -TGG
  6. Hmm that should have worked. Perhaps I'm wrong, I last tested it in 1.6.4 I think. Instead, you could use an ISimpleBlockRenderingHandler and use GL11.glDisable(GL11.GL_CULL_FACE), then call the vanilla block rendering method, then change CULL_FACE back again. http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html and http://greyminecraftcoder.blogspot.com.au/2013/07/block-rendering.html -TGG
  7. Hi Multithreading bugs are an absolute pain to debug. You could try using an earlier version of Forge and seeing if the problem goes away. Otherwise, you need to look carefully in your code (at.tyron.vintagecraft.WorldGen.Helper.WorldProviderVC ? ) to see if it's modifying the same object that triggers the error at net.minecraft.world.World.func_175650_b(World.java:3126) at net.minecraft.world.chunk.Chunk.func_76631_c(Chunk.java:952) (I'm using a different forge version so those line numbers don't match mine) It looks like you might be adding chunks, entities, or tileentities in the wrong thread. -TGG
  8. Hi I think you can achieve this by rendering your block in pass 1, which turns off back-face culling - Block.getRenderBlockPass() or Block.canRenderInPass(). It also turns on alpha blending but if you set your alpha to 1 it won't look any different. -TGG
  9. Hi If both of those two layers are json models, i.e. you don't need to generate layer 0 texel by texel, then you can just merge the two together using a technique similar to the mbe05 CompositeModel - i.e. retrieve the IBakedModel for each of the two items, and concatenate their generalQuads together. ISmartItemModel and handleItemStack will get you there, like EverythingGames suggested. If you need to generate an item model from a dynamic texture, that's harder. ItemModelGenerator can do that for you, but you would need to put your texture into the texture map somehow. I think it should be possible using OpenGL to write to the texture sheet but I've only done that on a texture sheet I created myself. Let us know if you need that path... -TGG
  10. Hi I don't really understand what you're trying to do with the invisible entities. Maybe you should keep them as totally separate data structure and synchronise them yourself using packets? -TGG
  11. Hi There is a syntax error in your JSON. > Expected name at line 83 column 6 Try this site to discover syntax error http://jsonlint.com/ This troubleshooting guide might help http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html -TGG
  12. Hi Without thinking about it too hard, I would say that the hashcode of a String [] might just be the object reference, i.e. a shallow hashCode. This will be different for each instance of the String [] regardless if all the Strings in the array are identical. If this is important to you, perhaps you could replace String [] with a container class that does deep hashCode on the Strings it is holding. -TGG
  13. Hi I'd advise to start out simple First step is to add the different types of blocks you want and get them to render properly. In fact, best to start just by add one of the blocks and getting it working first... Then you need to add some logic somewhere to recognise when the player has constructed a complete greenhouse, typically this is called whenever one of your greenhouse blocks is placed, deleted, or otherwise changed. Once you've gotten that far, come back and ask again, assuming you haven't become the expert yet -TGG
  14. Hi Generic.testoniumOre is probably null? In case you're just starting out, this link is very helpful for learning how to debug null pointer exceptions http://www.terryanderson.ca/debugging/run.html -TGG
  15. Hi This link shows a bit about World Generation. I think 1.8 is probably similar but not identical. http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-7/world-generation/ Re the tree - have a look at WorldGenAbstractTree and its derived classes. If you're just starting out, I think you've chosen a rather difficult starting point. -TGG
  16. Hi You're probably running into the problem that alpha blended quads have to be rendered in a specific order. You have to render the furthest-away quads first. If you render the closest quad first, then when you draw the furthest quad, the depth culling hides it. This isn't easy to fix. If you turn off depth culling, your quads render in front of everything, even solid blocks. If you turn off writing to the depth buffer when drawing alpha blended quads, the result will still look different for front quad first, back quad last vs back quad first, front quad last You need to sort the quads in your TESR to render the furthest ones first. So long as the quads don't intersect, this isn't very difficult. In your case, it might be enough just to render all the non-alpha-blended parts first, then the glass panes second (keep back-face culling on for the glass panes). -TGG
  17. Hi Well, when you used your debugger to inspect nbtTagList, did all the slot_main get added to nbtTaglist, or only the first three? if only the first three, what is different about the remaining ones? (use your debugger to inspect them and trace into the writeToNBT) -TGG
  18. Hi Looks like this is how it's calculated (from EntityRenderer.renderWorldPass() Entity entity = this.mc.getRenderViewEntity(); double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks; double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks; double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks; frustum.setPosition(d0, d1, d2); -TGG
  19. Hi Your debugger should show you pretty quick smart what's going on? Do you know how to use it? If not, this guide for Eclipse might help, you'll wonder how on earth you ever debugged without it. http://www.vogella.com/tutorials/EclipseDebugging/article.html -TGG
  20. Hi Have a look in BlockDynamicLiquid. It's more complicated than you need but all the pieces are there. In particular look in updateTick() and at this line worldIn.scheduleUpdate(pos, this, j); -TGG
  21. aiiee that is the worst! hope it turns out to be the actual problem.... -TGG
  22. ah yeah, I meant getBlockLayer() not getRenderType(), my bad. -TGG
  23. Well that's frustrating. I'm out of ideas unfortunately. The GLStateManager pushAttrib and popAttrib functions are buggy (they don't dirty the cache properly) but if you're not using that, then I don't know. I've previously used this troubleshooting class to help track a similar problem https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/usefultools/OpenGLdebugging.java i.e. call dumpAllIsEnabled() before & after, then look for the difference In your case I doubt it will help though. You could try copying drawRect into your own class, and slowly whittling down further until you get to the statement which causes the issue. Apart from that I'm stuck, sorry! -TGG
  24. Hi Probably either the alpha channel on your texture image is broken, or you haven't turned on alpha blending (your block getRenderType is wrong http://greyminecraftcoder.blogspot.com.au/2014/12/block-rendering-18.html) -TGG
  25. Hi Partially transparent texture makes no difference, it gets stitched into the blocks + items texture sheet and acts the same as any other texture. The missing texture indicates you haven't properly registered your texture. Show your code + error log? -TGG
×
×
  • Create New...

Important Information

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