Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa162ff3ee | ||
|
|
1db17ed64e |
@@ -0,0 +1,143 @@
|
|||||||
|
# Decocraft Pack Template
|
||||||
|
|
||||||
|
Universal addon pack for Decocraft. No Java code needed.
|
||||||
|
Single jar works on both NeoForge and Fabric.
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. Clone this repo
|
||||||
|
2. Edit `gradle.properties` - change `mod_id`, `mod_name`, `mod_description`, `mod_authors`
|
||||||
|
3. Edit `settings.gradle` - change `rootProject.name`
|
||||||
|
4. Rename `src/main/resources/assets/decocraft/mypack.json` to your pack name
|
||||||
|
5. Update `decocraft.json` to point to your renamed file and `groups.json`
|
||||||
|
6. Edit `groups.json` to define your creative tabs
|
||||||
|
7. Add your content (see below)
|
||||||
|
8. `./gradlew build` - jar goes to `build/libs/`
|
||||||
|
|
||||||
|
The output jar contains both `fabric.mod.json` and `META-INF/neoforge.mods.toml`,
|
||||||
|
so it loads on either mod loader without separate builds.
|
||||||
|
|
||||||
|
## File Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
assets/decocraft/
|
||||||
|
decocraft.json - manifest: lists groups.json + your content files
|
||||||
|
groups.json - creative tab definitions
|
||||||
|
mypack.json - block/item definitions
|
||||||
|
models/bbmodel/{model}.bbmodel - BlockBench 3D models
|
||||||
|
textures/block/{material}.png - block textures
|
||||||
|
textures/item/{material}.png - item/inventory textures
|
||||||
|
lang/en_us.json - display names + tab labels
|
||||||
|
```
|
||||||
|
|
||||||
|
All assets go under the `decocraft` namespace.
|
||||||
|
|
||||||
|
Blockstates, block models, item models, item definitions, and loot tables
|
||||||
|
are all generated dynamically at runtime by the main Decocraft mod.
|
||||||
|
You do NOT need to create these files.
|
||||||
|
|
||||||
|
## Per Block Checklist
|
||||||
|
|
||||||
|
For each block you add, you need:
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
|------|---------|
|
||||||
|
| `mypack.json` | Entry in the `models` array |
|
||||||
|
| `models/bbmodel/{model}.bbmodel` | BlockBench 3D model |
|
||||||
|
| `textures/block/{material}.png` | Block texture |
|
||||||
|
| `textures/item/{material}.png` | Item texture |
|
||||||
|
| `lang/en_us.json` | `"block.decocraft.{decoref}": "Display Name"` |
|
||||||
|
|
||||||
|
That is it. Everything else is handled automatically.
|
||||||
|
|
||||||
|
## Manifest (decocraft.json)
|
||||||
|
|
||||||
|
Simple array listing files to load. Include `groups.json` first:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
"groups.json",
|
||||||
|
"mypack.json"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
Decocraft merges manifests from all jars, so your pack's files are loaded
|
||||||
|
alongside the base decocraft files.
|
||||||
|
|
||||||
|
## Creative Tabs (groups.json)
|
||||||
|
|
||||||
|
Declare tabs with a translation key and icon block:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"my_tab": { "label": "itemGroup.decocraft.my_tab", "icon": "some_block_id" }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add the display name in `lang/en_us.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"itemGroup.decocraft.my_tab": "Decocraft - My Tab"
|
||||||
|
```
|
||||||
|
|
||||||
|
The `icon` must match a block's `decoref` from your content JSON. Tabs from
|
||||||
|
all packs are merged. If the base decocraft already defines a tab key, your
|
||||||
|
blocks will appear in that existing tab.
|
||||||
|
|
||||||
|
## Content JSON Entry
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Display Name",
|
||||||
|
"model": "bbmodel_filename_without_extension",
|
||||||
|
"material": "texture_name",
|
||||||
|
"scale": 1.0,
|
||||||
|
"tabs": "your_tab_name",
|
||||||
|
"crafting_color": [50.0, 50.0, 50.0],
|
||||||
|
"decoref": "unique_block_id"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Common Types
|
||||||
|
|
||||||
|
| type | behavior |
|
||||||
|
|------|----------|
|
||||||
|
| (empty/omitted) | Basic decoration block (default) |
|
||||||
|
| `"underlayer"` | Wall/floor mounted virtual overlay (paintings, carpets) |
|
||||||
|
| `"animated"` | Block with keyframe animations |
|
||||||
|
| `"rotatable"` | Block that places at 45 degree increments |
|
||||||
|
| `"bed"` | Sleepable bed |
|
||||||
|
| `"seat"` | Sittable block |
|
||||||
|
| `"chain"` | Chain/rope connector |
|
||||||
|
|
||||||
|
### Optional Fields
|
||||||
|
|
||||||
|
- `"hidden": true` - registered but not in creative tabs
|
||||||
|
- `"transparency": true` - translucent rendering
|
||||||
|
- `"passable": true` - no collision
|
||||||
|
- `"loot": "other_decoref"` - override what drops when broken
|
||||||
|
- `"flipbook": {"frametime": 4, "images": 6}` - animated texture
|
||||||
|
- `"script"` - tool_modelswitch, on_use, sounds, particles, etc.
|
||||||
|
|
||||||
|
### Model Switching (cycle variants with decobrush)
|
||||||
|
|
||||||
|
```json
|
||||||
|
"script": {
|
||||||
|
"tool_modelswitch": {
|
||||||
|
"link": "next_variant_id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Chain the last variant back to the first to create a cycle.
|
||||||
|
|
||||||
|
## Full Documentation
|
||||||
|
|
||||||
|
See `json_documentation.md` in the main Decocraft mod for the complete
|
||||||
|
field reference with examples of every block type.
|
||||||
|
|
||||||
|
## Version Compatibility
|
||||||
|
|
||||||
|
Version ranges are open ended, so the pack works with any Decocraft 4.0+
|
||||||
|
on Minecraft 26.1+. Bump `decocraft_version` in `gradle.properties` if you
|
||||||
|
use features from a newer decocraft release.
|
||||||
@@ -10,14 +10,14 @@ minecraft_version_range=[26.1,)
|
|||||||
neoforge_loader_range=[4,)
|
neoforge_loader_range=[4,)
|
||||||
fabric_loader_version=0.18.2
|
fabric_loader_version=0.18.2
|
||||||
|
|
||||||
## Mod Properties
|
## Mod Properties - CHANGE THESE for your pack
|
||||||
mod_id=decocraft_worldflags
|
mod_id=decocraft_mypack
|
||||||
mod_name=Decocraft World Flags Addon
|
mod_name=Decocraft My Pack
|
||||||
mod_license=All Rights Reserved
|
mod_license=All Rights Reserved
|
||||||
mod_version=1.0.0
|
mod_version=1.0.0
|
||||||
mod_group_id=com.razz.decocraft.worldflags
|
mod_group_id=com.razz.decocraft.mypack
|
||||||
mod_authors=Momo, Razz, ProfMobius, Taelnia
|
mod_authors=YourName
|
||||||
mod_description=Adds world flag decorations to Decocraft
|
mod_description=Adds new decorations to Decocraft
|
||||||
|
|
||||||
# Decocraft minimum version
|
# Decocraft minimum version
|
||||||
decocraft_version=3.0.7
|
decocraft_version=3.0.7
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
retries=0
|
|
||||||
retryBackOffMs=500
|
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/<unknown>/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -114,6 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -171,6 +172,7 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@@ -210,6 +212,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
@rem Set local scope for the variables with windows NT shell
|
||||||
setlocal EnableExtensions
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
|||||||
echo Please set the JAVA_HOME variable in your environment to match the 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
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
"%COMSPEC%" /c exit 1
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
@@ -65,18 +65,30 @@ echo. 1>&2
|
|||||||
echo Please set the JAVA_HOME variable in your environment to match the 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
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
"%COMSPEC%" /c exit 1
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
@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
|
:end
|
||||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
@rem End local scope for the variables with windows NT shell
|
||||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ plugins {
|
|||||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.9.0'
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.9.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = 'decocraft-worldflags'
|
rootProject.name = 'decocraft-mypack'
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[
|
[
|
||||||
"groups.json",
|
"groups.json",
|
||||||
"worldflags.json"
|
"mypack.json"
|
||||||
]
|
]
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"worldflags": { "label": "itemGroup.decocraft.worldflags", "icon": "wall_flag_1_mexico" }
|
"mypack": { "label": "itemGroup.decocraft.mypack", "icon": "example_block" }
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"itemGroup.decocraft.mypack": "Decocraft - My Pack",
|
||||||
|
"block.decocraft.example_block": "Example Block",
|
||||||
|
"item.decocraft.example_block": "Example Block"
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"models": [
|
||||||
|
{
|
||||||
|
"name": "Example Block",
|
||||||
|
"model": "example_block",
|
||||||
|
"material": "example_block",
|
||||||
|
"scale": 1.0,
|
||||||
|
"tabs": "mypack",
|
||||||
|
"crafting_color": [50.0, 50.0, 50.0],
|
||||||
|
"decoref": "example_block"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 1002 B |
|
Before Width: | Height: | Size: 996 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1008 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 954 B |
|
Before Width: | Height: | Size: 1014 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 975 B |
|
Before Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 997 B |
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 989 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1008 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1015 B |
|
Before Width: | Height: | Size: 969 B |
|
Before Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1000 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 985 B |
|
Before Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1003 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 1001 B |
|
Before Width: | Height: | Size: 994 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1018 B |
|
Before Width: | Height: | Size: 979 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 994 B |
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 992 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1016 B |
|
Before Width: | Height: | Size: 1018 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 959 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1023 B |
|
Before Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 981 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 997 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 983 B |