Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Render Texture Overlay on Animated Block
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 3
MDW01

[1.12.2] Render Texture Overlay on Animated Block

By MDW01, April 30, 2018 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

MDW01    36

MDW01

MDW01    36

  • Diamond Finder
  • MDW01
  • Members
  • 36
  • 418 posts
Posted April 30, 2018

I am going to implement an animated block in my mod and I would like to render an overlay over the block so that the pixels from the overlay are static and the animated ones show through the clear parts of the overlay.

 

What would be the best way to accomplish this.

 

 Right now I am thinking something along the lines of:

private static ResourceLocation RL = new ResourceLocation(MODID, "textures/blocks/overlay.png");

ITextureObject ito = Minecraft.getMinecraft().renderEngine.getTexture(RL);
        if(ito == null)
        {
            ito = new SimpleTexture(RL);
            Minecraft.getMinecraft().renderEngine.loadTexture(RL, ito);
        }
        GL11.glBindTexture(GL11.GL_TEXTURE_2D, ito.getGlTextureId());

But I'm not sure what I would have to do after this because as I recall glbindtexture won't actually display the texture.

  • Quote

Share this post


Link to post
Share on other sites

Electric    1

Electric

Electric    1

  • Tree Puncher
  • Electric
  • Members
  • 1
  • 30 posts
Posted May 2, 2018

I am interested in this too

  • Quote

Share this post


Link to post
Share on other sites

Cadiboo    275

Cadiboo

Cadiboo    275

  • Reality Controller
  • Cadiboo
  • Members
  • 275
  • 3303 posts
Posted May 4, 2018

why not have the overlay as a block model & render the animated stuff inside it with a TESR or SmartModel

  • Quote

Share this post


Link to post
Share on other sites

TheRPGAdventurer    4

TheRPGAdventurer

TheRPGAdventurer    4

  • Dragon Slayer
  • TheRPGAdventurer
  • Members
  • 4
  • 642 posts
Posted May 4, 2018

You can check at magma blocks on how they are made, they are animated BTW.

  • Quote

Share this post


Link to post
Share on other sites

MDW01    36

MDW01

MDW01    36

  • Diamond Finder
  • MDW01
  • Members
  • 36
  • 418 posts
Posted May 5, 2018

Thanks that will probably be a lot easier. I'll look into it.

  • Quote

Share this post


Link to post
Share on other sites

Cadiboo    275

Cadiboo

Cadiboo    275

  • Reality Controller
  • Cadiboo
  • Members
  • 275
  • 3303 posts
Posted October 7, 2018

Did you ever solve this?

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 3
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • saxon564
      [1.14.4] [UNSOLVED] Server Thread Freezes After Entity Explodes

      By saxon564 · Posted 9 minutes ago

      Unfortunately that was not the case, there was no change in the result at all.
    • CanadaMan
      illegal wheat?

      By CanadaMan · Posted 1 hour ago

    • CanadaMan
      illegal wheat?

      By CanadaMan · Posted 1 hour ago

      Okay so I'm trying to join one of my friends modded server and it said that illegal state of wheat was stopping me from joining
    • MrNoodles75
      [1.14.3] send message to chat

      By MrNoodles75 · Posted 1 hour ago

      @Draco18s I have been figuring everything out since then, by going through the default code and getting information on how to do something
    • AntonBespoiasov
      attackEntityFrom() doesn't work. 1.12.2

      By AntonBespoiasov · Posted 2 hours ago

      public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { Entity entity = ModMath.getMouseOver(Minecraft.getMinecraft().getRenderPartialTicks(), 0); // Gets entity that entityLiving is looking at if (entity != null && entity instanceof EntityLiving) { ((EntityLiving)entity).attackEntityFrom(DamageSource.MAGIC, 2.0f); ((EntityLiving)entity).setRevengeTarget(entityLiving); } return stack; }   Using item that has the implementation of the method above doesn't damage entity. Debugging it showed that attackEntityFrom() is called, code within if statement is executed but entity isn't attacked. I looked into Minecraft's files that use attackEntityFrom() and observed that they just call attackEntityFrom(), just one line of code(I assume that something else that can affect entity attacking process was called before attackEntityFrom() in that files). How can I solve this problem? How can I deal damage to entity?
  • Topics

    • saxon564
      9
      [1.14.4] [UNSOLVED] Server Thread Freezes After Entity Explodes

      By saxon564
      Started Friday at 05:11 AM

    • CanadaMan
      1
      illegal wheat?

      By CanadaMan
      Started 1 hour ago

    • MrNoodles75
      17
      [1.14.3] send message to chat

      By MrNoodles75
      Started Monday at 08:19 PM

    • AntonBespoiasov
      0
      attackEntityFrom() doesn't work. 1.12.2

      By AntonBespoiasov
      Started 2 hours ago

    • Lordyammer
      1
      How to start learning

      By Lordyammer
      Started 3 hours ago

  • Who's Online (See full list)

    • fuzzyweapon
    • ShetiPhian
    • The_Unkown675
    • Trhod177
    • plugsmustard
    • Lea9ue
    • saxon564
    • DaemonUmbra
    • UnusualSlurp
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Render Texture Overlay on Animated Block
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community