mirror of
https://github.com/GeyserMC/GeyserOptionalPack.git
synced 2025-12-19 14:59:14 +00:00
Java compiler for GeyserOptionalPack (#65)
* inital commit * i think pr is ready now * wait now its ready * Update copyright year * add license to each file * Update pack version * copy license / mojang disclaimer to pack * Update mojang.md * test actions * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update .gitignore * clean up some code * change "extracting" to copying * Update build.yml * Add new compilation instructions * update developer documentation for new compiler * make some code more readable * some more code cleanup * Code cleanup and tweaks * Move to gradle action for running * Cleanup run folder * Update build action to use run folder * Lets not bother with the run folder * Download the specified version from mojang * Remove old run folder --------- Co-authored-by: rtm516 <ryantmilner@hotmail.co.uk>
This commit is contained in:
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@@ -13,32 +13,27 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
# See https://github.com/actions/checkout/commits
|
||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
||||
- name: Setup Gradle
|
||||
uses: GeyserMC/actions/setup-gradle-composite@master
|
||||
with:
|
||||
setup-java_java-version: 21
|
||||
|
||||
- name: Install ImageMagick
|
||||
run: sudo apt install -y imagemagick
|
||||
|
||||
- name: Prepare pack
|
||||
run: bash prepare_pack.sh
|
||||
|
||||
- name: Zip pack
|
||||
run: zip GeyserOptionalPack.mcpack -r . -x ".*" required_files.txt prepare_pack.sh
|
||||
|
||||
- name: Archive artifacts
|
||||
- name: Build and run with Gradle
|
||||
run: ./gradlew run
|
||||
|
||||
- name: Archive resource pack artifact
|
||||
# See https://github.com/actions/upload-artifact/commits
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||
if: success()
|
||||
with:
|
||||
name: GeyserOptionalPack
|
||||
path: GeyserOptionalPack.mcpack
|
||||
|
||||
|
||||
- name: Get Version
|
||||
if: ${{ success() && github.repository == 'GeyserMC/GeyserOptionalPack' && github.ref_name == 'master' }}
|
||||
id: get-version
|
||||
run: |
|
||||
version=$(cat manifest.json | jq -r '.header.version | join(".")')
|
||||
version=$(cat src/main/resources/optionalpack/manifest.json | jq -r '.header.version | join(".")')
|
||||
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Release Metadata
|
||||
|
||||
274
.gitignore
vendored
274
.gitignore
vendored
@@ -1,16 +1,262 @@
|
||||
.idea/
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/git,java,gradle,eclipse,netbeans,jetbrains+all,visualstudiocode
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=git,java,gradle,eclipse,netbeans,jetbrains+all,visualstudiocode
|
||||
|
||||
### Eclipse ###
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
### Eclipse Patch ###
|
||||
# Spring Boot Tooling
|
||||
.sts4-cache/
|
||||
|
||||
### Git ###
|
||||
# Created by git for backups. To disable backups in Git:
|
||||
# $ git config --global mergetool.keepBackup false
|
||||
*.orig
|
||||
|
||||
# Created by git when using merge tools for conflicts
|
||||
*.BACKUP.*
|
||||
*.BASE.*
|
||||
*.LOCAL.*
|
||||
*.REMOTE.*
|
||||
*_BACKUP_*.txt
|
||||
*_BASE_*.txt
|
||||
*_LOCAL_*.txt
|
||||
*_REMOTE_*.txt
|
||||
|
||||
### Java ###
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
### JetBrains+all ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### JetBrains+all Patch ###
|
||||
# Ignore everything but code style settings and run configurations
|
||||
# that are supposed to be shared within teams.
|
||||
|
||||
.idea/*
|
||||
|
||||
!.idea/codeStyles
|
||||
!.idea/runConfigurations
|
||||
|
||||
### NetBeans ###
|
||||
**/nbproject/private/
|
||||
**/nbproject/Makefile-*.mk
|
||||
**/nbproject/Package-*.bash
|
||||
build/
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
.ionide
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
**/build/
|
||||
!src/**/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Avoid ignore Gradle wrappper properties
|
||||
!gradle-wrapper.properties
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# Eclipse Gradle plugin generated files
|
||||
# Eclipse Core
|
||||
.project
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
### Gradle Patch ###
|
||||
# Java heap dump
|
||||
*.hprof
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/git,java,gradle,eclipse,netbeans,jetbrains+all,visualstudiocode
|
||||
|
||||
# Output pack files
|
||||
GeyserOptionalPack.mcpack
|
||||
GeyserOptionalPack.zip
|
||||
# Java Edition textures that should not be submitted to Git
|
||||
textures/geyser/entity/iron_golem/iron_golem_crackiness_high.png
|
||||
textures/geyser/entity/iron_golem/iron_golem_crackiness_low.png
|
||||
textures/geyser/entity/iron_golem/iron_golem_crackiness_medium.png
|
||||
textures/geyser/entity/arrow/spectral_arrow.png
|
||||
textures/geyser/entity/rabbit/caerbannog.png
|
||||
textures/geyser/particle/damage.png
|
||||
textures/geyser/particle/flash.png
|
||||
textures/geyser/particle/nautilus.png
|
||||
textures/geyser/particle/sweep_attack.png
|
||||
textures/geyser/entity/illager/illusioner.png
|
||||
# Blockception's Minecraft Bedrock Development VS Code Extension settings
|
||||
.mcattributes
|
||||
|
||||
# Development folders
|
||||
temp/
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 GeyserMC
|
||||
Copyright (c) 2025 GeyserMC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -19,11 +19,13 @@ Download: [GeyserOptionalPack.mcpack](https://download.geysermc.org/v2/projects/
|
||||
- 2x2 crafting grid while in creative mode
|
||||
- Tick-delay and rename fields in the command block menu
|
||||
- Structure block options that do not exist on Java
|
||||
- Removes the (sub)title background for attack cooldowns
|
||||
|
||||
### Manually building
|
||||
### Manually compiling the pack
|
||||
|
||||
Run `./prepare_pack.sh` in this directory and the necessary files from the vanilla jar will be copied to the required directories. Zip up and you're set. Optionally, you may compress the output JSON files by running `./prepare_pack.sh -jc`. This should not be done when planning to contribute. You may then package with `zip GeyserOptionalPack.mcpack -r . -x ".*" Jenkinsfile required_files.txt prepare_pack.sh`.
|
||||
1. Clone the repo to your computer
|
||||
2. Run `gradlew build`.
|
||||
3. Run the pack compiler using `java -jar build/libs/GeyserOptionalPackCompiler.jar`
|
||||
4. When it finishes compiling, it will output the `GeyserOptionalPack.mcpack`.
|
||||
|
||||
### Legal
|
||||
|
||||
|
||||
26
build.gradle
Normal file
26
build.gradle
Normal file
@@ -0,0 +1,26 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
}
|
||||
|
||||
group = 'org.geysermc.optionalpack'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.13.1'
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName = 'GeyserOptionalPackCompiler.jar'
|
||||
manifest {
|
||||
attributes 'Main-Class': application.mainClass
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = 'org.geysermc.optionalpack.OptionalPack'
|
||||
}
|
||||
@@ -22,7 +22,9 @@
|
||||
|
||||
### Introduction
|
||||
|
||||
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 have a query for an entity's health, for example (a number query or an entity data), and you have a query for is 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. We use this to our advantage in this resource pack.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
### Armor stands
|
||||
|
||||
@@ -98,7 +100,7 @@ The killer bunny does not exist in Bedrock Edition. Nonetheless, this is primari
|
||||
]
|
||||
```
|
||||
|
||||
The texture required for this to be displayed can be retrieved during the build process.
|
||||
The texture required for this to be displayed can be retrieved during the compilation process.
|
||||
|
||||
### Offhand Animation
|
||||
|
||||
@@ -130,7 +132,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 on the CI using [Imagemagick](https://imagemagick.org/script/index.php). 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 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:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
@@ -146,13 +148,7 @@ Of note, the texture for the sweep attack particle is built on the CI using [Ima
|
||||
}
|
||||
```
|
||||
|
||||
The Imagemagick command used to create the sprite on the CI is `convert`, which is the subset of Imagemagick that deals with image manipulation. The command is as follows:
|
||||
|
||||
```sh
|
||||
convert -append extracted/assets/minecraft/textures/particle/sweep_*.png -define png:format=png8 textures/particle/sweep_attack.png
|
||||
```
|
||||
|
||||
The `-append` flag is used to join the input images which match the defined globular expression (`.../sweep_*.png`). The image format is defined for safety as by default Imagemagick will attempt to change the color mode of the image to grayscale, which Minecraft will not interpret correctly. The image is then placed in the pack at the defined path.
|
||||
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)
|
||||
|
||||
### Phantoms
|
||||
|
||||
@@ -241,7 +237,7 @@ The glowing effect and the spectral arrow item and entities do not exist on Bedr
|
||||
]
|
||||
```
|
||||
|
||||
The texture required for this to be displayed can be retrieved during the build process.
|
||||
The texture required for this to be displayed can be retrieved during the compilation process.
|
||||
|
||||
### Spyglass animations
|
||||
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Fri Jul 04 16:42:23 AWST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
234
gradlew
vendored
Normal file
234
gradlew
vendored
Normal file
@@ -0,0 +1,234 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
89
gradlew.bat
vendored
Normal file
89
gradlew.bat
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,33 +0,0 @@
|
||||
# Download the client jar from mojang to extract assets
|
||||
wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar
|
||||
unzip client.jar -d extracted/
|
||||
|
||||
# Set input field seperator to space for our while loop
|
||||
IFS=' '
|
||||
|
||||
# Copy textures defined in required_files.txt over to the pack
|
||||
while read -r p || [ -n "$p" ]; do
|
||||
read -rafilesToCopy<<< "$p"
|
||||
echo "extracted/${filesToCopy[0]} ${filesToCopy[1]}"
|
||||
mkdir -p "${filesToCopy[1]}"
|
||||
cp "extracted/${filesToCopy[0]}" "${filesToCopy[1]}"
|
||||
done <required_files.txt
|
||||
|
||||
# Create required sprites with Imagemagick
|
||||
convert -append extracted/assets/minecraft/textures/particle/sweep_*.png -define png:format=png8 textures/geyser/particle/sweep_attack.png
|
||||
|
||||
rm client.jar
|
||||
rm -r extracted
|
||||
|
||||
# Set our input field seperator back to new line
|
||||
IFS=$'\n'
|
||||
|
||||
# One-line our JSON files if the script is called with -jc (./prepare_pack.sh -jc)
|
||||
if [[ ${1} == "-jc" ]]
|
||||
then
|
||||
for i in $(find . -type f -name "*.json")
|
||||
do
|
||||
# Note that we must use a temp file, as awk does not support in-place editting
|
||||
awk -v ORS= 'BEGIN {FS = OFS = "\""}/^[[:blank:]]*$/ {next}{for (i=1; i<=NF; i+=2) gsub(/[[:space:]]/,"",$i);sub("\r$", "")} 1' ${i} > tmp && mv tmp ${i}
|
||||
done
|
||||
fi
|
||||
2
settings.gradle
Normal file
2
settings.gradle
Normal file
@@ -0,0 +1,2 @@
|
||||
rootProject.name = 'GeyserOptionalPackCompiler'
|
||||
|
||||
95
src/main/java/org/geysermc/optionalpack/HTTP.java
Normal file
95
src/main/java/org/geysermc/optionalpack/HTTP.java
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class HTTP {
|
||||
|
||||
/**
|
||||
* Requests a URL and returns the InputStream.
|
||||
*
|
||||
* @param url The URL to request.
|
||||
* @return The InputStream of the requested URL.
|
||||
*/
|
||||
public static InputStream request(URL url) {
|
||||
try {
|
||||
URLConnection cn = url.openConnection();
|
||||
cn.setConnectTimeout(5000);
|
||||
// TODO: proper versioning here
|
||||
cn.setRequestProperty("User-Agent", "GeyserMC/GeyserOptionalPackCompiler/1.0.0");
|
||||
cn.connect();
|
||||
return cn.getInputStream();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests a URL and returns the InputStream.
|
||||
*
|
||||
* @param url The URL to request.
|
||||
* @return The InputStream of the requested URL.
|
||||
*/
|
||||
public static InputStream request(String url) {
|
||||
try {
|
||||
return request(URI.create(url).toURL());
|
||||
} catch (MalformedURLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests a URL and returns the data as a String.
|
||||
*
|
||||
* @param url The URL to request.
|
||||
* @return The data of the requested URL as a String.
|
||||
*/
|
||||
public static String getAsString(URL url) {
|
||||
try (InputStream request = request(url)) {
|
||||
return new String(request.readAllBytes(), StandardCharsets.UTF_8);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests a URL and returns the data as a String.
|
||||
*
|
||||
* @param url The URL to request.
|
||||
* @return The data of the requested URL as a String.
|
||||
*/
|
||||
public static String getAsString(String url) {
|
||||
try {
|
||||
return getAsString(URI.create(url).toURL());
|
||||
} catch (MalformedURLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
126
src/main/java/org/geysermc/optionalpack/JavaResources.java
Normal file
126
src/main/java/org/geysermc/optionalpack/JavaResources.java
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
public class JavaResources {
|
||||
private static ZipFile CLIENT_JAR;
|
||||
|
||||
/**
|
||||
* This function copies the files from the jar to the pack and initializes the class for getting resources when needed in renderers.
|
||||
*
|
||||
* @param clientJar The java client jar
|
||||
*/
|
||||
public static void extract(ZipFile clientJar) {
|
||||
CLIENT_JAR = clientJar;
|
||||
|
||||
try {
|
||||
// Get the files we need to copy from the jar to the pack.
|
||||
String str = Resources.getAsText("required_files.txt");
|
||||
for (String line : str.lines().toList()) {
|
||||
String[] paths = line.split(" ");
|
||||
String jarAssetPath = paths[0];
|
||||
String destinationPath = paths[1];
|
||||
InputStream asset = getAsStream(jarAssetPath);
|
||||
|
||||
OptionalPack.log("Copying " + jarAssetPath + " to " + destinationPath + "...");
|
||||
|
||||
String assetFileName = Path.of(jarAssetPath).toFile().getName();
|
||||
Path destination = OptionalPack.WORKING_PATH.resolve(destinationPath).resolve(assetFileName);
|
||||
|
||||
if (destination.toFile().mkdirs()) {
|
||||
Files.copy(asset, destination, StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
else {
|
||||
OptionalPack.log("Could not make directories for copying " + jarAssetPath + " to " + destinationPath + "!");
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as an InputStream.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the Minecraft JAR file.
|
||||
* @return The resource as a BufferedImage.
|
||||
*/
|
||||
public static InputStream getAsStream(String resourcePath) {
|
||||
try {
|
||||
return CLIENT_JAR.getInputStream(CLIENT_JAR.getEntry(resourcePath));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a String using the default charset (UTF-8).
|
||||
*
|
||||
* @param resourcePath The path to the resource in the Minecraft JAR file.
|
||||
* @return The resource as a String.
|
||||
*/
|
||||
public static String getAsText(String resourcePath) throws IOException {
|
||||
return getAsText(resourcePath, Charset.defaultCharset());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a String.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the Minecraft JAR file.
|
||||
* @param charset The charset to use for decoding the resource.
|
||||
* @return The resource as a String.
|
||||
*/
|
||||
public static String getAsText(String resourcePath, Charset charset) throws IOException {
|
||||
InputStream is = getAsStream(resourcePath);
|
||||
String text = new String(is.readAllBytes(), charset);
|
||||
is.close();
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a BufferedImage.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the Minecraft JAR file.
|
||||
* @return The resource as a BufferedImage.
|
||||
*/
|
||||
public static BufferedImage getAsImage(String resourcePath) throws IOException {
|
||||
InputStream is = getAsStream(resourcePath);
|
||||
BufferedImage image = ImageIO.read(is);
|
||||
is.close();
|
||||
return image;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package org.geysermc.optionalpack;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class LauncherMetaWrapper {
|
||||
private static final String TARGET_VERSION = "1.21.8";
|
||||
|
||||
private static final Path CLIENT_JAR = OptionalPack.TEMP_PATH.resolve("client.jar");
|
||||
private static final String LAUNCHER_META_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json";
|
||||
private static final Gson GSON = new Gson();
|
||||
|
||||
public static Path getLatest() {
|
||||
OptionalPack.log("Downloading " + TARGET_VERSION + " client.jar from Mojang...");
|
||||
|
||||
VersionManifest versionManifest = GSON.fromJson(HTTP.getAsString(LAUNCHER_META_URL), VersionManifest.class);
|
||||
|
||||
for (Version version : versionManifest.versions()) {
|
||||
if (version.id().equals(TARGET_VERSION)) {
|
||||
VersionInfo versionInfo = GSON.fromJson(HTTP.getAsString(version.url()), VersionInfo.class);
|
||||
VersionDownload client = versionInfo.downloads().get("client");
|
||||
if (!Files.exists(CLIENT_JAR) || !client.sha1.equals(getSha1(CLIENT_JAR))) {
|
||||
// Download the client jar
|
||||
try (InputStream in = HTTP.request(client.url())) {
|
||||
Files.copy(in, CLIENT_JAR);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Could not download client jar", e);
|
||||
}
|
||||
} else {
|
||||
OptionalPack.log("Client jar already exists and is up to date.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return CLIENT_JAR;
|
||||
}
|
||||
|
||||
private static String getSha1(Path path) {
|
||||
try {
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-1");
|
||||
try (InputStream fis = Files.newInputStream(path)) {
|
||||
byte[] buffer = new byte[8192];
|
||||
int read;
|
||||
while ((read = fis.read(buffer)) > 0) {
|
||||
digest.update(buffer, 0, read);
|
||||
}
|
||||
}
|
||||
byte[] sha1sum = digest.digest();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (byte b : sha1sum) {
|
||||
sb.append(String.format("%02x", b));
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Could not compute SHA-1 hash", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public record VersionManifest(
|
||||
LatestVersion latest,
|
||||
List<Version> versions
|
||||
) {}
|
||||
|
||||
public record LatestVersion(
|
||||
String release,
|
||||
String snapshot
|
||||
) {}
|
||||
|
||||
public record Version(
|
||||
String id,
|
||||
String type,
|
||||
String url,
|
||||
String time,
|
||||
String releaseTime
|
||||
) {}
|
||||
|
||||
public record VersionInfo(
|
||||
String id,
|
||||
String type,
|
||||
String time,
|
||||
String releaseTime,
|
||||
Map<String, VersionDownload> downloads
|
||||
) {}
|
||||
|
||||
public record VersionDownload(
|
||||
String sha1,
|
||||
int size,
|
||||
String url
|
||||
) {}
|
||||
}
|
||||
211
src/main/java/org/geysermc/optionalpack/OptionalPack.java
Normal file
211
src/main/java/org/geysermc/optionalpack/OptionalPack.java
Normal file
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
|
||||
import org.geysermc.optionalpack.renderers.Renderer;
|
||||
import org.geysermc.optionalpack.renderers.SweepAttackRenderer;
|
||||
|
||||
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.text.DecimalFormat;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
public class OptionalPack {
|
||||
public static final Path TEMP_PATH = Path.of("temp");
|
||||
public static final Path WORKING_PATH = TEMP_PATH.resolve("optionalpack");
|
||||
|
||||
/*
|
||||
List of renderers that will be used to convert sprites for the resource pack.
|
||||
They are executed in order from start to end.
|
||||
*/
|
||||
private static List<Renderer> renderers = List.of(
|
||||
new SweepAttackRenderer()
|
||||
);
|
||||
|
||||
public static void main(String[] args) {
|
||||
Instant start = Instant.now();
|
||||
try {
|
||||
log("===GeyserOptionalPack Compiler===");
|
||||
|
||||
// Step 1: Extract the GeyserOptionalPack data to a working folder
|
||||
|
||||
log("Extracting pre-made optional pack data to folder...");
|
||||
// there are probably better ways to do this, but this is the way im doing it
|
||||
unzipPack(Resources.get("optionalpack"), WORKING_PATH);
|
||||
|
||||
// Step 2: Download the 1.21.8 client.jar and copy all files needed to working folder
|
||||
File jarFile = LauncherMetaWrapper.getLatest().toFile();
|
||||
|
||||
ZipFile clientJar = new ZipFile(jarFile);
|
||||
JavaResources.extract(clientJar);
|
||||
|
||||
/* Step 3: Rendering sprites in a format that we use in the resource pack */
|
||||
for (Renderer renderer : renderers) {
|
||||
log("Rendering " + renderer.getName() + "...");
|
||||
File imageFile = WORKING_PATH.resolve(renderer.getDestination()).toFile();
|
||||
if (imageFile.mkdirs()) {
|
||||
ImageIO.write(renderer.render(), "PNG", imageFile);
|
||||
}
|
||||
}
|
||||
|
||||
// Step 4: Compile pack folder into a mcpack.
|
||||
log("Zipping as GeyserOptionalPack.mcpack...");
|
||||
zipFolder(WORKING_PATH, Path.of("GeyserOptionalPack.mcpack"));
|
||||
|
||||
// Step 5: Cleanup temporary folders and files
|
||||
log("Clearing temporary files...");
|
||||
clientJar.close();
|
||||
deleteDirectory(WORKING_PATH.toFile());
|
||||
|
||||
// Step 6: Finish!!
|
||||
DecimalFormat r3 = new DecimalFormat("0.000");
|
||||
Instant finish = Instant.now();
|
||||
|
||||
log("===Done! (" + r3.format(Duration.between(start, finish).toMillis() / 1000.0d) + "s)===");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a directory and all files within it
|
||||
* From: https://www.geeksforgeeks.org/java/java-program-to-delete-a-directory/
|
||||
*
|
||||
* @param directory The directory to remove
|
||||
*/
|
||||
public static void deleteDirectory(File directory) {
|
||||
File[] files = directory.listFiles();
|
||||
if (files != null) {
|
||||
for (File subfile : directory.listFiles()) {
|
||||
if (subfile.isDirectory()) {
|
||||
deleteDirectory(subfile);
|
||||
}
|
||||
subfile.delete();
|
||||
}
|
||||
}
|
||||
|
||||
directory.delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Zip a folder
|
||||
* From: https://stackoverflow.com/a/57997601
|
||||
*
|
||||
* @param sourceFolderPath Folder to zip
|
||||
* @param zipPath Output path for the zip
|
||||
*/
|
||||
private static void zipFolder(Path sourceFolderPath, Path zipPath) throws Exception {
|
||||
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipPath.toFile()));
|
||||
Files.walkFileTree(sourceFolderPath, new SimpleFileVisitor<>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||
zos.putNextEntry(new ZipEntry(sourceFolderPath.relativize(file).toString()));
|
||||
Files.copy(file, zos);
|
||||
zos.closeEntry();
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
zos.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract a zip to a given directory
|
||||
*
|
||||
* @param file The zip to extract
|
||||
* @param destDir THe destination to put all the files
|
||||
*/
|
||||
private static void unzipPack(URL file, Path destDir) {
|
||||
File dir = destDir.toFile();
|
||||
// create output directory if it doesn't exist
|
||||
if (!dir.exists()) dir.mkdirs();
|
||||
|
||||
try {
|
||||
if (file.getProtocol().equals("file")) {
|
||||
Path resourceDir = Paths.get(file.toURI());
|
||||
Files.walk(resourceDir)
|
||||
.filter(Files::isRegularFile)
|
||||
.forEach(source -> {
|
||||
try {
|
||||
Path relative = resourceDir.relativize(source);
|
||||
Path target = destDir.resolve(relative);
|
||||
Files.createDirectories(target.getParent());
|
||||
Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
byte[] buffer = new byte[1024];
|
||||
FileInputStream fileStream = new FileInputStream(new File(file.toURI()));
|
||||
ZipInputStream zipStream = new ZipInputStream(fileStream);
|
||||
ZipEntry entry = zipStream.getNextEntry();
|
||||
while (entry != null) {
|
||||
if (!entry.isDirectory()) {
|
||||
String fileName = entry.getName();
|
||||
File newFile = new File(destDir + File.separator + fileName);
|
||||
// create directories for subdirectories in zip
|
||||
new File(newFile.getParent()).mkdirs();
|
||||
FileOutputStream extractedFile = new FileOutputStream(newFile);
|
||||
int len;
|
||||
while ((len = zipStream.read(buffer)) > 0) {
|
||||
extractedFile.write(buffer, 0, len);
|
||||
}
|
||||
extractedFile.close();
|
||||
}
|
||||
// close this ZipEntry
|
||||
|
||||
zipStream.closeEntry();
|
||||
entry = zipStream.getNextEntry();
|
||||
}
|
||||
// close the last ZipEntry
|
||||
zipStream.closeEntry();
|
||||
zipStream.close();
|
||||
fileStream.close();
|
||||
}
|
||||
} catch (IOException | URISyntaxException e) {
|
||||
throw new RuntimeException("Unable to unzip pack!", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a message to the console.
|
||||
*
|
||||
* @param message The message to log.
|
||||
*/
|
||||
public static void log(String message) {
|
||||
System.out.println(message);
|
||||
}
|
||||
}
|
||||
92
src/main/java/org/geysermc/optionalpack/Resources.java
Normal file
92
src/main/java/org/geysermc/optionalpack/Resources.java
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public class Resources {
|
||||
/**
|
||||
* Returns a resource as an InputStream.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the JAR file.
|
||||
* @return The resource as a BufferedImage.
|
||||
*/
|
||||
public static InputStream getAsStream(String resourcePath) {
|
||||
return Resources.class.getClassLoader().getResourceAsStream(resourcePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a URL.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the JAR file.
|
||||
* @return The resource as a URL.
|
||||
*/
|
||||
public static URL get(String resourcePath) {
|
||||
return Resources.class.getClassLoader().getResource(resourcePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a String using the default charset (UTF-8).
|
||||
*
|
||||
* @param resourcePath The path to the resource in the JAR file.
|
||||
* @return The resource as a String.
|
||||
*/
|
||||
public static String getAsText(String resourcePath) throws IOException {
|
||||
return getAsText(resourcePath, Charset.defaultCharset());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a String.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the JAR file.
|
||||
* @param charset The charset to use for decoding the resource.
|
||||
* @return The resource as a String.
|
||||
*/
|
||||
public static String getAsText(String resourcePath, Charset charset) throws IOException {
|
||||
InputStream is = getAsStream(resourcePath);
|
||||
String text = new String(is.readAllBytes(), charset);
|
||||
is.close();
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a resource as a BufferedImage.
|
||||
*
|
||||
* @param resourcePath The path to the resource in the JAR file.
|
||||
* @return The resource as a BufferedImage.
|
||||
*/
|
||||
public static BufferedImage getAsImage(String resourcePath) throws IOException {
|
||||
InputStream is = getAsStream(resourcePath);
|
||||
BufferedImage image = ImageIO.read(is);
|
||||
is.close();
|
||||
return image;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface Renderer {
|
||||
/**
|
||||
* Gets the name of the renderer for logging in the console.
|
||||
*
|
||||
* @return The name of the renderer.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gets the destination path for the rendered output.
|
||||
*
|
||||
* @return The destination path as a String.
|
||||
*/
|
||||
default String getDestination() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the image as a BufferedImage.
|
||||
*
|
||||
* @return The rendered output as a BufferedImage.
|
||||
* @throws IOException If an error occurs during rendering.
|
||||
*/
|
||||
BufferedImage render() throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Output of this renderer is used by optionalpack/particles/sweep_attack.particle.json
|
||||
*/
|
||||
public class SweepAttackRenderer extends VerticalSpriteSheetRenderer {
|
||||
|
||||
public SweepAttackRenderer() {
|
||||
super("Sweep Attack", "textures/geyser/particle/sweep_attack.png", List.of(
|
||||
"assets/minecraft/textures/particle/sweep_0.png",
|
||||
"assets/minecraft/textures/particle/sweep_1.png",
|
||||
"assets/minecraft/textures/particle/sweep_2.png",
|
||||
"assets/minecraft/textures/particle/sweep_3.png",
|
||||
"assets/minecraft/textures/particle/sweep_4.png",
|
||||
"assets/minecraft/textures/particle/sweep_5.png",
|
||||
"assets/minecraft/textures/particle/sweep_6.png",
|
||||
"assets/minecraft/textures/particle/sweep_7.png"
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/GeyserOptionalPack
|
||||
*/
|
||||
|
||||
package org.geysermc.optionalpack.renderers;
|
||||
|
||||
import org.geysermc.optionalpack.JavaResources;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Renderer for creating a vertical sprite sheet from a list of Java sprite paths.
|
||||
* The sprites are stacked vertically in the output image.
|
||||
*/
|
||||
public class VerticalSpriteSheetRenderer implements Renderer {
|
||||
private final String name;
|
||||
private final String destination;
|
||||
private final List<String> spritePaths;
|
||||
|
||||
public VerticalSpriteSheetRenderer(String name, String destination, List<String> spritePaths) {
|
||||
this.name = name;
|
||||
this.destination = destination;
|
||||
this.spritePaths = spritePaths;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDestination() {
|
||||
return destination;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage render() throws IOException {
|
||||
List<BufferedImage> sprites = new ArrayList<>();
|
||||
for (String path : spritePaths) {
|
||||
// Retrieve the image from the client jar
|
||||
BufferedImage is = JavaResources.getAsImage(path);
|
||||
sprites.add(is);
|
||||
}
|
||||
|
||||
BufferedImage firstSprite = sprites.getFirst();
|
||||
BufferedImage canvas = new BufferedImage(firstSprite.getWidth(), firstSprite.getHeight() * sprites.size(), BufferedImage.TYPE_INT_ARGB);
|
||||
for (int i = 0; i < sprites.size(); i++) {
|
||||
BufferedImage sprite = sprites.get(i);
|
||||
canvas.getGraphics().drawImage(sprite, 0, i * sprite.getHeight(), null);
|
||||
}
|
||||
return canvas;
|
||||
}
|
||||
}
|
||||
21
src/main/resources/optionalpack/LICENSE
Normal file
21
src/main/resources/optionalpack/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 GeyserMC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"format_version" : "1.10.0",
|
||||
"animation_controllers" : {
|
||||
"controller.animation.panda.sneezing" : {
|
||||
"initial_state" : "baby",
|
||||
"states" : {
|
||||
"baby" : {
|
||||
"animations" : [
|
||||
{
|
||||
"sneezing": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version" : "1.10.0",
|
||||
"animation_controllers" : {
|
||||
"controller.animation.panda.sneezing" : {
|
||||
"initial_state" : "baby",
|
||||
"states" : {
|
||||
"baby" : {
|
||||
"animations" : [
|
||||
{
|
||||
"sneezing": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
0
animations/panda.animation.json → src/main/resources/optionalpack/animations/panda.animation.json
Executable file → Normal file
0
animations/panda.animation.json → src/main/resources/optionalpack/animations/panda.animation.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:chainmail_chestplate.armor_stand",
|
||||
"item": { "minecraft:chainmail_chestplate": "query.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/chain_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "variable.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:chainmail_chestplate.armor_stand",
|
||||
"item": { "minecraft:chainmail_chestplate": "query.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/chain_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "variable.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/chainmail_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/chainmail_leggings.armor_stand.json
Executable file → Normal file
48
attachables/chainmail_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/chainmail_leggings.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:chainmail_leggings.armor_stand",
|
||||
"item": { "minecraft:chainmail_leggings": "query.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/chain_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "variable.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:chainmail_leggings.armor_stand",
|
||||
"item": { "minecraft:chainmail_leggings": "query.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/chain_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "variable.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/diamond_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/diamond_chestplate.armor_stand.json
Executable file → Normal file
48
attachables/diamond_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/diamond_chestplate.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:diamond_chestplate.armor_stand",
|
||||
"item": { "minecraft:diamond_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/diamond_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:diamond_chestplate.armor_stand",
|
||||
"item": { "minecraft:diamond_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/diamond_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/diamond_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/diamond_leggings.armor_stand.json
Executable file → Normal file
48
attachables/diamond_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/diamond_leggings.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:diamond_leggings.armor_stand",
|
||||
"item": { "minecraft:diamond_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/diamond_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:diamond_leggings.armor_stand",
|
||||
"item": { "minecraft:diamond_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/diamond_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
70
attachables/elytra.armor_stand.json → src/main/resources/optionalpack/attachables/elytra.armor_stand.json
Executable file → Normal file
70
attachables/elytra.armor_stand.json → src/main/resources/optionalpack/attachables/elytra.armor_stand.json
Executable file → Normal file
@@ -1,35 +1,35 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:elytra.armor_stand",
|
||||
"item": { "minecraft:elytra": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "elytra",
|
||||
"enchanted": "elytra_glint"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/elytra",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.elytra"
|
||||
},
|
||||
"animations": {
|
||||
"default_controller": "controller.animation.elytra.default",
|
||||
"default": "animation.elytra.default",
|
||||
"gliding": "animation.elytra.gliding",
|
||||
"sneaking": "animation.elytra.sneaking",
|
||||
"sleeping": "animation.elytra.sleeping",
|
||||
"swimming": "animation.elytra.swimming"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;",
|
||||
"animate": [
|
||||
"default_controller"
|
||||
]
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:elytra.armor_stand",
|
||||
"item": { "minecraft:elytra": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "elytra",
|
||||
"enchanted": "elytra_glint"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/elytra",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.elytra"
|
||||
},
|
||||
"animations": {
|
||||
"default_controller": "controller.animation.elytra.default",
|
||||
"default": "animation.elytra.default",
|
||||
"gliding": "animation.elytra.gliding",
|
||||
"sneaking": "animation.elytra.sneaking",
|
||||
"sleeping": "animation.elytra.sleeping",
|
||||
"swimming": "animation.elytra.swimming"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;",
|
||||
"animate": [
|
||||
"default_controller"
|
||||
]
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/golden_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/golden_chestplate.armor_stand.json
Executable file → Normal file
48
attachables/golden_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/golden_chestplate.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:golden_chestplate.armor_stand",
|
||||
"item": { "minecraft:golden_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/gold_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:golden_chestplate.armor_stand",
|
||||
"item": { "minecraft:golden_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/gold_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/golden_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/golden_leggings.armor_stand.json
Executable file → Normal file
48
attachables/golden_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/golden_leggings.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:golden_leggings.armor_stand",
|
||||
"item": { "minecraft:golden_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/gold_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:golden_leggings.armor_stand",
|
||||
"item": { "minecraft:golden_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/gold_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/iron_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/iron_chestplate.armor_stand.json
Executable file → Normal file
48
attachables/iron_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/iron_chestplate.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:iron_chestplate.armor_stand",
|
||||
"item": { "minecraft:iron_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/iron_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:iron_chestplate.armor_stand",
|
||||
"item": { "minecraft:iron_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/iron_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/iron_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/iron_leggings.armor_stand.json
Executable file → Normal file
48
attachables/iron_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/iron_leggings.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:iron_leggings.armor_stand",
|
||||
"item": { "minecraft:iron_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/iron_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:iron_leggings.armor_stand",
|
||||
"item": { "minecraft:iron_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/iron_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/leather_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/leather_chestplate.armor_stand.json
Executable file → Normal file
48
attachables/leather_chestplate.armor_stand.json → src/main/resources/optionalpack/attachables/leather_chestplate.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:leather_chestplate.armor_stand",
|
||||
"item": { "minecraft:leather_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor_leather",
|
||||
"enchanted": "armor_leather_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/leather_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:leather_chestplate.armor_stand",
|
||||
"item": { "minecraft:leather_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor_leather",
|
||||
"enchanted": "armor_leather_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/leather_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/leather_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/leather_leggings.armor_stand.json
Executable file → Normal file
48
attachables/leather_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/leather_leggings.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:leather_leggings.armor_stand",
|
||||
"item": { "minecraft:leather_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor_leather",
|
||||
"enchanted": "armor_leather_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/leather_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:leather_leggings.armor_stand",
|
||||
"item": { "minecraft:leather_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor_leather",
|
||||
"enchanted": "armor_leather_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/leather_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:netherite_chestplate.armor_stand",
|
||||
"item": { "minecraft:netherite_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/netherite_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:netherite_chestplate.armor_stand",
|
||||
"item": { "minecraft:netherite_chestplate": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/netherite_1",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.chestplate"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.chest_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
attachables/netherite_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/netherite_leggings.armor_stand.json
Executable file → Normal file
48
attachables/netherite_leggings.armor_stand.json → src/main/resources/optionalpack/attachables/netherite_leggings.armor_stand.json
Executable file → Normal file
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:netherite_leggings.armor_stand",
|
||||
"item": { "minecraft:netherite_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/netherite_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:attachable": {
|
||||
"description": {
|
||||
"identifier": "minecraft:netherite_leggings.armor_stand",
|
||||
"item": { "minecraft:netherite_leggings": "q.owner_identifier == 'minecraft:armor_stand'" },
|
||||
"materials": {
|
||||
"default": "armor",
|
||||
"enchanted": "armor_enchanted"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/models/armor/netherite_2",
|
||||
"enchanted": "textures/misc/enchanted_item_glint"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand.armor.leggings"
|
||||
},
|
||||
"scripts": {
|
||||
"parent_setup": "v.leg_layer_visible = 0.0;"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
106
entity/armor_stand.entity.json → src/main/resources/optionalpack/entity/armor_stand.entity.json
Executable file → Normal file
106
entity/armor_stand.entity.json → src/main/resources/optionalpack/entity/armor_stand.entity.json
Executable file → Normal file
@@ -1,53 +1,53 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:armor_stand",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": {
|
||||
"default": "armor_stand"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/armor_stand"
|
||||
},
|
||||
"animations": {
|
||||
"default_pose": "animation.armor_stand.default_pose",
|
||||
"no_pose": "animation.armor_stand.no_pose",
|
||||
"solemn_pose": "animation.armor_stand.solemn_pose",
|
||||
"athena_pose": "animation.armor_stand.athena_pose",
|
||||
"brandish_pose": "animation.armor_stand.brandish_pose",
|
||||
"honor_pose": "animation.armor_stand.honor_pose",
|
||||
"entertain_pose": "animation.armor_stand.entertain_pose",
|
||||
"salute_pose": "animation.armor_stand.salute_pose",
|
||||
"riposte_pose": "animation.armor_stand.riposte_pose",
|
||||
"zombie_pose": "animation.armor_stand.zombie_pose",
|
||||
"cancan_a_pose": "animation.armor_stand.cancan_a_pose",
|
||||
"cancan_b_pose": "animation.armor_stand.cancan_b_pose",
|
||||
"hero_pose": "animation.armor_stand.hero_pose",
|
||||
"wiggle": "animation.armor_stand.wiggle",
|
||||
"controller.pose": "controller.animation.armor_stand.pose",
|
||||
"controller.wiggling": "controller.animation.armor_stand.wiggle",
|
||||
"geyser_pose": "animation.armor_stand.geyser_pose",
|
||||
"geyser_scale": "animation.armor_stand.geyser_scale"
|
||||
},
|
||||
"scripts": {
|
||||
"initialize": [
|
||||
"v.armor_stand.pose_index = 0;",
|
||||
"v.armor_stand.hurt_time = 0;",
|
||||
"v.head_scale = q.is_item_name_any('slot.armor.head', 0, 'minecraft:skull', 'minecraft:carved_pumpkin') ? 0.6992 : 1.3984;"
|
||||
],
|
||||
"animate": [
|
||||
{"controller.pose": "!q.is_bribed"},
|
||||
{"controller.wiggling": "!q.is_bribed"},
|
||||
{"geyser_pose": "q.is_bribed"},
|
||||
{"geyser_scale": "q.is_baby"}
|
||||
]
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor_stand" ],
|
||||
"enable_attachables": true
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:armor_stand",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": {
|
||||
"default": "armor_stand"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/armor_stand"
|
||||
},
|
||||
"animations": {
|
||||
"default_pose": "animation.armor_stand.default_pose",
|
||||
"no_pose": "animation.armor_stand.no_pose",
|
||||
"solemn_pose": "animation.armor_stand.solemn_pose",
|
||||
"athena_pose": "animation.armor_stand.athena_pose",
|
||||
"brandish_pose": "animation.armor_stand.brandish_pose",
|
||||
"honor_pose": "animation.armor_stand.honor_pose",
|
||||
"entertain_pose": "animation.armor_stand.entertain_pose",
|
||||
"salute_pose": "animation.armor_stand.salute_pose",
|
||||
"riposte_pose": "animation.armor_stand.riposte_pose",
|
||||
"zombie_pose": "animation.armor_stand.zombie_pose",
|
||||
"cancan_a_pose": "animation.armor_stand.cancan_a_pose",
|
||||
"cancan_b_pose": "animation.armor_stand.cancan_b_pose",
|
||||
"hero_pose": "animation.armor_stand.hero_pose",
|
||||
"wiggle": "animation.armor_stand.wiggle",
|
||||
"controller.pose": "controller.animation.armor_stand.pose",
|
||||
"controller.wiggling": "controller.animation.armor_stand.wiggle",
|
||||
"geyser_pose": "animation.armor_stand.geyser_pose",
|
||||
"geyser_scale": "animation.armor_stand.geyser_scale"
|
||||
},
|
||||
"scripts": {
|
||||
"initialize": [
|
||||
"v.armor_stand.pose_index = 0;",
|
||||
"v.armor_stand.hurt_time = 0;",
|
||||
"v.head_scale = q.is_item_name_any('slot.armor.head', 0, 'minecraft:skull', 'minecraft:carved_pumpkin') ? 0.6992 : 1.3984;"
|
||||
],
|
||||
"animate": [
|
||||
{"controller.pose": "!q.is_bribed"},
|
||||
{"controller.wiggling": "!q.is_bribed"},
|
||||
{"geyser_pose": "q.is_bribed"},
|
||||
{"geyser_scale": "q.is_baby"}
|
||||
]
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.armor_stand"
|
||||
},
|
||||
"render_controllers": [ "controller.render.armor_stand" ],
|
||||
"enable_attachables": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:arrow",
|
||||
"materials": {
|
||||
"default": "arrow"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/arrows",
|
||||
"spectral": "textures/geyser/entity/arrow/spectral_arrow"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.arrow"
|
||||
},
|
||||
"animations": {
|
||||
"move": "animation.arrow.move"
|
||||
},
|
||||
"scripts": {
|
||||
"pre_animation": [
|
||||
"variable.shake = query.shake_time - query.frame_alpha;",
|
||||
"variable.shake_power = variable.shake > 0.0 ? -Math.sin(variable.shake * 200.0) * variable.shake : 0.0;"
|
||||
],
|
||||
"animate": [
|
||||
"move"
|
||||
]
|
||||
},
|
||||
"render_controllers": [ "controller.render.arrow" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:arrow",
|
||||
"materials": {
|
||||
"default": "arrow"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/arrows",
|
||||
"spectral": "textures/geyser/entity/arrow/spectral_arrow"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.arrow"
|
||||
},
|
||||
"animations": {
|
||||
"move": "animation.arrow.move"
|
||||
},
|
||||
"scripts": {
|
||||
"pre_animation": [
|
||||
"variable.shake = query.shake_time - query.frame_alpha;",
|
||||
"variable.shake_power = variable.shake > 0.0 ? -Math.sin(variable.shake * 200.0) * variable.shake : 0.0;"
|
||||
],
|
||||
"animate": [
|
||||
"move"
|
||||
]
|
||||
},
|
||||
"render_controllers": [ "controller.render.arrow" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
86
entity/evocation_illager.entity.json → src/main/resources/optionalpack/entity/evocation_illager.entity.json
Executable file → Normal file
86
entity/evocation_illager.entity.json → src/main/resources/optionalpack/entity/evocation_illager.entity.json
Executable file → Normal file
@@ -1,43 +1,43 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:evocation_illager",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": {
|
||||
"default": "evoker"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/illager/evoker",
|
||||
"illusioner": "textures/geyser/entity/illager/illusioner"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.evoker.v1.8"
|
||||
},
|
||||
"scripts": {
|
||||
"scale": "0.9375",
|
||||
"animate": [
|
||||
"controller_general",
|
||||
"controller_move"
|
||||
]
|
||||
},
|
||||
"animations": {
|
||||
"general": "animation.evoker.general",
|
||||
"casting": "animation.evoker.casting",
|
||||
"look_at_target": "animation.common.look_at_target",
|
||||
"move": "animation.villager.move",
|
||||
"celebrating": "animation.humanoid.celebrating",
|
||||
"controller_general": "controller.animation.evoker.general",
|
||||
"controller_move": "controller.animation.villager.move"
|
||||
},
|
||||
"particle_effects": {
|
||||
"spell": "minecraft:evoker_spell"
|
||||
},
|
||||
"render_controllers": [ "controller.render.evoker" ],
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 40
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:evocation_illager",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": {
|
||||
"default": "evoker"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/illager/evoker",
|
||||
"illusioner": "textures/geyser/entity/illager/illusioner"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.evoker.v1.8"
|
||||
},
|
||||
"scripts": {
|
||||
"scale": "0.9375",
|
||||
"animate": [
|
||||
"controller_general",
|
||||
"controller_move"
|
||||
]
|
||||
},
|
||||
"animations": {
|
||||
"general": "animation.evoker.general",
|
||||
"casting": "animation.evoker.casting",
|
||||
"look_at_target": "animation.common.look_at_target",
|
||||
"move": "animation.villager.move",
|
||||
"celebrating": "animation.humanoid.celebrating",
|
||||
"controller_general": "controller.animation.evoker.general",
|
||||
"controller_move": "controller.animation.villager.move"
|
||||
},
|
||||
"particle_effects": {
|
||||
"spell": "minecraft:evoker_spell"
|
||||
},
|
||||
"render_controllers": [ "controller.render.evoker" ],
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 40
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
104
entity/panda.entity.json → src/main/resources/optionalpack/entity/panda.entity.json
Executable file → Normal file
104
entity/panda.entity.json → src/main/resources/optionalpack/entity/panda.entity.json
Executable file → Normal file
@@ -1,53 +1,53 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:panda",
|
||||
"materials": { "default": "panda" },
|
||||
"textures": {
|
||||
"default": "textures/entity/panda/panda",
|
||||
"lazy": "textures/entity/panda/panda_lazy",
|
||||
"worried": "textures/entity/panda/panda_worried",
|
||||
"playful": "textures/entity/panda/panda_playful",
|
||||
"brown": "textures/entity/panda/panda_brown",
|
||||
"weak": "textures/entity/panda/panda_sneezy",
|
||||
"aggressive": "textures/entity/panda/panda_aggressive"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.panda"
|
||||
},
|
||||
"particle_effects": {
|
||||
"sneeze": "geyseropt:sneeze"
|
||||
},
|
||||
"animations": {
|
||||
"unhappy": "animation.panda.unhappy",
|
||||
"geyser_sneezing": "animation.panda.sneezing",
|
||||
"walk": "animation.quadruped.walk",
|
||||
"look_at_target": "animation.common.look_at_target",
|
||||
"baby_transform": "animation.panda.baby_transform",
|
||||
"sitting": "animation.panda.sitting",
|
||||
"rolling": "animation.panda.rolling",
|
||||
"lying": "animation.panda.lying",
|
||||
"controller.move": "controller.animation.panda.move",
|
||||
"controller.unhappy": "controller.animation.panda.unhappy",
|
||||
"controller.baby": "controller.animation.panda.baby"
|
||||
},
|
||||
"scripts": {
|
||||
"pre_animation": [
|
||||
"v.geyser_sneezing = q.sneeze_counter > 0 ? 1 : (v.geyser_sneezing ?? 0);"
|
||||
],
|
||||
"animate": [
|
||||
"controller.move",
|
||||
"controller.unhappy",
|
||||
"controller.baby",
|
||||
{"geyser_sneezing": "v.geyser_sneezing"}
|
||||
]
|
||||
},
|
||||
"render_controllers": [ "controller.render.panda" ],
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 54
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:panda",
|
||||
"materials": { "default": "panda" },
|
||||
"textures": {
|
||||
"default": "textures/entity/panda/panda",
|
||||
"lazy": "textures/entity/panda/panda_lazy",
|
||||
"worried": "textures/entity/panda/panda_worried",
|
||||
"playful": "textures/entity/panda/panda_playful",
|
||||
"brown": "textures/entity/panda/panda_brown",
|
||||
"weak": "textures/entity/panda/panda_sneezy",
|
||||
"aggressive": "textures/entity/panda/panda_aggressive"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.panda"
|
||||
},
|
||||
"particle_effects": {
|
||||
"sneeze": "geyseropt:sneeze"
|
||||
},
|
||||
"animations": {
|
||||
"unhappy": "animation.panda.unhappy",
|
||||
"geyser_sneezing": "animation.panda.sneezing",
|
||||
"walk": "animation.quadruped.walk",
|
||||
"look_at_target": "animation.common.look_at_target",
|
||||
"baby_transform": "animation.panda.baby_transform",
|
||||
"sitting": "animation.panda.sitting",
|
||||
"rolling": "animation.panda.rolling",
|
||||
"lying": "animation.panda.lying",
|
||||
"controller.move": "controller.animation.panda.move",
|
||||
"controller.unhappy": "controller.animation.panda.unhappy",
|
||||
"controller.baby": "controller.animation.panda.baby"
|
||||
},
|
||||
"scripts": {
|
||||
"pre_animation": [
|
||||
"v.geyser_sneezing = q.sneeze_counter > 0 ? 1 : (v.geyser_sneezing ?? 0);"
|
||||
],
|
||||
"animate": [
|
||||
"controller.move",
|
||||
"controller.unhappy",
|
||||
"controller.baby",
|
||||
{"geyser_sneezing": "v.geyser_sneezing"}
|
||||
]
|
||||
},
|
||||
"render_controllers": [ "controller.render.panda" ],
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 54
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
72
entity/rabbit.entity.json → src/main/resources/optionalpack/entity/rabbit.entity.json
Executable file → Normal file
72
entity/rabbit.entity.json → src/main/resources/optionalpack/entity/rabbit.entity.json
Executable file → Normal file
@@ -1,37 +1,37 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:rabbit",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": { "default": "rabbit" },
|
||||
"textures": {
|
||||
"brown": "textures/entity/rabbit/brown",
|
||||
"white": "textures/entity/rabbit/white",
|
||||
"black": "textures/entity/rabbit/blackrabbit",
|
||||
"white_splotched": "textures/entity/rabbit/white_splotched",
|
||||
"gold": "textures/entity/rabbit/gold",
|
||||
"salt": "textures/entity/rabbit/salt",
|
||||
"toast": "textures/entity/rabbit/toast",
|
||||
"caerbannog": "textures/geyser/entity/rabbit/caerbannog"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.rabbit.v1.8"
|
||||
},
|
||||
"animations": {
|
||||
"move": "animation.rabbit.move",
|
||||
"baby_transform": "animation.rabbit.baby_transform",
|
||||
"look_at_target": "animation.common.look_at_target"
|
||||
},
|
||||
"animation_controllers": [
|
||||
{ "general": "controller.animation.rabbit.general" },
|
||||
{ "baby": "controller.animation.rabbit.baby" }
|
||||
],
|
||||
"render_controllers": [ "controller.render.rabbit" ],
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 24
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:rabbit",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": { "default": "rabbit" },
|
||||
"textures": {
|
||||
"brown": "textures/entity/rabbit/brown",
|
||||
"white": "textures/entity/rabbit/white",
|
||||
"black": "textures/entity/rabbit/blackrabbit",
|
||||
"white_splotched": "textures/entity/rabbit/white_splotched",
|
||||
"gold": "textures/entity/rabbit/gold",
|
||||
"salt": "textures/entity/rabbit/salt",
|
||||
"toast": "textures/entity/rabbit/toast",
|
||||
"caerbannog": "textures/geyser/entity/rabbit/caerbannog"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.rabbit.v1.8"
|
||||
},
|
||||
"animations": {
|
||||
"move": "animation.rabbit.move",
|
||||
"baby_transform": "animation.rabbit.baby_transform",
|
||||
"look_at_target": "animation.common.look_at_target"
|
||||
},
|
||||
"animation_controllers": [
|
||||
{ "general": "controller.animation.rabbit.general" },
|
||||
{ "baby": "controller.animation.rabbit.baby" }
|
||||
],
|
||||
"render_controllers": [ "controller.render.rabbit" ],
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 24
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
202
entity/zombie_villager_v2.entity.json → src/main/resources/optionalpack/entity/zombie_villager_v2.entity.json
Executable file → Normal file
202
entity/zombie_villager_v2.entity.json → src/main/resources/optionalpack/entity/zombie_villager_v2.entity.json
Executable file → Normal file
@@ -1,102 +1,102 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:zombie_villager_v2",
|
||||
"materials": {
|
||||
"default": "zombie_villager_v2",
|
||||
"masked": "zombie_villager_v2_masked"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/zombie_villager2/zombie-villager",
|
||||
"desert": "textures/entity/zombie_villager2/biomes/biome-desert-zombie",
|
||||
"jungle": "textures/entity/zombie_villager2/biomes/biome-jungle-zombie",
|
||||
"plains": "textures/entity/zombie_villager2/biomes/biome-plains-zombie",
|
||||
"savanna": "textures/entity/zombie_villager2/biomes/biome-savanna-zombie",
|
||||
"snow": "textures/entity/zombie_villager2/biomes/biome-snow-zombie",
|
||||
"swamp": "textures/entity/zombie_villager2/biomes/biome-swamp-zombie",
|
||||
"taiga": "textures/entity/zombie_villager2/biomes/biome-taiga-zombie",
|
||||
"armorer": "textures/entity/villager2/professions/armorer",
|
||||
"butcher": "textures/entity/villager2/professions/butcher",
|
||||
"cartographer": "textures/entity/villager2/professions/cartographer",
|
||||
"cleric": "textures/entity/villager2/professions/cleric",
|
||||
"farmer": "textures/entity/villager2/professions/farmer",
|
||||
"fisherman": "textures/entity/villager2/professions/fisherman",
|
||||
"fletcher": "textures/entity/villager2/professions/fletcher",
|
||||
"leatherworker": "textures/entity/villager2/professions/leatherworker",
|
||||
"librarian": "textures/entity/villager2/professions/librarian",
|
||||
"shepherd": "textures/entity/villager2/professions/shepherd",
|
||||
"tool_smith": "textures/entity/villager2/professions/toolsmith",
|
||||
"weapon_smith": "textures/entity/villager2/professions/weaponsmith",
|
||||
"stonemason": "textures/entity/villager2/professions/stonemason",
|
||||
"nitwit": "textures/entity/villager2/professions/nitwit",
|
||||
"unskilled": "textures/entity/zombie_villager2/professions/armorer",
|
||||
"level_stone": "textures/entity/villager2/levels/level_stone",
|
||||
"level_iron": "textures/entity/villager2/levels/level_iron",
|
||||
"level_gold": "textures/entity/villager2/levels/level_gold",
|
||||
"level_emerald": "textures/entity/villager2/levels/level_emerald",
|
||||
"level_diamond": "textures/entity/villager2/levels/level_diamond"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.zombie.villager_v2"
|
||||
},
|
||||
"scripts": {
|
||||
"pre_animation": [
|
||||
"v.num_professions = 14;",
|
||||
"v.profession_index = ((q.variant < v.num_professions) ? q.variant : 0);",
|
||||
"v.tcos0 = (Math.cos(q.modified_distance_moved * 38.17) * q.modified_move_speed / v.gliding_speed_value) * 57.3;",
|
||||
"v.level_index = (q.trade_tier);"
|
||||
]
|
||||
},
|
||||
"animations": {
|
||||
"humanoid_big_head": "animation.humanoid.big_head",
|
||||
"humanoid_base_pose": "animation.humanoid.base_pose",
|
||||
"look_at_target_default": "animation.humanoid.look_at_target.default",
|
||||
"look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
|
||||
"look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
|
||||
"move": "animation.humanoid.move",
|
||||
"riding.arms": "animation.humanoid.riding.arms",
|
||||
"riding.legs": "animation.humanoid.riding.legs",
|
||||
"holding": "animation.humanoid.holding",
|
||||
"brandish_spear": "animation.humanoid.brandish_spear",
|
||||
"charging": "animation.humanoid.charging",
|
||||
"attack.rotations": "animation.humanoid.attack.rotations",
|
||||
"sneaking": "animation.humanoid.sneaking",
|
||||
"bob": "animation.humanoid.bob",
|
||||
"damage_nearby_mobs": "animation.humanoid.damage_nearby_mobs",
|
||||
"bow_and_arrow": "animation.humanoid.bow_and_arrow",
|
||||
"use_item_progress": "animation.humanoid.use_item_progress",
|
||||
"zombie_attack_bare_hand": "animation.zombie.attack_bare_hand",
|
||||
"swimming": "animation.zombie.swimming"
|
||||
},
|
||||
"animation_controllers": [
|
||||
{ "humanoid_baby_big_head": "controller.animation.humanoid.baby_big_head" },
|
||||
{ "humanoid_base_pose": "controller.animation.humanoid.base_pose" },
|
||||
{ "look_at_target": "controller.animation.humanoid.look_at_target" },
|
||||
{ "move": "controller.animation.humanoid.move" },
|
||||
{ "riding": "controller.animation.humanoid.riding" },
|
||||
{ "holding": "controller.animation.humanoid.holding" },
|
||||
{ "brandish_spear": "controller.animation.humanoid.brandish_spear" },
|
||||
{ "charging": "controller.animation.humanoid.charging" },
|
||||
{ "attack": "controller.animation.humanoid.attack" },
|
||||
{ "sneaking": "controller.animation.humanoid.sneaking" },
|
||||
{ "bob": "controller.animation.humanoid.bob" },
|
||||
{ "damage_nearby_mobs": "controller.animation.humanoid.damage_nearby_mobs" },
|
||||
{ "bow_and_arrow": "controller.animation.humanoid.bow_and_arrow" },
|
||||
{ "use_item_progress": "controller.animation.humanoid.use_item_progress" },
|
||||
{ "zombie_attack_bare_hand": "controller.animation.zombie.attack_bare_hand" },
|
||||
{ "swimming": "controller.animation.zombie.swimming" }
|
||||
],
|
||||
"render_controllers": [
|
||||
"controller.render.zombie_villager_v2_base",
|
||||
"controller.render.zombie_villager_v2_masked",
|
||||
"controller.render.villager_v2_level"
|
||||
],
|
||||
"enable_attachables": true,
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 42
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"minecraft:client_entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:zombie_villager_v2",
|
||||
"materials": {
|
||||
"default": "zombie_villager_v2",
|
||||
"masked": "zombie_villager_v2_masked"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/zombie_villager2/zombie-villager",
|
||||
"desert": "textures/entity/zombie_villager2/biomes/biome-desert-zombie",
|
||||
"jungle": "textures/entity/zombie_villager2/biomes/biome-jungle-zombie",
|
||||
"plains": "textures/entity/zombie_villager2/biomes/biome-plains-zombie",
|
||||
"savanna": "textures/entity/zombie_villager2/biomes/biome-savanna-zombie",
|
||||
"snow": "textures/entity/zombie_villager2/biomes/biome-snow-zombie",
|
||||
"swamp": "textures/entity/zombie_villager2/biomes/biome-swamp-zombie",
|
||||
"taiga": "textures/entity/zombie_villager2/biomes/biome-taiga-zombie",
|
||||
"armorer": "textures/entity/villager2/professions/armorer",
|
||||
"butcher": "textures/entity/villager2/professions/butcher",
|
||||
"cartographer": "textures/entity/villager2/professions/cartographer",
|
||||
"cleric": "textures/entity/villager2/professions/cleric",
|
||||
"farmer": "textures/entity/villager2/professions/farmer",
|
||||
"fisherman": "textures/entity/villager2/professions/fisherman",
|
||||
"fletcher": "textures/entity/villager2/professions/fletcher",
|
||||
"leatherworker": "textures/entity/villager2/professions/leatherworker",
|
||||
"librarian": "textures/entity/villager2/professions/librarian",
|
||||
"shepherd": "textures/entity/villager2/professions/shepherd",
|
||||
"tool_smith": "textures/entity/villager2/professions/toolsmith",
|
||||
"weapon_smith": "textures/entity/villager2/professions/weaponsmith",
|
||||
"stonemason": "textures/entity/villager2/professions/stonemason",
|
||||
"nitwit": "textures/entity/villager2/professions/nitwit",
|
||||
"unskilled": "textures/entity/zombie_villager2/professions/armorer",
|
||||
"level_stone": "textures/entity/villager2/levels/level_stone",
|
||||
"level_iron": "textures/entity/villager2/levels/level_iron",
|
||||
"level_gold": "textures/entity/villager2/levels/level_gold",
|
||||
"level_emerald": "textures/entity/villager2/levels/level_emerald",
|
||||
"level_diamond": "textures/entity/villager2/levels/level_diamond"
|
||||
},
|
||||
"geometry": {
|
||||
"default": "geometry.zombie.villager_v2"
|
||||
},
|
||||
"scripts": {
|
||||
"pre_animation": [
|
||||
"v.num_professions = 14;",
|
||||
"v.profession_index = ((q.variant < v.num_professions) ? q.variant : 0);",
|
||||
"v.tcos0 = (Math.cos(q.modified_distance_moved * 38.17) * q.modified_move_speed / v.gliding_speed_value) * 57.3;",
|
||||
"v.level_index = (q.trade_tier);"
|
||||
]
|
||||
},
|
||||
"animations": {
|
||||
"humanoid_big_head": "animation.humanoid.big_head",
|
||||
"humanoid_base_pose": "animation.humanoid.base_pose",
|
||||
"look_at_target_default": "animation.humanoid.look_at_target.default",
|
||||
"look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
|
||||
"look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
|
||||
"move": "animation.humanoid.move",
|
||||
"riding.arms": "animation.humanoid.riding.arms",
|
||||
"riding.legs": "animation.humanoid.riding.legs",
|
||||
"holding": "animation.humanoid.holding",
|
||||
"brandish_spear": "animation.humanoid.brandish_spear",
|
||||
"charging": "animation.humanoid.charging",
|
||||
"attack.rotations": "animation.humanoid.attack.rotations",
|
||||
"sneaking": "animation.humanoid.sneaking",
|
||||
"bob": "animation.humanoid.bob",
|
||||
"damage_nearby_mobs": "animation.humanoid.damage_nearby_mobs",
|
||||
"bow_and_arrow": "animation.humanoid.bow_and_arrow",
|
||||
"use_item_progress": "animation.humanoid.use_item_progress",
|
||||
"zombie_attack_bare_hand": "animation.zombie.attack_bare_hand",
|
||||
"swimming": "animation.zombie.swimming"
|
||||
},
|
||||
"animation_controllers": [
|
||||
{ "humanoid_baby_big_head": "controller.animation.humanoid.baby_big_head" },
|
||||
{ "humanoid_base_pose": "controller.animation.humanoid.base_pose" },
|
||||
{ "look_at_target": "controller.animation.humanoid.look_at_target" },
|
||||
{ "move": "controller.animation.humanoid.move" },
|
||||
{ "riding": "controller.animation.humanoid.riding" },
|
||||
{ "holding": "controller.animation.humanoid.holding" },
|
||||
{ "brandish_spear": "controller.animation.humanoid.brandish_spear" },
|
||||
{ "charging": "controller.animation.humanoid.charging" },
|
||||
{ "attack": "controller.animation.humanoid.attack" },
|
||||
{ "sneaking": "controller.animation.humanoid.sneaking" },
|
||||
{ "bob": "controller.animation.humanoid.bob" },
|
||||
{ "damage_nearby_mobs": "controller.animation.humanoid.damage_nearby_mobs" },
|
||||
{ "bow_and_arrow": "controller.animation.humanoid.bow_and_arrow" },
|
||||
{ "use_item_progress": "controller.animation.humanoid.use_item_progress" },
|
||||
{ "zombie_attack_bare_hand": "controller.animation.zombie.attack_bare_hand" },
|
||||
{ "swimming": "controller.animation.zombie.swimming" }
|
||||
],
|
||||
"render_controllers": [
|
||||
"controller.render.zombie_villager_v2_base",
|
||||
"controller.render.zombie_villager_v2_masked",
|
||||
"controller.render.villager_v2_level"
|
||||
],
|
||||
"enable_attachables": true,
|
||||
"spawn_egg": {
|
||||
"texture": "spawn_egg",
|
||||
"texture_index": 42
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
manifest.json → src/main/resources/optionalpack/manifest.json
Executable file → Normal file
36
manifest.json → src/main/resources/optionalpack/manifest.json
Executable file → Normal file
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"format_version": 2,
|
||||
"header": {
|
||||
"description": "Optional Bedrock resource pack to extend Geyser functionality",
|
||||
"name": "GeyserOptionalPack",
|
||||
"uuid": "e5f5c938-a701-11eb-b2a3-047d7bb283ba",
|
||||
"version": [1, 0, 13],
|
||||
"min_engine_version": [ 1, 16, 0 ]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"description": "GeyserOptionalPack",
|
||||
"type": "resources",
|
||||
"uuid": "eebb4ea8-a701-11eb-95ba-047d7bb283ba",
|
||||
"version": [1, 0, 13]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"format_version": 2,
|
||||
"header": {
|
||||
"description": "Optional Bedrock resource pack to extend Geyser functionality",
|
||||
"name": "GeyserOptionalPack",
|
||||
"uuid": "e5f5c938-a701-11eb-b2a3-047d7bb283ba",
|
||||
"version": [1, 0, 13],
|
||||
"min_engine_version": [ 1, 16, 0 ]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"description": "GeyserOptionalPack",
|
||||
"type": "resources",
|
||||
"uuid": "eebb4ea8-a701-11eb-95ba-047d7bb283ba",
|
||||
"version": [1, 0, 13]
|
||||
}
|
||||
]
|
||||
}
|
||||
0
models/entity/evoker.geo.json → src/main/resources/optionalpack/models/entity/evoker.geo.json
Executable file → Normal file
0
models/entity/evoker.geo.json → src/main/resources/optionalpack/models/entity/evoker.geo.json
Executable file → Normal file
0
models/entity/panda.geo.json → src/main/resources/optionalpack/models/entity/panda.geo.json
Executable file → Normal file
0
models/entity/panda.geo.json → src/main/resources/optionalpack/models/entity/panda.geo.json
Executable file → Normal file
14
src/main/resources/optionalpack/mojang.md
Normal file
14
src/main/resources/optionalpack/mojang.md
Normal file
@@ -0,0 +1,14 @@
|
||||
Some textures provided in this resource pack are from the Minecraft Java Edition client jar. GeyserMC does not claim ownership of these textures -
|
||||
these are all created and owned by Mojang.
|
||||
|
||||
The Minecraft EULA (https://account.mojang.com/documents/minecraft_eula) cites:
|
||||
|
||||
> If you've bought the Game, you may play around with it and modify it by adding modifications, tools, or plugins,
|
||||
> which we will refer to collectively as "Mods." By "Mods," we mean something original that you or someone else created
|
||||
> that doesn't contain a substantial part of our copyrightable code or content. When you combine your Mod with the Minecraft software,
|
||||
> we will call that combination a "Modded Version" of the Game. We have the final say on what constitutes a Mod and what doesn't.
|
||||
> You may not distribute any Modded Versions of our Game or software, and we’d appreciate it if you didn’t use Mods for griefing.
|
||||
> Basically, Mods are okay to distribute; hacked versions or Modded Versions of the Game client or server software are not okay to distribute.
|
||||
|
||||
Any textures included in this resource pack are contingent on the "substantial" part. As only a fraction of the content here revolves around Mojang property,
|
||||
we consider it not "substantial".
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
86
particles/basic_bubble_manual.json → src/main/resources/optionalpack/particles/basic_bubble_manual.json
Executable file → Normal file
86
particles/basic_bubble_manual.json → src/main/resources/optionalpack/particles/basic_bubble_manual.json
Executable file → Normal file
@@ -1,43 +1,43 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"particle_effect": {
|
||||
"description": {
|
||||
"identifier": "minecraft:basic_bubble_particle_manual",
|
||||
"basic_render_parameters": {
|
||||
"material": "particles_alpha",
|
||||
"texture": "textures/particle/particles"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"minecraft:emitter_rate_manual": {
|
||||
"max_particles": 100
|
||||
},
|
||||
"minecraft:emitter_lifetime_expression": {
|
||||
"activation_expression": 1,
|
||||
"expiration_expression": 0
|
||||
},
|
||||
"minecraft:emitter_shape_point": {
|
||||
},
|
||||
"minecraft:particle_lifetime_expression": {
|
||||
"max_lifetime": "2 / ((Math.Random(0.0, 1.0) * 0.8 + 0.2) * 5)"
|
||||
},
|
||||
"minecraft:particle_expire_if_not_in_blocks": [],
|
||||
"minecraft:particle_motion_dynamic": {
|
||||
"linear_acceleration": [ 0, 0.8, 0 ],
|
||||
"linear_drag_coefficient": 5.25
|
||||
},
|
||||
"minecraft:particle_appearance_billboard": {
|
||||
"size": [ "(0.05*variable.particle_random_1+0.1)*(variable.particle_random_2*0.9+0.2)", "(0.05*variable.particle_random_1+0.1)*(variable.particle_random_2*0.9+0.2)" ],
|
||||
"facing_camera_mode": "lookat_xyz",
|
||||
"uv": {
|
||||
"texture_width": 128,
|
||||
"texture_height": 128,
|
||||
"uv": [ 0, 16 ],
|
||||
"uv_size": [ 8, 8 ]
|
||||
}
|
||||
},
|
||||
"minecraft:particle_appearance_lighting": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"particle_effect": {
|
||||
"description": {
|
||||
"identifier": "minecraft:basic_bubble_particle_manual",
|
||||
"basic_render_parameters": {
|
||||
"material": "particles_alpha",
|
||||
"texture": "textures/particle/particles"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"minecraft:emitter_rate_manual": {
|
||||
"max_particles": 100
|
||||
},
|
||||
"minecraft:emitter_lifetime_expression": {
|
||||
"activation_expression": 1,
|
||||
"expiration_expression": 0
|
||||
},
|
||||
"minecraft:emitter_shape_point": {
|
||||
},
|
||||
"minecraft:particle_lifetime_expression": {
|
||||
"max_lifetime": "2 / ((Math.Random(0.0, 1.0) * 0.8 + 0.2) * 5)"
|
||||
},
|
||||
"minecraft:particle_expire_if_not_in_blocks": [],
|
||||
"minecraft:particle_motion_dynamic": {
|
||||
"linear_acceleration": [ 0, 0.8, 0 ],
|
||||
"linear_drag_coefficient": 5.25
|
||||
},
|
||||
"minecraft:particle_appearance_billboard": {
|
||||
"size": [ "(0.05*variable.particle_random_1+0.1)*(variable.particle_random_2*0.9+0.2)", "(0.05*variable.particle_random_1+0.1)*(variable.particle_random_2*0.9+0.2)" ],
|
||||
"facing_camera_mode": "lookat_xyz",
|
||||
"uv": {
|
||||
"texture_width": 128,
|
||||
"texture_height": 128,
|
||||
"uv": [ 0, 16 ],
|
||||
"uv_size": [ 8, 8 ]
|
||||
}
|
||||
},
|
||||
"minecraft:particle_appearance_lighting": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.armor_stand": {
|
||||
"geometry": "geometry.default",
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "geyser_leftarm": "!(q.is_angry)" },
|
||||
{ "geyser_rightarm": "!(q.is_angry)" },
|
||||
{ "geyser_baseplate": "!(q.is_admiring)" }
|
||||
],
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "texture.default" ],
|
||||
"overlay_color": {
|
||||
"r": "this",
|
||||
"g": "this",
|
||||
"b": "this",
|
||||
"a": "0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.armor_stand": {
|
||||
"geometry": "geometry.default",
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "geyser_leftarm": "!(q.is_angry)" },
|
||||
{ "geyser_rightarm": "!(q.is_angry)" },
|
||||
{ "geyser_baseplate": "!(q.is_admiring)" }
|
||||
],
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "texture.default" ],
|
||||
"overlay_color": {
|
||||
"r": "this",
|
||||
"g": "this",
|
||||
"b": "this",
|
||||
"a": "0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"render_controllers": {
|
||||
"controller.render.arrow": {
|
||||
"geometry": "geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [
|
||||
"q.is_bribed ? texture.spectral : texture.default"
|
||||
],
|
||||
"filter_lighting": true
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"render_controllers": {
|
||||
"controller.render.arrow": {
|
||||
"geometry": "geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [
|
||||
"q.is_bribed ? texture.spectral : texture.default"
|
||||
],
|
||||
"filter_lighting": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.player.cape": {
|
||||
"rebuild_animation_matrices": true,
|
||||
"geometry": "Geometry.cape",
|
||||
"materials": [ { "*": "Material.cape" } ],
|
||||
"textures": [ "Texture.cape" ],
|
||||
"part_visibility": [
|
||||
{ "cape": "(query.armor_texture_slot(1) != 5) && (!variable.is_first_person || variable.is_paperdoll) && (!variable.map_face_icon) && (math.mod(q.mark_variant, 2) != 1)" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.player.cape": {
|
||||
"rebuild_animation_matrices": true,
|
||||
"geometry": "Geometry.cape",
|
||||
"materials": [ { "*": "Material.cape" } ],
|
||||
"textures": [ "Texture.cape" ],
|
||||
"part_visibility": [
|
||||
{ "cape": "(query.armor_texture_slot(1) != 5) && (!variable.is_first_person || variable.is_paperdoll) && (!variable.map_face_icon) && (math.mod(q.mark_variant, 2) != 1)" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.evoker": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.skins": [
|
||||
"Texture.default",
|
||||
"Texture.illusioner"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "arms": "!(q.is_casting || q.is_celebrating)" },
|
||||
{ "leftarm": "q.is_casting || q.is_celebrating" },
|
||||
{ "rightarm": "q.is_casting || q.is_celebrating" },
|
||||
{ "helmet": "q.is_bribed" }
|
||||
],
|
||||
"textures": [
|
||||
"Array.skins[q.is_bribed]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.evoker": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.skins": [
|
||||
"Texture.default",
|
||||
"Texture.illusioner"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "arms": "!(q.is_casting || q.is_celebrating)" },
|
||||
{ "leftarm": "q.is_casting || q.is_celebrating" },
|
||||
{ "rightarm": "q.is_casting || q.is_celebrating" },
|
||||
{ "helmet": "q.is_bribed" }
|
||||
],
|
||||
"textures": [
|
||||
"Array.skins[q.is_bribed]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +1,53 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.player.first_person": {
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Texture.default" ],
|
||||
"part_visibility": [
|
||||
{ "*": false },
|
||||
{ "rightArm": "query.get_equipped_item_name(0, 1) == '' || query.get_equipped_item_name(0, 1) == 'map'" },
|
||||
{ "rightSleeve": "query.get_equipped_item_name(0, 1) == '' || query.get_equipped_item_name(0, 1) == 'map'" },
|
||||
{ "leftArm": "(query.get_equipped_item_name(0, 1) == 'map' && query.get_equipped_item_name('off_hand') != 'shield') || (query.get_equipped_item_name('off_hand') == 'map' && !query.item_is_charged) || (!query.item_is_charged && (variable.item_use_normalized > 0 && variable.item_use_normalized < 1.0))" },
|
||||
{ "leftSleeve": "(query.get_equipped_item_name(0, 1) == 'map' && query.get_equipped_item_name('off_hand') != 'shield') || (query.get_equipped_item_name('off_hand') == 'map' && !query.item_is_charged) || (!query.item_is_charged && (variable.item_use_normalized > 0 && variable.item_use_normalized < 1.0))" }
|
||||
]
|
||||
},
|
||||
"controller.render.player.third_person": {
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Texture.default" ],
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "helmet": "variable.helmet_layer_visible" },
|
||||
{ "leftLegging": "variable.leg_layer_visible" },
|
||||
{ "rightLegging": "variable.leg_layer_visible" },
|
||||
{ "leftBoot": "variable.boot_layer_visible" },
|
||||
{ "rightBoot": "variable.boot_layer_visible" },
|
||||
{ "leftSock": "variable.boot_layer_visible && variable.leg_layer_visible" },
|
||||
{ "rightSock": "variable.boot_layer_visible && variable.leg_layer_visible" },
|
||||
{ "bodyArmor": "variable.chest_layer_visible && !query.has_cape" },
|
||||
{ "leftArmArmor": "variable.chest_layer_visible && !query.has_cape" },
|
||||
{ "rightArmArmor": "variable.chest_layer_visible && !query.has_cape" },
|
||||
{ "belt": "variable.chest_layer_visible && variable.leg_layer_visible" },
|
||||
{ "hat": "math.mod(math.floor(q.mark_variant / 64), 2) != 1" },
|
||||
{ "leftSleeve": "math.mod(math.floor(q.mark_variant / 4), 2) != 1" },
|
||||
{ "rightSleeve": "math.mod(math.floor(q.mark_variant / 8), 2) != 1" },
|
||||
{ "jacket": "math.mod(math.floor(q.mark_variant / 2), 2) != 1" },
|
||||
{ "leftPants": "math.mod(math.floor(q.mark_variant / 16), 2) != 1" },
|
||||
{ "rightPants": "math.mod(math.floor(q.mark_variant / 32), 2) != 1" }
|
||||
]
|
||||
},
|
||||
"controller.render.player.map": {
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Texture.default" ],
|
||||
"part_visibility": [
|
||||
{ "*": false },
|
||||
{ "head": true },
|
||||
{ "hat": true },
|
||||
{ "helmet": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.player.first_person": {
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Texture.default" ],
|
||||
"part_visibility": [
|
||||
{ "*": false },
|
||||
{ "rightArm": "query.get_equipped_item_name(0, 1) == '' || query.get_equipped_item_name(0, 1) == 'map'" },
|
||||
{ "rightSleeve": "query.get_equipped_item_name(0, 1) == '' || query.get_equipped_item_name(0, 1) == 'map'" },
|
||||
{ "leftArm": "(query.get_equipped_item_name(0, 1) == 'map' && query.get_equipped_item_name('off_hand') != 'shield') || (query.get_equipped_item_name('off_hand') == 'map' && !query.item_is_charged) || (!query.item_is_charged && (variable.item_use_normalized > 0 && variable.item_use_normalized < 1.0))" },
|
||||
{ "leftSleeve": "(query.get_equipped_item_name(0, 1) == 'map' && query.get_equipped_item_name('off_hand') != 'shield') || (query.get_equipped_item_name('off_hand') == 'map' && !query.item_is_charged) || (!query.item_is_charged && (variable.item_use_normalized > 0 && variable.item_use_normalized < 1.0))" }
|
||||
]
|
||||
},
|
||||
"controller.render.player.third_person": {
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Texture.default" ],
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "helmet": "variable.helmet_layer_visible" },
|
||||
{ "leftLegging": "variable.leg_layer_visible" },
|
||||
{ "rightLegging": "variable.leg_layer_visible" },
|
||||
{ "leftBoot": "variable.boot_layer_visible" },
|
||||
{ "rightBoot": "variable.boot_layer_visible" },
|
||||
{ "leftSock": "variable.boot_layer_visible && variable.leg_layer_visible" },
|
||||
{ "rightSock": "variable.boot_layer_visible && variable.leg_layer_visible" },
|
||||
{ "bodyArmor": "variable.chest_layer_visible && !query.has_cape" },
|
||||
{ "leftArmArmor": "variable.chest_layer_visible && !query.has_cape" },
|
||||
{ "rightArmArmor": "variable.chest_layer_visible && !query.has_cape" },
|
||||
{ "belt": "variable.chest_layer_visible && variable.leg_layer_visible" },
|
||||
{ "hat": "math.mod(math.floor(q.mark_variant / 64), 2) != 1" },
|
||||
{ "leftSleeve": "math.mod(math.floor(q.mark_variant / 4), 2) != 1" },
|
||||
{ "rightSleeve": "math.mod(math.floor(q.mark_variant / 8), 2) != 1" },
|
||||
{ "jacket": "math.mod(math.floor(q.mark_variant / 2), 2) != 1" },
|
||||
{ "leftPants": "math.mod(math.floor(q.mark_variant / 16), 2) != 1" },
|
||||
{ "rightPants": "math.mod(math.floor(q.mark_variant / 32), 2) != 1" }
|
||||
]
|
||||
},
|
||||
"controller.render.player.map": {
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Texture.default" ],
|
||||
"part_visibility": [
|
||||
{ "*": false },
|
||||
{ "head": true },
|
||||
{ "hat": true },
|
||||
{ "helmet": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.rabbit": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.skins": [
|
||||
"Texture.brown",
|
||||
"Texture.white",
|
||||
"Texture.black",
|
||||
"Texture.white_splotched",
|
||||
"Texture.gold",
|
||||
"Texture.salt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [
|
||||
{
|
||||
"*": "Material.default"
|
||||
}
|
||||
],
|
||||
"textures": [
|
||||
"q.get_name == 'Toast' ? Texture.toast : (q.is_bribed ? Texture.caerbannog : Array.skins[q.variant])"
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.rabbit": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.skins": [
|
||||
"Texture.brown",
|
||||
"Texture.white",
|
||||
"Texture.black",
|
||||
"Texture.white_splotched",
|
||||
"Texture.gold",
|
||||
"Texture.salt"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [
|
||||
{
|
||||
"*": "Material.default"
|
||||
}
|
||||
],
|
||||
"textures": [
|
||||
"q.get_name == 'Toast' ? Texture.toast : (q.is_bribed ? Texture.caerbannog : Array.skins[q.variant])"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +1,38 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.shulker": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.variants": [
|
||||
"Texture.black",
|
||||
"Texture.red",
|
||||
"Texture.green",
|
||||
"Texture.brown",
|
||||
"Texture.blue",
|
||||
"Texture.purple",
|
||||
"Texture.cyan",
|
||||
"Texture.silver",
|
||||
"Texture.gray",
|
||||
"Texture.pink",
|
||||
"Texture.lime",
|
||||
"Texture.yellow",
|
||||
"Texture.light_blue",
|
||||
"Texture.magenta",
|
||||
"Texture.orange",
|
||||
"Texture.white",
|
||||
"Texture.undyed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "lid": "!(q.is_invisible && q.is_bribed)" },
|
||||
{ "base": "!(q.is_invisible && q.is_bribed)" }
|
||||
],
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Array.variants[query.variant]" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.shulker": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.variants": [
|
||||
"Texture.black",
|
||||
"Texture.red",
|
||||
"Texture.green",
|
||||
"Texture.brown",
|
||||
"Texture.blue",
|
||||
"Texture.purple",
|
||||
"Texture.cyan",
|
||||
"Texture.silver",
|
||||
"Texture.gray",
|
||||
"Texture.pink",
|
||||
"Texture.lime",
|
||||
"Texture.yellow",
|
||||
"Texture.light_blue",
|
||||
"Texture.magenta",
|
||||
"Texture.orange",
|
||||
"Texture.white",
|
||||
"Texture.undyed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"part_visibility": [
|
||||
{ "*": true },
|
||||
{ "lid": "!(q.is_invisible && q.is_bribed)" },
|
||||
{ "base": "!(q.is_invisible && q.is_bribed)" }
|
||||
],
|
||||
"materials": [ { "*": "Material.default" } ],
|
||||
"textures": [ "Array.variants[query.variant]" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,45 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.zombie_villager_v2_masked": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.biomes": [
|
||||
"Texture.plains",
|
||||
"Texture.desert",
|
||||
"Texture.jungle",
|
||||
"Texture.savanna",
|
||||
"Texture.snow",
|
||||
"Texture.swamp",
|
||||
"Texture.taiga"
|
||||
],
|
||||
"Array.professions": [
|
||||
"Texture.unskilled",
|
||||
"Texture.farmer",
|
||||
"Texture.fisherman",
|
||||
"Texture.shepherd",
|
||||
"Texture.fletcher",
|
||||
"Texture.librarian",
|
||||
"Texture.cartographer",
|
||||
"Texture.cleric",
|
||||
"Texture.armorer",
|
||||
"Texture.weapon_smith",
|
||||
"Texture.tool_smith",
|
||||
"Texture.butcher",
|
||||
"Texture.leatherworker",
|
||||
"Texture.stonemason",
|
||||
"Texture.nitwit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [
|
||||
{ "*": "query.is_baby ? Material.default : Material.masked" }
|
||||
],
|
||||
"textures": [
|
||||
"Array.biomes[q.mark_variant]",
|
||||
"Array.professions[v.profession_index]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
"controller.render.zombie_villager_v2_masked": {
|
||||
"arrays": {
|
||||
"textures": {
|
||||
"Array.biomes": [
|
||||
"Texture.plains",
|
||||
"Texture.desert",
|
||||
"Texture.jungle",
|
||||
"Texture.savanna",
|
||||
"Texture.snow",
|
||||
"Texture.swamp",
|
||||
"Texture.taiga"
|
||||
],
|
||||
"Array.professions": [
|
||||
"Texture.unskilled",
|
||||
"Texture.farmer",
|
||||
"Texture.fisherman",
|
||||
"Texture.shepherd",
|
||||
"Texture.fletcher",
|
||||
"Texture.librarian",
|
||||
"Texture.cartographer",
|
||||
"Texture.cleric",
|
||||
"Texture.armorer",
|
||||
"Texture.weapon_smith",
|
||||
"Texture.tool_smith",
|
||||
"Texture.butcher",
|
||||
"Texture.leatherworker",
|
||||
"Texture.stonemason",
|
||||
"Texture.nitwit"
|
||||
]
|
||||
}
|
||||
},
|
||||
"geometry": "Geometry.default",
|
||||
"materials": [
|
||||
{ "*": "query.is_baby ? Material.default : Material.masked" }
|
||||
],
|
||||
"textures": [
|
||||
"Array.biomes[q.mark_variant]",
|
||||
"Array.professions[v.profession_index]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user