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

Not importing (idk if im stupid) #48

Open
Ixolaro opened this issue Oct 29, 2024 · 0 comments
Open

Not importing (idk if im stupid) #48

Ixolaro opened this issue Oct 29, 2024 · 0 comments

Comments

@Ixolaro
Copy link

Ixolaro commented Oct 29, 2024

So im trying to recreate an old client's interface
but every time i try to compile i get multiple errors like
C:\Users\User\VantaUI\VantaUI\build\sources\main\java\org\applehacks\VantaUI\CustomTheme.java:3: error: cannot find symbol
import com.lukflug.panelstudio.theme.Theme;
^
symbol: class Theme
location: package com.lukflug.panelstudio.theme
my clickgui is like this
package org.applehacks.VantaUI;

import com.lukflug.panelstudio.ClickGUI;
import com.lukflug.panelstudio.SettingsAnimation;
import com.lukflug.panelstudio.component.ButtonComponent;
import com.lukflug.panelstudio.component.Panel;
import com.lukflug.panelstudio.container.PanelContainer;
import com.lukflug.panelstudio.layout.LayoutManager;
import com.lukflug.panelstudio.layout.RootLayout;
import com.lukflug.panelstudio.mc.MinecraftGUI;
import com.lukflug.panelstudio.theme.Theme;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;

public class VantaClickGUI extends MinecraftGUI {
private final ClickGUI gui;

public VantaClickGUI(Minecraft mc, Theme theme) {
    super(mc, 5);

    this.gui = new ClickGUI();

    PanelContainer fightPanel = createCategoryPanel("Fight", theme, 50, 50);
    PanelContainer movePanel = createCategoryPanel("Move", theme, 200, 50);
    PanelContainer worldPanel = createCategoryPanel("World", theme, 350, 50);
    PanelContainer visualPanel = createCategoryPanel("Visual", theme, 500, 50);

    gui.addPanel(fightPanel);
    gui.addPanel(movePanel);
    gui.addPanel(worldPanel);
    gui.addPanel(visualPanel);
}

private PanelContainer createCategoryPanel(String title, Theme theme, int x, int y) {
    PanelContainer panel = new PanelContainer(title, theme.getPanelRenderer(), new SettingsAnimation(), x, y);

    panel.addComponent(new ButtonComponent("Toggle " + title + " Feature", theme.getButtonRenderer(), () -> {
        System.out.println(title + " feature toggled!");
    }));

    return panel;
}

@Override
protected ClickGUI getGUI() {
    return gui;
}

public static void open() {
    Minecraft.getMinecraft().displayGuiScreen(new VantaClickGUI(Minecraft.getMinecraft(), new CustomTheme()));
}

}
CustomTheme.java is like this
package org.applehacks.VantaUI;

import com.lukflug.panelstudio.theme.Theme;
import com.lukflug.panelstudio.theme.ColorScheme;
import com.lukflug.panelstudio.theme.Renderer;

public class CustomTheme implements Theme {
@OverRide
public Renderer getPanelRenderer() {
return new CustomPanelRenderer(new ColorScheme());
}

@Override
public Renderer getButtonRenderer() {
    return new CustomButtonRenderer(new ColorScheme());
}

@Override
public Renderer getSliderRenderer() {
    return new CustomSliderRenderer(new ColorScheme());
}

}
build.gradle is like this
buildscript {
repositories {
jcenter()
maven {
name = "lukflug"
url = "https://lukflug.github.io/maven/"
}
maven { url = 'https://files.minecraftforge.net/maven' }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}

apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.0"
group = "org.applehacks.VantaUI"
archivesBaseName = "VantaUI"

minecraft {
version = "1.8.9-11.15.1.2318-1.8.9"
runDir = "run"
mappings = "stable_20"
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
jcenter()
maven {
name = "lukflug"
url = "https://lukflug.github.io/maven/"
}
maven { url = 'https://files.minecraftforge.net/maven' }
}

dependencies {
implementation "com.lukflug:panelstudio:0.2.4"
implementation "com.lukflug:panelstudio-mc8-forge:0.2.4"

}

processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from(sourceSets.main.resources.srcDirs) {
    include 'mcmod.info'
    expand 'version': project.version, 'mcversion': project.minecraft.version
}

}
i suppose i made a mistake somewhere, but i don't find where

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

1 participant