Jump to content

Recommended Posts

Posted

In my efforts to make a pipe, I am attempting to do a multi-layered texure. A pipe texture and a fluid texture.

Since my pipe is open to all fluids, I am trying to be as vague as possible.

I use the code

mc.renderEngine.bindTexture(...);

to set the texture of my TESR models. However, all I can find in the fluid is an IIcon.

Is there a way to convert this to resource location, or a different version of bindTexture that excepts IIcons?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted
  On 1/28/2016 at 6:34 AM, KeeganDeathman said:

I tried what the code you linked to did, but it renders as a smushed up sprite sheet in game still. :(

 

That would suggest your trying to draw the whole texture rather than just the 16x16 image in the texture. The UV Coordinates determine the area of the texture that is used.

Posted
  On 1/28/2016 at 7:14 PM, stucuk said:

  Quote

I tried what the code you linked to did, but it renders as a smushed up sprite sheet in game still. :(

 

That would suggest your trying to draw the whole texture rather than just the 16x16 image in the texture. The UV Coordinates determine the area of the texture that is used.

 

How do I select the texture from the sheet?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

fillAreaWithIcon is 2D drawing (And its meant for things like a bar that shows how much fluid a block has in a GUI). Your also supplying it the wrong parameters, it wants X,Y, width and height. Your sending it the UV coordinates which are the texture coordinates (Which are between 0 and 1).

 

You can render it using the standard block rendering in minecraft. fluid.getBlock() will get you the block of the fluid. You can then render that using the render.setRenderBounds() to define the area.

 

Something like the following:

renderer.setRenderBounds(0,0,0,1,1,1);
renderer.renderAllFaces = true;
renderer.renderStandardBlock(fluid.getBlock(), tile.xCoord, tile.yCoord, tile.zCoord);
renderer.renderAllFaces = false;

 

You can also use the different renderFace methods (like renderFaceYNeg) to render individual faces with specific IIcon's for each side.

 

Note: SetRenderBounds goes from 0 to 1 for sizes. You would need to have it use different values for different orientations of your pipe.

Posted
  On 1/29/2016 at 12:01 PM, stucuk said:

fillAreaWithIcon is 2D drawing (And its meant for things like a bar that shows how much fluid a block has in a GUI). Your also supplying it the wrong parameters, it wants X,Y, width and height. Your sending it the UV coordinates which are the texture coordinates (Which are between 0 and 1).

 

You can render it using the standard block rendering in minecraft. fluid.getBlock() will get you the block of the fluid. You can then render that using the render.setRenderBounds() to define the area.

 

Something like the following:

renderer.setRenderBounds(0,0,0,1,1,1);
renderer.renderAllFaces = true;
renderer.renderStandardBlock(fluid.getBlock(), tile.xCoord, tile.yCoord, tile.zCoord);
renderer.renderAllFaces = false;

 

You can also use the different renderFace methods (like renderFaceYNeg) to render individual faces with specific IIcon's for each side.

 

Note: SetRenderBounds goes from 0 to 1 for sizes. You would need to have it use different values for different orientations of your pipe.

 

What is the renderer variable refering to?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

Found out you can just do

RenderBlocks renderer = new RenderBlocks();

So I did that, but I now get

java.lang.NullPointerException: Rendering Block Entity
at net.minecraft.block.BlockLiquid.colorMultiplier(BlockLiquid.java:77)
at net.minecraft.client.renderer.RenderBlocks.renderBlockLiquid(RenderBlocks.java:4141)
at keegan.labstuff.render.TileEntityRenderLiquidPipe.renderPipe(TileEntityRenderLiquidPipe.java:75)
at keegan.labstuff.render.TileEntityRenderLiquidPipe.renderTileEntityAt(TileEntityRenderLiquidPipe.java:139)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.renderTileEntityAt(TileEntityRendererDispatcher.java:141)
at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.renderTileEntity(TileEntityRendererDispatcher.java:126)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:539)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1087)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067)
at net.minecraft.client.Minecraft.run(Minecraft.java:962)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

You can't do that. RenderBlocks needs a world.

 

in my tileentity i did:

@Override
public void func_147496_a(World world)
    {
	this.world = world;
	this.rb  = new RenderBlocks(world);
    }

 

where rb is the RenderBlocks;

 

Note that func_147496_a may be different for you (My forge installation was likely at the start of 2015 for the code i am using). It is however the only method of TileEntitySpecialRenderer which uses World as an input parameter so it wouldn't be hard to work out its new name if it has one.

 

Note: Minecraft uses this method rather than using the world given by the TileEntity you get from renderTileEntityAt, i am unsure if the TileEntity contains a valid world object but it could simply be so that RenderBlock's is only created once instead of each time the TileEntity is rendered.

Posted
  On 1/30/2016 at 4:53 PM, stucuk said:

You can't do that. RenderBlocks needs a world.

 

in my tileentity i did:

@Override
public void func_147496_a(World world)
    {
	this.world = world;
	this.rb  = new RenderBlocks(world);
    }

 

where rb is the RenderBlocks;

 

Note that func_147496_a may be different for you (My forge installation was likely at the start of 2015 for the code i am using). It is however the only method of TileEntitySpecialRenderer which uses World as an input parameter so it wouldn't be hard to work out its new name if it has one.

 

Note: Minecraft uses this method rather than using the world given by the TileEntity you get from renderTileEntityAt, i am unsure if the TileEntity contains a valid world object but it could simply be so that RenderBlock's is only created once instead of each time the TileEntity is rendered.

 

You are a life saver. May the goddess be with you in your endevors.

That said, your code doesn't appear to do much.

Everything's synced on github if you want to find where I went horribly wrong.

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

Remove all the rotate/translate opengl stuff. When you translate and then you tell it to draw the block at a certain location your telling it to draw it further away as you move it by say 100 and then you tell it to draw something 100 away from its current position (So your telling it to draw at 200 instead of 100).

 

setRenderBounds is the only thing you need to change based on the blocks direction.

 

P.S Your also binding a texture for some reason when you should have the Blocks texture bound. It won't render right unless you use the blocks texture.

Posted

The Renderer uses the main Block spritemap for all of its drawing. If you set a custom texture before calling it then it will not look right as it will use the texture coordinates from the spritemap.

 

  On 2/4/2016 at 6:11 AM, KeeganDeathman said:

BTW, they pipe isn't restricted to being straight, as you seem to have inferred.

 

I inferred nothing, i only stated that you would need to change the size of whats being rendered based on the direction it faces(Your pipe model for example seems to be rotated based on direction). You may need to render the fluid multiple times, i didn't bother looking at your full code.

 

The code i supply won't do the full job for you, you need to modify it to suit your exact needs.

Posted

I've tried it before rendering the pipe, after, with and without binding TextureMap.locationBlocksTexture, and even commented out the pipe model rendering matrix.

No fluid.

Funny thing is, if I wrap the renderer.renderStandardBlock(...) in System.out.println(...), it prints true.

So, where is it?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 🌍 TITLE:   Herobrine vs Null – Rise of Prime   > “Rewrite Minecraft history. Witness the rise… and the fall.”         ---   🧩 MOD VERSION:   Minecraft Forge 1.20.1   Built with MCreator   Ultra-cinematic style, custom mobs, weapons, quests, effects, emotional cutscenes       ---   📖 FULL STORY (Final Draft):   ⚔️ ACT 1: Alex’s Death – The Beginning of Darkness   Peaceful world. Alex and Steve explore a new cave.   Suddenly, Null appears from the shadows, corrupts the land, and strikes Alex with a void blade.   A powerful cinematic cutscene plays. Alex dies in Steve’s arms.   Steve collapses crying, lightning and rain begin, music swells.       ---   ⚔️ ACT 2: Broken and Angry – The Herobrine Awakening   Days pass. Steve visits ancient ruins. He decides to face Null without powers.   He finds Null again — and gets hit violently, almost dying.   This triggers a transformation:   > “Awaken... Herobrine.”       Cinematic animation: glowing eyes, thunderstorm, ancient symbols appear. Steve transforms into Herobrine Ascendant.   Emotional soundtrack + glowing UI changes.       ---   ⚔️ ACT 3: The Rift of Eternity – The Legendary Path   The world is glitching. Shadow minions appear.   Herobrine travels through corrupted biomes: 🔹 Glitch Wastes 🔹 Soul Caverns 🔹 Void Forest 🔹 Darkstorm Mountains   Defeats powerful bosses:   🩸 Glitch Revenant   🔥 Flamebound Brute   ⚡ Stormcaller   🧊 Entity 303 (secret optional boss!)   🗡️ Shadowbound Warrior         ---   ⚔️ FINAL ACT: Rise of Prime – The Final War Begins   Arrives at The Rift of Eternity (final battle map): ⛰️ Floating mountains 🔥 Lava eruptions ⛓️ Chains from sky 🌩️ Storm and glitch FX everywhere   Final Cutscene Begins:   > "So… Herobrine finally wakes." – Prime Null         👑 FINAL BATTLE:   Boss Fight: Prime Null vs Herobrine Ascendant   3 Phases: Teleportation, Blade of the Void, Summon Minions   Environment collapses: blocks fly, camera shakes   Epic soundtrack plays with subtitles (EN + Sinhala)   Cutscene finishes with Null screaming:   > “I… will come back… from the Dark Prison!”       Black screen: “Season 2 Coming Soon”         ---   💥 WHAT’S INCLUDED IN THE MOD:   🎮 GAMEPLAY   4–6 hours of playtime   Hard mode with permadeath   Questline system with cutscene triggers   Save/load checkpoints       ---   🦸 CHARACTERS (Fully Animated)   Steve / Herobrine Ascendant   Alex (dies early)   Null (base + Prime Null final form)   Optional Bosses:   Entity 303   Flamebound Brute   Soul Warden   Shadowbound Warrior   Stormcaller   Glitch Revenant         ---   🧩 QUESTS   12+ main quests   6+ side quests (some unlock alternate endings)   Ritual quests to summon Herobrine powers       ---   🔫 WEAPONS / ITEMS   ⚡ Lightning Staff   🗡️ Void Piercer Blade   🔥 Flame Reaper   🧊 Frozen Thunder Shuriken   💎 Alex’s Amulet (used in story)       ---   💥 PARTICLE EFFECTS & CINEMATICS   Crying, rain, lightning, fire   Custom shaders (optional but NOT required)   Camera shake, blur, glow   Flying blocks during battles   Realistic terrain destruction       ---   🎬 TRAILER   Cinematic shots   Text overlays   Background score   Your name and mine: Developed by: Navindu Heshan & The Golden Friend   Ends with🌍 TITLE:   Herobrine vs Null – Rise of Prime   > “Rewrite Minecraft history. Witness the rise… and the fall.”         ---   🧩 MOD VERSION:   Minecraft Forge 1.20.1   Built with MCreator   Ultra-cinematic style, custom mobs, weapons, quests, effects, emotional cutscenes       ---   📖 FULL STORY (Final Draft):   ⚔️ ACT 1: Alex’s Death – The Beginning of Darkness   Peaceful world. Alex and Steve explore a new cave.   Suddenly, Null appears from the shadows, corrupts the land, and strikes Alex with a void blade.   A powerful cinematic cutscene plays. Alex dies in Steve’s arms.   Steve collapses crying, lightning and rain begin, music swells.       ---   ⚔️ ACT 2: Broken and Angry – The Herobrine Awakening   Days pass. Steve visits ancient ruins. He decides to face Null without powers.   He finds Null again — and gets hit violently, almost dying.   This triggers a transformation:   > “Awaken... Herobrine.”       Cinematic animation: glowing eyes, thunderstorm, ancient symbols appear. Steve transforms into Herobrine Ascendant.   Emotional soundtrack + glowing UI changes.       ---   ⚔️ ACT 3: The Rift of Eternity – The Legendary Path   The world is glitching. Shadow minions appear.   Herobrine travels through corrupted biomes: 🔹 Glitch Wastes 🔹 Soul Caverns 🔹 Void Forest 🔹 Darkstorm Mountains   Defeats powerful bosses:   🩸 Glitch Revenant   🔥 Flamebound Brute   ⚡ Stormcaller   🧊 Entity 303 (secret optional boss!)   🗡️ Shadowbound Warrior         ---   ⚔️ FINAL ACT: Rise of Prime – The Final War Begins   Arrives at The Rift of Eternity (final battle map): ⛰️ Floating mountains 🔥 Lava eruptions ⛓️ Chains from sky 🌩️ Storm and glitch FX everywhere   Final Cutscene Begins:   > "So… Herobrine finally wakes." – Prime Null         👑 FINAL BATTLE:   Boss Fight: Prime Null vs Herobrine Ascendant   3 Phases: Teleportation, Blade of the Void, Summon Minions   Environment collapses: blocks fly, camera shakes   Epic soundtrack plays with subtitles (EN + Sinhala)   Cutscene finishes with Null screaming:   > “I… will come back… from the Dark Prison!”       Black screen: “Season 2 Coming Soon”         ---   💥 WHAT’S INCLUDED IN THE MOD:   🎮 GAMEPLAY   4–6 hours of playtime   Hard mode with permadeath   Questline system with cutscene triggers   Save/load checkpoints       ---   🦸 CHARACTERS (Fully Animated)   Steve / Herobrine Ascendant   Alex (dies early)   Null (base + Prime Null final form)   Optional Bosses:   Entity 303   Flamebound Brute   Soul Warden   Shadowbound Warrior   Stormcaller   Glitch Revenant         ---   🧩 QUESTS   12+ main quests   6+ side quests (some unlock alternate endings)   Ritual quests to summon Herobrine powers       ---   🔫 WEAPONS / ITEMS   ⚡ Lightning Staff   🗡️ Void Piercer Blade   🔥 Flame Reaper   🧊 Frozen Thunder Shuriken   💎 Alex’s Amulet (used in story)       ---   💥 PARTICLE EFFECTS & CINEMATICS   Crying, rain, lightning, fire   Custom shaders (optional but NOT required)   Camera shake, blur, glow   Flying blocks during battles   Realistic terrain destruction       ---   🎬 TRAILER   Cinematic shots   Text overlays   Background score   Your name and mine: Developed by: Navindu Heshan & The Golden Friend   Ends with release date: JULY 16       ---   🧠 SPECIAL FEATURES:   Secret ending (if you don’t kill Null)   Killcam-style boss finishers   Hidden rooms + “Void Realm” area   Hard mode unlocks Glitched Steve as final secret .can you make it real.       ---   🧠 SPECIAL FEATURES:   Secret ending (if you don’t kill Null)   Killcam-style boss finishers   Hidden rooms + “Void Realm” area   Hard mode unlocks Glitched Steve as final secret .can you make it
    • Make a test with another Launcher like the Curseforge Launcher, MultiMC or AT Launcher
    • can anyone help me i am opening forge and add modpacks and then it says unable to update native luancher and i redownlaod java and the luancher it self?
    • The problem occurs also in 1.20.1 Forge, but with an "Error executing task on client" instead. I have "Sinytra Connector" installed. On 1.21.5 Fabric, there is no problem. When this happens, the chat message before the death screen appears gets sent, with an extra dash added.
    • Well, as usual, it was user error. Naming mismatch in sounds.json.  Please delete this post if you find it necessary. 
  • Topics

×
×
  • Create New...

Important Information

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