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

Move DV Tests to UltreonLib Tests #83

Open
wants to merge 5 commits into
base: 1.20.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,18 @@ subprojects {
url 'https://maven.quiltmc.org/repository/release/'
}


maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}

maven {
name "Jitpack"
url "https://jitpack.io"
}

maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
Expand Down
1 change: 1 addition & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:$fabric_loader_version"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury:$architectury_version"
modApi "com.github.Ultreon.ultreonlib:ultreon-lib:$ultreonlib_version"

implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
Expand Down
1 change: 0 additions & 1 deletion common/src/main/java/com/ultreon/devices/Devices.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public void init() {
registerApplications();

EnvExecutor.runInEnv(Env.CLIENT, () -> () -> {
ClientAppDebug.register();
ClientModEvents.clientSetup(); //todo
});

Expand Down

This file was deleted.

24 changes: 24 additions & 0 deletions common/src/main/java/com/ultreon/devices/tests/DvTest1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.ultreon.devices.tests;

import com.ultreon.devices.block.entity.LaptopBlockEntity;
import com.ultreon.devices.core.Laptop;
import com.ultreon.devices.init.DeviceBlocks;
import com.ultreon.mods.lib.client.gui.screen.test.TestLaunchContext;
import com.ultreon.mods.lib.client.gui.screen.test.TestScreen;
import com.ultreon.mods.lib.client.gui.screen.test.TestScreenInfo;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.DyeColor;

@TestScreenInfo("DV TEST")
public class DvTest1 extends Screen implements TestScreen {
public DvTest1() {
super(TestLaunchContext.get().title);
}

@Override
protected void init() {
Minecraft.getInstance().setScreen(new Laptop(new LaptopBlockEntity(new BlockPos(0, 0, 0), DeviceBlocks.LAPTOPS.of(DyeColor.WHITE).get().defaultBlockState()), true));
}
}
27 changes: 27 additions & 0 deletions common/src/main/java/com/ultreon/devices/tests/DvTest2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.ultreon.devices.tests;

import com.ultreon.devices.core.laptop.client.ClientLaptop;
import com.ultreon.devices.core.laptop.client.ClientLaptopScreen;
import com.ultreon.devices.core.laptop.server.ServerLaptop;
import com.ultreon.mods.lib.client.gui.screen.test.TestLaunchContext;
import com.ultreon.mods.lib.client.gui.screen.test.TestScreen;
import com.ultreon.mods.lib.client.gui.screen.test.TestScreenInfo;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;

@TestScreenInfo("DV TEST #2")
public class DvTest2 extends Screen implements TestScreen {
public DvTest2() {
super(TestLaunchContext.get().title);
}

@Override
protected void init() {
var serverLaptop = new ServerLaptop();
ServerLaptop.laptops.put(serverLaptop.getUuid(), serverLaptop);
var clientLaptop = new ClientLaptop();
clientLaptop.setUuid(serverLaptop.getUuid());
ClientLaptop.laptops.put(clientLaptop.getUuid(), clientLaptop);
Minecraft.getInstance().setScreen(new ClientLaptopScreen(clientLaptop));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
com.ultreon.devices.tests.DvTest1
com.ultreon.devices.tests.DvTest2
2 changes: 2 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ dependencies {
modApi "net.fabricmc.fabric-api:fabric-api:$fabric_api_version"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury-fabric:$architectury_version"
modApi "com.github.Ultreon.ultreonlib:ultreon-lib-fabric:$ultreonlib_version"

modApi "fuzs.forgeconfigapiport:forgeconfigapiport-fabric:8.0.0"
modImplementation 'com.electronwill.night-config:core:3.6.5'
modImplementation 'com.electronwill.night-config:toml:3.6.5'


// include(implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.10"))
// include(implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"))
// include(implementation("com.ultreon:ultranlang:0.1.0+6"))
Expand Down
1 change: 1 addition & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {
forge "net.minecraftforge:forge:$minecraft_version-$forge_version"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury-forge:$architectury_version"
modApi "com.github.Ultreon.ultreonlib:ultreon-lib-forge:$ultreonlib_version"

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ geckolib_version_forge=4.2.1
# Dependency related
architectury_version=9.1.12
fabric_api_version=0.86.1+1.20.1
ultreonlib_version=1.5.0
Loading