Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Updating a liquid block turns it into another
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
Bogigaba

Updating a liquid block turns it into another

By Bogigaba, February 16, 2013 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Bogigaba    0

Bogigaba

Bogigaba    0

  • Tree Puncher
  • Bogigaba
  • Members
  • 0
  • 6 posts
Posted February 16, 2013

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 :)

  • Quote

Share this post


Link to post
Share on other sites

Bogigaba    0

Bogigaba

Bogigaba    0

  • Tree Puncher
  • Bogigaba
  • Members
  • 0
  • 6 posts
Posted February 16, 2013

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.

  • Quote

Share this post


Link to post
Share on other sites

endershadow    36

endershadow

endershadow    36

  • Dragon Slayer
  • endershadow
  • Forge Modder
  • 36
  • 535 posts
Posted February 16, 2013

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

  • Quote

Share this post


Link to post
Share on other sites

robustus    18

robustus

robustus    18

  • Creeper Killer
  • robustus
  • Members
  • 18
  • 151 posts
Posted February 16, 2013

liquid flowing block ID has to be 1 less than the still block.

  • Quote

Share this post


Link to post
Share on other sites

endershadow    36

endershadow

endershadow    36

  • Dragon Slayer
  • endershadow
  • Forge Modder
  • 36
  • 535 posts
Posted February 16, 2013

what do you mean?

  • Quote

Share this post


Link to post
Share on other sites

Groxkiller    7

Groxkiller

Groxkiller    7

  • Stone Miner
  • Groxkiller
  • Members
  • 7
  • 51 posts
Posted February 16, 2013

By default throughout liquid code it will assume the flowing liquid version is one id above the stationary version, not below.

  • Quote

Share this post


Link to post
Share on other sites

endershadow    36

endershadow

endershadow    36

  • Dragon Slayer
  • endershadow
  • Forge Modder
  • 36
  • 535 posts
Posted February 16, 2013

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.

  • Quote

Share this post


Link to post
Share on other sites

Groxkiller    7

Groxkiller

Groxkiller    7

  • Stone Miner
  • Groxkiller
  • Members
  • 7
  • 51 posts
Posted February 16, 2013

But that's my point: you altered it to set to your stationary. That's not the default behavior.

  • Quote

Share this post


Link to post
Share on other sites

endershadow    36

endershadow

endershadow    36

  • Dragon Slayer
  • endershadow
  • Forge Modder
  • 36
  • 535 posts
Posted February 16, 2013

if you look in the buildcraft source code, that's what they did and it works.

  • Quote

Share this post


Link to post
Share on other sites

robustus    18

robustus

robustus    18

  • Creeper Killer
  • robustus
  • Members
  • 18
  • 151 posts
Posted February 17, 2013

/**
* 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

  • Quote

Share this post


Link to post
Share on other sites

endershadow    36

endershadow

endershadow    36

  • Dragon Slayer
  • endershadow
  • Forge Modder
  • 36
  • 535 posts
Posted February 17, 2013

I think it's talking about meta-data there. just copy what I did. because I copied buildcraft.

  • Quote

Share this post


Link to post
Share on other sites

Bogigaba    0

Bogigaba

Bogigaba    0

  • Tree Puncher
  • Bogigaba
  • Members
  • 0
  • 6 posts
Posted March 11, 2013

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.

  • Quote

Share this post


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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • darkgreenminer
      [1.12.2] Multiple Structure Generation

      By darkgreenminer · Posted 56 minutes ago

      Someone else had that same problem of their mod only spawning the last structure added to WorldGenCustomStructures, and I remembered that the solution I found was what a commentor named Redstone Tim mentioned, that in WorldGenStructure you have to remove 'static'.  I'm happy to email my version of these two classes to you if you want to have a look.  It took me hours and hours to get them working.  I have no idea what might cause the cascading gen lag, but fixing the multiple structure problem might help.    
    • troyvs
      problems starting with modding

      By troyvs · Posted 1 hour ago

      what command did you run to set up?  
    • MightyAhmed
      Immediate Crash On Any Version Of Forge

      By MightyAhmed · Posted 2 hours ago

      ok so its been a while but it was workling fine before somehow but now minecraft still works it just freezes and lagspikes every 5 seconds please help me on this issue i cant find anything on the internet also ihave 4GB ram total in my computer and i have dedicated 2gb ram to minecraft in the JVM arguments section also i have 125 mods installed.
    • deanvangreunen
      Custom Armor Item - Help - MC/Forge 1.14.4/1.14.3

      By deanvangreunen · Posted 3 hours ago

      Hello, I'm in progress of making a Minecraft 1.14.4 Mod using Forge. Needing some help, Could you please look at the following Class File and Explain what I'm doing wrong or what I should be doing?.   The "OnArmorTick" and other ".....Tick" functions don't work.   My intent: - if water is below and near player by 1 block while the boots are on then turn the water into ice. I'm trying to implement "Frost Walking Boots"   Code: - FrostBootsItem.java <- File I need help with - My Project Repo  <- Repo, So if you want to see how my mod is setup. (includes my world saves, etc)   Dev Details: - Minecraft Version: 1.14.4 - Minecraft Snapshot: 20191020-1.14.3 - Forge Version: 1.14.4-28.1.61   Notes: - I've followed a tutorial for 1.14.4 modding by MCJty on youtube (The author of RFTools) - I'm new to minecraft modding. I have expeirenced as a software developer/engineer.   ❤️❤️❤️❤️❤️❤️❤️❤️❤️  ❤️  .Thanks in advance. ❤️  ❤️❤️❤️❤️❤️❤️❤️❤️❤️ 
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 3 hours ago

      please see the screenshoot above.
  • Topics

    • Merthew
      8
      [1.12.2] Multiple Structure Generation

      By Merthew
      Started November 7, 2018

    • coolian
      1
      problems starting with modding

      By coolian
      Started October 9

    • MightyAhmed
      83
      Immediate Crash On Any Version Of Forge

      By MightyAhmed
      Started November 10

    • deanvangreunen
      0
      Custom Armor Item - Help - MC/Forge 1.14.4/1.14.3

      By deanvangreunen
      Started 3 hours ago

    • DragonITA
      48
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started December 9

  • Who's Online (See full list)

    • Guy123
    • dylandmrl
    • Yanny7
    • jan
    • LTNightshade
    • ignaciro
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Updating a liquid block turns it into another
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community