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


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Toma™

  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
  15. for that there's BlockHorizontal (at least in 1.12.2), so you can extend that class and override methods you want to change.
  16. For world gen there are some events, try to take look in the events package in forge. It might have what you need. Also for the newer versions I guess you mean 1.13+, and in that case I have very little experience with that. Also I was looking at some mods which improve world gen and they always used the world type approach. There are many more experienced modders, who might know more about this. So maybe you'll get more help from them.
  17. Maybe it would be possible without world type, honestly I haven't really looked for it. In my opinion creating the world type is very simple
  18. You can create new world type and change it's chunk generator which does all the map gen stuff
  19. Guys, I have recently switched to Intellij from Eclipse, and I've run into some issue. No matter what I do, I always end up with error: Couldn't locate OpenAL library and Minecraft starts in silent mode - I cannot hear any sounds. Any ideas what to do? I've tried to delete the repository and then clone it again, then running the setupDecompWorkspace task and genIntellijRuns (I basically followed the readme which is included in the mdk package). Before I have switched to intellij it would rarely do that, but resource reload always fixed that. Any ideas how to fix that?
  20. Hi, since I plan on adding quite a lot of blocks into the game, I don't feel like manually writing .json files for them. However I've run into issue - I don't know how to do it. To be more specific I've been able to automatically create block model and item model files also with basic blockstate file, but I've wanted to do it even for blocks with multiple properties, like PropertyDirection and PropertyBool for example (for single property it's simple). I can't really figure out how to do it for multiple properties so I'm looking for someone who knows how to and is willing to give me a few hints about this.
  21. Alright, I'm working on one project which has some kind of "core" mod (functions etc). I was always able to update the dependency version using the build.gradle where I change the deobfcompile line. Never had single problem. But suddenly, after updating to new version I got 403 Forbidden access error. So I deleted everything, cloned the workspace from github and rebuild the workspace with dependency without problems (but with the older version). Then I have tried to repeat the process again, but it has ended with the same result as before. I have no idea what the problem could be. This is the only dependency which causes problems. We're using github releases system for this. I have access to the repository, I can view it from any browser (but it's private) I'm pretty bad with all this gradle stuff so if someone knows what's the problem and how to solve it, please help me, I will appreciate that LOG:
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.