Initial 1.19 port.

This commit is contained in:
stfwi 2022-06-19 00:29:24 +02:00
parent e59a9405d0
commit 96d675198f
139 changed files with 763 additions and 4940 deletions

View file

@ -30,30 +30,30 @@ default: mod
all: clean clean-all mod | install all: clean clean-all mod | install
mod: mod:
@echo "[1.18] Building mod using gradle ..." @echo "[1.19] Building mod using gradle ..."
@$(GRADLE) build $(GRADLE_OPTS) @$(GRADLE) build $(GRADLE_OPTS)
run: run:
@echo "[1.18] Run client ..." @echo "[1.19] Run client ..."
@$(GRADLE) runClient @$(GRADLE) runClient
assets: assets:
@echo "[1.18] Running asset generators ..." @echo "[1.19] Running asset generators ..."
@$(TASK) assets @$(TASK) assets
data: data:
@echo "[1.18] Running data generators ..." @echo "[1.19] Running data generators ..."
@$(TASK) datagen @$(TASK) datagen
clean: clean:
@echo "[1.18] Cleaning ..." @echo "[1.19] Cleaning ..."
@rm -rf src/generated @rm -rf src/generated
@rm -rf mcmodsrepo @rm -rf mcmodsrepo
@rm -f build/libs/* @rm -f build/libs/*
@$(GRADLE) clean @$(GRADLE) clean
clean-all: clean-all:
@echo "[1.18] Cleaning using gradle ..." @echo "[1.19] Cleaning using gradle ..."
@rm -rf mcmodsrepo @rm -rf mcmodsrepo
@rm -f dist/* @rm -f dist/*
@rm -rf run/logs/ @rm -rf run/logs/
@ -68,12 +68,12 @@ mrproper: clean-all
@rm -f .classpath @rm -f .classpath
init: init:
@echo "[1.18] Initialising eclipse workspace using gradle ..." @echo "[1.19] Initialising eclipse workspace using gradle ..."
@$(GRADLE) eclipse @$(GRADLE) eclipse
-@$(GRADLE) hideOfficialWarningUntilChanged -@$(GRADLE) hideOfficialWarningUntilChanged
sanitize: sanitize:
@echo "[1.18] Running sanitising tasks ..." @echo "[1.19] Running sanitising tasks ..."
@$(TASK) sanitize @$(TASK) sanitize
@$(TASK) sync-languages @$(TASK) sync-languages
@$(TASK) version-check @$(TASK) version-check
@ -87,11 +87,11 @@ start-server: install
@$(TASK) start-server @$(TASK) start-server
dist-check: dist-check:
@echo "[1.18] Running dist checks ..." @echo "[1.19] Running dist checks ..."
@$(TASK) dist-check @$(TASK) dist-check
dist-files: clean-all init mod dist-files: clean-all init mod
@echo "[1.18] Distribution files ..." @echo "[1.19] Distribution files ..."
@mkdir -p dist @mkdir -p dist
@cp build/libs/$(MOD_JAR_PREFIX)* dist/ @cp build/libs/$(MOD_JAR_PREFIX)* dist/
@$(TASK) dist @$(TASK) dist

View file

@ -1,17 +1,10 @@
// @file build.gradle // @file build.gradle
// Engineer's decor mod gradle build. // Engineer's decor mod gradle build.
buildscript { plugins {
repositories { id 'eclipse'
maven { url = 'https://maven.minecraftforge.net' } id 'maven-publish'
mavenCentral() id 'net.minecraftforge.gradle' version '5.1.+'
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
} }
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
java.toolchain.languageVersion = JavaLanguageVersion.of(17) java.toolchain.languageVersion = JavaLanguageVersion.of(17)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
version = "${version_engineersdecor}" version = "${version_engineersdecor}"
@ -43,8 +36,8 @@ minecraft {
dependencies { dependencies {
minecraft "net.minecraftforge:forge:${version_forge_minecraft}" minecraft "net.minecraftforge:forge:${version_forge_minecraft}"
compileOnly fg.deobf("mezz.jei:jei-${version_jei}:api") //compileOnly fg.deobf("mezz.jei:jei-${version_jei}:api")
runtimeOnly fg.deobf("mezz.jei:jei-${version_jei}") //runtimeOnly fg.deobf("mezz.jei:jei-${version_jei}")
} }
processResources { processResources {
@ -86,3 +79,7 @@ project.afterEvaluate {
} }
reobfJar.finalizedBy('signJar') reobfJar.finalizedBy('signJar')
} }
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx8G
meta_modid=engineersdecor meta_modid=engineersdecor
meta_issues=https://github.com/stfwi/engineers-decor/issues meta_issues=https://github.com/stfwi/engineers-decor/issues
meta_download=https://www.curseforge.com/minecraft/mc-mods/engineers-decor/ meta_download=https://www.curseforge.com/minecraft/mc-mods/engineers-decor/
version_minecraft=1.18.2 version_minecraft=1.19
version_forge_minecraft=1.18.2-40.1.51 version_forge_minecraft=1.19-41.0.35
version_jei=1.18.2:9.5.4.171 version_jei=1.19:11.0.0.206
version_engineersdecor=1.1.23 version_engineersdecor=1.1.24-b1

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

269
gradlew vendored
View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh #!/bin/sh
# #
# Copyright 2015 the original author or authors. # Copyright © 2015-2021 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -17,67 +17,101 @@
# #
############################################################################## ##############################################################################
## #
## Gradle start up script for UN*X # Gradle start up script for POSIX generated by Gradle.
## #
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
############################################################################## ##############################################################################
# Attempt to set APP_HOME # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" app_path=$0
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do # Need this for daisy-chained symlinks.
ls=`ls -ld "$PRG"` while
link=`expr "$ls" : '.*-> \(.*\)$'` APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
if expr "$link" : '/.*' > /dev/null; then [ -h "$app_path" ]
PRG="$link" do
else ls=$( ls -ld "$app_path" )
PRG=`dirname "$PRG"`"/$link" link=${ls#*' -> '}
fi case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle" APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"` APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # 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"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD=maximum
warn () { warn () {
echo "$*" echo "$*"
} } >&2
die () { die () {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} } >&2
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
nonstop=false nonstop=false
case "`uname`" in case "$( uname )" in #(
CYGWIN* ) CYGWIN* ) cygwin=true ;; #(
cygwin=true Darwin* ) darwin=true ;; #(
;; MSYS* | MINGW* ) msys=true ;; #(
Darwin* ) NONSTOP* ) nonstop=true ;;
darwin=true
;;
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD=$JAVA_HOME/jre/sh/java
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD=$JAVA_HOME/bin/java
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
else else
JAVACMD="java" JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
@ -106,80 +140,95 @@ location of your Java installation."
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
MAX_FD_LIMIT=`ulimit -H -n` case $MAX_FD in #(
if [ $? -eq 0 ] ; then max*)
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD=$( ulimit -H -n ) ||
MAX_FD="$MAX_FD_LIMIT" warn "Could not query maximum file descriptor limit"
fi esac
ulimit -n $MAX_FD case $MAX_FD in #(
if [ $? -ne 0 ] ; then '' | soft) :;; #(
warn "Could not set maximum file descriptor limit: $MAX_FD" *)
fi ulimit -n "$MAX_FD" ||
else warn "Could not set maximum file descriptor limit to $MAX_FD"
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
# Escape application args # Collect all arguments for the java command, stacking in reverse order:
save () { # * args from the command line
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done # * the main class name
echo " " # * -classpath
} # * -D...appname settings
APP_ARGS=`save "$@"` # * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules # For Cygwin or MSYS, switch paths to Windows format before running java
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@" exec "$JAVACMD" "$@"

View file

@ -1,6 +1,7 @@
{ {
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.18.2": { "1.19": {
"1.1.24-b1": "[U] Initial 1.19 port.\n[D] Metal/Treated Wood Crafting Table dropped in favour of IE Engineer's Crafting Table.\n[D] Labeled Crate dropped.\n[D] Obsolete wood blocks dropped.",
"1.1.23": "[R] Release build.\n[F] Updated Forge and re-enabled JSON tags (issue #217, ty snarkbait66).", "1.1.23": "[R] Release build.\n[F] Updated Forge and re-enabled JSON tags (issue #217, ty snarkbait66).",
"1.1.23-b1": "[A] Added ability to install inset lights in top-aligned catwalks (PR#215, Sergii).\n[A] Iron Hatch improved (PR#216, Sergii).", "1.1.23-b1": "[A] Added ability to install inset lights in top-aligned catwalks (PR#215, Sergii).\n[A] Iron Hatch improved (PR#216, Sergii).",
"1.1.22": "[R] Release build v1.1.22.\n[M] Factory Dropper stack size ignored for un-stackable items (issue #209, ty LesBeans).", "1.1.22": "[R] Release build v1.1.22.\n[M] Factory Dropper stack size ignored for un-stackable items (issue #209, ty LesBeans).",
@ -57,7 +58,7 @@
"1.1.2-b1": "[U] Ported to MC1.16.2." "1.1.2-b1": "[U] Ported to MC1.16.2."
}, },
"promos": { "promos": {
"1.18.2-recommended": "1.1.23", "1.19-recommended": "1.1.23",
"1.18.2-latest": "1.1.23" "1.19-latest": "1.1.24-b1"
} }
} }

View file

@ -11,6 +11,11 @@ Mod sources for Minecraft version 1.18.x.
## Version history ## Version history
- v1.1.24-b1 [U] Initial 1.19 port.
[D] Metal/Treated Wood Crafting Table dropped in favour of IE Engineer's Crafting Table.
[D] Labeled Crate dropped.
[D] Obsolete wood blocks dropped.
- v1.1.23 [R] Release build. - v1.1.23 [R] Release build.
[F] Updated Forge and re-enabled JSON tags (issue #217, ty snarkbait66). [F] Updated Forge and re-enabled JSON tags (issue #217, ty snarkbait66).

6
settings.gradle Normal file
View file

@ -0,0 +1,6 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
}
}

View file

@ -16,7 +16,6 @@ import net.minecraftforge.common.ForgeConfigSpec;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import wile.engineersdecor.blocks.*; import wile.engineersdecor.blocks.*;
import wile.engineersdecor.libmc.blocks.SlabSliceBlock; import wile.engineersdecor.libmc.blocks.SlabSliceBlock;
import wile.engineersdecor.libmc.blocks.StandardBlocks;
import wile.engineersdecor.libmc.blocks.VariantSlabBlock; import wile.engineersdecor.libmc.blocks.VariantSlabBlock;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.OptionalRecipeCondition; import wile.engineersdecor.libmc.detail.OptionalRecipeCondition;
@ -324,7 +323,7 @@ public class ModConfig
{ return (block==null) || isOptedOut(block.asItem()); } { return (block==null) || isOptedOut(block.asItem()); }
public static boolean isOptedOut(final @Nullable Item item) public static boolean isOptedOut(final @Nullable Item item)
{ return (item!=null) && optouts_.contains(item.getRegistryName().getPath()); } { return (item!=null) && optouts_.contains(Auxiliaries.getResourceLocation(item).getPath()); }
public static boolean withExperimental() public static boolean withExperimental()
{ return with_experimental_features_; } { return with_experimental_features_; }
@ -385,14 +384,9 @@ public class ModConfig
try { try {
if(!with_experimental_features_) { if(!with_experimental_features_) {
if(block instanceof Auxiliaries.IExperimentalFeature) return true; if(block instanceof Auxiliaries.IExperimentalFeature) return true;
if(ModContent.isExperimentalBlock(block)) return true;
}
// Hard IE dependent blocks
if(!immersiveengineering_installed) {
if((block instanceof StandardBlocks.IStandardBlock) && ((((StandardBlocks.IStandardBlock)block).config() & DecorBlock.CFG_HARD_IE_DEPENDENT)!=0)) return true;
} }
// Force-include/exclude pattern matching // Force-include/exclude pattern matching
final String rn = block.getRegistryName().getPath(); final String rn = Auxiliaries.getResourceLocation(block).getPath();
try { try {
for(String e : includes) { for(String e : includes) {
if(rn.matches(e)) { if(rn.matches(e)) {
@ -416,7 +410,7 @@ public class ModConfig
} }
return false; return false;
}).forEach( }).forEach(
e -> optouts.add(e.getRegistryName().getPath()) e -> optouts.add(Auxiliaries.getResourceLocation(e).getPath())
); );
optouts_ = optouts; optouts_ = optouts;
} }
@ -439,8 +433,6 @@ public class ModConfig
EdLadderBlock.on_config(SERVER.without_ladder_speed_boost.get()); EdLadderBlock.on_config(SERVER.without_ladder_speed_boost.get());
VariantSlabBlock.on_config(!SERVER.without_direct_slab_pickup.get()); VariantSlabBlock.on_config(!SERVER.without_direct_slab_pickup.get());
SlabSliceBlock.on_config(!SERVER.without_direct_slab_pickup.get()); SlabSliceBlock.on_config(!SERVER.without_direct_slab_pickup.get());
EdLabeledCrate.on_config(false);
EdCraftingTable.on_config(SERVER.without_crafting_table_history.get(), false, SERVER.without_crafting_mouse_scrolling.get());
EdFluidBarrel.on_config(12000, 1000); EdFluidBarrel.on_config(12000, 1000);
EdFluidFunnel.on_config(with_experimental_features_); EdFluidFunnel.on_config(with_experimental_features_);
EdPipeValve.on_config(SERVER.pipevalve_max_flowrate.get(), SERVER.pipevalve_redstone_gain.get()); EdPipeValve.on_config(SERVER.pipevalve_max_flowrate.get(), SERVER.pipevalve_redstone_gain.get());

View file

@ -15,7 +15,6 @@ package wile.engineersdecor;
import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.ItemBlockRenderTypes;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderers;
import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.client.renderer.entity.EntityRenderers;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -40,7 +39,6 @@ import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import wile.engineersdecor.blocks.*; import wile.engineersdecor.blocks.*;
import wile.engineersdecor.detail.ModRenderers; import wile.engineersdecor.detail.ModRenderers;
@ -292,10 +290,6 @@ public class ModContent
StandardBlocks.CFG_DEFAULT, StandardBlocks.CFG_DEFAULT,
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion()
)); ));
Registries.addBlock("treated_wood_ladder", ()->new EdLadderBlock(
StandardBlocks.CFG_DEFAULT,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 8f).sound(SoundType.WOOD).noOcclusion()
));
Registries.addBlock("iron_hatch", ()->new EdHatchBlock( Registries.addBlock("iron_hatch", ()->new EdHatchBlock(
StandardBlocks.CFG_LOOK_PLACEMENT, StandardBlocks.CFG_LOOK_PLACEMENT,
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 2000f).sound(SoundType.METAL), BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 2000f).sound(SoundType.METAL),
@ -356,11 +350,6 @@ public class ModContent
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
Registries.addBlock("treated_wood_table", ()->new StandardBlocks.WaterLoggable(
StandardBlocks.CFG_CUTOUT,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(),
Auxiliaries.getPixeledAABB(1,0,1, 15,15.9,15)
));
Registries.addBlock("treated_wood_stool", ()->new EdChair.ChairBlock( Registries.addBlock("treated_wood_stool", ()->new EdChair.ChairBlock(
StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_LOOK_PLACEMENT, StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_LOOK_PLACEMENT,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(),
@ -371,16 +360,6 @@ public class ModContent
Auxiliaries.getPixeledAABB(7,0,4, 9,1,12), Auxiliaries.getPixeledAABB(7,0,4, 9,1,12),
} }
)); ));
Registries.addBlock("treated_wood_windowsill", ()->new StandardBlocks.DirectedWaterLoggable(
StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_FACING_PLACEMENT|StandardBlocks.CFG_AI_PASSABLE,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(),
Auxiliaries.getPixeledAABB(0.5,15,10.5, 15.5,16,16)
));
Registries.addBlock("treated_wood_broad_windowsill", ()->new StandardBlocks.DirectedWaterLoggable(
StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_FACING_PLACEMENT,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(),
Auxiliaries.getPixeledAABB(0,14.5,4, 16,16,16)
));
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
@ -432,11 +411,6 @@ public class ModContent
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
Registries.addBlock("treated_wood_window", ()->new EdWindowBlock(
StandardBlocks.CFG_LOOK_PLACEMENT,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 8f).sound(SoundType.WOOD).noOcclusion(),
Auxiliaries.getPixeledAABB(0,0,7, 16,16,9)
));
Registries.addBlock("steel_framed_window", ()->new EdWindowBlock( Registries.addBlock("steel_framed_window", ()->new EdWindowBlock(
StandardBlocks.CFG_LOOK_PLACEMENT, StandardBlocks.CFG_LOOK_PLACEMENT,
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).noOcclusion(), BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).noOcclusion(),
@ -642,37 +616,9 @@ public class ModContent
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(),
Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16)
)); ));
Registries.addBlock("sign_factoryarea", ()->new StandardBlocks.DirectedWaterLoggable(
StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_FACING_PLACEMENT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_AI_PASSABLE,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(),
Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16)
));
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
Registries.addBlock("labeled_crate",
()->new EdLabeledCrate.LabeledCrateBlock(
StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_LOOK_PLACEMENT|StandardBlocks.CFG_OPPOSITE_PLACEMENT,
BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 32f).sound(SoundType.METAL).noOcclusion(),
Auxiliaries.getPixeledAABB(0,0,0, 16,16,16)
),
EdLabeledCrate.LabeledCrateTileEntity::new,
EdLabeledCrate.LabeledCrateContainer::new
);
Registries.addBlock("metal_crafting_table",
()->new EdCraftingTable.CraftingTableBlock(
StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_LOOK_PLACEMENT|StandardBlocks.CFG_OPPOSITE_PLACEMENT,
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(),
new AABB[]{
Auxiliaries.getPixeledAABB(0,15,0, 16,16,16),
Auxiliaries.getPixeledAABB(1, 0,1, 15,16,15)
}
),
EdCraftingTable.CraftingTableTileEntity::new,
EdCraftingTable.CraftingTableUiContainer::new
//MenuScreens.register(CT_TREATED_WOOD_CRAFTING_TABLE, EdCraftingTable.CraftingTableGui::new);
);
Registries.addBlock("small_lab_furnace", Registries.addBlock("small_lab_furnace",
()->new EdFurnace.FurnaceBlock( ()->new EdFurnace.FurnaceBlock(
StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_LOOK_PLACEMENT|StandardBlocks.CFG_OPPOSITE_PLACEMENT, StandardBlocks.CFG_CUTOUT|StandardBlocks.CFG_HORIZIONTAL|StandardBlocks.CFG_LOOK_PLACEMENT|StandardBlocks.CFG_OPPOSITE_PLACEMENT,
@ -902,6 +848,7 @@ public class ModContent
Auxiliaries.getPixeledAABB(2,15,0, 14,16,16), Auxiliaries.getPixeledAABB(2,15,0, 14,16,16),
} }
), ),
EdFluidBarrel.FluidBarrelItem::new,
EdFluidBarrel.FluidBarrelTileEntity::new EdFluidBarrel.FluidBarrelTileEntity::new
); );
Registries.addBlock("small_fluid_funnel", Registries.addBlock("small_fluid_funnel",
@ -919,35 +866,6 @@ public class ModContent
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
if(Auxiliaries.isModLoaded("immersiveengineeringharddependent")) {
//Registries.addBlock("halfslab_treated_wood", ()->new SlabSliceBlock(
// StandardBlocks.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT,
// BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 4f).sound(SoundType.WOOD).noOcclusion()
//));
//Registries.addBlock("halfslab_sheetmetal_iron", ()->new SlabSliceBlock(
// StandardBlocks.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT,
// BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion()
//));
//Registries.addBlock("halfslab_sheetmetal_steel", ()->new SlabSliceBlock(
// StandardBlocks.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT,
// BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion()
//));
//Registries.addBlock("halfslab_sheetmetal_copper", ()->new SlabSliceBlock(
// StandardBlocks.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT,
// BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion()
//));
//Registries.addBlock("halfslab_sheetmetal_gold", ()->new SlabSliceBlock(
// StandardBlocks.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT,
// BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion()
//));
//Registries.addBlock("halfslab_sheetmetal_aluminum", ()->new SlabSliceBlock(
// StandardBlocks.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT,
// BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion()
//));
}
// -------------------------------------------------------------------------------------------------------------------
Registries.addBlock("test_block", Registries.addBlock("test_block",
()->new EdTestBlock.TestBlock( ()->new EdTestBlock.TestBlock(
StandardBlocks.CFG_LOOK_PLACEMENT, StandardBlocks.CFG_LOOK_PLACEMENT,
@ -994,16 +912,15 @@ public class ModContent
public static BlockEntityType<?> getBlockEntityTypeOfBlock(String block_name) public static BlockEntityType<?> getBlockEntityTypeOfBlock(String block_name)
{ return Registries.getBlockEntityTypeOfBlock(block_name); } { return Registries.getBlockEntityTypeOfBlock(block_name); }
public static BlockEntityType<?> getBlockEntityTypeOfBlock(Block block)
{ return Registries.getBlockEntityTypeOfBlock(block); }
public static EntityType<?> getEntityType(String name) public static EntityType<?> getEntityType(String name)
{ return Registries.getEntityType(name); } { return Registries.getEntityType(name); }
public static MenuType<?> getMenuType(String block_name) public static MenuType<?> getMenuType(String block_name)
{ return Registries.getMenuTypeOfBlock(block_name); } { return Registries.getMenuTypeOfBlock(block_name); }
@SuppressWarnings("deprecation")
public static boolean isExperimentalBlock(Block block)
{ return (block instanceof StandardBlocks.IStandardBlock) && (((((StandardBlocks.IStandardBlock)block).config() & DecorBlock.CFG_EXPERIMENTAL))!=0); }
@Nonnull @Nonnull
public static List<Block> getRegisteredBlocks() public static List<Block> getRegisteredBlocks()
{ return Registries.getRegisteredBlocks(); } { return Registries.getRegisteredBlocks(); }
@ -1016,31 +933,10 @@ public class ModContent
// Initialisation events // Initialisation events
//-------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------
public static void registerBlocks(final RegistryEvent.Register<Block> event)
{
final boolean ie_available = Auxiliaries.isModLoaded("immersiveengineering");
if(ie_available) Auxiliaries.logInfo("Immersive Engineering also installed ...");
Registries.onBlockRegistry((rl, block)->event.getRegistry().register(block));
}
public static void registerItems(final RegistryEvent.Register<Item> event)
{ Registries.onItemRegistry((rl, item)->event.getRegistry().register(item)); }
public static void registerBlockEntityTypes(final RegistryEvent.Register<BlockEntityType<?>> event)
{ Registries.onBlockEntityRegistry((rl, tet)->event.getRegistry().register(tet)); }
public static void registerEntityTypes(final RegistryEvent.Register<EntityType<?>> event)
{ Registries.onEntityRegistry((rl, et)->event.getRegistry().register(et)); }
public static void registerMenuTypes(final RegistryEvent.Register<MenuType<?>> event)
{ Registries.onMenuTypeRegistry((rl, ct)->event.getRegistry().register(ct)); }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static void registerMenuGuis(final FMLClientSetupEvent event) public static void registerMenuGuis(final FMLClientSetupEvent event)
{ {
MenuScreens.register((MenuType<EdCraftingTable.CraftingTableUiContainer>)Registries.getMenuTypeOfBlock("metal_crafting_table"), EdCraftingTable.CraftingTableGui::new);
MenuScreens.register((MenuType<EdLabeledCrate.LabeledCrateContainer>)Registries.getMenuTypeOfBlock("labeled_crate"), EdLabeledCrate.LabeledCrateGui::new);
MenuScreens.register((MenuType<EdDropper.DropperUiContainer>)Registries.getMenuTypeOfBlock("factory_dropper"), EdDropper.DropperGui::new); MenuScreens.register((MenuType<EdDropper.DropperUiContainer>)Registries.getMenuTypeOfBlock("factory_dropper"), EdDropper.DropperGui::new);
MenuScreens.register((MenuType<EdPlacer.PlacerContainer>)Registries.getMenuTypeOfBlock("factory_placer"), EdPlacer.PlacerGui::new); MenuScreens.register((MenuType<EdPlacer.PlacerContainer>)Registries.getMenuTypeOfBlock("factory_placer"), EdPlacer.PlacerGui::new);
MenuScreens.register((MenuType<EdHopper.HopperContainer>)Registries.getMenuTypeOfBlock("factory_hopper"), EdHopper.HopperGui::new); MenuScreens.register((MenuType<EdHopper.HopperContainer>)Registries.getMenuTypeOfBlock("factory_hopper"), EdHopper.HopperGui::new);
@ -1053,8 +949,6 @@ public class ModContent
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static void registerBlockEntityRenderers(final FMLClientSetupEvent event) public static void registerBlockEntityRenderers(final FMLClientSetupEvent event)
{ {
BlockEntityRenderers.register((BlockEntityType<EdCraftingTable.CraftingTableTileEntity>)Registries.getBlockEntityTypeOfBlock("metal_crafting_table"), wile.engineersdecor.detail.ModRenderers.CraftingTableTer::new);
BlockEntityRenderers.register((BlockEntityType<EdLabeledCrate.LabeledCrateTileEntity>)Registries.getBlockEntityTypeOfBlock("labeled_crate"), wile.engineersdecor.detail.ModRenderers.DecorLabeledCrateTer::new);
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)

View file

@ -1,14 +1,8 @@
package wile.engineersdecor; package wile.engineersdecor;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.ModLoadingContext;
@ -17,8 +11,7 @@ import net.minecraftforge.fml.event.config.ModConfigEvent;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager; import org.slf4j.Logger;
import org.apache.logging.log4j.Logger;
import wile.engineersdecor.blocks.EdLadderBlock; import wile.engineersdecor.blocks.EdLadderBlock;
import wile.engineersdecor.libmc.detail.Auxiliaries; import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.OptionalRecipeCondition; import wile.engineersdecor.libmc.detail.OptionalRecipeCondition;
@ -31,13 +24,13 @@ public class ModEngineersDecor
public static final String MODID = "engineersdecor"; public static final String MODID = "engineersdecor";
public static final String MODNAME = "Engineer's Decor"; public static final String MODNAME = "Engineer's Decor";
public static final int VERSION_DATAFIXER = 0; public static final int VERSION_DATAFIXER = 0;
private static final Logger LOGGER = LogManager.getLogger(); private static final Logger LOGGER = com.mojang.logging.LogUtils.getLogger();
public ModEngineersDecor() public ModEngineersDecor()
{ {
Auxiliaries.init(MODID, LOGGER, ModConfig::getServerConfig); Auxiliaries.init(MODID, LOGGER, ModConfig::getServerConfig);
Auxiliaries.logGitVersion(MODNAME); Auxiliaries.logGitVersion(MODNAME);
Registries.init(MODID, "sign_decor"); Registries.init(MODID, "sign_decor", (reg)->reg.register(FMLJavaModLoadingContext.get().getModEventBus()));
ModContent.init(MODID); ModContent.init(MODID);
OptionalRecipeCondition.init(MODID, LOGGER); OptionalRecipeCondition.init(MODID, LOGGER);
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.SERVER, ModConfig.SERVER_CONFIG_SPEC); ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.SERVER, ModConfig.SERVER_CONFIG_SPEC);
@ -68,26 +61,6 @@ public class ModEngineersDecor
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
public static class ForgeEvents public static class ForgeEvents
{ {
@SubscribeEvent
public static void onRegisterBlocks(final RegistryEvent.Register<Block> event)
{ ModContent.registerBlocks(event); }
@SubscribeEvent
public static void onRegisterItems(final RegistryEvent.Register<Item> event)
{ ModContent.registerItems(event); }
@SubscribeEvent
public static void onRegisterBlockEntityTypes(final RegistryEvent.Register<BlockEntityType<?>> event)
{ ModContent.registerBlockEntityTypes(event); }
@SubscribeEvent
public static void onRegisterEntityTypes(final RegistryEvent.Register<EntityType<?>> event)
{ ModContent.registerEntityTypes(event); }
@SubscribeEvent
public static void onRegisterMenuTypes(final RegistryEvent.Register<MenuType<?>> event)
{ ModContent.registerMenuTypes(event); }
@SubscribeEvent @SubscribeEvent
public static void onConfigLoad(final ModConfigEvent.Loading event) public static void onConfigLoad(final ModConfigEvent.Loading event)
{ ModConfig.apply(); } { ModConfig.apply(); }

View file

@ -1,34 +0,0 @@
/*
* @file DecorBlock.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2020 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Common functionality class for decor blocks.
* Mainly needed for:
* - MC block defaults.
* - Tooltip functionality
* - Model initialisation
*/
package wile.engineersdecor.blocks;
import wile.engineersdecor.libmc.blocks.StandardBlocks;
public class DecorBlock
{
public static final long CFG_DEFAULT = StandardBlocks.CFG_DEFAULT;
public static final long CFG_CUTOUT = StandardBlocks.CFG_CUTOUT;
public static final long CFG_MIPPED = StandardBlocks.CFG_MIPPED;
public static final long CFG_TRANSLUCENT = StandardBlocks.CFG_TRANSLUCENT;
public static final long CFG_WATERLOGGABLE = StandardBlocks.CFG_WATERLOGGABLE;
public static final long CFG_HORIZIONTAL = StandardBlocks.CFG_HORIZIONTAL;
public static final long CFG_LOOK_PLACEMENT = StandardBlocks.CFG_LOOK_PLACEMENT;
public static final long CFG_FACING_PLACEMENT = StandardBlocks.CFG_FACING_PLACEMENT;
public static final long CFG_OPPOSITE_PLACEMENT = StandardBlocks.CFG_OPPOSITE_PLACEMENT;
public static final long CFG_FLIP_PLACEMENT_IF_SAME = StandardBlocks.CFG_FLIP_PLACEMENT_IF_SAME;
public static final long CFG_FLIP_PLACEMENT_SHIFTCLICK = StandardBlocks.CFG_FLIP_PLACEMENT_SHIFTCLICK;
public static final long CFG_STRICT_CONNECTIONS = StandardBlocks.CFG_STRICT_CONNECTIONS;
public static final long CFG_AI_PASSABLE = StandardBlocks.CFG_AI_PASSABLE;
public static final long CFG_HARD_IE_DEPENDENT = 0x8000000000000000L;
@Deprecated public static final long CFG_EXPERIMENTAL = 0x4000000000000000L;
}

View file

@ -12,7 +12,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
@ -93,10 +92,6 @@ public class EdBreaker
public BreakerBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABBs) public BreakerBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABBs)
{ super(config, builder, unrotatedAABBs); } { super(config, builder, unrotatedAABBs); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -195,7 +190,7 @@ public class EdBreaker
private final LazyOptional<IEnergyStorage> energy_handler_ = battery_.createEnergyHandler(); private final LazyOptional<IEnergyStorage> energy_handler_ = battery_.createEnergyHandler();
public BreakerTileEntity(BlockPos pos, BlockState state) public BreakerTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); }
public void block_updated() public void block_updated()
{ if(tick_timer_ > 2) tick_timer_ = 2; } { if(tick_timer_ > 2) tick_timer_ = 2; }

View file

@ -13,6 +13,7 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.Packet;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -35,8 +36,6 @@ import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.blocks.StandardBlocks;
import java.util.List; import java.util.List;
import java.util.Random;
public class EdChair public class EdChair
@ -81,7 +80,7 @@ public class EdChair
@Override @Override
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void tick(BlockState state, ServerLevel world, BlockPos pos, Random rnd) public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource rnd)
{ {
if((!sitting_enabled) || (sitting_probability < 1e-6)) return; if((!sitting_enabled) || (sitting_probability < 1e-6)) return;
final List<Mob> entities = world.getEntitiesOfClass(Mob.class, new AABB(pos).inflate(2,1,2).expandTowards(0,1,0), e->true); final List<Mob> entities = world.getEntitiesOfClass(Mob.class, new AABB(pos).inflate(2,1,2).expandTowards(0,1,0), e->true);

View file

@ -11,6 +11,7 @@ package wile.engineersdecor.blocks;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
@ -30,7 +31,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.blocks.StandardBlocks;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random;
public class EdChimneyBlock extends StandardBlocks.Cutout public class EdChimneyBlock extends StandardBlocks.Cutout
{ {
@ -78,7 +78,7 @@ public class EdChimneyBlock extends StandardBlocks.Cutout
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void animateTick(BlockState state, Level world, BlockPos pos, Random rnd) public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource rnd)
{ {
if(state.getBlock() != this) return; if(state.getBlock() != this) return;
final int p = state.getValue(POWER); final int p = state.getValue(POWER);

File diff suppressed because it is too large Load diff

View file

@ -13,9 +13,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
@ -90,10 +87,6 @@ public class EdDropper
public DropperBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB) public DropperBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -232,7 +225,7 @@ public class EdDropper
protected LazyOptional<? extends IItemHandler> item_handler_ = Inventories.MappedItemHandler.createGenericHandler(storage_slot_range_); protected LazyOptional<? extends IItemHandler> item_handler_ = Inventories.MappedItemHandler.createGenericHandler(storage_slot_range_);
public DropperTileEntity(BlockPos pos, BlockState state) public DropperTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); reset_rtstate(); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); reset_rtstate(); }
public CompoundTag clear_getnbt() public CompoundTag clear_getnbt()
{ {
@ -312,7 +305,7 @@ public class EdDropper
@Override @Override
public Component getName() public Component getName()
{ final Block block=getBlockState().getBlock(); return new TextComponent((block!=null) ? block.getDescriptionId() : "Factory dropper"); } { return Auxiliaries.localizable(getBlockState().getBlock().getDescriptionId()); }
@Override @Override
public boolean hasCustomName() public boolean hasCustomName()
@ -738,7 +731,7 @@ public class EdDropper
public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt) public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt)
{ {
if(!(inventory_ instanceof Inventories.StorageInventory)) return; if(!(inventory_ instanceof Inventories.StorageInventory)) return;
if(!(((Inventories.StorageInventory)inventory_).getTileEntity() instanceof final DropperTileEntity te)) return; if(!(((Inventories.StorageInventory)inventory_).getBlockEntity() instanceof final DropperTileEntity te)) return;
if(nbt.contains("action")) { if(nbt.contains("action")) {
boolean changed = false; boolean changed = false;
final int slotId = nbt.contains("slot") ? nbt.getInt("slot") : -1; final int slotId = nbt.contains("slot") ? nbt.getInt("slot") : -1;
@ -786,18 +779,18 @@ public class EdDropper
{ {
super.init(); super.init();
{ {
final Block block = ModContent.getBlock(getMenu().getType().getRegistryName().getPath().replaceAll("^ct_","")); final Block block = ModContent.getBlock(Auxiliaries.getResourceLocation(getMenu().getType()).getPath().replaceAll("^ct_",""));
final String prefix = block.getDescriptionId() + ".tooltips."; final String prefix = block.getDescriptionId() + ".tooltips.";
final int x0 = getGuiLeft(), y0 = getGuiTop(); final int x0 = getGuiLeft(), y0 = getGuiTop();
tooltip_.init( tooltip_.init(
new TipRange(x0+130, y0+10, 12, 25, new TranslatableComponent(prefix + "velocity")), new TipRange(x0+130, y0+10, 12, 25, Component.translatable(prefix + "velocity")),
new TipRange(x0+145, y0+10, 25, 25, new TranslatableComponent(prefix + "direction")), new TipRange(x0+145, y0+10, 25, 25, Component.translatable(prefix + "direction")),
new TipRange(x0+129, y0+40, 44, 10, new TranslatableComponent(prefix + "dropcount")), new TipRange(x0+129, y0+40, 44, 10, Component.translatable(prefix + "dropcount")),
new TipRange(x0+129, y0+50, 44, 10, new TranslatableComponent(prefix + "period")), new TipRange(x0+129, y0+50, 44, 10, Component.translatable(prefix + "period")),
new TipRange(x0+114, y0+51, 9, 9, new TranslatableComponent(prefix + "rssignal")), new TipRange(x0+114, y0+51, 9, 9, Component.translatable(prefix + "rssignal")),
new TipRange(x0+162, y0+66, 7, 9, new TranslatableComponent(prefix + "triggermode")), new TipRange(x0+162, y0+66, 7, 9, Component.translatable(prefix + "triggermode")),
new TipRange(x0+132, y0+66, 9, 9, new TranslatableComponent(prefix + "filtergate")), new TipRange(x0+132, y0+66, 9, 9, Component.translatable(prefix + "filtergate")),
new TipRange(x0+148, y0+66, 9, 9, new TranslatableComponent(prefix + "externgate")) new TipRange(x0+148, y0+66, 9, 9, Component.translatable(prefix + "externgate"))
); );
} }
} }

View file

@ -13,9 +13,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.*; import net.minecraft.world.*;
import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.entity.ExperienceOrb;
@ -60,12 +57,9 @@ import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.blocks.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Crafting; import wile.engineersdecor.libmc.detail.*;
import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.Inventories.MappedItemHandler; import wile.engineersdecor.libmc.detail.Inventories.MappedItemHandler;
import wile.engineersdecor.libmc.detail.Inventories.StorageInventory; import wile.engineersdecor.libmc.detail.Inventories.StorageInventory;
import wile.engineersdecor.libmc.detail.Networking;
import wile.engineersdecor.libmc.detail.RfEnergy;
import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange; import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange;
import wile.engineersdecor.libmc.ui.Guis; import wile.engineersdecor.libmc.ui.Guis;
@ -91,10 +85,6 @@ public class EdElectricalFurnace
public ElectricalFurnaceBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABBs) public ElectricalFurnaceBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABBs)
{ super(config, builder, unrotatedAABBs); } { super(config, builder, unrotatedAABBs); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -251,7 +241,7 @@ public class EdElectricalFurnace
public ElectricalFurnaceTileEntity(BlockPos pos, BlockState state) public ElectricalFurnaceTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
inventory_ = new StorageInventory(this, NUM_OF_SLOTS) { inventory_ = new StorageInventory(this, NUM_OF_SLOTS) {
@Override @Override
public void setItem(int index, ItemStack stack) public void setItem(int index, ItemStack stack)
@ -353,7 +343,7 @@ public class EdElectricalFurnace
@Override @Override
public Component getName() public Component getName()
{ final Block block=getBlockState().getBlock(); return new TextComponent((block!=null) ? block.getDescriptionId() : "Small electrical furnace"); } { return Auxiliaries.localizable(getBlockState().getBlock().getDescriptionId()); }
@Override @Override
public Component getDisplayName() public Component getDisplayName()
@ -727,7 +717,7 @@ public class EdElectricalFurnace
{ {
stack.onCraftedBy(player_.level, player_, removeCount); stack.onCraftedBy(player_.level, player_, removeCount);
if((!player_.level.isClientSide()) && (inventory_ instanceof StorageInventory) && if((!player_.level.isClientSide()) && (inventory_ instanceof StorageInventory) &&
(((StorageInventory)inventory_).getTileEntity()) instanceof final ElectricalFurnaceTileEntity te) { (((StorageInventory)inventory_).getBlockEntity()) instanceof final ElectricalFurnaceTileEntity te) {
int xp = te.consumeSmeltingExperience(stack); int xp = te.consumeSmeltingExperience(stack);
while(xp > 0) { while(xp > 0) {
int k = ExperienceOrb.getExperienceValue(xp); int k = ExperienceOrb.getExperienceValue(xp);
@ -848,7 +838,7 @@ public class EdElectricalFurnace
public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt) public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt)
{ {
if(!(inventory_ instanceof StorageInventory)) return; if(!(inventory_ instanceof StorageInventory)) return;
if(!((((StorageInventory)inventory_).getTileEntity()) instanceof final ElectricalFurnaceTileEntity te)) return; if(!((((StorageInventory)inventory_).getBlockEntity()) instanceof final ElectricalFurnaceTileEntity te)) return;
if(nbt.contains("speed")) te.speed_ = Mth.clamp(nbt.getInt("speed"), 0, ElectricalFurnaceTileEntity.MAX_SPEED_SETTING); if(nbt.contains("speed")) te.speed_ = Mth.clamp(nbt.getInt("speed"), 0, ElectricalFurnaceTileEntity.MAX_SPEED_SETTING);
te.setChanged(); te.setChanged();
} }
@ -868,17 +858,17 @@ public class EdElectricalFurnace
public void init() public void init()
{ {
super.init(); super.init();
final Block block = ModContent.getBlock(getMenu().getType().getRegistryName().getPath().replaceAll("^ct_","")); final Block block = ModContent.getBlock(Auxiliaries.getResourceLocation(getMenu().getType()).getPath().replaceAll("^ct_",""));
final String prefix = block.getDescriptionId() + ".tooltips."; final String prefix = block.getDescriptionId() + ".tooltips.";
final int x0 = getGuiLeft(), y0 = getGuiTop(); final int x0 = getGuiLeft(), y0 = getGuiTop();
final Slot aux = menu.getSlot(ElectricalFurnaceTileEntity.SMELTING_AUX_SLOT_NO); final Slot aux = menu.getSlot(ElectricalFurnaceTileEntity.SMELTING_AUX_SLOT_NO);
tooltip_.init( tooltip_.init(
new TipRange(x0+135, y0+50, 25, 25, new TranslatableComponent(prefix + "speed")), new TipRange(x0+135, y0+50, 25, 25, Component.translatable(prefix + "speed")),
new TipRange(x0+aux.x, y0+aux.y, 16, 16, new TranslatableComponent(prefix + "auxslot")), new TipRange(x0+aux.x, y0+aux.y, 16, 16, Component.translatable(prefix + "auxslot")),
new TipRange(x0+80, y0+55, 50, 14, ()->{ new TipRange(x0+80, y0+55, 50, 14, ()->{
final int soc = getMenu().field(1) * 100 / Math.max(getMenu().field(5), 1); final int soc = getMenu().field(1) * 100 / Math.max(getMenu().field(5), 1);
final int consumption = getMenu().field(7); final int consumption = getMenu().field(7);
return new TranslatableComponent(prefix + "capacitors", soc, consumption); return Component.translatable(prefix + "capacitors", soc, consumption);
}) })
); );
} }

View file

@ -13,8 +13,6 @@ import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag; import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
@ -88,7 +86,7 @@ public class EdFluidBarrel
// Block // Block
//-------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------
public static class FluidBarrelBlock extends StandardBlocks.DirectedWaterLoggable implements StandardEntityBlocks.IStandardEntityBlock<FluidBarrelTileEntity>, StandardBlocks.IBlockItemFactory public static class FluidBarrelBlock extends StandardBlocks.DirectedWaterLoggable implements StandardEntityBlocks.IStandardEntityBlock<FluidBarrelTileEntity>
{ {
public static final int FILL_LEVEL_MAX = 4; public static final int FILL_LEVEL_MAX = 4;
public static final IntegerProperty FILL_LEVEL = IntegerProperty.create("level", 0, FILL_LEVEL_MAX); public static final IntegerProperty FILL_LEVEL = IntegerProperty.create("level", 0, FILL_LEVEL_MAX);
@ -99,18 +97,10 @@ public class EdFluidBarrel
registerDefaultState(super.defaultBlockState().setValue(FACING, Direction.UP).setValue(FILL_LEVEL, 0)); registerDefaultState(super.defaultBlockState().setValue(FACING, Direction.UP).setValue(FILL_LEVEL, 0));
} }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@Override
public BlockItem getBlockItem(Block block, Item.Properties builder)
{ return new FluidBarrelItem(block, builder); }
@Override @Override
public boolean hasDynamicDropList() public boolean hasDynamicDropList()
{ return true; } { return true; }
@ -141,7 +131,7 @@ public class EdFluidBarrel
} }
FluidStack fs = FluidBarrelItem.getFluid(stack); FluidStack fs = FluidBarrelItem.getFluid(stack);
if(!fs.isEmpty()) { if(!fs.isEmpty()) {
tooltip.add(Auxiliaries.localizable(getDescriptionId()+".status.tip", Integer.toString(fs.getAmount()), Integer.toString(capacity_), new TranslatableComponent(fs.getTranslationKey()))); tooltip.add(Auxiliaries.localizable(getDescriptionId()+".status.tip", Integer.toString(fs.getAmount()), Integer.toString(capacity_), Component.translatable(fs.getTranslationKey())));
} else { } else {
tooltip.add(Auxiliaries.localizable(getDescriptionId()+".status.tip.empty", "0", Integer.toString(capacity_))); tooltip.add(Auxiliaries.localizable(getDescriptionId()+".status.tip.empty", "0", Integer.toString(capacity_)));
} }
@ -225,7 +215,7 @@ public class EdFluidBarrel
private final LazyOptional<IFluidHandler> fluid_handler_ = tank_.createFluidHandler(); private final LazyOptional<IFluidHandler> fluid_handler_ = tank_.createFluidHandler();
public FluidBarrelTileEntity(BlockPos pos, BlockState state) public FluidBarrelTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); }
public void readnbt(CompoundTag nbt) public void readnbt(CompoundTag nbt)
{ tank_.load(nbt); } { tank_.load(nbt); }
@ -251,7 +241,7 @@ public class EdFluidBarrel
{ {
int vol = tank_.getFluidAmount(); int vol = tank_.getFluidAmount();
int cap = tank_.getCapacity(); int cap = tank_.getCapacity();
String name = (new TranslatableComponent(tank_.getFluid().getTranslationKey())).getString(); String name = (Component.translatable(tank_.getFluid().getTranslationKey())).getString();
if((vol>0) && (cap>0)) { if((vol>0) && (cap>0)) {
Overlay.show(player, Auxiliaries.localizable("block.engineersdecor.fluid_barrel.status", Integer.toString(vol), Integer.toString(cap), name)); Overlay.show(player, Auxiliaries.localizable("block.engineersdecor.fluid_barrel.status", Integer.toString(vol), Integer.toString(cap), name));
} else { } else {

View file

@ -14,7 +14,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i; import net.minecraft.core.Vec3i;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
@ -77,10 +76,6 @@ public class EdFluidFunnel
public FluidFunnelBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB) public FluidFunnelBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -195,7 +190,7 @@ public class EdFluidFunnel
private final LazyOptional<IFluidHandler> fluid_handler_ = tank_.createOutputFluidHandler(); private final LazyOptional<IFluidHandler> fluid_handler_ = tank_.createOutputFluidHandler();
public FluidFunnelTileEntity(BlockPos pos, BlockState state) public FluidFunnelTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); }
public void readnbt(CompoundTag nbt) public void readnbt(CompoundTag nbt)
{ {

View file

@ -12,10 +12,10 @@ package wile.engineersdecor.blocks;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
@ -57,7 +57,6 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random;
public class EdFreezer public class EdFreezer
{ {
@ -76,10 +75,6 @@ public class EdFreezer
public FreezerBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB) public FreezerBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -162,7 +157,7 @@ public class EdFreezer
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void animateTick(BlockState state, Level world, BlockPos pos, Random rnd) public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource rnd)
{} {}
@Nullable @Nullable
@ -207,7 +202,7 @@ public class EdFreezer
} }
public FreezerTileEntity(BlockPos pos, BlockState state) public FreezerTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); }
public int progress() public int progress()
{ return progress_; } { return progress_; }

View file

@ -14,11 +14,11 @@ import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.*; import net.minecraft.world.*;
import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.entity.ExperienceOrb;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
@ -88,10 +88,6 @@ public class EdFurnace
public FurnaceBlock(long config, BlockBehaviour.Properties properties, final AABB[] unrotatedAABB) public FurnaceBlock(long config, BlockBehaviour.Properties properties, final AABB[] unrotatedAABB)
{ super(config, properties, unrotatedAABB); registerDefaultState(super.defaultBlockState().setValue(LIT, false)); } { super(config, properties, unrotatedAABB); registerDefaultState(super.defaultBlockState().setValue(LIT, false)); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -174,7 +170,7 @@ public class EdFurnace
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void animateTick(BlockState state, Level world, BlockPos pos, Random rnd) public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource rnd)
{ {
if((state.getBlock()!=this) || (!state.getValue(LIT))) return; if((state.getBlock()!=this) || (!state.getValue(LIT))) return;
final double rv = rnd.nextDouble(); final double rv = rnd.nextDouble();
@ -250,8 +246,8 @@ public class EdFurnace
} }
} }
} }
ModConfig.log("Config lab furnace speed:" + (proc_speed_*100) + "%, efficiency:" + (proc_fuel_efficiency_*100) + "%, boost: " + (boost_energy_consumption/TICK_INTERVAL) + "rf/t."); Auxiliaries.logInfo("Config lab furnace speed:" + (proc_speed_*100) + "%, efficiency:" + (proc_fuel_efficiency_*100) + "%, boost: " + (boost_energy_consumption/TICK_INTERVAL) + "rf/t.");
ModConfig.log("Config lab furnace accepted heaters: " + accepted_heaters_.stream().map(item->item.getRegistryName().toString()).collect(Collectors.joining(",")) + "."); Auxiliaries.logInfo("Config lab furnace accepted heaters: " + accepted_heaters_.stream().map(item->Auxiliaries.getResourceLocation(item).toString()).collect(Collectors.joining(",")) + ".");
} }
// DecorFurnaceTileEntity ----------------------------------------------------------------------------- // DecorFurnaceTileEntity -----------------------------------------------------------------------------
@ -276,7 +272,7 @@ public class EdFurnace
public FurnaceTileEntity(BlockPos pos, BlockState state) public FurnaceTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
inventory_ = new StorageInventory(this, NUM_OF_SLOTS) { inventory_ = new StorageInventory(this, NUM_OF_SLOTS) {
@Override @Override
public void setItem(int index, ItemStack stack) public void setItem(int index, ItemStack stack)
@ -404,7 +400,7 @@ public class EdFurnace
@Override @Override
public Component getName() public Component getName()
{ final Block block=getBlockState().getBlock(); return new TextComponent((block!=null) ? block.getDescriptionId() : "Lab furnace"); } { return Auxiliaries.localizable(getBlockState().getBlock().getDescriptionId()); }
@Override @Override
public boolean hasCustomName() public boolean hasCustomName()
@ -709,7 +705,7 @@ public class EdFurnace
{ {
stack.onCraftedBy(player_.level, player_, removeCount); stack.onCraftedBy(player_.level, player_, removeCount);
if((!player_.level.isClientSide()) && (inventory_ instanceof StorageInventory) && if((!player_.level.isClientSide()) && (inventory_ instanceof StorageInventory) &&
((((StorageInventory)inventory_).getTileEntity()) instanceof final FurnaceTileEntity te) ((((StorageInventory)inventory_).getBlockEntity()) instanceof final FurnaceTileEntity te)
) { ) {
int xp = te.consumeSmeltingExperience(stack); int xp = te.consumeSmeltingExperience(stack);
while(xp > 0) { while(xp > 0) {

View file

@ -13,9 +13,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.*; import net.minecraft.world.*;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -70,10 +67,6 @@ public class EdHopper
public HopperBlock(long config, BlockBehaviour.Properties builder, final Supplier<ArrayList<VoxelShape>> shape_supplier) public HopperBlock(long config, BlockBehaviour.Properties builder, final Supplier<ArrayList<VoxelShape>> shape_supplier)
{ super(config, builder, shape_supplier); } { super(config, builder, shape_supplier); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -215,7 +208,7 @@ public class EdHopper
public HopperTileEntity(BlockPos pos, BlockState state) public HopperTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
main_inventory_.setSlotChangeAction((slot,stack)->tick_timer_ = Math.min(tick_timer_, 8)); main_inventory_.setSlotChangeAction((slot,stack)->tick_timer_ = Math.min(tick_timer_, 8));
} }
@ -290,7 +283,7 @@ public class EdHopper
@Override @Override
public Component getName() public Component getName()
{ final Block block=getBlockState().getBlock(); return new TextComponent((block!=null) ? block.getDescriptionId() : "Factory Hopper"); } { return Auxiliaries.localizable(getBlockState().getBlock().getDescriptionId()); }
@Override @Override
public boolean hasCustomName() public boolean hasCustomName()
@ -717,7 +710,7 @@ public class EdHopper
public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt) public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt)
{ {
if(!(inventory_ instanceof Inventories.StorageInventory)) return; if(!(inventory_ instanceof Inventories.StorageInventory)) return;
if(!((((((Inventories.StorageInventory)inventory_).getTileEntity())) instanceof final EdHopper.HopperTileEntity te))) return; if(!((((((Inventories.StorageInventory)inventory_).getBlockEntity())) instanceof final EdHopper.HopperTileEntity te))) return;
if(nbt.contains("xsize")) te.transfer_count_ = Mth.clamp(nbt.getInt("xsize"), 1, HopperTileEntity.MAX_TRANSFER_COUNT); if(nbt.contains("xsize")) te.transfer_count_ = Mth.clamp(nbt.getInt("xsize"), 1, HopperTileEntity.MAX_TRANSFER_COUNT);
if(nbt.contains("period")) te.transfer_period_ = Mth.clamp(nbt.getInt("period"), 0, 100); if(nbt.contains("period")) te.transfer_period_ = Mth.clamp(nbt.getInt("period"), 0, 100);
if(nbt.contains("range")) te.collection_range_ = Mth.clamp(nbt.getInt("range"), 0, HopperTileEntity.MAX_COLLECTION_RANGE); if(nbt.contains("range")) te.collection_range_ = Mth.clamp(nbt.getInt("range"), 0, HopperTileEntity.MAX_COLLECTION_RANGE);
@ -760,17 +753,17 @@ public class EdHopper
{ {
super.init(); super.init();
{ {
final Block block = ModContent.getBlock(getMenu().getType().getRegistryName().getPath().replaceAll("^ct_","")); final Block block = ModContent.getBlock( Auxiliaries.getResourceLocation(getMenu().getType()).getPath().replaceAll("^ct_",""));
final String prefix = block.getDescriptionId() + ".tooltips."; final String prefix = block.getDescriptionId() + ".tooltips.";
final int x0 = getGuiLeft(), y0 = getGuiTop(); final int x0 = getGuiLeft(), y0 = getGuiTop();
tooltip_.init( tooltip_.init(
new TooltipDisplay.TipRange(x0+148, y0+22, 3, 3, new TranslatableComponent(prefix + "delayindicator")), new TooltipDisplay.TipRange(x0+148, y0+22, 3, 3, Component.translatable(prefix + "delayindicator")),
new TooltipDisplay.TipRange(x0+130, y0+ 9, 40, 10, new TranslatableComponent(prefix + "range")), new TooltipDisplay.TipRange(x0+130, y0+ 9, 40, 10, Component.translatable(prefix + "range")),
new TooltipDisplay.TipRange(x0+130, y0+22, 40, 10, new TranslatableComponent(prefix + "period")), new TooltipDisplay.TipRange(x0+130, y0+22, 40, 10, Component.translatable(prefix + "period")),
new TooltipDisplay.TipRange(x0+130, y0+35, 40, 10, new TranslatableComponent(prefix + "count")), new TooltipDisplay.TipRange(x0+130, y0+35, 40, 10, Component.translatable(prefix + "count")),
new TooltipDisplay.TipRange(x0+133, y0+49, 9, 9, new TranslatableComponent(prefix + "rssignal")), new TooltipDisplay.TipRange(x0+133, y0+49, 9, 9, Component.translatable(prefix + "rssignal")),
new TooltipDisplay.TipRange(x0+145, y0+49, 9, 9, new TranslatableComponent(prefix + "inversion")), new TooltipDisplay.TipRange(x0+145, y0+49, 9, 9, Component.translatable(prefix + "inversion")),
new TooltipDisplay.TipRange(x0+159, y0+49, 9, 9, new TranslatableComponent(prefix + "triggermode")) new TooltipDisplay.TipRange(x0+159, y0+49, 9, 9, Component.translatable(prefix + "triggermode"))
); );
} }
} }

View file

@ -59,7 +59,7 @@ public class EdHorizontalSupportBlock extends StandardBlocks.WaterLoggable
public EdHorizontalSupportBlock(long config, BlockBehaviour.Properties builder, final AABB mainBeamAABB, final AABB eastBeamAABB, final AABB thinDownBeamAABB, final AABB thickDownBeamAABB) public EdHorizontalSupportBlock(long config, BlockBehaviour.Properties builder, final AABB mainBeamAABB, final AABB eastBeamAABB, final AABB thinDownBeamAABB, final AABB thickDownBeamAABB)
{ {
super(config|DecorBlock.CFG_HORIZIONTAL, builder); super(config|StandardBlocks.CFG_HORIZIONTAL, builder);
Map<BlockState, VoxelShape> aabbs = new HashMap<>(); Map<BlockState, VoxelShape> aabbs = new HashMap<>();
for(boolean eastwest:EASTWEST.getPossibleValues()) { for(boolean eastwest:EASTWEST.getPossibleValues()) {
for(boolean leftbeam:LEFTBEAM.getPossibleValues()) { for(boolean leftbeam:LEFTBEAM.getPossibleValues()) {

View file

@ -1,606 +0,0 @@
/*
* @file EdLabeledCrate.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2020 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Storage crate with a content hint.
*/
package wile.engineersdecor.blocks;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.Tag;
import net.minecraft.network.Connection;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Tuple;
import net.minecraft.world.*;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.*;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModConfig;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.blocks.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.Networking;
import wile.engineersdecor.libmc.detail.RsSignals;
import wile.engineersdecor.libmc.ui.Guis;
import javax.annotation.Nullable;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class EdLabeledCrate
{
private static boolean with_gui_mouse_handling = true;
private static final HashSet<Item> unstorable_containers = new HashSet<>();
public static void on_config(boolean without_gui_mouse_handling)
{
with_gui_mouse_handling = !without_gui_mouse_handling;
// Currently no config, using a tag for this small feature may be uselessly stressing the registry.
unstorable_containers.clear();
unstorable_containers.add(ModContent.getBlock("labeled_crate").asItem());
unstorable_containers.add(Items.SHULKER_BOX);
ModConfig.log("Config crate: unstorable:" + unstorable_containers.stream().map(e->e.getRegistryName().toString()).collect(Collectors.joining(",")));
}
//--------------------------------------------------------------------------------------------------------------------
// Block
//--------------------------------------------------------------------------------------------------------------------
public static class LabeledCrateBlock extends StandardBlocks.Horizontal implements StandardEntityBlocks.IStandardEntityBlock<LabeledCrateTileEntity>
{
public LabeledCrateBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB)
{ super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override
public boolean isBlockEntityTicking(Level world, BlockState state)
{ return false; }
@Override
@SuppressWarnings("deprecation")
public boolean hasAnalogOutputSignal(BlockState state)
{ return true; }
@Override
@SuppressWarnings("deprecation")
public int getAnalogOutputSignal(BlockState blockState, Level world, BlockPos pos)
{ return (!(world.getBlockEntity(pos) instanceof LabeledCrateTileEntity te)) ? 0 : RsSignals.fromContainer(te.main_inventory_); }
@Override
public boolean shouldCheckWeakPower(BlockState state, LevelReader world, BlockPos pos, Direction side)
{ return false; }
@Override
public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack)
{
if((world.isClientSide) || (!stack.hasTag())) return;
final BlockEntity te = world.getBlockEntity(pos);
if(!(te instanceof LabeledCrateTileEntity)) return;
final CompoundTag nbt = stack.getTag();
if(nbt.contains("tedata")) {
CompoundTag te_nbt = nbt.getCompound("tedata");
if(!te_nbt.isEmpty()) ((LabeledCrateTileEntity)te).readnbt(te_nbt);
}
((LabeledCrateTileEntity)te).setCustomName(Auxiliaries.getItemLabel(stack));
te.setChanged();
}
@Override
public boolean hasDynamicDropList()
{ return true; }
@Override
public List<ItemStack> dropList(BlockState state, Level world, final BlockEntity te, boolean explosion)
{
final List<ItemStack> stacks = new ArrayList<>();
if(world.isClientSide()) return stacks;
if(!(te instanceof LabeledCrateTileEntity)) return stacks;
if(!explosion) {
ItemStack stack = new ItemStack(this, 1);
CompoundTag te_nbt = ((LabeledCrateTileEntity)te).getnbt();
CompoundTag nbt = new CompoundTag();
if(!te_nbt.isEmpty()) nbt.put("tedata", te_nbt);
if(!nbt.isEmpty()) stack.setTag(nbt);
Auxiliaries.setItemLabel(stack, ((LabeledCrateTileEntity)te).getCustomName());
stacks.add(stack);
} else {
for(ItemStack stack: ((LabeledCrateTileEntity)te).main_inventory_) stacks.add(stack);
((LabeledCrateTileEntity)te).getnbt();
}
return stacks;
}
@Override
@SuppressWarnings("deprecation")
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult rayTraceResult)
{ return useOpenGui(state, world, pos, player); }
@Override
public PushReaction getPistonPushReaction(BlockState state)
{ return PushReaction.BLOCK; }
@Override
@OnlyIn(Dist.CLIENT)
public void appendHoverText(final ItemStack stack, @Nullable BlockGetter world, List<Component> tooltip, TooltipFlag flag)
{
if(!Auxiliaries.Tooltip.extendedTipCondition() || Auxiliaries.Tooltip.helpCondition()) {
super.appendHoverText(stack, world, tooltip, flag);
return;
}
ItemStack frameStack = ItemStack.EMPTY;
int num_used_slots = 0, total_items = 0;
String stats = "";
if(stack.hasTag() && stack.getTag().contains("tedata")) {
final CompoundTag nbt = stack.getTag().getCompound("tedata");
if(nbt.contains("Items")) {
final NonNullList<ItemStack> all_items = Inventories.readNbtStacks(nbt, LabeledCrateTileEntity.NUM_OF_SLOTS);
frameStack = all_items.get(LabeledCrateTileEntity.ITEMFRAME_SLOTNO);
all_items.set(LabeledCrateTileEntity.ITEMFRAME_SLOTNO, ItemStack.EMPTY);
Map<Item,Integer> item_map = new HashMap<>();
for(ItemStack e:all_items) { // ok, the whole stream map collector seems to be actually slower than a simple loop.
if(!e.isEmpty()) {
item_map.put(e.getItem(), item_map.getOrDefault(e.getItem(), 0) + e.getCount());
++num_used_slots;
total_items += e.getCount();
}
}
List<Tuple<String,Integer>> itmes = new ArrayList<>();
for(Map.Entry<Item,Integer> e:item_map.entrySet()) itmes.add(new Tuple<>(e.getKey().getDescriptionId(), e.getValue()));
itmes.sort((a,b)->b.getB()-a.getB());
boolean dotdotdot = false;
if(itmes.size() > 8) { itmes.subList(8, itmes.size()).clear(); dotdotdot = true; }
stats = itmes.stream().map(e->Auxiliaries.localize(e.getA())).collect(Collectors.joining(", "));
if(dotdotdot) stats += "...";
}
}
int num_free_slots = LabeledCrateTileEntity.ITEMFRAME_SLOTNO - num_used_slots;
String[] lines = Auxiliaries.localize(getDescriptionId()+".tip",
(frameStack.isEmpty() ? (new TextComponent("-/-")) : (new TranslatableComponent(frameStack.getDescriptionId()))),
num_used_slots,
num_free_slots,
total_items,
stats).split("\n");
for(String line:lines) {
tooltip.add(new TextComponent(line.trim()));
}
}
}
//--------------------------------------------------------------------------------------------------------------------
// Tile entity
//--------------------------------------------------------------------------------------------------------------------
public static class LabeledCrateTileEntity extends StandardEntityBlocks.StandardBlockEntity implements MenuProvider, Nameable, Networking.IPacketTileNotifyReceiver
{
public static final int NUM_OF_FIELDS = 1;
public static final int NUM_OF_SLOTS = 55;
public static final int NUM_OF_STORAGE_SLOTS = 54;
public static final int NUM_OF_STORAGE_ROWS = 6;
public static final int ITEMFRAME_SLOTNO = NUM_OF_STORAGE_SLOTS;
private final Inventories.StorageInventory main_inventory_ = new Inventories.StorageInventory(this, NUM_OF_SLOTS, 1);
private final Inventories.InventoryRange storage_range_ = new Inventories.InventoryRange(main_inventory_, 0, NUM_OF_STORAGE_SLOTS, NUM_OF_STORAGE_ROWS);
private final LazyOptional<IItemHandler> item_handler_;
private @Nullable Component custom_name_;
public LabeledCrateTileEntity(BlockPos pos, BlockState state)
{
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state);
main_inventory_.setCloseAction((player)->Networking.PacketTileNotifyServerToClient.sendToPlayers(this, writenbt(new CompoundTag())));
main_inventory_.setSlotChangeAction((index,stack)->{
if(index==ITEMFRAME_SLOTNO) Networking.PacketTileNotifyServerToClient.sendToPlayers(this, writenbt(new CompoundTag()));
});
item_handler_ = Inventories.MappedItemHandler.createGenericHandler(storage_range_,
(slot,stack)->(slot!=ITEMFRAME_SLOTNO),
(slot,stack)->(slot!=ITEMFRAME_SLOTNO),
IntStream.range(0, NUM_OF_STORAGE_SLOTS).boxed().collect(Collectors.toList())
);
}
public CompoundTag getnbt()
{ return writenbt(new CompoundTag()); }
public CompoundTag readnbt(CompoundTag nbt)
{
if(nbt.contains("name", Tag.TAG_STRING)) custom_name_ = Auxiliaries.unserializeTextComponent(nbt.getString("name"));
main_inventory_.load(nbt);
return nbt;
}
protected CompoundTag writenbt(CompoundTag nbt)
{
if(custom_name_ != null) nbt.putString("name", Auxiliaries.serializeTextComponent(custom_name_));
if(!main_inventory_.isEmpty()) main_inventory_.save(nbt);
return nbt;
}
public ItemStack getItemFrameStack()
{ return main_inventory_.getItem(ITEMFRAME_SLOTNO); }
protected static boolean inacceptable(ItemStack stack)
{ return (stack.hasTag() && (!stack.getTag().isEmpty()) && (unstorable_containers.contains(stack.getItem()))); }
// IPacketTileNotifyReceiver ---------------------------------------------------------------
@Override
public void onServerPacketReceived(CompoundTag nbt)
{ readnbt(nbt); }
// Capability export ----------------------------------------------------------------------------
@Override
public <T> LazyOptional<T> getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, @Nullable Direction facing)
{
if(capability==CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return item_handler_.cast();
return super.getCapability(capability, facing);
}
// BlockEntity ------------------------------------------------------------------------------
@Override
public void load(CompoundTag nbt)
{ super.load(nbt); readnbt(nbt); }
@Override
protected void saveAdditional(CompoundTag nbt)
{ super.saveAdditional(nbt); writenbt(nbt); }
@Override
public void setRemoved()
{
super.setRemoved();
item_handler_.invalidate();
}
@Override
public CompoundTag getUpdateTag()
{ CompoundTag nbt = super.getUpdateTag(); writenbt(nbt); return nbt; }
@Override
@Nullable
public ClientboundBlockEntityDataPacket getUpdatePacket()
{ return ClientboundBlockEntityDataPacket.create(this); }
@Override
public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) // on client
{ super.onDataPacket(net, pkt); if(pkt.getTag() != null) { readnbt(pkt.getTag()); } }
@Override
public void handleUpdateTag(CompoundTag tag) // on client
{ load(tag); }
@OnlyIn(Dist.CLIENT)
public double getViewDistance()
{ return 1600; }
// INameable ---------------------------------------------------------------------------
@Override
public Component getName()
{
if(custom_name_ != null) return custom_name_;
final Block block = getBlockState().getBlock();
if(block!=null) return new TranslatableComponent(block.getDescriptionId());
return new TextComponent("Labeled Crate");
}
@Override
@Nullable
public Component getCustomName()
{ return custom_name_; }
@Override
public boolean hasCustomName()
{ return (custom_name_ != null); }
public void setCustomName(Component name)
{ custom_name_ = name; }
// IContainerProvider ----------------------------------------------------------------------
@Override
public Component getDisplayName()
{ return Nameable.super.getDisplayName(); }
@Override
public AbstractContainerMenu createMenu(int id, Inventory inventory, Player player)
{ return new LabeledCrateContainer(id, inventory, main_inventory_, ContainerLevelAccess.create(level, worldPosition), fields); }
// Fields -----------------------------------------------------------------------------------------------
protected final ContainerData fields = new ContainerData()
{
@Override
public int getCount()
{ return LabeledCrateTileEntity.NUM_OF_FIELDS; }
@Override
public int get(int id)
{
return switch (id) {
default -> 0;
};
}
@Override
public void set(int id, int value)
{
switch(id) {
default: break;
}
}
};
}
//--------------------------------------------------------------------------------------------------------------------
// Container
//--------------------------------------------------------------------------------------------------------------------
public static class LabeledCrateContainer extends AbstractContainerMenu implements Networking.INetworkSynchronisableContainer
{
protected static final String QUICK_MOVE_ALL = "quick-move-all";
protected static final String INCREASE_STACK = "increase-stack";
protected static final String DECREASE_STACK = "decrease-stack";
//------------------------------------------------------------------------------------------------------------------
protected static class StorageSlot extends Slot
{
StorageSlot(Container inventory, int index, int x, int y)
{ super(inventory, index, x, y); }
@Override
public int getMaxStackSize()
{ return 64; }
@Override
public boolean mayPlace(ItemStack stack)
{ return !LabeledCrateTileEntity.inacceptable(stack); }
}
//------------------------------------------------------------------------------------------------------------------
private static final int PLAYER_INV_START_SLOTNO = LabeledCrateTileEntity.NUM_OF_SLOTS;
private static final int NUM_OF_CONTAINER_SLOTS = LabeledCrateTileEntity.NUM_OF_SLOTS + 36;
protected static final int STORAGE_SLOT_BEGIN = 0;
protected static final int STORAGE_SLOT_END = LabeledCrateTileEntity.ITEMFRAME_SLOTNO;
protected static final int PLAYER_SLOT_BEGIN = LabeledCrateTileEntity.NUM_OF_SLOTS;
protected static final int PLAYER_SLOT_END = LabeledCrateTileEntity.NUM_OF_SLOTS+36;
protected final Player player_;
protected final Container inventory_;
protected final ContainerLevelAccess wpc_;
private final ContainerData fields_;
private final Inventories.InventoryRange player_inventory_range_;
private final Inventories.InventoryRange block_storage_range_;
private final Inventories.InventoryRange frame_slot_range_;
//------------------------------------------------------------------------------------------------------------------
public int field(int index) { return fields_.get(index); }
public Player player() { return player_ ; }
public Container inventory() { return inventory_ ; }
public Level world() { return player_.level; }
//------------------------------------------------------------------------------------------------------------------
public LabeledCrateContainer(int cid, Inventory player_inventory)
{ this(cid, player_inventory, new SimpleContainer(LabeledCrateTileEntity.NUM_OF_SLOTS), ContainerLevelAccess.NULL, new SimpleContainerData(LabeledCrateTileEntity.NUM_OF_FIELDS)); }
private LabeledCrateContainer(int cid, Inventory player_inventory, Container block_inventory, ContainerLevelAccess wpc, ContainerData fields)
{
super(ModContent.getMenuType("labeled_crate"), cid); // @todo: class mapping
player_ = player_inventory.player;
inventory_ = block_inventory;
wpc_ = wpc;
wpc_.execute((w,p)->inventory_.startOpen(player_));
fields_ = fields;
block_storage_range_ = new Inventories.InventoryRange(inventory_, 0, LabeledCrateTileEntity.ITEMFRAME_SLOTNO);
player_inventory_range_ = new Inventories.InventoryRange(player_inventory, 0, 36);
frame_slot_range_ = new Inventories.InventoryRange(inventory_, 54, 1);
int i=-1;
// storage slots (stacks 0 to 53)
for(int y=0; y<6; ++y) {
for(int x=0; x<9; ++x) {
int xpos = 28+x*18, ypos = 10+y*18;
addSlot(new StorageSlot(inventory_, ++i, xpos, ypos));
}
}
// picture frame slot (54)
addSlot(new Slot(frame_slot_range_, 0, 191, 100) { @Override public int getMaxStackSize(){return 1;} });
// player slots
for(int x=0; x<9; ++x) {
addSlot(new Slot(player_inventory, x, 28+x*18, 183)); // player slots: 0..8
}
for(int y=0; y<3; ++y) {
for(int x=0; x<9; ++x) {
addSlot(new Slot(player_inventory, x+y*9+9, 28+x*18, 125+y*18)); // player slots: 9..35
}
}
}
@Override
public boolean stillValid(Player player)
{ return inventory_.stillValid(player); }
@Override
public boolean canTakeItemForPickAll(ItemStack stack, Slot slot)
{ return (slot.getMaxStackSize() > 1); }
@Override
public void removed(Player player)
{
super.removed(player);
inventory_.stopOpen(player);
}
@Override
public ItemStack quickMoveStack(Player player, int index)
{
Slot slot = getSlot(index);
if((slot==null) || (!slot.hasItem())) return ItemStack.EMPTY;
ItemStack slot_stack = slot.getItem();
ItemStack transferred = slot_stack.copy();
if((index>=0) && (index<PLAYER_INV_START_SLOTNO)) {
// Crate slots
if(!moveItemStackTo(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
} else if((index >= PLAYER_INV_START_SLOTNO) && (index <= PLAYER_INV_START_SLOTNO+36)) {
// Player slot
if(!moveItemStackTo(slot_stack, 0, PLAYER_INV_START_SLOTNO-1, false)) return ItemStack.EMPTY;
} else {
// Invalid slot
return ItemStack.EMPTY;
}
if(slot_stack.isEmpty()) {
slot.set(ItemStack.EMPTY);
} else {
slot.setChanged();
}
if(slot_stack.getCount() == transferred.getCount()) return ItemStack.EMPTY;
slot.onTake(player, slot_stack);
return transferred;
}
// Container client/server synchronisation --------------------------------------------------
@OnlyIn(Dist.CLIENT)
public void onGuiAction(String message, CompoundTag nbt)
{
nbt.putString("action", message);
Networking.PacketContainerSyncClientToServer.sendToServer(containerId, nbt);
}
@Override
public void onServerPacketReceived(int windowId, CompoundTag nbt)
{}
@Override
public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt)
{
if(!nbt.contains("action")) return;
boolean changed = false;
final int slotId = nbt.contains("slot") ? nbt.getInt("slot") : -1;
switch (nbt.getString("action")) {
case QUICK_MOVE_ALL -> {
if((slotId >= STORAGE_SLOT_BEGIN) && (slotId < STORAGE_SLOT_END) && (getSlot(slotId).hasItem())) {
changed = block_storage_range_.move(getSlot(slotId).getSlotIndex(), player_inventory_range_, true, false, true, true);
} else if ((slotId >= PLAYER_SLOT_BEGIN) && (slotId < PLAYER_SLOT_END) && (getSlot(slotId).hasItem())) {
changed = player_inventory_range_.move(getSlot(slotId).getSlotIndex(), block_storage_range_, true, false, false, true);
}
}
case INCREASE_STACK -> {}
case DECREASE_STACK -> {}
}
if(changed) {
inventory_.setChanged();
player.getInventory().setChanged();
broadcastChanges();
}
}
}
//--------------------------------------------------------------------------------------------------------------------
// GUI
//--------------------------------------------------------------------------------------------------------------------
@OnlyIn(Dist.CLIENT)
public static class LabeledCrateGui extends Guis.ContainerGui<LabeledCrateContainer>
{
public LabeledCrateGui(LabeledCrateContainer container, Inventory player_inventory, Component title)
{
super(container, player_inventory, title,"textures/gui/labeled_crate_gui.png", 213, 206);
titleLabelX = 23;
titleLabelY = -10;
}
@Override
protected void renderLabels(PoseStack mx, int x, int y)
{
font.draw(mx, title, (float)titleLabelX+1, (float)titleLabelY+1, 0x303030);
font.draw(mx, title, (float)titleLabelX, (float)titleLabelY, 0x707070);
}
//------------------------------------------------------------------------------------------------------------------
protected void action(String message)
{ action(message, new CompoundTag()); }
protected void action(String message, CompoundTag nbt)
{ getMenu().onGuiAction(message, nbt); }
@Override
protected void slotClicked(Slot slot, int slotId, int button, ClickType type)
{
if(!with_gui_mouse_handling) {
super.slotClicked(slot, slotId, button, type);
} else if((type == ClickType.QUICK_MOVE) && (slot!=null) && slot.hasItem() && Auxiliaries.isShiftDown() && Auxiliaries.isCtrlDown()) {
CompoundTag nbt = new CompoundTag();
nbt.putInt("slot", slotId);
action(LabeledCrateContainer.QUICK_MOVE_ALL, nbt);
} else {
super.slotClicked(slot, slotId, button, type);
}
}
@Override
public boolean mouseScrolled(double mouseX, double mouseY, double wheel_inc)
{
if(!with_gui_mouse_handling) return super.mouseScrolled(mouseX, mouseY, wheel_inc);
final Slot slot = getSlotUnderMouse();
if((slot==null) || (!slot.hasItem())) return true;
final int count = slot.getItem().getCount();
int limit = (Auxiliaries.isShiftDown() ? 2 : 1) * (Auxiliaries.isCtrlDown() ? 4 : 1);
if(wheel_inc > 0.1) {
if(count > 0) {
if((count < slot.getItem().getMaxStackSize()) && (count < slot.getMaxStackSize())) {
CompoundTag nbt = new CompoundTag();
nbt.putInt("slot", slot.index);
if(limit > 1) nbt.putInt("limit", limit);
action(LabeledCrateContainer.INCREASE_STACK, nbt);
}
}
} else if(wheel_inc < -0.1) {
if(count > 0) {
CompoundTag nbt = new CompoundTag();
nbt.putInt("slot", slot.index);
if(limit > 1) nbt.putInt("limit", limit);
action(LabeledCrateContainer.DECREASE_STACK, nbt);
}
}
return true;
}
}
}

View file

@ -12,7 +12,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
@ -120,10 +119,6 @@ public class EdMilker
cshapes.replaceAll((state,shape)->Shapes.create(Auxiliaries.getPixeledAABB(0,0,0, 16,24,16))); cshapes.replaceAll((state,shape)->Shapes.create(Auxiliaries.getPixeledAABB(0,0,0, 16,24,16)));
} }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -220,7 +215,7 @@ public class EdMilker
public MilkerTileEntity(BlockPos pos, BlockState state) public MilkerTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
tank_ = new Fluidics.Tank(TANK_CAPACITY, 0, BUCKET_SIZE, fs->fs.isFluidEqual(milk_fluid_)); tank_ = new Fluidics.Tank(TANK_CAPACITY, 0, BUCKET_SIZE, fs->fs.isFluidEqual(milk_fluid_));
fluid_handler_ = tank_.createOutputFluidHandler(); fluid_handler_ = tank_.createOutputFluidHandler();
battery_ = new RfEnergy.Battery(MAX_ENERGY_BUFFER, MAX_ENERGY_TRANSFER, 0); battery_ = new RfEnergy.Battery(MAX_ENERGY_BUFFER, MAX_ENERGY_TRANSFER, 0);
@ -274,7 +269,7 @@ public class EdMilker
public void state_message(Player player) public void state_message(Player player)
{ {
Component rf = (energy_consumption_ <= 0) ? (new TextComponent("")) : (Auxiliaries.localizable("block.engineersdecor.small_milking_machine.status.rf", battery_.getEnergyStored())); Component rf = (energy_consumption_ <= 0) ? (Component.empty()) : (Auxiliaries.localizable("block.engineersdecor.small_milking_machine.status.rf", battery_.getEnergyStored()));
Overlay.show(player, Auxiliaries.localizable("block.engineersdecor.small_milking_machine.status", tank_.getFluidAmount(), rf)); Overlay.show(player, Auxiliaries.localizable("block.engineersdecor.small_milking_machine.status", tank_.getFluidAmount(), rf));
} }

View file

@ -18,6 +18,7 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
@ -81,10 +82,6 @@ public class EdMineralSmelter
public MineralSmelterBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB) public MineralSmelterBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -189,7 +186,7 @@ public class EdMineralSmelter
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void animateTick(BlockState state, Level world, BlockPos pos, Random rnd) public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource rnd)
{ {
if(state.getBlock()!=this) return; if(state.getBlock()!=this) return;
ParticleOptions particle = ParticleTypes.SMOKE; ParticleOptions particle = ParticleTypes.SMOKE;
@ -272,7 +269,7 @@ public class EdMineralSmelter
public MineralSmelterTileEntity(BlockPos pos, BlockState state) public MineralSmelterTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
main_inventory_ = (new Inventories.StorageInventory(this, NUM_OF_SLOTS, 1)).setStackLimit(1); main_inventory_ = (new Inventories.StorageInventory(this, NUM_OF_SLOTS, 1)).setStackLimit(1);
item_handler_ = Inventories.MappedItemHandler.createGenericHandler( item_handler_ = Inventories.MappedItemHandler.createGenericHandler(
main_inventory_, main_inventory_,

View file

@ -11,7 +11,6 @@ package wile.engineersdecor.blocks;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -76,10 +75,6 @@ public class EdPipeValve
public PipeValveBlock(long config, int valve_config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB) public PipeValveBlock(long config, int valve_config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB)
{ super(config, builder, unrotatedAABB); this.valve_config = valve_config; } { super(config, builder, unrotatedAABB); this.valve_config = valve_config; }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
@Nullable @Nullable
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) public BlockEntity newBlockEntity(BlockPos pos, BlockState state)

View file

@ -13,9 +13,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
@ -57,7 +54,6 @@ import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import wile.engineersdecor.ModContent; import wile.engineersdecor.ModContent;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.blocks.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.*; import wile.engineersdecor.libmc.detail.*;
@ -83,10 +79,6 @@ public class EdPlacer
public PlacerBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB) public PlacerBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -206,7 +198,7 @@ public class EdPlacer
public PlacerTileEntity(BlockPos pos, BlockState state) public PlacerTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
item_handler_ = Inventories.MappedItemHandler.createGenericHandler(inventory_, item_handler_ = Inventories.MappedItemHandler.createGenericHandler(inventory_,
(stack, slot) -> true, (stack, slot) -> true,
(stack, slot) -> true (stack, slot) -> true
@ -278,7 +270,7 @@ public class EdPlacer
@Override @Override
public Component getName() public Component getName()
{ final Block block=getBlockState().getBlock(); return new TextComponent((block!=null) ? block.getDescriptionId() : "Factory placer"); } { return Auxiliaries.localizable(getBlockState().getBlock().getDescriptionId()); }
@Override @Override
public boolean hasCustomName() public boolean hasCustomName()
@ -383,7 +375,7 @@ public class EdPlacer
Block block = Block.byItem(item); Block block = Block.byItem(item);
if(block == Blocks.AIR) { if(block == Blocks.AIR) {
if(item != null) { if(item != null) {
if(debug_) Auxiliaries.logInfo("Placer spit: No block for item " + item.getRegistryName().toString()); if(debug_) Auxiliaries.logInfo("Placer spit: No block for item " + Auxiliaries.getResourceLocation(item));
return spit_out(facing); // Item not accepted return spit_out(facing); // Item not accepted
} }
} else if(block instanceof IPlantable) { } else if(block instanceof IPlantable) {
@ -459,7 +451,7 @@ public class EdPlacer
} }
BlockState placement_state = (use_context==null) ? (block.defaultBlockState()) : (block.getStateForPlacement(use_context)); BlockState placement_state = (use_context==null) ? (block.defaultBlockState()) : (block.getStateForPlacement(use_context));
if(placement_state == null) { if(placement_state == null) {
if(debug_) Auxiliaries.logInfo("Placer spit: No valid placement state for item " + item.getRegistryName().toString()); if(debug_) Auxiliaries.logInfo("Placer spit: No valid placement state for item " + Auxiliaries.getResourceLocation(item));
return spit_out(facing); return spit_out(facing);
} else if((use_context!=null) && (item instanceof BlockItem)) { } else if((use_context!=null) && (item instanceof BlockItem)) {
if(((BlockItem)item).place(use_context) != InteractionResult.FAIL) { if(((BlockItem)item).place(use_context) != InteractionResult.FAIL) {
@ -641,7 +633,7 @@ public class EdPlacer
public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt) public void onClientPacketReceived(int windowId, Player player, CompoundTag nbt)
{ {
if(!(inventory_ instanceof Inventories.StorageInventory)) return; if(!(inventory_ instanceof Inventories.StorageInventory)) return;
if(!((((Inventories.StorageInventory)inventory_).getTileEntity()) instanceof PlacerTileEntity te)) return; if(!((((Inventories.StorageInventory)inventory_).getBlockEntity()) instanceof PlacerTileEntity te)) return;
if(nbt.contains("action")) { if(nbt.contains("action")) {
final int slotId = nbt.contains("slot") ? nbt.getInt("slot") : -1; final int slotId = nbt.contains("slot") ? nbt.getInt("slot") : -1;
boolean changed = false; boolean changed = false;
@ -683,13 +675,13 @@ public class EdPlacer
{ {
super.init(); super.init();
{ {
final Block block = ModContent.getBlock(getMenu().getType().getRegistryName().getPath().replaceAll("^ct_","")); final Block block = ModContent.getBlock(Auxiliaries.getResourceLocation(getMenu().getType()).getPath().replaceAll("^ct_",""));
final String prefix = block.getDescriptionId() + ".tooltips."; final String prefix = block.getDescriptionId() + ".tooltips.";
final int x0 = getGuiLeft(), y0 = getGuiTop(); final int x0 = getGuiLeft(), y0 = getGuiTop();
tooltip_.init( tooltip_.init(
new TooltipDisplay.TipRange(x0+133, y0+49, 9, 9, new TranslatableComponent(prefix + "rssignal")), new TooltipDisplay.TipRange(x0+133, y0+49, 9, 9, Component.translatable(prefix + "rssignal")),
new TooltipDisplay.TipRange(x0+145, y0+49, 9, 9, new TranslatableComponent(prefix + "inversion")), new TooltipDisplay.TipRange(x0+145, y0+49, 9, 9, Component.translatable(prefix + "inversion")),
new TooltipDisplay.TipRange(x0+159, y0+49, 9, 9, new TranslatableComponent(prefix + "triggermode")) new TooltipDisplay.TipRange(x0+159, y0+49, 9, 9, Component.translatable(prefix + "triggermode"))
); );
} }
} }

View file

@ -11,7 +11,6 @@ package wile.engineersdecor.blocks;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
@ -76,10 +75,6 @@ public class EdSolarPanel
registerDefaultState(super.defaultBlockState().setValue(EXPOSITION, 1)); registerDefaultState(super.defaultBlockState().setValue(EXPOSITION, 1));
} }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -125,7 +120,7 @@ public class EdSolarPanel
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
public SolarPanelTileEntity(BlockPos pos, BlockState state) public SolarPanelTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); }
public void readnbt(CompoundTag nbt, boolean update_packet) public void readnbt(CompoundTag nbt, boolean update_packet)
{ battery_.load(nbt); } { battery_.load(nbt); }

View file

@ -46,7 +46,7 @@ public class EdStraightPoleBlock extends StandardBlocks.DirectedWaterLoggable
{ {
Direction facing = context.getClickedFace(); Direction facing = context.getClickedFace();
BlockState state = super.getStateForPlacement(context).setValue(FACING, facing); BlockState state = super.getStateForPlacement(context).setValue(FACING, facing);
if((config & DecorBlock.CFG_FLIP_PLACEMENT_IF_SAME) != 0) { if((config & StandardBlocks.CFG_FLIP_PLACEMENT_IF_SAME) != 0) {
Level world = context.getLevel(); Level world = context.getLevel();
BlockPos pos = context.getClickedPos(); BlockPos pos = context.getClickedPos();
if(world.getBlockState(pos.relative(facing.getOpposite())).getBlock() instanceof EdStraightPoleBlock) { if(world.getBlockState(pos.relative(facing.getOpposite())).getBlock() instanceof EdStraightPoleBlock) {

View file

@ -11,8 +11,7 @@ package wile.engineersdecor.blocks;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
@ -62,10 +61,6 @@ public class EdTestBlock
public TestBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB) public TestBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -136,7 +131,7 @@ public class EdTestBlock
public TestTileEntity(BlockPos pos, BlockState state) public TestTileEntity(BlockPos pos, BlockState state)
{ {
super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state);
battery_ = new RfEnergy.Battery((int)1e9, (int)1e9, 0, 0); battery_ = new RfEnergy.Battery((int)1e9, (int)1e9, 0, 0);
energy_handler_ = battery_.createEnergyHandler(); energy_handler_ = battery_.createEnergyHandler();
tank_ = new Fluidics.Tank((int)1e9); tank_ = new Fluidics.Tank((int)1e9);
@ -223,7 +218,7 @@ public class EdTestBlock
if(items_received_total > 0) msgs.add("+" + items_received_total + "items"); if(items_received_total > 0) msgs.add("+" + items_received_total + "items");
if(items_inserted_total > 0) msgs.add("-" + items_inserted_total + "items"); if(items_inserted_total > 0) msgs.add("-" + items_inserted_total + "items");
if(msgs.isEmpty()) msgs.add("Nothing transferred yet."); if(msgs.isEmpty()) msgs.add("Nothing transferred yet.");
Overlay.show(player, new TextComponent(String.join(" | ", msgs)), 1000); Overlay.show(player, Component.literal(String.join(" | ", msgs)), 1000);
return true; return true;
} else if(paused) { } else if(paused) {
if(!getFillFluid(held).isEmpty()) { if(!getFillFluid(held).isEmpty()) {
@ -237,19 +232,19 @@ public class EdTestBlock
liq_fill_stack.setAmount(amount); liq_fill_stack.setAmount(amount);
} }
if(liq_fill_stack.isEmpty()) { if(liq_fill_stack.isEmpty()) {
Overlay.show(player, new TextComponent("Fluid fill: none"), 1000); Overlay.show(player, Component.literal("Fluid fill: none"), 1000);
} else { } else {
Overlay.show(player, new TextComponent("Fluid fill: " + liq_fill_stack.getAmount() + "mb/t of " + liq_fill_stack.getFluid().getRegistryName()), 1000); Overlay.show(player, Component.literal("Fluid fill: " + liq_fill_stack.getAmount() + "mb/t of " + Auxiliaries.getResourceLocation(liq_fill_stack.getFluid())), 1000);
} }
} else if(held.getItem() == Items.REDSTONE) { } else if(held.getItem() == Items.REDSTONE) {
rf_feed_setting = (rf_feed_setting<<1) & 0x00fffff0; rf_feed_setting = (rf_feed_setting<<1) & 0x00fffff0;
if(rf_feed_setting == 0) rf_feed_setting = 0x10; if(rf_feed_setting == 0) rf_feed_setting = 0x10;
Overlay.show(player, new TextComponent("RF feed rate: " + rf_feed_setting + "rf/t"), 1000); Overlay.show(player, Component.literal("RF feed rate: " + rf_feed_setting + "rf/t"), 1000);
} else { } else {
BlockState adjacent_state = level.getBlockState(worldPosition.relative(block_facing)); BlockState adjacent_state = level.getBlockState(worldPosition.relative(block_facing));
if(adjacent_state.getBlock()==Blocks.HOPPER || adjacent_state.getBlock()==ModContent.getBlock("factory_hopper")) { if(adjacent_state.getBlock()==Blocks.HOPPER || adjacent_state.getBlock()==ModContent.getBlock("factory_hopper")) {
insertion_item = held.copy(); insertion_item = held.copy();
Overlay.show(player, new TextComponent("Insertion item: " + (insertion_item.getItem()==Items.LEVER ? "random" : insertion_item.toString()) + "/s"), 1000); Overlay.show(player, Component.literal("Insertion item: " + (insertion_item.getItem()==Items.LEVER ? "random" : insertion_item.toString()) + "/s"), 1000);
} }
} }
return true; return true;

View file

@ -12,7 +12,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
@ -64,10 +63,6 @@ public class EdTreeCutter
public TreeCutterBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB) public TreeCutterBlock(long config, BlockBehaviour.Properties builder, final AABB[] unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -151,7 +146,7 @@ public class EdTreeCutter
} }
public TreeCutterTileEntity(BlockPos pos, BlockState state) public TreeCutterTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); }
public void readnbt(CompoundTag nbt) public void readnbt(CompoundTag nbt)
{ energy_ = nbt.getInt("energy"); } { energy_ = nbt.getInt("energy"); }

View file

@ -13,11 +13,10 @@ import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.*; import net.minecraft.world.*;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Inventory;
@ -47,6 +46,7 @@ import wile.engineersdecor.ModContent;
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock; import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
import wile.engineersdecor.libmc.blocks.StandardBlocks; import wile.engineersdecor.libmc.blocks.StandardBlocks;
import wile.engineersdecor.libmc.blocks.StandardEntityBlocks; import wile.engineersdecor.libmc.blocks.StandardEntityBlocks;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.Inventories; import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.RfEnergy; import wile.engineersdecor.libmc.detail.RfEnergy;
import wile.engineersdecor.libmc.detail.RsSignals; import wile.engineersdecor.libmc.detail.RsSignals;
@ -55,7 +55,6 @@ import wile.engineersdecor.libmc.ui.Guis;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random;
public class EdWasteIncinerator public class EdWasteIncinerator
@ -82,10 +81,6 @@ public class EdWasteIncinerator
public WasteIncineratorBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB) public WasteIncineratorBlock(long config, BlockBehaviour.Properties builder, final AABB unrotatedAABB)
{ super(config, builder, unrotatedAABB); } { super(config, builder, unrotatedAABB); }
@Override
public ResourceLocation getBlockRegistryName()
{ return getRegistryName(); }
@Override @Override
public boolean isBlockEntityTicking(Level world, BlockState state) public boolean isBlockEntityTicking(Level world, BlockState state)
{ return true; } { return true; }
@ -159,7 +154,7 @@ public class EdWasteIncinerator
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void animateTick(BlockState state, Level world, BlockPos pos, Random rnd) public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource rnd)
{ {
if((state.getBlock()!=this) || (!state.getValue(LIT))) return; if((state.getBlock()!=this) || (!state.getValue(LIT))) return;
final double rv = rnd.nextDouble(); final double rv = rnd.nextDouble();
@ -194,7 +189,7 @@ public class EdWasteIncinerator
private final LazyOptional<IEnergyStorage> energy_handler_ = battery_.createEnergyHandler(); private final LazyOptional<IEnergyStorage> energy_handler_ = battery_.createEnergyHandler();
public WasteIncineratorTileEntity(BlockPos pos, BlockState state) public WasteIncineratorTileEntity(BlockPos pos, BlockState state)
{ super(ModContent.getBlockEntityTypeOfBlock(state.getBlock().getRegistryName().getPath()), pos, state); reset(); } { super(ModContent.getBlockEntityTypeOfBlock(state.getBlock()), pos, state); reset(); }
public CompoundTag getnbt() public CompoundTag getnbt()
{ return writenbt(new CompoundTag()); } { return writenbt(new CompoundTag()); }
@ -241,7 +236,7 @@ public class EdWasteIncinerator
@Override @Override
public Component getName() public Component getName()
{ final Block block=getBlockState().getBlock(); return new TextComponent((block!=null) ? block.getDescriptionId() : "Small Waste Incinerator"); } { return Auxiliaries.localizable(getBlockState().getBlock().getDescriptionId()); }
@Override @Override
public boolean hasCustomName() public boolean hasCustomName()

View file

@ -10,28 +10,17 @@
package wile.engineersdecor.detail; package wile.engineersdecor.detail;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.block.model.ItemTransforms;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.client.renderer.entity.EntityRenderer; import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlas;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.blocks.EdCraftingTable;
import wile.engineersdecor.blocks.EdCraftingTable.CraftingTableBlock;
import wile.engineersdecor.blocks.EdLabeledCrate;
import wile.engineersdecor.libmc.detail.Auxiliaries;
public class ModRenderers public class ModRenderers
@ -65,110 +54,4 @@ public class ModRenderers
{} {}
} }
//--------------------------------------------------------------------------------------------------------------------
// Crafting table
//--------------------------------------------------------------------------------------------------------------------
@OnlyIn(Dist.CLIENT)
public static class CraftingTableTer implements BlockEntityRenderer<EdCraftingTable.CraftingTableTileEntity>
{
private static int tesr_error_counter = 16;
private static final float scaler = 0.1f;
private static final float gap = 0.19f;
private static final float[] yrotations = {0, 90, 180, 270}; // [hdirection] S-W-N-E
private static final float[][][] offsets = { // [hdirection][slotindex][xz]
{ {-1,-1},{+0,-1},{+1,-1}, {-1,+0},{+0,+0},{+1,+0}, {-1,+1},{+0,+1},{+1,+1} }, // S
{ {+1,-1},{+1,+0},{+1,+1}, {+0,-1},{+0,+0},{+0,+1}, {-1,-1},{-1,+0},{-1,+1} }, // W
{ {+1,+1},{+0,+1},{-1,+1}, {+1,+0},{+0,+0},{-1,+0}, {+1,-1},{+0,-1},{-1,-1} }, // N
{ {-1,+1},{-1,+0},{-1,-1}, {+0,+1},{+0,+0},{+0,-1}, {+1,+1},{+1,+0},{+1,-1} }, // E
};
private final BlockEntityRendererProvider.Context renderer_;
public CraftingTableTer(BlockEntityRendererProvider.Context renderer)
{ this.renderer_ = renderer; }
@Override
@SuppressWarnings("deprecation")
public void render(final EdCraftingTable.CraftingTableTileEntity te, float unused1, PoseStack mxs, MultiBufferSource buf, int i5, int overlayTexture)
{
if(tesr_error_counter <= 0) return;
try {
final BlockState state = te.getLevel().getBlockState(te.getBlockPos());
if(!(state.getBlock() instanceof EdCraftingTable.CraftingTableBlock)) return;
final int di = Mth.clamp(state.getValue(CraftingTableBlock.HORIZONTAL_FACING).get2DDataValue(), 0, 3);
long posrnd = te.getBlockPos().asLong();
posrnd = (posrnd>>16)^(posrnd<<1);
for(int i=0; i<9; ++i) {
final ItemStack stack = te.mainInventory().getItem(i);
if(stack.isEmpty()) continue;
float prnd = ((float)(((Integer.rotateRight(stack.getItem().hashCode()^(int)posrnd,(stack.getCount()+i)&31)))&1023))/1024f;
float rndo = gap * ((prnd*0.1f)-0.05f);
float ox = gap * offsets[di][i][0], oz = gap * offsets[di][i][1];
float oy = 0.5f;
float ry = ((yrotations[di]+180) + ((prnd*60)-30)) % 360;
if(stack.isEmpty()) return;
mxs.pushPose();
mxs.translate(0.5+ox, 0.5+oy, 0.5+oz);
mxs.mulPose(Vector3f.XP.rotationDegrees(90.0f));
mxs.mulPose(Vector3f.ZP.rotationDegrees(ry));
mxs.translate(rndo, rndo, 0);
mxs.scale(scaler, scaler, scaler);
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemTransforms.TransformType.FIXED, i5, overlayTexture, mxs, buf, 0);
mxs.popPose();
}
} catch(Throwable e) {
if(--tesr_error_counter<=0) {
Auxiliaries.logger().error("TER was disabled because broken, exception was: " + e.getMessage());
Auxiliaries.logger().error(e.getStackTrace());
}
}
}
}
//--------------------------------------------------------------------------------------------------------------------
// Labeled Crate
//--------------------------------------------------------------------------------------------------------------------
@OnlyIn(Dist.CLIENT)
public static class DecorLabeledCrateTer implements BlockEntityRenderer<EdLabeledCrate.LabeledCrateTileEntity>
{
private static int tesr_error_counter = 4;
private static final float scaler = 0.35f;
private static final double[][] tr = { // [hdirection=S-W-N-E][param]
{ +8.0/32, -8.0/32, +15.5/32, 180.0 }, // N
{ -15.5/32, -8.0/32, +8.0/32, 90.0 }, // E
{ -8.0/32, -8.0/32, -15.5/32, 0.0 }, // S param=tx,ty,tz,ry
{ +15.5/32, -8.0/32, -8.0/32, 270.0 }, // W
};
private final BlockEntityRendererProvider.Context renderer_;
public DecorLabeledCrateTer(BlockEntityRendererProvider.Context renderer)
{ this.renderer_ = renderer; }
@Override
@SuppressWarnings("deprecation")
public void render(final EdLabeledCrate.LabeledCrateTileEntity te, float unused1, PoseStack mxs, MultiBufferSource buf, int i5, int overlayTexture)
{
if(tesr_error_counter<=0) return;
try {
final ItemStack stack = te.getItemFrameStack();
if(stack.isEmpty()) return;
final BlockState state = te.getLevel().getBlockState(te.getBlockPos());
if(!(state.getBlock() instanceof EdLabeledCrate.LabeledCrateBlock)) return;
final int di = Mth.clamp(state.getValue(EdLabeledCrate.LabeledCrateBlock.HORIZONTAL_FACING).get2DDataValue(), 0, 3);
double ox = tr[di][0], oy = tr[di][1], oz = tr[di][2];
float ry = (float)tr[di][3];
mxs.pushPose();
mxs.translate(0.5+ox, 0.5+oy, 0.5+oz);
mxs.mulPose(Vector3f.YP.rotationDegrees(ry));
mxs.scale(scaler, scaler, scaler);
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemTransforms.TransformType.FIXED, i5, overlayTexture, mxs, buf, 0);
mxs.popPose();
} catch(Throwable e) {
if(--tesr_error_counter<=0) {
Auxiliaries.logger().error("TER was disabled (because broken), exception was: " + e.getMessage());
}
}
}
}
} }

View file

@ -7,9 +7,10 @@
* JEI plugin (see https://github.com/mezz/JustEnoughItems/wiki/Creating-Plugins) * JEI plugin (see https://github.com/mezz/JustEnoughItems/wiki/Creating-Plugins)
*/ */
package wile.engineersdecor.eapi.jei; package wile.engineersdecor.eapi.jei;
/*
public class JEIPlugin {} public class JEIPlugin {}
*/ /*
import mezz.jei.api.constants.RecipeTypes; import mezz.jei.api.constants.RecipeTypes;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.BlockItem;
@ -41,17 +42,6 @@ public class JEIPlugin implements mezz.jei.api.IModPlugin
@Override @Override
public void registerRecipeTransferHandlers(IRecipeTransferRegistration registration) public void registerRecipeTransferHandlers(IRecipeTransferRegistration registration)
{ {
if(!ModConfig.isOptedOut(ModContent.getBlock("metal_crafting_table"))) {
try {
registration.addRecipeTransferHandler(
EdCraftingTable.CraftingTableUiContainer.class,
RecipeTypes.CRAFTING,
1, 9, 10, 36+CraftingTableTileEntity.NUM_OF_STORAGE_SLOTS
);
} catch(Throwable e) {
Auxiliaries.logger().warn("Exception in JEI crafting table handler registration: '" + e.getMessage() + "'.");
}
}
} }
@Override @Override
@ -81,9 +71,6 @@ public class JEIPlugin implements mezz.jei.api.IModPlugin
@Override @Override
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) public void registerRecipeCatalysts(IRecipeCatalystRegistration registration)
{ {
if(!ModConfig.isOptedOut(ModContent.getBlock("metal_crafting_table"))) {
registration.addRecipeCatalyst(new ItemStack(ModContent.getBlock("metal_crafting_table")), RecipeTypes.CRAFTING);
}
if(!ModConfig.isOptedOut(ModContent.getBlock("small_lab_furnace"))) { if(!ModConfig.isOptedOut(ModContent.getBlock("small_lab_furnace"))) {
registration.addRecipeCatalyst(new ItemStack(ModContent.getBlock("small_lab_furnace")), RecipeTypes.SMELTING); registration.addRecipeCatalyst(new ItemStack(ModContent.getBlock("small_lab_furnace")), RecipeTypes.SMELTING);
} }
@ -92,3 +79,4 @@ public class JEIPlugin implements mezz.jei.api.IModPlugin
} }
} }
} }
*/

View file

@ -5,10 +5,6 @@
* @license MIT (see https://opensource.org/licenses/MIT) * @license MIT (see https://opensource.org/licenses/MIT)
* *
* Common functionality class for decor blocks. * Common functionality class for decor blocks.
* Mainly needed for:
* - MC block defaults.
* - Tooltip functionality
* - Model initialization
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc.blocks;
@ -60,6 +56,7 @@ import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Supplier; import java.util.function.Supplier;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class StandardBlocks public class StandardBlocks
{ {
@ -102,12 +99,6 @@ public class StandardBlocks
} }
} }
public interface IBlockItemFactory
{
// BlockItem factory for item registry. Only invoked once.
BlockItem getBlockItem(Block block, Item.Properties builder);
}
public static class BaseBlock extends Block implements IStandardBlock, SimpleWaterloggedBlock public static class BaseBlock extends Block implements IStandardBlock, SimpleWaterloggedBlock
{ {
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;

View file

@ -7,9 +7,10 @@
* Common functionality class for blocks with block entities. * Common functionality class for blocks with block entities.
*/ */
package wile.engineersdecor.libmc.blocks; package wile.engineersdecor.libmc.blocks;
import wile.engineersdecor.libmc.detail.Registries;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.MenuProvider; import net.minecraft.world.MenuProvider;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
@ -21,7 +22,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.gameevent.GameEventListener; import net.minecraft.world.level.gameevent.GameEventListener;
import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayer;
import wile.engineersdecor.libmc.detail.Registries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -31,8 +31,6 @@ public class StandardEntityBlocks
public interface IStandardEntityBlock<ET extends StandardBlockEntity> extends EntityBlock public interface IStandardEntityBlock<ET extends StandardBlockEntity> extends EntityBlock
{ {
ResourceLocation getBlockRegistryName();
default boolean isBlockEntityTicking(Level world, BlockState state) default boolean isBlockEntityTicking(Level world, BlockState state)
{ return false; } { return false; }
@ -49,7 +47,7 @@ public class StandardEntityBlocks
@Nullable @Nullable
default BlockEntity newBlockEntity(BlockPos pos, BlockState state) default BlockEntity newBlockEntity(BlockPos pos, BlockState state)
{ {
BlockEntityType<?> tet = Registries.getBlockEntityTypeOfBlock(getBlockRegistryName().getPath()); BlockEntityType<?> tet = Registries.getBlockEntityTypeOfBlock(state.getBlock());
return (tet==null) ? null : tet.create(pos, state); return (tet==null) ? null : tet.create(pos, state);
} }
@ -60,7 +58,7 @@ public class StandardEntityBlocks
@Override @Override
@Nullable @Nullable
default <T extends BlockEntity> GameEventListener getListener(Level world, T te) default <T extends BlockEntity> GameEventListener getListener(ServerLevel world, T te)
{ return null; } { return null; }
} }

View file

@ -13,10 +13,11 @@ import net.minecraft.ChatFormatting;
import net.minecraft.SharedConstants; import net.minecraft.SharedConstants;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Registry;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.ComponentUtils;
import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.network.chat.MutableComponent;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
@ -34,7 +35,7 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.ModList;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import org.apache.logging.log4j.Logger; import org.slf4j.Logger;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -42,10 +43,10 @@ import java.io.BufferedReader;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -124,27 +125,27 @@ public class Auxiliaries
* Text localization wrapper, implicitly prepends `MODID` to the * Text localization wrapper, implicitly prepends `MODID` to the
* translation keys. Forces formatting argument, nullable if no special formatting shall be applied.. * translation keys. Forces formatting argument, nullable if no special formatting shall be applied..
*/ */
public static TranslatableComponent localizable(String modtrkey, Object... args) public static MutableComponent localizable(String modtrkey, Object... args)
{ return new TranslatableComponent((modtrkey.startsWith("block.") || (modtrkey.startsWith("item."))) ? (modtrkey) : (modid+"."+modtrkey), args); } { return Component.translatable((modtrkey.startsWith("block.") || (modtrkey.startsWith("item."))) ? (modtrkey) : (modid+"."+modtrkey), args); }
public static TranslatableComponent localizable(String modtrkey, @Nullable ChatFormatting color, Object... args) public static MutableComponent localizable(String modtrkey, @Nullable ChatFormatting color, Object... args)
{ {
TranslatableComponent tr = new TranslatableComponent(modid+"."+modtrkey, args); final MutableComponent tr = Component.translatable(modid+"."+modtrkey, args);
if(color!=null) tr.withStyle(color); if(color!=null) tr.getStyle().applyFormat(color);
return tr; return tr;
} }
public static TranslatableComponent localizable(String modtrkey) public static Component localizable(String modtrkey)
{ return localizable(modtrkey, new Object[]{}); } { return localizable(modtrkey, new Object[]{}); }
public static TranslatableComponent localizable_block_key(String blocksubkey) public static Component localizable_block_key(String blocksubkey)
{ return new TranslatableComponent("block."+modid+"."+blocksubkey); } { return Component.translatable("block."+modid+"."+blocksubkey); }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static String localize(String translationKey, Object... args) public static String localize(String translationKey, Object... args)
{ {
TranslatableComponent tr = new TranslatableComponent(translationKey, args); Component tr = Component.translatable(translationKey, args);
tr.withStyle(ChatFormatting.RESET); tr.getStyle().applyFormat(ChatFormatting.RESET);
final String ft = tr.getString(); final String ft = tr.getString();
if(ft.contains("${")) { if(ft.contains("${")) {
// Non-recursive, non-argument lang file entry cross referencing. // Non-recursive, non-argument lang file entry cross referencing.
@ -167,7 +168,7 @@ public class Auxiliaries
if(!r) m = ""; if(!r) m = "";
} }
} }
mt.appendReplacement(sb, Matcher.quoteReplacement((new TranslatableComponent(m)).getString().trim())); mt.appendReplacement(sb, Matcher.quoteReplacement((Component.translatable(m)).getString().trim()));
} }
mt.appendTail(sb); mt.appendTail(sb);
return sb.toString(); return sb.toString();
@ -183,6 +184,15 @@ public class Auxiliaries
public static boolean hasTranslation(String key) public static boolean hasTranslation(String key)
{ return net.minecraft.client.resources.language.I18n.exists(key); } { return net.minecraft.client.resources.language.I18n.exists(key); }
public static MutableComponent join(Collection<? extends Component> components, String separator)
{ return ComponentUtils.formatList(components, Component.literal(separator), Function.identity()); }
public static MutableComponent join(Component... components)
{ final MutableComponent tc = Component.empty(); for(Component c:components) { tc.append(c); } return tc; }
public static boolean isEmpty(Component component)
{ return component.getSiblings().isEmpty() && component.getString().isEmpty(); }
public static final class Tooltip public static final class Tooltip
{ {
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -217,7 +227,7 @@ public class Auxiliaries
if(tip_text.isEmpty()) return false; if(tip_text.isEmpty()) return false;
String[] tip_list = tip_text.split("\\r?\\n"); String[] tip_list = tip_text.split("\\r?\\n");
for(String tip:tip_list) { for(String tip:tip_list) {
tooltip.add(new TextComponent(tip.replaceAll("\\s+$","").replaceAll("^\\s+", "")).withStyle(ChatFormatting.GRAY)); tooltip.add(Component.literal(tip.replaceAll("\\s+$","").replaceAll("^\\s+", "")).withStyle(ChatFormatting.GRAY));
} }
return true; return true;
} }
@ -235,7 +245,7 @@ public class Auxiliaries
public static boolean addInformation(String translation_key, List<Component> tooltip) public static boolean addInformation(String translation_key, List<Component> tooltip)
{ {
if(!Auxiliaries.hasTranslation(translation_key)) return false; if(!Auxiliaries.hasTranslation(translation_key)) return false;
tooltip.add(new TextComponent(localize(translation_key).replaceAll("\\s+$","").replaceAll("^\\s+", "")).withStyle(ChatFormatting.GRAY)); tooltip.add(Component.literal(localize(translation_key).replaceAll("\\s+$","").replaceAll("^\\s+", "")).withStyle(ChatFormatting.GRAY));
return true; return true;
} }
@ -243,10 +253,7 @@ public class Auxiliaries
@SuppressWarnings("unused") @SuppressWarnings("unused")
public static void playerChatMessage(final Player player, final String message) public static void playerChatMessage(final Player player, final String message)
{ { player.displayClientMessage(Component.translatable(message.trim()), true); }
String s = message.trim();
if(!s.isEmpty()) player.sendMessage(new TranslatableComponent(s), new UUID(0,0));
}
public static @Nullable Component unserializeTextComponent(String serialized) public static @Nullable Component unserializeTextComponent(String serialized)
{ return Component.Serializer.fromJson(serialized); } { return Component.Serializer.fromJson(serialized); }
@ -260,14 +267,28 @@ public class Auxiliaries
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static boolean isInItemTag(Item item, ResourceLocation tag) public static boolean isInItemTag(Item item, ResourceLocation tag)
{ { return ForgeRegistries.ITEMS.tags().stream().filter(tg->tg.getKey().location().equals(tag)).anyMatch(tk->tk.contains(item)); }
return ForgeRegistries.ITEMS.tags().stream().filter(tg->tg.getKey().location().equals(tag)).anyMatch(tk->tk.contains(item));
}
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static boolean isInBlockTag(Block block, ResourceLocation tag) public static boolean isInBlockTag(Block block, ResourceLocation tag)
{ return ForgeRegistries.BLOCKS.tags().stream().filter(tg->tg.getKey().location().equals(tag)).anyMatch(tk->tk.contains(block)); } { return ForgeRegistries.BLOCKS.tags().stream().filter(tg->tg.getKey().location().equals(tag)).anyMatch(tk->tk.contains(block)); }
@SuppressWarnings("deprecation")
public static ResourceLocation getResourceLocation(Item item)
{ return Registry.ITEM.getKey(item); }
@SuppressWarnings("deprecation")
public static ResourceLocation getResourceLocation(Block block)
{ return Registry.BLOCK.getKey(block); }
@SuppressWarnings("deprecation")
public static ResourceLocation getResourceLocation(net.minecraft.world.inventory.MenuType<?> menu)
{ return Registry.MENU.getKey(menu); }
@SuppressWarnings("deprecation")
public static ResourceLocation getResourceLocation(net.minecraft.world.level.material.Fluid fluid)
{ return Registry.FLUID.getKey(fluid); }
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Item NBT data // Item NBT data
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------

View file

@ -43,7 +43,14 @@ public class Crafting
protected static final CraftingGrid instance3x3 = new CraftingGrid(3,3); protected static final CraftingGrid instance3x3 = new CraftingGrid(3,3);
protected CraftingGrid(int width, int height) protected CraftingGrid(int width, int height)
{ super(new AbstractContainerMenu(null,0) { public boolean stillValid(Player player) { return false; } }, width, height); } { super(
new AbstractContainerMenu(null,0) {
public boolean stillValid(Player player) { return false; }
public ItemStack quickMoveStack(Player player, int slot) {return ItemStack.EMPTY; }
}
, width, height
);
}
protected void fill(Container grid) protected void fill(Container grid)
{ for(int i=0; i<getContainerSize(); ++i) setItem(i, i>=grid.getContainerSize() ? ItemStack.EMPTY : grid.getItem(i)); } { for(int i=0; i<getContainerSize(); ++i) setItem(i, i>=grid.getContainerSize() ? ItemStack.EMPTY : grid.getItem(i)); }

View file

@ -12,7 +12,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList; import net.minecraft.core.NonNullList;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.TagTypes;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.*; import net.minecraft.world.*;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -827,7 +826,7 @@ public class Inventories
public List<ItemStack> stacks() public List<ItemStack> stacks()
{ return stacks_; } { return stacks_; }
public BlockEntity getTileEntity() public BlockEntity getBlockEntity()
{ return te_; } { return te_; }
public StorageInventory setOpenAction(Consumer<Player> fn) public StorageInventory setOpenAction(Consumer<Player> fn)
@ -922,7 +921,8 @@ public class Inventories
public static void give(Player entity, ItemStack stack) public static void give(Player entity, ItemStack stack)
{ ItemHandlerHelper.giveItemToPlayer(entity, stack); } { ItemHandlerHelper.giveItemToPlayer(entity, stack); }
public static void setItemInPlayerHand(Player player, InteractionHand hand, ItemStack stack) { public static void setItemInPlayerHand(Player player, InteractionHand hand, ItemStack stack)
{
if(stack.isEmpty()) stack = ItemStack.EMPTY; if(stack.isEmpty()) stack = ItemStack.EMPTY;
if(hand == InteractionHand.MAIN_HAND) { if(hand == InteractionHand.MAIN_HAND) {
player.getInventory().items.set(player.getInventory().selected, stack); player.getInventory().items.set(player.getInventory().selected, stack);
@ -957,7 +957,6 @@ public class Inventories
return stacks; return stacks;
} }
public static CompoundTag writeNbtStacks(CompoundTag nbt, String key, NonNullList<ItemStack> stacks, boolean omit_trailing_empty) public static CompoundTag writeNbtStacks(CompoundTag nbt, String key, NonNullList<ItemStack> stacks, boolean omit_trailing_empty)
{ {
CompoundTag stacknbt = new CompoundTag(); CompoundTag stacknbt = new CompoundTag();

View file

@ -12,7 +12,6 @@ import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
@ -20,12 +19,15 @@ import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.network.NetworkEvent;
import net.minecraftforge.network.NetworkDirection; import net.minecraftforge.network.NetworkDirection;
import net.minecraftforge.network.NetworkEvent;
import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.NetworkRegistry;
import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.simple.SimpleChannel;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Supplier; import java.util.function.Supplier;
@ -45,6 +47,8 @@ public class Networking
DEFAULT_CHANNEL.registerMessage(++discr, PacketTileNotifyServerToClient.class, PacketTileNotifyServerToClient::compose, PacketTileNotifyServerToClient::parse, PacketTileNotifyServerToClient.Handler::handle); DEFAULT_CHANNEL.registerMessage(++discr, PacketTileNotifyServerToClient.class, PacketTileNotifyServerToClient::compose, PacketTileNotifyServerToClient::parse, PacketTileNotifyServerToClient.Handler::handle);
DEFAULT_CHANNEL.registerMessage(++discr, PacketContainerSyncClientToServer.class, PacketContainerSyncClientToServer::compose, PacketContainerSyncClientToServer::parse, PacketContainerSyncClientToServer.Handler::handle); DEFAULT_CHANNEL.registerMessage(++discr, PacketContainerSyncClientToServer.class, PacketContainerSyncClientToServer::compose, PacketContainerSyncClientToServer::parse, PacketContainerSyncClientToServer.Handler::handle);
DEFAULT_CHANNEL.registerMessage(++discr, PacketContainerSyncServerToClient.class, PacketContainerSyncServerToClient::compose, PacketContainerSyncServerToClient::parse, PacketContainerSyncServerToClient.Handler::handle); DEFAULT_CHANNEL.registerMessage(++discr, PacketContainerSyncServerToClient.class, PacketContainerSyncServerToClient::compose, PacketContainerSyncServerToClient::parse, PacketContainerSyncServerToClient.Handler::handle);
DEFAULT_CHANNEL.registerMessage(++discr, PacketNbtNotifyClientToServer.class, PacketNbtNotifyClientToServer::compose, PacketNbtNotifyClientToServer::parse, PacketNbtNotifyClientToServer.Handler::handle);
DEFAULT_CHANNEL.registerMessage(++discr, PacketNbtNotifyServerToClient.class, PacketNbtNotifyServerToClient::compose, PacketNbtNotifyServerToClient::parse, PacketNbtNotifyServerToClient.Handler::handle);
DEFAULT_CHANNEL.registerMessage(++discr, OverlayTextMessage.class, OverlayTextMessage::compose, OverlayTextMessage::parse, OverlayTextMessage.Handler::handle); DEFAULT_CHANNEL.registerMessage(++discr, OverlayTextMessage.class, OverlayTextMessage::compose, OverlayTextMessage::parse, OverlayTextMessage.Handler::handle);
} }
@ -138,7 +142,6 @@ public class Networking
public static void handle(final PacketTileNotifyServerToClient pkt, final Supplier<NetworkEvent.Context> ctx) public static void handle(final PacketTileNotifyServerToClient pkt, final Supplier<NetworkEvent.Context> ctx)
{ {
ctx.get().enqueueWork(() -> { ctx.get().enqueueWork(() -> {
if((pkt.nbt==null) || (pkt.pos==null)) return;
Level world = SidedProxy.getWorldClientSide(); Level world = SidedProxy.getWorldClientSide();
if(world == null) return; if(world == null) return;
final BlockEntity te = world.getBlockEntity(pkt.pos); final BlockEntity te = world.getBlockEntity(pkt.pos);
@ -251,6 +254,80 @@ public class Networking
} }
} }
//--------------------------------------------------------------------------------------------------------------------
// World notifications
//--------------------------------------------------------------------------------------------------------------------
public static class PacketNbtNotifyClientToServer
{
public static final Map<String, BiConsumer<Player, CompoundTag>> handlers = new HashMap<>();
final CompoundTag nbt;
public static void sendToServer(CompoundTag nbt)
{ if(nbt!=null) DEFAULT_CHANNEL.sendToServer(new PacketNbtNotifyClientToServer(nbt)); }
public PacketNbtNotifyClientToServer(CompoundTag nbt)
{ this.nbt = nbt; }
public static PacketNbtNotifyClientToServer parse(final FriendlyByteBuf buf)
{ return new PacketNbtNotifyClientToServer(buf.readNbt()); }
public static void compose(final PacketNbtNotifyClientToServer pkt, final FriendlyByteBuf buf)
{ buf.writeNbt(pkt.nbt); }
public static class Handler
{
public static void handle(final PacketNbtNotifyClientToServer pkt, final Supplier<NetworkEvent.Context> ctx)
{
ctx.get().enqueueWork(() -> {
final ServerPlayer player = ctx.get().getSender();
if(player==null) return;
final String hnd = pkt.nbt.getString("hnd");
if(hnd.isEmpty()) return;
if(handlers.containsKey(hnd)) handlers.get(hnd).accept(player, pkt.nbt);
});
ctx.get().setPacketHandled(true);
}
}
}
public static class PacketNbtNotifyServerToClient
{
public static final Map<String, Consumer<CompoundTag>> handlers = new HashMap<>();
final CompoundTag nbt;
public static void sendToPlayer(Player player, CompoundTag nbt)
{
if((!(player instanceof ServerPlayer)) || (player instanceof FakePlayer) || (nbt==null)) return;
DEFAULT_CHANNEL.sendTo(new PacketNbtNotifyServerToClient(nbt), ((ServerPlayer)player).connection.connection, NetworkDirection.PLAY_TO_CLIENT);
}
public static void sendToPlayers(Level world, CompoundTag nbt)
{ for(Player player: world.players()) sendToPlayer(player, nbt); }
public PacketNbtNotifyServerToClient(CompoundTag nbt)
{ this.nbt = nbt; }
public static PacketNbtNotifyServerToClient parse(final FriendlyByteBuf buf)
{ return new PacketNbtNotifyServerToClient(buf.readNbt()); }
public static void compose(final PacketNbtNotifyServerToClient pkt, final FriendlyByteBuf buf)
{ buf.writeNbt(pkt.nbt); }
public static class Handler
{
public static void handle(final PacketNbtNotifyServerToClient pkt, final Supplier<NetworkEvent.Context> ctx)
{
ctx.get().enqueueWork(() -> {
final String hnd = pkt.nbt.getString("hnd");
if(hnd.isEmpty()) return;
if(handlers.containsKey(hnd)) handlers.get(hnd).accept(pkt.nbt);
});
ctx.get().setPacketHandled(true);
}
}
}
//-------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------
// Main window GUI text message // Main window GUI text message
//-------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------
@ -269,12 +346,12 @@ public class Networking
public static void sendToPlayer(Player player, Component message, int delay) public static void sendToPlayer(Player player, Component message, int delay)
{ {
if((!(player instanceof ServerPlayer)) || (player instanceof FakePlayer)) return; if((!(player instanceof ServerPlayer)) || (player instanceof FakePlayer) || Auxiliaries.isEmpty(message)) return;
DEFAULT_CHANNEL.sendTo(new OverlayTextMessage(message, delay), ((ServerPlayer)player).connection.connection, NetworkDirection.PLAY_TO_CLIENT); DEFAULT_CHANNEL.sendTo(new OverlayTextMessage(message, delay), ((ServerPlayer)player).connection.connection, NetworkDirection.PLAY_TO_CLIENT);
} }
public OverlayTextMessage() public OverlayTextMessage()
{ data_ = new TranslatableComponent("[unset]"); } { data_ = Component.translatable("[unset]"); }
public OverlayTextMessage(final Component tct, int delay) public OverlayTextMessage(final Component tct, int delay)
{ data_ = tct.copy(); delay_ = delay; } { data_ = tct.copy(); delay_ = delay; }
@ -284,7 +361,7 @@ public class Networking
try { try {
return new OverlayTextMessage(buf.readComponent(), DISPLAY_TIME_MS); return new OverlayTextMessage(buf.readComponent(), DISPLAY_TIME_MS);
} catch(Throwable e) { } catch(Throwable e) {
return new OverlayTextMessage(new TranslatableComponent("[incorrect translation]"), DISPLAY_TIME_MS); return new OverlayTextMessage(Component.translatable("[incorrect translation]"), DISPLAY_TIME_MS);
} }
} }

View file

@ -19,7 +19,7 @@ import net.minecraftforge.common.crafting.conditions.ICondition;
import net.minecraftforge.common.crafting.conditions.IConditionSerializer; import net.minecraftforge.common.crafting.conditions.IConditionSerializer;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistry;
import org.apache.logging.log4j.Logger; import org.slf4j.Logger;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
@ -90,7 +90,7 @@ public class OptionalRecipeCondition implements ICondition
} }
@Override @Override
public boolean test() public boolean test(IContext context)
{ {
if(without_recipes) return false; if(without_recipes) return false;
if((experimental) && (!with_experimental)) return false; if((experimental) && (!with_experimental)) return false;

View file

@ -10,19 +10,34 @@ package wile.engineersdecor.libmc.detail;
import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.platform.Window;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.Font;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent; import net.minecraft.util.Mth;
import net.minecraft.util.Tuple;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraft.world.level.LightLayer;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderLevelLastEvent;
import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import javax.annotation.Nullable;
import java.util.Optional;
public class Overlay public class Overlay
{ {
@ -40,6 +55,12 @@ public class Overlay
public static void show(Player player, final Component message, int delay) public static void show(Player player, final Component message, int delay)
{ Networking.OverlayTextMessage.sendToPlayer(player, message, delay); } { Networking.OverlayTextMessage.sendToPlayer(player, message, delay); }
public static void show(BlockState state, BlockPos pos)
{ show(state, pos, 100); }
public static void show(BlockState state, BlockPos pos, int displayTimeoutMs)
{ DistExecutor.unsafeRunWhenOn(Dist.CLIENT, ()->(()->TextOverlayGui.show(state, pos, displayTimeoutMs))); } // Only called when client side
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Client side handler // Client side handler
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -48,15 +69,19 @@ public class Overlay
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static class TextOverlayGui extends Screen public static class TextOverlayGui extends Screen
{ {
private static final Component EMPTY_TEXT = new TextComponent(""); private static final Component EMPTY_TEXT = Component.literal("");
private static final BlockState EMPTY_STATE = null;
private static double overlay_y_ = 0.75; private static double overlay_y_ = 0.75;
private static int text_color_ = 0x00ffaa00; private static int text_color_ = 0x00ffaa00;
private static int border_color_ = 0xaa333333; private static int border_color_ = 0xaa333333;
private static int background_color1_ = 0xaa333333; private static int background_color1_ = 0xaa333333;
private static int background_color2_ = 0xaa444444; private static int background_color2_ = 0xaa444444;
private final Minecraft mc; private final Minecraft mc;
private static long deadline_; private static long text_deadline_ = 0;
private static Component text_; private static Component text_ = EMPTY_TEXT;
private static long state_deadline_ = 0;
private static @Nullable BlockState state_ = EMPTY_STATE;
private static BlockPos pos_ = BlockPos.ZERO;
public static void on_config(double overlay_y) public static void on_config(double overlay_y)
{ on_config(overlay_y, 0x00ffaa00, 0xaa333333, 0xaa333333, 0xaa444444); } { on_config(overlay_y, 0x00ffaa00, 0xaa333333, 0xaa333333, 0xaa444444); }
@ -74,19 +99,25 @@ public class Overlay
{ return text_; } { return text_; }
public static synchronized long deadline() public static synchronized long deadline()
{ return deadline_; } { return text_deadline_; }
public static synchronized void hide() public static synchronized void hide()
{ deadline_ = 0; text_ = EMPTY_TEXT; } { text_deadline_ = 0; text_ = EMPTY_TEXT; }
public static synchronized void show(Component s, int displayTimeoutMs) public static synchronized void show(Component s, int displayTimeoutMs)
{ text_ = (s==null)?(EMPTY_TEXT):(s.copy()); deadline_ = System.currentTimeMillis() + displayTimeoutMs; } { text_ = (s==null)?(EMPTY_TEXT):(s.copy()); text_deadline_ = System.currentTimeMillis() + displayTimeoutMs; }
public static synchronized void show(String s, int displayTimeoutMs) public static synchronized void show(String s, int displayTimeoutMs)
{ text_ = ((s==null)||(s.isEmpty()))?(EMPTY_TEXT):(new TextComponent(s)); deadline_ = System.currentTimeMillis() + displayTimeoutMs; } { text_ = ((s==null)||(s.isEmpty()))?(EMPTY_TEXT):(Component.literal(s)); text_deadline_ = System.currentTimeMillis() + displayTimeoutMs; }
public static synchronized void show(BlockState state, BlockPos pos, int displayTimeoutMs)
{ pos_ = new BlockPos(pos); state_ = state; state_deadline_ = System.currentTimeMillis() + displayTimeoutMs; }
private static synchronized Optional<Tuple<BlockState,BlockPos>> state_pos()
{ return ((state_deadline_ < System.currentTimeMillis()) || (state_==EMPTY_STATE)) ? Optional.empty() : Optional.of(new Tuple<>(state_, pos_)); }
TextOverlayGui() TextOverlayGui()
{ super(new TextComponent("")); mc = SidedProxy.mc(); } { super(Component.literal("")); mc = SidedProxy.mc(); }
@SubscribeEvent @SubscribeEvent
public void onRenderGui(RenderGameOverlayEvent.Post event) public void onRenderGui(RenderGameOverlayEvent.Post event)
@ -96,7 +127,7 @@ public class Overlay
if(text()==EMPTY_TEXT) return; if(text()==EMPTY_TEXT) return;
String txt = text().getString(); String txt = text().getString();
if(txt.isEmpty()) return; if(txt.isEmpty()) return;
PoseStack mxs = event.getMatrixStack(); PoseStack mxs = event.getPoseStack();
final Window win = mc.getWindow(); final Window win = mc.getWindow();
final Font fr = mc.font; final Font fr = mc.font;
final boolean was_unicode = fr.isBidirectional(); final boolean was_unicode = fr.isBidirectional();
@ -111,6 +142,30 @@ public class Overlay
vLine(mxs, cx+(w/2)+2, cy-2, cy+h+2, 0xaa333333); vLine(mxs, cx+(w/2)+2, cy-2, cy+h+2, 0xaa333333);
drawCenteredString(mxs, fr, text(), cx , cy+1, 0x00ffaa00); drawCenteredString(mxs, fr, text(), cx , cy+1, 0x00ffaa00);
} }
@SubscribeEvent
public void onRenderWorldOverlay(RenderLevelLastEvent event)
{
final Optional<Tuple<BlockState,BlockPos>> sp = state_pos();
if(sp.isEmpty()) return;
final ClientLevel world = Minecraft.getInstance().level;
final LocalPlayer player = Minecraft.getInstance().player;
if((player==null) || (world==null)) return;
final BlockState state = sp.get().getA();
final BlockPos pos = sp.get().getB();
@SuppressWarnings("deprecation")
final int light = (world.hasChunkAt(pos)) ? LightTexture.pack(world.getBrightness(LightLayer.BLOCK, pos), world.getBrightness(LightLayer.SKY, pos)) : LightTexture.pack(15, 15);
final MultiBufferSource buffer = Minecraft.getInstance().renderBuffers().bufferSource();
final PoseStack mxs = event.getPoseStack();
final double px = Mth.lerp(event.getPartialTick(), player.xo, player.getX());
final double py = Mth.lerp(event.getPartialTick(), player.yo, player.getY());
final double pz = Mth.lerp(event.getPartialTick(), player.zo, player.getZ());
mxs.pushPose();
mxs.translate((pos.getX()-px), (pos.getY()-py-player.getEyeHeight()), (pos.getZ()-pz));
Minecraft.getInstance().getBlockRenderer().renderSingleBlock(state, mxs, buffer, light, OverlayTexture.NO_OVERLAY, EmptyModelData.INSTANCE);
mxs.popPose();
}
} }
} }

View file

@ -7,25 +7,27 @@
* Common game registry handling. * Common game registry handling.
*/ */
package wile.engineersdecor.libmc.detail; package wile.engineersdecor.libmc.detail;
import wile.engineersdecor.libmc.blocks.StandardBlocks;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey; import net.minecraft.tags.TagKey;
import net.minecraft.util.Tuple;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
import net.minecraft.world.inventory.MenuType; import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.*; import java.util.*;
import java.util.function.BiConsumer; import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -34,30 +36,43 @@ public class Registries
private static String modid = null; private static String modid = null;
private static String creative_tab_icon = ""; private static String creative_tab_icon = "";
private static CreativeModeTab creative_tab = null; private static CreativeModeTab creative_tab = null;
private static final List<Tuple<String, Supplier<? extends Block>>> block_suppliers = new ArrayList<>();
private static final List<Tuple<String, Supplier<? extends Item>>> item_suppliers = new ArrayList<>();
private static final List<Tuple<String, Supplier<? extends BlockEntityType<?>>>> block_entity_type_suppliers = new ArrayList<>();
private static final List<Tuple<String, Supplier<? extends EntityType<?>>>> entity_type_suppliers = new ArrayList<>();
private static final List<Tuple<String, Supplier<? extends MenuType<?>>>> menu_type_suppliers = new ArrayList<>();
private static final List<String> block_item_order = new ArrayList<>();
private static final Map<String, Block> registered_blocks = new HashMap<>();
private static final Map<String, Item> registered_items = new HashMap<>();
private static final Map<String, BlockEntityType<?>> registered_block_entity_types = new HashMap<>();
private static final Map<String, EntityType<?>> registered_entity_types = new HashMap<>();
private static final Map<String, MenuType<?>> registered_menu_types = new HashMap<>();
private static final Map<String, TagKey<Block>> registered_block_tag_keys = new HashMap<>(); private static final Map<String, TagKey<Block>> registered_block_tag_keys = new HashMap<>();
private static final Map<String, TagKey<Item>> registered_item_tag_keys = new HashMap<>(); private static final Map<String, TagKey<Item>> registered_item_tag_keys = new HashMap<>();
public static void init(String mod_id, String creative_tab_icon_item_name) private static final Map<String, RegistryObject<Block>> registered_blocks = new HashMap<>();
{ modid = mod_id; creative_tab_icon=creative_tab_icon_item_name; } private static final Map<String, RegistryObject<Item>> registered_items = new HashMap<>();
private static final Map<String, RegistryObject<BlockEntityType<?>>> registered_block_entity_types = new HashMap<>();
private static final Map<String, RegistryObject<EntityType<?>>> registered_entity_types = new HashMap<>();
private static final Map<String, RegistryObject<MenuType<?>>> registered_menu_types = new HashMap<>();
private static final Map<String, RegistryObject<RecipeSerializer<?>>> recipe_serializers = new HashMap<>();
private static DeferredRegister<Block> BLOCKS;
private static DeferredRegister<Item> ITEMS;
private static DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES;
private static DeferredRegister<MenuType<?>> MENUS;
private static DeferredRegister<EntityType<?>> ENTITIES;
private static DeferredRegister<RecipeSerializer<?>> RECIPE_SERIALIZERS;
private static List<DeferredRegister<?>> MOD_REGISTRIES;
public static void init(String mod_id, String creative_tab_icon_item_name, Consumer<DeferredRegister<?>> registrar)
{
modid = mod_id;
creative_tab_icon = creative_tab_icon_item_name;
BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, modid);
ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, modid);
BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, modid);
MENUS = DeferredRegister.create(ForgeRegistries.CONTAINERS, modid);
ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, modid);
RECIPE_SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, modid);
List.of(BLOCKS, ITEMS, BLOCK_ENTITIES, MENUS, ENTITIES, RECIPE_SERIALIZERS).forEach(registrar);
}
public static CreativeModeTab getCreativeModeTab() public static CreativeModeTab getCreativeModeTab()
{ {
if(creative_tab==null) { if(creative_tab==null) {
creative_tab = (new CreativeModeTab("tab" + modid) { creative_tab = (new CreativeModeTab("tab" + modid) {
public ItemStack makeIcon() { return new ItemStack(registered_items.get(creative_tab_icon)); } public ItemStack makeIcon() { return new ItemStack(getItem(creative_tab_icon)); }
}); });
} }
return creative_tab; return creative_tab;
@ -66,26 +81,35 @@ public class Registries
// ------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------
public static Block getBlock(String block_name) public static Block getBlock(String block_name)
{ return registered_blocks.get(block_name); } { return registered_blocks.get(block_name).get(); }
public static Item getItem(String name) public static Item getItem(String name)
{ return registered_items.get(name); } { return registered_items.get(name).get(); }
public static EntityType<?> getEntityType(String name) public static EntityType<?> getEntityType(String name)
{ return registered_entity_types.get(name); } { return registered_entity_types.get(name).get(); }
public static BlockEntityType<?> getBlockEntityType(String block_name) public static BlockEntityType<?> getBlockEntityType(String block_name)
{ return registered_block_entity_types.get(block_name); } { return registered_block_entity_types.get(block_name).get(); }
public static MenuType<?> getMenuType(String name) public static MenuType<?> getMenuType(String name)
{ return registered_menu_types.get(name); } { return registered_menu_types.get(name).get(); }
public static RecipeSerializer<?> getRecipeSerializer(String name)
{ return recipe_serializers.get(name).get(); }
public static BlockEntityType<?> getBlockEntityTypeOfBlock(String block_name) public static BlockEntityType<?> getBlockEntityTypeOfBlock(String block_name)
{ return getBlockEntityType("tet_"+block_name); } { return getBlockEntityType("tet_"+block_name); }
public static BlockEntityType<?> getBlockEntityTypeOfBlock(Block block)
{ return getBlockEntityTypeOfBlock(ForgeRegistries.BLOCKS.getKey(block).getPath()); }
public static MenuType<?> getMenuTypeOfBlock(String name) public static MenuType<?> getMenuTypeOfBlock(String name)
{ return getMenuType("ct_"+name); } { return getMenuType("ct_"+name); }
public static MenuType<?> getMenuTypeOfBlock(Block block)
{ return getMenuTypeOfBlock(ForgeRegistries.BLOCKS.getKey(block).getPath()); }
public static TagKey<Block> getBlockTagKey(String name) public static TagKey<Block> getBlockTagKey(String name)
{ return registered_block_tag_keys.get(name); } { return registered_block_tag_keys.get(name); }
@ -96,96 +120,57 @@ public class Registries
@Nonnull @Nonnull
public static List<Block> getRegisteredBlocks() public static List<Block> getRegisteredBlocks()
{ return Collections.unmodifiableList(registered_blocks.values().stream().toList()); } { return Collections.unmodifiableList(registered_blocks.values().stream().map(RegistryObject::get).toList()); }
@Nonnull @Nonnull
public static List<Item> getRegisteredItems() public static List<Item> getRegisteredItems()
{ return Collections.unmodifiableList(registered_items.values().stream().toList()); } { return Collections.unmodifiableList(registered_items.values().stream().map(RegistryObject::get).toList()); }
@Nonnull @Nonnull
public static List<BlockEntityType<?>> getRegisteredBlockEntityTypes() public static List<BlockEntityType<?>> getRegisteredBlockEntityTypes()
{ return Collections.unmodifiableList(registered_block_entity_types.values().stream().toList()); } { return Collections.unmodifiableList(registered_block_entity_types.values().stream().map(RegistryObject::get).toList()); }
@Nonnull @Nonnull
public static List<EntityType<?>> getRegisteredEntityTypes() public static List<EntityType<?>> getRegisteredEntityTypes()
{ return Collections.unmodifiableList(registered_entity_types.values().stream().toList()); } { return Collections.unmodifiableList(registered_entity_types.values().stream().map(RegistryObject::get).toList()); }
// ------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------
@SuppressWarnings("unchecked")
public static <T extends Item> void addItem(String registry_name, Supplier<T> supplier) public static <T extends Item> void addItem(String registry_name, Supplier<T> supplier)
{ { registered_items.put(registry_name, ITEMS.register(registry_name, supplier)); }
item_suppliers.add(new Tuple<>(registry_name, ()->{
final T instance = supplier.get();
instance.setRegistryName(new ResourceLocation(modid, registry_name));
return instance;
}));
}
@SuppressWarnings("unchecked")
public static <T extends Block> void addBlock(String registry_name, Supplier<T> block_supplier) public static <T extends Block> void addBlock(String registry_name, Supplier<T> block_supplier)
{ {
block_suppliers.add(new Tuple<>(registry_name, ()->{ registered_blocks.put(registry_name, BLOCKS.register(registry_name, block_supplier));
final T instance = block_supplier.get(); registered_items.put(registry_name, ITEMS.register(registry_name, ()->new BlockItem(registered_blocks.get(registry_name).get(), (new Item.Properties()).tab(getCreativeModeTab()))));
instance.setRegistryName(new ResourceLocation(modid, registry_name)); }
return instance;
})); public static <TB extends Block, TI extends Item> void addBlock(String registry_name, Supplier<TB> block_supplier, Supplier<TI> item_supplier)
{
registered_blocks.put(registry_name, BLOCKS.register(registry_name, block_supplier));
registered_items.put(registry_name, ITEMS.register(registry_name, item_supplier));
} }
@SuppressWarnings("unchecked")
public static <T extends BlockEntity> void addBlockEntityType(String registry_name, BlockEntityType.BlockEntitySupplier<T> ctor, String... block_names) public static <T extends BlockEntity> void addBlockEntityType(String registry_name, BlockEntityType.BlockEntitySupplier<T> ctor, String... block_names)
{ {
block_entity_type_suppliers.add(new Tuple<>(registry_name, ()->{ registered_block_entity_types.put(registry_name, BLOCK_ENTITIES.register(registry_name, ()->{
final Block[] blocks = Arrays.stream(block_names).map(s->{ final Block[] blocks = Arrays.stream(block_names).map(s->{
Block b = registered_blocks.get(s); Block b = BLOCKS.getEntries().stream().filter((ro)->ro.getId().getPath().equals(s)).findFirst().map(RegistryObject::get).orElse(null);
if(b==null) Auxiliaries.logError("registered_blocks does not encompass '" + s + "'"); if(b==null) Auxiliaries.logError("registered_blocks does not encompass '" + s + "'");
return b; return b;
}).filter(Objects::nonNull).collect(Collectors.toList()).toArray(new Block[]{}); }).filter(Objects::nonNull).collect(Collectors.toList()).toArray(new Block[]{});
final BlockEntityType<T> instance = BlockEntityType.Builder.of(ctor, blocks).build(null); return BlockEntityType.Builder.of(ctor, blocks).build(null);
instance.setRegistryName(modid, registry_name);
return instance;
})); }));
} }
@SuppressWarnings("unchecked")
public static <T extends BlockEntity> void addBlockEntityType(String registry_name, BlockEntityType.BlockEntitySupplier<T> ctor, Class<? extends Block> block_clazz)
{
block_entity_type_suppliers.add(new Tuple<>(registry_name, ()->{
final Block[] blocks = registered_blocks.values().stream().filter(block_clazz::isInstance).collect(Collectors.toList()).toArray(new Block[]{});
final BlockEntityType<T> instance = BlockEntityType.Builder.of(ctor, blocks).build(null);
instance.setRegistryName(modid, registry_name);
return instance;
}));
}
@SuppressWarnings("unchecked")
public static <T extends EntityType<?>> void addEntityType(String registry_name, Supplier<EntityType<?>> supplier) public static <T extends EntityType<?>> void addEntityType(String registry_name, Supplier<EntityType<?>> supplier)
{ entity_type_suppliers.add(new Tuple<>(registry_name, supplier)); } { registered_entity_types.put(registry_name, ENTITIES.register(registry_name, supplier)); }
@SuppressWarnings("unchecked")
public static <T extends MenuType<?>> void addMenuType(String registry_name, MenuType.MenuSupplier<?> supplier) public static <T extends MenuType<?>> void addMenuType(String registry_name, MenuType.MenuSupplier<?> supplier)
{ { registered_menu_types.put(registry_name, MENUS.register(registry_name, ()->new MenuType<>(supplier))); }
menu_type_suppliers.add(new Tuple<>(registry_name, ()->{
final MenuType<?> instance = new MenuType<>(supplier);
instance.setRegistryName(modid, registry_name);
return instance;
}));
}
@SuppressWarnings("unchecked") public static void addRecipeSerializer(String registry_name, Supplier<? extends RecipeSerializer<?>> serializer_supplier)
public static void addBlock(String registry_name, Supplier<? extends Block> block_supplier, BlockEntityType.BlockEntitySupplier<?> block_entity_ctor) { recipe_serializers.put(registry_name, RECIPE_SERIALIZERS.register(registry_name, serializer_supplier)); }
{
addBlock(registry_name, block_supplier);
addBlockEntityType("tet_"+registry_name, block_entity_ctor, registry_name);
}
@SuppressWarnings("unchecked")
public static void addBlock(String registry_name, Supplier<? extends Block> block_supplier, BlockEntityType.BlockEntitySupplier<?> block_entity_ctor, MenuType.MenuSupplier<?> menu_type_supplier)
{
addBlock(registry_name, block_supplier);
addBlockEntityType("tet_"+registry_name, block_entity_ctor, registry_name);
addMenuType("ct_"+registry_name, menu_type_supplier);
}
public static void addOptionalBlockTag(String tag_name, ResourceLocation... default_blocks) public static void addOptionalBlockTag(String tag_name, ResourceLocation... default_blocks)
{ {
@ -195,10 +180,7 @@ public class Registries
registered_block_tag_keys.put(tag_name, key); registered_block_tag_keys.put(tag_name, key);
} }
public static void addOptionalBlockTag(String tag_name, String... default_blocks) public static void addOptionaItemTag(String tag_name, ResourceLocation... default_items)
{ addOptionalBlockTag(tag_name, Arrays.stream(default_blocks).map(ResourceLocation::new).collect(Collectors.toList()).toArray(new ResourceLocation[]{})); }
public static void addOptionalItemTag(String tag_name, ResourceLocation... default_items)
{ {
final Set<Supplier<Item>> default_suppliers = new HashSet<>(); final Set<Supplier<Item>> default_suppliers = new HashSet<>();
for(ResourceLocation rl: default_items) default_suppliers.add(()->ForgeRegistries.ITEMS.getValue(rl)); for(ResourceLocation rl: default_items) default_suppliers.add(()->ForgeRegistries.ITEMS.getValue(rl));
@ -206,77 +188,36 @@ public class Registries
registered_item_tag_keys.put(tag_name, key); registered_item_tag_keys.put(tag_name, key);
} }
public static void addOptionalItemTag(String tag_name, String... default_items)
{ addOptionalBlockTag(tag_name, Arrays.stream(default_items).map(ResourceLocation::new).collect(Collectors.toList()).toArray(new ResourceLocation[]{})); }
// ------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------
public static void onBlockRegistry(BiConsumer<ResourceLocation, Block> registration) public static <TB extends Block, TI extends Item> void addBlock(String registry_name, Supplier<TB> block_supplier, BiFunction<Block, Item.Properties, Item> item_builder)
{ {
block_suppliers.forEach(e->{ addBlock(registry_name, block_supplier, ()->item_builder.apply(registered_blocks.get(registry_name).get(), (new Item.Properties()).tab(getCreativeModeTab())));
final Block block = e.getB().get();
final ResourceLocation rl = new ResourceLocation(modid, e.getA());
registration.accept(rl, block);
registered_blocks.put(e.getA(), block);
block_item_order.add(e.getA());
});
block_suppliers.clear();
} }
public static void onItemRegistry(BiConsumer<ResourceLocation, Item> registration) public static void addBlock(String registry_name, Supplier<? extends Block> block_supplier, BlockEntityType.BlockEntitySupplier<?> block_entity_ctor)
{ {
block_item_order.forEach(regname->{ addBlock(registry_name, block_supplier);
Block block = registered_blocks.get(regname); addBlockEntityType("tet_"+registry_name, block_entity_ctor, registry_name);
final ResourceLocation rl = block.getRegistryName();
Item item;
if(block instanceof StandardBlocks.IBlockItemFactory) {
item = ((StandardBlocks.IBlockItemFactory)block).getBlockItem(block, (new Item.Properties().tab(getCreativeModeTab())));
} else {
item = new BlockItem(block, (new Item.Properties().tab(getCreativeModeTab())));
}
item.setRegistryName(rl);
registration.accept(rl, item);
registered_items.put(rl.getPath(), item);
});
item_suppliers.forEach(e->{
final Item item = e.getB().get();
registration.accept(new ResourceLocation(modid, e.getA()), item);
registered_items.put(e.getA(), item);
});
item_suppliers.clear();
block_item_order.clear();
} }
public static void onBlockEntityRegistry(BiConsumer<ResourceLocation, BlockEntityType<?>> registration) public static void addBlock(String registry_name, Supplier<? extends Block> block_supplier, BiFunction<Block, Item.Properties, Item> item_builder, BlockEntityType.BlockEntitySupplier<?> block_entity_ctor)
{ {
block_entity_type_suppliers.forEach(e->{ addBlock(registry_name, block_supplier, item_builder);
final BlockEntityType<?> tet = e.getB().get(); addBlockEntityType("tet_"+registry_name, block_entity_ctor, registry_name);
registration.accept(new ResourceLocation(modid, e.getA()), tet);
registered_block_entity_types.put(e.getA(), tet);
});
block_entity_type_suppliers.clear();
} }
public static void onMenuTypeRegistry(BiConsumer<ResourceLocation, MenuType<?>> registration) public static void addBlock(String registry_name, Supplier<? extends Block> block_supplier, BiFunction<Block, Item.Properties, Item> item_builder, BlockEntityType.BlockEntitySupplier<?> block_entity_ctor, MenuType.MenuSupplier<?> menu_type_supplier)
{ {
menu_type_suppliers.forEach(e->{ addBlock(registry_name, block_supplier, item_builder);
final MenuType<?> ct = e.getB().get(); addBlockEntityType("tet_"+registry_name, block_entity_ctor, registry_name);
registration.accept(new ResourceLocation(modid, e.getA()), ct); addMenuType("ct_"+registry_name, menu_type_supplier);
registered_menu_types.put(e.getA(), ct);
});
menu_type_suppliers.clear();
} }
public static void onEntityRegistry(BiConsumer<ResourceLocation, EntityType<?>> registration) public static void addBlock(String registry_name, Supplier<? extends Block> block_supplier, BlockEntityType.BlockEntitySupplier<?> block_entity_ctor, MenuType.MenuSupplier<?> menu_type_supplier)
{ {
entity_type_suppliers.forEach(e->{ addBlock(registry_name, block_supplier, block_entity_ctor);
final ResourceLocation rl = new ResourceLocation(modid, e.getA()); addMenuType("ct_"+registry_name, menu_type_supplier);
final EntityType<?> et = e.getB().get();
et.setRegistryName(rl);
registration.accept(rl, et);
registered_entity_types.put(e.getA(), et);
});
entity_type_suppliers.clear();
} }
} }

View file

@ -29,14 +29,18 @@ public class SidedProxy
public static Minecraft mc() public static Minecraft mc()
{ return proxy.mc(); } { return proxy.mc(); }
@Nullable
public static Optional<Boolean> isCtrlDown() public static Optional<Boolean> isCtrlDown()
{ return proxy.isCtrlDown(); } { return proxy.isCtrlDown(); }
@Nullable
public static Optional<Boolean> isShiftDown() public static Optional<Boolean> isShiftDown()
{ return proxy.isShiftDown(); } { return proxy.isShiftDown(); }
public static Optional<String> getClipboard()
{ return proxy.getClipboard(); }
public static boolean setClipboard(String text)
{ return proxy.setClipboard(text); }
// -------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------
private static final ISidedProxy proxy = DistExecutor.unsafeRunForDist(()->ClientProxy::new, ()->ServerProxy::new); private static final ISidedProxy proxy = DistExecutor.unsafeRunForDist(()->ClientProxy::new, ()->ServerProxy::new);
@ -48,6 +52,8 @@ public class SidedProxy
default @Nullable Minecraft mc() { return null; } default @Nullable Minecraft mc() { return null; }
default Optional<Boolean> isCtrlDown() { return Optional.empty(); } default Optional<Boolean> isCtrlDown() { return Optional.empty(); }
default Optional<Boolean> isShiftDown() { return Optional.empty(); } default Optional<Boolean> isShiftDown() { return Optional.empty(); }
default Optional<String> getClipboard() { return Optional.empty(); }
default boolean setClipboard(String text) { return false; }
} }
private static final class ClientProxy implements ISidedProxy private static final class ClientProxy implements ISidedProxy
@ -57,6 +63,8 @@ public class SidedProxy
public @Nullable Minecraft mc() { return Minecraft.getInstance(); } public @Nullable Minecraft mc() { return Minecraft.getInstance(); }
public Optional<Boolean> isCtrlDown() { return Optional.of(Auxiliaries.isCtrlDown()); } public Optional<Boolean> isCtrlDown() { return Optional.of(Auxiliaries.isCtrlDown()); }
public Optional<Boolean> isShiftDown() { return Optional.of(Auxiliaries.isShiftDown()); } public Optional<Boolean> isShiftDown() { return Optional.of(Auxiliaries.isShiftDown()); }
public Optional<String> getClipboard() { return (mc()==null) ? Optional.empty() : Optional.of(net.minecraft.client.gui.font.TextFieldHelper.getClipboardContents(mc())); }
public boolean setClipboard(String text) { if(mc()==null) {return false;} net.minecraft.client.gui.font.TextFieldHelper.setClipboardContents(Minecraft.getInstance(), text); return true; }
} }
private static final class ServerProxy implements ISidedProxy private static final class ServerProxy implements ISidedProxy

View file

@ -1,8 +1,20 @@
/*
* @file Guis.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2020 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Gui Wrappers and Widgets.
*/
package wile.engineersdecor.libmc.ui; package wile.engineersdecor.libmc.ui;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.TooltipDisplay;
import com.mojang.blaze3d.platform.Window;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.client.gui.narration.NarrationElementOutput;
import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
@ -10,7 +22,6 @@ import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.client.sounds.SoundManager; import net.minecraft.client.sounds.SoundManager;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Inventory;
@ -19,9 +30,8 @@ import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import wile.engineersdecor.libmc.detail.TooltipDisplay;
import java.util.Arrays;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
@ -47,7 +57,7 @@ public class Guis
this.player_ = player_inv.player; this.player_ = player_inv.player;
this.imageWidth = width; this.imageWidth = width;
this.imageHeight = height; this.imageHeight = height;
gui_background_ = new Guis.BackgroundImage(background_image_, width, height, new Coord2d(0,0)); gui_background_ = new Guis.BackgroundImage(background_image_, width, height, Coord2d.ORIGIN);
} }
public ContainerGui(T menu, Inventory player_inv, Component title, String background_image) public ContainerGui(T menu, Inventory player_inv, Component title, String background_image)
@ -55,14 +65,14 @@ public class Guis
super(menu, player_inv, title); super(menu, player_inv, title);
this.background_image_ = new ResourceLocation(Auxiliaries.modid(), background_image); this.background_image_ = new ResourceLocation(Auxiliaries.modid(), background_image);
this.player_ = player_inv.player; this.player_ = player_inv.player;
gui_background_ = new Guis.BackgroundImage(background_image_, imageWidth, imageHeight, new Coord2d(0,0)); gui_background_ = new Guis.BackgroundImage(background_image_, imageWidth, imageHeight, Coord2d.ORIGIN);
} }
@Override @Override
public void init() public void init()
{ {
super.init(); super.init();
gui_background_.init(this, new Coord2d(0,0)).show(); gui_background_.init(this, Coord2d.ORIGIN).show();
} }
@Override @Override
@ -128,23 +138,29 @@ public class Guis
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static class Coord2d public static class Coord2d
{ {
public static final Coord2d ORIGIN = new Coord2d(0,0);
public final int x, y; public final int x, y;
public Coord2d(int x, int y) { this.x=x; this.y=y; } public Coord2d(int x, int y) { this.x=x; this.y=y; }
public static Coord2d of(int x, int y) { return new Coord2d(x,y); }
public String toString() { return "["+x+","+y+"]"; }
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static class UiWidget extends net.minecraft.client.gui.components.AbstractWidget public static class UiWidget extends net.minecraft.client.gui.components.AbstractWidget
{ {
protected static final Component EMPTY_TEXT = new TextComponent(""); protected static final Component EMPTY_TEXT = Component.literal("");
protected static final Function<UiWidget,Component> NO_TOOLTIP = (uiw)->EMPTY_TEXT; protected static final Function<UiWidget,Component> NO_TOOLTIP = (uiw)->EMPTY_TEXT;
@SuppressWarnings("all") private Function<UiWidget,Component> tooltip_ = NO_TOOLTIP; private final Minecraft mc_;
private Function<UiWidget,Component> tooltip_ = NO_TOOLTIP;
private Screen parent_;
public UiWidget(int x, int y, int width, int height, Component title) public UiWidget(int x, int y, int width, int height, Component title)
{ super(x, y, width, height, title); } { super(x, y, width, height, title); mc_ = Minecraft.getInstance(); }
public UiWidget init(Screen parent) public UiWidget init(Screen parent)
{ {
this.parent_ = parent;
this.x += ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiLeft() : 0); this.x += ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiLeft() : 0);
this.y += ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiTop() : 0); this.y += ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiTop() : 0);
return this; return this;
@ -152,17 +168,36 @@ public class Guis
public UiWidget init(Screen parent, Coord2d position) public UiWidget init(Screen parent, Coord2d position)
{ {
this.parent_ = parent;
this.x = position.x + ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiLeft() : 0); this.x = position.x + ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiLeft() : 0);
this.y = position.y + ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiTop() : 0); this.y = position.y + ((parent instanceof AbstractContainerScreen<?>) ? ((AbstractContainerScreen<?>)parent).getGuiTop() : 0);
return this; return this;
} }
public int getWidth() public final UiWidget tooltip(Function<UiWidget,Component> tip)
{ tooltip_ = tip; return this; }
public final UiWidget tooltip(Component tip)
{ tooltip_ = (o)->tip; return this; }
public final int getWidth()
{ return this.width; } { return this.width; }
public int getHeight() public final int getHeight()
{ return this.height; } { return this.height; }
public Coord2d getMousePosition()
{
final Window win = mc_.getWindow();
return Coord2d.of(
Mth.clamp(((int)(mc_.mouseHandler.xpos() * (double)win.getGuiScaledWidth() / (double)win.getScreenWidth()))-this.x, -1, this.width+1),
Mth.clamp(((int)(mc_.mouseHandler.ypos() * (double)win.getGuiScaledHeight() / (double)win.getScreenHeight()))-this.y, -1, this.height+1)
);
}
protected final Coord2d screenCoordinates(Coord2d xy, boolean reverse)
{ return (reverse) ? (Coord2d.of(xy.x+x, xy.y+y)) : (Coord2d.of(xy.x-x, xy.y-y)); }
public UiWidget show() public UiWidget show()
{ visible = true; return this; } { visible = true; return this; }
@ -170,18 +205,20 @@ public class Guis
{ visible = false; return this; } { visible = false; return this; }
@Override @Override
public void renderButton(PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) public void renderButton(PoseStack mxs, int mouseX, int mouseY, float partialTicks)
{ {
super.renderButton(matrixStack, mouseX, mouseY, partialTicks); super.renderButton(mxs, mouseX, mouseY, partialTicks);
if(isHovered) renderToolTip(matrixStack, mouseX, mouseY); if(isHovered) renderToolTip(mxs, mouseX, mouseY);
} }
@Override @Override
@SuppressWarnings("all") @SuppressWarnings("all")
public void renderToolTip(PoseStack matrixStack, int mouseX, int mouseY) public void renderToolTip(PoseStack mx, int mouseX, int mouseY)
{ {
if(tooltip_ == NO_TOOLTIP) return; if(!visible || (!active) || (tooltip_ == NO_TOOLTIP)) return;
/// todo: need a Screen for that, not sure if adding a reference initialized in init() may cause GC problems. final Component tip = tooltip_.apply(this);
if(tip.getString().trim().isEmpty()) return;
parent_.renderTooltip(mx, Arrays.asList(tip.getVisualOrderText()), mouseX, mouseY);
} }
@Override @Override
@ -233,18 +270,19 @@ public class Guis
{} {}
@Override @Override
public void renderButton(PoseStack mx, int mouseX, int mouseY, float partialTicks) public void renderButton(PoseStack mxs, int mouseX, int mouseY, float partialTicks)
{ {
RenderSystem.setShaderTexture(0, atlas_); RenderSystem.setShaderTexture(0, atlas_);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha);
RenderSystem.enableBlend(); RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc(); RenderSystem.defaultBlendFunc();
RenderSystem.enableDepthTest(); RenderSystem.enableDepthTest();
blit(mx, x, y, texture_position_base_.x, texture_position_base_.y, width, height); blit(mxs, x, y, texture_position_base_.x, texture_position_base_.y, width, height);
if((progress_max_ > 0) && (progress_ > 0)) { if((progress_max_ > 0) && (progress_ > 0)) {
int w = Mth.clamp((int)Math.round((progress_ * width) / progress_max_), 0, width); int w = Mth.clamp((int)Math.round((progress_ * width) / progress_max_), 0, width);
blit(mx, x, y, texture_position_filled_.x, texture_position_filled_.y, w, height); blit(mxs, x, y, texture_position_filled_.x, texture_position_filled_.y, w, height);
} }
if(isHovered) renderToolTip(mxs, mouseX, mouseY);
} }
} }
@ -271,7 +309,6 @@ public class Guis
RenderSystem.setShaderTexture(0, atlas_); RenderSystem.setShaderTexture(0, atlas_);
parent.blit(mx, x, y, atlas_position_.x, atlas_position_.y, width, height); parent.blit(mx, x, y, atlas_position_.x, atlas_position_.y, width, height);
} }
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -305,7 +342,7 @@ public class Guis
{ checked_ = !checked_; on_click_.accept(this); } { checked_ = !checked_; on_click_.accept(this); }
@Override @Override
public void renderButton(PoseStack mx, int mouseX, int mouseY, float partialTicks) public void renderButton(PoseStack mxs, int mouseX, int mouseY, float partialTicks)
{ {
RenderSystem.setShader(GameRenderer::getPositionTexShader); RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.setShaderTexture(0, atlas_); RenderSystem.setShaderTexture(0, atlas_);
@ -314,9 +351,88 @@ public class Guis
RenderSystem.defaultBlendFunc(); RenderSystem.defaultBlendFunc();
RenderSystem.enableDepthTest(); RenderSystem.enableDepthTest();
Coord2d pos = checked_ ? texture_position_on_ : texture_position_off_; Coord2d pos = checked_ ? texture_position_on_ : texture_position_off_;
blit(mx, x, y, pos.x, pos.y, width, height); blit(mxs, x, y, pos.x, pos.y, width, height);
if(isHovered) renderToolTip(mxs, mouseX, mouseY);
} }
} }
@OnlyIn(Dist.CLIENT)
public static class ImageButton extends UiWidget
{
private final Coord2d texture_position_;
private final ResourceLocation atlas_;
private Consumer<ImageButton> on_click_ = (bt)->{};
public ImageButton(ResourceLocation atlas, int width, int height, Coord2d atlas_texture_position)
{
super(0, 0, width, height, Component.empty());
texture_position_ = atlas_texture_position;
atlas_ = atlas;
}
public ImageButton onclick(Consumer<ImageButton> action)
{ on_click_ = action; return this; }
@Override
public void onClick(double mouseX, double mouseY)
{ on_click_.accept(this); }
@Override
public void renderButton(PoseStack mxs, int mouseX, int mouseY, float partialTicks)
{
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.setShaderTexture(0, atlas_);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.enableDepthTest();
Coord2d pos = texture_position_;
blit(mxs, x, y, pos.x, pos.y, width, height);
if(isHovered) renderToolTip(mxs, mouseX, mouseY);
}
}
@OnlyIn(Dist.CLIENT)
public static class Image extends UiWidget
{
private final Coord2d texture_position_;
private final ResourceLocation atlas_;
public Image(ResourceLocation atlas, int width, int height, Coord2d atlas_texture_position)
{
super(0, 0, width, height, Component.empty());
texture_position_ = atlas_texture_position;
atlas_ = atlas;
}
@Override
public void onClick(double mouseX, double mouseY)
{}
@Override
public void renderButton(PoseStack mxs, int mouseX, int mouseY, float partialTicks)
{
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.setShaderTexture(0, atlas_);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.enableDepthTest();
Coord2d pos = texture_position_;
blit(mxs, x, y, pos.x, pos.y, width, height);
if(isHovered) renderToolTip(mxs, mouseX, mouseY);
}
}
@OnlyIn(Dist.CLIENT)
public static class TextBox extends net.minecraft.client.gui.components.EditBox
{
public TextBox(int x, int y, int width, int height, Component title, Font font) { super(font, x, y, width, height, title); setBordered(false); }
public TextBox withMaxLength(int len) { super.setMaxLength(len); return this; }
public TextBox withBordered(boolean b) { super.setBordered(b); return this; }
public TextBox withValue(String s) { super.setValue(s); return this; }
public TextBox withEditable(boolean e) { super.setEditable(e); return this; }
public TextBox withResponder(Consumer<String> r) { super.setResponder(r); return this; }
}
} }

View file

@ -1,7 +1,7 @@
# @file mods.toml # @file mods.toml
# @spec TOML v0.5.0 (https://github.com/toml-lang/toml) # @spec TOML v0.5.0 (https://github.com/toml-lang/toml)
modLoader="javafml" modLoader="javafml"
loaderVersion="[39,)" loaderVersion="[41,)"
issueTrackerURL="https://github.com/stfwi/engineers-decor/issues/" issueTrackerURL="https://github.com/stfwi/engineers-decor/issues/"
license="MIT" license="MIT"
@ -12,20 +12,20 @@ displayName="Engineer's Decor"
description="Adds cosmetic blocks for the engineer's workshop, factory and home." description="Adds cosmetic blocks for the engineer's workshop, factory and home."
authors="wilechaote" authors="wilechaote"
credits="BluSunrize, Damien Hazard, malte0811, et al., the Forge Smiths." credits="BluSunrize, Damien Hazard, malte0811, et al., the Forge Smiths."
updateJSONURL="https://raw.githubusercontent.com/stfwi/engineers-decor/versions/1.18.json" updateJSONURL="https://raw.githubusercontent.com/stfwi/engineers-decor/versions/1.19.json"
displayURL="https://www.curseforge.com/minecraft/mc-mods/engineers-decor" displayURL="https://www.curseforge.com/minecraft/mc-mods/engineers-decor"
logoFile="logo.png" logoFile="logo.png"
[[dependencies.engineersdecor]] [[dependencies.engineersdecor]]
modId="forge" modId="forge"
mandatory=true mandatory=true
versionRange="[40.1,)" versionRange="[41,)"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"
[[dependencies.engineersdecor]] [[dependencies.engineersdecor]]
modId="minecraft" modId="minecraft"
mandatory=true mandatory=true
versionRange="[1.18.2,1.19)" versionRange="[1.19,1.20)"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_concrete_se_model" }
}
}

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_aluminum_se_model" }
}
}

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_copper_se_model" }
}
}

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_gold_se_model" }
}
}

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_iron_se_model" }
}
}

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_sheetmetal_steel_se_model" }
}
}

View file

@ -1,19 +0,0 @@
{
"variants": {
"parts=0": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s0_model" },
"parts=1": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s1_model" },
"parts=2": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s2_model" },
"parts=3": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s3_model" },
"parts=4": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s4_model" },
"parts=5": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s5_model" },
"parts=6": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s6_model" },
"parts=7": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s7_model" },
"parts=8": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s8_model" },
"parts=9": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_s9_model" },
"parts=10": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_sa_model" },
"parts=11": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_sb_model" },
"parts=12": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_sc_model" },
"parts=13": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_sd_model" },
"parts=14": { "model": "engineersdecor:block/slab/specific/halfslab_treated_wood_se_model" }
}
}

View file

@ -1,8 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/device/labeled_crate_model" },
"facing=south": { "model": "engineersdecor:block/device/labeled_crate_model", "y":180 },
"facing=west": { "model": "engineersdecor:block/device/labeled_crate_model", "y":270 },
"facing=east": { "model": "engineersdecor:block/device/labeled_crate_model", "y":90 }
}
}

View file

@ -1,8 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/device/metal_crafting_table_model" },
"facing=south": { "model": "engineersdecor:block/device/metal_crafting_table_model", "y":180 },
"facing=west": { "model": "engineersdecor:block/device/metal_crafting_table_model", "y":270 },
"facing=east": { "model": "engineersdecor:block/device/metal_crafting_table_model", "y":90 }
}
}

View file

@ -1,10 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/sign/sign_factoryarea_model", "y":180 },
"facing=south": { "model": "engineersdecor:block/sign/sign_factoryarea_model" },
"facing=west": { "model": "engineersdecor:block/sign/sign_factoryarea_model", "y":90 },
"facing=east": { "model": "engineersdecor:block/sign/sign_factoryarea_model", "y":270 },
"facing=up": { "model": "engineersdecor:block/sign/sign_factoryarea_model" },
"facing=down": { "model": "engineersdecor:block/sign/sign_factoryarea_model" }
}
}

View file

@ -1,10 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model" },
"facing=south": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model", "y":180 },
"facing=west": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model", "y":270 },
"facing=east": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model", "y":90 },
"facing=up": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model" },
"facing=down": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model" }
}
}

View file

@ -1,8 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/ladder/treated_wood_ladder_model" },
"facing=south": { "model": "engineersdecor:block/ladder/treated_wood_ladder_model", "y":180 },
"facing=west": { "model": "engineersdecor:block/ladder/treated_wood_ladder_model", "y":270 },
"facing=east": { "model": "engineersdecor:block/ladder/treated_wood_ladder_model", "y":90 }
}
}

View file

@ -1 +0,0 @@
{ "variants": { "": { "model": "engineersdecor:block/furniture/treated_wood_table_model" } } }

View file

@ -1,10 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/furniture/treated_wood_window_model" },
"facing=south": { "model": "engineersdecor:block/furniture/treated_wood_window_model", "y":180 },
"facing=west": { "model": "engineersdecor:block/furniture/treated_wood_window_model", "y":270 },
"facing=east": { "model": "engineersdecor:block/furniture/treated_wood_window_model", "y":90 },
"facing=up": { "model": "engineersdecor:block/furniture/treated_wood_window_model", "x":270 },
"facing=down": { "model": "engineersdecor:block/furniture/treated_wood_window_model", "x":90 }
}
}

View file

@ -1,10 +0,0 @@
{
"variants": {
"facing=north": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_model" },
"facing=south": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_model", "y":180 },
"facing=west": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_model", "y":270 },
"facing=east": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_model", "y":90 },
"facing=up": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_model" },
"facing=down": { "model": "engineersdecor:block/furniture/treated_wood_windowsill_model" }
}
}

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "An upside down trapdoor, placed\n above maintenance shafts or ladders.\n Creeper-proof, works as ladder\n when open.", "block.engineersdecor.iron_hatch.help": "An upside down trapdoor, placed\n above maintenance shafts or ladders.\n Creeper-proof, works as ladder\n when open.",
"block.engineersdecor.iron_inset_light": "Inset Light", "block.engineersdecor.iron_inset_light": "Inset Light",
"block.engineersdecor.iron_inset_light.help": "Small glowstone light source, sunk\n into the floor, ceiling or wall.\n Useful to light up places where\n electrical light installations\n are problematic.", "block.engineersdecor.iron_inset_light.help": "Small glowstone light source, sunk\n into the floor, ceiling or wall.\n Useful to light up places where\n electrical light installations\n are problematic.",
"block.engineersdecor.labeled_crate": "Labeled Crate",
"block.engineersdecor.labeled_crate.help": "A storage crate with 9x6 slots and\n a built-in item frame at the front.\n Place an item into the frame slot\n at the bottom right of the GUI to\n define the shown label.",
"block.engineersdecor.labeled_crate.tip": "§6Label:§r %1$s\n%2$s slots used / %3$s free\n%4$s total items stored\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Metal Crafting Table",
"block.engineersdecor.metal_crafting_table.help": "Decorative crafting table with\n advanced features. Eighteen storage\n slots, keeps inventory, no vanilla\n recipe book. Click up/down arrow\n buttons for crafting history\n selection, output slot for item\n placement, X-button to clear\n crafting grid and history.\n Shift-click stack: player-to-storage\n stack transfer when crafting grid\n empty, otherwise player-to-grid\n stack transfer. Automatically\n distributes the clicked stack.\n Shift-Ctrl-click stack: Move all\n same stacks. Mouse wheel over\n crafting slot: Increase/decrease\n crafting grid items.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Clear grid to player inventory",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Move items from player inventory",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Move items from storage",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Next crafting history recipe",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Show next colliding recipe",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Previous crafting history recipe",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Clear grid to player inventory",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Clear grid to storage",
"block.engineersdecor.metal_rung_ladder": "Metal Rung Ladder", "block.engineersdecor.metal_rung_ladder": "Metal Rung Ladder",
"block.engineersdecor.metal_rung_ladder.help": "Typical industrial wall ladder,\n consisting of horizontal metal\n rod rungs. Look up/down to climb\n faster.", "block.engineersdecor.metal_rung_ladder.help": "Typical industrial wall ladder,\n consisting of horizontal metal\n rod rungs. Look up/down to climb\n faster.",
"block.engineersdecor.metal_rung_steps": "Staggered Metal Steps", "block.engineersdecor.metal_rung_steps": "Staggered Metal Steps",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Sign \"Caution Defense System Ahead\"", "block.engineersdecor.sign_defense": "Sign \"Caution Defense System Ahead\"",
"block.engineersdecor.sign_exit": "Exit Sign", "block.engineersdecor.sign_exit": "Exit Sign",
"block.engineersdecor.sign_exit.help": "There's the door, please ...", "block.engineersdecor.sign_exit.help": "There's the door, please ...",
"block.engineersdecor.sign_factoryarea": "Sign \"Factory Area\"",
"block.engineersdecor.sign_firehazard": "Sign \"Fire Hazard\"", "block.engineersdecor.sign_firehazard": "Sign \"Fire Hazard\"",
"block.engineersdecor.sign_frost": "Sign \"Frost Warning\"", "block.engineersdecor.sign_frost": "Sign \"Frost Warning\"",
"block.engineersdecor.sign_hotsurface": "Sign \"Caution Hot Surface\"", "block.engineersdecor.sign_hotsurface": "Sign \"Caution Hot Surface\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Straight hollow pole fragment\n (4x4x16) for structural support\n purposes.", "block.engineersdecor.thin_steel_pole.help": "Straight hollow pole fragment\n (4x4x16) for structural support\n purposes.",
"block.engineersdecor.thin_steel_pole_head": "Straight Thin Steel Pole head/foot", "block.engineersdecor.thin_steel_pole_head": "Straight Thin Steel Pole head/foot",
"block.engineersdecor.thin_steel_pole_head.help": "Steel part fitting as foot or head\n of the thin steel pole (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Steel part fitting as foot or head\n of the thin steel pole (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Broad Treated Wood Window Sill",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Simple window decoration.",
"block.engineersdecor.treated_wood_floor": "Treated Wood Floor", "block.engineersdecor.treated_wood_floor": "Treated Wood Floor",
"block.engineersdecor.treated_wood_floor.help": "Decorative floor tiles with texture variations.", "block.engineersdecor.treated_wood_floor.help": "Decorative floor tiles with texture variations.",
"block.engineersdecor.treated_wood_ladder": "Treated Wood Ladder",
"block.engineersdecor.treated_wood_ladder.help": "Weather-proof wooden ladder.\n Look up/down to climb faster.",
"block.engineersdecor.treated_wood_pole": "Straight Treated Wood Pole", "block.engineersdecor.treated_wood_pole": "Straight Treated Wood Pole",
"block.engineersdecor.treated_wood_pole.help": "Straight pole fragment with a\n diameter of a wire relay. Can\n be useful as alternative to the\n wire posts if special lengths\n are needed, or as support for structures.", "block.engineersdecor.treated_wood_pole.help": "Straight pole fragment with a\n diameter of a wire relay. Can\n be useful as alternative to the\n wire posts if special lengths\n are needed, or as support for structures.",
"block.engineersdecor.treated_wood_pole_head": "Straight Treated Wood Pole Head/Foot", "block.engineersdecor.treated_wood_pole_head": "Straight Treated Wood Pole Head/Foot",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Needed after the work's done.", "block.engineersdecor.treated_wood_side_table.help": "Needed after the work's done.",
"block.engineersdecor.treated_wood_stool": "Treated Wood Stool", "block.engineersdecor.treated_wood_stool": "Treated Wood Stool",
"block.engineersdecor.treated_wood_stool.help": "Robust Wood Stool. Indoor and\n outdoor use.", "block.engineersdecor.treated_wood_stool.help": "Robust Wood Stool. Indoor and\n outdoor use.",
"block.engineersdecor.treated_wood_table": "Treated Wood Table",
"block.engineersdecor.treated_wood_table.help": "Robust four-legged wood table.\n Indoor and outdoor use.",
"block.engineersdecor.treated_wood_window": "Treated Wood Window",
"block.engineersdecor.treated_wood_window.help": "Wood framed triple glazed window.\n Well insulating. Does not connect\n to adjacent blocks like glass\n panes.",
"block.engineersdecor.treated_wood_windowsill": "Treated Wood Window Sill",
"block.engineersdecor.treated_wood_windowsill.help": "Simple window decoration.",
"item.engineersdecor.metal_bar": "Metal Bar", "item.engineersdecor.metal_bar": "Metal Bar",
"engineersdecor.book.landing_text": "Tip in advance: To get a short tooltip help text for a block or device, press the CONTROL and SHIFT keys at the same time while hovering. That way you do not need to carry this heavy manual with you all the time. The more detailed descriptions in this book are helpful if the features are new for you, or if you like to read up about background aspects.", "engineersdecor.book.landing_text": "Tip in advance: To get a short tooltip help text for a block or device, press the CONTROL and SHIFT keys at the same time while hovering. That way you do not need to carry this heavy manual with you all the time. The more detailed descriptions in this book are helpful if the features are new for you, or if you like to read up about background aspects.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.", "block.engineersdecor.iron_hatch.help": "Una trampilla invertida, colocada sobre las fosas de mantenimiento o las escaleras.\n A prueba de Creepers, funciona como escalera cuando está abierta.",
"block.engineersdecor.iron_inset_light": "Luz de inserción", "block.engineersdecor.iron_inset_light": "Luz de inserción",
"block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.", "block.engineersdecor.iron_inset_light.help": "Pequeña fuente de luz de piedra brillante, empotrada en el suelo, el techo o la pared.\n Útil para iluminar lugares donde las instalaciones de luz eléctrica son problemáticas.",
"block.engineersdecor.labeled_crate": "Caja etiquetada",
"block.engineersdecor.labeled_crate.help": "Una caja de almacenamiento con ranuras de 9x6 y un marco de objetos incorporado en la parte delantera.\n Coloque un elemento en la ranura del marco en la parte inferior derecha de la GUI para definir la etiqueta a mostrar.",
"block.engineersdecor.labeled_crate.tip": "§6Etiqueta:§r %1$s\n%2$s ranuras usadas / %3$s libre\n%4$s total de objetos almacenados\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Mesa de trabajo de metal",
"block.engineersdecor.metal_crafting_table.help": "Mesa de trabajo decorativa con características avanzadas.\n 18 ranuras de almacenamiento, mantiene el inventario, sin libro de recetas vanilla.\n Haga clic en los botones de flecha arriba/abajo para la selección del historial de trabajo, ranura de salida para la colocación de objetos, botón X para borrar la cuadrícula de trabajo y el historial.\n Mayús+click en una pila: se transfiere la pila de jugador a almacén cuando la cuadrícula de trabajo está vacía, de lo contrario se transfiere la pila de jugador a cuadrícula.\n Distribuye automáticamente la pila clickeada.\n Mayús izq.+Ctrl+click en una pila: Mueve todas las pilas iguales.\n Rueda del ratón sobre la ranura de trabajo: aumenta/disminuye los elementos de la cuadrícula de trabajo.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Mover objetos del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Sacar los objetos del contenedor",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Receta siguiente de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Mostrar la siguiente receta de colisión",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Receta previa de historial de trabajo",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Borrar la cuadrícula del inventario del jugador",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Borrar la cuadrícula del contenedor",
"block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal", "block.engineersdecor.metal_rung_ladder": "Escalera de peldaños de metal",
"block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.", "block.engineersdecor.metal_rung_ladder.help": "Típica escalera industrial de pared, formada por peldaños horizontales de varilla metálica.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados", "block.engineersdecor.metal_rung_steps": "Peldaños metálicos escalonados",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"", "block.engineersdecor.sign_defense": "Signo \"Precaución: Sistema de defensa por delante\"",
"block.engineersdecor.sign_exit": "Señal de salida", "block.engineersdecor.sign_exit": "Señal de salida",
"block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...", "block.engineersdecor.sign_exit.help": "Ahí está la puerta, por favor ...",
"block.engineersdecor.sign_factoryarea": "Signo \"Zona de la fábrica\"",
"block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"", "block.engineersdecor.sign_firehazard": "Signo \"Peligro de incendio\"",
"block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"", "block.engineersdecor.sign_frost": "Signo \"Peligro de heladas\"",
"block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"", "block.engineersdecor.sign_hotsurface": "Signo \"Precaución: Superficie caliente\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.", "block.engineersdecor.thin_steel_pole.help": "Fragmento de poste hueco recto (4x4x16) para soporte estructural.",
"block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado", "block.engineersdecor.thin_steel_pole_head": "Cabeza/pie de poste de acero recto y delgado",
"block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pieza de acero que sirve de pie o cabeza del poste de acero delgado (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Alféizar de ventana de madera tratada ancha",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Decoración simple de ventanas.",
"block.engineersdecor.treated_wood_floor": "Piso de madera tratada", "block.engineersdecor.treated_wood_floor": "Piso de madera tratada",
"block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.", "block.engineersdecor.treated_wood_floor.help": "Piso decorativo con variaciones de textura.",
"block.engineersdecor.treated_wood_ladder": "Escalera de madera tratada",
"block.engineersdecor.treated_wood_ladder.help": "Escalera de madera resistente a la intemperie.\n Mira hacia arriba/abajo para escalar más rápido.",
"block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada", "block.engineersdecor.treated_wood_pole": "Poste recto de madera tratada",
"block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.", "block.engineersdecor.treated_wood_pole.help": "Fragmento de poste recto con un diámetro de un relé de cable.\n Puede ser útil como alternativa a los postes de cables si se necesitan longitudes especiales, o como soporte de estructuras.",
"block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada", "block.engineersdecor.treated_wood_pole_head": "Cabeza/pie de poste recto de madera tratada",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.", "block.engineersdecor.treated_wood_side_table.help": "Se necesita después de que el trabajo esté hecho.",
"block.engineersdecor.treated_wood_stool": "Taburete de madera tratada", "block.engineersdecor.treated_wood_stool": "Taburete de madera tratada",
"block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.", "block.engineersdecor.treated_wood_stool.help": "Robusto taburete de madera. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_table": "Mesa de madera tratada",
"block.engineersdecor.treated_wood_table.help": "Robusta mesa de madera de cuatro patas. Uso en interiores y exteriores.",
"block.engineersdecor.treated_wood_window": "Ventana de madera tratada",
"block.engineersdecor.treated_wood_window.help": "Ventana con marco de madera y triple acristalamiento. Buen aislante.\n No se conecta a los bloques adyacentes como los cristales.",
"block.engineersdecor.treated_wood_windowsill": "Alféizar de madera tratada",
"block.engineersdecor.treated_wood_windowsill.help": "Decoración simple de ventanas.",
"item.engineersdecor.metal_bar": "Barra de metal", "item.engineersdecor.metal_bar": "Barra de metal",
"engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.", "engineersdecor.book.landing_text": "Consejo previo: Para obtener un breve texto de ayuda sobre un bloque o dispositivo, pulse las teclas CTRL y MAYÚS IZQ. al mismo tiempo mientras pasa el ratón por encima. Así no tendrá que llevar siempre consigo este pesado manual. Las descripciones más detalladas de este libro son útiles si las funciones son nuevas para ti, o si te gusta leer sobre aspectos de fondo.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Une trappe à l'envers, placée\n au-dessus des puits ou des échelles de maintenance.\n À l'épreuve des creepers, fonctionne comme une échelle\n lorsqu'elle est ouverte.", "block.engineersdecor.iron_hatch.help": "Une trappe à l'envers, placée\n au-dessus des puits ou des échelles de maintenance.\n À l'épreuve des creepers, fonctionne comme une échelle\n lorsqu'elle est ouverte.",
"block.engineersdecor.iron_inset_light": "Lumière encastrée", "block.engineersdecor.iron_inset_light": "Lumière encastrée",
"block.engineersdecor.iron_inset_light.help": "Petite source de lumière en pierre lumineuse,\n encastrée dans le sol, le plafond ou le mur.\n Utile pour éclairer les endroits\n où les installations électriques posent problème.", "block.engineersdecor.iron_inset_light.help": "Petite source de lumière en pierre lumineuse,\n encastrée dans le sol, le plafond ou le mur.\n Utile pour éclairer les endroits\n où les installations électriques posent problème.",
"block.engineersdecor.labeled_crate": "Caisse étiquetée",
"block.engineersdecor.labeled_crate.help": "Une caisse de stockage avec 9 x 6 emplacements et\n un cadre d'élément intégré à l'avant.\n Placez un élément dans l'emplacement du cadre\n en bas à droite de l'interface graphique pour\n définir l'étiquette affichée.",
"block.engineersdecor.labeled_crate.tip": "§6Étiquette :§r %1$s\n%2$s emplacements utilisés / %3$s libres\n%4$s articles stockés au total\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Table d'artisanat en métal",
"block.engineersdecor.metal_crafting_table.help": "Table de bricolage décorative avec des fonctionnalités avancées. Dix-huit emplacements de stockage\n, garde l'inventaire, pas de livre de recettes\n. Cliquez sur les flèches haut/bas\n pour sélectionner l'historique d'artisanat\n, l'emplacement de sortie pour l'emplacement\n d'objet, le bouton X pour effacer\n la grille d'artisanat et l'historique.\n Maj-clic sur la pile : joueur vers stockage\n pile transfert lors de la création d'une grille\n vide, sinon transfert de pile joueur à grille\n. Distribue automatiquement\n la pile sur laquelle vous avez cliqué.\n Maj-Ctrl-clic sur la pile : Déplacez toutes\n les mêmes piles. Roulette de la souris sur\n l'emplacement d'artisanat : augmentez/diminuez\n les éléments de la grille d'artisanat.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Vide la grille dans l'inventaire du joueur",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Déplace les objets de l'inventaire du joueur",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Déplace les objets de l'inventaire du joueur",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Prochaine recette de l'histoire de l'artisanat",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Afficher la prochaine recette correspondantes",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Recette précédente de l'histoire de l'artisanat",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Vide la grille dans l'inventaire du joueur",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Vide la grille dans l'inventaire",
"block.engineersdecor.metal_rung_ladder": "Échelle à échelons en métal", "block.engineersdecor.metal_rung_ladder": "Échelle à échelons en métal",
"block.engineersdecor.metal_rung_ladder.help": "Échelle murale industrielle typique, composée\n de barreaux métalliques horizontaux. Regardez vers le haut/bas pour grimper\n plus vite.", "block.engineersdecor.metal_rung_ladder.help": "Échelle murale industrielle typique, composée\n de barreaux métalliques horizontaux. Regardez vers le haut/bas pour grimper\n plus vite.",
"block.engineersdecor.metal_rung_steps": "Marches en métal échelonnées", "block.engineersdecor.metal_rung_steps": "Marches en métal échelonnées",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Pancarte \"Attention système de défense devant\"", "block.engineersdecor.sign_defense": "Pancarte \"Attention système de défense devant\"",
"block.engineersdecor.sign_exit": "Panneau de sortie", "block.engineersdecor.sign_exit": "Panneau de sortie",
"block.engineersdecor.sign_exit.help": "Voilà la porte, s'il vous plait...", "block.engineersdecor.sign_exit.help": "Voilà la porte, s'il vous plait...",
"block.engineersdecor.sign_factoryarea": "Pancarte \"Zone d'usine\"",
"block.engineersdecor.sign_firehazard": "Pancarte \"Risque d'incendie\"", "block.engineersdecor.sign_firehazard": "Pancarte \"Risque d'incendie\"",
"block.engineersdecor.sign_frost": "Pancarte \"Avertissement de gel\"", "block.engineersdecor.sign_frost": "Pancarte \"Avertissement de gel\"",
"block.engineersdecor.sign_hotsurface": "Pancarte \"Attention surface chaude\"", "block.engineersdecor.sign_hotsurface": "Pancarte \"Attention surface chaude\"",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Fragment de poteau creux droit\n (4x4x16) à des fins de support\n structurel.", "block.engineersdecor.thin_steel_pole.help": "Fragment de poteau creux droit\n (4x4x16) à des fins de support\n structurel.",
"block.engineersdecor.thin_steel_pole_head": "Tête/pied droit fin en acier", "block.engineersdecor.thin_steel_pole_head": "Tête/pied droit fin en acier",
"block.engineersdecor.thin_steel_pole_head.help": "Pièce en acier servant de pied ou de tête\n au poteau droit fin en acier (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Pièce en acier servant de pied ou de tête\n au poteau droit fin en acier (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Appui de fenêtre large en bois traité",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Décoration de fenêtre simple.",
"block.engineersdecor.treated_wood_floor": "Plancher de bois traité", "block.engineersdecor.treated_wood_floor": "Plancher de bois traité",
"block.engineersdecor.treated_wood_floor.help": "Carreaux de sol décoratifs avec variations de texture.", "block.engineersdecor.treated_wood_floor.help": "Carreaux de sol décoratifs avec variations de texture.",
"block.engineersdecor.treated_wood_ladder": "Échelle en bois traité",
"block.engineersdecor.treated_wood_ladder.help": "Échelle en bois résistante aux intempéries.\n Regardez vers le haut/vers le bas pour grimper plus vite.",
"block.engineersdecor.treated_wood_pole": "Poteau droit en bois traité", "block.engineersdecor.treated_wood_pole": "Poteau droit en bois traité",
"block.engineersdecor.treated_wood_pole.help": "Fragment de poteau droit avec un\n diamètre d'un fil relais. Peut\n être utile comme alternative aux\n poteaux éléctriques si des longueurs\n spéciales sont nécessaires, ou comme support pour les structures.", "block.engineersdecor.treated_wood_pole.help": "Fragment de poteau droit avec un\n diamètre d'un fil relais. Peut\n être utile comme alternative aux\n poteaux éléctriques si des longueurs\n spéciales sont nécessaires, ou comme support pour les structures.",
"block.engineersdecor.treated_wood_pole_head": "Tête/pied de poteau droit en bois traité", "block.engineersdecor.treated_wood_pole_head": "Tête/pied de poteau droit en bois traité",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Nécessaire après les travaux.", "block.engineersdecor.treated_wood_side_table.help": "Nécessaire après les travaux.",
"block.engineersdecor.treated_wood_stool": "Tabouret en bois traité", "block.engineersdecor.treated_wood_stool": "Tabouret en bois traité",
"block.engineersdecor.treated_wood_stool.help": "Tabouret en bois robuste. Utilisation intérieure et\n extérieure.", "block.engineersdecor.treated_wood_stool.help": "Tabouret en bois robuste. Utilisation intérieure et\n extérieure.",
"block.engineersdecor.treated_wood_table": "Table en bois traité",
"block.engineersdecor.treated_wood_table.help": "Table en bois robuste à quatre pieds.\n Utilisation intérieure et extérieure.",
"block.engineersdecor.treated_wood_window": "Fenêtre en bois traité",
"block.engineersdecor.treated_wood_window.help": "Fenêtre triple vitrage à ossature bois.\n Bien isolant. Ne se connecte pas\n aux blocs adjacents comme les vitres.",
"block.engineersdecor.treated_wood_windowsill": "Appui de fenêtre en bois traité",
"block.engineersdecor.treated_wood_windowsill.help": "Décoration de fenêtre simple.",
"item.engineersdecor.metal_bar": "Barre de métal", "item.engineersdecor.metal_bar": "Barre de métal",
"engineersdecor.book.landing_text": "Astuce à l'avance : pour obtenir un court texte d'aide d'info-bulle pour un bloc ou un appareil, appuyez simultanément sur les touches CONTROL et MAJ tout en survolant. De cette façon, vous n'avez pas besoin de transporter ce manuel lourd avec vous tout le temps. Les descriptions plus détaillées de ce livre sont utiles si les fonctionnalités sont nouvelles pour vous ou si vous souhaitez en savoir plus sur les aspects de fond.", "engineersdecor.book.landing_text": "Astuce à l'avance : pour obtenir un court texte d'aide d'info-bulle pour un bloc ou un appareil, appuyez simultanément sur les touches CONTROL et MAJ tout en survolant. De cette façon, vous n'avez pas besoin de transporter ce manuel lourd avec vous tout le temps. Les descriptions plus détaillées de ce livre sont utiles si les fonctionnalités sont nouvelles pour vous ou si vous souhaitez en savoir plus sur les aspects de fond.",
"engineersdecor.book.name": "Engineer's Decor", "engineersdecor.book.name": "Engineer's Decor",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "Перевернутый люк, размещается над обслуживающими шахтами или лестницами. Криперо-устойчив. В открытом состоянии работает как лестница.", "block.engineersdecor.iron_hatch.help": "Перевернутый люк, размещается над обслуживающими шахтами или лестницами. Криперо-устойчив. В открытом состоянии работает как лестница.",
"block.engineersdecor.iron_inset_light": "Встраиваемый осветитель", "block.engineersdecor.iron_inset_light": "Встраиваемый осветитель",
"block.engineersdecor.iron_inset_light.help": "Маленький источник света, интегрируемый в стены, пол или потолок.\n Полезно для освещения мест, где проблематичны электрические осветительные установки.", "block.engineersdecor.iron_inset_light.help": "Маленький источник света, интегрируемый в стены, пол или потолок.\n Полезно для освещения мест, где проблематичны электрические осветительные установки.",
"block.engineersdecor.labeled_crate": "Ящик с рамкой",
"block.engineersdecor.labeled_crate.help": "Ящик для хранения со слотами 9x6 и встроенной рамкой для предмета спереди.\nПоместите предмет в слот рамки в правом нижнем углу GUI, чтобы обозначить ящик.",
"block.engineersdecor.labeled_crate.tip": "§6Метка:§r %1$s\n%2$s слотов использовано / %3$s свободно\n%4$s общее количество хранимых предметов\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "Верстак из обработанного дерева",
"block.engineersdecor.metal_crafting_table.help": "Прочный и устойчивый к погодным условиям. Восемь слотов для хранения. Хранит инвентарь. Нажимайте кнопки со стрелками вверх/вниз для выбора из истории, выходной слот для размещения предметов, X-кнопка очистить сетку крафта и историю. Shift-клик по стеку: передача стека от игрока в хранилище при создании если сетка пуста, в противном случае перенос от игрока в сетку. Автоматически распределяет кликаемый стек. Shift-Ctrl-клик по стаку: перемещает одинаковые стаки. Колёсико мыши: добавляет/отнимает предметы в сетке.",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "Очистить сетку в инвентарь игрока",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "Переместить предметы из инвентаря игрока",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "Переместить предметы из хранилища",
"block.engineersdecor.metal_crafting_table.tooltips.next": "Следующий рецепт истории крафта",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "Показать следующий рецепт",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "Предыдущий рецепт истории крафта",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "Очистить сетку в инвентарь игрока",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "Очистить сетку в хранилище",
"block.engineersdecor.metal_rung_ladder": "Металлическая лестница", "block.engineersdecor.metal_rung_ladder": "Металлическая лестница",
"block.engineersdecor.metal_rung_ladder.help": "Типичная промышленная настенная лестница, состоящая из горизонтальных металлических стержней. Смотри вверх/вниз, чтобы подняться быстрее.", "block.engineersdecor.metal_rung_ladder.help": "Типичная промышленная настенная лестница, состоящая из горизонтальных металлических стержней. Смотри вверх/вниз, чтобы подняться быстрее.",
"block.engineersdecor.metal_rung_steps": "Настенные металлические ступеньки", "block.engineersdecor.metal_rung_steps": "Настенные металлические ступеньки",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "Знак «Осторожно, впереди система обороны»", "block.engineersdecor.sign_defense": "Знак «Осторожно, впереди система обороны»",
"block.engineersdecor.sign_exit": "Знак «Выход»", "block.engineersdecor.sign_exit": "Знак «Выход»",
"block.engineersdecor.sign_exit.help": "Там дверь, пожалуйста ...", "block.engineersdecor.sign_exit.help": "Там дверь, пожалуйста ...",
"block.engineersdecor.sign_factoryarea": "Знак «Заводская зона»",
"block.engineersdecor.sign_firehazard": "Знак «Пожароопасность»", "block.engineersdecor.sign_firehazard": "Знак «Пожароопасность»",
"block.engineersdecor.sign_frost": "Знак «Осторожно, мороз»", "block.engineersdecor.sign_frost": "Знак «Осторожно, мороз»",
"block.engineersdecor.sign_hotsurface": "Знак «Горячая поверхность»", "block.engineersdecor.sign_hotsurface": "Знак «Горячая поверхность»",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "Фрагмент прямого полого столба (4x4x16) для поддержки конструкции.", "block.engineersdecor.thin_steel_pole.help": "Фрагмент прямого полого столба (4x4x16) для поддержки конструкции.",
"block.engineersdecor.thin_steel_pole_head": "Прямое тонкое стальное основание/наконечник столбов", "block.engineersdecor.thin_steel_pole_head": "Прямое тонкое стальное основание/наконечник столбов",
"block.engineersdecor.thin_steel_pole_head.help": "Стальная часть, подходящая как основание или наконечник тонкого стального столба (4x4x16).", "block.engineersdecor.thin_steel_pole_head.help": "Стальная часть, подходящая как основание или наконечник тонкого стального столба (4x4x16).",
"block.engineersdecor.treated_wood_broad_windowsill": "Широкий обработанный деревянный подоконник",
"block.engineersdecor.treated_wood_broad_windowsill.help": "Простое оформление окон.",
"block.engineersdecor.treated_wood_floor": "Пол из обработанного дерева", "block.engineersdecor.treated_wood_floor": "Пол из обработанного дерева",
"block.engineersdecor.treated_wood_floor.help": "Декоративная напольная плитка с текстурными вариациями.", "block.engineersdecor.treated_wood_floor.help": "Декоративная напольная плитка с текстурными вариациями.",
"block.engineersdecor.treated_wood_ladder": "Лестница из обработанного дерева",
"block.engineersdecor.treated_wood_ladder.help": "Погодоустойчивая деревянная лестница. Смотри вверх/вниз, чтобы подняться быстрее.",
"block.engineersdecor.treated_wood_pole": "Прямой обработанный деревянный столб", "block.engineersdecor.treated_wood_pole": "Прямой обработанный деревянный столб",
"block.engineersdecor.treated_wood_pole.help": "Надёжный столб с диаметром, схожим с реле.\n Может быть полезен в качестве альтернативы столбам для проводов, если требуется особая специальная длина, или как опора для конструкций.", "block.engineersdecor.treated_wood_pole.help": "Надёжный столб с диаметром, схожим с реле.\n Может быть полезен в качестве альтернативы столбам для проводов, если требуется особая специальная длина, или как опора для конструкций.",
"block.engineersdecor.treated_wood_pole_head": "Прямой обработанный деревянный столб (верхняя часть/основание)", "block.engineersdecor.treated_wood_pole_head": "Прямой обработанный деревянный столб (верхняя часть/основание)",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "Нужен после того, как работа выполнена.", "block.engineersdecor.treated_wood_side_table.help": "Нужен после того, как работа выполнена.",
"block.engineersdecor.treated_wood_stool": "Табурет из обработанного дерева", "block.engineersdecor.treated_wood_stool": "Табурет из обработанного дерева",
"block.engineersdecor.treated_wood_stool.help": "Крепкий деревянный табурет. Для использования в помещении и на улице.", "block.engineersdecor.treated_wood_stool.help": "Крепкий деревянный табурет. Для использования в помещении и на улице.",
"block.engineersdecor.treated_wood_table": "Стол из обработанного дерева",
"block.engineersdecor.treated_wood_table.help": "Прочный деревянный стол с четырьмя ножками. Для использования в помещении и на улице.",
"block.engineersdecor.treated_wood_window": "Обработанное деревянное окно",
"block.engineersdecor.treated_wood_window.help": "Деревянный каркас окна с тройным остеклением. Ну и шумоизоляция.",
"block.engineersdecor.treated_wood_windowsill": "Обработанный деревянный подоконник",
"block.engineersdecor.treated_wood_windowsill.help": "Простое оформление окон.",
"item.engineersdecor.metal_bar": "Металлический брусок", "item.engineersdecor.metal_bar": "Металлический брусок",
"engineersdecor.book.landing_text": "Совет заранее: Чтобы получить краткую подсказку для блока или устройства, зажмите клавиши CONTROL и SHIFT при наведении мышкой. Таким образом, Вам не нужно постоянно носить с собой это тяжелое руководство. Более подробные описания в этой книге будут полезны, если функции в новинку, или если хотите узнать об основных аспектах.", "engineersdecor.book.landing_text": "Совет заранее: Чтобы получить краткую подсказку для блока или устройства, зажмите клавиши CONTROL и SHIFT при наведении мышкой. Таким образом, Вам не нужно постоянно носить с собой это тяжелое руководство. Более подробные описания в этой книге будут полезны, если функции в новинку, или если хотите узнать об основных аспектах.",
"engineersdecor.book.name": "Инженерный декор", "engineersdecor.book.name": "Инженерный декор",

View file

@ -137,19 +137,6 @@
"block.engineersdecor.iron_hatch.help": "一个上下颠倒的活板门,可放置在维修竖井或者梯子上方。\n 防爆,打开时可以当作梯子。", "block.engineersdecor.iron_hatch.help": "一个上下颠倒的活板门,可放置在维修竖井或者梯子上方。\n 防爆,打开时可以当作梯子。",
"block.engineersdecor.iron_inset_light": "嵌入灯", "block.engineersdecor.iron_inset_light": "嵌入灯",
"block.engineersdecor.iron_inset_light.help": "小型荧石光源,可嵌入地板、天花板或墙里。\n 用于照亮电力光源难以安装的地方。亮度与火把一样。", "block.engineersdecor.iron_inset_light.help": "小型荧石光源,可嵌入地板、天花板或墙里。\n 用于照亮电力光源难以安装的地方。亮度与火把一样。",
"block.engineersdecor.labeled_crate": "带标签的储物箱",
"block.engineersdecor.labeled_crate.help": "具备 9x6 大小格子的木箱,前面自带一个物品展示框。\n 将物品放置在 GUI 右下角的框架格内,可以定义所显示的标签。",
"block.engineersdecor.labeled_crate.tip": "§6标签§r %1$s\n已使用 %2$s / 剩余 %3$s \n 共存储 %4$s 件物品\n---\n%5$s",
"block.engineersdecor.metal_crafting_table": "金属工作台",
"block.engineersdecor.metal_crafting_table.help": "坚固,抗候。内含八个存储格,破坏后保留内容物,没有原版合成书。\n 单击上/下箭头按钮可选择合成历史,单击输出格自动放置物品,单击 X 按钮清除合成格和历史。\n Shift 单击一叠物品:合成格空时转移到存储格,非空时到合成格。\n 会自动分配转移的物品。\n Shift-Ctrl 单击一叠物品:移动所有相同的物品。\n 在合成格上滑动鼠标滚轮:增加/减少合成格的物品数",
"block.engineersdecor.metal_crafting_table.tooltips.clear": "将合成栏物品全部移到玩家物品栏",
"block.engineersdecor.metal_crafting_table.tooltips.fromplayer": "从玩家物品栏移动物品",
"block.engineersdecor.metal_crafting_table.tooltips.fromstorage": "从工作台存储移动物品",
"block.engineersdecor.metal_crafting_table.tooltips.next": "下一历史配方",
"block.engineersdecor.metal_crafting_table.tooltips.nextcollisionrecipe": "显示下一个冲突配方",
"block.engineersdecor.metal_crafting_table.tooltips.prev": "上一历史配方",
"block.engineersdecor.metal_crafting_table.tooltips.toplayer": "将合成栏物品全部移到玩家物品栏",
"block.engineersdecor.metal_crafting_table.tooltips.tostorage": "将合成栏物品全部移到工作台存储",
"block.engineersdecor.metal_rung_ladder": "金属蹬梯子", "block.engineersdecor.metal_rung_ladder": "金属蹬梯子",
"block.engineersdecor.metal_rung_ladder.help": "典型的工业墙梯,由水平的金属杆蹬组成。\n 往上/下看会爬得更快。", "block.engineersdecor.metal_rung_ladder.help": "典型的工业墙梯,由水平的金属杆蹬组成。\n 往上/下看会爬得更快。",
"block.engineersdecor.metal_rung_steps": "交错金属台阶", "block.engineersdecor.metal_rung_steps": "交错金属台阶",
@ -185,7 +172,6 @@
"block.engineersdecor.sign_defense": "标志牌“小心防御系统”", "block.engineersdecor.sign_defense": "标志牌“小心防御系统”",
"block.engineersdecor.sign_exit": "出口标志牌", "block.engineersdecor.sign_exit": "出口标志牌",
"block.engineersdecor.sign_exit.help": "门在这边,请……", "block.engineersdecor.sign_exit.help": "门在这边,请……",
"block.engineersdecor.sign_factoryarea": "标志牌“工厂区域”",
"block.engineersdecor.sign_firehazard": "标志牌“小心火焰”", "block.engineersdecor.sign_firehazard": "标志牌“小心火焰”",
"block.engineersdecor.sign_frost": "标志牌“小心霜冻”", "block.engineersdecor.sign_frost": "标志牌“小心霜冻”",
"block.engineersdecor.sign_hotsurface": "标志牌“小心热表面”", "block.engineersdecor.sign_hotsurface": "标志牌“小心热表面”",
@ -267,12 +253,8 @@
"block.engineersdecor.thin_steel_pole.help": "一段直空心杆4x4x16适用于结构支撑。", "block.engineersdecor.thin_steel_pole.help": "一段直空心杆4x4x16适用于结构支撑。",
"block.engineersdecor.thin_steel_pole_head": "直细钢杆头/尾", "block.engineersdecor.thin_steel_pole_head": "直细钢杆头/尾",
"block.engineersdecor.thin_steel_pole_head.help": "钢制部件适合作为细钢杆4x4x16的头或尾。", "block.engineersdecor.thin_steel_pole_head.help": "钢制部件适合作为细钢杆4x4x16的头或尾。",
"block.engineersdecor.treated_wood_broad_windowsill": "宽防腐木窗台",
"block.engineersdecor.treated_wood_broad_windowsill.help": "简单的窗户装饰。",
"block.engineersdecor.treated_wood_floor": "防腐木地板", "block.engineersdecor.treated_wood_floor": "防腐木地板",
"block.engineersdecor.treated_wood_floor.help": "装饰性地板砖,有可变的贴图。", "block.engineersdecor.treated_wood_floor.help": "装饰性地板砖,有可变的贴图。",
"block.engineersdecor.treated_wood_ladder": "防腐木梯",
"block.engineersdecor.treated_wood_ladder.help": "防风雨的木梯。\n 往上/下看会爬得更快。",
"block.engineersdecor.treated_wood_pole": "直防腐木杆", "block.engineersdecor.treated_wood_pole": "直防腐木杆",
"block.engineersdecor.treated_wood_pole.help": "直杆的一段,有着继电器的直径。\n 在需要特殊长度电线杆的时候很有用,也可以作为结构的柱子。", "block.engineersdecor.treated_wood_pole.help": "直杆的一段,有着继电器的直径。\n 在需要特殊长度电线杆的时候很有用,也可以作为结构的柱子。",
"block.engineersdecor.treated_wood_pole_head": "直防腐木杆头/尾", "block.engineersdecor.treated_wood_pole_head": "直防腐木杆头/尾",
@ -283,12 +265,6 @@
"block.engineersdecor.treated_wood_side_table.help": "干完活后需要喝杯茶。", "block.engineersdecor.treated_wood_side_table.help": "干完活后需要喝杯茶。",
"block.engineersdecor.treated_wood_stool": "防腐木凳", "block.engineersdecor.treated_wood_stool": "防腐木凳",
"block.engineersdecor.treated_wood_stool.help": "坚固的木凳。\n 适用于室内和室外使用。", "block.engineersdecor.treated_wood_stool.help": "坚固的木凳。\n 适用于室内和室外使用。",
"block.engineersdecor.treated_wood_table": "防腐木桌",
"block.engineersdecor.treated_wood_table.help": "结实的四脚木桌。\n 适用于室内和室外使用。",
"block.engineersdecor.treated_wood_window": "防腐木窗",
"block.engineersdecor.treated_wood_window.help": "木框三层玻璃窗。\n 绝缘良好。\n 不像玻璃板一样连接到相邻方块。",
"block.engineersdecor.treated_wood_windowsill": "防腐木窗台",
"block.engineersdecor.treated_wood_windowsill.help": "简单的窗户装饰。",
"item.engineersdecor.metal_bar": "金属棒", "item.engineersdecor.metal_bar": "金属棒",
"engineersdecor.book.landing_text": "事先提示:要获得方块或设备的简短提示文本,请在鼠标悬停时同时按 CONTROL 和 SHIFT 键。这样你就不需要一直带着这个沉重的手册了。如果这些特性对你来说不太熟悉,或者你想了解更多背景,那么这本书中更详细的描述会很有帮助。", "engineersdecor.book.landing_text": "事先提示:要获得方块或设备的简短提示文本,请在鼠标悬停时同时按 CONTROL 和 SHIFT 键。这样你就不需要一直带着这个沉重的手册了。如果这些特性对你来说不太熟悉,或者你想了解更多背景,那么这本书中更详细的描述会很有帮助。",
"engineersdecor.book.name": "工程师的装饰", "engineersdecor.book.name": "工程师的装饰",

View file

@ -1,77 +0,0 @@
{
"parent": "block/block",
"textures": {
"f": "engineersdecor:block/misc/labeled_crate_front_texture",
"particle": "engineersdecor:block/misc/labeled_crate_side_texture",
"s": "engineersdecor:block/misc/labeled_crate_side_texture"
},
"elements": [
{
"from": [0, 7, 0],
"to": [16, 16, 0.25],
"faces": {
"north": {"texture": "#f"},
"east": {"texture": "#s"},
"west": {"texture": "#s"},
"up": {"texture": "#s"},
"down": {"texture": "#s"}
}
},
{
"from": [0, 0, 0.25],
"to": [16, 16, 16],
"faces": {
"north": {"texture": "#f"},
"east": {"texture": "#s"},
"south": {"texture": "#s"},
"west": {"texture": "#s"},
"up": {"texture": "#s"},
"down": {"texture": "#s"}
}
},
{
"from": [7, 0, 0],
"to": [16, 7, 0.25],
"faces": {
"north": {"texture": "#f"},
"east": {"texture": "#s"},
"south": {"texture": "#s"},
"west": {"texture": "#s"},
"down": {"texture": "#s"}
}
},
{
"from": [0, 0, 0],
"to": [1, 7, 0.375],
"faces": {
"north": {"texture": "#f"},
"east": {"texture": "#s"},
"south": {"texture": "#s"},
"west": {"texture": "#s"},
"down": {"texture": "#s"}
}
},
{
"from": [1, 0, 0],
"to": [7, 1, 0.25],
"faces": {
"north": {"texture": "#f"},
"up": {"texture": "#s"},
"down": {"texture": "#s"}
}
}
],
"display": {
"ground": {
"translation": [0, 1.75, 0],
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -1,171 +0,0 @@
{
"parent": "block/block",
"textures": {
"s": "engineersdecor:block/crafting_table/metal_crafting_table_side",
"t": "engineersdecor:block/crafting_table/metal_crafting_table_top",
"f": "engineersdecor:block/crafting_table/metal_crafting_table_front",
"m": "engineersdecor:block/crafting_table/metal_crafting_table_tray",
"particle": "engineersdecor:block/crafting_table/metal_crafting_table_tray"
},
"elements": [
{
"from": [0, 15, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 1], "texture": "#f"},
"east": {"uv": [0, 0, 16, 1], "texture": "#s"},
"south": {"uv": [0, 0, 16, 1], "texture": "#s"},
"west": {"uv": [0, 0, 16, 1], "texture": "#s"},
"up": {"uv": [0, 0, 16, 16], "texture": "#t"},
"down": {"uv": [0, 0, 16, 16], "texture": "#t"}
}
},
{
"from": [1, 0, 1],
"to": [3, 12, 3],
"faces": {
"north": {"uv": [13, 4, 15, 16], "texture": "#f"},
"east": {"uv": [13, 4, 15, 16], "texture": "#s"},
"south": {"uv": [1, 4, 3, 16], "texture": "#s"},
"west": {"uv": [1, 4, 3, 16], "texture": "#s"},
"down": {"uv": [1, 13, 3, 15], "texture": "#m"}
}
},
{
"from": [1, 12, 1],
"to": [15, 15, 15],
"faces": {
"north": {"uv": [1, 1, 15, 4], "texture": "#f"},
"east": {"uv": [1, 1, 15, 4], "texture": "#s"},
"south": {"uv": [1, 1, 15, 4], "texture": "#s"},
"west": {"uv": [1, 1, 15, 4], "texture": "#s"},
"down": {"uv": [1, 1, 15, 15], "texture": "#m"}
}
},
{
"from": [1.5, 1, 1.5],
"to": [14.5, 11, 14.5],
"faces": {
"north": {"uv": [1.5, 5, 14.5, 15], "texture": "#f"},
"east": {"uv": [1.5, 5, 14.5, 15], "texture": "#s"},
"south": {"uv": [1.5, 5, 14.5, 15], "texture": "#s"},
"west": {"uv": [1.5, 5, 14.5, 15], "texture": "#s"},
"up": {"uv": [1.5, 1.5, 14.5, 14.5], "texture": "#m"},
"down": {"uv": [1.5, 1.5, 14.5, 14.5], "texture": "#m"}
}
},
{
"from": [1, 0, 13],
"to": [3, 12, 15],
"faces": {
"north": {"uv": [13, 4, 15, 16], "texture": "#s"},
"east": {"uv": [1, 4, 3, 16], "texture": "#s"},
"south": {"uv": [1, 4, 3, 16], "texture": "#s"},
"west": {"uv": [13, 4, 15, 16], "texture": "#s"},
"down": {"uv": [1, 1, 3, 3], "texture": "#m"}
}
},
{
"from": [13, 0, 1],
"to": [15, 12, 3],
"faces": {
"north": {"uv": [1, 4, 3, 16], "texture": "#f"},
"east": {"uv": [13, 4, 15, 16], "texture": "#s"},
"south": {"uv": [13, 4, 15, 16], "texture": "#s"},
"west": {"uv": [1, 4, 3, 16], "texture": "#s"},
"down": {"uv": [13, 13, 15, 15], "texture": "#m"}
}
},
{
"from": [13, 0, 13],
"to": [15, 12, 15],
"faces": {
"north": {"uv": [1, 4, 3, 16], "texture": "#s"},
"east": {"uv": [1, 4, 3, 16], "texture": "#s"},
"south": {"uv": [13, 4, 15, 16], "texture": "#s"},
"west": {"uv": [13, 4, 15, 16], "texture": "#s"},
"down": {"uv": [13, 1, 15, 3], "texture": "#m"}
}
},
{
"from": [5, 13, 0],
"to": [11, 14, 0.5],
"faces": {
"north": {"uv": [4, 2, 10, 3], "texture": "#m"},
"east": {"uv": [15, 2, 16, 3], "texture": "#m"},
"south": {"uv": [5, 2, 11, 3], "texture": "#m"},
"west": {"uv": [0, 2, 1, 3], "texture": "#m"},
"up": {"uv": [0, 1, 6, 2], "texture": "#m"},
"down": {"uv": [8, 14, 14, 15], "texture": "#m"}
}
},
{
"from": [10, 13, 0.5],
"to": [11, 14, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]},
"faces": {
"north": {"uv": [5, 3, 11, 4], "texture": "#m"},
"east": {"uv": [15, 2, 16, 3], "texture": "#m"},
"south": {"uv": [5, 2, 11, 3], "texture": "#m"},
"west": {"uv": [0, 2, 1, 3], "texture": "#m"},
"up": {"uv": [0, 1, 6, 2], "texture": "#m"},
"down": {"uv": [8, 14, 14, 15], "texture": "#m"}
}
},
{
"from": [5, 13, 0.5],
"to": [6, 14, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [3, 8, 8.5]},
"faces": {
"north": {"uv": [5, 3, 11, 4], "texture": "#m"},
"east": {"uv": [15, 2, 16, 3], "texture": "#m"},
"south": {"uv": [5, 2, 11, 3], "texture": "#m"},
"west": {"uv": [0, 2, 1, 3], "texture": "#m"},
"up": {"uv": [0, 1, 6, 2], "texture": "#m"},
"down": {"uv": [8, 14, 14, 15], "texture": "#m"}
}
},
{
"from": [11, 6, 0],
"to": [12, 9, 0.5],
"faces": {
"north": {"uv": [13, 4, 14, 7], "texture": "#m"},
"east": {"uv": [15, 10, 16, 13], "texture": "#m"},
"south": {"uv": [11, 7, 12, 10], "texture": "#m"},
"west": {"uv": [1, 10, 2, 13], "texture": "#m"},
"up": {"uv": [10, 2, 11, 3], "texture": "#m"},
"down": {"uv": [8, 13, 9, 14], "texture": "#m"}
}
},
{
"from": [11.5, 6, 0.5],
"to": [12, 9, 1],
"faces": {
"north": {"uv": [14, 7, 15, 10], "texture": "#m"},
"east": {"uv": [15, 10, 16, 13], "texture": "#m"},
"south": {"uv": [11, 7, 12, 10], "texture": "#m"},
"west": {"uv": [1, 10, 2, 13], "texture": "#m"},
"up": {"uv": [10, 2, 11, 3], "texture": "#m"},
"down": {"uv": [8, 13, 9, 14], "texture": "#m"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [15, 21, 0],
"translation": [2.25, -1.25, -2.5],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1.75, 0],
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -1,100 +0,0 @@
{
"parent": "block/block",
"gui_light": "front",
"textures": {
"o": "engineersdecor:block/material/wood_sanded_texture",
"particle": "engineersdecor:block/material/wood_sanded_texture"
},
"elements": [
{
"from": [4, 2, 14.625],
"to": [12, 3, 15.625],
"faces": {
"north": {"uv": [0, 11, 15, 13], "texture": "#o"},
"east": {"uv": [12, 13, 14, 15], "texture": "#o"},
"south": {"uv": [1, 13, 16, 15], "texture": "#o"},
"west": {"uv": [13, 11, 15, 13], "texture": "#o"},
"up": {"uv": [1, 11, 16, 13], "texture": "#o"},
"down": {"uv": [1, 13, 16, 15], "texture": "#o"}
}
},
{
"from": [4, 6, 14.625],
"to": [12, 7, 15.625],
"faces": {
"north": {"uv": [1, 6, 14, 8], "texture": "#o"},
"east": {"uv": [6, 14, 8, 16], "texture": "#o"},
"south": {"uv": [3, 13, 16, 15], "texture": "#o"},
"west": {"uv": [7, 9, 9, 11], "texture": "#o"},
"up": {"uv": [0, 13, 13, 15], "texture": "#o"},
"down": {"uv": [3, 13, 16, 15], "texture": "#o"}
}
},
{
"from": [4, 14, 14.625],
"to": [12, 15, 15.625],
"faces": {
"north": {"uv": [0, 4, 14, 6], "texture": "#o"},
"east": {"uv": [7, 3, 9, 5], "texture": "#o"},
"south": {"uv": [2, 6, 16, 8], "texture": "#o"},
"west": {"uv": [2, 6, 4, 8], "texture": "#o"},
"up": {"uv": [0, 4, 14, 6], "texture": "#o"},
"down": {"uv": [2, 6, 16, 8], "texture": "#o"}
}
},
{
"from": [4, 10, 14.625],
"to": [12, 11, 15.625],
"faces": {
"north": {"uv": [3, 5, 16, 7], "texture": "#o"},
"east": {"uv": [1, 13, 3, 15], "texture": "#o"},
"south": {"uv": [0, 11, 13, 13], "texture": "#o"},
"west": {"uv": [0, 11, 2, 13], "texture": "#o"},
"up": {"uv": [0, 9, 13, 11], "texture": "#o"},
"down": {"uv": [0, 11, 13, 13], "texture": "#o"}
}
},
{
"from": [2.75, 0, 14.5],
"to": [4, 16, 16],
"faces": {
"north": {"uv": [2, 0, 4, 16], "texture": "#o"},
"east": {"uv": [2, 0, 4, 16], "texture": "#o"},
"south": {"uv": [5, 0, 7, 16], "texture": "#o"},
"west": {"uv": [8, 0, 11, 16], "texture": "#o"},
"up": {"uv": [11, 9, 13, 12], "texture": "#o"},
"down": {"uv": [13, 9, 15, 12], "texture": "#o"}
}
},
{
"from": [12, 0, 14.5],
"to": [13.25, 16, 16],
"faces": {
"north": {"uv": [1, 0, 3, 16], "texture": "#o"},
"east": {"uv": [5, 0, 7, 16], "texture": "#o"},
"south": {"uv": [13, 0, 15, 16], "texture": "#o"},
"west": {"uv": [1, 0, 3, 16], "texture": "#o"},
"up": {"uv": [6, 6, 8, 9], "texture": "#o"},
"down": {"uv": [8, 5, 10, 8], "texture": "#o"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [1, 67, 0],
"translation": [-1.75, -2.25, -2.5],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1.75, 0],
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -1,4 +0,0 @@
{
"parent": "engineersdecor:block/sign/sign_rect14x14_model",
"textures": { "f": "engineersdecor:block/sign/sign_factoryarea_texture" }
}

View file

@ -4,7 +4,7 @@
"textures": { "textures": {
"s": "engineersdecor:block/material/wood_rough_texture", "s": "engineersdecor:block/material/wood_rough_texture",
"particle": "engineersdecor:block/material/wood_rough_texture", "particle": "engineersdecor:block/material/wood_rough_texture",
"f": "engineersdecor:block/sign/sign_factoryarea_texture" "f": "engineersdecor:block/sign/wood_rough_texture"
}, },
"elements": [ "elements": [
{ {

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/device/labeled_crate_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/device/metal_crafting_table_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/sign/sign_factoryarea_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/furniture/treated_wood_windowsill_broad_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/ladder/treated_wood_ladder_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/furniture/treated_wood_table_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/furniture/treated_wood_window_model" }

View file

@ -1 +0,0 @@
{ "parent": "engineersdecor:block/furniture/treated_wood_windowsill_model" }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View file

@ -1,21 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "sign_factoryarea_dlt",
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:copy_name",
"source": "block_entity"
}
],
"name": "engineersdecor:sign_factoryarea"
}
]
}
]
}

View file

@ -1,21 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "treated_wood_broad_windowsill_dlt",
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:copy_name",
"source": "block_entity"
}
],
"name": "engineersdecor:treated_wood_broad_windowsill"
}
]
}
]
}

View file

@ -1,21 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "treated_wood_ladder_dlt",
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:copy_name",
"source": "block_entity"
}
],
"name": "engineersdecor:treated_wood_ladder"
}
]
}
]
}

Some files were not shown because too many files have changed in this diff Show more