TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
[1.8] Custom glass block won't render as transparent
TheGreyGhost replied to xStuffAndThingz's topic in Modder Support
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 -
[1.8] all items and blocks rendering as missing model texture.
TheGreyGhost replied to Cleverpanda's topic in Modder Support
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 -
[1.8] ISmartBlockModel what am I doing wrong?
TheGreyGhost replied to iame6162013's topic in Modder Support
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 -
[1.7.10][Solved] Render texture on inner side of block
TheGreyGhost replied to Niverton's topic in Modder Support
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 -
ConcurrentModificationException - forge bug or mod bug?
TheGreyGhost replied to Tyron's topic in Modder Support
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 -
[1.7.10][Solved] Render texture on inner side of block
TheGreyGhost replied to Niverton's topic in Modder Support
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 -
[1.8] Help! Render item model with dynamic texture layer
TheGreyGhost replied to Cleverpanda's topic in Modder Support
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 -
A way to Not Send the client entity position packets
TheGreyGhost replied to thebest108's topic in Modder Support
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 -
[1.8] Connected textures attempt not working
TheGreyGhost replied to NewDivide's topic in Modder Support
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 -
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
-
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
-
[1.7.10] [SOLVED] Ore generator crash
TheGreyGhost replied to CaptainPootis's topic in Modder Support
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 -
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
-
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
-
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
-
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
-
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
-
[1.7.10] Replace block after amount of time / set block metadata
TheGreyGhost replied to Niverton's topic in Modder Support
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 -
[1.8] Weird Lighting Bug with RenderGameOverlayEvent
TheGreyGhost replied to TheNuclearDuck's topic in Modder Support
aiiee that is the worst! hope it turns out to be the actual problem.... -TGG -
ah yeah, I meant getBlockLayer() not getRenderType(), my bad. -TGG
-
[1.8] Weird Lighting Bug with RenderGameOverlayEvent
TheGreyGhost replied to TheNuclearDuck's topic in Modder Support
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 -
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
-
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