Compare commits
6 Commits
main
...
denkmalsch
Author | SHA1 | Date |
---|---|---|
Malte Reents | e521690448 | |
Malte Reents | a50d5f6cc7 | |
Malte Reents | 7319724efa | |
Malte Reents | e6acd9460d | |
Malte | 0c99c0b24e | |
Malte Reents | 328e15d4d5 |
|
@ -0,0 +1,7 @@
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
|
@ -0,0 +1,249 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# 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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || 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
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
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" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# 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, 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" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# 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" "$@"
|
|
@ -0,0 +1,92 @@
|
||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@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.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% 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
|
|
@ -1,17 +1,18 @@
|
||||||
package modchest;
|
package modchest;
|
||||||
|
|
||||||
import modchest.networking.modNetworkingClient;
|
import modchest.util.clientInitializer;
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class REServerModClient implements ClientModInitializer {
|
public class REServerModClient implements ClientModInitializer {
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger("modchest"); // Erster Error Logger
|
public static final Logger LOGGER = LoggerFactory.getLogger("modchest"); // Erster Error Logger
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
// This entrypoint is suitable for setting up client-specific logic, such as rendering.
|
// This entrypoint is suitable for setting up client-specific logic, such as rendering.
|
||||||
|
clientInitializer.renderer();
|
||||||
modNetworkingClient.registerC2SPackets(); //Identifier unter denen der Client zuhoert werden registriert
|
clientInitializer.networking();
|
||||||
|
|
||||||
LOGGER.info("Modchest-Client successfully loaded!");
|
LOGGER.info("Modchest-Client successfully loaded!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package modchest.clientScreen;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
import modchest.screen.denkMalBlockScreenHandler;
|
||||||
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
|
import net.minecraft.client.render.GameRenderer;
|
||||||
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
public class denkMalBlockScreen extends HandledScreen<denkMalBlockScreenHandler> {
|
||||||
|
//private static final Identifier TEXTURE = new Identifier(REServerMod.MOD_ID, );
|
||||||
|
|
||||||
|
public denkMalBlockScreen(denkMalBlockScreenHandler handler, PlayerInventory inventory, Text title) {
|
||||||
|
super(handler, inventory, title);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() {
|
||||||
|
super.init();;
|
||||||
|
titleX = (backgroundWidth - textRenderer.getWidth(title)) / 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) {
|
||||||
|
RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
||||||
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
//RenderSystem.setShaderTexture(0, TEXTURE);
|
||||||
|
int x = (width - backgroundWidth) / 2;
|
||||||
|
int y = (height - backgroundHeight) / 2;
|
||||||
|
drawTexture(matrices, x, y, 0, 0, backgroundWidth, backgroundHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||||
|
renderBackground(matrices);
|
||||||
|
super.render(matrices, mouseX, mouseY, delta);
|
||||||
|
drawMouseoverTooltip(matrices, mouseX, mouseY);
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,7 +9,8 @@ public class modNetworkingClient { //Identifier werden eingeführt
|
||||||
public static final Identifier request_respawn = new Identifier(REServerMod.MOD_ID, "request_respawn"); //alle Identifier muessen leider IMMER auf Client und Server (doppelt) eingefuehrt werden
|
public static final Identifier request_respawn = new Identifier(REServerMod.MOD_ID, "request_respawn"); //alle Identifier muessen leider IMMER auf Client und Server (doppelt) eingefuehrt werden
|
||||||
public static final Identifier start_sleeping_call_buttons = new Identifier(REServerMod.MOD_ID, "start_sleeping_call_buttons");
|
public static final Identifier start_sleeping_call_buttons = new Identifier(REServerMod.MOD_ID, "start_sleeping_call_buttons");
|
||||||
public static final Identifier death_multi_respawn_buttons = new Identifier(REServerMod.MOD_ID, "death_call_respawn_buttons");
|
public static final Identifier death_multi_respawn_buttons = new Identifier(REServerMod.MOD_ID, "death_call_respawn_buttons");
|
||||||
public static void registerC2SPackets() { //Identifier fuer packets werden registriert (Identifier die der Server aufruft um beim CLient was auszufuehren)
|
|
||||||
|
public static void registerS2CPackets() { //Identifier fuer packets werden registriert (Identifier die der Server aufruft um beim Client was auszufuehren)
|
||||||
ClientPlayNetworking.registerGlobalReceiver(request_respawn, respawnRequestS2CPacket::receive); //was der Client dann machen soll steht in der receive Methode
|
ClientPlayNetworking.registerGlobalReceiver(request_respawn, respawnRequestS2CPacket::receive); //was der Client dann machen soll steht in der receive Methode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package modchest.util;
|
||||||
|
|
||||||
|
import modchest.block.modBlocks;
|
||||||
|
import modchest.clientScreen.denkMalBlockScreen;
|
||||||
|
import modchest.networking.modNetworkingClient;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||||
|
import net.minecraft.client.gui.screen.ingame.HandledScreens;
|
||||||
|
import net.minecraft.client.render.RenderLayer;
|
||||||
|
import modchest.screen.modScreenHandler;
|
||||||
|
|
||||||
|
public class clientInitializer {
|
||||||
|
public static void itemGroups() {
|
||||||
|
//modItemGroup.modchest(); // Item Gruppe fürs Creative-Inventar wird erstellt; In dieser Gruppe sollen
|
||||||
|
// dann alle Items und Blöcke dieser Mod angezeigt werden
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void itemsAndBlocks() {
|
||||||
|
//modItems.setItems(); // die Items werden erstellt
|
||||||
|
//modBlocks.setBlocks(); // Hier werden die Blöcke erstellt
|
||||||
|
//modBlockEntities.registerBlockEntities(); // Die Interaktionsmenüs für die Blöcke werden erstellt
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void events() { //Events, bei denen custom Code ausgefuehrt wird, werden eingefuehrt
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void networking() { //Identifier unter denen der Server zuhoert werden registriert
|
||||||
|
modNetworkingClient.registerS2CPackets(); //Identifier unter denen der Client zuhoert werden registriert
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void renderer() { //Grafikrenderer werden aufgerufen
|
||||||
|
BlockRenderLayerMap.INSTANCE.putBlock(modBlocks.denk_mal_block, RenderLayer.getTranslucent()); //denk_mal_block bekommt die Faehigkeit, transparente Grafiken zu haben
|
||||||
|
HandledScreens.register(modScreenHandler.denk_mal_block_screen_handler, denkMalBlockScreen::new);
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ public class REServerMod implements ModInitializer {
|
||||||
initializer.itemsAndBlocks();
|
initializer.itemsAndBlocks();
|
||||||
initializer.events();
|
initializer.events();
|
||||||
initializer.networking();
|
initializer.networking();
|
||||||
|
initializer.renderer();
|
||||||
|
|
||||||
LOGGER.info("Modchest successfully loaded!");
|
LOGGER.info("Modchest successfully loaded!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
package modchest.block.custom;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.block.entity.denkMalBlockEntity;
|
||||||
|
import modchest.util.denkMalBlockUtil;
|
||||||
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.entity.DispenserBlockEntity;
|
||||||
|
import net.minecraft.block.entity.DropperBlockEntity;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.ItemPlacementContext;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.stat.Stats;
|
||||||
|
import net.minecraft.state.StateManager;
|
||||||
|
import net.minecraft.state.property.BooleanProperty;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.ItemScatterer;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.util.math.random.Random;
|
||||||
|
import net.minecraft.util.shape.VoxelShape;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.WorldAccess;
|
||||||
|
import net.minecraft.world.explosion.Explosion;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mutable;
|
||||||
|
|
||||||
|
import static modchest.block.modBlocks.denk_mal_block_placeholder;
|
||||||
|
|
||||||
|
public class denkMalBlock extends BlockWithEntity implements BlockEntityProvider { //Item soll nicht craftable sein
|
||||||
|
public static BooleanProperty POWERED = BooleanProperty.of("powered"); //speichert ob der Block ein Redstonesignal erhaelt
|
||||||
|
|
||||||
|
public denkMalBlock(FabricBlockSettings fabricBlockSettings) {
|
||||||
|
super(fabricBlockSettings);
|
||||||
|
setDefaultState(getDefaultState().with(POWERED, false)); //Block ist beim platzieren immer aus
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockRenderType getRenderType(BlockState state) { //ruft auf, die Grafik zu rendern
|
||||||
|
return BlockRenderType.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static VoxelShape SHAPE = BlockWithEntity.createCuboidShape(0, 0, 0, 16, 32, 16); //Erstellt eine approximation des Koerpers; braucht weniger Leistung als ein Volles Rendern
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { //Beschreibt die tatsaechlichen Konturen
|
||||||
|
return SHAPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { //dropt alle Items im Inventar, wenn der Block zerstoert wird
|
||||||
|
if (state.getBlock() != newState.getBlock()) {
|
||||||
|
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||||
|
if (blockEntity instanceof denkMalBlockEntity) {
|
||||||
|
//ItemScatterer.spawn(world, pos, (denkMalBlockEntity) blockEntity);
|
||||||
|
world.updateComparators(pos, this);
|
||||||
|
}
|
||||||
|
super.onStateReplaced(state, world, pos, newState, moved);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new denkMalBlockEntity(pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTranslucent(BlockState state, BlockView world, BlockPos pos) { //damit man durch den Glasteil des blockes sehen kann
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override //Block soll nicht gedroped werden
|
||||||
|
public boolean shouldDropItemsOnExplosion(Explosion explosion) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) { //platziert den placeholder block oben drauf, weil es in miencraft keine 2 hohen Bloecke gibt
|
||||||
|
super.onPlaced(world, pos, state, placer, itemStack);
|
||||||
|
if (!world.isClient) {
|
||||||
|
world.setBlockState(pos.up(1), denk_mal_block_placeholder.getDefaultState(), Block.NOTIFY_ALL); //platziert den placeholder Block ueber sich selbst
|
||||||
|
world.updateNeighbors(pos, Blocks.AIR);
|
||||||
|
state.updateNeighbors(world, pos, Block.NOTIFY_ALL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) { //entfernt sich aus der Liste der zu ueberpruefenden bloecke
|
||||||
|
denkMalBlockUtil data = new denkMalBlockUtil();
|
||||||
|
world.setBlockState(pos.up(1), Blocks.AIR.getDefaultState(), Block.NOTIFY_ALL); //entfernt den Placeholder block ueber sich
|
||||||
|
int[] temp = new int[3];
|
||||||
|
temp[0] = pos.getX();
|
||||||
|
temp[1] = pos.getY();
|
||||||
|
temp[2] = pos.getZ();
|
||||||
|
data.removeBlock(temp); //entfernt sich aus der liste der Abbauverhindernden Bloecke
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//CODE ZUM UEBERPREUFEN OB MIT REDSTONE GEPOWERED
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nullable
|
||||||
|
public BlockState getPlacementState(ItemPlacementContext ctx) {
|
||||||
|
return (BlockState) this.getDefaultState().with(POWERED, ctx.getWorld().isReceivingRedstonePower(ctx.getBlockPos()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||||
|
if (world.isClient) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
boolean bl = state.get(POWERED);
|
||||||
|
|
||||||
|
if (bl != world.isReceivingRedstonePower(pos)) {
|
||||||
|
if (bl) {
|
||||||
|
world.createAndScheduleBlockTick(pos, this, 4);
|
||||||
|
} else {
|
||||||
|
world.setBlockState(pos, (BlockState) state.cycle(POWERED), Block.NOTIFY_LISTENERS);
|
||||||
|
changePositionList(state, world, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||||
|
if (state.get(POWERED).booleanValue() && !world.isReceivingRedstonePower(pos)) {
|
||||||
|
world.setBlockState(pos, (BlockState) state.cycle(POWERED), Block.NOTIFY_LISTENERS);
|
||||||
|
changePositionList(state, world, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||||
|
builder.add(POWERED);
|
||||||
|
}
|
||||||
|
|
||||||
|
//CODE ZUM UEBERÜREUFEN OB MIT REDSTONE GEPOWERED ZUENDE
|
||||||
|
|
||||||
|
private void changePositionList(BlockState state, World world, BlockPos pos) { //aendert ob der Block in der Liste der Bloecke steht, die das abbauen verhindern
|
||||||
|
denkMalBlockUtil data = new denkMalBlockUtil();
|
||||||
|
if (!world.isClient) {
|
||||||
|
int[] temp = new int[3];
|
||||||
|
temp[0] = pos.getX();
|
||||||
|
temp[1] = pos.getY();
|
||||||
|
temp[2] = pos.getZ();
|
||||||
|
int[] range = new int[6]; //noch ist die range auf 20 Bloecke, soll aber spaeter via ein Entity vom Spieler veraendert werden koennen
|
||||||
|
range[0] = 20;
|
||||||
|
range[1] = 20;
|
||||||
|
range[2] = 20;
|
||||||
|
range[3] = 20;
|
||||||
|
range[4] = 20;
|
||||||
|
range[5] = 20;
|
||||||
|
if (!state.get(POWERED)) {
|
||||||
|
data.addBlock(temp, range);
|
||||||
|
} else {
|
||||||
|
data.removeBlock(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
|
if (world.isClient) {
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||||
|
player.openHandledScreen((denkMalBlockEntity) blockEntity);
|
||||||
|
return ActionResult.CONSUME;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package modchest.block.custom;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.util.denkMalBlockUtil;
|
||||||
|
import net.minecraft.block.*;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.shape.VoxelShape;
|
||||||
|
import net.minecraft.util.shape.VoxelShapes;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
|
import net.minecraft.world.WorldAccess;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import static modchest.block.modBlocks.denk_mal_block_placeholder;
|
||||||
|
|
||||||
|
public class denkMalBlockPlaceholder extends BlockWithEntity { //Block der simuliert, dass der DenkMalBLock 2 Bloecke hoch waere
|
||||||
|
public denkMalBlockPlaceholder(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockRenderType getRenderType(BlockState state) { //Grafik kommt vom DenkMalBLock, dieser Block muss also unsichtbar sein
|
||||||
|
return BlockRenderType.INVISIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) { //Loescht den eigentlichen DenkMalBlock
|
||||||
|
denkMalBlockUtil data = new denkMalBlockUtil(); //denkMalBLockUtil holt sich alle infos von der static dataSaverIO Klasse
|
||||||
|
world.setBlockState(pos.down(1), Blocks.AIR.getDefaultState(), Block.NOTIFY_ALL); //unter diesem Block wird Luft platziert
|
||||||
|
int[] temp = new int[3];
|
||||||
|
temp[0] = pos.getX();
|
||||||
|
temp[1] = (pos.getY()-1);
|
||||||
|
temp[2] = pos.getZ();
|
||||||
|
data.removeBlock(temp); //Loescht den denkMalBLock aus der Liste der abbauverhindernden Bloecke
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,15 +25,13 @@ public class steeringWheelBlock extends BlockWithEntity implements BlockEntityPr
|
||||||
super(settings);
|
super(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* stuff benötigt um das Interaktionsmenü zu laden!*/
|
|
||||||
@Override
|
@Override
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
public BlockRenderType getRenderType(BlockState state) {//ruft auf, die Grafik zu rendern
|
||||||
return BlockRenderType.MODEL;
|
return BlockRenderType.MODEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { //Aufgerufen bei blockstate veraenderung, z.B. restonestaerke
|
||||||
if (state.getBlock() != newState.getBlock()) {
|
if (state.getBlock() != newState.getBlock()) {
|
||||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||||
if (blockEntity instanceof steeringWheelEntity) {
|
if (blockEntity instanceof steeringWheelEntity) {
|
||||||
|
@ -44,6 +42,7 @@ public class steeringWheelBlock extends BlockWithEntity implements BlockEntityPr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stuff benötigt um das Interaktionsmenü zu laden!*/
|
||||||
@Override //wird bei einem rechtsklick aufgerufen (ersellt das Blockentity)
|
@Override //wird bei einem rechtsklick aufgerufen (ersellt das Blockentity)
|
||||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||||
if (!world.isClient) {
|
if (!world.isClient) {
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
package modchest.block.entity;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.screen.denkMalBlockScreenHandler;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.inventory.SimpleInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
import net.minecraft.screen.Generic3x3ContainerScreenHandler;
|
||||||
|
import net.minecraft.screen.NamedScreenHandlerFactory;
|
||||||
|
import net.minecraft.screen.ScreenHandler;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.collection.DefaultedList;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class denkMalBlockEntity extends BlockEntity implements NamedScreenHandlerFactory//, ImplementedInventory
|
||||||
|
{
|
||||||
|
//private final DefaultedList<ItemStack> inventory = DefaultedList.ofSize(3, ItemStack.EMPTY);
|
||||||
|
private SimpleInventory inventory = new SimpleInventory(3);
|
||||||
|
|
||||||
|
private int[] protectedAreaSize = new int[6]; //range ist 6 stellen lang mit immer der erlaubten range in negative richtung, dann positiv fuer alle 3 Koordinaten, also: -x, +x, -y, +y, -z, +z Richtung
|
||||||
|
private int[] posBlock = new int[3];
|
||||||
|
|
||||||
|
protected denkMalBlockEntity(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockState blockState) {
|
||||||
|
super(blockEntityType, blockPos, blockState);
|
||||||
|
}
|
||||||
|
|
||||||
|
public denkMalBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
super(modBlockEntities.denk_mal_block_interface, pos, state);
|
||||||
|
posBlock[0] = pos.getX();
|
||||||
|
posBlock[1] = pos.getY();
|
||||||
|
posBlock[2] = pos.getZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
//@Override
|
||||||
|
public int size() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
//@Override
|
||||||
|
public DefaultedList<ItemStack> getItems() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Text getDisplayName() {
|
||||||
|
return Text.literal("Denkmal Block");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player) {
|
||||||
|
//return new Generic3x3ContainerScreenHandler(syncId, inv, this);
|
||||||
|
REServerMod.LOGGER.info("creating Menu!");
|
||||||
|
return new denkMalBlockScreenHandler(syncId, inv, inventory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void writeNbt(NbtCompound nbt) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readNbt(NbtCompound nbt) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,10 +10,15 @@ import net.minecraft.util.registry.Registry;
|
||||||
//rendert letztendlich die Interaktionsmenüs der Blöcke
|
//rendert letztendlich die Interaktionsmenüs der Blöcke
|
||||||
public class modBlockEntities {
|
public class modBlockEntities {
|
||||||
public static BlockEntityType<steeringWheelEntity> steering_wheel_interface; // Interaktionsmenü wird erstellt
|
public static BlockEntityType<steeringWheelEntity> steering_wheel_interface; // Interaktionsmenü wird erstellt
|
||||||
|
public static BlockEntityType<denkMalBlockEntity> denk_mal_block_interface;
|
||||||
|
|
||||||
public static void registerBlockEntities() {
|
public static void registerBlockEntities() {
|
||||||
steering_wheel_interface = Registry.register(Registry.BLOCK_ENTITY_TYPE,
|
steering_wheel_interface = Registry.register(Registry.BLOCK_ENTITY_TYPE,
|
||||||
new Identifier(REServerMod.MOD_ID, "steering_wheel_interface"), // Interkationsmenü wird gerendert
|
new Identifier(REServerMod.MOD_ID, "steering_wheel_interface"), // Interkationsmenü wird gerendert
|
||||||
FabricBlockEntityTypeBuilder.create(steeringWheelEntity::new, modBlocks.steering_wheel).build(null));
|
FabricBlockEntityTypeBuilder.create(steeringWheelEntity::new, modBlocks.steering_wheel).build(null));
|
||||||
|
|
||||||
|
denk_mal_block_interface = Registry.register(Registry.BLOCK_ENTITY_TYPE,
|
||||||
|
new Identifier(REServerMod.MOD_ID, "denk_mal_block_interface"),
|
||||||
|
FabricBlockEntityTypeBuilder.create(denkMalBlockEntity::new, modBlocks.denk_mal_block).build(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package modchest.block;
|
package modchest.block;
|
||||||
|
|
||||||
|
import modchest.block.custom.denkMalBlock;
|
||||||
|
import modchest.block.custom.denkMalBlockPlaceholder;
|
||||||
import modchest.block.custom.steeringWheelBlock;
|
import modchest.block.custom.steeringWheelBlock;
|
||||||
import modchest.item.modItemGroup;
|
import modchest.item.modItemGroup;
|
||||||
import modchest.REServerMod;
|
import modchest.REServerMod;
|
||||||
|
@ -15,22 +17,33 @@ import net.minecraft.util.registry.Registry;
|
||||||
//setzt die blöcke auf
|
//setzt die blöcke auf
|
||||||
public class modBlocks {
|
public class modBlocks {
|
||||||
public static Block steering_wheel; // Block wird erstellt
|
public static Block steering_wheel; // Block wird erstellt
|
||||||
|
public static Block denk_mal_block;
|
||||||
|
public static Block denk_mal_block_placeholder;
|
||||||
|
|
||||||
public static void setBlocks() {// Block wird definiert
|
public static void setBlocks() {// Block wird definiert
|
||||||
steering_wheel = registerBlock("steering_wheel",
|
steering_wheel = registerBlock("steering_wheel",
|
||||||
new steeringWheelBlock(FabricBlockSettings.of(Material.WOOD).strength(1.0f).requiresTool()),
|
new steeringWheelBlock(FabricBlockSettings.of(Material.WOOD).strength(1.0f).requiresTool().nonOpaque()),
|
||||||
modItemGroup.modchest);
|
modItemGroup.modchest);
|
||||||
|
|
||||||
|
denk_mal_block = registerBlock("denk_mal_block",
|
||||||
|
new denkMalBlock(FabricBlockSettings.of(Material.METAL).strength(4.0f).requiresTool().luminance((state) -> state.get(denkMalBlock.POWERED) ? 5 : 0).nonOpaque()),
|
||||||
|
modItemGroup.modchest);
|
||||||
|
|
||||||
|
denk_mal_block_placeholder = registerBlockWithoutItem("denk_mal_block_placeholder",
|
||||||
|
new denkMalBlockPlaceholder(FabricBlockSettings.of(Material.METAL).strength(4.0f).requiresTool().nonOpaque()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Block registerBlock(String name, Block block, ItemGroup group) { // Nicht verändern! Fügt die oben
|
private static Block registerBlock(String name, Block block, ItemGroup group) { // Nicht verändern! Fügt die oben definierten Blöcke dem Register hinzu
|
||||||
// definierten Blöcke dem Register
|
|
||||||
// hinzu
|
|
||||||
Registry.register(Registry.ITEM, new Identifier(REServerMod.MOD_ID, name),
|
Registry.register(Registry.ITEM, new Identifier(REServerMod.MOD_ID, name),
|
||||||
new BlockItem(block, new FabricItemSettings().group(group)));
|
new BlockItem(block, new FabricItemSettings().group(group)));
|
||||||
return Registry.register(Registry.BLOCK, new Identifier(REServerMod.MOD_ID, name), block);
|
return Registry.register(Registry.BLOCK, new Identifier(REServerMod.MOD_ID, name), block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Block registerBlockWithoutItem(String name, Block block) { // Nicht verändern! Fügt die oben definierten Blöcke dem Register hinzu
|
||||||
|
return Registry.register(Registry.BLOCK, new Identifier(REServerMod.MOD_ID, name), block);
|
||||||
|
}
|
||||||
|
|
||||||
public static void registerModBlocks() { // Error Logger halt...
|
public static void registerModBlocks() { // Error Logger halt...
|
||||||
REServerMod.LOGGER.info("Registering ModBlocks for " + REServerMod.MOD_ID);
|
REServerMod.LOGGER.info("Registering ModBlocks for " + REServerMod.MOD_ID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package modchest.event;
|
||||||
|
|
||||||
|
import modchest.util.denkMalBlockUtil;
|
||||||
|
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class playerBreakBlockEvents implements PlayerBlockBreakEvents.Before {
|
||||||
|
@Override
|
||||||
|
public boolean beforeBlockBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity) {
|
||||||
|
denkMalBlockUtil util = new denkMalBlockUtil();
|
||||||
|
return util.allowBlocks(world, player, pos);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package modchest.item.custom;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.TypedActionResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.registry.Registry;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import oshi.annotation.concurrent.ThreadSafe;
|
||||||
|
|
||||||
|
import static modchest.block.modBlocks.denk_mal_block;
|
||||||
|
|
||||||
|
public class denkMalItem extends Item {
|
||||||
|
World thisWorld;
|
||||||
|
boolean used = false;
|
||||||
|
|
||||||
|
public denkMalItem(FabricItemSettings fabricItemSettings) {
|
||||||
|
super(fabricItemSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) {
|
||||||
|
if (thisWorld != null) {
|
||||||
|
if (entity.getType().toString().equals("entity.minecraft.elder_guardian")) {
|
||||||
|
user.sendMessage(Text.of(String.valueOf(Registry.BLOCK.getId(denk_mal_block))));
|
||||||
|
entity.kill();
|
||||||
|
if (!entity.isAlive()) {
|
||||||
|
BlockPos pos = new BlockPos((int) entity.getPos().getX(), ((int) entity.getPos().getY()), (int) entity.getPos().getZ());
|
||||||
|
try {
|
||||||
|
BlockState state = denk_mal_block.getDefaultState();
|
||||||
|
thisWorld.setBlockState(pos, state, Block.NOTIFY_ALL);
|
||||||
|
} catch (Exception e) {
|
||||||
|
user.sendMessage((Text) e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ActionResult.PASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) { //wird vor useOnEntity aufgerufen
|
||||||
|
thisWorld = world;
|
||||||
|
return TypedActionResult.pass(user.getStackInHand(hand));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package modchest.item;
|
package modchest.item;
|
||||||
|
|
||||||
import modchest.REServerMod;
|
import modchest.REServerMod;
|
||||||
|
import modchest.item.custom.denkMalItem;
|
||||||
import modchest.item.custom.piratesCoinItem;
|
import modchest.item.custom.piratesCoinItem;
|
||||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -9,19 +10,22 @@ import net.minecraft.util.registry.Registry;
|
||||||
|
|
||||||
//Liste der Items die hinzugefügt werden, ausgenommen Blöcke
|
//Liste der Items die hinzugefügt werden, ausgenommen Blöcke
|
||||||
public class modItems {
|
public class modItems {
|
||||||
public static Item shipblock; // shipblock wird erstellt, sollte man mal umbenenne. Ist eine Zutat die man für
|
private static Item shipblock; // shipblock wird erstellt, sollte man mal umbenenne. Ist eine Zutat die man für
|
||||||
// das steering_wheel braucht zum craften, mehr macht es bisher nicht
|
// das steering_wheel braucht zum craften, mehr macht es bisher nicht
|
||||||
public static Item pirates_coin; // pirates Coin wird erstellt; definition siehe ./custom/piratesCoinItem da ist
|
private static Item pirates_coin; // pirates Coin wird erstellt; definition siehe ./custom/piratesCoinItem da ist
|
||||||
// im detail erklärt was das Item machen soll
|
// im detail erklärt was das Item machen soll
|
||||||
|
private static Item denk_mal_item;
|
||||||
|
|
||||||
public static void setItems() { // Items werden beschrieben, bzw. dem Register hinzugefügt
|
public static void setItems() { // Items werden beschrieben, bzw. dem Register hinzugefügt
|
||||||
shipblock = registerItem("shipblock", new Item(new FabricItemSettings().group(modItemGroup.modchest)));
|
shipblock = registerItem("shipblock", new Item(new FabricItemSettings().group(modItemGroup.modchest)));
|
||||||
pirates_coin = registerItem("pirates_coin",
|
pirates_coin = registerItem("pirates_coin",
|
||||||
new piratesCoinItem(new FabricItemSettings().group(modItemGroup.modchest).maxCount(16)));
|
new piratesCoinItem(new FabricItemSettings().group(modItemGroup.modchest).maxCount(16)));
|
||||||
|
denk_mal_item = registerItem("denk_mal_item",
|
||||||
|
new denkMalItem(new FabricItemSettings().group(modItemGroup.modchest).maxCount(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Item registerItem(String name, Item item) { // Methode, die die Items dann letztendlich hinzufügt;
|
private static Item registerItem(String name, Item item) { // Methode, die die Items dann letztendlich hinzufügt;
|
||||||
// nicht bearbeiten ist eine generische MEthode
|
// nicht bearbeiten ist eine generische MEthode
|
||||||
return Registry.register(Registry.ITEM, new Identifier(REServerMod.MOD_ID, name), item);
|
return Registry.register(Registry.ITEM, new Identifier(REServerMod.MOD_ID, name), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package modchest.mixin;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.util.interfaces.LevelStorageInterface;
|
||||||
|
import net.minecraft.world.level.storage.LevelStorage;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import net.minecraft.world.level.storage.LevelStorage.Session;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
@Mixin(Session.class)
|
||||||
|
public abstract class LevelStorageMixin implements LevelStorageInterface {
|
||||||
|
|
||||||
|
@Final
|
||||||
|
@Shadow
|
||||||
|
LevelStorage.LevelSave directory;
|
||||||
|
|
||||||
|
public File getFile() { //gibt den Dateipfad zurueck
|
||||||
|
File dateiPfad = null;
|
||||||
|
try {
|
||||||
|
dateiPfad = directory.path().toFile(); //Versucht den Dateipfad einzulesen; weil es sehr frueh kommt besonders abgesichert
|
||||||
|
} catch (Exception e) {
|
||||||
|
REServerMod.LOGGER.info("Error when trying to read File path: {}", e.toString());
|
||||||
|
}
|
||||||
|
return dateiPfad;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package modchest.mixin;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.util.interfaces.LevelStorageInterface;
|
||||||
|
import modchest.util.dataSaverIO;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.world.level.storage.LevelStorage;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
@Mixin(MinecraftServer.class)
|
||||||
|
public class MinecraftServerMixin {
|
||||||
|
@Shadow
|
||||||
|
@Final
|
||||||
|
protected LevelStorage.Session session;
|
||||||
|
@Unique
|
||||||
|
dataSaverIO dataSaver = new dataSaverIO();
|
||||||
|
|
||||||
|
@Inject(method = "prepareStartRegion", at = @At("TAIL"))
|
||||||
|
private void prepareStartRegion(CallbackInfo ci) { //wird beim Start des Servers aufgerufen
|
||||||
|
dataSaver.resetData(); //stellt sicher, dass keine Daten von einer Welt in eine andere "leaken" in dem es alle Daten loescht
|
||||||
|
LevelStorageInterface levelStorage = (LevelStorageInterface) session; //castet session mit dem Interface, damit custom Methoden verwendet werden koennen
|
||||||
|
try {
|
||||||
|
File file;
|
||||||
|
file = levelStorage.getFile(); //holt sich den Dateipfad
|
||||||
|
if (file != null) {
|
||||||
|
dataSaver.writeFilePath(file); //schreibt den Dateipfad der Welt fuer das dataSaverIO
|
||||||
|
dataSaver.readFile(); //holt die Daten von der Festplatte in den RAM
|
||||||
|
} else {
|
||||||
|
REServerMod.LOGGER.info("file is zero");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
REServerMod.LOGGER.info("file could not be read with Exception: {}", e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "shutdown", at = @At("HEAD"))
|
||||||
|
private void shutdown(CallbackInfo ci) { //is called when server shuts down
|
||||||
|
dataSaver.saveFile(); //Saves the Serverdata
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package modchest.mixin;
|
package modchest.mixin;
|
||||||
|
|
||||||
import modchest.REServerMod;
|
import modchest.REServerMod;
|
||||||
import modchest.util.ServerPlayerEntityInterface;
|
import modchest.util.interfaces.ServerPlayerEntityInterface;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
@ -10,8 +10,6 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
@Mixin(ServerPlayerEntity.class)
|
@Mixin(ServerPlayerEntity.class)
|
||||||
public abstract class ServerPlayerEntityMixin implements ServerPlayerEntityInterface {
|
public abstract class ServerPlayerEntityMixin implements ServerPlayerEntityInterface {
|
||||||
@Unique
|
@Unique
|
||||||
|
@ -39,7 +37,7 @@ public abstract class ServerPlayerEntityMixin implements ServerPlayerEntityInter
|
||||||
REServerMod.LOGGER.info("Error while saving custom NBt-Data: " + e);
|
REServerMod.LOGGER.info("Error while saving custom NBt-Data: " + e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
REServerMod.LOGGER.info("write failed! This probably means, that the player hasn't set a custom spanpoint yet");
|
REServerMod.LOGGER.info("write failed! This probably means, that the player hasn't set a custom spawnpoint yet");
|
||||||
}
|
}
|
||||||
//REServerMod.LOGGER.info("writeCustomDataToNbt called");
|
//REServerMod.LOGGER.info("writeCustomDataToNbt called");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import modchest.util.setAndGetMultiButtonsSpawn;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.text.Text;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
@ -14,12 +13,11 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@Mixin(BedBlock.class)
|
@Mixin(BedBlock.class)
|
||||||
public class bedBlock {
|
public class bedBlockMixin {
|
||||||
|
|
||||||
@Inject(method = "onBreak", at = @At("HEAD"))
|
@Inject(method = "onBreak", at = @At("HEAD"))
|
||||||
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player, CallbackInfo ci) { //Ueberprueft, wenn ein Bett zerstoert wird, ob jemand dieses Bett als Spawnpunkt hat
|
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player, CallbackInfo ci) { //Ueberprueft, wenn ein Bett zerstoert wird, ob jemand dieses Bett als Spawnpunkt hat
|
|
@ -0,0 +1,41 @@
|
||||||
|
package modchest.mixin;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.util.denkMalBlockUtil;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.FlintAndSteelItem;
|
||||||
|
import net.minecraft.item.ItemUsageContext;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(FlintAndSteelItem.class)
|
||||||
|
public class flintAndSteelItemMixin {
|
||||||
|
|
||||||
|
@Inject(method = "useOnBlock", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void useOnBlock(ItemUsageContext context, CallbackInfoReturnable<ActionResult> cir) {
|
||||||
|
if(!callPlaceable(context)) {
|
||||||
|
cir.setReturnValue(ActionResult.FAIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private boolean callPlaceable(ItemUsageContext context) {
|
||||||
|
try {
|
||||||
|
PlayerEntity player = context.getPlayer();
|
||||||
|
World world = context.getWorld();
|
||||||
|
BlockPos pos = context.getBlockPos();
|
||||||
|
denkMalBlockUtil util = new denkMalBlockUtil();
|
||||||
|
return util.allowBlocks(world, player, pos);
|
||||||
|
} catch (Exception e) {
|
||||||
|
REServerMod.LOGGER.info("Exception in variables: " + e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package modchest.mixin;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import modchest.util.denkMalBlockUtil;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemUsageContext;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(Item.class)
|
||||||
|
public class itemMixin {
|
||||||
|
|
||||||
|
@Inject(method = "useOnBlock", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void useOnBlock(ItemUsageContext context, CallbackInfoReturnable<ActionResult> cir) {
|
||||||
|
if(!callPlaceable(context)) {
|
||||||
|
cir.setReturnValue(ActionResult.FAIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private boolean callPlaceable(ItemUsageContext context) {
|
||||||
|
try {
|
||||||
|
PlayerEntity player = context.getPlayer();
|
||||||
|
World world = context.getWorld();
|
||||||
|
BlockPos pos = context.getBlockPos();
|
||||||
|
denkMalBlockUtil util = new denkMalBlockUtil();
|
||||||
|
return util.allowBlocks(world, player, pos);
|
||||||
|
} catch (Exception e) {
|
||||||
|
REServerMod.LOGGER.info("Exception in variables: " + e.toString());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package modchest.mixin;
|
||||||
|
|
||||||
|
import modchest.util.denkMalBlockUtil;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.ItemPlacementContext;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(BlockItem.class)
|
||||||
|
public class playerPlaceBlockMixin {
|
||||||
|
@Inject(method = "place(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/util/ActionResult;", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void canPlace(ItemPlacementContext context, CallbackInfoReturnable<ActionResult> cir) {
|
||||||
|
if(!callPlaceable(context)) {
|
||||||
|
cir.setReturnValue(ActionResult.FAIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private boolean callPlaceable(ItemPlacementContext context) {
|
||||||
|
PlayerEntity player = context.getPlayer();
|
||||||
|
World world = context.getWorld();
|
||||||
|
BlockPos pos = context.getBlockPos();
|
||||||
|
|
||||||
|
denkMalBlockUtil util = new denkMalBlockUtil();
|
||||||
|
return util.allowBlocks(world, player, pos);
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ public class modNetworkingServer { //Identifier werden eingeführt
|
||||||
public static final Identifier start_sleeping_call_buttons = new Identifier(REServerMod.MOD_ID, "start_sleeping_call_buttons");
|
public static final Identifier start_sleeping_call_buttons = new Identifier(REServerMod.MOD_ID, "start_sleeping_call_buttons");
|
||||||
public static final Identifier death_multi_respawn_buttons = new Identifier(REServerMod.MOD_ID, "death_call_respawn_buttons");
|
public static final Identifier death_multi_respawn_buttons = new Identifier(REServerMod.MOD_ID, "death_call_respawn_buttons");
|
||||||
|
|
||||||
public static void registerS2CPackets() { //Identifier fuer packets werden registriert (Identifier die der Client aufruft um beim Server was auszufuehren)
|
public static void registerC2SPackets() { //Identifier fuer packets werden registriert (Identifier die der Client aufruft um beim Server was auszufuehren)
|
||||||
ServerPlayNetworking.registerGlobalReceiver(start_sleeping_call_buttons, setNewRespawnsC2SPacket::receive); //was der Server dann machen soll steht in der receive Methode
|
ServerPlayNetworking.registerGlobalReceiver(start_sleeping_call_buttons, setNewRespawnsC2SPacket::receive); //was der Server dann machen soll steht in der receive Methode
|
||||||
|
|
||||||
ServerPlayNetworking.registerGlobalReceiver(death_multi_respawn_buttons, deathScreenMultiButtonsC2SPacket::receive);
|
ServerPlayNetworking.registerGlobalReceiver(death_multi_respawn_buttons, deathScreenMultiButtonsC2SPacket::receive);
|
||||||
|
|
|
@ -0,0 +1,173 @@
|
||||||
|
package modchest.screen;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.inventory.Inventory;
|
||||||
|
import net.minecraft.inventory.SimpleInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.screen.Generic3x3ContainerScreenHandler;
|
||||||
|
import net.minecraft.screen.ScreenHandler;
|
||||||
|
import net.minecraft.screen.ScreenHandlerType;
|
||||||
|
import net.minecraft.screen.slot.Slot;
|
||||||
|
|
||||||
|
public class denkMalBlockScreenHandler extends ScreenHandler {
|
||||||
|
private final Inventory inventory;
|
||||||
|
|
||||||
|
private static final int field_30788 = 9;
|
||||||
|
private static final int field_30789 = 9;
|
||||||
|
private static final int field_30790 = 36;
|
||||||
|
private static final int field_30791 = 36;
|
||||||
|
private static final int field_30792 = 45;
|
||||||
|
|
||||||
|
public denkMalBlockScreenHandler(int syncId, PlayerInventory playerInventory) {
|
||||||
|
this(syncId, playerInventory, new SimpleInventory(9));
|
||||||
|
}
|
||||||
|
|
||||||
|
public denkMalBlockScreenHandler(int syncId, PlayerInventory playerInventory, Inventory inventory) {
|
||||||
|
//super(ScreenHandlerType.GENERIC_3X3, syncId);
|
||||||
|
super(modScreenHandler.denk_mal_block_screen_handler, syncId);
|
||||||
|
|
||||||
|
checkSize(inventory, 3);
|
||||||
|
this.inventory = inventory;
|
||||||
|
inventory.onOpen(playerInventory.player);
|
||||||
|
|
||||||
|
this.addSlot(new Slot(inventory, 0, 12 ,15));
|
||||||
|
this.addSlot(new Slot(inventory, 1, 86 ,15));
|
||||||
|
this.addSlot(new Slot(inventory, 2, 186 ,60));
|
||||||
|
|
||||||
|
int j;
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 3; ++i) {
|
||||||
|
for (j = 0; j < 3; ++j) {
|
||||||
|
this.addSlot(new Slot(inventory, j + i * 3, 62 + j * 18, 17 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 3; ++i) {
|
||||||
|
for (j = 0; j < 9; ++j) {
|
||||||
|
this.addSlot(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 9; ++i) {
|
||||||
|
this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 142));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
super(ScreenHandlerType.GENERIC_3X3, syncId);
|
||||||
|
int j;
|
||||||
|
int i;
|
||||||
|
Generic3x3ContainerScreenHandler.checkSize(inventory, 9);
|
||||||
|
this.inventory = inventory;
|
||||||
|
inventory.onOpen(playerInventory.player);
|
||||||
|
for (i = 0; i < 3; ++i) {
|
||||||
|
for (j = 0; j < 3; ++j) {
|
||||||
|
this.addSlot(new Slot(inventory, j + i * 3, 62 + j * 18, 17 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 3; ++i) {
|
||||||
|
for (j = 0; j < 9; ++j) {
|
||||||
|
this.addSlot(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < 9; ++i) {
|
||||||
|
this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 142));
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUse(PlayerEntity player) {
|
||||||
|
return this.inventory.canPlayerUse(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack transferSlot(PlayerEntity player, int index) {
|
||||||
|
ItemStack itemStack = ItemStack.EMPTY;
|
||||||
|
Slot slot = (Slot)this.slots.get(index);
|
||||||
|
if (slot != null && slot.hasStack()) {
|
||||||
|
ItemStack itemStack2 = slot.getStack();
|
||||||
|
itemStack = itemStack2.copy();
|
||||||
|
if (index < 9 ? !this.insertItem(itemStack2, 9, 45, true) : !this.insertItem(itemStack2, 0, 9, false)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
if (itemStack2.isEmpty()) {
|
||||||
|
slot.setStack(ItemStack.EMPTY);
|
||||||
|
} else {
|
||||||
|
slot.markDirty();
|
||||||
|
}
|
||||||
|
if (itemStack2.getCount() == itemStack.getCount()) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
slot.onTakeItem(player, itemStack2);
|
||||||
|
}
|
||||||
|
return itemStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close(PlayerEntity player) {
|
||||||
|
super.close(player);
|
||||||
|
this.inventory.onClose(player);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
public denkMalBlockScreenHandler(int syncId, PlayerInventory inventory) {
|
||||||
|
this(syncId, inventory, new SimpleInventory(3));
|
||||||
|
}
|
||||||
|
|
||||||
|
public denkMalBlockScreenHandler(int syncId, PlayerInventory playerInventory, Inventory inventory) {
|
||||||
|
super(modScreenHandler.denk_mal_block_screen_handler, syncId);
|
||||||
|
checkSize(inventory, 3);
|
||||||
|
this.inventory = inventory;
|
||||||
|
inventory.onOpen(playerInventory.player);
|
||||||
|
|
||||||
|
this.addSlot(new Slot(inventory, 0, 12 ,15));
|
||||||
|
this.addSlot(new Slot(inventory, 1, 86 ,15));
|
||||||
|
this.addSlot(new Slot(inventory, 2, 186 ,60));
|
||||||
|
|
||||||
|
addPlayerInventory(playerInventory);
|
||||||
|
addPlayerHotbar(playerInventory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack transferSlot(PlayerEntity player, int invSlot) { //kuemmert sich um Unfig wie shift-click
|
||||||
|
ItemStack newStack = ItemStack.EMPTY;
|
||||||
|
Slot slot = this.slots.get(invSlot);
|
||||||
|
if (slot != null && slot.hasStack()) {
|
||||||
|
ItemStack originalStack = slot.getStack();
|
||||||
|
if (invSlot < this.inventory.size()) {
|
||||||
|
if (!this.insertItem(originalStack, this.inventory.size(), this.slots.size(), true)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
} else if (!this.insertItem(originalStack, 0, this.inventory.size(), false)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (originalStack.isEmpty()) {
|
||||||
|
slot.setStack(ItemStack.EMPTY);
|
||||||
|
} else {
|
||||||
|
slot.markDirty();;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUse(PlayerEntity player) {
|
||||||
|
return this.inventory.canPlayerUse(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addPlayerInventory(PlayerInventory playerInventory) {
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
for (int l = 0; l < 9; ++l) {
|
||||||
|
this.addSlot(new Slot(playerInventory, l + i*9 +9, 8 + l * 18, 86 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addPlayerHotbar(PlayerInventory playerInventory) {
|
||||||
|
for (int i = 0; i < 9; ++i) {
|
||||||
|
this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 144));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package modchest.screen;
|
||||||
|
|
||||||
|
import net.minecraft.screen.ScreenHandlerType;
|
||||||
|
import net.minecraft.screen.StonecutterScreenHandler;
|
||||||
|
|
||||||
|
public class modScreenHandler {
|
||||||
|
public static ScreenHandlerType<denkMalBlockScreenHandler> denk_mal_block_screen_handler;
|
||||||
|
|
||||||
|
public static void registerAllScreenHandlers() {
|
||||||
|
denk_mal_block_screen_handler = new ScreenHandlerType<>(denkMalBlockScreenHandler::new);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package modchest.util;
|
||||||
|
|
||||||
|
import modchest.REServerMod;
|
||||||
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
import net.minecraft.nbt.NbtIo;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
public class dataSaverIO { //Speichert alles mod-relevanten Serverdaten ab
|
||||||
|
private static File reServerFile = null;
|
||||||
|
private static NbtCompound reServerNbt = null;
|
||||||
|
|
||||||
|
public dataSaverIO() {}
|
||||||
|
|
||||||
|
void readFromFile() { //laedt die Daten der Datei; macht der Server bereits automatisch, danke mixin!
|
||||||
|
try {
|
||||||
|
reServerNbt = NbtIo.read(reServerFile); //liest die Datei
|
||||||
|
if (reServerNbt == null) { //sollte der Nbt-Tag noch nciht existieren, wird er erstellt
|
||||||
|
reServerNbt = new NbtCompound();
|
||||||
|
}
|
||||||
|
} catch (IOException e) { //sollte das IO einen Fehler haben, sollte aber nie vorkommen, wird die mod versuchen es zu fixen, indem sie einen neuen NbtTag erstellt und mit dem weiter arbeitet
|
||||||
|
REServerMod.LOGGER.error("Error when trying to read from file: " + String.valueOf(e) + " trying to fix it by making a new Nbt");
|
||||||
|
reServerNbt = new NbtCompound();
|
||||||
|
} catch (Exception e) { //alle anderen exception, versucht er genau so zu fixen. Loescht alle alten Daten, aber besser, als das die Mod garnicht mehr geht
|
||||||
|
reServerNbt = new NbtCompound();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void writeToFile() { //speichert den Nbt-Tag als Datei ab; macht der Server auch automatisch
|
||||||
|
reServerNbt.putInt("NullSafety", 1); //gibt manchmal Probleme wenn nichts im Nbt-Tag steht, deswegen wird hin und wieder mal eine NullSafety abgespeichert
|
||||||
|
try {
|
||||||
|
if (reServerNbt != null) { //stellt sicher, das auch wirklich wirklich was im NbtTag steht vor dem abspeichern
|
||||||
|
NbtIo.write(reServerNbt, reServerFile);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
REServerMod.LOGGER.error("Error when trying to write to file: " + String.valueOf(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToNbt(NbtCompound nbt) { //ueberschreibt den ServerNbt-Tag, pass auf, dass du nicht sachen von anderen Teilen der mods vergisst mit zu kopieren!
|
||||||
|
reServerNbt = nbt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NbtCompound getFromNbt() { //uebergibt den servernbt
|
||||||
|
if (reServerNbt == null) { //sollte der server-nbt-tag noch nciht existieren, wird er neu erstellt
|
||||||
|
REServerMod.LOGGER.error("ServerNbt ist null in getFromNbt!"); //eigentlich sollte es nicht auftreten...
|
||||||
|
reServerNbt = new NbtCompound();
|
||||||
|
}
|
||||||
|
return reServerNbt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readFile() { //public version, den servernbt von der Datei einzulesen
|
||||||
|
readFromFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveFile() { //moeglichkeit, die datei force-abzuspeichern
|
||||||
|
writeToFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeFilePath(File file) { //setzt den Pfad fuer den Server-Nbt-Tag wird vom server dank mixin automatisch gesetzt
|
||||||
|
reServerFile = new File(file, "REServerMod" + ".dat");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetData() { //resets the data of this class
|
||||||
|
reServerFile = null;
|
||||||
|
reServerNbt = new NbtCompound();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package modchest.util;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static java.lang.Math.abs;
|
||||||
|
|
||||||
|
public class denkMalBlockUtil extends dataSaverIO{
|
||||||
|
|
||||||
|
public denkMalBlockUtil() {}
|
||||||
|
|
||||||
|
|
||||||
|
public void addBlock(int[] pos, int[] range) { //fuegt bloecke der Liste an abbauverhindernden Bloecke hinzu
|
||||||
|
NbtCompound tempNbt = new NbtCompound(); //Nbt in dem die Blockdaten gespeichert werden
|
||||||
|
NbtCompound nbt = returnLoadedNbt(); //holt sich den denkmalblock nbt
|
||||||
|
tempNbt.putIntArray("position", pos);
|
||||||
|
tempNbt.putIntArray("range", range); //range ist 6 stellen lang mit immer der erlaubten range in negative richtung, dann positiv fuer alle 3 Koordinaten, also: -x, +x, -y, +y, -z, +z Richtung
|
||||||
|
nbt.put(Arrays.toString(pos), tempNbt); //speichert die daten des neuen Blocks ab
|
||||||
|
saveInNbt(nbt); //speichert den editierten denkmalblock-nbt ab
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeBlock(int[] posString) { //loescht bloecke aus Liste an abbauverhindernden Bloecken
|
||||||
|
NbtCompound nbt = returnLoadedNbt(); //holt sich den denkmalblock nbt
|
||||||
|
nbt.remove(Arrays.toString(posString)); //entfernt diesen block
|
||||||
|
saveInNbt(nbt); //speichert den editierten denkmalblock-nbt ab
|
||||||
|
}
|
||||||
|
|
||||||
|
private NbtCompound returnLoadedNbt() { //gibt den denkmalblock nbt zurueck
|
||||||
|
NbtCompound nbt = getFromNbt(); //laedt den gesamten reServerNbt
|
||||||
|
nbt = (NbtCompound) nbt.get("denkmalblock");//nimmt den denkmalblocknbt und laedt diesen
|
||||||
|
if (nbt == null) { //sollte der nbt noch nicht existieren wird er erstellt
|
||||||
|
nbt = new NbtCompound();
|
||||||
|
}
|
||||||
|
return nbt;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveInNbt(NbtCompound nbt) { //speichert den denkmalblock nbt im reServerNbt ab
|
||||||
|
NbtCompound reServerNbt = getFromNbt(); //holt den reServerNbt
|
||||||
|
reServerNbt.put("denkmalblock", nbt); //schreibt den denkmalblock nbt ab
|
||||||
|
writeToNbt(reServerNbt); //schreibt den editierten reServerNbt
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean allowBlocks(World world, PlayerEntity player, BlockPos pos) {
|
||||||
|
if (world.getRegistryKey() == World.OVERWORLD) {
|
||||||
|
if (!player.isCreative()) {
|
||||||
|
NbtCompound nbt = returnLoadedNbt();
|
||||||
|
Set<String> set = nbt.getKeys();
|
||||||
|
String[] keys = set.toArray(new String[0]);//erzeugt einen String-Array mit allen keys
|
||||||
|
|
||||||
|
for (String key : keys) {
|
||||||
|
if (inRange((NbtCompound) nbt.get(key), pos)) {
|
||||||
|
if (!world.isClient) {
|
||||||
|
player.sendMessage(Text.of("Can't change Blocks here! This area is protected!"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean inRange(NbtCompound nbt, BlockPos pos) {
|
||||||
|
int[] denkPos = nbt.getIntArray("position");
|
||||||
|
int[] denkRange = nbt.getIntArray("range");
|
||||||
|
int[] blockPos = new int[3];
|
||||||
|
blockPos[0] = pos.getX();
|
||||||
|
blockPos[1] = pos.getY();
|
||||||
|
blockPos[2] = pos.getZ();
|
||||||
|
for(int i = 0; i < 3; i++) {
|
||||||
|
int dif = (denkPos[i] - blockPos[i]);
|
||||||
|
if(dif > abs(denkRange[i]) && dif < abs(denkRange[i++])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,10 +3,13 @@ package modchest.util;
|
||||||
import modchest.block.entity.modBlockEntities;
|
import modchest.block.entity.modBlockEntities;
|
||||||
import modchest.block.modBlocks;
|
import modchest.block.modBlocks;
|
||||||
import modchest.event.playerAfterRespawnEvent;
|
import modchest.event.playerAfterRespawnEvent;
|
||||||
|
import modchest.event.playerBreakBlockEvents;
|
||||||
import modchest.item.modItemGroup;
|
import modchest.item.modItemGroup;
|
||||||
import modchest.item.modItems;
|
import modchest.item.modItems;
|
||||||
import modchest.networking.modNetworkingServer;
|
import modchest.networking.modNetworkingServer;
|
||||||
|
import modchest.screen.modScreenHandler;
|
||||||
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
|
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
|
||||||
|
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
|
||||||
|
|
||||||
public class initializer {
|
public class initializer {
|
||||||
public static void itemGroups() {
|
public static void itemGroups() {
|
||||||
|
@ -22,9 +25,14 @@ public class initializer {
|
||||||
|
|
||||||
public static void events() { //Events, bei denen custom Code ausgefuehrt wird, werden eingefuehrt
|
public static void events() { //Events, bei denen custom Code ausgefuehrt wird, werden eingefuehrt
|
||||||
ServerPlayerEvents.AFTER_RESPAWN.register(new playerAfterRespawnEvent());
|
ServerPlayerEvents.AFTER_RESPAWN.register(new playerAfterRespawnEvent());
|
||||||
|
PlayerBlockBreakEvents.BEFORE.register(new playerBreakBlockEvents());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void networking() { //Identifier unter denen der Server zuhoert werden registriert
|
public static void networking() { //Identifier unter denen der Server zuhoert werden registriert
|
||||||
modNetworkingServer.registerS2CPackets();
|
modNetworkingServer.registerC2SPackets();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void renderer() {
|
||||||
|
modScreenHandler.registerAllScreenHandlers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package modchest.util.interfaces;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
public interface LevelStorageInterface { //Interface, damit der Server den Pfad holen kann
|
||||||
|
File getFile();
|
||||||
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
package modchest.util;
|
package modchest.util.interfaces;
|
||||||
|
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
|
||||||
|
|
||||||
public interface ServerPlayerEntityInterface {
|
public interface ServerPlayerEntityInterface {
|
||||||
NbtCompound getDataSaver();
|
NbtCompound getDataSaver();
|
|
@ -1,8 +1,8 @@
|
||||||
package modchest.util;
|
package modchest.util;
|
||||||
|
|
||||||
import modchest.REServerMod;
|
import modchest.REServerMod;
|
||||||
|
import modchest.util.interfaces.ServerPlayerEntityInterface;
|
||||||
import net.minecraft.nbt.NbtCompound;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import net.minecraft.nbt.NbtElement;
|
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"powered=false": {
|
||||||
|
"model": "modchest:block/denk_mal_block_aus"
|
||||||
|
},
|
||||||
|
"powered=true": {
|
||||||
|
"model": "modchest:block/denk_mal_block_an"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "modchest:block/denk_mal_block_placeholder"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,14 +1,15 @@
|
||||||
{
|
{
|
||||||
"item.modchest.shipblock": "Schiffsblock",
|
"block.modchest.denk_mal_block": "Denkmal Block",
|
||||||
"item.modchest.pirates_coin": "OP Piraten ding zum Testen",
|
|
||||||
"block.modchest.steering_wheel": "Lenkrad",
|
"block.modchest.steering_wheel": "Lenkrad",
|
||||||
"itemGroup.modchest.itemlist1": "Malte's Mod",
|
|
||||||
|
|
||||||
"chat.modchest.multispawn.beddestroyed": "Scheint so, als wäre das Bett zerstört worden!",
|
"chat.modchest.multispawn.beddestroyed": "Scheint so, als wäre das Bett zerstört worden!",
|
||||||
|
"chat.modchest.multispawn.getable": "Diese spawn location konnte nicht geladen werden!",
|
||||||
"chat.modchest.multispawn.respawned": "Respawne bei #%s",
|
"chat.modchest.multispawn.respawned": "Respawne bei #%s",
|
||||||
"chat.modchest.multispawn.setspawn": "Nutze spawn #%s",
|
"chat.modchest.multispawn.setspawn": "Nutze spawn #%s",
|
||||||
"chat.modchest.multispawn.setspawnerror": "Fehler beim speichern!",
|
"chat.modchest.multispawn.setspawnerror": "Fehler beim speichern!",
|
||||||
"chat.modchest.multispawn.spawnnotset": "Es scheint so, als wäre dieser Spawn nicht gesetzt!",
|
|
||||||
"chat.modchest.multispawn.spawnnotsaved": "Fehler beim Versuch, diesen Spawn zu speichern!",
|
"chat.modchest.multispawn.spawnnotsaved": "Fehler beim Versuch, diesen Spawn zu speichern!",
|
||||||
"chat.modchest.multispawn.getable": "Diese spawn location konnte nicht geladen werden!"
|
"chat.modchest.multispawn.spawnnotset": "Es scheint so, als wäre dieser Spawn nicht gesetzt!",
|
||||||
|
"item.modchest.denk_mal_item": "Denkmal Item",
|
||||||
|
"item.modchest.pirates_coin": "OP Piraten ding zum Testen",
|
||||||
|
"item.modchest.shipblock": "Schiffsblock",
|
||||||
|
"itemGroup.modchest.itemlist1": "Malte's Mod"
|
||||||
}
|
}
|
|
@ -1,8 +1,10 @@
|
||||||
{
|
{
|
||||||
"item.modchest.shipblock": "Hanno, änder die Sprache!",
|
"item.modchest.shipblock": "Ste'r thaat ship!" ,
|
||||||
"item.modchest.pirates_coin": "Ya coin for tha pirrrrrates!",
|
"item.modchest.pirates_coin": "Ya coin for tha pirrrrrates!",
|
||||||
"block.modchest.steering_wheel": "Ne, du kriegst keine hilfreichen Angaben mit der Sprache!",
|
"block.modchest.steering_wheel": "Arr! All' h'nd on bord!",
|
||||||
"itemGroup.modchest.itemlist1": "Änder doch endlich die Sprache...",
|
"item.modchest.denk_mal_item": "Don't le' anyon' destr'y your stuff, mate",
|
||||||
|
"block.modchest.denk_mal_block": "Tortuga no breaky",
|
||||||
|
"itemGroup.modchest.itemlist1": "Pantry",
|
||||||
|
|
||||||
"chat.modchest.multispawn.beddestroyed": "Sorry, mate! Looks like that cap'n doesn't like you",
|
"chat.modchest.multispawn.beddestroyed": "Sorry, mate! Looks like that cap'n doesn't like you",
|
||||||
"chat.modchest.multispawn.respawned": "Prepare to board some ship, lads!",
|
"chat.modchest.multispawn.respawned": "Prepare to board some ship, lads!",
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
"item.modchest.shipblock": "Shipblock",
|
"item.modchest.shipblock": "Shipblock",
|
||||||
"item.modchest.pirates_coin": "Pirate's Coin",
|
"item.modchest.pirates_coin": "Pirate's Coin",
|
||||||
"block.modchest.steering_wheel": "Steering Wheel",
|
"block.modchest.steering_wheel": "Steering Wheel",
|
||||||
|
"item.modchest.denk_mal_item": "preservation item",
|
||||||
|
"block.modchest.denk_mal_block": "preservation block",
|
||||||
"itemGroup.modchest.itemlist1": "new blocks",
|
"itemGroup.modchest.itemlist1": "new blocks",
|
||||||
|
|
||||||
"chat.modchest.multispawn.beddestroyed": "Oh shit! Looks like that bed got destroyed!",
|
"chat.modchest.multispawn.beddestroyed": "Oh shit! Looks like that bed got destroyed!",
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"texture_size": [64, 64],
|
||||||
|
"textures": {
|
||||||
|
"1": "modchest:block/denk_mal_block",
|
||||||
|
"2": "modchest:block/denk_mal_block_kern_an",
|
||||||
|
"3": "modchest:block/denk_mal_block_basis",
|
||||||
|
"particle": "modchest:block/denk_mal_block_kern_aus"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4, 4], "texture": "#3"},
|
||||||
|
"east": {"uv": [0, 4, 4, 8], "texture": "#3"},
|
||||||
|
"south": {"uv": [4, 0, 8, 4], "texture": "#3"},
|
||||||
|
"west": {"uv": [4, 4, 8, 8], "texture": "#3"},
|
||||||
|
"up": {"uv": [4, 12, 0, 8], "texture": "#3"},
|
||||||
|
"down": {"uv": [12, 0, 8, 4], "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 16, 0],
|
||||||
|
"to": [16, 32, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||||
|
"east": {"uv": [0, 4, 4, 8], "texture": "#1"},
|
||||||
|
"south": {"uv": [4, 0, 8, 4], "texture": "#1"},
|
||||||
|
"west": {"uv": [4, 4, 8, 8], "texture": "#1"},
|
||||||
|
"up": {"uv": [4, 12, 0, 8], "texture": "#1"},
|
||||||
|
"down": {"uv": [12, 0, 8, 4], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 18, 3],
|
||||||
|
"to": [13, 29, 13],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 5, 5.5], "texture": "#2"},
|
||||||
|
"east": {"uv": [5, 0, 10, 5.5], "texture": "#2"},
|
||||||
|
"south": {"uv": [0, 5.5, 5, 11], "texture": "#2"},
|
||||||
|
"west": {"uv": [5, 5.5, 10, 11], "texture": "#2"},
|
||||||
|
"up": {"uv": [15, 5, 10, 0], "texture": "#2"},
|
||||||
|
"down": {"uv": [15, 5, 10, 10], "texture": "#2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"rotation": [1, 0, 0],
|
||||||
|
"translation": [2.5, -1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"firstperson_lefthand": {
|
||||||
|
"translation": [2.5, -1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"translation": [0, -3.25, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"head": {
|
||||||
|
"translation": [0, 11.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"translation": [0, -1.75, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "VoxelShapes",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"color": 0,
|
||||||
|
"children": [0, 1, 2]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"texture_size": [64, 64],
|
||||||
|
"textures": {
|
||||||
|
"1": "modchest:block/denk_mal_block",
|
||||||
|
"2": "modchest:block/denk_mal_block_kern_aus",
|
||||||
|
"3": "modchest:block/denk_mal_block_basis",
|
||||||
|
"particle": "modchest:block/denk_mal_block_kern_aus"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4, 4], "texture": "#3"},
|
||||||
|
"east": {"uv": [0, 4, 4, 8], "texture": "#3"},
|
||||||
|
"south": {"uv": [4, 0, 8, 4], "texture": "#3"},
|
||||||
|
"west": {"uv": [4, 4, 8, 8], "texture": "#3"},
|
||||||
|
"up": {"uv": [4, 12, 0, 8], "texture": "#3"},
|
||||||
|
"down": {"uv": [12, 0, 8, 4], "texture": "#3"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 16, 0],
|
||||||
|
"to": [16, 32, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||||
|
"east": {"uv": [0, 4, 4, 8], "texture": "#1"},
|
||||||
|
"south": {"uv": [4, 0, 8, 4], "texture": "#1"},
|
||||||
|
"west": {"uv": [4, 4, 8, 8], "texture": "#1"},
|
||||||
|
"up": {"uv": [4, 12, 0, 8], "texture": "#1"},
|
||||||
|
"down": {"uv": [12, 0, 8, 4], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [3, 18, 3],
|
||||||
|
"to": [13, 29, 13],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 5, 5.5], "texture": "#2"},
|
||||||
|
"east": {"uv": [5, 0, 10, 5.5], "texture": "#2"},
|
||||||
|
"south": {"uv": [0, 5.5, 5, 11], "texture": "#2"},
|
||||||
|
"west": {"uv": [5, 5.5, 10, 11], "texture": "#2"},
|
||||||
|
"up": {"uv": [15, 5, 10, 0], "texture": "#2"},
|
||||||
|
"down": {"uv": [15, 5, 10, 10], "texture": "#2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"rotation": [1, 0, 0],
|
||||||
|
"translation": [2.5, -1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"firstperson_lefthand": {
|
||||||
|
"translation": [2.5, -1.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"translation": [0, -3.25, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"head": {
|
||||||
|
"translation": [0, 11.5, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"translation": [0, -1.75, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "VoxelShapes",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"color": 0,
|
||||||
|
"children": [0, 1, 2]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"particle": "modchest:block/denk_mal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,914 @@
|
||||||
{
|
{
|
||||||
"parent": "block/cube_all",
|
"credit": "Made with Blockbench",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modchest:block/steering_wheel"
|
"0": "block/acacia_planks",
|
||||||
}
|
"1": "block/diamond_block",
|
||||||
|
"4": "block/polished_blackstone",
|
||||||
|
"5": "block/raw_iron_block",
|
||||||
|
"particle": "block/acacia_planks"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 0],
|
||||||
|
"to": [8.5, 11.5913, 1],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 0],
|
||||||
|
"to": [8.5, 11.5913, 1],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 17, 6.4087],
|
||||||
|
"to": [8.5, 18, 9.5913],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 17, 6.4087],
|
||||||
|
"to": [8.5, 18, 9.5913],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 17, 6.4087],
|
||||||
|
"to": [8.5, 18, 9.5913],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 15],
|
||||||
|
"to": [8.5, 11.5913, 16],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 15],
|
||||||
|
"to": [8.5, 11.5913, 16],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 2, 6.4087],
|
||||||
|
"to": [8.5, 3, 9.5913],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 2, 6.4087],
|
||||||
|
"to": [8.5, 3, 9.5913],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 2, 6.4087],
|
||||||
|
"to": [8.5, 3, 9.5913],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 2, 6.4087],
|
||||||
|
"to": [8.5, 3, 9.5913],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 0],
|
||||||
|
"to": [8.5, 11.5913, 1],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 0],
|
||||||
|
"to": [8.5, 11.5913, 1],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 17, 6.4087],
|
||||||
|
"to": [8.5, 18, 9.5913],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 15],
|
||||||
|
"to": [8.5, 11.5913, 16],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.4087, 15],
|
||||||
|
"to": [8.5, 11.5913, 16],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 9.7, -1.5],
|
||||||
|
"to": [8.5, 10.45, 6.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 0.75], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 9.6, 9.5],
|
||||||
|
"to": [8.5, 10.35, 17.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 0.75], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 0.5, 7.55],
|
||||||
|
"to": [8.5, 8.5, 8.3],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 0.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 11.5, 7.55],
|
||||||
|
"to": [8.5, 19.5, 8.3],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 0.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 0.5, 7.55],
|
||||||
|
"to": [8.5, 8.5, 8.3],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 0.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 9.65, 9.5],
|
||||||
|
"to": [8.5, 10.4, 17.5],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 0.75], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 9.65, -1.5],
|
||||||
|
"to": [8.5, 10.4, 6.5],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 0.75], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.5, 11.5, 7.55],
|
||||||
|
"to": [8.5, 19.5, 8.3],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 0, 3, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 0, 2.75, 8], "rotation": 180, "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 0, 3, 0.75], "texture": "#0"},
|
||||||
|
"down": {"uv": [2, 0, 3, 0.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 9.70163, 6.5],
|
||||||
|
"to": [8.5, 10.29837, 9.5],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 3, 3, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"up": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [4, 3, 6, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 9.70163, 6.5],
|
||||||
|
"to": [8.5, 10.29837, 9.5],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 3, 3, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"up": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [4, 3, 6, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.5, 7.70163],
|
||||||
|
"to": [8.5, 11.5, 8.29837],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 3, 6, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [5, 3, 3, 5], "texture": "#5"},
|
||||||
|
"down": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.5, 7.70163],
|
||||||
|
"to": [8.5, 11.5, 8.29837],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 3, 6, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [5, 3, 3, 5], "texture": "#5"},
|
||||||
|
"down": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.5, 7.70163],
|
||||||
|
"to": [8.5, 11.5, 8.29837],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 3, 6, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [5, 3, 3, 5], "texture": "#5"},
|
||||||
|
"down": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 8.5, 7.70163],
|
||||||
|
"to": [8.5, 11.5, 8.29837],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 3, 3, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"south": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 180, "texture": "#5"},
|
||||||
|
"up": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [4, 3, 6, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 9.70163, 6.5],
|
||||||
|
"to": [8.5, 10.29837, 9.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 3, 6, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [5, 3, 3, 5], "texture": "#5"},
|
||||||
|
"down": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [7.5, 9.70163, 6.5],
|
||||||
|
"to": [8.5, 10.29837, 9.5],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 3, 6, 5], "rotation": 180, "texture": "#5"},
|
||||||
|
"east": {"uv": [7, 5, 10, 8], "rotation": 90, "texture": "#5"},
|
||||||
|
"south": {"uv": [1, 1, 3, 3], "texture": "#5"},
|
||||||
|
"west": {"uv": [7, 5, 10, 8], "rotation": 270, "texture": "#5"},
|
||||||
|
"up": {"uv": [5, 3, 3, 5], "texture": "#5"},
|
||||||
|
"down": {"uv": [5, 4, 3, 2], "rotation": 180, "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "diamon",
|
||||||
|
"from": [7.5, 9.5, 7.5],
|
||||||
|
"to": [8.7, 10.5, 8.5],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1.2, 1], "rotation": 180, "texture": "#1"},
|
||||||
|
"east": {"uv": [8, 8, 15, 15], "rotation": 180, "texture": "#1"},
|
||||||
|
"south": {"uv": [0, 0, 1.2, 1], "rotation": 180, "texture": "#1"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#missing"},
|
||||||
|
"up": {"uv": [0, 0, 1.2, 1], "texture": "#1"},
|
||||||
|
"down": {"uv": [0, 0, 1.2, 1], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "diamond",
|
||||||
|
"from": [7.5, 9.5, 7.5],
|
||||||
|
"to": [8.7, 10.5, 8.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1.2, 1], "rotation": 180, "texture": "#1"},
|
||||||
|
"east": {"uv": [6, 6, 15, 15], "rotation": 90, "texture": "#1"},
|
||||||
|
"south": {"uv": [6, 4, 7.2, 5], "texture": "#1"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#missing"},
|
||||||
|
"up": {"uv": [0, 0, 1.2, 1], "texture": "#1"},
|
||||||
|
"down": {"uv": [0, 0, 1.2, 1], "rotation": 180, "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AufhängungDrehteil",
|
||||||
|
"from": [5.5, 9, 7.5],
|
||||||
|
"to": [7.5, 11, 8.5],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 10, 8]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 0, 0.75],
|
||||||
|
"to": [5.5, 1, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 14.25, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 14.25, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 14.25, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 14.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 2, 1.75],
|
||||||
|
"to": [5.5, 3, 13.75],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 12, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 12], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 0.5, 0.25],
|
||||||
|
"to": [5.5, 12.5, 1.25],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [0, 0, 0]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 12], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 12], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 12], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 1, 1.25],
|
||||||
|
"to": [5.5, 2, 14.25],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 13, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 13, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 13, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 13], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 10.5, 5],
|
||||||
|
"to": [5.5, 11.5, 10.75],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 5.75, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 5.75, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 5.75, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 5.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 3, 2],
|
||||||
|
"to": [5.5, 4, 13.75],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 11.75, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 11.75, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 11.75, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 11.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 5, 2.75],
|
||||||
|
"to": [5.5, 6, 12.75],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 10, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 10, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 10, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 10], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 6, 3.25],
|
||||||
|
"to": [5.5, 7, 12.5],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 9.25, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 9.25, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 9.25, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 9.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 7, 3.75],
|
||||||
|
"to": [5.5, 8, 12],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 8.25, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 8.25, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 8.25, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 8.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 9, 4.5],
|
||||||
|
"to": [5.5, 10, 11.25],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 6.75, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 6.75, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 6.75, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 6.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 10, 5],
|
||||||
|
"to": [5.5, 11, 10.75],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 5.75, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 5.75, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 5.75, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 5.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 8, 4],
|
||||||
|
"to": [5.5, 9, 11.5],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 7.5, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 7.5, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 7.5, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 7.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, 4, 2.5],
|
||||||
|
"to": [5.5, 5, 13.25],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 12, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 10.75, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 7, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 13.75, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 10.75, 2], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 10.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0.5, -5.5, 13.25],
|
||||||
|
"to": [5.5, 6.5, 14.25],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [0, 0, 0]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 14, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 12], "texture": "#0"},
|
||||||
|
"south": {"uv": [5, 0, 10, 12], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 12], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 5], "rotation": 270, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 5, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 4, 5],
|
||||||
|
"to": [5.5, 13, 11],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4.5, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 6, 9], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 4.5, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 6, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 4.5, 6], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 4.5, 6], "texture": "#missing"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 0, 2],
|
||||||
|
"to": [5.5, 4, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4.5, 4], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 12, 4], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 4.5, 4], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 12, 4], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 4.5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 4.5, 12], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 4, 11],
|
||||||
|
"to": [5.5, 6, 13],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4.5, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 4.5, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 4.5, 2], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 4.5, 2], "texture": "#missing"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 4, 3],
|
||||||
|
"to": [5.5, 6, 5],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 4.5, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 4.5, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 4.5, 2], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 4.5, 2], "texture": "#missing"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 9, 0],
|
||||||
|
"to": [4, 11, 0.25],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [0, 0, 0]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3, 1, 5, 3], "texture": "#4"},
|
||||||
|
"east": {"uv": [0, 0, 0.25, 2], "texture": "#4"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#missing"},
|
||||||
|
"west": {"uv": [0, 0, 0.25, 2], "texture": "#4"},
|
||||||
|
"up": {"uv": [0, 0, 2, 0.25], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 2, 0.25], "texture": "#4"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 11.45, 6.65],
|
||||||
|
"to": [2.6, 13.7, 9.15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 0.6, 2.25], "texture": "#4"},
|
||||||
|
"east": {"uv": [0, 0, 2.5, 2.25], "texture": "#4"},
|
||||||
|
"south": {"uv": [0, 0, 0.6, 2.25], "texture": "#4"},
|
||||||
|
"west": {"uv": [0, 0, 2.5, 2.25], "texture": "#4"},
|
||||||
|
"up": {"uv": [0, 0, 0.6, 2.5], "texture": "#4"},
|
||||||
|
"down": {"uv": [0, 0, 0.6, 2.5], "texture": "#missing"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 12.35109, 6.85],
|
||||||
|
"to": [3.375, 12.74891, 8.85],
|
||||||
|
"rotation": {"angle": -45, "axis": "x", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 12.35109, 6.85],
|
||||||
|
"to": [3.375, 12.74891, 8.85],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 12.35109, 6.85],
|
||||||
|
"to": [3.375, 12.74891, 8.85],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 12.35109, 6.85],
|
||||||
|
"to": [3.375, 12.74891, 8.85],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 12.35109, 6.85],
|
||||||
|
"to": [3.375, 12.74891, 8.85],
|
||||||
|
"rotation": {"angle": 45, "axis": "x", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 11.55, 7.65109],
|
||||||
|
"to": [3.375, 13.55, 8.04891],
|
||||||
|
"rotation": {"angle": -22.5, "axis": "x", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 11.55, 7.65109],
|
||||||
|
"to": [3.375, 13.55, 8.04891],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"from": [2.625, 11.55, 7.65109],
|
||||||
|
"to": [3.375, 13.55, 8.04891],
|
||||||
|
"rotation": {"angle": 22.5, "axis": "x", "origin": [3, 12.55, 7.85]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5, 7, 6, 8], "texture": "#5"},
|
||||||
|
"east": {"uv": [2, 13, 0, 11], "texture": "#5"},
|
||||||
|
"south": {"uv": [2, 13, 3, 14], "texture": "#5"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
|
||||||
|
"up": {"uv": [8, 2, 9, 3], "texture": "#5"},
|
||||||
|
"down": {"uv": [3, 4, 4, 5], "texture": "#5"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Rad",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"color": 0,
|
||||||
|
"children": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7,
|
||||||
|
8,
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
11,
|
||||||
|
12,
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
15,
|
||||||
|
{
|
||||||
|
"name": "Speichen",
|
||||||
|
"origin": [8, 10, 8],
|
||||||
|
"color": 0,
|
||||||
|
"children": [16, 17, 18, 19, 20, 21, 22, 23]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mittelteil",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"color": 0,
|
||||||
|
"children": [24, 25, 26, 27, 28, 29, 30, 31]
|
||||||
|
},
|
||||||
|
32,
|
||||||
|
33,
|
||||||
|
34
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Aufhängung1",
|
||||||
|
"origin": [0, 0, 0],
|
||||||
|
"color": 0,
|
||||||
|
"children": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Aufhängung2",
|
||||||
|
"origin": [0, 0, 0],
|
||||||
|
"color": 0,
|
||||||
|
"children": [49, 50, 51, 52]
|
||||||
|
},
|
||||||
|
53,
|
||||||
|
54,
|
||||||
|
{
|
||||||
|
"name": "hexadecagon",
|
||||||
|
"origin": [8, 8, 8],
|
||||||
|
"color": 0,
|
||||||
|
"children": [55, 56, 57, 58, 59, 60, 61, 62]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "modchest:block/denk_mal_block_aus"
|
||||||
|
}
|
|
@ -0,0 +1,218 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"textures": {
|
||||||
|
"1": "modchest:item/denk_mal_item"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [7, 0, 8],
|
||||||
|
"to": [8, 9, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 9], "texture": "#1"},
|
||||||
|
"east": {"uv": [1, 0, 2, 9], "texture": "#1"},
|
||||||
|
"south": {"uv": [2, 0, 3, 9], "texture": "#1"},
|
||||||
|
"west": {"uv": [3, 0, 4, 9], "texture": "#1"},
|
||||||
|
"up": {"uv": [14, 6, 13, 5], "texture": "#1"},
|
||||||
|
"down": {"uv": [14, 6, 13, 7], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 12, 8],
|
||||||
|
"to": [8, 13, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13, 7, 14, 8], "texture": "#1"},
|
||||||
|
"east": {"uv": [13, 8, 14, 9], "texture": "#1"},
|
||||||
|
"south": {"uv": [13, 9, 14, 10], "texture": "#1"},
|
||||||
|
"west": {"uv": [13, 10, 14, 11], "texture": "#1"},
|
||||||
|
"up": {"uv": [14, 12, 13, 11], "texture": "#1"},
|
||||||
|
"down": {"uv": [13, 13, 12, 14], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 7, 9],
|
||||||
|
"to": [8, 10, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 0, 10, 3], "texture": "#1"},
|
||||||
|
"east": {"uv": [1, 9, 2, 12], "texture": "#1"},
|
||||||
|
"south": {"uv": [2, 9, 3, 12], "texture": "#1"},
|
||||||
|
"west": {"uv": [3, 9, 4, 12], "texture": "#1"},
|
||||||
|
"up": {"uv": [14, 13, 13, 12], "texture": "#1"},
|
||||||
|
"down": {"uv": [14, 13, 13, 14], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 7, 7],
|
||||||
|
"to": [8, 10, 8],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9, 3, 10, 6], "texture": "#1"},
|
||||||
|
"east": {"uv": [9, 6, 10, 9], "texture": "#1"},
|
||||||
|
"south": {"uv": [9, 9, 10, 12], "texture": "#1"},
|
||||||
|
"west": {"uv": [10, 0, 11, 3], "texture": "#1"},
|
||||||
|
"up": {"uv": [1, 15, 0, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 0, 14, 1], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [8, 7, 8],
|
||||||
|
"to": [9, 10, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10, 3, 11, 6], "texture": "#1"},
|
||||||
|
"east": {"uv": [10, 6, 11, 9], "texture": "#1"},
|
||||||
|
"south": {"uv": [10, 9, 11, 12], "texture": "#1"},
|
||||||
|
"west": {"uv": [11, 0, 12, 3], "texture": "#1"},
|
||||||
|
"up": {"uv": [6, 15, 5, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 5, 14, 6], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [8, 0, 8],
|
||||||
|
"to": [9, 2, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [1, 12, 2, 14], "texture": "#1"},
|
||||||
|
"east": {"uv": [2, 12, 3, 14], "texture": "#1"},
|
||||||
|
"south": {"uv": [3, 12, 4, 14], "texture": "#1"},
|
||||||
|
"west": {"uv": [12, 3, 13, 5], "texture": "#1"},
|
||||||
|
"up": {"uv": [8, 15, 7, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 7, 14, 8], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 0, 8],
|
||||||
|
"to": [7, 2, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 12, 5, 14], "texture": "#1"},
|
||||||
|
"east": {"uv": [5, 12, 6, 14], "texture": "#1"},
|
||||||
|
"south": {"uv": [12, 5, 13, 7], "texture": "#1"},
|
||||||
|
"west": {"uv": [6, 12, 7, 14], "texture": "#1"},
|
||||||
|
"up": {"uv": [9, 15, 8, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 8, 14, 9], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 0, 9],
|
||||||
|
"to": [8, 2, 10],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7, 12, 8, 14], "texture": "#1"},
|
||||||
|
"east": {"uv": [12, 7, 13, 9], "texture": "#1"},
|
||||||
|
"south": {"uv": [8, 12, 9, 14], "texture": "#1"},
|
||||||
|
"west": {"uv": [9, 12, 10, 14], "texture": "#1"},
|
||||||
|
"up": {"uv": [10, 15, 9, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 9, 14, 10], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 0, 7],
|
||||||
|
"to": [8, 2, 8],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12, 9, 13, 11], "texture": "#1"},
|
||||||
|
"east": {"uv": [10, 12, 11, 14], "texture": "#1"},
|
||||||
|
"south": {"uv": [11, 12, 12, 14], "texture": "#1"},
|
||||||
|
"west": {"uv": [12, 11, 13, 13], "texture": "#1"},
|
||||||
|
"up": {"uv": [11, 15, 10, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 10, 14, 11], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 7, 8],
|
||||||
|
"to": [7, 10, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [11, 3, 12, 6], "texture": "#1"},
|
||||||
|
"east": {"uv": [11, 6, 12, 9], "texture": "#1"},
|
||||||
|
"south": {"uv": [11, 9, 12, 12], "texture": "#1"},
|
||||||
|
"west": {"uv": [12, 0, 13, 3], "texture": "#1"},
|
||||||
|
"up": {"uv": [7, 15, 6, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 6, 14, 7], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 8, 6],
|
||||||
|
"to": [8, 12, 7],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [4, 0, 5, 4], "texture": "#1"},
|
||||||
|
"east": {"uv": [4, 4, 5, 8], "texture": "#1"},
|
||||||
|
"south": {"uv": [5, 0, 6, 4], "texture": "#1"},
|
||||||
|
"west": {"uv": [5, 4, 6, 8], "texture": "#1"},
|
||||||
|
"up": {"uv": [2, 15, 1, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 1, 14, 2], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 8, 10],
|
||||||
|
"to": [8, 12, 11],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 0, 7, 4], "texture": "#1"},
|
||||||
|
"east": {"uv": [6, 4, 7, 8], "texture": "#1"},
|
||||||
|
"south": {"uv": [7, 0, 8, 4], "texture": "#1"},
|
||||||
|
"west": {"uv": [7, 4, 8, 8], "texture": "#1"},
|
||||||
|
"up": {"uv": [3, 15, 2, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 2, 14, 3], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [9, 8, 8],
|
||||||
|
"to": [10, 12, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 0, 9, 4], "texture": "#1"},
|
||||||
|
"east": {"uv": [4, 8, 5, 12], "texture": "#1"},
|
||||||
|
"south": {"uv": [8, 4, 9, 8], "texture": "#1"},
|
||||||
|
"west": {"uv": [5, 8, 6, 12], "texture": "#1"},
|
||||||
|
"up": {"uv": [4, 15, 3, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 3, 14, 4], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [5, 8, 8],
|
||||||
|
"to": [6, 12, 9],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 8, 7, 12], "texture": "#1"},
|
||||||
|
"east": {"uv": [7, 8, 8, 12], "texture": "#1"},
|
||||||
|
"south": {"uv": [8, 8, 9, 12], "texture": "#1"},
|
||||||
|
"west": {"uv": [0, 9, 1, 13], "texture": "#1"},
|
||||||
|
"up": {"uv": [5, 15, 4, 14], "texture": "#1"},
|
||||||
|
"down": {"uv": [15, 4, 14, 5], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7.25, 9, 8.25],
|
||||||
|
"to": [7.75, 9.5, 8.75],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 13, 1, 14], "texture": "#1"},
|
||||||
|
"east": {"uv": [13, 0, 14, 1], "texture": "#1"},
|
||||||
|
"south": {"uv": [13, 1, 14, 2], "texture": "#1"},
|
||||||
|
"west": {"uv": [13, 2, 14, 3], "texture": "#1"},
|
||||||
|
"up": {"uv": [14, 4, 13, 3], "texture": "#1"},
|
||||||
|
"down": {"uv": [14, 4, 13, 5], "texture": "#1"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"translation": [0.5, 5, 0.5]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"translation": [-0.5, 5, 0.5]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"rotation": [-13, 26, 0],
|
||||||
|
"translation": [1.25, 6, 0]
|
||||||
|
},
|
||||||
|
"firstperson_lefthand": {
|
||||||
|
"rotation": [-13, 20, 0],
|
||||||
|
"translation": [1.25, 6, 0]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"rotation": [26, 0, 0],
|
||||||
|
"translation": [0, 3.25, 0]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [0, 0, -34],
|
||||||
|
"translation": [1.25, 1, 0]
|
||||||
|
},
|
||||||
|
"head": {
|
||||||
|
"translation": [0, 13.75, 0]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"translation": [0, 0.75, -0.5]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 766 B |
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "buliding",
|
||||||
|
"key": {
|
||||||
|
"X": {
|
||||||
|
"item": "minecraft:emerald"
|
||||||
|
},
|
||||||
|
"H": {
|
||||||
|
"item": "minecraft:amethyst_cluster"
|
||||||
|
},
|
||||||
|
"M": {
|
||||||
|
"item": "minecraft:stone"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"item": "minecraft:stick"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"HXH",
|
||||||
|
" I ",
|
||||||
|
"MIM"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "modchest:denk_mal_item"
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,8 +3,13 @@
|
||||||
"package": "modchest.mixin",
|
"package": "modchest.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"ServerPlayerEntityMixin",
|
"bedBlockMixin",
|
||||||
"bedBlock"
|
"flintAndSteelItemMixin",
|
||||||
|
"itemMixin",
|
||||||
|
"LevelStorageMixin",
|
||||||
|
"MinecraftServerMixin",
|
||||||
|
"playerPlaceBlockMixin",
|
||||||
|
"ServerPlayerEntityMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|
Loading…
Reference in New Issue