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

matthew123

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by matthew123

  1. use ClientRegistry.registerKeyBinding and InputEvent.KeyInputEvent
  2. Are you sure? Try scaling it more (e.g 5 times). Also, scale the coordinates as well, so it does not translate.
  3. try learning how these work. I recommend learnopengl.com. Stop at the advanced section, you probably won't need it. A little basic math might also help (see matrices).
  4. you pretty much destroyed the matrix stack by scaling there. do a matrixStack.pushPose() then scale and draw, then popPose(). Additionally, you might want to translate it after scaling. You might need to offset the text based on the way scaling works.
  5. the scaling should work. Could you show the previous scaling code?
  6. Could you explain the issue better? We are not going to understand anything if you only tell us that you followed a tutorial but something's not working.
  7. You want a tile entity. You cannot have rotating block collisions for it, though.
  8. I want to render chunks/blocks (in the future, entities and such) to another framebuffer, to add some more advanced effects to them by using my own shaders for rendering. I will be using the RenderLevelLastEvent. I find the vanilla code difficult to follow, even after hours of reading. I only need to extract the rendering code for chunks, and the matrix required to project it properly in my shader, and maybe the textures. It would take me a long time to get it to work. Does anyone know how to do this? I am using 1.18
  9. I want to make my transfer nodes be able to occupy the same block volume, just like extra utilities 2 did in 1.12. The nodes also use tile entities to search and register themselves into the pipe network, and to store data and animate. I am using 1.18.
  10. the logic I am referring to gets the Directions where other pipes that can be connected are. To set the right values in the block state, I would have to move that logic out of the tile entity so i can use it from the block. Preferably, I should move it to the block class. Is that correct?
  11. I.e i have to move that logic out of the tile entity because the tile entity has not been placed yet when getStateForPlacement is being called.
  12. That sucks. I have some logic on the tile entity that will be used to get those values. Do I really have to move that logic out of the tile entity? I assume the tile entity is placed after that method.
  13. blockState.setValue(SOUTH, true) this is all there is in the setPlacedBy overridden method.
  14. I am using BlockState.setValue on the overriden setPlacedBy method. The values are getting set, i added some logging there. I am using BlockStateProperties.NORTH, SOUTH, ... . I also made sure they are added in the createBlockStateDefinition method and registerDefaultState in the constructor. this is the blockstate: { "multipart": [ { "apply": { "model": "cables:/block/cables/without_connections" } }, { "when": { "north": true }, "apply": { "model": "cables:/block/cables/connection", "uvlock": true } }, { "when": { "west": true }, "apply": { "model": "cables:/block/cables/connection", "y": 90, "uvlock": true } }, { "when": { "south": true }, "apply": { "model": "cables:/block/cables/connection", "y": 180, "uvlock": true } }, { "when": { "east": true }, "apply": { "model": "cables:/block/cables/connection", "y": 270, "uvlock": true } } ] }
  15. I am making a pipe mod. The blocks also use a block entity. I added boolean properties for north, south, east, west, up, down and wrote to them on the setPlaced method. In my blockstate json, I use a multipart model to apply the pieces of the pipe to each side. It does not seem to be working. How can I synchronize the new blockstate values so that my pipe gets rendered properly?
  16. Navigate to the definition of the screen class. Also, Eclipse is not a good IDE, use IDEA Community Edition. With IDEA, you can CTRL+Click on a class and see the definition.
  17. You need to extend the Screen class (see PauseScreen for example). Override the rendering method to add your extra things. You can also call the addRenderableWidget method to add controls (buttons, for example). Then see how e.g books do it to open the screen. You can also use the Minecraft#setScreen method if you want to display the screen using something else.
  18. My GUI draws thousands of images using blit. This slows it down a lot. I tried copying the code from the innerBlit method, and calling the BufferBuilder.end method after all vertices have been created. It does not work. This is called for each image i want to draw: builder.begin(Mode.QUADS, DefaultVertexFormat.POSITION_TEX); builder.vertex(mat, X1, Y2, 0.0F).uv(0.0F, height).endVertex(); builder.vertex(mat, X2, Y2, 0.0F).uv(width, height).endVertex(); builder.vertex(mat, X2, Y1, 0.0F).uv(width, 0.0F).endVertex(); builder.vertex(mat, X1, Y1, 0.0F).uv(0.0F, 0.0F).endVertex(); builder.end(); and after the loop, this is called: BufferUploader.end(builder); I am also getting warning about byte mismatches. How can I solve this?
  19. Blocks overlapping the entity are making it invisible. What do I do to prevent this?
  20. I will create my own annotation for marking things. It is better than using a comment. It would be interesting if I could somehow intercept method calls for methods annotated with it, and check the side. I am not sure If I can do that with my limited java expertise.
  21. Also, the usage there is wrong. It is from when I used it on the client only (which you pointed out was incorrect).
×
×
  • Create New...

Important Information

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