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

M1ntcraft3r

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

M1ntcraft3r's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi all, so I upgraded my mod and it all went pretty well except for most of the function names from external libraries not updating. As an example, in my old mod I was using GlStateManager.pushMatrix(); And it had no issue finding this method. However, now it's unable to find it. After looking int the GlStateManager I found: public static void func_227626_N_() { RenderSystem.assertThread(RenderSystem::isOnRenderThread); GL11.glPushMatrix(); } which is the method/function and I am sure if I changed it it would work, but how do I get the old mappings back please??? Also, the same happens with playerEntity.getPosX() which used to call public final double getPosX() { return this.posX; } from the Entity class ================================================================================================ Turns out I forgot to update the mapping in the build.gradle
  2. Ah, OK, that makes some sense.. Any idea how I could go about drawing a sphere in Minecraft?
  3. Hi, I'd like to use SPHERE_MAP from GL11 to draw a sphere with given radius around a block position. I have been using GL_QUADS successfully to draw quads and planes but was hoping the SPHERE_MAP would be able to draw spheres for me. However, I have not had any luck with it... When using the QUADS, I can draw a plane by giving the 4 corners such as: bufferBuilder.pos(center.getX() + 1, center.getY() - diameter / 2, center.getZ()).endVertex(); bufferBuilder.pos(center.getX() + 1, center.getY() - diameter / 2, center.getZ() + 1).endVertex(); bufferBuilder.pos(center.getX(), center.getY() - diameter / 2, center.getZ() + 1).endVertex(); bufferBuilder.pos(center.getX(), center.getY() - diameter / 2, center.getZ()).endVertex(); but how do I use the SPHERE_MAP TIA
  4. Right, so I'd need to add my own buttons, etc.... I though it was going to be more straight-forward... I will have a look, but if you can link a basic example that would be awesome. Sorry but iI'm a total noob TY
  5. Thanks a lot for your input on this btw, its much appreciated Hmmm, now that I don't want to do! So from your experience, if I wanted a basic UI for my mod, literally something that allows me to enable and disable functionality for example, what's the best way to go? Ta
  6. OK, thanks, will do.. But I mean the container, such as a chest, is definitely available and surely I should be able to render it on only the client screen? I mean, I am not opening anything server side. It should just be a chest type inventory showing up on the screen. All the inventory items should be pre-defined by me, and cannot be taken out, they can simply be clicked and my code would detect which slot has been clicked...
  7. But surely I can stored all the data in my mod. The container does not really exist as far as the server knows. Essentially it should just be a client side UI that's populated for data I stored in my mod.. SO to elaborate, the container should not store items... the items that will be shown should just be buttons... Does that make sense?
  8. OK, this did with a full re-edit, here we go! I want to be able to press a key, such as "I" and I want that to be recognised by my code - already done When I press said key, I want a inventory screen to open (client side only) which only I can see and which cannot be edited OR no items can be stored/taken from it. The displayed inventory should be pre populated by my code with items (only visually) and when clicked, I want it to return which slot has been clicked.... Thanks in advance
  9. I think I got it imported... Ended up having to do it manually. Thanks
  10. Hi all, I'm really new to modding and I'm a bit confused with all the external libraries. I just downloaded some Foreg stuff (https://github.com/MinecraftForge/MinecraftForge) cuz I wanted to look at some of the examples. But when I import the project, I have lots of missing libraries ie I'd like to know how I would go about resolving these? Sorry if this is a dumb question and I appretierte your helps Thanks
  11. So Chris, I think I have sort of worked it out... If I draw a single quad, the player hand reamains rendered but if I loop over an array, it disappears. The way I am doing it is: ActiveRenderInfo renderInfo = Minecraft.getInstance().gameRenderer.getActiveRenderInfo(); Vec3d projectedView = renderInfo.getProjectedView(); GlStateManager.rotatef(renderInfo.getPitch(), 1, 0, 0); // Fixes camera rotation. GlStateManager.rotatef(renderInfo.getYaw() + 180, 0, 1, 0); // Fixes camera rotation. GlStateManager.translated(-projectedView.x, -projectedView.y, -projectedView.z); then for each box, I am calling: GlStateManager.pushMatrix(); GlStateManager.enableBlend(); GlStateManager.disableCull(); GlStateManager.disableDepthTest(); GlStateManager.disableTexture(); GlStateManager.disableLighting(); GlStateManager.disableAlphaTest(); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); bufferBuilder.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION); Block block = player.world.getBlockState(oresBlockPosList.get(oreBlockPos)).getBlock(); // bottom bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); // top bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY()+ 1, oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY()+ 1, oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY()+ 1, oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY()+ 1, oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); // left bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); // right bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); // front bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ()).endVertex(); // back bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY(), oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX() + 1, oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); bufferBuilder.pos(oresBlockPosList.get(oreBlockPos).getX(), oresBlockPosList.get(oreBlockPos).getY() + 1, oresBlockPosList.get(oreBlockPos).getZ() + 1).endVertex(); // Tessellator has to come before the rest or some of the GlStateManager stuff tessellator.draw(); GlStateManager.enableCull(); GlStateManager.enableDepthTest(); GlStateManager.enableTexture(); GlStateManager.enableLighting(); GlStateManager.disableBlend(); GlStateManager.enableAlphaTest(); GlStateManager.popMatrix(); Basically I am not sure if I need to 1) Push and Pop the matrix for each bufferBuilder? 2) Draw tessellator every time 3) Create a new BufferBuilder for each block (6 quads) Also, if you worked out how to use the RenderSystem and the matrixStack, please share it with me, it'd be much appreachiated. Thanks
  12. Thanks Ghost! This actually looks like what I need and also what Chris seemed to have tried in his thread (to some extend). Unfortunately I have not been able to get it to work but it looks like the IRenderTypeBuffer is the new way to go and thats how it should be done, rather than the Tessellator, BufferBuilder and the GlStateManager! If someone has a basic method which plots a few quads at a given location, that would be great. I spend a few hours at the weekend trying to get this to work but unforunately I got nowhere. I also don't want to paste my old code which plotts all the quads but still doesn't have the players hand ocrrected becasue this seems to be the outdated way to do it anyway. Thanks in advance
  13. Thanks for checking.. I'll have to search the web again cuz I know someone had a similar issue and if I recall correctly, there was a solution. Hopefully I'll find it. It is odd thought that you're not seeing it. Anyway I'll post an update over the next few days! Thanks again for your help Chris
  14. Interestingly it renders even over the players hand but I think I read something about that cuz its the RenderWorldLastEvent
×
×
  • Create New...

Important Information

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