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

TheNuclearDuck

Members
  • Content Count

    39
  • Joined

  • Last visited

Everything posted by TheNuclearDuck

  1. In this particular case, the server-side of the mod isn't always needed. The mod will run without the server-side, just with some of its features disabled (I have the server-side send a packet to notify the client that it's there and turn those features on). I don't want to spam @SideOnlys everywhere so I'll stick to only invoking those classes that refer to client-only stuff from the client.
  2. I'm working on updating a very heavily client-sided mod. The only part of the mod that needs to run on the server side is a couple of event handlers, which only send IMessage packets back to the client for the main part of the mod to handle. Since a server-only JAR of this mod would be tiny, be very easy to debug and update and not cause problems with @SideOnly, would it be a good idea to cut the server stuff completely from the client mod and create a new, server-only mod for the event handlers? Is there a better way to handle this situation? Edit: Does using @SideOnly(Side.CL
  3. FIXED! The solution wasn't exactly what you said, but your findings did cause me to look into a few things. First, I rendered the whole texture so I could see better, then I looked into RenderItem#renderEffect(). I found that some of my calculations were weirdly flipped (*8 instead of /8, for example). I think this was actually part of a previous attempt to fix the problem, someone suggested using the reciprocal. Either way, that caused the animation to work properly again (did have to mess around with the bound texture, though...) Thank you RANKSHANK!
  4. GitHub. This is for 1.7.10, but none of the code has changed apart from things like replacing .addVertexWithUV from Tessellator to WorldRenderer.
  5. Not directly a solution, but the error on the additional quads sounds like an undersized UV area. I've messed around previously with the Glint for a shield esque overlay and when its UV coords aren't displaced enough you get gaps akin to what you've described because it 'zooms' in on the textures. Why would the UVs have changed at all between me rendering these two quads (the only thing inbetween is a regular quad, drawTexturedModalRect). I wouldn't thought it was some OpenGL state that's now changed in 1.8... Hmm. I wish I could say I had any ideas.
  6. I've been able to draw the enchantment effect over a quad in 1.7.10, using the following method: /** Bits which are modified while rendering item glints, so must be pushed/popped. * @see #drawTexturedGlintRect(int, int, int, int, int, int) */ public static final int GL_GLINT_BITS = GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_TRANSFORM_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT; /** Render an 'item glint' over the specified quad with the currently bound texture for clipping. * @param x X coordinate of the top-left * @param y Y co
  7. Thank you all. I got it working, using a custom EntityItem class and Item#createEntity(). I can now render exactly how I want!
  8. As I have found from a couple of older threads and other sites, item rendering in 1.8 does not apply any transformation to items on the ground or in item frames. Therefore, the only way to make your model smaller is to scale it down in its default state. I want to scale down an item when it is thrown. However, I would like it to remain the same size in the player's inventory and everywhere else, and I want to use an inbuilt model (i.e. generated from the texture of the item). I just want the same model smaller when it's dropped. What do I do?
  9. I'm back. After a release of the mod, and me being sure everything was working perfectly again, I found out I was wrong. Here we are again, same issue, absolutely no reason I can think of why. Seems like putting any code at all into a RenderGameOverlayEvent causes the problem. Ugh...
  10. Writing a new post here, because I think I actually do have a solution. I updated Minecraft Forge... Turns out I must've been using one of the early development versions rather than any of the newer ones which work properly. Why I hadn't tried that earlier, I can't fathom.
  11. SOLUTION! "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!" Before I saw this post, this is what I started doing. I copied over drawRect into my own RenderUtil class and, as you said, whittled it down. Somehow, that came up with a solution. Now, what I find most baffling is what was causing the problem. It was with this line: GlStateManager.enableBlend(); Even though all I could find in this method was a lot of abstraction from GL11.glEnable(GL11.G
  12. No luck. I was already using glPushAttrib and glPushMatrix. I tried removing them, and interestingly, removing glPushAttrib and glPopAttrib (GL_ALL_ATTRIB_BITS) actually fixed the problem... Partially. When I did that, the problem appeared whenever I was looking at the skybox and not the terrain, then went away again afterwards. However, since I do change some GL states during my rendering, I can't keep it like this (and it only makes more errors, anyway...). So, I started removing parts to see if the error would fix. In the end, I managed to narrow the entire problem down to Minecraft's
  13. Hello, I hook into RenderGameOverlayEvent, and check for ElementType.ALL to ensure everything only renders once. The event is lowest priority, so it should render last. Within the event I render several things to the GUI, including text, items, textured quads, and some transparent textured quads. The transparency seems to break the rendering engine somehow, because whenever I render anything with a transparent colour, the following happens to the hotbar and every other transparent part of the HUD: Everything gets weirdly bright, and I can't work out what's causing it. It seems to corres
  14. Seems the issue is gone, turns out the issue was that I hadn't set a glBlendFunc, so I just used the usual GL_SRC_ALPHA and GL_ONE_MINUS_SRC_ALPHA and the issue appears to have disappeared. Thanks for your help, though!
  15. I'm attempting to create a custom rendered block, which will use a model from Techne. I've got everything rendering fine, except at random intervals I enccounter a weird lighting bug. I've tried using tessellator light values, disabling lighting, and nothing works. The rendered block switches between the two images seen below - the first (darker) one is the correct one. Here's the rendering code I have at the moment: @Override public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { TileEntityCrystal te = ((TileEntityCrystal) tileentit
  16. Well, here's the loop I'm using to draw all the blocks: RenderItem renderItem = new RenderItem(); String[] i = blocks.split(";"); for(int x = 0; x < i.length; x++) { if(i[x].contains("m")) { String[] z = i[x].split("m"); renderItem.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, new ItemStack(Integer.parseInt(z[0]), 1, Integer.parseInt(z[1])), this.width / 2 -75 + ((x % * 19), this.height / 4 + 185 - 16 + ((x / * 20)); } else { renderItem.renderItemIntoGUI(t
  17. Anyone? Surely somebody must be experiencesd with how OpenGL messes this up. I've tried backtracking and looking through the actual renderItem method, but to no avail...
  18. I'm working on my WallJump mod, and I've noticed that when you attempt to render a block onto a GUI using the following: renderItemIntoGUI(FontRenderer par1FontRenderer, RenderEngine par2RenderEngine, ItemStack par3ItemStack, int par4, int par5) that this sometimes messes up OpenGL colours and when you proceed to do the same again, the colour of the block is incorrect. For example, when you render an item then a block, the block will be slightly too dark, colours of things like grass will not show, etc. Does anyone know why this happens, or how to fix it? Here's an example of
  19. Okay, can you tell me how I'd go about creating such a renderer?
  20. I've been looking around for a while on Google, and I can't seem to find anything about this subject. Basically, I want to draw a block so that it has an overlay drawn on top of the original texture, with a tint. I know it can be done, because there are examples in vanilla such as the sides of grass blocks, and also in other mods such as the shards in Mystcraft. Looking through some of the code, I found a couple of methods in BlockGrass.java which let you change the tint of the whole block, but this is not what I want. what I want is to overlay it with another texture, with a tint. H
  21. Are you exprienced with advanced Mincraft Forge programming? Do you want to be part of an amazing mod? Do you have Skype IM Service? Are you over the age of 12? If you answered "Sure thing, NukeDuck!" to all of these questions, you're in luck! I'm NukeDuck, texture artist and community manager of the team behind Arcticraft, and we're looking for someone who can help us rewrite the mod for Minecraft 1.4.x! You'll be credited over on the official page, and will get full credit for all of the work you do. We specifically need people who know a lot about dimensions, since it's
  22. Is there any way to use Minecraft Forge to generate a new block to a mod in the world? For example, in my case, I need to, when a new world is generated, randomly place my new block on top of the grass in the world, but only in certain biomes, e.g. plains and jungles, much like pumpkins generate in their little groups. Is there any way I can do this?
  23. Update: I now think I know why this is happening, for some reason whatever block metadata the block in your inventory has, the block always seems to place without any metadata at all. Any ideas?
×
×
  • Create New...

Important Information

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