Skip to content

Commit

Permalink
bugfix + bump up version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-hydrogen committed May 6, 2022
1 parent 7a0e70e commit e08e398
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 52 deletions.
37 changes: 4 additions & 33 deletions Assemble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Resources</artifactId>
<version>${revision}</version>
<version>1.0</version>
</parent>

<artifactId>Resources-all</artifactId>
Expand All @@ -33,35 +33,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.1-SNAPSHOT</version>
<configuration>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>exposed.hydrogen.resources:Core</artifact>
<includes>
<include>**</include>
</includes>
</filter>
<filter>
<artifact>exposed.hydrogen.resources:Spigot</artifact>
<includes>
<include>**</include>
</includes>
</filter>
<filter>
<artifact>exposed.hydrogen.resources:Minestom</artifact>
<includes>
<include>**</include>
</includes>
</filter>
<filter>
<artifact>team.unnamed:creative-api</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -78,19 +49,19 @@
<dependency>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Core</artifactId>
<version>${revision}</version>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Spigot</artifactId>
<version>${revision}</version>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Minestom</artifactId>
<version>${revision}</version>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
3 changes: 1 addition & 2 deletions Core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>1.0</version>

<parent>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Resources</artifactId>
<version>${revision}</version>
<version>1.0</version>
</parent>

<name>Resources-core</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ResourcePackHandler {
@Getter private byte[] hash;
@Getter private final LinkedList<FileResource> resources;
@Getter private final LinkedList<MetadataPart> metadataParts;
@Getter private String credits;
@Getter private String credits = "";

/**
* Resource pack handler constructor, generates a empty resource pack.
Expand Down Expand Up @@ -83,37 +83,37 @@ public void setResourcePack(ResourcePack resourcePack, boolean startServer) thro
}
}

public void addResource(FileResource resource) {
public <T extends FileResource> void addResource(T resource) {
addResource(resource, false);
}
public void addResource(FileResource resource, boolean compile) {
public <T extends FileResource> void addResource(T resource, boolean compile) {
addResources(List.of(resource), compile);
}

public void addMetadataPart(MetadataPart part) {
public <T extends MetadataPart> void addMetadataPart(T part) {
addMetadataPart(part,false);
}
public void addMetadataPart(MetadataPart part, boolean compile) {
public <T extends MetadataPart> void addMetadataPart(T part, boolean compile) {
addMetadataParts(List.of(part), compile);
}

public void addResources(List<FileResource> resources) {
public <T extends FileResource> void addResources(List<T> resources) {
addResources(resources, false);
}
public void addResources(List<FileResource> resources, boolean compile) {
public <T extends FileResource> void addResources(List<T> resources, boolean compile) {
this.resources.addAll(resources);
if(compile) compileAndSetResourcePack();
}

public void addMetadataParts(List<MetadataPart> parts) {
public <T extends MetadataPart> void addMetadataParts(List<T> parts) {
addMetadataParts(parts, false);
}
public void addMetadataParts(List<MetadataPart> parts, boolean compile) {
public <T extends MetadataPart> void addMetadataParts(List<T> parts, boolean compile) {
metadataParts.addAll(parts);
if(compile) compileAndSetResourcePack();
}
public void addCredit(String credit) {
credits = credits.concat(credit).concat(System.lineSeparator());
credits = credits + credit + System.lineSeparator();
}

protected static void downloadResourcePack(URL url) throws IOException {
Expand Down
4 changes: 2 additions & 2 deletions Minestom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>Resources</artifactId>
<groupId>exposed.hydrogen.resources</groupId>
<version>${revision}</version>
<version>1.0</version>
</parent>

<artifactId>Minestom</artifactId>
Expand All @@ -34,7 +34,7 @@
<dependency>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Core</artifactId>
<version>${revision}</version>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion Minestom/src/main/resources/META-INF/extension.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"entrypoint": "exposed.hydrogen.resources.ResourcesMinestom",
"name": "Resources",
"version": "1.0.0"
"version": "1.1.0"
}
4 changes: 2 additions & 2 deletions Spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Resources</artifactId>
<version>${revision}</version>
<version>1.0</version>
</parent>

<name>Resources-spigot</name>
Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Core</artifactId>
<version>${revision}</version>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion Spigot/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Resources
version: ${project.version}
version: 1.1.0
main: exposed.hydrogen.resources.ResourcesSpigot
api-version: 1.18
load: STARTUP
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>exposed.hydrogen.resources</groupId>
<artifactId>Resources</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>
<version>1.0</version>

<modules>
<module>Core</module>
Expand Down

0 comments on commit e08e398

Please sign in to comment.