Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. I generally assume that people are using their NBTs correctly. They're so trivially easy to get right (compared to packet handlers and data watchers*). But yes, it is a possibility. *Still have no idea what these are needed for myself....
  2. renderer.renderBlockUsingTexture(Block.stone, x, y, z, camo); [code]GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); switch(metadata) { case 0: renderer.renderFaceYNeg(Block.blocksList[wid], (double)x, (double)y, (double)z, self); [...etc...] } GL11.glDisable(GL11.GL_BLEND); In any case, I figured out what my problem was: return false Go go auto-constructed code supplying a return type where what that returned boolean does is undocumented (roughly speaking if the return is false, the game stops rendering stuff because it thinks its done).
  3. You didn't tell the server that the name changed. (Client-Server disparity. You need a packet handler)
  4. Riddle me this, Batman. Doesn't render http://s10.postimg.org/64mow4bll/2013_06_13_23_26_00.png[/img] Place string, block renders http://s24.postimg.org/soa1wok79/2013_06_13_23_26_02.png[/img]
  5. If you're saving out as a png (Photoshop is one program that I know of that doesn't give two shits what the file extension is, it'll happily save as a different format) then it should work.
  6. Hmm. Are the other items showing up? If so, try deleting the file that's already there and resaving (the original) as a png. It could be that it doesn't have the right extension for some reasons. Also check .png vs. .PNG
  7. Can you paste the error from the console? It will be along the lines of "unable to find texture [path/to/missing/texture/file.png]"
  8. Didn't help. (And yes, I converted it to proper code). Keep in mind this is how I'm doing it: renderer.renderBlockUsingTexture(Block.stone, x, y, z, camo); switch(metadata) { case 0: renderer.renderFaceYNeg(Block.blocksList[wid], (double)x, (double)y, (double)z, self); [...etc...] } Where camo is the block icon of the block adjacent to my block (checks for nulls, self, etc. with a fallback default) and self is my block's own icon (the overlay texture).
  9. What did you search for?
  10. Not sure this is Forge's problem, or a vanilla thing, but I noticed it because of Mystcraft (as Mystcraft uses the chunk.hasEntities function to apply potion effects in some dimensions). I have already reported this to XCompWiz who says that the problem is not occurring inside his code. In order to (easily) reproduce the behavior: 1) Install Mystcraft 2) Place book binder block, put leather in upper left slot, add to the central black area: Linking panel (page). Must be farthest left Diamond ore block (page). Must be left of next page Tendrils (page) (All mystcraft items can be found in Mystcraft's creative tabs) 3) remove book from upper left slot 4) Right-click with the book, click the black panel to teleport to new dimension 5) Stand still under the open sky. Looking around is ok, moving is not. 6) Check inventory for status effects, if not affected by any, repeat steps 1-5. 7) After about 30 seconds you'll stop getting afflicted with the potion effect and it takes walking across a chunk boundary to reset it.
  11. I have no idea, but the solution offered may end up helping me with a tile entity that needs to do something similar.
  12. Sorry, the search feature here is clunky at its very best! I did try it. Something like 8 of the top 20 posts returned for "texture" or "textures" direct to a thread where I've posted that image.
  13. Ok, it's not entirely based on renderpass 1. It's also based on the block's Y position. If it's Y is over 63 and has render pass 1, then it doesn't render. http://s22.postimg.org/4lh3lpdqp/2013_06_13_15_59_06.png[/img] And with render pass 0: http://s15.postimg.org/gk8whtrvf/2013_06_13_16_01_26.png[/img]
  14. HA! public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { int wid = world.getBlockId(x, y, z); renderer.renderBlockByRenderType(Block.blocksList[wid], x, y, z); renderer.renderBlockUsingTexture(Block.blocksList[wid], x, y, z, block.getIcon(0, 0)); return false; } And there's no z-fighting. I have no idea why. But it totally works. The only downside is that the "overlay" texture can't be partially transparent. It'll get rendered as binary transparency (each pixel is either fully solid or fully transparent). No idea why.
  15. 16th duplicate post. And that image is on the wiki under an up-to-date tutorial.
  16. I have a block. It has a SimpleBlockRenderingHandler. If I do this in the block class, it renders: public int getRenderBlockPass() { return 0; } But the pixels that I would like to be partially transparent are rendering as fully solid. So I do this: public int getRenderBlockPass() { return 1; } And now it doesn't render at all.
  17. What are par2, and par4 supposed to do? (Also, par6 is wrong for the same reason)
  18. 1) I did it once. It was a bitch. I'll dig up my code. I will note, however, that it only went up not down. I do have another block that could take input signals from redstone and "do stuff" by propagating the signal, but it didn't turn off instantly (also redstone didn't see it as transmitting power). 2) Yes. Just set up the block to have an isPowered function determine if it is powered, then send that flag into the TE. I did something similar with my spikes, only it was based on having hurt an entity. Edit: Redstone fence (upward redstone signal transmission) Note: this block was intended to ONLY take a signal from a solid block or itself from below itself. It was not meant for any kind of horizontal transmission. Redstone phaseblock (propagation of signal in all directions) Note: it does not have an instant-off and I was unable to figure out why and just left it alone because it was good-enough for my needs. Base class isn't really relevant here, it was just the core of how the blocks became non-solid by whatever means that they became non-solid by (e.g. something would tweak the metadata value and that would cause it to change texture and lose collision checks).
  19. No he didn't, check the screenshots again. Andrew: Did you add your textures to your reobfuscated zip? The recompiler/reobfuscator doesn't pull textures in.
  20. Ahhh. Yeah, I was having that problem too, and rather than doing quads like in the world I created a fake block and told the renderer to render that instead (which is what I'm thinking about doing to get things in-world too, in order to fix the lighting issue). Might be a tad trickier on your end though, I only had two textures to deal with: while my block will camouflage itself when placed, I just used a fixed texture for the inventory render. Picked a block, pulled the original texture, applied the overlay, saved as an icon, registered it with the fake block.
  21. I went in and rotated each cube of my model in the model code and repositioned them by hand. Not the easiest or most elegant way to do it, but it worked. And if you think rendering it inside the player is weird, try this:
  22. You....are not doing things the way I'm doing them, and it does not appear that your....renderer has any quads or a model to draw. Here's mine: package draco18s.traps.client; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; public class SpikesRenderer extends TileEntitySpecialRenderer { private SpikesModel spikes = new SpikesModel(); @Override public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { spikes.render(tileentity, d0, d1, d2); } } SpikesModel Model was exported from Techne and minorly tweaked.* *Imports and oddly, the model came in upside down and I had to figure out how to flip it back over.
  23. I've been doing something similar, but the way I did it was to yoink the relevant block texture, render it, then render a second quad with my overlay on it, a very tiny fraction of a pixel above* the first quad. Just enough offset so there's no z-fighting, but too small to see. 1F/256 is good. I have, however, been having a devil of a time getting block brightness to be calculated correctly. Think I thought of a solution, and that's a faux block that gets rendered using the normal renderer after rendering the base material block in the same manner. *relative to the block face
  24. *Facepalm* no need to convert it to an item stack and then getItem()... Item.itemList[theID] Also, my bad, it's itemsList, I was going from memory.
×
×
  • Create New...

Important Information

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