Jump to content

Comrade Bearabyte

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Comrade Bearabyte's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks, that fixed it! It's working now, and this is how I currently get wobble: while(Minecraft.getMinecraft().entityRenderer.isShaderActive() ? !(Minecraft.getMinecraft().entityRenderer.getShaderGroup().getShaderGroupName().equals("minecraft:shaders/post/wobble.json")) : true) Minecraft.getMinecraft().entityRenderer.activateNextShader(); Basicly it cycles through all the shaders until it finds "wobble", is there maybe a certain method for getting a specific one or is this the way to go?
  2. In my item class which is the subclass of Item, I overrid the "onItemRightClick" method: @Override public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { Minecraft.getMinecraft().entityRenderer.activateNextShader(); return p_77659_1_; }
  3. Thanks shieldbug, that is indeed changing the shaders. Sorry for the late reply. I now have this code in the item use method: Minecraft.getMinecraft().entityRenderer.activateNextShader(); However I am getting an exception, "No OpenGL context found in the current thread.". Which is kind of expected because OpenGL contexts are thread-specific and when one thread uses the context another one cannot. I am assuming for that reason that the GUI thread owns the OpenGL context and that item use method is in a different thread which does not have it. Is there a way to activate the shader from this thread, or is there some other way around this?
  4. Hello everyone, I'd like to activate a certain Minecraft shader from "super secret settings" when an item is used, specifically the one named "wobble". Now, I have an item set up and everything, and I overrid the "onItemUse" method (is this the way to do it, BTW?) but I have no idea how to start the shader. I've been looking around the minecraft Shader classes (ShaderManager, ShaderLoader, ...) for a long time but can't seem to figure out how to do this. Thanks! PS: I don't expect a full code or anything similar, just general pointers on how to work with Minecraft shaders, because I'm not at all new to programming, however I am new to modding Minecraft
×
×
  • Create New...

Important Information

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