mirror of
https://github.com/GeyserMC/GeyserOptionalPack.git
synced 2025-12-19 14:59:14 +00:00
The rename: Optional is now Integrated (#70)
This commit is contained in:
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@@ -26,36 +26,36 @@ jobs:
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||
if: success()
|
||||
with:
|
||||
name: GeyserOptionalPack
|
||||
path: GeyserOptionalPack.mcpack
|
||||
name: GeyserIntegratedPack
|
||||
path: GeyserIntegratedPack.mcpack
|
||||
|
||||
- name: Get Version
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }}
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserIntegratedPack' && github.ref_name == 'master' }}
|
||||
id: get-version
|
||||
run: |
|
||||
version=$(cat src/main/resources/optionalpack/manifest.json | jq -r '.header.version | join(".")')
|
||||
version=$(cat src/main/resources/integratedpack/manifest.json | jq -r '.header.version | join(".")')
|
||||
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Release Metadata
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }}
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserIntegratedPack' && github.ref_name == 'master' }}
|
||||
uses: GeyserMC/actions/release@master
|
||||
id: metadata
|
||||
with:
|
||||
appID: ${{ secrets.RELEASE_APP_ID }}
|
||||
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
||||
files: |
|
||||
geyseroptionalpack:GeyserOptionalPack.mcpack
|
||||
geyserintegratedpack:GeyserIntegratedPack.mcpack
|
||||
releaseEnabled: false
|
||||
saveMetadata: true
|
||||
releaseProject: 'geyseroptionalpack'
|
||||
releaseProject: 'geyserintegratedpack'
|
||||
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
|
||||
|
||||
- name: Publish to Downloads API
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }}
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserIntegratedPack' && github.ref_name == 'master' }}
|
||||
uses: GeyserMC/actions/upload-release@master
|
||||
with:
|
||||
username: ${{ vars.DOWNLOADS_USERNAME }}
|
||||
privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
|
||||
host: ${{ secrets.DOWNLOADS_SERVER_IP }}
|
||||
files: |
|
||||
GeyserOptionalPack.mcpack
|
||||
GeyserIntegratedPack.mcpack
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -255,8 +255,8 @@ gradle-app.setting
|
||||
# End of https://www.toptal.com/developers/gitignore/api/git,java,gradle,eclipse,netbeans,jetbrains+all,visualstudiocode
|
||||
|
||||
# Output pack files
|
||||
GeyserOptionalPack.mcpack
|
||||
GeyserOptionalPack.zip
|
||||
GeyserIntegratedPack.mcpack
|
||||
GeyserIntegratedPack.zip
|
||||
|
||||
# Development folders
|
||||
temp/
|
||||
|
||||
13
README.md
13
README.md
@@ -1,8 +1,11 @@
|
||||
# GeyserOptionalPack
|
||||
# GeyserIntegratedPack
|
||||
|
||||
Optional Bedrock resource pack to extend Geyser functionality. Learn more on its [wiki page](https://geysermc.org/wiki/other/geyseroptionalpack).
|
||||
> [!IMPORTANT]
|
||||
> The GeyserIntegratedPack is now included in Geyser. You no longer need to manually add it!
|
||||
> If you were using the GeyserOptionalPack before, we recommend removing it.
|
||||
|
||||
Bedrock resource pack to extend Geyser functionality. Learn more on its [wiki page](https://geysermc.org/wiki/other/geyserintegratedpack).
|
||||
|
||||
Download: [GeyserOptionalPack.mcpack](https://download.geysermc.org/v2/projects/geyseroptionalpack/versions/latest/builds/latest/downloads/geyseroptionalpack)
|
||||
|
||||
### Implements
|
||||
|
||||
@@ -20,11 +23,13 @@ Download: [GeyserOptionalPack.mcpack](https://download.geysermc.org/v2/projects/
|
||||
- Tick-delay and rename fields in the command block menu
|
||||
- Structure block options that do not exist on Java
|
||||
|
||||
Download: [GeyserIntegratedPack.mcpack](https://download.geysermc.org/v2/projects/geyserintegratedpack/versions/latest/builds/latest/downloads/geyserintegratedpack)
|
||||
|
||||
### Manually compiling the pack
|
||||
|
||||
1. Clone the repo to your computer
|
||||
2. Run `gradlew run`.
|
||||
3. When it finishes compiling, it will output the `GeyserOptionalPack.mcpack`.
|
||||
3. When it finishes compiling, it will output the `GeyserIntegratedPack.mcpack`.
|
||||
|
||||
### Legal
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ plugins {
|
||||
application
|
||||
}
|
||||
|
||||
group = "org.geysermc.optionalpack"
|
||||
group = "org.geysermc.integratedpack"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
@@ -17,11 +17,11 @@ dependencies {
|
||||
|
||||
tasks {
|
||||
jar {
|
||||
archiveFileName = "GeyserOptionalPackCompiler.jar"
|
||||
archiveFileName = "GeyserIntegratedPackCompiler.jar"
|
||||
manifest.attributes["Main-Class"] = application.mainClass
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("org.geysermc.optionalpack.OptionalPack")
|
||||
mainClass.set("org.geysermc.integratedpack.IntegratedPack")
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
### Introduction
|
||||
|
||||
The GeyserOptionalPack is compiled using a program written in Java. It contains various renderers and utilities for converting Java Edition assets into a format that works with Geyser to work on Bedrock Edition.
|
||||
The GeyserIntegratedPack is compiled using a program written in Java. It contains various renderers and utilities for converting Java Edition assets into a format that works with Geyser to work on Bedrock Edition.
|
||||
|
||||
Entity data and entity flags (known as queries in Molang) are pieces of metadata that store various pieces of information about an entity on the Bedrock Edition of Minecraft. You can query for an entity's health, for example (a number query or an entity data), and can query for if an entity is angry (an entity flag, which is either 1.0 or 0.0 in Molang). Not all entities use every query, but every entity has access to most queries, though Bedrock by default ignores these. These queries can be sent by Geyser and change how an entity looks. We use this to our advantage in this resource pack.
|
||||
|
||||
@@ -76,7 +76,7 @@ v.head_scale = q.is_item_name_any('slot.armor.head', 0, 'minecraft:skull', 'mine
|
||||
|
||||
The illusioner does not exist in Bedrock Edition. Full implementation, however, would require more than a simple texture swap. This is due to the illusioner's special attack, which creates four duplicate false illusioners, which lack a hit box. The actual illusioner remains invisible during this attack. Implementing this would likely be possible from a technical perspective, but it would require either some kind of helper entity attached to the illusioner by Geyser, such as an invisible armor stand, or the removal of invisibility during the illusioner's special attack. The former would be preferable, as it would maintain some degree of functionality for users without the pack.
|
||||
|
||||
Currently, the optional pack uses a render controller to perform a simple texture swap on the illusioner. This is accomplished by replacing the evocation illager with the illusioner when the evocation illager returns true for the Molang query `q.is_bribed`. The following texture array is defined in the render controller:
|
||||
Currently, the integrated pack uses a render controller to perform a simple texture swap on the illusioner. This is accomplished by replacing the evocation illager with the illusioner when the evocation illager returns true for the Molang query `q.is_bribed`. The following texture array is defined in the render controller:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -115,8 +115,8 @@ Both Java Edition and Bedrock Edition have offhand support, though Bedrock is ve
|
||||
|
||||
The pack replaces many particles that are not displayed for various reasons. Some cannot be displayed due to Bedrock's lack of ability to spawn particles with data from required builtin variables. Others simply do not exist in Bedrock edition. The table below summarizes the particle changes implemented by this pack.
|
||||
|
||||
| Java (`minecraft:`) | Bedrock (`minecraft:`) | Optional Pack (`geyseropt:`) | Notes |
|
||||
|:-----------------------:|:-----------------------:|:----------------------------:|:----------------------------------------------------------------------------------------:|
|
||||
| Java (`minecraft:`) | Bedrock (`minecraft:`) | Integrated Pack (`geyseropt:`) for legacy reasons | Notes |
|
||||
|:-----------------------:|:-----------------------:|:-------------------------------------------------:|:-----------------------------------------------------------------------------------------:|
|
||||
| `ash` | - | `ash` | Not present in Bedrock Edition |
|
||||
| `barrier` | - | `barrier` | Present in Bedrock Edition, but not as a particle |
|
||||
| `bubble` | `basic_bubble_manual` | - | Modified version of the basic_bubble_manual particle is used to spawn in all block types |
|
||||
@@ -129,7 +129,7 @@ The pack replaces many particles that are not displayed for various reasons. Som
|
||||
| `landing_lava` | - | `landing_lava` | Not present in Bedrock Edition |
|
||||
| `landing_obsidian_tear` | - | `landing_obsidian_tear` | Not present in Bedrock Edition |
|
||||
| `nautilus` | - | `nautilus` | Not present in Bedrock Edition |
|
||||
| `sneeze` | - | `sneeze` | Part of Bedrock Edition as a variant of redstone dust (local use only in optional pack) |
|
||||
| `sneeze` | - | `sneeze` | Part of Bedrock Edition as a variant of redstone dust (local use only in integrated pack) |
|
||||
| `sweep_attack` | - | `sweep_attack` | Not present in Bedrock Edition |
|
||||
| `underwater` | - | `underwater` | Not present in Bedrock Edition |
|
||||
| `warped_spore` | - | `warped_spore` | Not present in Bedrock Edition |
|
||||
@@ -137,7 +137,7 @@ The pack replaces many particles that are not displayed for various reasons. Som
|
||||
|
||||
#### Sweep attack
|
||||
|
||||
Of note, the texture for the sweep attack particle is built using the GeyserOptionalPackCompiler. This creates what is effectively a sprite sheet, and then the UV of the particle is animated from the particle definition. The UV animation in the particle definition is defined as follows:
|
||||
Of note, the texture for the sweep attack particle is built using the GeyserIntegratedPackCompiler. This creates what is effectively a sprite sheet, and then the UV of the particle is animated from the particle definition. The UV animation in the particle definition is defined as follows:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
@@ -153,7 +153,7 @@ Of note, the texture for the sweep attack particle is built using the GeyserOpti
|
||||
}
|
||||
```
|
||||
|
||||
The class for rendering the sweep attack texture can be found here: [SweepAttackRenderer.java](https://github.com/GeyserMC/GeyserOptionalPack/blob/master/src/main/java/org/geysermc/optionalpack/renderers/SweepAttackRenderer.java)
|
||||
The class for rendering the sweep attack texture can be found here: [SweepAttackRenderer.java](https://github.com/GeyserMC/GeyserIntegratedPack/blob/master/src/main/java/org/geysermc/integratedpack/renderers/SweepAttackRenderer.java)
|
||||
|
||||
### Phantoms
|
||||
|
||||
@@ -198,9 +198,9 @@ On Java Edition, you are able to toggle your cape and second skin layers. Bedroc
|
||||
math.mod(math.floor(q.mark_variant / 32), 2) != 1
|
||||
```
|
||||
|
||||
Do note that Geyser does invert the bits - that way, on other servers without the GeyserOptionalPack, `q.mark_variant` being 0 means that all parts should be shown. Java interprets 0 to mean all parts are invisible.
|
||||
Do note that Geyser does invert the bits - that way, on other servers without the GeyserIntegratedPack, `q.mark_variant` being 0 means that all parts should be shown. Java interprets 0 to mean all parts are invisible.
|
||||
|
||||
Also note that capes are technically possible to implement without the OptionalPack, but this requires re-sending the skin data to Bedrock Edition which would be costly on performance and network usage.
|
||||
Also note that capes are technically possible to implement without the IntegratedPack, but this requires re-sending the skin data to Bedrock Edition which would be costly on performance and network usage.
|
||||
|
||||
### Shulkers
|
||||
|
||||
@@ -354,7 +354,7 @@ Hiding the 2x2 crafting grid is a bit more involved. We have to use bindings to
|
||||
```
|
||||
|
||||
This uses the `#is_creative_mode` binding, and applies it to the crafting panel. Note that we insert this modification into the bindings array
|
||||
instead of directly modifying the UI - this allows the GeyserOptionalPack to stay compatible with other resource packs that modify this screen.
|
||||
instead of directly modifying the UI - this allows the GeyserIntegratedPack to stay compatible with other resource packs that modify this screen.
|
||||
|
||||
### Structure block texture changes (MCPE-48224)
|
||||
|
||||
@@ -397,7 +397,7 @@ Likely due to a copy and paste mistake as the bamboo and nether wood fence gates
|
||||
|
||||
This `toggle4` sound does not exist in Bedrock Editions's default resources, meaning that sometimes the Cherry Fence Gate can play no sound.
|
||||
|
||||
Both Java and Bedrock don't have this sound, so GeyserOptionalPack fixes this by redefining these sound events, and removing `toggle4` from the `sound_definitions.json` as seen below:
|
||||
Both Java and Bedrock don't have this sound, so GeyserIntegratedPack fixes this by redefining these sound events, and removing `toggle4` from the `sound_definitions.json` as seen below:
|
||||
|
||||
```json
|
||||
"close.cherry_wood_fence_gate": {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rootProject.name = "GeyserOptionalPackCompiler"
|
||||
rootProject.name = "GeyserIntegratedPackCompiler"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -20,40 +20,32 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import org.geysermc.optionalpack.renderers.Renderer;
|
||||
import org.geysermc.optionalpack.renderers.SweepAttackRenderer;
|
||||
import org.geysermc.integratedpack.renderers.Renderer;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.io.*;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.*;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
public class OptionalPack {
|
||||
public class IntegratedPack {
|
||||
public static final Path TEMP_PATH = Path.of("temp");
|
||||
public static final Path WORKING_PATH = TEMP_PATH.resolve("optionalpack");
|
||||
public static final Path WORKING_PATH = TEMP_PATH.resolve("integratedpack");
|
||||
|
||||
private static final Renderer[] RENDERERS;
|
||||
|
||||
static {
|
||||
Reflections reflections = new Reflections("org.geysermc.optionalpack.renderers");
|
||||
Reflections reflections = new Reflections("org.geysermc.integratedpack.renderers");
|
||||
Set<Class<? extends Renderer>> renderers = reflections.getSubTypesOf(Renderer.class);
|
||||
|
||||
RENDERERS = renderers.stream().map(rendererClass -> {
|
||||
@@ -68,13 +60,13 @@ public class OptionalPack {
|
||||
public static void main(String[] args) {
|
||||
Instant start = Instant.now();
|
||||
try {
|
||||
log("===GeyserOptionalPack Compiler===");
|
||||
log("===GeyserIntegratedPack Compiler===");
|
||||
|
||||
// Step 1: Extract the GeyserOptionalPack data to a working folder
|
||||
// Step 1: Extract the GeyserIntegratedPack data to a working folder
|
||||
|
||||
log("Extracting pre-made optional pack data to folder...");
|
||||
log("Extracting pre-made integrated pack data to folder...");
|
||||
// there are probably better ways to do this, but this is the way im doing it
|
||||
Resources.extractFolder("optionalpack", WORKING_PATH);
|
||||
Resources.extractFolder("integratedpack", WORKING_PATH);
|
||||
|
||||
// Step 2: Download the 1.21.8 client.jar and copy all files needed to working folder
|
||||
File jarFile = LauncherMetaWrapper.getLatest().toFile();
|
||||
@@ -95,8 +87,8 @@ public class OptionalPack {
|
||||
}
|
||||
|
||||
// Step 4: Compile pack folder into a mcpack.
|
||||
log("Zipping as GeyserOptionalPack.mcpack...");
|
||||
FileUtils.zipFolder(WORKING_PATH, Path.of("GeyserOptionalPack.mcpack"));
|
||||
log("Zipping as GeyserIntegratedPack.mcpack...");
|
||||
FileUtils.zipFolder(WORKING_PATH, Path.of("GeyserIntegratedPack.mcpack"));
|
||||
|
||||
// Step 5: Cleanup temporary folders and files
|
||||
log("Clearing temporary files...");
|
||||
@@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -56,15 +56,15 @@ public class JavaResources {
|
||||
String destinationPath = paths[1];
|
||||
InputStream asset = getAsStream(jarAssetPath);
|
||||
|
||||
OptionalPack.log("Copying " + jarAssetPath + " to " + destinationPath + "...");
|
||||
IntegratedPack.log("Copying " + jarAssetPath + " to " + destinationPath + "...");
|
||||
|
||||
String assetFileName = Path.of(jarAssetPath).toFile().getName();
|
||||
Path destination = OptionalPack.WORKING_PATH.resolve(destinationPath).resolve(assetFileName);
|
||||
Path destination = IntegratedPack.WORKING_PATH.resolve(destinationPath).resolve(assetFileName);
|
||||
|
||||
File destinationFolder = OptionalPack.WORKING_PATH.resolve(destinationPath).toFile();
|
||||
File destinationFolder = IntegratedPack.WORKING_PATH.resolve(destinationPath).toFile();
|
||||
if (!destinationFolder.exists()) {
|
||||
if (!destinationFolder.mkdirs()) {
|
||||
OptionalPack.log("Could not make directories for copying " + jarAssetPath + " to " + destinationPath + "!");
|
||||
IntegratedPack.log("Could not make directories for copying " + jarAssetPath + " to " + destinationPath + "!");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
@@ -8,11 +8,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class LauncherMetaWrapper {
|
||||
private static final Path CLIENT_JAR = OptionalPack.TEMP_PATH.resolve("client.jar");
|
||||
private static final Path CLIENT_JAR = IntegratedPack.TEMP_PATH.resolve("client.jar");
|
||||
private static final String LAUNCHER_META_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json";
|
||||
|
||||
public static Path getLatest() {
|
||||
OptionalPack.log("Downloading " + Constants.JAVA_TARGET_VERSION + " client.jar from Mojang...");
|
||||
IntegratedPack.log("Downloading " + Constants.JAVA_TARGET_VERSION + " client.jar from Mojang...");
|
||||
|
||||
VersionManifest versionManifest = Constants.GSON.fromJson(WebUtils.getAsString(LAUNCHER_META_URL), VersionManifest.class);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class LauncherMetaWrapper {
|
||||
throw new RuntimeException("Could not download client jar", e);
|
||||
}
|
||||
} else {
|
||||
OptionalPack.log("Client jar already exists and is up to date.");
|
||||
IntegratedPack.log("Client jar already exists and is up to date.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
package org.geysermc.integratedpack;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -43,7 +43,7 @@ public class WebUtils {
|
||||
URLConnection cn = url.openConnection();
|
||||
cn.setConnectTimeout(5000);
|
||||
// TODO: proper versioning here
|
||||
cn.setRequestProperty("User-Agent", "GeyserMC/GeyserOptionalPackCompiler/1.0.0");
|
||||
cn.setRequestProperty("User-Agent", "GeyserMC/GeyserIntegratedPackCompiler/1.0.0");
|
||||
cn.connect();
|
||||
return cn.getInputStream();
|
||||
} catch (IOException e) {
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
package org.geysermc.integratedpack.renderers;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import org.geysermc.optionalpack.BedrockResourcesWrapper;
|
||||
import org.geysermc.optionalpack.Constants;
|
||||
import org.geysermc.optionalpack.FileUtils;
|
||||
import org.geysermc.optionalpack.OptionalPack;
|
||||
import org.geysermc.optionalpack.Resources;
|
||||
import org.geysermc.integratedpack.BedrockResourcesWrapper;
|
||||
import org.geysermc.integratedpack.Constants;
|
||||
import org.geysermc.integratedpack.FileUtils;
|
||||
import org.geysermc.integratedpack.IntegratedPack;
|
||||
import org.geysermc.integratedpack.Resources;
|
||||
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
@@ -16,7 +16,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class JsonPatchRenderer implements Renderer {
|
||||
private static final Path PATCHES_PATH = OptionalPack.TEMP_PATH.resolve("patches");
|
||||
private static final Path PATCHES_PATH = IntegratedPack.TEMP_PATH.resolve("patches");
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
@@ -55,7 +55,7 @@ public class JsonPatchRenderer implements Renderer {
|
||||
|
||||
JsonObject merged = mergeJsonObjects(sourceJson, patchJson);
|
||||
|
||||
try (FileWriter writer = new FileWriter(OptionalPack.WORKING_PATH.resolve(realPath).toFile())) {
|
||||
try (FileWriter writer = new FileWriter(IntegratedPack.WORKING_PATH.resolve(realPath).toFile())) {
|
||||
writer.write(Constants.GSON.toJson(merged));
|
||||
}
|
||||
}
|
||||
@@ -20,14 +20,13 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
package org.geysermc.integratedpack.renderers;
|
||||
|
||||
import org.geysermc.optionalpack.OptionalPack;
|
||||
import org.geysermc.integratedpack.IntegratedPack;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -55,7 +54,7 @@ public interface Renderer {
|
||||
*/
|
||||
default Path getDestinationPath() {
|
||||
String destination = getDestination();
|
||||
return OptionalPack.WORKING_PATH.resolve(destination);
|
||||
return IntegratedPack.WORKING_PATH.resolve(destination);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,6 +65,6 @@ public interface Renderer {
|
||||
void render() throws IOException;
|
||||
|
||||
default void log(String message) {
|
||||
OptionalPack.log(message);
|
||||
IntegratedPack.log(message);
|
||||
}
|
||||
}
|
||||
@@ -20,15 +20,15 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
package org.geysermc.integratedpack.renderers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Output of this renderer is used by optionalpack/particles/sweep_attack.particle.json
|
||||
* Output of this renderer is used by integratedpack/particles/sweep_attack.particle.json
|
||||
*/
|
||||
public class SweepAttackRenderer extends VerticalSpriteSheetRenderer {
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
* @link https://github.com/GeyserMC/GeyserIntegratedPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
package org.geysermc.integratedpack.renderers;
|
||||
|
||||
import org.geysermc.optionalpack.JavaResources;
|
||||
import org.geysermc.integratedpack.JavaResources;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
18
src/main/resources/integratedpack/manifest.json
Normal file
18
src/main/resources/integratedpack/manifest.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"format_version": 2,
|
||||
"header": {
|
||||
"description": "Bedrock resource pack to extend Geyser functionality",
|
||||
"name": "GeyserIntegratedPack",
|
||||
"uuid": "2254393d-8430-45b0-838a-bd397828c765",
|
||||
"version": [1, 0, 0],
|
||||
"min_engine_version": [ 1, 16, 0 ]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"description": "GeyserIntegratedPack",
|
||||
"type": "resources",
|
||||
"uuid": "4d60881b-e4ed-466f-925c-8abc873151ba",
|
||||
"version": [1, 0, 0]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"resource_pack_name": "geyseroptionalpack",
|
||||
"resource_pack_name": "geyserintegratedpack",
|
||||
"texture_name": "atlas.terrain",
|
||||
"texture_data": {
|
||||
"structure_block": {
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"format_version": 2,
|
||||
"header": {
|
||||
"description": "Optional Bedrock resource pack to extend Geyser functionality",
|
||||
"name": "GeyserOptionalPack",
|
||||
"uuid": "e5f5c938-a701-11eb-b2a3-047d7bb283ba",
|
||||
"version": [1, 0, 14],
|
||||
"min_engine_version": [ 1, 16, 0 ]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"description": "GeyserOptionalPack",
|
||||
"type": "resources",
|
||||
"uuid": "eebb4ea8-a701-11eb-95ba-047d7bb283ba",
|
||||
"version": [1, 0, 14]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user