Skip to content

Commit 1234699

Browse files
committed
* update
1 parent 67ea18e commit 1234699

8 files changed

Lines changed: 15 additions & 19 deletions

File tree

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ plugins {
3030
}
3131

3232
group 'me.marcusslover'
33-
version 'dev'
33+
version 'b1.3'
3434

3535
sourceCompatibility = JavaVersion.VERSION_1_8
3636
targetCompatibility = JavaVersion.VERSION_1_8
@@ -49,9 +49,6 @@ repositories {
4949
dependencies {
5050
compileOnly 'org.jetbrains:annotations:22.0.0'
5151

52-
// https://mvnrepository.com/artifact/ws.schild/jave-all-deps
53-
implementation 'ws.schild:jave-all-deps:3.2.0'
54-
5552
// https://mvnrepository.com/artifact/commons-cli/commons-cli
5653
implementation 'org.apache.commons:commons-lang3:3.12.0'
5754
implementation 'commons-cli:commons-cli:1.4'

src/main/java/me/marcusslover/resourcepacker/api/ITexture.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
public interface ITexture extends IFile {
3131
BufferedImage buffer();
32+
3233
boolean bitMap();
3334

3435
default int height() {

src/main/java/me/marcusslover/resourcepacker/core/element/sound/RPSound.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import me.marcusslover.resourcepacker.api.ISound;
3030
import me.marcusslover.resourcepacker.core.resource.RPResource;
3131
import me.marcusslover.resourcepacker.core.resource.ResourcesCache;
32-
import me.marcusslover.resourcepacker.util.AudioUtil;
3332

3433
import java.io.File;
3534
import java.io.IOException;
@@ -73,7 +72,7 @@ public File copyFile(File dir) {
7372
return copy.toFile();
7473
} else {
7574
if (file.exists()) file.createNewFile();
76-
AudioUtil.convertToOgg(sound, file);
75+
//AudioUtil.convertToOgg(sound, file); removed since its unnecessary
7776
return file;
7877
}
7978
} catch (IOException e) {
@@ -113,7 +112,7 @@ public RPSound create() {
113112
String name = file.getName();
114113

115114
/*Validate the format*/
116-
if (!name.endsWith(".ogg") && !name.endsWith(".mp3")) throw new InvalidSoundException(file);
115+
if (!name.endsWith(".ogg") /*&& !name.endsWith(".mp3")*/) throw new InvalidSoundException(file);
117116

118117
return ResourcesCache.string().get(name, () -> new RPSound(file), RPSound.class);
119118
}

src/main/java/me/marcusslover/resourcepacker/core/generator/PackGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static File createMeta(File d, List<String> l) {
5555
File meta = safeFile(d, "pack.mcmeta");
5656

5757
JsonObject pack = new JsonObject();
58-
pack.addProperty("pack_format", 7); // 1.17+
58+
pack.addProperty("pack_format", 8); // 1.18+
5959

6060
StringBuilder builder = new StringBuilder();
6161
for (String s : l) builder.append(s).append("\n");

src/main/java/me/marcusslover/resourcepacker/core/packer/RPPacker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class RPPacker implements IPacker {
6565
logo = null;
6666
prefix = "packer";
6767
description = new ArrayList<>();
68-
description.add("Created with ResourcePacker by MarcusSlover");
68+
description.add("Created with ResourcePacker");
6969

7070
blockRegistry = new RPBlockRegistry();
7171
itemRegistry = new RPItemRegistry();

src/main/java/me/marcusslover/resourcepacker/core/resource/ResourceHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public RPResource get(String dir, String child) {
7878
if (child.endsWith(".png")) {
7979
type = RPResource.Type.IMAGE;
8080
}
81-
if (child.endsWith(".ogg") || child.endsWith(".mp3")) { //mp3 is acceptable because it will be converted to .ogg
81+
if (child.endsWith(".ogg") /*|| child.endsWith(".mp3")*/) { // the mp3 is no longer a thing
8282
type = RPResource.Type.SOUND;
8383
}
8484
if (child.endsWith(".json")) {

src/main/java/me/marcusslover/resourcepacker/util/AudioUtil.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,23 @@
2626
package me.marcusslover.resourcepacker.util;
2727

2828
import org.jetbrains.annotations.NotNull;
29-
import ws.schild.jave.Encoder;
30-
import ws.schild.jave.MultimediaObject;
31-
import ws.schild.jave.encode.AudioAttributes;
32-
import ws.schild.jave.encode.EncodingAttributes;
3329

3430
import java.io.File;
3531

32+
@Deprecated
3633
public class AudioUtil {
37-
private AudioUtil() {
38-
}
39-
4034
private static final Integer BITRATE = 256000;
4135
private static final Integer CHANNELS = 2; // Stereo
4236
private static final Integer RATE = 44100;
4337

38+
private AudioUtil() {
39+
}
40+
4441

42+
@Deprecated
4543
public static void convertToOgg(@NotNull File source, @NotNull File target) {
44+
/*
4645
try {
47-
4846
// Attributes.
4947
AudioAttributes audio = new AudioAttributes();
5048
audio.setCodec("libvorbis");
@@ -67,5 +65,6 @@ public static void convertToOgg(@NotNull File source, @NotNull File target) {
6765
} catch (Exception e) {
6866
e.printStackTrace();
6967
}
68+
*/
7069
}
7170
}

src/main/java/me/marcusslover/resourcepacker/util/UnicodeUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class UnicodeUtil {
3636
CHARS = new String[dif];
3737
for (int i = 0; i < dif; i++) {
3838
String hexadecimal = Integer.toHexString(MIN + i);
39-
CHARS[i] = "\\u"+hexadecimal;
39+
CHARS[i] = "\\u" + hexadecimal;
4040
}
4141
}
4242
}

0 commit comments

Comments
 (0)