commit c6c222ef369474a5a3edf2b4c3727fbab047bf28 Author: ScarPC Date: Sun Sep 13 09:16:42 2026 +0300 Add server-only crossbow ammunition and copper rail speed controls diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8d3330c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +* text=auto +*.java text eol=lf +*.json text eol=lf +*.md text eol=lf +*.kts text eol=lf +*.ps1 text eol=lf +gradlew text eol=lf +gradlew.bat text eol=crlf +*.jar binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f66c3e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.gradle/ +build/ +run/ +*.log +.idea/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..d2e85e5 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,8 @@ +# AstraContent + +- Серверный мод Minecraft 26.2 / NeoForge 26.2.0.79 / Java 25. +- Клиент — ванильный Minecraft с серверным ресурспаком. Не добавлять клиентские регистрации или обязательные сетевые каналы. +- Предметы и рецепты используют ванильные компоненты и сериализаторы; ресурсы добавляются в исходники ресурспака AstraPlus. Механики принадлежат AstraContent. +- Правила родительского AGENTS.md о Git и резервных копиях обязательны. +- Для этого мода вместо Paper использовать `C:\Users\ScarPC\Documents\NeoForge Server 26.2\mods`, архив — `old-mods/YYYYMMDD-HHMMSS`. +- Собирать, проверять, устанавливать прямо в mods, сравнивать SHA-256; не менять конфигурации и мир рабочего сервера. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e9891a2 --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +# AstraContent 0.1.0 + +Серверный мод для Minecraft 26.2, NeoForge 26.2.0.79 и Java 25. +**На клиент мод устанавливать не нужно.** Для медного оформления используется обычный +серверный ресурспак AstraPlus. AstraPlus 0.5.x обязателен для сборки ресурсов; +AstraPacks раздаёт их игрокам, если установлен и настроен. + +## Арбалет и огненный заряд + +Обычный арбалет принимает из второй руки или инвентаря: + +- эндер-жемчуг — телепортирует стрелявшего по штатным правилам; +- огненный заряд — малый огненный шар; +- око Эндера — запускает обычное око, указывающее на крепость; если крепость не найдена, предмет возвращается; +- обычные, коричневые и синие яйца, снежки, вихревые заряды и пузырьки опыта — штатные снаряды; +- TNT — подожжённый динамит с обычным фитилём 80 тиков, направленный выстрелом. + +Зарядка, её отмена при отпускании ПКМ, звуки, прочность, быстрый заряд и мультивыстрел +используют ванильный арбалет. Стрелы и фейерверки сохраняют прежние механики. +Мультивыстрел расходует один боеприпас; дополнительные/creative-ока не возвращают предметы. +Разрыв, телепортация, огонь и эффекты проходят через ванильные сущности и события NeoForge. + +ПКМ огненным зарядом в воздух выпускает огненный шар. Расход — один заряд в survival, +задержка — 10 тиков. Использование на блоках сохраняет штатное поджигание. + +## Рельсы + +| Рельсы | Предел на прямой при питании | +|---|---:| +| Медные | 20 м/с | +| Потемневшие | 16 м/с | +| Состаренные | 12 м/с | +| Окисленные | 8 м/с | +| Обычные золотые | 2 × сила сигнала, от 2 до 30 м/с | + +Берётся самый сильный вход, включая питание по соединённым рельсам в пределах +ванильной дальности 8 блоков. У каждой вагонетки сохраняется последний установленный +предел, в том числе после перезапуска. Без питания рельсы тормозят штатным способом. +Обычные рельсы не ускоряют. До первого регулятора сохраняется ванильный предел: +обычно 8 м/с, либо правило уже включённого эксперимента. + +Поддерживаются обычная и экспериментальная физика; мод сам эксперимент не включает. +В обычной физике перед поворотами, уклонами, концом пути, детектором, активатором +и участком торможения скорость ограничивается до 8 м/с, чтобы не пропускать блоки +и не сходить с пути. На воде применяется штатное снижение скорости вдвое. +В экспериментальной физике обработка всех пройденных рельсов остаётся ванильной; +последующее ускорение также ограничено заданным пределом. + +Медные рельсы создаются по рецепту золотых с заменой золота на медь: +6 слитков меди + палка + редстоун → 6 рельсов. Рецепт появляется в книге при получении меди. +Рельсы окисляются с учётом random_tick_speed, соседней меди и загруженности участка. +Соты вощат установленный рельс. Топор сначала снимает воск, затем по одной стадии окисления. +Вощёные варианты имеют те же скорости и не окисляются. + +Оператор может получить стопку любого варианта: + +```text +/astracontent give copper_rail +/astracontent give exposed_copper_rail +/astracontent give weathered_copper_rail +/astracontent give oxidized_copper_rail +/astracontent give waxed_copper_rail +``` + +Префикс `waxed_` доступен для всех четырёх степеней. + +## Совместимость с ванильным клиентом + +В мире стоят настоящие `minecraft:powered_rail`. Поэтому установка, соединения, +выделение, уклоны, вода, потеря опоры и разрушение работают штатно. +Вариант хранится во вложении чанка; дроп и pick block возвращают соответствующий предмет. +Одна временная `item_display` накладывает медную модель, включая питание и наклон. +Отображения не сохраняются как отдельные сущности и восстанавливаются при загрузке чанка. + +Это имеет ограничения ванильного клиента: в F3 видна золотая основа, частицы разрушения +остаются ванильными; без ресурспака или за дальностью отображения сущностей видна основа. +Команды `/clone`, схематики и сторонние редакторы, копирующие только BlockState, +не переносят вложение с медным вариантом. Интеграции защиты должны отменять стандартные +события взаимодействия/разрушения; мод не предоставляет отдельную систему регионов. + +## Установка и разработка + +Рабочий JAR: `C:\Users\ScarPC\Documents\NeoForge Server 26.2\mods\AstraContent-0.1.0.jar`. +После установки требуется перезапуск сервера. При запуске добавляются только отсутствующие +ресурсы в `astraplus/resources/assets/astracontent`; правки администратора не заменяются. +При выключенной стартовой сборке ресурспака выполнить `/astraplus build`. +Конфигурации, миры и исходники AstraPlus установка JAR не заменяет. + +```powershell +.\gradlew.bat build verificationJar +.\tools\verify-server.ps1 +.\tools\verify-server.ps1 -Experimental +``` + +Проверки используют отдельные временные миры в `build/verification-*`, затем перезапускают +их для проверки сохранения. Проверяются настоящий крафт и размещение, дроп, вощение, +боеприпасы, мультивыстрел, ПКМ огненным зарядом, скорости и аналоговый редстоун, +повороты/уклоны во всех направлениях, тормоза, детекторы, активаторы, вода, +типы вагонеток и переходы между ограничениями. Тестовый JAR на рабочий сервер не устанавливается. + +Модели состоят из геометрии и ссылок на ванильные текстуры. Воспроизводимая генерация: +`tools/generate-resources.ps1`. Визуальная проверка в живом клиенте отдельно не автоматизирована. diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..ecacb94 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,22 @@ +plugins { java; id("net.neoforged.moddev") version "2.0.146" } +group = "online.astradev" +version = "0.1.0" +repositories { mavenCentral() } +dependencies { + testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") + testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.4") +} +neoForge { + version = "26.2.0.79" + mods { create("astracontent") { sourceSet(sourceSets.main.get()) } } +} +java { toolchain.languageVersion.set(JavaLanguageVersion.of(25)); withSourcesJar() } +tasks.withType().configureEach { options.encoding = "UTF-8"; options.release.set(25) } +tasks.processResources { filesMatching("META-INF/neoforge.mods.toml") { expand("version" to project.version) } } +tasks.test { useJUnitPlatform() } +sourceSets.test { compileClasspath += sourceSets.main.get().compileClasspath; runtimeClasspath += sourceSets.main.get().compileClasspath } +val verification = sourceSets.create("verification") { + compileClasspath += sourceSets.main.get().output + sourceSets.main.get().compileClasspath + runtimeClasspath += output + compileClasspath +} +tasks.register("verificationJar") { from(verification.output); archiveClassifier.set("verification") } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..eddabd2 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..00fba3d --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,10 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip +networkTimeout=10000 +retries=0 +retryBackOffMs=500 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionSha256Sum=acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..249efbb --- /dev/null +++ b/gradlew @@ -0,0 +1,248 @@ +#!/bin/sh + +# +# Copyright © 2015 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. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# gradlew 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 gradlew +# +# 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/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/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 + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# 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 + + + +# 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + 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" ) + + 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 + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# 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" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..a51ec4f --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,82 @@ +@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 +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem gradlew startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:execute +@rem Setup the command line + + + +@rem Execute gradlew +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..35b4615 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,2 @@ +plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } +rootProject.name = "AstraContent" diff --git a/src/main/java/online/astradev/content/AstraContent.java b/src/main/java/online/astradev/content/AstraContent.java new file mode 100644 index 0000000..1b0db89 --- /dev/null +++ b/src/main/java/online/astradev/content/AstraContent.java @@ -0,0 +1,20 @@ +package online.astradev.content; + +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.loading.FMLPaths; +import net.neoforged.neoforge.common.NeoForge; +import online.astradev.content.rail.Rails; +import online.astradev.content.weapon.Ammunition; + +@Mod(value = "astracontent", dist = Dist.DEDICATED_SERVER) +public final class AstraContent { + public AstraContent(IEventBus bus) { + Defaults.install(FMLPaths.GAMEDIR.get()); + Rails.register(bus); + NeoForge.EVENT_BUS.register(Rails.class); + NeoForge.EVENT_BUS.register(Ammunition.class); + NeoForge.EVENT_BUS.register(online.astradev.content.rail.RailCommands.class); + } +} diff --git a/src/main/java/online/astradev/content/Defaults.java b/src/main/java/online/astradev/content/Defaults.java new file mode 100644 index 0000000..d864446 --- /dev/null +++ b/src/main/java/online/astradev/content/Defaults.java @@ -0,0 +1,27 @@ +package online.astradev.content; + +import java.nio.file.*; +import java.nio.charset.StandardCharsets; + +/** Install absent defaults before AstraPlus loads its catalog. Never overwrite administrator edits. */ +public final class Defaults { + private Defaults() {} + public static void install(Path root) { + try (var index = Defaults.class.getResourceAsStream("/defaults/index.txt")) { + if (index == null) throw new IllegalStateException("Missing content index"); + for (String name : new String(index.readAllBytes(), StandardCharsets.UTF_8).lines().toList()) { + if (name.isBlank()) continue; + Path target = root.toAbsolutePath().normalize().resolve("astraplus").resolve(name).normalize(); + if (!target.startsWith(root.toAbsolutePath().normalize().resolve("astraplus"))) throw new IllegalArgumentException(name); + for (Path part = target; part != null; part = part.getParent()) + if (Files.isSymbolicLink(part)) throw new IllegalStateException("Symbolic link: " + part); + if (Files.exists(target)) continue; + Files.createDirectories(target.getParent()); + try (var stream = Defaults.class.getResourceAsStream("/defaults/" + name)) { + if (stream == null) throw new IllegalStateException("Missing default: " + name); + Files.copy(stream, target); + } + } + } catch (java.io.IOException e) { throw new IllegalStateException("Cannot install AstraContent defaults", e); } + } +} diff --git a/src/main/java/online/astradev/content/mixin/CrossbowMixin.java b/src/main/java/online/astradev/content/mixin/CrossbowMixin.java new file mode 100644 index 0000000..6811dab --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/CrossbowMixin.java @@ -0,0 +1,21 @@ +package online.astradev.content.mixin; + +import java.util.function.Predicate; +import net.minecraft.world.item.*; +import net.minecraft.world.level.Level; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.projectile.Projectile; +import online.astradev.content.weapon.Ammunition; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(CrossbowItem.class) +public abstract class CrossbowMixin { + @Inject(method = {"getSupportedHeldProjectiles()Ljava/util/function/Predicate;", "getAllSupportedProjectiles()Ljava/util/function/Predicate;"}, at = @At("RETURN"), cancellable = true) + private void astra$ammo(CallbackInfoReturnable> cir) { cir.setReturnValue(cir.getReturnValue().or(Ammunition::accepts)); } + @Inject(method = "createProjectile", at = @At("HEAD"), cancellable = true) + private void astra$create(Level level, LivingEntity owner, ItemStack weapon, ItemStack ammo, boolean critical, CallbackInfoReturnable cir) { + if (Ammunition.accepts(ammo)) cir.setReturnValue(Ammunition.create(level, owner, ammo)); + } +} diff --git a/src/main/java/online/astradev/content/mixin/ExperimentalCartMixin.java b/src/main/java/online/astradev/content/mixin/ExperimentalCartMixin.java new file mode 100644 index 0000000..7e8e733 --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/ExperimentalCartMixin.java @@ -0,0 +1,21 @@ +package online.astradev.content.mixin; + +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.vehicle.minecart.*; +import net.minecraft.world.phys.Vec3; +import online.astradev.content.rail.CartSpeed; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(NewMinecartBehavior.class) +public abstract class ExperimentalCartMixin extends MinecartBehavior { + protected ExperimentalCartMixin(AbstractMinecart cart){super(cart);} + @Inject(method="calculateTrackSpeed",at=@At("RETURN"),cancellable=true) + private void astra$exactSpeed(CallbackInfoReturnable cir) { + if(!(level() instanceof ServerLevel level))return; + double limit=((CartSpeed)minecart).astracontent$limit(level); + var movement=cir.getReturnValue(); + if(limit>0 && movement.horizontalDistance()>limit)cir.setReturnValue(movement.scale(limit/movement.horizontalDistance())); + } +} diff --git a/src/main/java/online/astradev/content/mixin/FurnaceCartMixin.java b/src/main/java/online/astradev/content/mixin/FurnaceCartMixin.java new file mode 100644 index 0000000..61ec1d2 --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/FurnaceCartMixin.java @@ -0,0 +1,14 @@ +package online.astradev.content.mixin; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.vehicle.minecart.MinecartFurnace; +import online.astradev.content.rail.CartSpeed; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +@Mixin(MinecartFurnace.class) +public abstract class FurnaceCartMixin { + @Inject(method="getMaxSpeed",at=@At("RETURN"),cancellable=true) + private void astra$furnace(ServerLevel level,CallbackInfoReturnable cir) { + double limit=((CartSpeed)this).astracontent$limit(level);if(limit>0)cir.setReturnValue(limit); + } +} diff --git a/src/main/java/online/astradev/content/mixin/MinecartMixin.java b/src/main/java/online/astradev/content/mixin/MinecartMixin.java new file mode 100644 index 0000000..0a206fc --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/MinecartMixin.java @@ -0,0 +1,33 @@ +package online.astradev.content.mixin; + +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.vehicle.minecart.AbstractMinecart; +import net.minecraft.world.level.storage.*; +import online.astradev.content.rail.RailSpeed; +import org.spongepowered.asm.mixin.*; +import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.callback.*; + +@Mixin(AbstractMinecart.class) +public abstract class MinecartMixin implements online.astradev.content.rail.CartSpeed { + @Unique private double astra$speed; + @Inject(method="getMaxSpeed",at=@At("RETURN"),cancellable=true) + private void astra$limit(ServerLevel level,CallbackInfoReturnable cir) { + double limit=astracontent$limit(level); + if(limit>0)cir.setReturnValue(limit); + } + @Override public double astracontent$limit(ServerLevel level) { + var cart=(AbstractMinecart)(Object)this; + astra$speed=RailSpeed.target(level,cart.getCurrentBlockPosOrRailBelow(),astra$speed); + // Preserve existing experimental gamerules until this cart reaches a regulator. + if(astra$speed==0) return 0; + double limit=RailSpeed.safeLimit(cart,level,astra$speed/20); + return limit*(cart.isInWater()?.5:1); + } + @Inject(method="addAdditionalSaveData",at=@At("RETURN")) + private void astra$save(ValueOutput out,CallbackInfo ci) { if(astra$speed>0)out.putDouble("AstraContentSpeed",astra$speed); } + @Inject(method="readAdditionalSaveData",at=@At("RETURN")) + private void astra$read(ValueInput in,CallbackInfo ci) { + double value=in.getDoubleOr("AstraContentSpeed",0); astra$speed=Double.isFinite(value) && value>0?Math.clamp(value,2,30):0; + } +} diff --git a/src/main/java/online/astradev/content/mixin/PayloadMixin.java b/src/main/java/online/astradev/content/mixin/PayloadMixin.java new file mode 100644 index 0000000..63b6648 --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/PayloadMixin.java @@ -0,0 +1,17 @@ +package online.astradev.content.mixin; + +import net.minecraft.world.entity.projectile.EyeOfEnder; +import net.minecraft.world.phys.Vec3; +import online.astradev.content.weapon.PayloadProjectile; +import org.spongepowered.asm.mixin.*; +import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(EyeOfEnder.class) +public abstract class PayloadMixin { + @Shadow private boolean surviveAfterDeath; + @Inject(method = "signalTo", at = @At("RETURN")) + private void astra$noDuplicate(Vec3 target, CallbackInfo ci) { + if (((EyeOfEnder)(Object)this).entityTags().contains(PayloadProjectile.NO_EYE_DROP)) surviveAfterDeath = false; + } +} diff --git a/src/main/java/online/astradev/content/mixin/RailBlockMixin.java b/src/main/java/online/astradev/content/mixin/RailBlockMixin.java new file mode 100644 index 0000000..28709d9 --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/RailBlockMixin.java @@ -0,0 +1,35 @@ +package online.astradev.content.mixin; + +import java.util.List; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.LootParams; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import online.astradev.content.rail.Rails; +import org.spongepowered.asm.mixin.Mixin; + +@Mixin(PoweredRailBlock.class) +public abstract class RailBlockMixin extends BaseRailBlock { + protected RailBlockMixin(boolean straight, Properties properties) { super(straight,properties); } + @Override public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { + super.setPlacedBy(level,pos,state,placer,stack); + if (state.is(Blocks.POWERED_RAIL) && level instanceof ServerLevel server) Rails.placed(server,pos,stack); + } + @Override protected List getDrops(BlockState state, LootParams.Builder params) { + var drops = super.getDrops(state,params); var origin = params.getOptionalParameter(LootContextParams.ORIGIN); + if (!state.is(Blocks.POWERED_RAIL) || origin == null) return drops; + var kind = Rails.loot(params.getLevel(),BlockPos.containing(origin)); + return kind == null ? drops : drops.stream().map(stack -> stack.is(asItem()) ? Rails.stack(kind,stack.getCount()) : stack).toList(); + } + @Override protected ItemStack getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData) { + if (level instanceof ServerLevel server && state.is(Blocks.POWERED_RAIL)) { + var kind=Rails.find(server,pos); if(kind!=null) return Rails.stack(kind,1); + } + return super.getCloneItemStack(level,pos,state,includeData); + } +} diff --git a/src/main/java/online/astradev/content/mixin/RailChunkMixin.java b/src/main/java/online/astradev/content/mixin/RailChunkMixin.java new file mode 100644 index 0000000..16875ed --- /dev/null +++ b/src/main/java/online/astradev/content/mixin/RailChunkMixin.java @@ -0,0 +1,16 @@ +package online.astradev.content.mixin; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.LevelChunk; +import online.astradev.content.rail.Rails; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +@Mixin(LevelChunk.class) +public abstract class RailChunkMixin { + @Inject(method="setBlockState",at=@At("RETURN")) + private void astra$changed(BlockPos pos,BlockState state,int flags,CallbackInfoReturnable cir) { + if (((LevelChunk)(Object)this).getLevel() instanceof ServerLevel level) Rails.changed(level,pos,cir.getReturnValue(),state); + } +} diff --git a/src/main/java/online/astradev/content/rail/CartSpeed.java b/src/main/java/online/astradev/content/rail/CartSpeed.java new file mode 100644 index 0000000..b42ad89 --- /dev/null +++ b/src/main/java/online/astradev/content/rail/CartSpeed.java @@ -0,0 +1,6 @@ +package online.astradev.content.rail; +import net.minecraft.server.level.ServerLevel; +public interface CartSpeed { + /** Blocks per tick, or zero until the cart encounters a powered speed regulator. */ + double astracontent$limit(ServerLevel level); +} diff --git a/src/main/java/online/astradev/content/rail/RailCommands.java b/src/main/java/online/astradev/content/rail/RailCommands.java new file mode 100644 index 0000000..d421509 --- /dev/null +++ b/src/main/java/online/astradev/content/rail/RailCommands.java @@ -0,0 +1,20 @@ +package online.astradev.content.rail; +import net.minecraft.commands.Commands; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.RegisterCommandsEvent; +public final class RailCommands { + private RailCommands() {} + @SubscribeEvent public static void register(RegisterCommandsEvent event) { + var give=Commands.literal("give"); + for(int i=0;i<8;i++) { + var kind=RailKind.decode(i); + give.then(Commands.literal(kind.id().getPath()).executes(ctx->{ + var player=ctx.getSource().getPlayerOrException(); + var stack=Rails.stack(kind,64); + if(!player.getInventory().add(stack)) player.drop(stack,false); + return 1; + })); + } + event.getDispatcher().register(Commands.literal("astracontent").requires(Commands.hasPermission(Commands.LEVEL_GAMEMASTERS)).then(give)); + } +} diff --git a/src/main/java/online/astradev/content/rail/RailDisplay.java b/src/main/java/online/astradev/content/rail/RailDisplay.java new file mode 100644 index 0000000..c56b581 --- /dev/null +++ b/src/main/java/online/astradev/content/rail/RailDisplay.java @@ -0,0 +1,36 @@ +package online.astradev.content.rail; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.Identifier; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.Display; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.item.*; +import net.minecraft.world.level.block.PoweredRailBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.ValueOutput; + +final class RailDisplay extends Display.ItemDisplay { + private String previous; + RailDisplay(ServerLevel level, BlockPos pos) { + super(EntityTypes.ITEM_DISPLAY,level); + setPos(pos.getX()+.5,pos.getY()+.5,pos.getZ()+.5); + setItemTransform(ItemDisplayContext.NONE); setNoGravity(true); setInvulnerable(true); setSilent(true); + } + void update(RailKind kind, BlockState state) { + var shape = state.getValue(PoweredRailBlock.SHAPE); + boolean eastWest = shape == net.minecraft.world.level.block.state.properties.RailShape.EAST_WEST + || shape == net.minecraft.world.level.block.state.properties.RailShape.ASCENDING_EAST + || shape == net.minecraft.world.level.block.state.properties.RailShape.ASCENDING_WEST; + String model = "rail_display/" + kind.age() + "/" + state.getValue(PoweredRailBlock.SHAPE).getSerializedName() + + (state.getValue(PoweredRailBlock.POWERED) ? "_on" : ""); + if (model.equals(previous)) return; + var stack = new ItemStack(Items.PAPER); stack.set(DataComponents.ITEM_MODEL,Identifier.fromNamespaceAndPath("astracontent",model)); + getSlot(0).set(stack); previous=model; + setTransformation(new com.mojang.math.Transformation(new org.joml.Vector3f(), + new org.joml.Quaternionf().rotateY(eastWest ? -(float)Math.PI/2 : 0),new org.joml.Vector3f(1),new org.joml.Quaternionf())); + } + @Override public boolean shouldBeSaved() { return false; } + @Override public boolean saveAsPassenger(ValueOutput output) { return false; } +} diff --git a/src/main/java/online/astradev/content/rail/RailItems.java b/src/main/java/online/astradev/content/rail/RailItems.java new file mode 100644 index 0000000..be21fec --- /dev/null +++ b/src/main/java/online/astradev/content/rail/RailItems.java @@ -0,0 +1,29 @@ +package online.astradev.content.rail; + +import net.minecraft.core.component.DataComponents; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.*; +import net.minecraft.world.item.component.CustomData; + +/** Vanilla item, vanilla components: native placement prediction without a client mod. */ +public final class RailItems { + public static final String KEY="astracontent:rail"; + private RailItems() {} + public static RailKind find(ItemStack stack) { + if(!stack.is(Items.POWERED_RAIL)) return null; + var data=stack.get(DataComponents.CUSTOM_DATA);if(data==null)return null; + int value=data.copyTag().getIntOr(KEY,-1); + return value>=0 && value<8?RailKind.decode(value):null; + } + public static ItemStack create(RailKind kind,int count) { + var stack=new ItemStack(Items.POWERED_RAIL,count); + var tag=new CompoundTag();tag.putInt(KEY,kind.code());stack.set(DataComponents.CUSTOM_DATA,CustomData.of(tag)); + stack.set(DataComponents.ITEM_MODEL,kind.id()); + stack.set(DataComponents.ITEM_NAME,Component.translatableWithFallback("item.astracontent."+kind.id().getPath(),name(kind))); + return stack; + } + public static String name(RailKind kind) { + return (kind.waxed()?"Вощёные: ":"")+new String[]{"Медные рельсы","Потемневшие медные рельсы","Состаренные медные рельсы","Окисленные медные рельсы"}[kind.age()]; + } +} diff --git a/src/main/java/online/astradev/content/rail/RailKind.java b/src/main/java/online/astradev/content/rail/RailKind.java new file mode 100644 index 0000000..2375ad8 --- /dev/null +++ b/src/main/java/online/astradev/content/rail/RailKind.java @@ -0,0 +1,17 @@ +package online.astradev.content.rail; + +import net.minecraft.resources.Identifier; +public record RailKind(int age, boolean waxed) { + public RailKind { if (age < 0 || age > 3) throw new IllegalArgumentException("Oxidation: " + age); } + public int speed() { return 20 - 4 * age; } + public int code() { return age + (waxed ? 4 : 0); } + public static RailKind decode(int code) { return new RailKind(code & 3, (code & 4) != 0); } + public Identifier id() { + return Identifier.fromNamespaceAndPath("astracontent", (waxed ? "waxed_" : "") + + new String[]{"", "exposed_", "weathered_", "oxidized_"}[age] + "copper_rail"); + } + public static RailKind fromId(Identifier id) { + for (int code = 0; code < 8; code++) if (decode(code).id().equals(id)) return decode(code); + return null; + } +} diff --git a/src/main/java/online/astradev/content/rail/RailOxidation.java b/src/main/java/online/astradev/content/rail/RailOxidation.java new file mode 100644 index 0000000..8c3f937 --- /dev/null +++ b/src/main/java/online/astradev/content/rail/RailOxidation.java @@ -0,0 +1,28 @@ +package online.astradev.content.rail; + +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.block.WeatheringCopper; +import net.minecraft.world.level.gamerules.GameRules; + +/** Match copper's random-tick selection, age neighborhood and oxidation probability. */ +final class RailOxidation { + private RailOxidation() {} + static boolean advance(ServerLevel level,BlockPos pos,RailKind kind) { + if(kind.waxed() || kind.age()==3 || !level.isPositionEntityTicking(pos))return false; + int rate=level.getGameRules().get(GameRules.RANDOM_TICK_SPEED); + double chance=1-Math.pow(1-.05688889/4096,rate); + if(level.getRandom().nextDouble()>=chance)return false; + int older=0,same=0; + for(var other:BlockPos.withinManhattan(pos,4,4,4)) { + int distance=other.distManhattan(pos);if(distance>4)break;if(distance==0 || !level.hasChunkAt(other))continue; + int age=-1; + var rail=Rails.find(level,other); + if(rail!=null && !rail.waxed())age=rail.age(); + else if(level.getBlockState(other).getBlock() instanceof WeatheringCopper copper)age=copper.getAge().ordinal(); + if(age<0)continue;if(agekind.age())older++;else same++; + } + double ratio=(older+1.0)/(older+same+1.0); + return level.getRandom().nextDouble()(); var seen=new HashSet(); queue.add(new Step(origin,0)); + int best=0; + while(!queue.isEmpty()) { + var step=queue.removeFirst(); if(!seen.add(step.pos) || !level.hasChunkAt(step.pos)) continue; + var state=level.getBlockState(step.pos); + if (!state.is(Blocks.POWERED_RAIL)) continue; + best=Math.max(best,level.getBestNeighborSignal(step.pos)); if(best==15) return best; + if(step.distance==8) continue; + var shape=state.getValue(PoweredRailBlock.SHAPE); + var exits=AbstractMinecart.exits(shape); + for(var exit:List.of(exits.getFirst(),exits.getSecond())) { + var adjacent=step.pos.offset(exit.getX(),shape.isSlope()?exit.getY()+1:0,exit.getZ()); + for(var candidate:List.of(adjacent,adjacent.below())) { + if(!level.hasChunkAt(candidate)) continue; + var other=level.getBlockState(candidate); + if(other.is(Blocks.POWERED_RAIL) && connected(step.pos,shape,candidate,other.getValue(PoweredRailBlock.SHAPE))) + queue.add(new Step(candidate,step.distance+1)); + } + } + } + return best; + } + private static boolean connected(BlockPos a,RailShape sa,BlockPos b,RailShape sb) { + var ea=AbstractMinecart.exits(sa); var eb=AbstractMinecart.exits(sb); + for(var x:List.of(ea.getFirst(),ea.getSecond())) for(var y:List.of(eb.getFirst(),eb.getSecond())) + if(a.getX()+x.getX()==b.getX() && a.getZ()+x.getZ()==b.getZ() + && b.getX()+y.getX()==a.getX() && b.getZ()+y.getZ()==a.getZ() + && a.getY()+(sa.isSlope()?x.getY()+1:0)==b.getY()+(sb.isSlope()?y.getY()+1:0)) return true; + return false; + } + /** Old movement needs vanilla speed when approaching bends, slopes or the end of a track. */ + public static double safeLimit(AbstractMinecart cart,ServerLevel level,double limit) { + if(AbstractMinecart.useExperimentalMovement(level) || limit<=.4) return limit; + var pos=cart.getCurrentBlockPosOrRailBelow(); var movement=cart.getDeltaMovement(); + int dx=(int)Math.signum(movement.x), dz=(int)Math.signum(movement.z); + for(int i=0;i<=2;i++) { + var check=pos.offset(dx*i,0,dz*i); + if(!level.hasChunkAt(check)) return .4; + BlockState state=level.getBlockState(check); + if(!(state.getBlock() instanceof BaseRailBlock rail)) return .4; + RailShape shape=rail.getRailDirection(state,level,check,cart); + if(shape!=RailShape.NORTH_SOUTH && shape!=RailShape.EAST_WEST) return .4; + if (i>0 && (state.is(Blocks.DETECTOR_RAIL) || state.is(Blocks.ACTIVATOR_RAIL) + || state.is(Blocks.POWERED_RAIL) && !state.getValue(PoweredRailBlock.POWERED))) return .4; + // Never jump over a single slower regulator. + if (i>0) limit=Math.min(limit,target(level,check,limit*20)/20); + } + return limit; + } +} diff --git a/src/main/java/online/astradev/content/rail/Rails.java b/src/main/java/online/astradev/content/rail/Rails.java new file mode 100644 index 0000000..d7aa34a --- /dev/null +++ b/src/main/java/online/astradev/content/rail/Rails.java @@ -0,0 +1,115 @@ +package online.astradev.content.rail; + +import com.mojang.serialization.Codec; +import java.util.*; +import java.util.function.Supplier; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.*; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.LevelChunk; +import net.neoforged.bus.api.*; +import net.neoforged.neoforge.attachment.AttachmentType; +import net.neoforged.neoforge.registries.*; +import net.neoforged.neoforge.event.level.ChunkEvent; +import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent; +import net.neoforged.neoforge.event.tick.ServerTickEvent; +import net.neoforged.neoforge.event.server.ServerStoppedEvent; + +/** Native powered rails own placement, shape, redstone, collision and destruction. */ +public final class Rails { + private static final DeferredRegister> TYPES = DeferredRegister.create(NeoForgeRegistries.Keys.ATTACHMENT_TYPES, "astracontent"); + public static final Supplier>> DATA = TYPES.register("copper_rails", () -> + AttachmentType.>builder(() -> new HashMap<>()).serialize( + Codec.unboundedMap(Codec.STRING.xmap(Long::parseLong, String::valueOf), Codec.intRange(0,7)) + .xmap(map -> (Map)new HashMap<>(map), map -> map).fieldOf("rails"), map -> !map.isEmpty()).build()); + private record Position(ServerLevel level, BlockPos pos) {} + private record Removed(RailKind kind, long tick) {} + private static final Map ACTIVE = new HashMap<>(); + private static final Map REMOVED = new HashMap<>(); + private Rails() {} + public static void register(IEventBus bus) { TYPES.register(bus); } + public static RailKind find(ServerLevel level, BlockPos pos) { + var chunk = level.getChunkSource().getChunkNow(pos.getX() >> 4, pos.getZ() >> 4); + if (chunk == null || !chunk.hasData(DATA)) return null; + Integer code = chunk.getData(DATA).get(pos.asLong()); + return code == null ? null : RailKind.decode(code); + } + public static RailKind loot(ServerLevel level, BlockPos pos) { + var kind = find(level,pos); + var removed = REMOVED.get(new Position(level,pos)); + return kind != null ? kind : removed != null && removed.tick == level.getGameTime() ? removed.kind : null; + } + public static ItemStack stack(RailKind kind, int count) { return RailItems.create(kind,count); } + public static void placed(ServerLevel level, BlockPos pos, ItemStack stack) { + clear(level,pos); REMOVED.remove(new Position(level,pos)); + var kind = RailItems.find(stack); + if (kind != null) put(level,pos,kind); + } + public static void put(ServerLevel level, BlockPos pos, RailKind kind) { + var chunk = level.getChunkAt(pos); chunk.getData(DATA).put(pos.asLong(),kind.code()); chunk.markUnsaved(); + ACTIVE.putIfAbsent(new Position(level,pos.immutable()), null); + } + public static void changed(ServerLevel level, BlockPos pos, BlockState before, BlockState after) { + if (before == null || !before.is(Blocks.POWERED_RAIL) || after.is(Blocks.POWERED_RAIL)) return; + var kind = find(level,pos); + if (kind != null) { REMOVED.put(new Position(level,pos.immutable()),new Removed(kind,level.getGameTime())); clear(level,pos); } + } + private static void clear(ServerLevel level, BlockPos pos) { + var chunk = level.getChunkSource().getChunkNow(pos.getX() >> 4,pos.getZ() >> 4); + if (chunk != null && chunk.hasData(DATA) && chunk.getData(DATA).remove(pos.asLong()) != null) chunk.markUnsaved(); + var display = ACTIVE.remove(new Position(level,pos)); if (display != null) display.discard(); + } + @SubscribeEvent public static void load(ChunkEvent.Load event) { + if (!(event.getLevel() instanceof ServerLevel level) || !(event.getChunk() instanceof LevelChunk chunk)) return; + level.getServer().execute(() -> { + if (level.getChunkSource().getChunkNow(chunk.getPos().x(),chunk.getPos().z()) != chunk || !chunk.hasData(DATA)) return; + chunk.getData(DATA).forEach((packed,code) -> { + var pos = BlockPos.of(packed); + if (pos.getX() >> 4 == chunk.getPos().x() && pos.getZ() >> 4 == chunk.getPos().z()) + ACTIVE.putIfAbsent(new Position(level,pos),null); + }); + }); + } + @SubscribeEvent public static void unload(ChunkEvent.Unload event) { + for (var key : new ArrayList<>(ACTIVE.keySet())) if (key.level == event.getLevel() + && key.pos.getX() >> 4 == event.getChunk().getPos().x() && key.pos.getZ() >> 4 == event.getChunk().getPos().z()) { + var display = ACTIVE.remove(key); if (display != null) display.discard(); + } + } + @SubscribeEvent public static void stopped(ServerStoppedEvent event) { + ACTIVE.values().stream().filter(Objects::nonNull).forEach(RailDisplay::discard); ACTIVE.clear(); REMOVED.clear(); + } + @SubscribeEvent public static void tick(ServerTickEvent.Post event) { + for (var key : new ArrayList<>(ACTIVE.keySet())) { + var state = key.level.getBlockState(key.pos); var kind = find(key.level,key.pos); + if (kind == null || !state.is(Blocks.POWERED_RAIL)) { clear(key.level,key.pos); continue; } + if (RailOxidation.advance(key.level,key.pos,kind)) { + kind = new RailKind(kind.age()+1,false); put(key.level,key.pos,kind); + } + var display = ACTIVE.get(key); + if (display == null || display.isRemoved()) { + display = new RailDisplay(key.level,key.pos); display.update(kind,state); + if (key.level.addFreshEntity(display)) ACTIVE.put(key,display); + } else display.update(kind,state); + } + REMOVED.entrySet().removeIf(entry -> entry.getValue().tick < entry.getKey().level.getGameTime()); + } + @SubscribeEvent public static void use(PlayerInteractEvent.RightClickBlock event) { + if (!(event.getLevel() instanceof ServerLevel level)) return; + var kind = find(level,event.getPos()); if (kind == null) return; + var item = event.getItemStack(); RailKind next; + int effect; + if (item.is(Items.HONEYCOMB) && !kind.waxed()) { next = new RailKind(kind.age(),true); effect=3003; } + else if (item.getItem() instanceof AxeItem && (kind.waxed() || kind.age()>0)) { + next = kind.waxed() ? new RailKind(kind.age(),false) : new RailKind(kind.age()-1,false); effect=kind.waxed()?3004:3005; + } else return; + if (!event.getEntity().mayBuild()) return; + put(level,event.getPos(),next); level.levelEvent(null,effect,event.getPos(),0); + if (item.is(Items.HONEYCOMB)) item.consume(1,event.getEntity()); + else item.hurtAndBreak(1,event.getEntity(),event.getHand().asEquipmentSlot()); + event.setCanceled(true); event.setCancellationResult(InteractionResult.SUCCESS); + } +} diff --git a/src/main/java/online/astradev/content/weapon/Ammunition.java b/src/main/java/online/astradev/content/weapon/Ammunition.java new file mode 100644 index 0000000..b17ac5e --- /dev/null +++ b/src/main/java/online/astradev/content/weapon/Ammunition.java @@ -0,0 +1,53 @@ +package online.astradev.content.weapon; + +import net.minecraft.core.component.DataComponents; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.*; +import net.minecraft.stats.Stats; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.entity.projectile.hurtingprojectile.SmallFireball; +import net.minecraft.world.entity.projectile.throwableitemprojectile.*; +import net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.WindCharge; +import net.minecraft.world.item.*; +import net.minecraft.world.level.Level; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent; + +public final class Ammunition { + private Ammunition() {} + public static boolean accepts(ItemStack stack) { + return stack.is(Items.ENDER_PEARL) || stack.is(Items.FIRE_CHARGE) || stack.is(Items.ENDER_EYE) + || stack.getItem() instanceof EggItem || stack.is(Items.SNOWBALL) || stack.is(Items.WIND_CHARGE) + || stack.is(Items.EXPERIENCE_BOTTLE) || stack.is(Items.TNT); + } + public static Projectile create(Level level, LivingEntity owner, ItemStack ammo) { + if (ammo.is(Items.ENDER_PEARL)) return new ThrownEnderpearl(level, owner, ammo); + if (ammo.getItem() instanceof EggItem) return new ThrownEgg(level, owner, ammo); + if (ammo.is(Items.SNOWBALL)) return new Snowball(level, owner, ammo); + if (ammo.is(Items.EXPERIENCE_BOTTLE)) return new ThrownExperienceBottle(level, owner, ammo); + if (ammo.is(Items.FIRE_CHARGE)) { + var fire = new SmallFireball(level, owner, owner.getLookAngle()); + fire.setPos(owner.getX(), owner.getEyeY() - .15, owner.getZ()); fire.setItem(ammo); return fire; + } + if (ammo.is(Items.WIND_CHARGE)) { + var wind = new WindCharge(level, owner.getX(), owner.getEyeY() - .15, owner.getZ(), owner.getLookAngle()); + wind.setOwner(owner); return wind; + } + if (ammo.is(Items.TNT) || ammo.is(Items.ENDER_EYE)) return new PayloadProjectile(level, owner, ammo); + return null; + } + @SubscribeEvent public static void fireCharge(PlayerInteractEvent.RightClickItem event) { + if (!(event.getLevel() instanceof ServerLevel level) || !event.getItemStack().is(Items.FIRE_CHARGE)) return; + var player = event.getEntity(); var stack = event.getItemStack(); + if (player.getCooldowns().isOnCooldown(stack)) return; + var fire = create(level, player, stack); + Projectile.spawnProjectile(fire, level, stack, shot -> shot.shootFromRotation(player, player.getXRot(), player.getYRot(), 0, 1.5f, 1)); + level.playSound(null, player.blockPosition(), SoundEvents.FIRECHARGE_USE, SoundSource.PLAYERS, 1, 1); + player.getCooldowns().addCooldown(stack, 10); + player.awardStat(Stats.ITEM_USED.get(stack.getItem())); + stack.consume(1, player); + event.setCanceled(true); event.setCancellationResult(InteractionResult.SUCCESS); + } +} diff --git a/src/main/java/online/astradev/content/weapon/PayloadProjectile.java b/src/main/java/online/astradev/content/weapon/PayloadProjectile.java new file mode 100644 index 0000000..f6403cb --- /dev/null +++ b/src/main/java/online/astradev/content/weapon/PayloadProjectile.java @@ -0,0 +1,34 @@ +package online.astradev.content.weapon; + +import net.minecraft.core.component.DataComponents; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.StructureTags; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.item.PrimedTnt; +import net.minecraft.world.entity.projectile.EyeOfEnder; +import net.minecraft.world.entity.projectile.throwableitemprojectile.Snowball; +import net.minecraft.world.item.*; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; + +/** One-tick shooting adapter; the payload itself is a vanilla entity understood by every client. */ +public final class PayloadProjectile extends Snowball { + public static final String NO_EYE_DROP = "astracontent:no_eye_drop"; + public PayloadProjectile(Level level, LivingEntity owner, ItemStack stack) { super(level, owner, stack); } + @Override public void tick() { + if (!(level() instanceof ServerLevel level)) return; + if (getItem().is(Items.TNT)) { + var tnt = new PrimedTnt(level, getX(), getY(), getZ(), getOwner() instanceof LivingEntity living ? living : null); + tnt.setDeltaMovement(getDeltaMovement()); level.addFreshEntity(tnt); + } else { + var target = level.findNearestMapStructure(StructureTags.EYE_OF_ENDER_LOCATED, blockPosition(), 100, false); + if (target != null) { + var eye = new EyeOfEnder(level, getX(), getY(), getZ()); + eye.setItem(getItem()); + if (getItem().has(DataComponents.INTANGIBLE_PROJECTILE)) eye.addTag(NO_EYE_DROP); + eye.signalTo(Vec3.atLowerCornerOf(target)); eye.setDeltaMovement(getDeltaMovement()); level.addFreshEntity(eye); + } else if (!getItem().has(DataComponents.INTANGIBLE_PROJECTILE)) spawnAtLocation(level, getItem().copyWithCount(1)); + } + discard(); + } +} diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg new file mode 100644 index 0000000..bf192c2 --- /dev/null +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1,2 @@ +public net.minecraft.world.entity.Display setTransformation(Lcom/mojang/math/Transformation;)V +public net.minecraft.world.entity.Display$ItemDisplay setItemTransform(Lnet/minecraft/world/item/ItemDisplayContext;)V diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml new file mode 100644 index 0000000..24cab21 --- /dev/null +++ b/src/main/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,26 @@ +modLoader="javafml" +loaderVersion="[11,)" +license="All Rights Reserved" +[[mods]] +modId="astracontent" +version="${version}" +displayName="AstraContent" +description='''Server-only crossbow ammunition and copper rails. Vanilla clients supported.''' +[[mixins]] +config="astracontent.mixins.json" +[[dependencies.astracontent]] +modId="neoforge" +type="required" +versionRange="[26.2.0.79,26.3)" +side="SERVER" +[[dependencies.astracontent]] +modId="minecraft" +type="required" +versionRange="[26.2,26.3)" +side="SERVER" +[[dependencies.astracontent]] +modId="astraplus" +type="required" +versionRange="[0.5.0,0.6)" +ordering="AFTER" +side="SERVER" diff --git a/src/main/resources/astracontent.mixins.json b/src/main/resources/astracontent.mixins.json new file mode 100644 index 0000000..a58a1da --- /dev/null +++ b/src/main/resources/astracontent.mixins.json @@ -0,0 +1,7 @@ +{ + "required": true, + "package": "online.astradev.content.mixin", + "compatibilityLevel": "JAVA_25", + "mixins": ["CrossbowMixin", "RailBlockMixin", "RailChunkMixin", "MinecartMixin", "PayloadMixin", "ExperimentalCartMixin", "FurnaceCartMixin"], + "injectors": {"defaultRequire": 1} +} diff --git a/src/main/resources/data/astracontent/advancement/recipes/copper_rail.json b/src/main/resources/data/astracontent/advancement/recipes/copper_rail.json new file mode 100644 index 0000000..dafa071 --- /dev/null +++ b/src/main/resources/data/astracontent/advancement/recipes/copper_rail.json @@ -0,0 +1,25 @@ +{ + "criteria": { + "copper": { + "conditions": { + "items": [ + { + "items": "minecraft:copper_ingot" + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "requirements": [ + [ + "copper" + ] + ], + "rewards": { + "recipes": [ + "astracontent:copper_rail" + ] + }, + "parent": "minecraft:recipes/root" +} diff --git a/src/main/resources/data/astracontent/recipe/copper_rail.json b/src/main/resources/data/astracontent/recipe/copper_rail.json new file mode 100644 index 0000000..d9af079 --- /dev/null +++ b/src/main/resources/data/astracontent/recipe/copper_rail.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "X": "minecraft:copper_ingot", + "R": "minecraft:redstone", + "#": "minecraft:stick" + }, + "pattern": [ + "X X", + "X#X", + "XRX" + ], + "result": { + "components": { + "minecraft:custom_data": { + "astracontent:rail": 0 + }, + "minecraft:item_name": { + "translate": "item.astracontent.copper_rail", + "fallback": "Медные рельсы" + }, + "minecraft:item_model": "astracontent:copper_rail" + }, + "id": "minecraft:powered_rail", + "count": 6 + } +} diff --git a/src/main/resources/defaults/index.txt b/src/main/resources/defaults/index.txt new file mode 100644 index 0000000..3997e2a --- /dev/null +++ b/src/main/resources/defaults/index.txt @@ -0,0 +1,114 @@ +resources/assets/astracontent/items/copper_rail.json +resources/assets/astracontent/items/exposed_copper_rail.json +resources/assets/astracontent/items/oxidized_copper_rail.json +resources/assets/astracontent/items/rail_display/0/ascending_east_on.json +resources/assets/astracontent/items/rail_display/0/ascending_east.json +resources/assets/astracontent/items/rail_display/0/ascending_north_on.json +resources/assets/astracontent/items/rail_display/0/ascending_north.json +resources/assets/astracontent/items/rail_display/0/ascending_south_on.json +resources/assets/astracontent/items/rail_display/0/ascending_south.json +resources/assets/astracontent/items/rail_display/0/ascending_west_on.json +resources/assets/astracontent/items/rail_display/0/ascending_west.json +resources/assets/astracontent/items/rail_display/0/east_west_on.json +resources/assets/astracontent/items/rail_display/0/east_west.json +resources/assets/astracontent/items/rail_display/0/north_south_on.json +resources/assets/astracontent/items/rail_display/0/north_south.json +resources/assets/astracontent/items/rail_display/1/ascending_east_on.json +resources/assets/astracontent/items/rail_display/1/ascending_east.json +resources/assets/astracontent/items/rail_display/1/ascending_north_on.json +resources/assets/astracontent/items/rail_display/1/ascending_north.json +resources/assets/astracontent/items/rail_display/1/ascending_south_on.json +resources/assets/astracontent/items/rail_display/1/ascending_south.json +resources/assets/astracontent/items/rail_display/1/ascending_west_on.json +resources/assets/astracontent/items/rail_display/1/ascending_west.json +resources/assets/astracontent/items/rail_display/1/east_west_on.json +resources/assets/astracontent/items/rail_display/1/east_west.json +resources/assets/astracontent/items/rail_display/1/north_south_on.json +resources/assets/astracontent/items/rail_display/1/north_south.json +resources/assets/astracontent/items/rail_display/2/ascending_east_on.json +resources/assets/astracontent/items/rail_display/2/ascending_east.json +resources/assets/astracontent/items/rail_display/2/ascending_north_on.json +resources/assets/astracontent/items/rail_display/2/ascending_north.json +resources/assets/astracontent/items/rail_display/2/ascending_south_on.json +resources/assets/astracontent/items/rail_display/2/ascending_south.json +resources/assets/astracontent/items/rail_display/2/ascending_west_on.json +resources/assets/astracontent/items/rail_display/2/ascending_west.json +resources/assets/astracontent/items/rail_display/2/east_west_on.json +resources/assets/astracontent/items/rail_display/2/east_west.json +resources/assets/astracontent/items/rail_display/2/north_south_on.json +resources/assets/astracontent/items/rail_display/2/north_south.json +resources/assets/astracontent/items/rail_display/3/ascending_east_on.json +resources/assets/astracontent/items/rail_display/3/ascending_east.json +resources/assets/astracontent/items/rail_display/3/ascending_north_on.json +resources/assets/astracontent/items/rail_display/3/ascending_north.json +resources/assets/astracontent/items/rail_display/3/ascending_south_on.json +resources/assets/astracontent/items/rail_display/3/ascending_south.json +resources/assets/astracontent/items/rail_display/3/ascending_west_on.json +resources/assets/astracontent/items/rail_display/3/ascending_west.json +resources/assets/astracontent/items/rail_display/3/east_west_on.json +resources/assets/astracontent/items/rail_display/3/east_west.json +resources/assets/astracontent/items/rail_display/3/north_south_on.json +resources/assets/astracontent/items/rail_display/3/north_south.json +resources/assets/astracontent/items/waxed_copper_rail.json +resources/assets/astracontent/items/waxed_exposed_copper_rail.json +resources/assets/astracontent/items/waxed_oxidized_copper_rail.json +resources/assets/astracontent/items/waxed_weathered_copper_rail.json +resources/assets/astracontent/items/weathered_copper_rail.json +resources/assets/astracontent/lang/en_us.json +resources/assets/astracontent/lang/ru_ru.json +resources/assets/astracontent/models/item/copper_rail.json +resources/assets/astracontent/models/item/exposed_copper_rail.json +resources/assets/astracontent/models/item/oxidized_copper_rail.json +resources/assets/astracontent/models/item/waxed_copper_rail.json +resources/assets/astracontent/models/item/waxed_exposed_copper_rail.json +resources/assets/astracontent/models/item/waxed_oxidized_copper_rail.json +resources/assets/astracontent/models/item/waxed_weathered_copper_rail.json +resources/assets/astracontent/models/item/weathered_copper_rail.json +resources/assets/astracontent/models/rail_display/0/ascending_east_on.json +resources/assets/astracontent/models/rail_display/0/ascending_east.json +resources/assets/astracontent/models/rail_display/0/ascending_north_on.json +resources/assets/astracontent/models/rail_display/0/ascending_north.json +resources/assets/astracontent/models/rail_display/0/ascending_south_on.json +resources/assets/astracontent/models/rail_display/0/ascending_south.json +resources/assets/astracontent/models/rail_display/0/ascending_west_on.json +resources/assets/astracontent/models/rail_display/0/ascending_west.json +resources/assets/astracontent/models/rail_display/0/east_west_on.json +resources/assets/astracontent/models/rail_display/0/east_west.json +resources/assets/astracontent/models/rail_display/0/north_south_on.json +resources/assets/astracontent/models/rail_display/0/north_south.json +resources/assets/astracontent/models/rail_display/1/ascending_east_on.json +resources/assets/astracontent/models/rail_display/1/ascending_east.json +resources/assets/astracontent/models/rail_display/1/ascending_north_on.json +resources/assets/astracontent/models/rail_display/1/ascending_north.json +resources/assets/astracontent/models/rail_display/1/ascending_south_on.json +resources/assets/astracontent/models/rail_display/1/ascending_south.json +resources/assets/astracontent/models/rail_display/1/ascending_west_on.json +resources/assets/astracontent/models/rail_display/1/ascending_west.json +resources/assets/astracontent/models/rail_display/1/east_west_on.json +resources/assets/astracontent/models/rail_display/1/east_west.json +resources/assets/astracontent/models/rail_display/1/north_south_on.json +resources/assets/astracontent/models/rail_display/1/north_south.json +resources/assets/astracontent/models/rail_display/2/ascending_east_on.json +resources/assets/astracontent/models/rail_display/2/ascending_east.json +resources/assets/astracontent/models/rail_display/2/ascending_north_on.json +resources/assets/astracontent/models/rail_display/2/ascending_north.json +resources/assets/astracontent/models/rail_display/2/ascending_south_on.json +resources/assets/astracontent/models/rail_display/2/ascending_south.json +resources/assets/astracontent/models/rail_display/2/ascending_west_on.json +resources/assets/astracontent/models/rail_display/2/ascending_west.json +resources/assets/astracontent/models/rail_display/2/east_west_on.json +resources/assets/astracontent/models/rail_display/2/east_west.json +resources/assets/astracontent/models/rail_display/2/north_south_on.json +resources/assets/astracontent/models/rail_display/2/north_south.json +resources/assets/astracontent/models/rail_display/3/ascending_east_on.json +resources/assets/astracontent/models/rail_display/3/ascending_east.json +resources/assets/astracontent/models/rail_display/3/ascending_north_on.json +resources/assets/astracontent/models/rail_display/3/ascending_north.json +resources/assets/astracontent/models/rail_display/3/ascending_south_on.json +resources/assets/astracontent/models/rail_display/3/ascending_south.json +resources/assets/astracontent/models/rail_display/3/ascending_west_on.json +resources/assets/astracontent/models/rail_display/3/ascending_west.json +resources/assets/astracontent/models/rail_display/3/east_west_on.json +resources/assets/astracontent/models/rail_display/3/east_west.json +resources/assets/astracontent/models/rail_display/3/north_south_on.json +resources/assets/astracontent/models/rail_display/3/north_south.json diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/copper_rail.json new file mode 100644 index 0000000..d934a58 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/exposed_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/exposed_copper_rail.json new file mode 100644 index 0000000..fc16741 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/exposed_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/exposed_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/oxidized_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/oxidized_copper_rail.json new file mode 100644 index 0000000..e0b8726 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/oxidized_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/oxidized_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_east.json new file mode 100644 index 0000000..4fc747a --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_east.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_east", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_east_on.json new file mode 100644 index 0000000..cc4ecb8 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_east_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_east_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_north.json new file mode 100644 index 0000000..5ce4ac1 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_north.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_north", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_north_on.json new file mode 100644 index 0000000..ad8b7b2 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_north_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_north_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_south.json new file mode 100644 index 0000000..e604771 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_south_on.json new file mode 100644 index 0000000..c5d4b5b --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_west.json new file mode 100644 index 0000000..6f3f149 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_west_on.json new file mode 100644 index 0000000..cbb4ce8 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/ascending_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/ascending_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/east_west.json new file mode 100644 index 0000000..6a5c7c2 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/east_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/east_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/east_west_on.json new file mode 100644 index 0000000..b81d0ec --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/east_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/east_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/north_south.json new file mode 100644 index 0000000..07b8c1d --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/north_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/north_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/north_south_on.json new file mode 100644 index 0000000..805131b --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/0/north_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/0/north_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_east.json new file mode 100644 index 0000000..65cf7b8 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_east.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_east", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_east_on.json new file mode 100644 index 0000000..532748f --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_east_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_east_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_north.json new file mode 100644 index 0000000..dbd6790 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_north.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_north", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_north_on.json new file mode 100644 index 0000000..6b8036e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_north_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_north_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_south.json new file mode 100644 index 0000000..1ba43db --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_south_on.json new file mode 100644 index 0000000..e549859 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_west.json new file mode 100644 index 0000000..df3d589 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_west_on.json new file mode 100644 index 0000000..9175fee --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/ascending_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/ascending_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/east_west.json new file mode 100644 index 0000000..c350561 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/east_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/east_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/east_west_on.json new file mode 100644 index 0000000..5e75f8a --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/east_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/east_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/north_south.json new file mode 100644 index 0000000..75bb9b2 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/north_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/north_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/north_south_on.json new file mode 100644 index 0000000..512461d --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/1/north_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/1/north_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_east.json new file mode 100644 index 0000000..97b751f --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_east.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_east", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_east_on.json new file mode 100644 index 0000000..0d9949e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_east_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_east_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_north.json new file mode 100644 index 0000000..0c1408c --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_north.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_north", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_north_on.json new file mode 100644 index 0000000..006b62f --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_north_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_north_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_south.json new file mode 100644 index 0000000..2f8db33 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_south_on.json new file mode 100644 index 0000000..315258f --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_west.json new file mode 100644 index 0000000..716afed --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_west_on.json new file mode 100644 index 0000000..c832e67 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/ascending_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/ascending_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/east_west.json new file mode 100644 index 0000000..5581248 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/east_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/east_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/east_west_on.json new file mode 100644 index 0000000..2bbb5f0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/east_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/east_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/north_south.json new file mode 100644 index 0000000..c2ecd97 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/north_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/north_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/north_south_on.json new file mode 100644 index 0000000..c733b44 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/2/north_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/2/north_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_east.json new file mode 100644 index 0000000..2ffcf3e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_east.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_east", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_east_on.json new file mode 100644 index 0000000..6225948 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_east_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_east_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_north.json new file mode 100644 index 0000000..02a5bd7 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_north.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_north", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_north_on.json new file mode 100644 index 0000000..fd36d11 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_north_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_north_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_south.json new file mode 100644 index 0000000..763d720 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_south_on.json new file mode 100644 index 0000000..157eb17 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_west.json new file mode 100644 index 0000000..d7fc7a4 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_west_on.json new file mode 100644 index 0000000..630f4e9 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/ascending_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/ascending_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/east_west.json new file mode 100644 index 0000000..ffbadea --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/east_west.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/east_west", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/east_west_on.json new file mode 100644 index 0000000..f3590fd --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/east_west_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/east_west_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/north_south.json new file mode 100644 index 0000000..cc275aa --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/north_south.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/north_south", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/north_south_on.json new file mode 100644 index 0000000..af43d66 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/rail_display/3/north_south_on.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:rail_display/3/north_south_on", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/waxed_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_copper_rail.json new file mode 100644 index 0000000..12b70bf --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/waxed_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/waxed_exposed_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_exposed_copper_rail.json new file mode 100644 index 0000000..a22e652 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_exposed_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/waxed_exposed_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/waxed_oxidized_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_oxidized_copper_rail.json new file mode 100644 index 0000000..c77f7e0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_oxidized_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/waxed_oxidized_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/waxed_weathered_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_weathered_copper_rail.json new file mode 100644 index 0000000..b1684d7 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/waxed_weathered_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/waxed_weathered_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/items/weathered_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/items/weathered_copper_rail.json new file mode 100644 index 0000000..4a8c1e6 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/items/weathered_copper_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "model": "astracontent:item/weathered_copper_rail", + "type": "minecraft:model" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/lang/en_us.json b/src/main/resources/defaults/resources/assets/astracontent/lang/en_us.json new file mode 100644 index 0000000..9b997f4 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/lang/en_us.json @@ -0,0 +1,10 @@ +{ + "item.astracontent.waxed_oxidized_copper_rail": "Waxed Oxidized Copper Rail", + "item.astracontent.waxed_exposed_copper_rail": "Waxed Exposed Copper Rail", + "item.astracontent.waxed_copper_rail": "Waxed Copper Rail", + "item.astracontent.copper_rail": "Copper Rail", + "item.astracontent.waxed_weathered_copper_rail": "Waxed Weathered Copper Rail", + "item.astracontent.oxidized_copper_rail": "Oxidized Copper Rail", + "item.astracontent.weathered_copper_rail": "Weathered Copper Rail", + "item.astracontent.exposed_copper_rail": "Exposed Copper Rail" +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/lang/ru_ru.json b/src/main/resources/defaults/resources/assets/astracontent/lang/ru_ru.json new file mode 100644 index 0000000..ef231cc --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/lang/ru_ru.json @@ -0,0 +1,10 @@ +{ + "item.astracontent.waxed_oxidized_copper_rail": "Вощёные: Окисленные медные рельсы", + "item.astracontent.waxed_exposed_copper_rail": "Вощёные: Потемневшие медные рельсы", + "item.astracontent.waxed_copper_rail": "Вощёные: Медные рельсы", + "item.astracontent.copper_rail": "Медные рельсы", + "item.astracontent.waxed_weathered_copper_rail": "Вощёные: Состаренные медные рельсы", + "item.astracontent.oxidized_copper_rail": "Окисленные медные рельсы", + "item.astracontent.weathered_copper_rail": "Состаренные медные рельсы", + "item.astracontent.exposed_copper_rail": "Потемневшие медные рельсы" +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/copper_rail.json new file mode 100644 index 0000000..0af3be0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/exposed_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/exposed_copper_rail.json new file mode 100644 index 0000000..83ebda6 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/exposed_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/oxidized_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/oxidized_copper_rail.json new file mode 100644 index 0000000..0baca27 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/oxidized_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_copper_rail.json new file mode 100644 index 0000000..0af3be0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_exposed_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_exposed_copper_rail.json new file mode 100644 index 0000000..83ebda6 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_exposed_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_oxidized_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_oxidized_copper_rail.json new file mode 100644 index 0000000..0baca27 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_oxidized_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_weathered_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_weathered_copper_rail.json new file mode 100644 index 0000000..8fd5cea --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/waxed_weathered_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/item/weathered_copper_rail.json b/src/main/resources/defaults/resources/assets/astracontent/models/item/weathered_copper_rail.json new file mode 100644 index 0000000..8fd5cea --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/item/weathered_copper_rail.json @@ -0,0 +1,132 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "display": { + "fixed": { + "rotation": [ + 90, + 0, + 0 + ] + }, + "gui": { + "scale": [ + 1, + 1, + 1 + ], + "rotation": [ + 35, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ] + } + }, + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_east.json new file mode 100644 index 0000000..5aee72e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_east.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_east_on.json new file mode 100644 index 0000000..7a0ba7e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_east_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_north.json new file mode 100644 index 0000000..5aee72e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_north.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_north_on.json new file mode 100644 index 0000000..7a0ba7e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_north_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_south.json new file mode 100644 index 0000000..7257cba --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_south.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_south_on.json new file mode 100644 index 0000000..0cc4b6e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_south_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_west.json new file mode 100644 index 0000000..7257cba --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_west.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_west_on.json new file mode 100644 index 0000000..0cc4b6e --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/ascending_west_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/east_west.json new file mode 100644 index 0000000..22051ba --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/east_west.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/east_west_on.json new file mode 100644 index 0000000..3b22df0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/east_west_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/north_south.json new file mode 100644 index 0000000..22051ba --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/north_south.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/north_south_on.json new file mode 100644 index 0000000..3b22df0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/0/north_south_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/copper_block", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/copper_block" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_east.json new file mode 100644 index 0000000..9e93c72 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_east.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_east_on.json new file mode 100644 index 0000000..db143e3 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_east_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_north.json new file mode 100644 index 0000000..9e93c72 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_north.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_north_on.json new file mode 100644 index 0000000..db143e3 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_north_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_south.json new file mode 100644 index 0000000..7214bcf --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_south.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_south_on.json new file mode 100644 index 0000000..8124653 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_south_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_west.json new file mode 100644 index 0000000..7214bcf --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_west.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_west_on.json new file mode 100644 index 0000000..8124653 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/ascending_west_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/east_west.json new file mode 100644 index 0000000..f6e9645 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/east_west.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/east_west_on.json new file mode 100644 index 0000000..54861a2 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/east_west_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/north_south.json new file mode 100644 index 0000000..f6e9645 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/north_south.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/north_south_on.json new file mode 100644 index 0000000..54861a2 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/1/north_south_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/exposed_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/exposed_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_east.json new file mode 100644 index 0000000..4065c63 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_east.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_east_on.json new file mode 100644 index 0000000..9392194 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_east_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_north.json new file mode 100644 index 0000000..4065c63 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_north.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_north_on.json new file mode 100644 index 0000000..9392194 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_north_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_south.json new file mode 100644 index 0000000..f265d18 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_south.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_south_on.json new file mode 100644 index 0000000..242cfbb --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_south_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_west.json new file mode 100644 index 0000000..f265d18 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_west.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_west_on.json new file mode 100644 index 0000000..242cfbb --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/ascending_west_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/east_west.json new file mode 100644 index 0000000..6d2376a --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/east_west.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/east_west_on.json new file mode 100644 index 0000000..877ca30 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/east_west_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/north_south.json new file mode 100644 index 0000000..6d2376a --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/north_south.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/north_south_on.json new file mode 100644 index 0000000..877ca30 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/2/north_south_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/weathered_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/weathered_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_east.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_east.json new file mode 100644 index 0000000..6d12b9f --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_east.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_east_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_east_on.json new file mode 100644 index 0000000..43c7ee8 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_east_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_north.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_north.json new file mode 100644 index 0000000..6d12b9f --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_north.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_north_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_north_on.json new file mode 100644 index 0000000..43c7ee8 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_north_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": 45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_south.json new file mode 100644 index 0000000..5451450 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_south.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_south_on.json new file mode 100644 index 0000000..7c46225 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_south_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_west.json new file mode 100644 index 0000000..5451450 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_west.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_west_on.json new file mode 100644 index 0000000..7c46225 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/ascending_west_on.json @@ -0,0 +1,136 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 9.04, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 16, + 9.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 4, + 9.059999999999999, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 9.059999999999999, + 0 + ], + "rotation": { + "origin": [ + 8, + 9, + 8 + ], + "rescale": true, + "angle": -45, + "axis": "x" + }, + "to": [ + 14, + 9.059999999999999, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/east_west.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/east_west.json new file mode 100644 index 0000000..3976a9d --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/east_west.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/east_west_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/east_west_on.json new file mode 100644 index 0000000..5d457b0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/east_west_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/north_south.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/north_south.json new file mode 100644 index 0000000..3976a9d --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/north_south.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/north_south_on.json b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/north_south_on.json new file mode 100644 index 0000000..5d457b0 --- /dev/null +++ b/src/main/resources/defaults/resources/assets/astracontent/models/rail_display/3/north_south_on.json @@ -0,0 +1,106 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "faces": { + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#rail" + } + }, + "from": [ + 0, + 1.04, + 0 + ], + "to": [ + 16, + 1.04, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 2, + 1.06, + 0 + ], + "to": [ + 4, + 1.06, + 16 + ] + }, + { + "faces": { + "up": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + }, + "down": { + "uv": [ + 4, + 0, + 6, + 16 + ], + "texture": "#copper" + } + }, + "from": [ + 12, + 1.06, + 0 + ], + "to": [ + 14, + 1.06, + 16 + ] + } + ], + "textures": { + "copper": "minecraft:block/oxidized_copper", + "rail": "minecraft:block/powered_rail_on", + "particle": "minecraft:block/oxidized_copper" + } +} diff --git a/src/test/java/online/astradev/content/rail/RailSpeedTest.java b/src/test/java/online/astradev/content/rail/RailSpeedTest.java new file mode 100644 index 0000000..9e0e416 --- /dev/null +++ b/src/test/java/online/astradev/content/rail/RailSpeedTest.java @@ -0,0 +1,16 @@ +package online.astradev.content.rail; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; +class RailSpeedTest { + @Test void fixedCopperSpeedsAndWaxDoNotChangeLimit() { + for(int age=0;age<4;age++) { + assertEquals(20-4*age,new RailKind(age,false).speed()); + assertEquals(20-4*age,new RailKind(age,true).speed()); + assertEquals(new RailKind(age,true),RailKind.decode(new RailKind(age,true).code())); + } + } + @Test void analogInputIsTwoBlocksPerSecondPerLevel() { + for(int i=0;i<=15;i++) assertEquals(i*2,RailSpeed.signalSpeed(i)); + assertEquals(0,RailSpeed.signalSpeed(-1)); assertEquals(30,RailSpeed.signalSpeed(99)); + } +} diff --git a/src/verification/java/online/astradev/content/verification/ContentVerification.java b/src/verification/java/online/astradev/content/verification/ContentVerification.java new file mode 100644 index 0000000..1cb5d31 --- /dev/null +++ b/src/verification/java/online/astradev/content/verification/ContentVerification.java @@ -0,0 +1,191 @@ +package online.astradev.content.verification; + +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.component.DataComponents; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.vehicle.minecart.*; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.entity.projectile.arrow.AbstractArrow; +import net.minecraft.world.entity.projectile.FireworkRocketEntity; +import net.minecraft.world.item.*; +import net.minecraft.world.item.component.ChargedProjectiles; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.properties.RailShape; +import net.minecraft.world.phys.*; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.fml.common.Mod; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.common.util.FakePlayerFactory; +import net.neoforged.neoforge.event.tick.ServerTickEvent; +import online.astradev.content.rail.*; +import online.astradev.content.weapon.*; + +@Mod(value="astracontent_verify",dist=Dist.DEDICATED_SERVER) +public final class ContentVerification { + private int ticks; + private final List carts=new ArrayList<>(); + private boolean done; + private final double[] previousX=new double[4]; + public ContentVerification() { + if(!Boolean.getBoolean("astracontent.verify")) throw new IllegalStateException("Isolated test server only"); + NeoForge.EVENT_BUS.addListener(this::tick); + } + private void tick(ServerTickEvent.Post event) { + if(done)return; + var server=event.getServer(); var level=server.overworld(); + try { + ticks++; + if(ticks==1) server.getCommands().performPrefixedCommand(server.createCommandSourceStack(),"forceload add 0 0 159 95"); + if(ticks==20) { + require(AbstractMinecart.useExperimentalMovement(level)==Boolean.getBoolean("astracontent.expectedExperimental"),"requested movement engine enabled"); + if(Files.exists(Path.of("first-pass.txt"))) { + for(int age=0;age<4;age++) require(Rails.find(level,new BlockPos(2,100,age*4)).age()==age,"chunk identity survives restart"); + var saved=level.getEntity(UUID.fromString(Files.readString(Path.of("saved-cart.txt")))); + require(saved instanceof AbstractMinecart,"saved minecart restored"); + require(Math.abs(((CartSpeed)saved).astracontent$limit(level)-1)<.001,"personal speed survives restart on ordinary rails"); + finish(server,"PASS restart: four rail ages and personal cart speed survive reload"); return; + } + setup(level); ammunition(level); + } + if(ticks==129)for(int age=0;age<4;age++)previousX[age]=carts.get(age).getX(); + if(ticks==130) { + for(int age=0;age<4;age++) { + var cart=carts.get(age); + double actual=cart.getX()-previousX[age]; + double expected=(20-age*4)/20.0; + require(Math.abs(actual-expected)<.015,"copper measured speed "+age+": "+actual+" expected "+expected); + } + TrackVerification.run(level); + var saved=new Minecart(EntityTypes.MINECART,level);saved.setPos(2.5,100.0625,.5);saved.setDeltaMovement(.1,0,0);saved.tick(); + for(int x=29;x<=33;x++) { + var p=new BlockPos(x,100,40);level.setBlockAndUpdate(p.below(),Blocks.STONE.defaultBlockState()); + level.setBlockAndUpdate(p,Blocks.RAIL.defaultBlockState().setValue(RailBlock.SHAPE,RailShape.EAST_WEST)); + } + saved.setPos(30.5,100.0625,40.5);saved.setDeltaMovement(Vec3.ZERO);level.addFreshEntity(saved); + Files.writeString(Path.of("saved-cart.txt"),saved.getUUID().toString()); + Files.writeString(Path.of("first-pass.txt"),"PASS"); + finish(server,"PASS gameplay: native placement, all ages, drops, power, ammunition, and measured 20/16/12/8 m/s"); + } + } catch(Throwable error) { + error.printStackTrace(); + try { Files.writeString(Path.of("verification-result.txt"),"FAIL "+error); }catch(Exception ignored){} + done=true;server.halt(false); + } + } + private void setup(ServerLevel level) { + var ingredients=List.of(new ItemStack(Items.COPPER_INGOT),ItemStack.EMPTY,new ItemStack(Items.COPPER_INGOT), + new ItemStack(Items.COPPER_INGOT),new ItemStack(Items.STICK),new ItemStack(Items.COPPER_INGOT), + new ItemStack(Items.COPPER_INGOT),new ItemStack(Items.REDSTONE),new ItemStack(Items.COPPER_INGOT)); + var input=net.minecraft.world.item.crafting.CraftingInput.of(3,3,ingredients); + var recipe=level.getServer().getRecipeManager().getRecipeFor(net.minecraft.world.item.crafting.RecipeType.CRAFTING,input,level).orElseThrow(); + var crafted=recipe.value().assemble(input); + require(crafted.getCount()==6 && new RailKind(0,false).equals(RailItems.find(crafted)),"native crafting recipe makes six copper rails"); + for(int code=0;code<8;code++) require(RailItems.find(Rails.stack(RailKind.decode(code),1)).code()==code,"item variant "+code); + for(int age=0;age<4;age++) { + int z=age*4; + for(int x=0;x<160;x++) { + var pos=new BlockPos(x,100,z); + level.setBlockAndUpdate(pos.below(),Blocks.REDSTONE_BLOCK.defaultBlockState()); + level.setBlockAndUpdate(pos,Blocks.POWERED_RAIL.defaultBlockState().setValue(PoweredRailBlock.SHAPE,RailShape.EAST_WEST)); + Rails.put(level,pos,new RailKind(age,true)); + } + var cart=new Minecart(EntityTypes.MINECART,level); cart.setPos(2.5,100.0625,z+.5);cart.setDeltaMovement(.25,0,0); + level.addFreshEntity(cart);carts.add(cart); + } + var pos=new BlockPos(5,100,24);level.setBlockAndUpdate(pos.below(),Blocks.STONE.defaultBlockState()); + var item=Rails.stack(new RailKind(2,false),2); + var context=new UseOnContext(level,null,InteractionHand.MAIN_HAND,item,new BlockHitResult(Vec3.atCenterOf(pos.below()),Direction.UP,pos.below(),false)); + require(item.getItem().useOn(context).consumesAction(),"native BlockItem placement"); + require(level.getBlockState(pos).is(Blocks.POWERED_RAIL),"real vanilla carrier"); + require(Rails.find(level,pos).age()==2,"placement preserves variant"); + require(item.getCount()==1,"placement consumes exactly one"); + var player=FakePlayerFactory.getMinecraft(level); + player.setItemInHand(InteractionHand.MAIN_HAND,new ItemStack(Items.HONEYCOMB,2)); + var hit=new BlockHitResult(Vec3.atCenterOf(pos),Direction.UP,pos,false); + Rails.use(new net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.RightClickBlock(player,InteractionHand.MAIN_HAND,pos,hit)); + require(Rails.find(level,pos).waxed(),"waxing native rail"); + require(player.getMainHandItem().getCount()==1,"wax consumes one honeycomb"); + player.setItemInHand(InteractionHand.MAIN_HAND,new ItemStack(Items.IRON_AXE)); + Rails.use(new net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.RightClickBlock(player,InteractionHand.MAIN_HAND,pos,hit)); + require(!Rails.find(level,pos).waxed() && Rails.find(level,pos).age()==2,"axe removes wax first"); + Rails.use(new net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.RightClickBlock(player,InteractionHand.MAIN_HAND,pos,hit)); + require(Rails.find(level,pos).age()==1,"axe removes one oxidation stage"); + Rails.put(level,pos,new RailKind(2,false)); + var drops=Block.getDrops(level.getBlockState(pos),level,pos,null); + require(drops.size()==1 && new RailKind(2,false).equals(RailItems.find(drops.getFirst())),"custom loot"); + level.destroyBlock(pos.below(),true); + require(Rails.find(level,pos)==null,"support loss clears identity"); + require(level.getEntitiesOfClass(ItemEntity.class,new AABB(pos).inflate(2)).stream().anyMatch(e->RailItems.find(e.getItem())!=null),"support loss drops custom rail"); + var signalPos=new BlockPos(20,100,24); + level.setBlockAndUpdate(signalPos.below(),Blocks.REDSTONE_BLOCK.defaultBlockState()); + level.setBlockAndUpdate(signalPos,Blocks.POWERED_RAIL.defaultBlockState()); + require(RailSpeed.signal(level,signalPos)==15,"redstone block supplies 15"); + require(RailSpeed.target(level,signalPos,8)==30,"gold rail 30 m/s at signal 15"); + require(Rails.find(level,signalPos)==null,"ordinary golden rail stays ordinary"); + analog(level); + } + private void analog(ServerLevel level) { + var rail=new BlockPos(30,100,24);var input=rail.west();var other=rail.east(); + for(var p:List.of(rail,input,other))level.setBlockAndUpdate(p.below(),Blocks.STONE.defaultBlockState()); + level.setBlockAndUpdate(input,Blocks.COMPARATOR.defaultBlockState().setValue(ComparatorBlock.FACING,Direction.WEST).setValue(ComparatorBlock.POWERED,true)); + level.setBlockAndUpdate(other,Blocks.COMPARATOR.defaultBlockState().setValue(ComparatorBlock.FACING,Direction.EAST).setValue(ComparatorBlock.POWERED,true)); + level.setBlockAndUpdate(rail,Blocks.POWERED_RAIL.defaultBlockState()); + var source=(net.minecraft.world.level.block.entity.ComparatorBlockEntity)level.getBlockEntity(input); + var second=(net.minecraft.world.level.block.entity.ComparatorBlockEntity)level.getBlockEntity(other); + for(int signal=1;signal<=15;signal++) { + source.setOutputSignal(signal); second.setOutputSignal(Math.max(0,signal-2)); + level.setBlock(rail,Blocks.POWERED_RAIL.defaultBlockState().setValue(PoweredRailBlock.POWERED,true),2); + require(RailSpeed.signal(level,rail)==signal,"actual comparator input "+signal); + require(RailSpeed.target(level,rail,8)==signal*2,"actual golden cap "+signal); + } + source.setOutputSignal(3); second.setOutputSignal(11); + require(RailSpeed.signal(level,rail)==11,"maximum of two inputs"); + } + private void ammunition(ServerLevel level) { + var player=FakePlayerFactory.getMinecraft(level);player.setPos(40,115,35); + var crossbow=(CrossbowItem)Items.CROSSBOW; + var supported=List.of(Items.ENDER_PEARL,Items.FIRE_CHARGE,Items.ENDER_EYE,Items.EGG,Items.BLUE_EGG,Items.BROWN_EGG,Items.SNOWBALL,Items.WIND_CHARGE,Items.EXPERIENCE_BOTTLE,Items.TNT); + for(var ammo:supported) { + var weapon=new ItemStack(Items.CROSSBOW);var stack=new ItemStack(ammo,2); + player.setItemInHand(InteractionHand.MAIN_HAND,weapon);player.setItemInHand(InteractionHand.OFF_HAND,stack); + require(crossbow.getSupportedHeldProjectiles().test(stack),"held ammunition "+ammo); + require(crossbow.getAllSupportedProjectiles().test(stack),"inventory ammunition "+ammo); + require(crossbow.use(level,player,InteractionHand.MAIN_HAND).consumesAction(),"start loading "+ammo); + crossbow.onUseTick(level,player,weapon,72000-CrossbowItem.getChargeDuration(weapon,player)); + require(CrossbowItem.isCharged(weapon),"loaded "+ammo); + require(stack.getCount()==1,"one ammo consumed "+ammo); + crossbow.performShooting(level,player,InteractionHand.MAIN_HAND,weapon,3.15f,0,null); + require(!CrossbowItem.isCharged(weapon),"unloaded after shot "+ammo); + require(weapon.getDamageValue()==1,"durability "+ammo); + player.stopUsingItem(); + } + for(var ammo:List.of(Items.ARROW,Items.FIREWORK_ROCKET)) { + var weapon=new ItemStack(Items.CROSSBOW);weapon.set(DataComponents.CHARGED_PROJECTILES,ChargedProjectiles.ofNonEmpty(List.of(new ItemStack(ammo)))); + crossbow.performShooting(level,player,InteractionHand.MAIN_HAND,weapon,3.15f,0,null); + } + require(!level.getEntitiesOfClass(AbstractArrow.class,new AABB(player.blockPosition()).inflate(8)).isEmpty(),"vanilla arrows remain arrows"); + require(!level.getEntitiesOfClass(FireworkRocketEntity.class,new AABB(player.blockPosition()).inflate(8)).isEmpty(),"vanilla fireworks remain fireworks"); + var multi=new ItemStack(Items.CROSSBOW); + multi.enchant(level.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.ENCHANTMENT).getOrThrow(net.minecraft.world.item.enchantment.Enchantments.MULTISHOT),1); + player.setItemInHand(InteractionHand.MAIN_HAND,multi);player.setItemInHand(InteractionHand.OFF_HAND,new ItemStack(Items.SNOWBALL,2)); + crossbow.use(level,player,InteractionHand.MAIN_HAND); + crossbow.onUseTick(level,player,multi,72000-CrossbowItem.getChargeDuration(multi,player)); + require(multi.get(DataComponents.CHARGED_PROJECTILES).itemCopies().size()==3,"multishot loads three snowballs"); + require(player.getOffhandItem().getCount()==1,"multishot consumes one ammo");player.stopUsingItem(); + player.setItemInHand(InteractionHand.MAIN_HAND,new ItemStack(Items.FIRE_CHARGE,2)); + Ammunition.fireCharge(new net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.RightClickItem(player,InteractionHand.MAIN_HAND)); + require(player.getMainHandItem().getCount()==1,"right click fire charge consumes one"); + Ammunition.fireCharge(new net.neoforged.neoforge.event.entity.player.PlayerInteractEvent.RightClickItem(player,InteractionHand.MAIN_HAND)); + require(player.getMainHandItem().getCount()==1,"fire charge cooldown prevents second shot"); + } + private void finish(net.minecraft.server.MinecraftServer server,String text)throws Exception { + Files.writeString(Path.of("verification-result.txt"),text);System.out.println(text);done=true;server.halt(false); + } + private static void require(boolean condition,String message) {if(!condition)throw new AssertionError(message);} +} diff --git a/src/verification/java/online/astradev/content/verification/TrackVerification.java b/src/verification/java/online/astradev/content/verification/TrackVerification.java new file mode 100644 index 0000000..6006c72 --- /dev/null +++ b/src/verification/java/online/astradev/content/verification/TrackVerification.java @@ -0,0 +1,157 @@ +package online.astradev.content.verification; + +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.entity.vehicle.minecart.Minecart; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.RailShape; +import net.minecraft.world.phys.Vec3; +import online.astradev.content.rail.*; + +/** Real native movement on mirrored/rotated tracks, never just a speed-formula test. */ +final class TrackVerification { + record Track(BlockPos pos,BlockState state) {} + static void run(ServerLevel level) { + for(int turn=0;turn<4;turn++) for(int mirror:new int[]{-1,1}) corner(level,turn,mirror); + for(int turn=0;turn<4;turn++) for(boolean uphill:new boolean[]{false,true}) slope(level,turn,uphill); + brakes(level); detectors(level); water(level); cartTypes(level); transitions(level); + System.out.println("PASS tracks: 8 corner routes, 8 slope routes, brakes, detector, activator, water, 7 cart types, speed transitions"); + } + private static BlockPos at(int x,int y,int z,int turn) { + for(int i=0;i path,int age) { + clear(level); + for(var p:path)level.setBlock(p.pos.below(),Blocks.REDSTONE_BLOCK.defaultBlockState(),2); + for(var p:path)level.setBlock(p.pos,p.state,2); + // Placement recomputes neighbor shapes; now set the exact constructed route. + for(var p:path) { + level.setBlock(p.pos,p.state,2); + if(p.state.is(Blocks.POWERED_RAIL) && age>=0)Rails.put(level,p.pos,new RailKind(age,true)); + } + } + private static Minecart cart(ServerLevel level,BlockPos start,Vec3 velocity) { + var cart=new Minecart(EntityTypes.MINECART,level);cart.setPos(start.getX()+.5,start.getY()+.0625,start.getZ()+.5); + cart.setDeltaMovement(velocity);level.addFreshEntity(cart);return cart; + } + private static Vec3 direction(int turns,double speed) { + return switch(turns){case 0->new Vec3(speed,0,0);case 1->new Vec3(0,0,speed);case 2->new Vec3(-speed,0,0);default->new Vec3(0,0,-speed);}; + } + private static void travel(ServerLevel level,List path,int turn,String label) { + var cart=cart(level,path.getFirst().pos,direction(turn,1.5)); + var end=Vec3.atCenterOf(path.getLast().pos); + boolean arrived=false; + for(int tick=0;tick<180;tick++) { + cart.tick(); + double nearest=path.stream().mapToDouble(p->Math.hypot(cart.getX()-p.pos.getX()-.5,cart.getZ()-p.pos.getZ()-.5)).min().orElseThrow(); + require(nearest<1.1,label+" derailed at "+cart.position()); + if(cart.position().distanceTo(end)<1.2){arrived=true;break;} + } + cart.discard();require(arrived,label+" never reached end"); + } + private static void corner(ServerLevel level,int turn,int mirror) { + var path=new ArrayList(); + for(int x=0;x<8;x++)path.add(new Track(at(x,0,0,turn),rotate(powered(RailShape.EAST_WEST),turn))); + path.add(new Track(at(8,0,0,turn),rotate(Blocks.RAIL.defaultBlockState().setValue(RailBlock.SHAPE,mirror==1?RailShape.SOUTH_WEST:RailShape.NORTH_WEST),turn))); + for(int z=1;z<=8;z++)path.add(new Track(at(8,0,z*mirror,turn),rotate(powered(RailShape.NORTH_SOUTH),turn))); + build(level,path,turn);travel(level,path,turn,"corner "+turn+"/"+mirror); + } + private static void slope(ServerLevel level,int turn,boolean uphill) { + var path=new ArrayList(); + for(int x=0;x<=14;x++) { + int height=x<5?0:x<8?x-5:3; + if(!uphill)height=3-height; + if(!uphill && x>=5 && x<8)height--; + RailShape shape=x>=5 && x<8?(uphill?RailShape.ASCENDING_EAST:RailShape.ASCENDING_WEST):RailShape.EAST_WEST; + path.add(new Track(at(x,height,0,turn),rotate(powered(shape),turn))); + } + build(level,path,turn); + for(var p:path)level.setBlock(p.pos.below(),Blocks.STONE.defaultBlockState(),2); + level.setBlock(path.getFirst().pos.below(),Blocks.REDSTONE_BLOCK.defaultBlockState(),2); + for(int i=0;i<=8;i++)require(RailSpeed.signal(level,path.get(i).pos)==15,"signal over slope "+turn+"/"+uphill+" at "+i); + require(RailSpeed.signal(level,path.get(10).pos)==0,"signal respects eight-rail reach"); + for(var p:path)level.setBlock(p.pos.below(),Blocks.REDSTONE_BLOCK.defaultBlockState(),2); + travel(level,path,turn,"slope "+turn+"/"+uphill); + } + private static List straight() { + var path=new ArrayList();for(int x=0;x<=14;x++)path.add(new Track(at(x,0,0,0),powered(RailShape.EAST_WEST)));return path; + } + private static void brakes(ServerLevel level) { + var path=straight();build(level,path,-1); + for(int x=5;x<=14;x++) { + level.setBlock(at(x,-1,0,0),Blocks.STONE.defaultBlockState(),2); + level.setBlock(at(x,0,0,0),powered(RailShape.EAST_WEST).setValue(PoweredRailBlock.POWERED,false),2); + } + // Remove propagated power in this controlled fixture. + for(int x=5;x<=14;x++)level.setBlock(at(x,0,0,0),powered(RailShape.EAST_WEST).setValue(PoweredRailBlock.POWERED,false),2); + var cart=cart(level,at(0,0,0,0),new Vec3(1.5,0,0)); + for(int t=0;t<70;t++)cart.tick(); + require(cart.getDeltaMovement().horizontalDistance()<.01,"unpowered braking"); + require(cart.getX()<70,"brakes stop cart before track end");cart.discard(); + } + private static void detectors(ServerLevel level) { + var path=straight();build(level,path,-1); + var detector=at(5,0,0,0);var activator=at(9,0,0,0); + level.setBlock(detector,Blocks.DETECTOR_RAIL.defaultBlockState().setValue(DetectorRailBlock.SHAPE,RailShape.EAST_WEST),2); + level.setBlock(activator,Blocks.ACTIVATOR_RAIL.defaultBlockState().setValue(PoweredRailBlock.SHAPE,RailShape.EAST_WEST).setValue(PoweredRailBlock.POWERED,true),2); + var cart=cart(level,at(0,0,0,0),new Vec3(1.5,0,0)); + boolean detected=false,activated=false; + for(int t=0;t<65;t++) { + cart.tick();detected|=level.getBlockState(detector).getValue(DetectorRailBlock.POWERED); + activated|=cart.getHurtTime()>0; + if(cart.getX()>73)break; + } + require(detected,"detector rail registers high speed cart");require(activated,"activator rail activates cart");cart.discard(); + } + private static void water(ServerLevel level) { + var path=straight();build(level,path,0); + for(var rail:path)level.setBlock(rail.pos,rail.state.setValue(BaseRailBlock.WATERLOGGED,true),2); + var cart=cart(level,at(3,0,0,0),new Vec3(1.5,0,0)); + double previousX=cart.getX(); + for(int t=0;t<5;t++){previousX=cart.getX();cart.tick();} + require(cart.isInWater(),"waterlogged track is native water"); + require(cart.getX()-previousX<=.501,"water speed reduction: "+(cart.getX()-previousX));cart.discard(); + } + private static void cartTypes(ServerLevel level) { + build(level,straight(),0); + List> types=List.of( + EntityTypes.MINECART,EntityTypes.CHEST_MINECART,EntityTypes.HOPPER_MINECART,EntityTypes.FURNACE_MINECART, + EntityTypes.TNT_MINECART,EntityTypes.COMMAND_BLOCK_MINECART,EntityTypes.SPAWNER_MINECART); + for(var type:types) { + var cart=type.create(level,net.minecraft.world.entity.EntitySpawnReason.COMMAND); + require(cart!=null,"create "+type); + cart.setPos(63.5,100.0625,64.5);cart.setDeltaMovement(2,0,0);level.addFreshEntity(cart); + cart.tick();double before=cart.getX();cart.tick(); + double distance=cart.getX()-before; + require(Math.abs(distance-1)<.015,"20 m/s for "+type+": "+distance);cart.discard(); + } + } + private static void transitions(ServerLevel level) { + build(level,straight(),0); + for(int x=6;x<=14;x++)Rails.put(level,at(x,0,0,0),new RailKind(3,true)); + var cart=cart(level,at(2,0,0,0),new Vec3(1.5,0,0));boolean crossed=false; + for(int t=0;t<35;t++) { + double before=cart.getX();cart.tick(); + if(before>=66.1) {crossed=true;require(cart.getX()-before<=.415,"20 to 8 transition obeys slower rail");} + if(cart.getX()>72)break; + } + require(crossed,"crossed oxidation boundary");cart.discard(); + build(level,straight(),-1); + // Native rail at the end: approach is limited before the cart leaves the track. + cart=cart(level,at(13,0,0,0),new Vec3(1.5,0,0)); + double before=cart.getX();cart.tick(); + if(!net.minecraft.world.entity.vehicle.minecart.AbstractMinecart.useExperimentalMovement(level)) + require(cart.getX()-before<=.415,"end of track safe approach"); + cart.discard(); + } + private static void require(boolean condition,String message){if(!condition)throw new AssertionError(message);} +} diff --git a/src/verification/resources/META-INF/neoforge.mods.toml b/src/verification/resources/META-INF/neoforge.mods.toml new file mode 100644 index 0000000..84eb2ec --- /dev/null +++ b/src/verification/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,7 @@ +modLoader="javafml" +loaderVersion="[11,)" +license="All Rights Reserved" +[[mods]] +modId="astracontent_verify" +version="1.0" +displayName="AstraContent isolated verification" diff --git a/tools/generate-resources.ps1 b/tools/generate-resources.ps1 new file mode 100644 index 0000000..bc3fd35 --- /dev/null +++ b/tools/generate-resources.ps1 @@ -0,0 +1,63 @@ +$ErrorActionPreference = 'Stop' +$root = Join-Path $PSScriptRoot '../src/main/resources/defaults' +function Write-Json($relative, $value) { + $path = Join-Path $root $relative + New-Item -ItemType Directory -Force (Split-Path $path) | Out-Null + $value | ConvertTo-Json -Depth 30 | Set-Content -LiteralPath $path -Encoding utf8NoBOM +} +function Rail-Model($age, $on, $shape) { + $slope = $shape.StartsWith('ascending_') + $height = if ($slope) { 9.04 } else { 1.04 } + $angle = if ($shape -in @('ascending_south','ascending_west')) { -45 } else { 45 } + $elements = @() + foreach ($strip in @(@(0,16,'#rail'),@(2,4,'#copper'),@(12,14,'#copper'))) { + $y = $height + $(if ($strip[2] -eq '#copper') { .02 } else { 0 }) + $uv = if ($strip[2] -eq '#copper') { @(4,0,6,16) } else { @(0,0,16,16) } + $element = @{from=@($strip[0],$y,0);to=@($strip[1],$y,16);faces=@{ + up=@{uv=$uv;texture=$strip[2]};down=@{uv=$uv;texture=$strip[2]} + }} + if ($slope) { $element.rotation=@{origin=@(8,9,8);axis='x';angle=$angle;rescale=$true} } + $elements += $element + } + $copper = @('copper_block','exposed_copper','weathered_copper','oxidized_copper')[$age] + $rail = if($on) {'powered_rail_on'} else {'powered_rail'} + return @{ambientocclusion=$false;textures=@{rail="minecraft:block/$rail";copper="minecraft:block/$copper";particle="minecraft:block/$copper"};elements=$elements} +} +$prefixes = @('','exposed_','weathered_','oxidized_') +$names = @('Медные рельсы','Потемневшие медные рельсы','Состаренные медные рельсы','Окисленные медные рельсы') +$english = @('Copper Rail','Exposed Copper Rail','Weathered Copper Rail','Oxidized Copper Rail') +$ru=@{}; $en=@{} +for($age=0;$age -lt 4;$age++) { + for($wax=0;$wax -lt 2;$wax++) { + $id = $(if($wax) {'waxed_'} else {''})+$prefixes[$age]+'copper_rail' + $name = $(if($wax) {'Вощёные: '} else {''})+$names[$age] + $ru["item.astracontent.$id"]=$name + $en["item.astracontent.$id"]=$(if($wax){'Waxed '}else{''})+$english[$age] + Write-Json "resources/assets/astracontent/items/$id.json" @{model=@{type='minecraft:model';model="astracontent:item/$id"}} + $model = Rail-Model $age $false 'north_south' + $model.display=@{gui=@{rotation=@(35,0,0);translation=@(0,0,0);scale=@(1,1,1)};fixed=@{rotation=@(90,0,0)}} + Write-Json "resources/assets/astracontent/models/item/$id.json" $model + } + foreach($shape in @('north_south','east_west','ascending_north','ascending_south','ascending_east','ascending_west')) { + foreach($on in @($false,$true)) { + $id="rail_display/$age/$shape"+$(if($on){'_on'}else{''}) + Write-Json "resources/assets/astracontent/models/$id.json" (Rail-Model $age $on $shape) + Write-Json "resources/assets/astracontent/items/$id.json" @{model=@{type='minecraft:model';model="astracontent:$id"}} + } + } +} +Write-Json 'resources/assets/astracontent/lang/ru_ru.json' $ru +Write-Json 'resources/assets/astracontent/lang/en_us.json' $en +Write-Json '../data/astracontent/recipe/copper_rail.json' @{ + type='minecraft:crafting_shaped';pattern=@('X X','X#X','XRX');key=@{X='minecraft:copper_ingot';'#'='minecraft:stick';R='minecraft:redstone'} + result=@{id='minecraft:powered_rail';count=6;components=@{ + 'minecraft:custom_data'=@{'astracontent:rail'=0};'minecraft:item_model'='astracontent:copper_rail' + 'minecraft:item_name'=@{translate='item.astracontent.copper_rail';fallback='Медные рельсы'} + }} +} +Write-Json '../data/astracontent/advancement/recipes/copper_rail.json' @{ + parent='minecraft:recipes/root';criteria=@{copper=@{trigger='minecraft:inventory_changed';conditions=@{items=@(@{items='minecraft:copper_ingot'})}}} + requirements=@(,@('copper'));rewards=@{recipes=@('astracontent:copper_rail')} +} +$root = (Resolve-Path $root).Path +Get-ChildItem -LiteralPath $root -Recurse -File | Where-Object Name -ne 'index.txt' | ForEach-Object { [IO.Path]::GetRelativePath($root,$_.FullName).Replace('\','/') } | Sort-Object | Set-Content -LiteralPath (Join-Path $root 'index.txt') -Encoding utf8NoBOM diff --git a/tools/verify-server.ps1 b/tools/verify-server.ps1 new file mode 100644 index 0000000..ae12abe --- /dev/null +++ b/tools/verify-server.ps1 @@ -0,0 +1,41 @@ +param([string]$ServerRoot='C:\Users\ScarPC\Documents\NeoForge Server 26.2',[switch]$Experimental) +$ErrorActionPreference='Stop' +$project=(Resolve-Path "$PSScriptRoot/..").Path +$output=Join-Path $project ('build/verification-'+(Get-Date -Format 'yyyyMMdd-HHmmss')) +New-Item -ItemType Directory -Path "$output/mods","$output/config" | Out-Null +$runtime=(Resolve-Path -LiteralPath $ServerRoot).Path.Replace('\','/') +$lines=(Get-Content -Raw "$runtime/libraries/net/neoforged/neoforge/26.2.0.79/win_args.txt").Replace('libraries/',($runtime+'/libraries/')) -split "`r?`n" +for($i=0;$i -lt $lines.Length;$i++) { + if($lines[$i].StartsWith('-DlibraryDirectory=')){$lines[$i]='"-DlibraryDirectory='+$runtime+'/libraries"'} + if($i -gt 0 -and $lines[$i-1] -eq '-classpath'){$lines[$i]='"'+$lines[$i]+'"'} +} +$lines | Set-Content "$output/server-args.txt" +'eula=true' | Set-Content "$output/eula.txt" +@' +server-ip=127.0.0.1 +server-port=26783 +online-mode=false +level-type=minecraft:flat +generate-structures=false +view-distance=2 +simulation-distance=2 +spawn-protection=0 +max-tick-time=120000 +'@ | Set-Content "$output/server.properties" +if($Experimental){'initial-enabled-packs=vanilla,minecart_improvements' | Add-Content "$output/server.properties"} +'{"build":{"onStartup":false},"astraPacks":{"enabled":false},"editor":{"enabled":false}}' | Set-Content "$output/config/astraplus.json" +$plus=Get-ChildItem -LiteralPath "$ServerRoot/mods" -Filter 'AstraPlus-*.jar' | Where-Object Name -NotMatch 'sources|api|verification' +if(@($plus).Count -ne 1){throw 'Expected exactly one installed AstraPlus JAR'} +Copy-Item -LiteralPath $plus.FullName,"$project/build/libs/AstraContent-0.1.0.jar","$project/build/libs/AstraContent-0.1.0-verification.jar" -Destination "$output/mods" +Push-Location $output +try { + foreach($pass in @('gameplay','restart')) { + & 'C:/Users/ScarPC/.gradle/jdks/eclipse_adoptium-25-amd64-windows.2/bin/java.exe' '-Xmx2G' '-Dastracontent.verify=true' "-Dastracontent.expectedExperimental=$($Experimental.IsPresent.ToString().ToLowerInvariant())" '@server-args.txt' nogui *> "$pass.log" + if($LASTEXITCODE -ne 0){throw "Server failed: $output/$pass.log"} + $result=Get-Content -Raw verification-result.txt + if(!$result.StartsWith("PASS $pass")){throw "Verification failed: $result ($output/$pass.log)"} + Copy-Item verification-result.txt "$pass-result.txt" + Write-Output $result.Trim() + } +}finally{Pop-Location} +Write-Output "Evidence: $output"