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


Forge Modder
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by MCenderdragon

  1. This is a wide guess but have you tried to update you grafic drivers ?
  2. I have an 3-d-Array of IblockStates and using renderBlock to rendem them. (this works fine) BlockRendererDispatcher.renderBlock(IBlockState state, BlockPos pos, IBlockAccess blockAccess, VertexBuffer worldRendererIn) Everything is correctly in the VertexBuffer I give to this methode and I can render this VertexBuffer using draw. (This is the code inside the Tesselator.draw() methode) WorldVertexBufferUploader.draw(VertexBuffer vertexBufferIn) But calling everytime renderBlock is slow and the blocks and the data doesnt change so I try to keep the data inside the VertexBuffer and just render them again, but now the issue happens. The VertexData is stored inside a ByteBuffer you can get them via getByteBuffer() inside VertexData. VertexData also has the methode addVertexData(int[] vertexData), to add alot of data in one go. With some Buffer magic I convert the ByteBuffer to a IntBuffer and add the data to a new VertexBuffer (the one that is currently inuse from the Tesselator). But somehow the face and vertex amount is correct but nothing is rendered. But rendering the "old" VertexBuffer works. Has anybody any advise were a possible bug is? Conversation Code: private static final WorldVertexBufferUploader vboUploader = new WorldVertexBufferUploader(); private static void rotateStaticData(VertexBuffer target, VertexBuffer data, float[] rotation, float[] translation) { if(target.getVertexFormat() != data.getVertexFormat()) { return; //this should not happen! } float[] rot = new float[6]; rot[0] = (float) Math.sin(rotation[0]); rot[1] = (float) Math.sin(rotation[1]); rot[2] = (float) Math.sin(rotation[2]); rot[3] = (float) Math.cos(rotation[0]); rot[4] = (float) Math.cos(rotation[1]); rot[5] = (float) Math.cos(rotation[2]); if(data.getVertexFormat() == DefaultVertexFormats.BLOCK) { //vboUploader.draw(data); VertexFormat format = data.getVertexFormat(); ByteBuffer read = data.getByteBuffer().asReadOnlyBuffer(); read.position(0); ByteBuffer write = ByteBuffer.allocate(data.getVertexCount() * format.getNextOffset()); //target.setTranslation(translation[0], translation[1], translation[2]); IntBuffer intBuf = write.asIntBuffer(); intBuf.position(0); int[] vertexData = new int[intBuf.limit()]; intBuf.get(vertexData); target.addVertexData(vertexData);//TODO: this still is not rendering //vboUploader.draw(data); is this is used in renders Correctly return; } }
  3. I whould recommend you to also you GZIP input/outputstream. In can decrease the packet size dramaticaly, Minecrft already has the "CompressedStreamTools" were it can send NBT's in an compressed form.
  4. Does that mean if I stop the server to send unload packages the client will keep ALL chunks? Well I think the chunk traking will be on the client side, if there are tomany empty chunks, then I will send a custom package to the server, I hope this will not get to difficult.
  5. Is it possible to get chunks from the server out of the view distance from the client? And render them. I whoud like to make some kind of camera, but on a server you will get quickly to the chunk borders. And how do I do that, I mean the client is deleting unused chunks, where is he doing that (can I somehow foce him not doing that) And is it possible to send the chunk data from the server to the client via vanilla packages, will that work?
  6. Or the Tutorial section http://wiki.lwjgl.org/
  7. It reads the pixel from the current rendered image and copy it the and Texture ID, I would recomend you learning some LWJGL, because understanding rendering and how minecraft works is much easier after that.
  8. int k = width * height; int[] dataarray = new int[k]; IntBuffer databuffer = BufferUtils.createIntBuffer(k); GL11.glPixelStorei(GL11.GL_PACK_ALIGNMENT, 1); GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1); databuffer.clear(); GL11.glReadPixels(0, 0, width, height, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, databuffer); databuffer.get(dataarray); reconfigureArray(dataarray, width, height); @Draco18s, it seems like this is possible in just one method GlStateManager.bindTexture(TEXTURE_ID); GL11.glCopyTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, 0, 0, width, height, 0);
  9. I have looked into MRCrayfish code over at githube and he sure knows how to use GL. He also solves the Mirror hall problem, because the mirror itself only renders a texture. At the end of the RenderEvent he backups al minecraft settings, changes resulution, FUV and many other settings, and renders for each Mirror the Wolrd again and saves it to and GL texture id. The mirror is then only rending the texture for this ID. I think he couls improve his code by using a WeakHashmap to prevent memory leaks but he has some removing functions so I think it is very well done by him.
  10. Why are you registering the Message Handler for server adn clietn, only the client needs it? And the EventPlayerTick get only registered on the CLient but this is needed on the server because you send the Message from the Server to the CLient.
  11. Okay Today it seems to work, maybe this was caused by the massive DDos
  12. I tried to build my mod but it fails at "makeStart", because it cant get some dependencies. This happens only on my linux build server, but not on my windows home machine. Here is the log: http://pastebin.com/35SJcz4t I have not added any dependencies so this is just base gradle but if you want I provide the gradle files. EDIT: I can still start client and server, there makeSTart is SKIPPED, but at buidling it fails
  13. Ok thanks. I found this: http://support.feed-the-beast.com/t/java-lang-noclassdeffounderror/7233/2. It seems like it is a well known problem.
  14. In version 1.8 - 1.10.2 it crashes if I call Class.getResourceAsStream(...); The crash: http://pastebin.com/34kwhKKh Is their a workaround or can someone explain what the FTB-Launcher tries to do their?
  15. there is a 1.8 branch alredy and its forking fine. (Also for 1.9 and 1.10)
  16. the Pre evnt, is is called before or after the rotation?. If its called before, you have to somehow prevent setRotationAngles to override them
  17. Look at the log, I am pretty sure there is somewhere an exception, also wich constructor do you use and how looks you guiHandler ?
  18. this whould result in rendering thr RightArm twice. //... pre event //rX, rY, rZ need to be global rX = model.bipedRightArm.roationX; rY = model.bipedRightArm.roationY; rZ = model.bipedRightArm.roationZ; model.bipedRightArm.roationX=2; model.bipedRightArm.roationY=3; model.bipedRightArm.roationZ=4; //..... //... post event model.bipedRightArm.roationX=rX; model.bipedRightArm.roationY=rY; model.bipedRightArm.roationZ=rZ;
  19. have you ever useg OpenGL or lwjgl ? Well search for explanation of Gl11.glRotate Gl11.glScale and Fl11.glTranslate. With these methods you can alter rendered things. There is an event with pre and post phase, PlayerRenderEvent or something like that. in the prer you should acces the player model, inside the PlayerRenderer, and edit it. It should be an instance of ModelBiped. If there are some weird bugs with other player/creatures use the post methode to reverse you changes. between pre and post the player get rendered, so in the post phase you cant change the model.
  20. its an normal interface. so just create a new class impleenting ISound. the methodas are self explaning, if you dont know what a specific method does post its name. And we can help you.
  21. by calling add. This is a normal Collection
  • Create New...

Important Information

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