Jump to content

[1.7.10]How to make a StructureComponent generated in explored area?


D0431791

Recommended Posts

It seems that every StructureComponent generates before its location is visited.

Now I want to make a mod that generates a StructureComponent in explored area.

Example : Steve places a "Desert Temple Sapling" in visited ocean and lets it grow a desert temple.

I have tried buildComponent, but nothing was generated.

The search engines only gave me unrelated information, like how to add a new village house type.

How to make such "Desert Temple Sapling" works?

Link to comment
Share on other sites

I think you need StructureStart#generateStructure. It's called when the structure is starting to be generated.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

I think you need StructureStart#generateStructure. It's called when the structure is starting to be generated.

Now some components can be generated.

The basic code looks like this:

public class _SS extends StructureStart{
public _SS(World xw,Random xr,int xx,int xy,int xz){
	StructureComponent yy=new ComponentScatteredFeaturePieces.DesertPyramid(xr,xx,xz);
	components.add(yy);
	boundingBox=new StructureBoundingBox(xx-80,0,xz-80,xx+80,255,xz+80);
	yy.buildComponent(yy, components, xr);
	generateStructure(xw, xr, boundingBox);
	updateBoundingBox();
}
}

Using

 new _SS(xw,xr,xx,xy,xz);

can create a Desert Temple without the underground chest room.

54M67zC.png

However, we need to do advanced researching for how to correctly create the full structure for indivisual structures.

Link to comment
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.
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.