Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display "nether" world render in normal world render radio button menu? #1862

Closed
mtoensing opened this issue Oct 25, 2020 · 3 comments

Comments

@mtoensing
Copy link

mtoensing commented Oct 25, 2020

I would like to display the nether world render as a radio button in the normal world's menu. Basically, I would like to merge these to menus into one:

Screen Shot 2020-10-25 at 10 47 49Screen Shot 2020-10-25 at 10 47 43

Is this somehow possible? I struggled with this because "nether" is handled like a second "world" - which it is. Here is my current config.py:


# My config.py script for overviewer:
worlds["pudel"] = "/tmp/server/world/"
worlds["pudel_nether"] = "/tmp/server/world_nether/"
texturepath = "/tmp/overviewer/client.jar"
customwebassets = "/tmp/config/customwebassets"
processes = 2
outputdir = "/tmp/export/"
my_cave = [Base(), EdgeLines(), Cave(only_lit=True), DepthTinting()]
my_nowater = [Base(), EdgeLines(), NoFluids()]
defaultzoom = 5
my_crop = (-1200, -1600, 900, 400)

def playerIcons(poi):
    if poi['id'] == 'Player':
        poi['icon'] = "https://mc.marc.tv/assets/steve.png"
        return "Last known location for %s" % poi['EntityId']

def playerSpawns(poi):
    if poi['id']=='PlayerSpawn':
        poi['icon'] = "https://mc.marc.tv/assets/bed.png"
        return "Spawn for %s" % poi['EntityId']
'''
def signFilter(poi):
    if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign':
        poi['icon'] = "https://mc.marc.tv/assets/sign.png"
        text = "\n".join([poi['Text1'], poi['Text2'], poi['Text3'], poi['Text4']])
        if text.__contains__('...'):
            return text.replace('...', '')
'''

def chestFilter(poi):
    if poi['id'] == 'Chest' or poi['id'] == 'minecraft:chest':
        return "Chest with %d items" % len(poi['Items'])


thingsToMaker = [
    dict(name="Players", filterFunction=playerIcons),
    dict(name="Beds", filterFunction=playerSpawns),
    #dict(name="Signs", filterFunction=signFilter),
    #dict(name="Chests", filterFunction=chestFilter)
]

renders["day_complete_smooth"] = {
    'world': 'pudel',
    'title': 'Day',
    'rendermode': 'smooth_lighting',
    "dimension": "overworld",
    'markers': thingsToMaker
}

renders["night_complete"] = {
    'world': 'pudel',
    'title': 'Night',
    'rendermode': 'smooth_night',
    "dimension": "overworld",
    'markers': thingsToMaker
}

renders["cave_complete"] = {
    'world': 'pudel',
    'title': 'Cave',
    'rendermode': my_cave,
    "dimension": "overworld",
    'markers': thingsToMaker
}

renders["nether"] = {
    "world": "pudel_nether",
    "title": "Nether",
    "rendermode": "nether",
    "dimension": "nether"
}

# Import the Observers
from .observer import MultiplexingObserver, ProgressBarObserver, JSObserver

# Construct the ProgressBarObserver
pbo = ProgressBarObserver()

# Construct a basic JSObserver
jsObserver = JSObserver(outputdir, 30)

# Set the observer to a MultiplexingObserver
observer = MultiplexingObserver(pbo, jsObserver)

Result should look like this:

Screen Shot 2020-10-25 at 10 55 49

(Mockup!)

Why do I want to do this? The dropdown takes up too much space on mobile devices.

@KarmCraft
Copy link

KarmCraft commented Dec 3, 2020

I think you could try to render the nether as jpg overlay of the main world.

renders["nether"] = {
    "world": "pudel_nether",
    "title": "Nether",
    "rendermode": "nether",
    "dimension": "nether",
    "overlay": ["day_complete_smooth"],
    "imgformat": "jpg",
}

@mtoensing
Copy link
Author

mtoensing commented Dec 3, 2020

It works and is fair enough for me. Thank you
Screen Shot 2020-12-03 at 13 15 30

@KarmCraft
Copy link

Glad I was able to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants