Construction foam causing lag, a new building block?

  • I have a city built with construction foams which is causing a lot of lag.
    I understand it probably having something to do with how foam is actually an entity instead of normal block.
    I think it has to be an entity because you want it to be able to cover wires. and that is a great idea.


    Could you make it so when you are placing the foam on empty space it will just turn into a normal block of dried foam instead of entity, so it cost less resource and I will be able to use it as a basic building material for large buildings?
    many thanks to the ic2 team :)

    • Official Post

    They are tile entities, but non-ticking ones with static rendering. I don't quite see how they'd cause lag. Try running sampler (2nd spoiler box in the FastCraft thread) while it's lagging. Assuming you are talking about clientside lag, the commands to run in sequence are "/csampler start", wait a minute, "/csampler stop", "/csampler export <filename>". Upload <filename>.nps from your mc folder somewhere or attach it here.

  • Hmm. It would make more sense if the Cable entity had a Foam state instead of the Foam having a Cable state. But since you say Foam is non-ticking, I assume that is already how it is.

  • They are tile entities, but non-ticking ones with static rendering. I don't quite see how they'd cause lag. Try running sampler (2nd spoiler box in the FastCraft thread) while it's lagging. Assuming you are talking about clientside lag, the commands to run in sequence are "/csampler start", wait a minute, "/csampler stop", "/csampler export ". Upload .nps from your mc folder somewhere or attach it here

    I am 100% sure it is the foams causing lag, I use world edit and replaced all foam with wool, and it removed the lag, the city has no machine or anything else, just foam built buildings. I am sure even your beefy computer will feel the lag if you can use worldedit or something to spawn a large amount of these foam.


    I guess tile entities just cost more resource simply because they are visited more often than normal blocks.

    • Official Post

    And what if I told you, that maybe something else is scanning for all the CFoam TileEntities and that something else thingy causes the Lag?


    Also Player, how about removing the TileEntities entirely and only adding TileEntities to the CFoam Blocks if they get obscurated? That System works and is widely used in GT.

  • And what if I told you, that maybe something else is scanning for all the CFoam TileEntities and that something else thingy causes the Lag?


    Also Player, how about removing the TileEntities entirely and only adding TileEntities to the CFoam Blocks if they get obscurated? That System works and is widely used in GT.

    This. CFoam is fine right now, but if one were to "fix" it, the TEs are a wee bit unnecessary when the CFoam block is by itself.

  • Hmm. It would make more sense if the Cable entity had a Foam state instead of the Foam having a Cable state. But since you say Foam is non-ticking, I assume that is already how it is.


    Now that I've discovered and read the IC2 API, I retract my previous statement. Conductor delegates over the normal Foam block makes much more sense.

  • And what if I told you, that maybe something else is scanning for all the CFoam TileEntities and that something else thingy causes the Lag?


    Also Player, how about removing the TileEntities entirely and only adding TileEntities to the CFoam Blocks if they get obscurated? That System works and is widely used in GT.

    I must agree that there could be another mod scanning the tile entities, but it would still be a good idea to make ic2 more compatible with other mods by making a basic building material normal blocks instead of tile entities.

  • I must agree that there could be another mod scanning the tile entities, but it would still be a good idea to make ic2 more compatible with other mods by making a basic building material normal blocks instead of tile entities.

    Still need csampler or OPIS data to determine for sure though