Jump to content

Recommended Posts

Posted (edited)

Define "Render beam".

public class RenderTestingBlock extends TileEntitySpecialRenderer<TileEntityTestingBlock>
{
    public static final ResourceLocation TEXTURE_BEACON_BEAM = new ResourceLocation("textures/entity/beacon_beam.png");

    public void render(TileEntityTestingBlock te, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
    {
        this.renderBeam(x, y, z, partialTicks, destroyStage, te.getBeamSegments(), alpha);
    }

    public void renderBeam(double x, double y, double z, double partialTicks, double textureScale, List<TileEntityTestingBlock.BeamSegment> beamSegments, double totalWorldTime)
    {
        this.bindTexture(TEXTURE_BEACON_BEAM);
    }
}

As far as I can tell from your code, you are not doing anything to tell minecraft to render the beam. All you are doing is binding the textures.

You need to draw the beam yourself. An easy way to do it would be to draw a "rectangular" beam with 4 faces.

If you do not know how to start, you might want to look at how minecraft renders lightning.

 

32 minutes ago, Awakened Redstone said:

What is the "String" that say to the TESR render the beam?

What? Please elucidate. What do you mean by the "String"?

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted (edited)
8 minutes ago, Awakened Redstone said:

"String" is the code.

The definition of "String" is char[]; It does not means code. I would suggest you to change the habit of referring to code as String, as this might cause confusion in the future.

 

Apart from your render issue, some suggestions for your code:

1. "tools" and "util" are essentially the same thing, thus there is no need to create 2 separate packages.

2. You have 2 item packages. You only need one. Merge them.

3. Stop using ItemBase.

4. Stop using BlockBase.

5. Do not use static initializers.

Cadiboo made a post previously explaining the reasons: http://www.minecraftforge.net/forum/topic/68881-onblockactivated-not-being-called/?tab=comments#comment-332831

 

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted

Right. According to your code on GitHub, you didn't add ANY code that does anything in terms of rendering a beam. Therefore, of course there is no beam, as code won't work if you don't actually write them down.

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted

Do you still have this problem? Knowing how to render stuff is required for rendering stuff. There are plenty of OpenGL tutorials on google. You should learn how to draw a cuboid with the BufferBuilder. Also, please read https://gist.github.com/Cadiboo/fbea89dc95ebbdc58d118f5350b7ba93

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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



×
×
  • Create New...

Important Information

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