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


  • Posts

  • Joined

  • Last visited

  • Days Won


Toma™ last won the day on November 13 2018

Toma™ had the most liked content!

Recent Profile Visitors

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

Toma™'s Achievements

Stone Miner

Stone Miner (3/8)



  1. wait neverming, turns out the fps drop issue is caused by shader loading every render tick because I messed up some code...
  2. Hello guys, what would be the best way to apply blur effect on player's screen? So far I have tried loading the vanilla blur shader in RenderTickEvent, but the fps went down like crazy, so I'm looking for better alternatives. Am I even supposed to load shaders in RenderTick event?
  3. Looks like framebuffer texture is not the way to go. I have found method in EntityRenderer called renderWorld. Looks like that could be what I'm looking for, but from quick observation I can see it sets the OpenGL viewport to minecraft display width and height, so I need to find a way, how to compress it into smaller rectangle. Anyone knows?
  4. Hello everyone, I'm trying to render player's view (basically everything on screen) into screen overlay (using RenderGameOverlayEvent). But I cannot get my head around it. I have tried using FrameBuffer texture, but it didn't work out really well. As you can see here. Does anyone have any ideas how I would be able to achieve that? Current code, don't think it's going to actually help @SubscribeEvent public static void renderOverlay(RenderGameOverlayEvent.Pre event) { if (event.getType() == RenderGameOverlayEvent.ElementType.ALL) { Minecraft mc = Minecraft.getMinecraft(); Tessellator tessellator = Tessellator.getInstance(); GlStateManager.bindTexture(mc.getFramebuffer().framebufferTexture); BufferBuilder builder = tessellator.getBuffer(); builder.begin(7, DefaultVertexFormats.POSITION_TEX); builder.pos(x, y + h, 0).tex(0, 0).endVertex(); builder.pos(x + w, y + h, 0).tex(1, 0).endVertex(); builder.pos(x + w, y, 0).tex(1, 1).endVertex(); builder.pos(x, y, 0).tex(0, 1).endVertex(); tessellator.draw(); } } edit: I know I have no zoom in code here, for now I'm mostly interested in getting it to work normally
  5. Hi there, I'm trying to change player hitbox. I just don't know where should I do it. I have tried to modify the bounding box inside the LivingUpdateEvent, however that works only until the original player hitbox collides with anything (and I have changed the hitbox on both sides). I see that there's method in EntityPlayer called updateSize which always resets the hitbox to the default one. Any ideas? EDIT: SOLVED Managed to solve it by subscribing to PlayerTickEvent and changing it there on both tick phases using the Entity#setBoundingBox method
  6. There's TileEntitySpecialRenderer#isGlobalRenderer method. Minecraft uses that for rendering beacons, maybe it could help you with your issue with the rendering outside frustrum
  7. Also to answer your next question - Depends on the side where code is executed, if it's server side it's going to take data from config stored on server. However someone has to confirm that, because I'm not sure and that's how I believe it works
  8. Make sure to actually register the event handler. Either you can annotate the class with @EventBusSubscriber and let it register itself automatically (but your event method has to be declared as static) or register to to MinecraftForge.EVENT_BUS
  9. If you want to use only overlay, and not actual GUI then you can use the RenderGameOverlayEvent, either Pre or Post. And be careful about it, because it fires for multiple elements. And for the toggling, what about toggling one boolean? While loop is pretty bad idea
  10. Nevermind, I just forgot to to call disableTexture2D function. That solved it.
  11. I'm trying to render shape in world similar to mc's world border, but I'm getting some weird issues with colors. When I rotate in specific angle, the color turns black and otherwise it's just plain blue. I cannot figure this out at all, and I have no idea what I'm doing wrong. Anyway, I'd be very happy if someone offered help. So there's the render code: And some images for reference:
  12. Create new class which extends WorldType and call it's constructor during one event (preInitialization/initialization/..) - That will register it. Then you can override some methods like getChunkGenerator if you want to change the world gen
  13. I sent you small guide about what to do. Follow that. No one is going to code everything for you and for free
  14. You need to create new Property for your block. In your case it's going to be property direction. Override createBlockstate, getMetaFromState and getStateFromMeta functions. Override function which will set the block property to placer facing - getStateForPlacement. Create blockstate json file and you're done
  • Create New...

Important Information

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