Skip to content

Commit

Permalink
Add support for RTX
Browse files Browse the repository at this point in the history
  • Loading branch information
wode490390 committed Jul 11, 2024
1 parent d1b5553 commit f8c0b8f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cn/nukkit/entity/data/Skin.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public static SerializedImage parseBufferedImage(BufferedImage image) {
}

private static String convertLegacyGeometryName(String geometryName) {
return "{\"geometry\" : {\"default\" : \"" + geometryName + "\"}}";
return "{\"geometry\":{\"default\":\"" + geometryName + "\"}}";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@ToString
public abstract class AbstractResourcePack implements ResourcePack {
protected PackManifest manifest;

protected String id;
protected String version;
protected String type;
protected final List<String> capabilities = new ArrayList<>();

@Override
public String getPackName() {
Expand All @@ -30,6 +34,11 @@ public String getPackType() {
return type;
}

@Override
public List<String> getCapabilities() {
return capabilities;
}

@Override
public String getEncryptionKey() {
return "";
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/cn/nukkit/resourcepacks/ResourcePack.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cn.nukkit.resourcepacks;

import javax.annotation.Nullable;
import java.util.List;

public interface ResourcePack {
String getPackName();
Expand All @@ -11,6 +12,8 @@ public interface ResourcePack {

String getPackType();

List<String> getCapabilities();

int getPackSize();

byte[] getSha256();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public ZippedResourcePack(File file, boolean encrypt) throws IOException {
.findFirst()
.map(Module::getType)
.orElse("resources");
capabilities.addAll(manifest.getCapabilities());

String encryptionKey;
if (RESOURCE_PACK_ENCRYPTION && encrypt) {
Expand Down

0 comments on commit f8c0b8f

Please sign in to comment.