forked from MrCrayfish/MrCrayfishDeviceMod
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to UltreonLib test screens for DV tests
- Loading branch information
Showing
9 changed files
with
97 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
common/src/main/java/com/ultreon/devices/tests/DvTest1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
27
common/src/main/java/com/ultreon/devices/tests/DvTest2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...c/main/resources/META-INF/services/com.ultreon.mods.lib.client.gui.screen.test.TestScreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
com.ultreon.devices.tests.DvTest1 | ||
com.ultreon.devices.tests.DvTest2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters