Jump to content

Recommended Posts

Posted

I have a block that is essentially vines. I was wondering how to make it so that they generate in the world on the sides of trees?

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

I would just make a world generator for your vines, and right before the setBlock function add a test to make sure one of the blocks next to it is wood. Here's a descent tutorial on adding worldgen:

http://www.minecraftforge.net/wiki/Adding_World_Generation

How do i check for neighboring blocks? kind of a noob...

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

~bump~?

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

Under generate, just do:

boolean shouldPlace = false;

if(world.getBlock(xCoord + 1, yCoord, zCoord) == Blocks.wood)/** Or whatever block **/{
shouldPlace = true;
}
}


if(world.getBlock(xCoord, yCoord, zCoord + 1) == Blocks.wood)/** Or whatever block **/{
shouldPlace = true;
}
}
if(world.getBlock(xCoord - 1, yCoord, zCoord) == Blocks.wood)/** Or whatever block **/{
shouldPlace = true;
}
}


if(world.getBlock(xCoord, yCoord, zCoord - 1) == Blocks.wood)/** Or whatever block **/{
shouldPlace = true;
}
if(shouldPlace){
world.setBlock(yourBlockName); //Or whatever function to generate the block
}

Keep in mind I just did this on the fly and you WILL have to modify it a bit, but you should be able to handle that...

Another thing, the thing you're trying to do will be inherently laggy because it will likely have to run this code for EVERY block (or some constraint of blocks, like every block between y = 50 and y = 90 or whatever). This would apply to almost any solution for this though. (Unless you want the vines to only generate on your custom trees, in which case you could just make the vines generate as part of the tree and it would make about 8039x more sense then this :P)

Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more!

width=174 height=100http://i.imgur.com/ghgWmA3.jpg[/img]

Posted

More gratuitous cut&paste...

Will this nonsense ever end?

 

Nope.. :|.

---------

 

@chimera27,

 

I'm pretty sure if he puts in for example:

if(world.getBlock(xCoord - 1, yCoord, zCoord) == Blocks.leaves)

 

It will render this vines nearly on every tree.

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

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

×
×
  • Create New...

Important Information

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