# [MINOR] Block not spreading up.

## Recommended Posts

I'm having a minor problem I can't solve and I've got no matches on google so far.

I'm having a block that spreads, consisting out of this code in my Block.class:

```  public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2)
{
par1World.setBlockWithNotify(par2, par3, par4, Mod.ModBlock..blockID);
}
else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 1)
{
for (int var6 = 0; var6 < 46; ++var6)
{
int var7 = par2 + par5Random.nextInt(10) - 1;
int var8 = par3 + par5Random.nextInt(10) - 3;
int var9 = par4 + par5Random.nextInt(10) - 1;
int var10 = par1World.getBlockId(var7, var8 + 1, var9);

if (par1World.getBlockId(var7, var8, var9) == Mod.ModBlock.blockID)
{
par1World.setBlockWithNotify(var7, var8, var9,mod_Mod.ModBlock.blockID);
}
else if (par1World.getBlockId(var7, var8, var9) == Mod.ModBlock.blockID)
{
par1World.setBlockWithNotify(var7, var8, var9,mod_Mod.ModBlock.blockID);
}
}
}
}
}```

Its spreads all the ways except up, wich is what I need.

Is there a possible way of doing this?

## 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.

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 previous content has been restored.   Clear editor

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

• ### Recently Browsing

• No registered users viewing this page.
• ### Posts

• Hello everyone, I recently made an assembly and launched it on the server, but it crashes a few hours after launch, I understand that the problem is in mods, but I can't figure out which ones. https://ru.files.me/u/ffus2bzu7k
• Not a crash - the game runs perfectly fine. However, there's a visual bug on the title screen where the gamma just cranks itself up for no reason. I've tried reinstalling but nothing's happened. I don't have any FullBright-esque mods, so I'm not sure what could be causing it.  Game version is 1.18.2 Forge version is 40.2.21 Debug Log: https://paste.ee/p/ZxL89 Video: https://www.mediafire.com/file/8pq89vluabg1gx8/flashbang.mp4/file
• Add the mods one by one or in groups until you find the mod causing this issue
• Maybe it is something outside Minecraft - an issue with the internet connection Make a test with disabled firewall/antivirus program

• ### Who's Online (See full list)

×

• #### Activity

×
• Create New...

## Important Information

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