Posted February 16, 201312 yr I'm currently working on trying to get a liquid block to update correctly. However I am running into an issue that I've tried to fix for the past 4 days (off and on again) and I can't solve it. Here's the pastebin link if you want the source code http://pastebin.com/yqJr4Yrj Thank you for all the help
February 16, 201312 yr Author Oh I'm sorry I forgot to say what happens, silly me, anyways whenever I place down the source block and update it it changes to another block that is not the flowing version of it. Pretty much it's like water into iron just on a block update.
February 16, 201312 yr I think it has to do with the fact that you may have messed up the file when you edited it. I used the liquid api that's built into forge. here's my github if you want to see my code https://github.com/Code-Lyoko-Modding/CodeLyokoMod
February 16, 201312 yr By default throughout liquid code it will assume the flowing liquid version is one id above the stationary version, not below.
February 16, 201312 yr but in the code of the two types, I set the still Block ID in both of them to the stationary form's Block ID. it works fine for me.
February 16, 201312 yr But that's my point: you altered it to set to your stationary. That's not the default behavior.
February 17, 201312 yr /** * Changes the block ID to that of an updating fluid. */ private void setNotStationary(World par1World, int par2, int par3, int par4) { int var5 = par1World.getBlockMetadata(par2, par3, par4); par1World.editingBlocks = true; par1World.setBlockAndMetadata(par2, par3, par4, this.blockID - 1, var5); par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4); par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID - 1, this.tickRate()); par1World.editingBlocks = false; } This is the code here in the stationary block and you can see it subtracts one from the stationary for the flowing
February 17, 201312 yr I think it's talking about meta-data there. just copy what I did. because I copied buildcraft.
March 11, 201312 yr Author Well I've tried that, along with every other thing that I can find, and I this still is happening. I'm just about to give up.
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.