So I'm making an End corruption mod, which would replace blocks in the overworld with endstone, and it would spread, but I have no idea where to start. It would only occur in chunks with an end portal, and only after the end portal was activated, but it would spread. My main problems are that I don't know how to replace the grass with endstone after terrain generation and I don't know how to make the corruption trigger only after the end portal has been entered. I'm not asking for the full code, just some pointers, and maybe some snippets of code that I can use, any help would be appreciated.
I'm using FML with my code by the way.
Rollback Post to RevisionRollBack
Hit the green button over there -->
If you thought I had anything useful to say
Make a Block witha TileEntity which contains the logic to spread corruption.
Once a End portal is created make it place two-three such blocks into the ground around / above it.
Then the Tile entities could follow the following logic pattern:
Every 40th tick (2secs ) or more ticks.
1. Spread corrupted blocks, will replace 1-3 blocks inside a given area with the corrputed blocks (not air blocks!).
2. If area is completly corrupted, set a CorruptorBlock at the edges of the area, and replace this block with a corrupted one.
Just remember that with the above numbers you basicly have a virus which won't stop unless you add code specificaly.
Alright, thanks for that, but I don't know how I would make the corrupted blocks replace the other blocks, my idea is to just have a corruption spread for all blocks that are adjacent to an air block (easy logic), so what I need to know is how I make one block replace another, any code? That's most of what I'm still stuck on that I really can't figure out. Thanks for the help so far.
Rollback Post to RevisionRollBack
Hit the green button over there -->
If you thought I had anything useful to say
I'm using FML with my code by the way.
If you thought I had anything useful to say
Once a End portal is created make it place two-three such blocks into the ground around / above it.
Then the Tile entities could follow the following logic pattern:
Every 40th tick (2secs ) or more ticks.
1. Spread corrupted blocks, will replace 1-3 blocks inside a given area with the corrputed blocks (not air blocks!).
2. If area is completly corrupted, set a CorruptorBlock at the edges of the area, and replace this block with a corrupted one.
Just remember that with the above numbers you basicly have a virus which won't stop unless you add code specificaly.
Alright, thanks for that, but I don't know how I would make the corrupted blocks replace the other blocks, my idea is to just have a corruption spread for all blocks that are adjacent to an air block (easy logic), so what I need to know is how I make one block replace another, any code? That's most of what I'm still stuck on that I really can't figure out. Thanks for the help so far.
If you thought I had anything useful to say
Oh.
That's definitely much easier than i thought it would be, thanks.
If you thought I had anything useful to say