delvr / Streams

Flowing rivers in Minecraft.
https://minecraft.curseforge.com/projects/streams
55 stars 7 forks source link

Dynmap and VoxelMap support? #70

Open LiskoSlayer63 opened 5 years ago

LiskoSlayer63 commented 5 years ago

I noticed that your rivers doesn't render correctly on Dynmap or VoxelMap. Dynmap detects that your river blocks are liquid though and renders the shading correctly (they get darker when they are deeper).

I think they just fail to find the texture, so is there any workaround or manual way to tell them to render vanilla water texture?

Image from Dynmap: kuva

I also tag @mikeprimm and @MamiyaOtaru if they can say something about this.

delvr commented 5 years ago

Hi LiskoSlayer63,

I don't know the internals of DynMap or VoxelMap but if they check for water as a Material it should work; if they look for specific Water block IDs or registry names it won't work unless all the Streams water blocks are added to their code or config. Generally checking the Material is better for compatibility in my experience. Let me know if you hear back from their devs.

-delvr.

CREEATION commented 5 years ago

Hello,

just saw this issue and was wondering if it is connected to this one:

[xaero.common.minimap.write.MinimapWriter:loadBlockColourFromTexture:740]:
Block file not found: streams:river/tile.water/2/1

//e: doesn't seem to affect the minimap at all though, so I guess it was just trying to get the block texture instead of the material?

2019-03-25_11 07 52

brndd commented 5 years ago

For Dynmap, there's a configuration option block-id-alias that you can use to alias the Streams block IDs to water. I don't think these block IDs will be the same for you so you'll have to figure them out yourself (I used the Data Dumps feature in NEI to find them).

Here's what I used as an example, but as I said these block IDs likely won't work for you unless you use the exact same mods I do: https://gist.github.com/brndd/354f9d978c4ca3cfbf5aac4b90808792

It seems to work for the 2D map. I don't have the isometric view enabled and I'm using a few years old modpack for 1.7.10 (TNFC) so YMMV:

1559893224418

LiskoSlayer63 commented 5 years ago

@brndd That looks like it would work. I just need help how to find the IDs for water, can't figure out how to get them.

brndd commented 5 years ago

Use NEIs Data Dump feature. It's in the NEI options menu. Dump block IDs from it, then open the .CSV file in notepad and find lines that look like this:

streams:river/tile.FreshWaterStationary/-2/-2,1490,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/-2/-1,1491,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/-2/0,1492,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/-2/1,1493,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/-2/2,1494,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/-1/-2,1495,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/-1/2,1496,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/0/-2,1497,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/0/0,1498,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/0/2,1499,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/1/-2,1500,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/1/2,1501,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/2/-2,1502,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/2/-1,1503,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/2/0,1504,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/2/1,1505,true,null,streams.block.BlockRiver
streams:river/tile.FreshWaterStationary/2/2,1506,true,null,streams.block.BlockRiver

The number in the middle, 1490 to 1506, are the block IDs. Alias all those to 9 (vanilla minecraft water) in the Dynmap config.

Below those there are also block IDs for river ice and lava below those, presumably for some sort of lava flows and frozen rivers. I aliased those to standard Minecraft blocks too, but haven't noticed them anywhere yet.

LiskoSlayer63 commented 5 years ago

@brndd Nowadays Dynmap uses block-alias instead of block-id-alias so I need the block names instead of IDs. I used these for the block names so now my configuration looks like this:

block-alias:
    "streams:river/tile.water/-2/-2": "minecraft:water"
    "streams:river/tile.water/-2/-1": "minecraft:water"
    "streams:river/tile.water/-2/0": "minecraft:water"
    "streams:river/tile.water/-2/1": "minecraft:water"
    "streams:river/tile.water/-2/2": "minecraft:water"
    "streams:river/tile.water/-1/-2": "minecraft:water"
    "streams:river/tile.water/-1/2": "minecraft:water"
    "streams:river/tile.water/0/-2": "minecraft:water"
    "streams:river/tile.water/0/0": "minecraft:water"
    "streams:river/tile.water/0/2": "minecraft:water"
    "streams:river/tile.water/1/-2": "minecraft:water"
    "streams:river/tile.water/1/2": "minecraft:water"
    "streams:river/tile.water/2/-2": "minecraft:water"
    "streams:river/tile.water/2/-1": "minecraft:water"
    "streams:river/tile.water/2/0": "minecraft:water"
    "streams:river/tile.water/2/1": "minecraft:water"
    "streams:river/tile.water/2/2": "minecraft:water"

However, it's still not working. I think that those names are wrong so I'll look what NEI says about those tomorrow. Your idea however fixed some Biome O' Plenty stuff for me, so thanks anyway!

delvr commented 5 years ago

@LiskoSlayer63 I'm not familiar with DynMap but those do seem like the correct block names, unless you're using the very-short-lived Streams 0.4.5 which messed up the block names and was pulled from CurseForge (if so, upgrade right away!). I just wanted to point out that the FreshWaterStationary names seen by @brndd are specific to the TerraFirmaCraft support in Streams for 1.7.10 and won't be correct in any other context.

LiskoSlayer63 commented 5 years ago

@delvr I'm actually using 0.4.4 version of Streams, which seems to be kinda old. I'll try to update it and see if there's any difference.

EDIT: Still no difference, river blocks not rendering. Using now Streams 0.4.7 and Farseek 2.3.2.

mikeprimm commented 5 years ago

You might want to try running dynmap with the 'verbose: true' setting in configuration.txt. 3.0 will dump log records for block names it finds that it doesn't have rendering textures/models for, and this may help with getting the block names needed for the block-alias settings.

heydabop commented 5 years ago

So I've had some success with this by using the following for renderdata/streams-texture.txt

modname:streams

texture:id=txt0001,filename=assets/minecraft/textures/blocks/water_still.png,xcount=1,ycount=1
block:id=%river/tile.water/-2/-2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/-2/-1,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/-2/0,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/-2/1,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/-2/2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/-1/-2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/-1/2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/0/-2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/0/0,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/0/2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/1/-2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/1/2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/2/-2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/2/-1,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/2/0,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/2/1,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true
block:id=%river/tile.water/2/2,data=0,patch0=0:txt0001,patch1=0:txt0001,patch2=0:txt0001,patch3=0:txt0001,patch4=0:txt0001,patch5=0:txt0001,transparency=SEMITRANSPARENT,stdrot=true

It seems to still be missing the top layer of water on the stream, but it's better than nothing for the time being.

delvr commented 5 years ago

So I've had some success with this by using the following for renderdata/streams-texture.txt

(...)

It seems to still be missing the top layer of water on the stream, but it's better than nothing for the time being.

As mentioned I'm not familiar with DynMap/VoxelMap but looking at the above configuration you could try adding entries with data=1, data=2, etc. up to data=7 for each Streams block. Those values represent the decay of flowing blocks and are used for the "sloping" layer on some parts of Streams rivers which could be why those weren't appearing for you.

heydabop commented 5 years ago

you could try adding entries with data=1, data=2, etc. up to data=7 for each Streams block.

Wonderful! Thanks for the guidance. I think I now also need a models file to direct dynmap in how to render the slopes (they're all full blocks for now), but this already looks significantly better than what I had before.

LiskoSlayer63 commented 4 years ago

@heydabop Can you show your updated config file and please tell me a littlebit more about how you fixed the textures?

I'm currently re-generating our server's map and I need to do fullrender afterwards. The map radius is 10 000 blocks so this would be a very good place to fix the textures...