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

Make printer work again! #90

Draft
wants to merge 26 commits into
base: 1.20.1
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6393acb
🖨️ Printer rendering works now!
XyperCode Nov 27, 2023
b32b3f1
🖨️ Paper can now be put in printers again!
XyperCode Nov 27, 2023
280cd71
🗑️ Remove debug code
XyperCode Nov 27, 2023
6785c0a
🔧 Fixed some random issues.
XyperCode Nov 29, 2023
c39d5fd
partially fix paper rendering
Jab125 Nov 30, 2023
6ea5e7d
Update PixelPainterApp.java
Jab125 Nov 30, 2023
6061ba3
try figure out why it renders through walls
Jab125 Nov 30, 2023
82ddfcc
Update Devices.java
Jab125 Nov 30, 2023
b4cf7d1
Fixed ImGui natives (not the macOS one)
XyperCode Dec 22, 2023
e18cd58
"Tried" fixing printer stuff some more.
XyperCode Jan 21, 2024
8378c71
Fix paper render crash
XyperCode Mar 31, 2024
0fff4b0
Fix USB port texture
XyperCode Mar 31, 2024
1b73302
Fix inverted colors on prints and paper rotation.
XyperCode Mar 31, 2024
ba5d6ea
Fix paper block drops
XyperCode Mar 31, 2024
b4ed885
Fix paper block placement, and missed rendering issue
XyperCode Mar 31, 2024
f482b0e
Fix naming
XyperCode Mar 31, 2024
967509e
Attempts were made
XyperCode Mar 31, 2024
9c348ee
Initial 1.20.4 port
XyperCode Apr 29, 2024
b289a7d
🧼 Cleaning & fixing
XyperCode Apr 29, 2024
d326457
💥 Refactors & OS Api
XyperCode Apr 30, 2024
e4b9532
🔗 Package name change due to new domain!
XyperCode May 6, 2024
42f5181
Fix naming & compile errors
XyperCode Jun 4, 2024
c33dbaf
Runs and can load worlds now.
XyperCode Jun 4, 2024
027f288
🔄️ Updating to 1.20.4
XyperCode Jun 7, 2024
3fe8acc
😳 Fix stuff
XyperCode Jun 7, 2024
3525df6
🏗️ Fix building!
XyperCode Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*.ipr
*.iws

local/

# IntelliJ
out/
# mpeltonen/sbt-idea plugin
Expand Down Expand Up @@ -133,3 +135,6 @@ run/

# Ignore datagen cache.
/common/src/main/generated/resources/.cache/

/*/bin/
/.vscode/
7 changes: 5 additions & 2 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
plugins {
id("java")
}

group = "com.ultreon.mods.devices"
version = "0.9.0"

repositories {
mavenCentral()

maven("https://github.com/Ultreon/ultreon-data/raw/main/.mvnrepo")
maven("https://github.com/Ultreon/corelibs/raw/main/.mvnrepo")
}

dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")

implementation("org.jetbrains:annotations:23.0.0")

implementation("io.github.ultreon:ubo:1.3.0")
implementation("io.github.ultreon.corelibs:commons-v0:0.2.0")
}

tasks.test {
useJUnitPlatform()
}
24 changes: 21 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "org.jetbrains.kotlin.jvm" version "1.7.10"
}
repositories {
Expand All @@ -22,6 +22,10 @@ Object getModDescription() {
}

subprojects {
if (project.name == "api") {
return
}

apply plugin: "dev.architectury.loom"

loom {
Expand Down Expand Up @@ -62,6 +66,9 @@ subprojects {
includeGroup "curse.maven"
}
}
maven {
url "https://jitpack.io"
}
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
Expand All @@ -71,7 +78,9 @@ subprojects {
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}", {
transitive = false
}
// The following line declares the mojmap mappings, you may use other mappings as well
mappings loom.layered() {
officialMojangMappings()
Expand All @@ -86,9 +95,12 @@ subprojects {

allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"

if (project.name != "api") {
apply plugin: "architectury-plugin"
}

archivesBaseName = rootProject.archives_base_name
version = rootProject.version
group = rootProject.maven_group
Expand All @@ -99,8 +111,14 @@ allprojects {
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
mavenCentral()
maven { url "https://maven.parchmentmc.org" }
maven { url "https://maven.jab125.dev" }
maven { url "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" }
maven { url "https://cursemaven.com" }
maven { url "https://maven.terraformersmc.com/releases" }
maven { url "https://github.com/Ultreon/ultreon-data/raw/main/.mvnrepo" }
maven { url "https://github.com/Ultreon/corelibs/raw/main/.mvnrepo" }
flatDir { dir "$rootProject.projectDir/libs/" }
}

Expand Down
6 changes: 5 additions & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@ dependencies {
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury:$architectury_version"

implementation("io.github.ultreon:ubo:1.3.0")

modApi "fuzs.forgeconfigapiport:forgeconfigapiport-common-neoforgeapi:$forgeconfigapiport_version"

implementation project(":api")
implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
// modApi "com.ultreon:ultranlang:0.1.0+6"

modCompileOnly "fuzs.forgeconfigapiport:forgeconfigapiport-common:8.0.0"
modCompileOnly 'com.electronwill.night-config:core:3.6.3'
modCompileOnly 'com.electronwill.night-config:toml:3.6.3'

}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"replace": false,
"values": [
{
"id": "devices:laptop",
"required": false
},
{
"id": "devices:mac_max_x",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"replace": false,
"values": [
"devices:laptop",
"devices:printer",
"devices:mac_max_x"
"#devices:computers",
"#devices:printers"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"replace": false,
"values": [
{
"id": "devices:printer",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.jab125.classloader.api;

import com.jab125.classloader.impl.CustomClassLoader;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.impl.launch.knot.Knot;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.nio.file.Paths;
import java.util.jar.JarFile;

public class ClassLoaderApi {
public static ClassLoaderApi INSTANCE = new ClassLoaderApi();
public void init() throws IOException {
public void init() {
var d = new CustomClassLoader();
d.cl.getExecutionClasses().forEach((a) -> {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.jab125.classloader.api;

import org.spongepowered.asm.mixin.injection.ModifyConstant;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {

@Override
public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
var method = super.visitMethod(access, name, descriptor, signature, exceptions);
return method;
return super.visitMethod(access, name, descriptor, signature, exceptions);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
package com.jab125.classloader.impl;

import com.ultreon.devices.Devices;
import com.ultreon.devices.core.Device;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.impl.FabricLoaderImpl;
import net.fabricmc.loader.impl.launch.FabricLauncher;
import net.fabricmc.loader.impl.launch.knot.Knot;
import net.fabricmc.loader.launch.common.FabricLauncherBase;
import net.fabricmc.tinyremapper.TinyRemapper;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import org.spongepowered.asm.util.asm.ASM;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.SecureClassLoader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.jab125.version;

import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
Expand Down Expand Up @@ -246,7 +248,7 @@ public boolean equalsComponentsExactly(SemanticVersionImpl other) {
}

@Override
public int compareTo(Version other) {
public int compareTo(@NotNull Version other) {
if (!(other instanceof SemanticVersion)) {
return getFriendlyString().compareTo(other.getFriendlyString());
}
Expand Down
12 changes: 6 additions & 6 deletions common/src/main/java/com/jab125/version/VersionInterval.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,30 @@ public interface VersionInterval {
/**
* Get the lower limit of the version interval.
*
* @return Version's lower limit or null if none, inclusive depending on {@link #isMinInclusive()}
* @return Version's lower limit or null if none, inclusive depending on {@link #minInclusive()}
*/
Version getMin();
Version min();

/**
* Get whether the lower limit of the version interval is inclusive.
*
* @return True if inclusive, false otherwise
*/
boolean isMinInclusive();
boolean minInclusive();

/**
* Get the upper limit of the version interval.
*
* @return Version's upper limit or null if none, inclusive depending on {@link #isMaxInclusive()}
* @return Version's upper limit or null if none, inclusive depending on {@link #maxInclusive()}
*/
Version getMax();
Version max();

/**
* Get whether the upper limit of the version interval is inclusive.
*
* @return True if inclusive, false otherwise
*/
boolean isMaxInclusive();
boolean maxInclusive();

default VersionInterval and(VersionInterval o) {
return and(this, o);
Expand Down
Loading
Loading