Compare commits

..

10 Commits

Author SHA1 Message Date
WinDanesz 461df00048 fix: Fixed some advancements 2022-09-10 02:04:41 +02:00
WinDanesz dcf60a8b4b fix: Fixed spruce_gilded_wood recipe 2022-09-10 02:03:53 +02:00
WinDanesz 739a1573e1 feat: added support for custom Elements 2022-09-10 02:01:49 +02:00
WinDanesz b7ffd61020 feat: flattened the gilded wood blocks 2022-09-10 00:59:57 +02:00
WinDanesz b6682e1c52 feat: Added the IElemental interface 2022-09-09 23:52:00 +02:00
WinDanesz 5d337b93a6 refactor: Flattened the runestone blocks 2022-09-09 23:51:30 +02:00
WinDanesz b1e70c01f0 refactor: Flattened the magic crystal blocks, renamed crystal items 2022-09-09 22:51:18 +02:00
WinDanesz d30a40bdc4 refactor: Flattened arcane tome item registry 2022-09-05 23:14:51 +02:00
WinDanesz 25b2b0b8a5 fix: Fix flesh spell imports 2022-09-05 22:48:51 +02:00
WinDanesz 3eef93b599 refactor: Flattened magic crystal item and spectral dust registries 2022-09-05 22:47:32 +02:00
217 changed files with 5123 additions and 6153 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"homepage": "https://www.curseforge.com/minecraft/mc-mods/electroblobs-wizardry", "homepage": "https://www.curseforge.com/minecraft/mc-mods/electroblobs-wizardry",
"promos": { "promos": {
"1.12.2-latest": "4.3.14", "1.12.2-latest": "4.3.7",
"1.12.2-recommended": "4.3.14" "1.12.2-recommended": "4.3.7"
} }
} }
+50 -112
View File
@@ -1,127 +1,64 @@
import groovy.json.JsonOutput
buildscript { buildscript {
repositories { repositories {
gradlePluginPortal() jcenter()
maven { maven { url = "http://files.minecraftforge.net/maven" }
name 'MinecraftForge'
url 'https://maven.minecraftforge.net/'
}
maven {
name 'Garden of Fancy'
url 'https://maven.gofancy.wtf/releases'
}
//fallback for fancygradle maven
//mavenLocal()
maven {
name 'Sponge'
url 'https://repo.spongepowered.org/repository/maven-public/'
}
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:5.+' classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.ajoberstar.grgit:grgit-gradle:3.1.1'
classpath group: 'wtf.gofancy.fancygradle', name: 'wtf.gofancy.fancygradle.gradle.plugin', version: '1.1.+'
}
repositories.each {
if (it instanceof MavenArtifactRepository && it.url.toString() == "https://files.minecraftforge.net/maven") {
it.url = "https://maven.minecraftforge.net"
}
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'net.minecraftforge.gradle' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: org.ajoberstar.grgit.gradle.GrgitPlugin
apply plugin: 'wtf.gofancy.fancygradle'
version = "4.3.14" version = "4.3.8"
group= "electroblob.wizardry"// http://maven.apache.org/guides/mini/guide-naming-conventions.html group= "electroblob.wizardry"// http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ElectroblobsWizardry" archivesBaseName = "ElectroblobsWizardry"
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
//mappings channel: 'snapshot', version: '20171003-1.12'
mappings channel: "stable", version: "39-1.12"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
}
server {
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
}
}
} }
repositories { repositories {
google()
mavenCentral()
maven { maven {
url = uri('https://www.cursemaven.com') // location of the maven that hosts JEI files
content { name = "Progwml6 maven"
includeGroup 'curse.maven' url = "http://dvs1.progwml6.com/files/maven"
}
} }
maven { maven {
name = 'Modrinth' // location of a maven mirror for JEI files, as a fallback
url = uri('https://api.modrinth.com/maven') name = "ModMaven"
content { url = "modmaven.k-4u.nl"
includeGroup 'maven.modrinth'
}
} }
maven { maven {
name = 'Sponge' name = "Curseforge Maven"
url = uri('https://repo.spongepowered.org/maven') url = "https://minecraft.curseforge.com/api/maven/"
}
maven {
url = uri('https://maven.blamejared.com')
}
maven {
url = uri('https://m2.dv8tion.net/releases')
}
maven {
url = uri('https://jitpack.io')
} }
} }
minecraft {
version = "1.12.2-14.23.5.2847"
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "stable_39"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
dependencies { dependencies {
//// MC version ////
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // Compile against the JEI API but do not include it at runtime
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. deobfProvided "mezz.jei:jei_${mc_version}:${jei_version}:api"
// The userdev artifact is a special name and will get all sorts of transformations applied to it. // At runtime, use the full JEI jar
minecraft "net.minecraftforge:forge:${project.mc_version}-${project.forge_version}" runtime "mezz.jei:jei_${mc_version}:${jei_version}"
//// MC version ////
implementation fg.deobf("curse.maven:baubles-${baubles_projectid}:${baubles_fileid}") deobfCompile "baubles:Baubles:${mc_version_short}:${baubles_version}"
implementation fg.deobf("mezz.jei:jei_${mc_version}:${jei_version}") deobfCompile "antique-atlas:antiqueatlas:${mc_version}:${antique_atlas_version}"
implementation fg.deobf("curse.maven:antique-atlas-${antiqueatlas_projectid}:${antiqueatlas_fileid}")
} }
@@ -131,19 +68,20 @@ task deobfJar(type: Jar) {
} }
processResources { processResources {
// replace tokens in mcmod.info, and pack.mcmeta // this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include 'pack.mcmeta'
include 'mcmod.info' include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
} }
duplicatesStrategy = 'include' // copy everything else except the mcmod.info
} from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
fancyGradle {
patches {
resources
coremods
asm
} }
} }
+1 -15
View File
@@ -1,22 +1,8 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. # Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process. # This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs=-Xmx3G
mod_id=ebwizardry
mc_version=1.12.2 mc_version=1.12.2
mc_version_short=1.12 mc_version_short=1.12
jei_version=4.15.0.291 jei_version=4.15.0.291
baubles_version=1.5.2 baubles_version=1.5.2
antique_atlas_version=4.6.3 antique_atlas_version=4.6.3
forge_version=14.23.5.2860
mappings_version=39
mappings_channel=stable
mappings_mc_version=1.12
baubles_projectid=227083
baubles_fileid=2518667
jei_projectid=238222
artemislib_projectid=313590
artemislib_version=1.0.6
artemislib_fileid=2741812
antiqueatlas_projectid=227795
antiqueatlas_fileid=2823030
org.gradle.daemon=false
+2 -2
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.3-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
Vendored
+115 -175
View File
@@ -1,232 +1,172 @@
#!/bin/sh #!/usr/bin/env sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
############################################################################## ##############################################################################
# ##
# Gradle start up script for POSIX generated by Gradle. ## Gradle start up script for UN*X
# ##
# 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
app_path=$0 PRG="$0"
# Need this for relative symlinks.
# Need this for daisy-chained symlinks. while [ -h "$PRG" ] ; do
while ls=`ls -ld "$PRG"`
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path link=`expr "$ls" : '.*-> \(.*\)$'`
[ -h "$app_path" ] if expr "$link" : '/.*' > /dev/null; then
do PRG="$link"
ls=$( ls -ld "$app_path" ) else
link=${ls#*' -> '} PRG=`dirname "$PRG"`"/$link"
case $link in #( fi
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done done
SAVED="`pwd`"
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle" APP_NAME="Gradle"
APP_BASE_NAME=${0##*/} APP_BASE_NAME=`basename "$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=""
# 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=true ;; #( CYGWIN* )
Darwin* ) darwin=true ;; #( cygwin=true
MSYS* | MINGW* ) msys=true ;; #( ;;
NONSTOP* ) nonstop=true ;; Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
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
Please set the JAVA_HOME variable in your environment to match the 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
location of your Java installation." 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" && ! "$darwin" && ! "$nonstop" ; then if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
case $MAX_FD in #( MAX_FD_LIMIT=`ulimit -H -n`
max*) if [ $? -eq 0 ] ; then
MAX_FD=$( ulimit -H -n ) || if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
warn "Could not query maximum file descriptor limit" MAX_FD="$MAX_FD_LIMIT"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi fi
# Roll the args list around exactly as many times as the number of ulimit -n $MAX_FD
# args, so each arg winds up back in the position where it started, but if [ $? -ne 0 ] ; then
# possibly modified. warn "Could not set maximum file descriptor limit: $MAX_FD"
# fi
# NB: a `for` loop captures its iteration list before it begins, so else
# changing the positional parameters here affects neither the number of warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
# iterations, nor the values presented in `arg`. fi
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi fi
# Collect all arguments for the java command; # For Darwin, add options to specify how the application appears in the dock
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of if $darwin; then
# shell script including quotes and variable substitutions, so put them in GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
# double quotes to make sure that they get re-expanded; and fi
# * put everything else in single quotes, so that it's not re-expanded.
set -- \ # For Cygwin, switch paths to Windows format before running java
"-Dorg.gradle.appname=$APP_BASE_NAME" \ if $cygwin ; then
-classpath "$CLASSPATH" \ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
org.gradle.wrapper.GradleWrapperMain \ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
"$@" JAVACMD=`cygpath --unix "$JAVACMD"`
# Use "xargs" to parse quoted args. # We build the pattern for arguments to be converted via cygpath
# ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. SEP=""
# for dir in $ROOTDIRSRAW ; do
# In Bash we could simply go: ROOTDIRS="$ROOTDIRS$SEP$dir"
# SEP="|"
# readarray ARGS < <( xargs -n1 <<<"$var" ) && done
# set -- "${ARGS[@]}" "$@" OURCYGPATTERN="(^($ROOTDIRS))"
# # Add a user-defined pattern to the cygpath arguments
# but POSIX shell has neither arrays nor command substitution, so instead we if [ "$GRADLE_CYGPATTERN" != "" ] ; then
# post-process each arg (as a line of input to sed) to backslash-escape any OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
# character that might be a shell metacharacter, then use eval to reverse fi
# that process (while maintaining the separation between arguments), and wrap # Now convert the arguments - kludge to limit ourselves to /bin/sh
# the whole thing up as a single "set" statement. i=0
# for arg in "$@" ; do
# This will of course break if any of these variables contains a newline or CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
# an unmatched quote. CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
#
eval "set -- $( if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
xargs -n1 | else
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | eval `echo args$i`="\"$arg\""
tr '\n' ' ' fi
)" '"$@"' i=$((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
fi
exec "$JAVACMD" "$@" # Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
Vendored
+20 -25
View File
@@ -1,19 +1,3 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@@ -29,18 +13,15 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" set DEFAULT_JVM_OPTS=
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if "%ERRORLEVEL%" == "0" goto init
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +35,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto init
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,14 +45,28 @@ echo location of your Java installation.
goto fail goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
@@ -86,4 +81,4 @@ exit /b 1
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal
:omega :omega
@@ -156,12 +156,6 @@ public final class Settings {
public Pair<ResourceLocation, Short>[] treeBlocks = parseItemMetaStrings(DEFAULT_TREE_BLOCKS); public Pair<ResourceLocation, Short>[] treeBlocks = parseItemMetaStrings(DEFAULT_TREE_BLOCKS);
/** <b>[Server-only]</b> The chance for wizard towers to generate with an evil wizard and chest inside. */ /** <b>[Server-only]</b> The chance for wizard towers to generate with an evil wizard and chest inside. */
public double evilWizardChance = 0.2; public double evilWizardChance = 0.2;
public double cooldownReductionPerLevel = 0.15;
public double potencyIncreasePerTier = 0.15;
public double durationIncreasePerLevel = 0.25;
public double rangeIncreasePerLevel = 0.25;
public double blastIncreasePerLevel = 0.25;
public double frostSlownessIncreasePerLevel = 0.5;
/** <b>[Server-only]</b> List of dimension ids in which to generate crystal ore. */ /** <b>[Server-only]</b> List of dimension ids in which to generate crystal ore. */
public int[] oreDimensions = {0}; public int[] oreDimensions = {0};
/** <b>[Server-only]</b> List of dimension ids in which to generate crystal flowers. */ /** <b>[Server-only]</b> List of dimension ids in which to generate crystal flowers. */
@@ -198,21 +192,12 @@ public final class Settings {
public boolean playerBlockDamage = true; public boolean playerBlockDamage = true;
/** <b>[Server-only]</b> Whether spells cast by dispensers can destroy blocks in the world. */ /** <b>[Server-only]</b> Whether spells cast by dispensers can destroy blocks in the world. */
public boolean dispenserBlockDamage = true; public boolean dispenserBlockDamage = true;
/** <b>[Server-only]</b> Whether damage should be registered with the old system (wizardry_magic/indirect_wizardry_magic) prefixed damage with the elements like
* necromancy_indirect_wizardry_magic, necromancy_wizardry_magic*/
public boolean damageTypePerElement = false;
/** <b>[Server-only]</b> Whether spell books are consumed when they are bound to a wand.*/
public boolean singleUseSpellBooks = false;
/** <b>[Server-only]</b> Whether to prevent binding the same spell to a wand multiple times*/
public boolean preventBindingSameSpellTwiceToWands = false;
/** <b>[Server-only]</b> Whether to revert to the old wand upgrade system, which only requires tomes of arcana. */ /** <b>[Server-only]</b> Whether to revert to the old wand upgrade system, which only requires tomes of arcana. */
public boolean legacyWandLevelling = false; public boolean legacyWandLevelling = false;
/** <b>[Server-only]</b> Whether to tweak the blindness effect to reduce follow distance when used on non-players. */ /** <b>[Server-only]</b> Whether to tweak the blindness effect to reduce follow distance when used on non-players. */
public boolean blindnessTweak = true; public boolean blindnessTweak = true;
/** <b>[Server-only]</b> Whether using bonemeal on grass blocks has a chance to grow crystal flowers. */ /** <b>[Server-only]</b> Whether using bonemeal on grass blocks has a chance to grow crystal flowers. */
public boolean bonemealGrowsCrystalFlowers = true; public boolean bonemealGrowsCrystalFlowers = true;
/** <b>[Server-only]</b> Whether wands only decrement their cooldowns if a player holds them. */
public boolean wandsMustBeHeldToDecrementCooldown = false;
/** <b>[Server-only]</b> Whether to enable Wizardry mob loot injection. Allows an easier switch instead of blacklisting all entities. */ /** <b>[Server-only]</b> Whether to enable Wizardry mob loot injection. Allows an easier switch instead of blacklisting all entities. */
public boolean injectMobDrops = true; public boolean injectMobDrops = true;
/** /**
@@ -632,29 +617,6 @@ public final class Settings {
dispenserBlockDamage = property.getBoolean(); dispenserBlockDamage = property.getBoolean();
propOrder.add(property.getName()); propOrder.add(property.getName());
property = config.get(GAMEPLAY_CATEGORY, "damageTypePerElement", false,
"Whether damage should be registered with the old system (wizardry_magic/indirect_wizardry_magic) prefixed damage with the elements like "
+ "necromancy_indirect_wizardry_magic, necromancy_wizardry_magic. This is disabled by default to not break existing modpacks."
+ "The intention of this setting is to allow differentiating various damage types for e.g. the Distinct Damage Descriptions mod");
property.setLanguageKey("config." + Wizardry.MODID + ".damage_type_per_element");
Wizardry.proxy.setToNamedBooleanEntry(property);
damageTypePerElement = property.getBoolean();
propOrder.add(property.getName());
property = config.get(GAMEPLAY_CATEGORY, "singleUseSpellBooks", false,
"Whether spell books are consumed when they are bound to a wand.");
property.setLanguageKey("config." + Wizardry.MODID + ".single_use_spell_books");
Wizardry.proxy.setToNamedBooleanEntry(property);
singleUseSpellBooks = property.getBoolean();
propOrder.add(property.getName());
property = config.get(GAMEPLAY_CATEGORY, "preventBindingSameSpellTwiceToWands", false,
"Whether to prevent binding the same spell to a wand multiple times");
property.setLanguageKey("config." + Wizardry.MODID + ".prevent_binding_same_spell_twice_to_wands");
Wizardry.proxy.setToNamedBooleanEntry(property);
preventBindingSameSpellTwiceToWands = property.getBoolean();
propOrder.add(property.getName());
property = config.get(GAMEPLAY_CATEGORY, "playersMoveEachOther", true, property = config.get(GAMEPLAY_CATEGORY, "playersMoveEachOther", true,
"Whether to allow players to move other players around using magic."); "Whether to allow players to move other players around using magic.");
property.setLanguageKey("config." + Wizardry.MODID + ".players_move_each_other"); property.setLanguageKey("config." + Wizardry.MODID + ".players_move_each_other");
@@ -706,13 +668,6 @@ public final class Settings {
bonemealGrowsCrystalFlowers = property.getBoolean(); bonemealGrowsCrystalFlowers = property.getBoolean();
propOrder.add(property.getName()); propOrder.add(property.getName());
property = config.get(GAMEPLAY_CATEGORY, "wandsMustBeHeldToDecrementCooldown", false,
"Whether wands only decrement their cooldowns if a player holds them.");
property.setLanguageKey("config." + Wizardry.MODID + ".wands_must_be_held_to_decrement_cooldown");
Wizardry.proxy.setToNamedBooleanEntry(property);
wandsMustBeHeldToDecrementCooldown = property.getBoolean();
propOrder.add(property.getName());
checkForRedundantOptions(GAMEPLAY_CATEGORY, propOrder); // Must be before the order is set! checkForRedundantOptions(GAMEPLAY_CATEGORY, propOrder); // Must be before the order is set!
config.setCategoryPropertyOrder(GAMEPLAY_CATEGORY, propOrder); config.setCategoryPropertyOrder(GAMEPLAY_CATEGORY, propOrder);
@@ -971,50 +926,6 @@ public final class Settings {
} }
} }
property = config.get(TWEAKS_CATEGORY, "cooldown_reduction_per_level", 0.15,
"The fraction by which cooldowns are reduced for each level of cooldown upgrade.",
0.05, Integer.MAX_VALUE); // Sure, I mean you COULD set it to 2^31-1... what could possibly go wrong?
property.setLanguageKey("config." + Wizardry.MODID + ".cast_command_multiplier_limit");
cooldownReductionPerLevel = property.getDouble();
propOrder.add(property.getName());
property = config.get(TWEAKS_CATEGORY, "potency_increase_per_tier", 0.15,
"The fraction by which potency is increased for each tier of matching wand. May cause extreme lag with high values!",
0.05, Integer.MAX_VALUE);
property.setLanguageKey("config." + Wizardry.MODID + ".potency_increase_per_tier");
potencyIncreasePerTier = property.getDouble();
propOrder.add(property.getName());
property = config.get(TWEAKS_CATEGORY, "duration_increase_per_level", 0.25,
"The fraction by which spell duration is increased for each level of duration upgrade.",
0.05, Integer.MAX_VALUE);
property.setLanguageKey("config." + Wizardry.MODID + ".duration_increase_per_level");
durationIncreasePerLevel = property.getDouble();
propOrder.add(property.getName());
property = config.get(TWEAKS_CATEGORY, "range_increase_per_level", 0.25,
"The fraction by which spell range is increased for each level of range upgrade. May cause extreme lag with high values!",
0.05, Integer.MAX_VALUE);
property.setLanguageKey("config." + Wizardry.MODID + ".range_increase_per_level");
rangeIncreasePerLevel = property.getDouble();
propOrder.add(property.getName());
property = config.get(TWEAKS_CATEGORY, "blast_increase_per_level", 0.25,
"The fraction by which spell blast is increased for each level of blast upgrade. May cause extreme lag with high values!",
0.05, Integer.MAX_VALUE);
property.setLanguageKey("config." + Wizardry.MODID + ".blast_increase_per_level");
blastIncreasePerLevel = property.getDouble();
propOrder.add(property.getName());
property = config.get(TWEAKS_CATEGORY, "frost_slowness_increase_per_level", 0.5,
"The fraction by which movement speed is reduced per level of frost effect.",
0.05, Integer.MAX_VALUE);
property.setLanguageKey("config." + Wizardry.MODID + ".frost_slowness_increase_per_level");
frostSlownessIncreasePerLevel = property.getDouble();
propOrder.add(property.getName());
checkForRedundantOptions(TWEAKS_CATEGORY, propOrder); // Must be before the order is set! checkForRedundantOptions(TWEAKS_CATEGORY, propOrder); // Must be before the order is set!
config.setCategoryPropertyOrder(TWEAKS_CATEGORY, propOrder); config.setCategoryPropertyOrder(TWEAKS_CATEGORY, propOrder);
@@ -82,7 +82,7 @@ public class Wizardry {
* 1.x.x represents Minecraft 1.7.x versions, 2.x.x represents Minecraft 1.10.x versions, 3.x.x represents Minecraft * 1.x.x represents Minecraft 1.7.x versions, 2.x.x represents Minecraft 1.10.x versions, 3.x.x represents Minecraft
* 1.11.x versions, and so on. * 1.11.x versions, and so on.
*/ */
public static final String VERSION = "4.3.14"; public static final String VERSION = "4.3.7";
/** /**
* Json file used by Forge's built-in <a href="https://mcforge.readthedocs.io/en/1.12.x/gettingstarted/autoupdate/">update checker</a>. * Json file used by Forge's built-in <a href="https://mcforge.readthedocs.io/en/1.12.x/gettingstarted/autoupdate/">update checker</a>.
@@ -130,6 +130,7 @@ public class Wizardry {
configDirectory = new File(event.getModConfigurationDirectory(), Wizardry.MODID); configDirectory = new File(event.getModConfigurationDirectory(), Wizardry.MODID);
settings.initConfig(event); settings.initConfig(event);
proxy.registerResourceReloadListeners();
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
tisTheSeason = calendar.get(Calendar.MONTH) + 1 == 12 && calendar.get(Calendar.DAY_OF_MONTH) >= 24 tisTheSeason = calendar.get(Calendar.MONTH) + 1 == 12 && calendar.get(Calendar.DAY_OF_MONTH) >= 24
@@ -160,7 +161,6 @@ public class Wizardry {
@EventHandler @EventHandler
public void init(FMLInitializationEvent event){ public void init(FMLInitializationEvent event){
proxy.registerResourceReloadListeners();
settings.initConfigExtras(); settings.initConfigExtras();
@@ -203,6 +203,7 @@ public final class WizardryEventHandler {
// Find the angle between the direction the mob is looking and the direction the player is in // Find the angle between the direction the mob is looking and the direction the player is in
// Angle between a and b = acos((a.b) / (|a|*|b|)) // Angle between a and b = acos((a.b) / (|a|*|b|))
double angle = Math.acos(vec.dotProduct(event.getEntity().getLookVec()) / vec.length()); double angle = Math.acos(vec.dotProduct(event.getEntity().getLookVec()) / vec.length());
System.out.println(angle);
// If the player is not within the 144-degree arc in front of the mob, it won't detect them // If the player is not within the 144-degree arc in front of the mob, it won't detect them
if(angle > 0.4 * Math.PI){ if(angle > 0.4 * Math.PI){
((EntityLiving)event.getEntityLiving()).setAttackTarget(null); ((EntityLiving)event.getEntityLiving()).setAttackTarget(null);
@@ -268,7 +269,7 @@ public final class WizardryEventHandler {
// Fireskin // Fireskin
if(event.getEntityLiving().isPotionActive(WizardryPotions.fireskin) if(event.getEntityLiving().isPotionActive(WizardryPotions.fireskin)
&& !MagicDamage.isEntityImmune(DamageType.FIRE, event.getEntityLiving())) && !MagicDamage.isEntityImmune(DamageType.FIRE, event.getEntityLiving()))
attacker.setFire(Spells.fire_breath.getProperty(Spell.BURN_DURATION).intValue() * 20); attacker.setFire(Spells.fire_breath.getProperty(Spell.BURN_DURATION).intValue());
// Ice Shroud // Ice Shroud
if(event.getEntityLiving().isPotionActive(WizardryPotions.ice_shroud) if(event.getEntityLiving().isPotionActive(WizardryPotions.ice_shroud)
@@ -490,4 +491,4 @@ public final class WizardryEventHandler {
} }
} }
} }
@@ -0,0 +1,8 @@
package electroblob.wizardry.api;
import electroblob.wizardry.constants.Element;
public interface IElemental {
Element getElement();
}
@@ -18,7 +18,7 @@ public final class WizardryEnumHelper {
// Make sure these are updated if the relevant constructors are updated! // Make sure these are updated if the relevant constructors are updated!
// Can't we do some kind of reflection to access them and generate these arrays? // Can't we do some kind of reflection to access them and generate these arrays?
private static final Class[] TIER_ARGUMENTS = new Class[]{Integer.class, Integer.class, Integer.class, Style.class, String.class}; private static final Class[] TIER_ARGUMENTS = new Class[]{Integer.class, Integer.class, Integer.class, Style.class, String.class};
private static final Class[] ELEMENT_ARGUMENTS = new Class[]{Style.class, String.class, String.class}; private static final Class[] ELEMENT_ARGUMENTS = new Class[]{Style.class, String.class, String.class, boolean.class, boolean.class};
private static final Class[] SPELL_TYPE_ARGUMENTS = new Class[]{String.class}; private static final Class[] SPELL_TYPE_ARGUMENTS = new Class[]{String.class};
private static final Class[] SPELL_CONTEXT_ARGUMENTS = new Class[]{String.class}; private static final Class[] SPELL_CONTEXT_ARGUMENTS = new Class[]{String.class};
@@ -55,12 +55,14 @@ public final class WizardryEnumHelper {
* @param colour The colour of text associated with this element, as a style object. * @param colour The colour of text associated with this element, as a style object.
* @param name The unlocalised name of this element, as used in translation keys. * @param name The unlocalised name of this element, as used in translation keys.
* @param modID The mod ID of the mod that added this element, for icon rendering purposes. * @param modID The mod ID of the mod that added this element, for icon rendering purposes.
* @param worldgen Whether this element should have obelisks and shrines.
* @param wizards Whether this element should have naturally occurring evil and good wizards.
* @return The resulting {@code Element} enum constant. * @return The resulting {@code Element} enum constant.
*/ */
// This is the only one that needs the mod ID argument because elements are the only ones that have icons // This is the only one that needs the mod ID argument because elements are the only ones that have icons
// For some reason Minecraft doesn't seem to care about the resource domain for lang files, it just pools them // For some reason Minecraft doesn't seem to care about the resource domain for lang files, it just pools them
public static Element addElement(String codeName, Style colour, String name, String modID){ public static Element addElement(String codeName, Style colour, String name, String modID, boolean worldgen, boolean wizards){
return EnumHelper.addEnum(Element.class, codeName, ELEMENT_ARGUMENTS, colour, name, modID); return EnumHelper.addEnum(Element.class, codeName, ELEMENT_ARGUMENTS, colour, name, modID, worldgen, wizards);
} }
/** /**
@@ -256,7 +256,9 @@ public class BlockBookshelf extends BlockHorizontal implements ITileEntityProvid
// Wizardry books // Wizardry books
registerBookModelTexture(() -> WizardryItems.spell_book, new ResourceLocation(Wizardry.MODID, "blocks/books_red")); registerBookModelTexture(() -> WizardryItems.spell_book, new ResourceLocation(Wizardry.MODID, "blocks/books_red"));
registerBookModelTexture(() -> WizardryItems.wizard_handbook, new ResourceLocation(Wizardry.MODID, "blocks/books_blue")); registerBookModelTexture(() -> WizardryItems.wizard_handbook, new ResourceLocation(Wizardry.MODID, "blocks/books_blue"));
registerBookModelTexture(() -> WizardryItems.arcane_tome, new ResourceLocation(Wizardry.MODID, "blocks/books_purple")); registerBookModelTexture(() -> WizardryItems.arcane_tome_apprentice,new ResourceLocation(Wizardry.MODID, "blocks/books_purple"));
registerBookModelTexture(() -> WizardryItems.arcane_tome_advanced, new ResourceLocation(Wizardry.MODID, "blocks/books_purple"));
registerBookModelTexture(() -> WizardryItems.arcane_tome_master, new ResourceLocation(Wizardry.MODID, "blocks/books_purple"));
registerBookModelTexture(() -> WizardryItems.ruined_spell_book, new ResourceLocation(Wizardry.MODID, "blocks/books_brown")); registerBookModelTexture(() -> WizardryItems.ruined_spell_book, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
registerBookModelTexture(() -> WizardryItems.scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_blue")); registerBookModelTexture(() -> WizardryItems.scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_blue"));
registerBookModelTexture(() -> WizardryItems.blank_scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_blue")); registerBookModelTexture(() -> WizardryItems.blank_scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_blue"));
@@ -1,29 +1,23 @@
package electroblob.wizardry.block; package electroblob.wizardry.block;
import electroblob.wizardry.api.IElemental;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
import electroblob.wizardry.registry.WizardryTabs; import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor; import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import java.util.EnumMap; import java.util.EnumMap;
public class BlockCrystal extends Block { public class BlockCrystal extends Block implements IElemental {
public static final PropertyEnum<Element> ELEMENT = PropertyEnum.create("element", Element.class); private static final EnumMap<Element, MapColor> map_colours = new EnumMap<>(Element.class);
private static final EnumMap<Element, MapColor> map_colours = new EnumMap<>(Element.class); static {
map_colours.put(Element.MAGIC, MapColor.PINK);
static {
map_colours.put(Element.MAGIC, MapColor.PINK);
map_colours.put(Element.FIRE, MapColor.ORANGE_STAINED_HARDENED_CLAY); map_colours.put(Element.FIRE, MapColor.ORANGE_STAINED_HARDENED_CLAY);
map_colours.put(Element.ICE, MapColor.LIGHT_BLUE); map_colours.put(Element.ICE, MapColor.LIGHT_BLUE);
map_colours.put(Element.LIGHTNING, MapColor.CYAN); map_colours.put(Element.LIGHTNING, MapColor.CYAN);
@@ -32,45 +26,22 @@ public class BlockCrystal extends Block {
map_colours.put(Element.SORCERY, MapColor.LIME); map_colours.put(Element.SORCERY, MapColor.LIME);
map_colours.put(Element.HEALING, MapColor.YELLOW); map_colours.put(Element.HEALING, MapColor.YELLOW);
} }
public BlockCrystal(Material material){ @Override
super(material); public Element getElement() { return element; }
this.setDefaultState(this.blockState.getBaseState().withProperty(ELEMENT, Element.MAGIC));
this.setCreativeTab(WizardryTabs.WIZARDRY); private final Element element;
public BlockCrystal(Element element) {
super(Material.IRON);
this.setCreativeTab(WizardryTabs.WIZARDRY);
this.setHarvestLevel("pickaxe", 2); this.setHarvestLevel("pickaxe", 2);
} this.element = element;
@Override
public int damageDropped(IBlockState state){
return (state.getValue(ELEMENT)).ordinal();
}
@Override
public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos){
return map_colours.get(state.getProperties().get(ELEMENT));
} }
@Override @Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> items){ public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos) {
if(this.getCreativeTab() == tab){ return map_colours.get(state.getProperties().get(element));
for(Element element : Element.values()){
items.add(new ItemStack(this, 1, element.ordinal()));
}
}
} }
@Override
public IBlockState getStateFromMeta(int metadata){
return this.getDefaultState().withProperty(ELEMENT, Element.values()[metadata]);
}
@Override
public int getMetaFromState(IBlockState state){
return (state.getValue(ELEMENT)).ordinal();
}
@Override
protected BlockStateContainer createBlockState(){
return new BlockStateContainer(this, ELEMENT);
}
} }
@@ -1,17 +1,30 @@
package electroblob.wizardry.block; package electroblob.wizardry.block;
import electroblob.wizardry.registry.WizardryTabs; import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockPlanks;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
public class BlockGildedWood extends BlockPlanks { public class BlockGildedWood extends Block {
public BlockGildedWood(){ public BlockGildedWood()
super(); {
super(Material.WOOD);
this.setCreativeTab(WizardryTabs.WIZARDRY); this.setCreativeTab(WizardryTabs.WIZARDRY);
this.setHardness(2.0F); this.setHardness(2.0F);
this.setResistance(5.0F); this.setResistance(5.0F);
this.setSoundType(SoundType.WOOD); // Why is this protected?! this.setSoundType(SoundType.WOOD); // Why is this protected?!
} }
}
}
@@ -1,6 +1,7 @@
package electroblob.wizardry.block; package electroblob.wizardry.block;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
import electroblob.wizardry.item.ItemSpectralDust; import electroblob.wizardry.item.ItemSpectralDust;
import electroblob.wizardry.registry.*; import electroblob.wizardry.registry.*;
@@ -20,12 +21,14 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays; import java.util.Arrays;
@@ -110,7 +113,7 @@ public class BlockReceptacle extends BlockTorch implements ITileEntityProvider {
if(tileEntity instanceof TileEntityReceptacle){ if(tileEntity instanceof TileEntityReceptacle){
Element element = ((TileEntityReceptacle)tileEntity).getElement(); Element element = ((TileEntityReceptacle)tileEntity).getElement();
if(element != null) drops.add(new ItemStack(WizardryItems.spectral_dust, 1, element.ordinal())); if(element != null) drops.add(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "spectral_dust_" + element.name().toLowerCase())), 1));
} }
} }
@@ -219,7 +222,7 @@ public class BlockReceptacle extends BlockTorch implements ITileEntityProvider {
((TileEntityReceptacle)tileEntity).setElement(null); ((TileEntityReceptacle)tileEntity).setElement(null);
ItemStack dust = new ItemStack(WizardryItems.spectral_dust, 1, currentElement.ordinal()); ItemStack dust = new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "spectral_dust_" + currentElement.name().toLowerCase())));
if(stack.isEmpty()){ if(stack.isEmpty()){
player.setHeldItem(hand, dust); player.setHeldItem(hand, dust);
@@ -5,24 +5,15 @@ import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor; import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import java.util.Arrays;
import java.util.EnumMap; import java.util.EnumMap;
public class BlockRunestone extends Block { public class BlockRunestone extends Block {
public static final PropertyEnum<Element> ELEMENT = PropertyEnum.create("element", Element.class,
Arrays.copyOfRange(Element.values(), 1, Element.values().length)); // Everything except MAGIC
private static final EnumMap<Element, MapColor> map_colours = new EnumMap<>(Element.class); private static final EnumMap<Element, MapColor> map_colours = new EnumMap<>(Element.class);
static { static {
@@ -34,54 +25,24 @@ public class BlockRunestone extends Block {
map_colours.put(Element.SORCERY, MapColor.GRAY); map_colours.put(Element.SORCERY, MapColor.GRAY);
map_colours.put(Element.HEALING, MapColor.YELLOW_STAINED_HARDENED_CLAY); map_colours.put(Element.HEALING, MapColor.YELLOW_STAINED_HARDENED_CLAY);
} }
public BlockRunestone(Material material){ private final Element element;
public BlockRunestone(Material material, Element element) {
super(material); super(material);
this.setDefaultState(this.blockState.getBaseState().withProperty(ELEMENT, Element.FIRE)); this.setCreativeTab(WizardryTabs.WIZARDRY);
this.setCreativeTab(WizardryTabs.WIZARDRY);
this.setHardness(1.5F); this.setHardness(1.5F);
this.setResistance(10.0F); this.setResistance(10.0F);
} this.element = element;
@Override
public int damageDropped(IBlockState state){
return state.getValue(ELEMENT).ordinal();
}
@Override
public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos){
return map_colours.get(state.getProperties().get(ELEMENT));
}
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> items){
if(this.getCreativeTab() == tab){
for(Element element : Arrays.copyOfRange(Element.values(), 1, Element.values().length)){
items.add(new ItemStack(this, 1, element.ordinal()));
}
}
} }
public Element getElement() { return element; }
@Override @Override
public BlockRenderLayer getRenderLayer(){ public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos) { return map_colours.get(element); }
@Override
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT; // Required to shade parts of the block faces differently to others return BlockRenderLayer.CUTOUT; // Required to shade parts of the block faces differently to others
} }
@Override
public IBlockState getStateFromMeta(int metadata){
Element element = Element.values()[metadata];
if(!ELEMENT.getAllowedValues().contains(element)) return this.getDefaultState();
return this.getDefaultState().withProperty(ELEMENT, element);
}
@Override
public int getMetaFromState(IBlockState state){
return state.getValue(ELEMENT).ordinal();
}
@Override
protected BlockStateContainer createBlockState(){
return new BlockStateContainer(this, ELEMENT);
}
} }
@@ -1,5 +1,6 @@
package electroblob.wizardry.block; package electroblob.wizardry.block;
import electroblob.wizardry.api.IElemental;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
import electroblob.wizardry.registry.WizardryTabs; import electroblob.wizardry.registry.WizardryTabs;
import electroblob.wizardry.tileentity.TileEntityShrineCore; import electroblob.wizardry.tileentity.TileEntityShrineCore;
@@ -8,28 +9,20 @@ import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.MapColor; import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Explosion; import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.EnumMap; import java.util.EnumMap;
public class BlockPedestal extends Block implements ITileEntityProvider { public class BlockRunestonePedestal extends Block implements ITileEntityProvider, IElemental {
public static final PropertyEnum<Element> ELEMENT = PropertyEnum.create("element", Element.class,
Arrays.copyOfRange(Element.values(), 1, Element.values().length)); // Everything except MAGIC
// A 'natural' pedestal is one that was generated as part of a structure, is unbreakable and has a tileentity // A 'natural' pedestal is one that was generated as part of a structure, is unbreakable and has a tileentity
public static final PropertyBool NATURAL = PropertyBool.create("natural"); public static final PropertyBool NATURAL = PropertyBool.create("natural");
@@ -46,80 +39,66 @@ public class BlockPedestal extends Block implements ITileEntityProvider {
map_colours.put(Element.HEALING, MapColor.YELLOW_STAINED_HARDENED_CLAY); map_colours.put(Element.HEALING, MapColor.YELLOW_STAINED_HARDENED_CLAY);
} }
public BlockPedestal(Material material){ private final Element element;
public BlockRunestonePedestal(Material material, Element element) {
super(material); super(material);
this.setDefaultState(this.blockState.getBaseState().withProperty(ELEMENT, Element.FIRE).withProperty(NATURAL, false)); this.setDefaultState(this.blockState.getBaseState().withProperty(NATURAL, false));
this.setCreativeTab(WizardryTabs.WIZARDRY); this.setCreativeTab(WizardryTabs.WIZARDRY);
this.setHardness(1.5F); this.setHardness(1.5F);
this.setResistance(10.0F); this.setResistance(10.0F);
this.element = element;
} }
@Override @Override
public int damageDropped(IBlockState state){ public Element getElement() {
return state.getValue(ELEMENT).ordinal(); // Ignore the NATURAL state here, it's unobtainable return element;
} }
@Override @Override
public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos){ public MapColor getMapColor(IBlockState state, IBlockAccess world, BlockPos pos) {
return map_colours.get(state.getProperties().get(ELEMENT)); return map_colours.get(element);
} }
@Override @Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> items){ public BlockRenderLayer getRenderLayer() {
// Ignore the NATURAL state here, it's unobtainable
if(this.getCreativeTab() == tab){
for(Element element : Arrays.copyOfRange(Element.values(), 1, Element.values().length)){
items.add(new ItemStack(this, 1, element.ordinal()));
}
}
}
@Override
public BlockRenderLayer getRenderLayer(){
return BlockRenderLayer.CUTOUT; // Required to shade parts of the block faces differently to others return BlockRenderLayer.CUTOUT; // Required to shade parts of the block faces differently to others
} }
@Override @Override
public float getBlockHardness(IBlockState state, World world, BlockPos pos){ public float getBlockHardness(IBlockState state, World world, BlockPos pos) {
return state.getValue(NATURAL) ? -1 : super.getBlockHardness(state, world, pos); return state.getValue(NATURAL) ? -1 : super.getBlockHardness(state, world, pos);
} }
@Override @Override
public float getExplosionResistance(World world, BlockPos pos, @Nullable Entity exploder, Explosion explosion){ public float getExplosionResistance(World world, BlockPos pos, @Nullable Entity exploder, Explosion explosion) {
return world.getBlockState(pos).getValue(NATURAL) ? 6000000.0F : super.getExplosionResistance(world, pos, exploder, explosion); return world.getBlockState(pos).getValue(NATURAL) ? 6000000.0F : super.getExplosionResistance(world, pos, exploder, explosion);
} }
@Override @Override
public boolean hasTileEntity(IBlockState state){ public boolean hasTileEntity(IBlockState state) {
return state.getValue(NATURAL); // Only naturally-generated pedestals have a (shrine core) tile entity return state.getValue(NATURAL); // Only naturally-generated pedestals have a (shrine core) tile entity
} }
@Nullable @Nullable
@Override @Override
public TileEntity createNewTileEntity(World world, int meta){ public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityShrineCore(); return new TileEntityShrineCore();
} }
@Override @Override
public IBlockState getStateFromMeta(int metadata){ public IBlockState getStateFromMeta(int meta) {
boolean natural = false; return this.getDefaultState().withProperty(NATURAL, meta == 1);
if(metadata > ELEMENT.getAllowedValues().size()){
natural = true;
metadata -= ELEMENT.getAllowedValues().size();
}
Element element = Element.values()[metadata];
if(!ELEMENT.getAllowedValues().contains(element)) return this.getDefaultState().withProperty(NATURAL, natural);
return this.getDefaultState().withProperty(ELEMENT, element).withProperty(NATURAL, natural);
} }
@Override @Override
public int getMetaFromState(IBlockState state){ public int getMetaFromState(IBlockState state) {
return state.getValue(ELEMENT).ordinal() + (state.getValue(NATURAL) ? ELEMENT.getAllowedValues().size() : 0); return state.getValue(NATURAL) ? 1 : 0;
} }
@Override @Override
protected BlockStateContainer createBlockState(){ protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, ELEMENT, NATURAL); return new BlockStateContainer(this, NATURAL);
} }
} }
@@ -3,7 +3,10 @@ package electroblob.wizardry.client;
import electroblob.wizardry.client.renderer.overlay.RenderBlinkEffect; import electroblob.wizardry.client.renderer.overlay.RenderBlinkEffect;
import electroblob.wizardry.data.DispenserCastingData; import electroblob.wizardry.data.DispenserCastingData;
import electroblob.wizardry.data.SpellEmitterData; import electroblob.wizardry.data.SpellEmitterData;
import electroblob.wizardry.item.*; import electroblob.wizardry.item.ItemArtefact;
import electroblob.wizardry.item.ItemFlamecatcher;
import electroblob.wizardry.item.ItemSpectralBow;
import electroblob.wizardry.item.ItemWand;
import electroblob.wizardry.potion.PotionSlowTime; import electroblob.wizardry.potion.PotionSlowTime;
import electroblob.wizardry.registry.WizardryItems; import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.registry.WizardryPotions; import electroblob.wizardry.registry.WizardryPotions;
@@ -117,7 +120,6 @@ public final class WizardryClientEventHandler {
Minecraft.getMinecraft().player.prevRotationPitch = 0; Minecraft.getMinecraft().player.prevRotationPitch = 0;
Minecraft.getMinecraft().player.rotationYaw = 0; Minecraft.getMinecraft().player.rotationYaw = 0;
Minecraft.getMinecraft().player.rotationPitch = 0; Minecraft.getMinecraft().player.rotationPitch = 0;
} }
} }
@@ -131,10 +133,10 @@ public final class WizardryClientEventHandler {
event.getMovementInput().jump = false; event.getMovementInput().jump = false;
event.getMovementInput().sneak = false; event.getMovementInput().sneak = false;
} }
if(ItemArtefact.isArtefactActive(event.getEntityPlayer(), WizardryItems.charm_move_speed) if(ItemArtefact.isArtefactActive(event.getEntityPlayer(), WizardryItems.charm_move_speed)
&& event.getEntityPlayer().isHandActive() && event.getEntityPlayer().isHandActive()
&& event.getEntityPlayer().getActiveItemStack().getItem() instanceof ISpellCastingItem){ && event.getEntityPlayer().getActiveItemStack().getItem() instanceof ItemWand){
// Normally speed is set to 20% when using items, this makes it 80% // Normally speed is set to 20% when using items, this makes it 80%
event.getMovementInput().moveStrafe *= 4; event.getMovementInput().moveStrafe *= 4;
event.getMovementInput().moveForward *= 4; event.getMovementInput().moveForward *= 4;
@@ -93,7 +93,6 @@ public class GuiArcaneWorkbench extends GuiContainer {
private ContainerArcaneWorkbench arcaneWorkbenchContainer; private ContainerArcaneWorkbench arcaneWorkbenchContainer;
private GuiButton applyBtn; private GuiButton applyBtn;
private GuiButton clearBtn;
private GuiButton[] sortButtons = new GuiButton[3]; private GuiButton[] sortButtons = new GuiButton[3];
private GuiTextField searchField; private GuiTextField searchField;
@@ -127,7 +126,6 @@ public class GuiArcaneWorkbench extends GuiContainer {
this.buttonList.clear(); this.buttonList.clear();
this.buttonList.add(this.applyBtn = new GuiButtonApply(0, this.width / 2 + 64, this.height / 2 + 3)); this.buttonList.add(this.applyBtn = new GuiButtonApply(0, this.width / 2 + 64, this.height / 2 + 3));
this.buttonList.add(this.clearBtn = new GuiButtonClear(0, this.width / 2 + 64, this.height / 2 - 16));
this.buttonList.add(sortButtons[0] = new GuiButtonSpellSort(1, this.guiLeft - 44, this.guiTop + 8, ISpellSortable.SortType.TIER, arcaneWorkbenchContainer, this)); this.buttonList.add(sortButtons[0] = new GuiButtonSpellSort(1, this.guiLeft - 44, this.guiTop + 8, ISpellSortable.SortType.TIER, arcaneWorkbenchContainer, this));
this.buttonList.add(sortButtons[1] = new GuiButtonSpellSort(2, this.guiLeft - 31, this.guiTop + 8, ISpellSortable.SortType.ELEMENT, arcaneWorkbenchContainer, this)); this.buttonList.add(sortButtons[1] = new GuiButtonSpellSort(2, this.guiLeft - 31, this.guiTop + 8, ISpellSortable.SortType.ELEMENT, arcaneWorkbenchContainer, this));
this.buttonList.add(sortButtons[2] = new GuiButtonSpellSort(3, this.guiLeft - 18, this.guiTop + 8, ISpellSortable.SortType.ALPHABETICAL, arcaneWorkbenchContainer, this)); this.buttonList.add(sortButtons[2] = new GuiButtonSpellSort(3, this.guiLeft - 18, this.guiTop + 8, ISpellSortable.SortType.ALPHABETICAL, arcaneWorkbenchContainer, this));
@@ -207,7 +205,6 @@ public class GuiArcaneWorkbench extends GuiContainer {
// Show/hide the relevant gui elements // Show/hide the relevant gui elements
this.applyBtn.enabled = centreSlot.getHasStack(); this.applyBtn.enabled = centreSlot.getHasStack();
this.clearBtn.enabled = centreSlot.getHasStack() && centreSlot.getStack().getItem() instanceof IWorkbenchItem && ((IWorkbenchItem) centreSlot.getStack().getItem()).isClearable();
for(GuiButton button : this.sortButtons) button.visible = arcaneWorkbenchContainer.hasBookshelves(); for(GuiButton button : this.sortButtons) button.visible = arcaneWorkbenchContainer.hasBookshelves();
this.searchField.setVisible(arcaneWorkbenchContainer.hasBookshelves()); this.searchField.setVisible(arcaneWorkbenchContainer.hasBookshelves());
@@ -447,17 +444,6 @@ public class GuiArcaneWorkbench extends GuiContainer {
animationTimer = 20; animationTimer = 20;
} }
if(button == clearBtn){
// Packet building
IMessage msg = new PacketControlInput.Message(PacketControlInput.ControlType.CLEAR_BUTTON);
WizardryPacketHandler.net.sendToServer(msg);
// Sound
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(
WizardrySounds.BLOCK_ARCANE_WORKBENCH_SPELLBIND, 0.8f));
// Animation
animationTimer = 20;
}
if(button instanceof GuiButtonSpellSort) this.arcaneWorkbenchContainer.setSortType(((GuiButtonSpellSort)button).sortType); if(button instanceof GuiButtonSpellSort) this.arcaneWorkbenchContainer.setSortType(((GuiButtonSpellSort)button).sortType);
} }
} }
@@ -1020,36 +1006,4 @@ public class GuiArcaneWorkbench extends GuiContainer {
} }
} }
private static class GuiButtonClear extends GuiButton {
public GuiButtonClear(int id, int x, int y){
super(id, x, y, 16, 16, I18n.format("container." + Wizardry.MODID + ":arcane_workbench.clear"));
}
@Override
public void drawButton(Minecraft minecraft, int mouseX, int mouseY, float partialTicks){
// Whether the button is highlighted
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
int k = 72;
int l = 236;
//int colour = 14737632;
if(this.enabled){
if(this.hovered){
k += this.width * 2;
//colour = 16777120;
}
}else{
k += this.width;
//colour = 10526880;
}
DrawingUtils.drawTexturedRect(this.x, this.y, k, l, this.width, this.height, TEXTURE_WIDTH, TEXTURE_HEIGHT);
//this.drawCenteredString(minecraft.fontRenderer, this.displayString, this.x + this.width / 2,
// this.y + (this.height - 8) / 2, colour);
}
}
} }
@@ -33,13 +33,9 @@ import java.awt.*;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.*;
import java.nio.charset.StandardCharsets;
/** /**
* GUI class for the wizard's handbook. Like any GUI class, this is instantiated each time the book is opened. As of * GUI class for the wizard's handbook. Like any GUI class, this is instantiated each time the book is opened. As of
@@ -59,8 +55,6 @@ public class GuiWizardHandbook extends GuiScreen {
private static final ResourceLocation DEFAULT = new ResourceLocation(Wizardry.MODID, "texts/handbook_en_us.json"); private static final ResourceLocation DEFAULT = new ResourceLocation(Wizardry.MODID, "texts/handbook_en_us.json");
private static List<String> ADDONS = new ArrayList<>();
static final ResourceLocation texture = new ResourceLocation(Wizardry.MODID, "textures/gui/handbook/handbook.png"); static final ResourceLocation texture = new ResourceLocation(Wizardry.MODID, "textures/gui/handbook/handbook.png");
/** Global Gson instance for the handbook. */ /** Global Gson instance for the handbook. */
@@ -412,10 +406,9 @@ public class GuiWizardHandbook extends GuiScreen {
return; return;
} }
// IResource handbookFile = getHandbookResource(manager); IResource handbookFile = getHandbookResource(manager);
List<IResource> handbookFiles = getHandbookResource(manager);
if(!handbookFiles.isEmpty()){ if(handbookFile != null){
// Wipes all the maps before repopulating them // Wipes all the maps before repopulating them
images.clear(); images.clear();
@@ -425,31 +418,28 @@ public class GuiWizardHandbook extends GuiScreen {
bookmarkSection = null; // Also need to wipe the reference to the old bookmarked section bookmarkSection = null; // Also need to wipe the reference to the old bookmarked section
for (IResource handbookFile : handbookFiles) { BufferedReader reader = new BufferedReader(new InputStreamReader(handbookFile.getInputStream(), StandardCharsets.UTF_8));
BufferedReader reader = new BufferedReader(new InputStreamReader(handbookFile.getInputStream(), StandardCharsets.UTF_8)); JsonElement je = gson.fromJson(reader, JsonElement.class);
JsonObject json = je.getAsJsonObject();
JsonElement je = gson.fromJson(reader, JsonElement.class); JsonUtils.getJsonObject(json, "colours").entrySet().forEach(e -> colours.put(e.getKey(),
JsonObject json = je.getAsJsonObject(); Color.decode(e.getValue().getAsString()).getRGB()));
JsonUtils.getJsonObject(json, "colours").entrySet().forEach(e -> colours.put(e.getKey(), // Repopulates the remaining maps
Color.decode(e.getValue().getAsString()).getRGB())); Image.populate(images, json);
CraftingRecipe.populate(recipes, json);
Section.populate(sections, json);
// Repopulates the remaining maps sectionList = Collections.unmodifiableList(new ArrayList<>(sections.values()));
Image.populate(images, json);
CraftingRecipe.populate(recipes, json);
Section.populate(sections, json);
sectionList = Collections.unmodifiableList(new ArrayList<>(sections.values())); if(sections.isEmpty()){
Wizardry.logger.warn("Handbook has no sections! Aborting loading...");
if(sections.isEmpty()){ return;
Wizardry.logger.warn("Handbook has no sections! Aborting loading...");
return;
}
bookmarkSection = JsonUtils.getString(json, "bookmark_start_section");
if(!sections.containsKey(bookmarkSection)) throw new JsonSyntaxException("Section with id " + bookmarkSection + " is undefined");
} }
bookmarkSection = JsonUtils.getString(json, "bookmark_start_section");
if(!sections.containsKey(bookmarkSection)) throw new JsonSyntaxException("Section with id " + bookmarkSection + " is undefined");
} }
// The first resource load on startup is done before the packet handler is loaded // The first resource load on startup is done before the packet handler is loaded
@@ -465,17 +455,16 @@ public class GuiWizardHandbook extends GuiScreen {
* @param manager The resource manager instance to use. * @param manager The resource manager instance to use.
* @return The handbook JSON file, as an IResource, or null if it was not found. * @return The handbook JSON file, as an IResource, or null if it was not found.
*/ */
private static List<IResource> getHandbookResource(IResourceManager manager){ private static IResource getHandbookResource(IResourceManager manager){
// TODO: Implement resource pack stacking to allow addon mods and texture packs to add/overwrite content // TODO: Implement resource pack stacking to allow addon mods and texture packs to add/overwrite content
IResource handbookFile = null; IResource handbookFile = null;
List<IResource> handbookFiles = new ArrayList<>();
try{ try{
handbookFile = manager.getResource(new ResourceLocation(Wizardry.MODID, "texts/handbook_" handbookFile = manager.getResource(new ResourceLocation(Wizardry.MODID, "texts/handbook_"
+ Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode() + ".json")); + Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode() + ".json"));
}catch(Exception e){ }catch(IOException e){
Wizardry.logger.info("Wizard handbook JSON file missing for the current language (" + Minecraft.getMinecraft() Wizardry.logger.info("Wizard handbook JSON file missing for the current language (" + Minecraft.getMinecraft()
.getLanguageManager().getCurrentLanguage() + "). Using default (English-US) instead."); .getLanguageManager().getCurrentLanguage() + "). Using default (English-US) instead.");
@@ -487,29 +476,7 @@ public class GuiWizardHandbook extends GuiScreen {
} }
} }
handbookFiles.add(handbookFile); return handbookFile;
for (String modid : ADDONS) {
// Addons
Wizardry.logger.info("Registering addon Wizard's Handbook contents for " + modid);
try{
handbookFile = manager.getResource(new ResourceLocation(modid, "texts/handbook_"
+ Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode() + ".json"));
}catch(Exception e){
Wizardry.logger.info("Wizard handbook JSON file missing for the current language (" + Minecraft.getMinecraft()
.getLanguageManager().getCurrentLanguage() + "). Using default (English-US) instead.");
try{
handbookFile = manager.getResource(new ResourceLocation(modid, "texts/handbook_en_us.json"));
}catch(IOException x){
Wizardry.logger.error("Couldn't find file: " + DEFAULT + ". The file may be missing; please try re-downloading and reinstalling Wizardry.", x);
}
}
handbookFiles.add(handbookFile);
}
return handbookFiles;
} }
// Controls // Controls
@@ -609,9 +576,4 @@ public class GuiWizardHandbook extends GuiScreen {
sections.values().forEach(s -> s.updateUnlockStatus(showToasts, completedAdvancements)); sections.values().forEach(s -> s.updateUnlockStatus(showToasts, completedAdvancements));
} }
public static void registerAddonHandbookContent(String modid) {
if (!ADDONS.contains(modid)) {
ADDONS.add(modid);
}
}
} }
@@ -299,7 +299,7 @@ class Section {
String suffix = ""; String suffix = "";
// Account for trailing punctuation, except in languages that don't use spaces such as Chinese // Account for trailing punctuation, except in languages that don't use spaces such as Chinese
boolean spaceless = SPACELESS_LANGUAGES.contains(Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage() == null ? "en_us" : Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode()); boolean spaceless = SPACELESS_LANGUAGES.contains(Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode());
if(!spaceless) paragraph.substring(linkEnd).split("\\s", 2)[0].substring(1); // substring(1) to remove the @ if(!spaceless) paragraph.substring(linkEnd).split("\\s", 2)[0].substring(1); // substring(1) to remove the @
// The index of the single page currently being formatted, relative to the section // The index of the single page currently being formatted, relative to the section
@@ -1,13 +1,9 @@
package electroblob.wizardry.client.model; package electroblob.wizardry.client.model;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.block.BlockCrystal; import electroblob.wizardry.block.BlockRunestonePedestal;
import electroblob.wizardry.block.BlockPedestal;
import electroblob.wizardry.block.BlockRunestone;
import electroblob.wizardry.item.IMultiTexturedItem; import electroblob.wizardry.item.IMultiTexturedItem;
import electroblob.wizardry.item.ItemBlockMultiTextured; import electroblob.wizardry.item.ItemBlockMultiTextured;
import electroblob.wizardry.item.ItemCrystal;
import electroblob.wizardry.item.ItemSpectralDust;
import electroblob.wizardry.registry.WizardryBlocks; import electroblob.wizardry.registry.WizardryBlocks;
import electroblob.wizardry.registry.WizardryItems; import electroblob.wizardry.registry.WizardryItems;
import net.minecraft.block.BlockPlanks; import net.minecraft.block.BlockPlanks;
@@ -50,35 +46,12 @@ public final class WizardryModels {
@SubscribeEvent @SubscribeEvent
public static void register(ModelRegistryEvent event){ public static void register(ModelRegistryEvent event){
// ItemBlocks
ModelLoader.setCustomStateMapper(WizardryBlocks.crystal_block, new StateMap.Builder()
.withName(BlockCrystal.ELEMENT).withSuffix("_crystal_block").build());
// Yay unchecked casting! But we know it's always ok here, and it makes everything much neater.
ItemBlockMultiTextured crystalBlockItem = (ItemBlockMultiTextured)Item.getItemFromBlock(WizardryBlocks.crystal_block);
registerMultiTexturedModel(crystalBlockItem);
ModelLoader.setCustomStateMapper(WizardryBlocks.runestone, new StateMap.Builder()
.withName(BlockRunestone.ELEMENT).withSuffix("_runestone").build());
ItemBlockMultiTextured runestoneItem = (ItemBlockMultiTextured)Item.getItemFromBlock(WizardryBlocks.runestone);
registerMultiTexturedModel(runestoneItem);
ModelLoader.setCustomStateMapper(WizardryBlocks.runestone_pedestal, new StateMap.Builder()
.withName(BlockPedestal.ELEMENT).ignore(BlockPedestal.NATURAL).withSuffix("_runestone_pedestal").build()); // Don't care about NATURAL property
ItemBlockMultiTextured pedestalItem = (ItemBlockMultiTextured)Item.getItemFromBlock(WizardryBlocks.runestone_pedestal);
registerMultiTexturedModel(pedestalItem);
ModelLoader.setCustomStateMapper(WizardryBlocks.gilded_wood, new StateMap.Builder()
.withName(BlockPlanks.VARIANT).withSuffix("_gilded_wood").build());
ItemBlockMultiTextured gildedWoodItem = (ItemBlockMultiTextured)Item.getItemFromBlock(WizardryBlocks.gilded_wood);
registerMultiTexturedModel(gildedWoodItem);
// Explanation for all this here -> https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe05_block_dynamic_block_model2 // Explanation for all this here -> https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe05_block_dynamic_block_model2
ModelLoaderRegistry.registerLoader(new ModelLoaderBookshelf()); ModelLoaderRegistry.registerLoader(new ModelLoaderBookshelf());
// Items // Items
registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal); //registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal);
registerWandModel(WizardryItems.magic_wand); registerWandModel(WizardryItems.magic_wand);
registerWandModel(WizardryItems.apprentice_wand); registerWandModel(WizardryItems.apprentice_wand);
@@ -121,8 +94,6 @@ public final class WizardryModels {
registerWandModel(WizardryItems.master_sorcery_wand); registerWandModel(WizardryItems.master_sorcery_wand);
registerWandModel(WizardryItems.master_healing_wand); registerWandModel(WizardryItems.master_healing_wand);
registerMultiTexturedModel((ItemSpectralDust)WizardryItems.spectral_dust);
// Automatic item model registry // Automatic item model registry
for(Item item : Item.REGISTRY){ for(Item item : Item.REGISTRY){
if(!registeredItems.contains(item) && item.getRegistryName().getNamespace().equals(Wizardry.MODID)){ if(!registeredItems.contains(item) && item.getRegistryName().getNamespace().equals(Wizardry.MODID)){
@@ -42,8 +42,8 @@ public class LayerDiamond extends LayerTiledOverlay<EntityLivingBase> {
int j = entity.getBrightnessForRender(); int j = entity.getBrightnessForRender();
int k = j % 65536; int k = j % 65536;
int l = j / 65536; int l = j / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k, (float) l); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k, (float) l);
super.doRenderLayer(entity, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale); super.doRenderLayer(entity, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
@@ -43,7 +43,7 @@ public class LayerOak extends LayerTiledOverlay<EntityLivingBase> {
int j = entity.getBrightnessForRender(); int j = entity.getBrightnessForRender();
int k = j % 65536; int k = j % 65536;
int l = j / 65536; int l = j / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k, (float) l); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k, (float) l);
super.doRenderLayer(entity, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale); super.doRenderLayer(entity, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
@@ -1,6 +1,5 @@
package electroblob.wizardry.constants; package electroblob.wizardry.constants;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.WizardryEventHandler; import electroblob.wizardry.WizardryEventHandler;
/** Stores various global constants used in Wizardry. */ /** Stores various global constants used in Wizardry. */
@@ -18,17 +17,17 @@ public final class Constants {
/** The bonus amount of wand upgrades that can be applied to a non-elemental wand. */ /** The bonus amount of wand upgrades that can be applied to a non-elemental wand. */
public static final int NON_ELEMENTAL_UPGRADE_BONUS = 3; public static final int NON_ELEMENTAL_UPGRADE_BONUS = 3;
/** The fraction by which cooldowns are reduced for each level of cooldown upgrade. */ /** The fraction by which cooldowns are reduced for each level of cooldown upgrade. */
public static float COOLDOWN_REDUCTION_PER_LEVEL = 0.15f; public static final float COOLDOWN_REDUCTION_PER_LEVEL = 0.15f;
/** The fraction by which maximum charge is increased for each level of storage upgrade. */ /** The fraction by which maximum charge is increased for each level of storage upgrade. */
public static final float STORAGE_INCREASE_PER_LEVEL = 0.15f; public static final float STORAGE_INCREASE_PER_LEVEL = 0.15f;
/** The fraction by which potency is increased for each tier of matching wand. */ /** The fraction by which potency is increased for each tier of matching wand. */
public static float POTENCY_INCREASE_PER_TIER = 0.15f; public static final float POTENCY_INCREASE_PER_TIER = 0.15f;
/** The fraction by which spell duration is increased for each level of duration upgrade. */ /** The fraction by which spell duration is increased for each level of duration upgrade. */
public static float DURATION_INCREASE_PER_LEVEL = 0.25f; public static final float DURATION_INCREASE_PER_LEVEL = 0.25f;
/** The fraction by which spell range is increased for each level of range upgrade. */ /** The fraction by which spell range is increased for each level of range upgrade. */
public static float RANGE_INCREASE_PER_LEVEL = 0.25f; public static final float RANGE_INCREASE_PER_LEVEL = 0.25f;
/** The fraction by which spell blast radius is increased for each level of range upgrade. */ /** The fraction by which spell blast radius is increased for each level of range upgrade. */
public static float BLAST_RADIUS_INCREASE_PER_LEVEL = 0.25f; public static final float BLAST_RADIUS_INCREASE_PER_LEVEL = 0.25f;
/** The fraction by which movement speed is reduced per level of frost effect. */ /** The fraction by which movement speed is reduced per level of frost effect. */
public static final double FROST_SLOWNESS_PER_LEVEL = 0.5; public static final double FROST_SLOWNESS_PER_LEVEL = 0.5;
/** The fraction by which movement speed is reduced per level of decay effect. */ /** The fraction by which movement speed is reduced per level of decay effect. */
@@ -48,14 +47,4 @@ public final class Constants {
*/ */
public static final int DECAY_SPREAD_INTERVAL = 8; public static final int DECAY_SPREAD_INTERVAL = 8;
// making this as an update to the existing values to not break addons directly relying on the fields
static {
POTENCY_INCREASE_PER_TIER = (float) Wizardry.settings.potencyIncreasePerTier;
COOLDOWN_REDUCTION_PER_LEVEL = (float) Wizardry.settings.cooldownReductionPerLevel;
DURATION_INCREASE_PER_LEVEL = (float) Wizardry.settings.durationIncreasePerLevel;
RANGE_INCREASE_PER_LEVEL = (float) Wizardry.settings.rangeIncreasePerLevel;
BLAST_RADIUS_INCREASE_PER_LEVEL = (float) Wizardry.settings.blastIncreasePerLevel;
RANGE_INCREASE_PER_LEVEL = (float) Wizardry.settings.frostSlownessIncreasePerLevel;
}
} }
@@ -30,14 +30,23 @@ public enum Element implements IStringSerializable {
/** The {@link ResourceLocation} for this element's 8x8 icon (displayed in the arcane workbench GUI) */ /** The {@link ResourceLocation} for this element's 8x8 icon (displayed in the arcane workbench GUI) */
private final ResourceLocation icon; private final ResourceLocation icon;
private String modid;
/** true if this element should have worldgen structures generated (Obelisk, Shrine) */
private final boolean worldgen;
/** true if evil/good wizards of this element should naturally spawn */
private final boolean wizards;
Element(Style colour, String name){ Element(Style colour, String name){
this(colour, name, Wizardry.MODID); this(colour, name, Wizardry.MODID, true, true);
} }
Element(Style colour, String name, String modid){ Element(Style colour, String name, String modid, boolean worldgen, boolean wizards){
this.colour = colour; this.colour = colour;
this.unlocalisedName = name; this.unlocalisedName = name;
this.icon = new ResourceLocation(modid, "textures/gui/container/element_icon_" + unlocalisedName + ".png"); this.icon = new ResourceLocation(modid, "textures/gui/container/element_icon_" + unlocalisedName + ".png");
this.modid = modid;
this.worldgen = worldgen;
this.wizards = wizards;
} }
/** Returns the element with the given name, or throws an {@link java.lang.IllegalArgumentException} if no such /** Returns the element with the given name, or throws an {@link java.lang.IllegalArgumentException} if no such
@@ -93,4 +102,10 @@ public enum Element implements IStringSerializable {
public ResourceLocation getIcon(){ public ResourceLocation getIcon(){
return icon; return icon;
} }
public boolean hasWorldgen() { return worldgen; }
public boolean hasWizards() { return wizards; }
public String getModid() { return modid; }
} }
@@ -64,11 +64,6 @@ public interface IStoredVariable<T> extends IVariable<T> {
this.ticker = (p, t) -> t; // Initialise this with a do-nothing function, can be overwritten later this.ticker = (p, t) -> t; // Initialise this with a do-nothing function, can be overwritten later
} }
@Override
public String getKey() {
return key;
}
/** /**
* Replaces this variable's update method with the given update function. <i>Beware of auto-unboxing of * Replaces this variable's update method with the given update function. <i>Beware of auto-unboxing of
* primitive types! For lambda expressions, check the second parameter isn't null before operating on it. * primitive types! For lambda expressions, check the second parameter isn't null before operating on it.
@@ -47,10 +47,7 @@ public interface IVariable<T> {
*/ */
void write(ByteBuf buf, T value); void write(ByteBuf buf, T value);
String getKey();
/** /**
*
* Reads this variable's value from the given {@link ByteBuf}. * Reads this variable's value from the given {@link ByteBuf}.
*/ */
T read(ByteBuf buf); T read(ByteBuf buf);
@@ -113,11 +110,6 @@ public interface IVariable<T> {
// NYI // NYI
} }
@Override
public String getKey() {
return "none"; // we don't mind as these are never synced (electroblob.wizardry.data.IVariable.Variable.isSynced)
}
@Override @Override
public T read(ByteBuf buf){ public T read(ByteBuf buf){
return null; // NYI return null; // NYI
@@ -199,14 +199,9 @@ public class WizardData implements INBTSerializable<NBTTagCompound> {
} }
/** Returns a set containing the registered {@link IStoredVariable} objects for which {@link IVariable#isSynced()} /** Returns a set containing the registered {@link IStoredVariable} objects for which {@link IVariable#isSynced()}
* returns true, ordered by their keys obtained from {@link IVariable#getKey()}. Used internally for packets. */ * returns true. Used internally for packet reading. */
public static Set<IVariable> getSyncedVariablesOrderedByKey(){ public static Set<IVariable> getSyncedVariables(){
Comparator<IVariable> keyComparator = Comparator.comparing(IVariable::getKey); return storedVariables.stream().filter(IVariable::isSynced).collect(Collectors.toSet());
return storedVariables.stream()
.filter(IVariable::isSynced)
.sorted(keyComparator)
.collect(Collectors.toCollection(LinkedHashSet::new));
} }
/** /**
@@ -387,7 +382,6 @@ public class WizardData implements INBTSerializable<NBTTagCompound> {
activeImbuements.add((Imbuement)enchantment); activeImbuements.add((Imbuement)enchantment);
}else{ }else{
// Otherwise, removes the enchantment from the item // Otherwise, removes the enchantment from the item
((Imbuement) enchantment).onImbuementRemoval(stack);
iterator.remove(); // FIXME: Apparently this can cause a CME iterator.remove(); // FIXME: Apparently this can cause a CME
} }
} }
@@ -35,8 +35,8 @@ public class EntityDecay extends EntityMagicConstruct {
0.6F + rand.nextFloat() * 0.15F); 0.6F + rand.nextFloat() * 0.15F);
if(!this.world.isRemote){ if(!this.world.isRemote){
List<EntityLivingBase> targets = EntityUtils.getLivingWithinCylinder(this.width/2f, this.posX, this.posY, List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(1.0d, this.posX, this.posY,
this.posZ, this.height, this.world); this.posZ, this.world);
for(EntityLivingBase target : targets){ for(EntityLivingBase target : targets){
if(target != this.getCaster()){ if(target != this.getCaster()){
// If this check wasn't here the potion would be reapplied every tick and hence the entity would be // If this check wasn't here the potion would be reapplied every tick and hence the entity would be
@@ -34,7 +34,7 @@ public class EntityFireRing extends EntityScaledConstruct {
if(this.ticksExisted % 5 == 0 && !this.world.isRemote){ if(this.ticksExisted % 5 == 0 && !this.world.isRemote){
List<EntityLivingBase> targets = EntityUtils.getLivingWithinCylinder(this.width/2, this.posX, this.posY, this.posZ, this.height, this.world); List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(width/2, this.posX, this.posY, this.posZ, this.world);
for(EntityLivingBase target : targets){ for(EntityLivingBase target : targets){
@@ -34,7 +34,7 @@ public class EntityFireSigil extends EntityScaledConstruct {
if(!this.world.isRemote){ if(!this.world.isRemote){
List<EntityLivingBase> targets = EntityUtils.getLivingWithinCylinder(this.width/2, this.posX, this.posY, this.posZ, this.height, this.world); List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(width/2, posX, posY, posZ, world);
for(EntityLivingBase target : targets){ for(EntityLivingBase target : targets){
@@ -36,8 +36,8 @@ public class EntityFrostSigil extends EntityScaledConstruct {
if(!this.world.isRemote){ if(!this.world.isRemote){
List<EntityLivingBase> targets = EntityUtils.getLivingWithinCylinder(width/2, this.posX, this.posY, List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(width/2, this.posX, this.posY,
this.posZ, this.height, this.world); this.posZ, this.world);
for(EntityLivingBase target : targets){ for(EntityLivingBase target : targets){
@@ -33,32 +33,30 @@ public class EntityHealAura extends EntityScaledConstruct {
if(!this.world.isRemote){ if(!this.world.isRemote){
List<EntityLivingBase> targets = EntityUtils.getLivingWithinCylinder(width/2, posX, posY, posZ, this.height, world); List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(width/2, posX, posY, posZ, world);
for(EntityLivingBase target : targets){ for(EntityLivingBase target : targets){
if(this.isValidTarget(target)){ if(this.isValidTarget(target)){
if(target.isEntityUndead()) { if(target.isEntityUndead()){
double velX = target.motionX; double velX = target.motionX;
double velY = target.motionY; double velY = target.motionY;
double velZ = target.motionZ; double velZ = target.motionZ;
if (this.ticksExisted % 10 == 1) { if(this.getCaster() != null){
if (this.getCaster() != null) { target.attackEntityFrom(
target.attackEntityFrom( MagicDamage.causeIndirectMagicDamage(this, getCaster(), DamageType.RADIANT),
MagicDamage.causeIndirectMagicDamage(this, getCaster(), DamageType.RADIANT), Spells.healing_aura.getProperty(Spell.DAMAGE).floatValue() * damageMultiplier);
Spells.healing_aura.getProperty(Spell.DAMAGE).floatValue() * damageMultiplier); }else{
} else { target.attackEntityFrom(DamageSource.MAGIC, Spells.healing_aura.getProperty(Spell.DAMAGE).floatValue() * damageMultiplier);
target.attackEntityFrom(DamageSource.MAGIC, Spells.healing_aura.getProperty(Spell.DAMAGE).floatValue() * damageMultiplier);
}
// Removes knockback
target.motionX = velX;
target.motionY = velY;
target.motionZ = velZ;
} }
// Removes knockback
target.motionX = velX;
target.motionY = velY;
target.motionZ = velZ;
} }
}else if(target.getHealth() < target.getMaxHealth() && target.ticksExisted % 5 == 0){ }else if(target.getHealth() < target.getMaxHealth() && target.ticksExisted % 5 == 0){
@@ -39,8 +39,8 @@ public class EntityLightningSigil extends EntityScaledConstruct {
this.setDead(); this.setDead();
} }
List<EntityLivingBase> targets = EntityUtils.getLivingWithinCylinder(this.width/2, this.posX, this.posY, List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(width/2, this.posX, this.posY,
this.posZ, this.height, this.world); this.posZ, this.world);
for(EntityLivingBase target : targets){ for(EntityLivingBase target : targets){
@@ -365,7 +365,8 @@ public class EntityEvilWizard extends EntityMob implements ISpellCaster, IEntity
if(getElement() == null){ if(getElement() == null){
if(rand.nextBoolean()){ if(rand.nextBoolean()){
this.setElement(Element.values()[rand.nextInt(Element.values().length - 1) + 1]); Element[] elements = (Element[]) Arrays.stream(Element.values()).filter(Element::hasWizards).toArray();
this.setElement(elements[rand.nextInt(elements.length - 1) + 1]);
}else{ }else{
this.setElement(Element.MAGIC); this.setElement(Element.MAGIC);
} }
@@ -68,11 +68,11 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
protected Predicate<Entity> targetSelector; protected Predicate<Entity> targetSelector;
/** The wizard's trades. */ /** The wizard's trades. */
public MerchantRecipeList trades; private MerchantRecipeList trades;
/** The wizard's current customer. */ /** The wizard's current customer. */
@Nullable @Nullable
private EntityPlayer customer; private EntityPlayer customer;
private int timeUntilReset; private int timeUntilReset;
/** addDefaultEquipmentAndRecipies is called if this is true */ /** addDefaultEquipmentAndRecipies is called if this is true */
@@ -130,12 +130,8 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
if(entity != null && !entity.isInvisible() if(entity != null && !entity.isInvisible()
&& AllyDesignationSystem.isValidTarget(EntityWizard.this, entity)){ && AllyDesignationSystem.isValidTarget(EntityWizard.this, entity)){
// ... and is a non summoned creature mob ... // ... and is a mob, a summoned creature ...
if((entity instanceof IMob && !(entity instanceof ISummonedCreature) if((entity instanceof IMob || entity instanceof ISummonedCreature
// or is a summoned creature with a mob owner or an owner who has attacked the wizard ...
|| entity instanceof ISummonedCreature && (((ISummonedCreature)entity).getOwner() instanceof IMob || ((ISummonedCreature)entity).getOwner() == this.getRevengeTarget() || ((ISummonedCreature) entity).getOwner() == this.getAttackTarget())
// ... or in the whitelist ... // ... or in the whitelist ...
|| Arrays.asList(Wizardry.settings.summonedCreatureTargetsWhitelist) || Arrays.asList(Wizardry.settings.summonedCreatureTargetsWhitelist)
.contains(EntityList.getKey(entity.getClass()))) .contains(EntityList.getKey(entity.getClass())))
@@ -262,11 +258,11 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
@Override @Override
public ITextComponent getDisplayName(){ public ITextComponent getDisplayName(){
if(this.hasCustomName()){ if(this.hasCustomName()){
return super.getDisplayName(); return super.getDisplayName();
} }
return this.getElement().getWizardName(); return this.getElement().getWizardName();
} }
@@ -274,7 +270,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
protected boolean canDespawn(){ protected boolean canDespawn(){
return false; return false;
} }
@Override @Override
protected SoundEvent getAmbientSound(){ protected SoundEvent getAmbientSound(){
if(Wizardry.tisTheSeason) return WizardrySounds.ENTITY_WIZARD_HOHOHO; if(Wizardry.tisTheSeason) return WizardrySounds.ENTITY_WIZARD_HOHOHO;
@@ -677,7 +673,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
WizardryItems.getWand(tier, Element.values()[rand.nextInt(Element.values().length)])); WizardryItems.getWand(tier, Element.values()[rand.nextInt(Element.values().length)]));
} }
}else if(randomiser < 8){ }else if(randomiser < 8){
return new ItemStack(WizardryItems.arcane_tome, 1, 1); return new ItemStack(WizardryItems.arcane_tome_apprentice, 1);
}else if(randomiser < 10){ }else if(randomiser < 10){
EntityEquipmentSlot slot = InventoryUtils.ARMOUR_SLOTS[rand.nextInt(InventoryUtils.ARMOUR_SLOTS.length)]; EntityEquipmentSlot slot = InventoryUtils.ARMOUR_SLOTS[rand.nextInt(InventoryUtils.ARMOUR_SLOTS.length)];
if(this.getElement() != Element.MAGIC && rand.nextInt(4) > 0){ if(this.getElement() != Element.MAGIC && rand.nextInt(4) > 0){
@@ -713,7 +709,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
WizardryItems.getWand(tier, Element.values()[rand.nextInt(Element.values().length)])); WizardryItems.getWand(tier, Element.values()[rand.nextInt(Element.values().length)]));
} }
}else if(randomiser < 8){ }else if(randomiser < 8){
return new ItemStack(WizardryItems.arcane_tome, 1, 2); return new ItemStack(WizardryItems.arcane_tome_advanced, 1);
}else{ }else{
List<Item> upgrades = new ArrayList<Item>(WandHelper.getSpecialUpgrades()); List<Item> upgrades = new ArrayList<Item>(WandHelper.getSpecialUpgrades());
randomiser = rand.nextInt(upgrades.size()); randomiser = rand.nextInt(upgrades.size());
@@ -736,7 +732,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
return new ItemStack(WizardryItems.master_wand); return new ItemStack(WizardryItems.master_wand);
} }
}else{ }else{
return new ItemStack(WizardryItems.arcane_tome, 1, 3); return new ItemStack(WizardryItems.arcane_tome_master, 1);
} }
} }
@@ -751,7 +747,8 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
textureIndex = this.rand.nextInt(6); textureIndex = this.rand.nextInt(6);
if(rand.nextBoolean()){ if(rand.nextBoolean()){
this.setElement(Element.values()[rand.nextInt(Element.values().length - 1) + 1]); Element[] elements = (Element[]) Arrays.stream(Element.values()).filter(Element::hasWizards).toArray();
this.setElement(elements[rand.nextInt(elements.length - 1) + 1]);
}else{ }else{
this.setElement(Element.MAGIC); this.setElement(Element.MAGIC);
} }
@@ -888,7 +885,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
/** /**
* Sets the list of blocks that are part of this wizard's tower. If a player breaks any of these blocks, the wizard * Sets the list of blocks that are part of this wizard's tower. If a player breaks any of these blocks, the wizard
* will get angry and attack them. * will get angry and attack them.
* *
* @param blocks A Set of BlockPos objects representing the blocks in the tower. * @param blocks A Set of BlockPos objects representing the blocks in the tower.
*/ */
public void setTowerBlocks(Set<BlockPos> blocks){ public void setTowerBlocks(Set<BlockPos> blocks){
@@ -920,11 +917,11 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
} }
} }
} }
// Copied from their respective AI classes // Copied from their respective AI classes
public static class EntityAILookAtTradePlayer extends EntityAIWatchClosest { public static class EntityAILookAtTradePlayer extends EntityAIWatchClosest {
private final EntityWizard wizard; private final EntityWizard wizard;
public EntityAILookAtTradePlayer(EntityWizard wizard){ public EntityAILookAtTradePlayer(EntityWizard wizard){
@@ -942,9 +939,9 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
} }
} }
} }
public static class EntityAITradePlayer extends EntityAIBase { public static class EntityAITradePlayer extends EntityAIBase {
private final EntityWizard wizard; private final EntityWizard wizard;
public EntityAITradePlayer(EntityWizard wizard){ public EntityAITradePlayer(EntityWizard wizard){
@@ -954,7 +951,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
@Override @Override
public boolean shouldExecute(){ public boolean shouldExecute(){
if(!this.wizard.isEntityAlive()){ if(!this.wizard.isEntityAlive()){
return false; return false;
}else if(this.wizard.isInWater()){ }else if(this.wizard.isInWater()){
@@ -964,7 +961,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
}else if(this.wizard.velocityChanged){ }else if(this.wizard.velocityChanged){
return false; return false;
}else{ }else{
EntityPlayer entityplayer = this.wizard.getCustomer(); EntityPlayer entityplayer = this.wizard.getCustomer();
if(entityplayer == null){ if(entityplayer == null){
@@ -1,45 +0,0 @@
package electroblob.wizardry.event;
import electroblob.wizardry.item.ItemArtefact;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
/**
* ArtefactCheckEvent is fired when a check happens for an ItemArtefact using {@link electroblob.wizardry.item.ItemArtefact#isArtefactActive(net.minecraft.entity.player.EntityPlayer, net.minecraft.item.Item)}
* <i>Fired on both sides.</i><br>
* <br>
* This event is {@link Cancelable}. <br>
* <br>
* This event has a result. {@link HasResult}. Set the result to Result.ALLOW to consider an artefact "active"<br>
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
* @author WinDanesz
* @since Wizardry 4.3.10
*/
@Cancelable
@Event.HasResult
public class ArtefactCheckEvent extends PlayerEvent {
ItemArtefact artefact;
EntityPlayer player;
public ArtefactCheckEvent(EntityPlayer player, ItemArtefact artefact) {
super(player);
this.player = player;
this.artefact = artefact;
setResult(Result.DENY);
}
public ItemArtefact getArtefact() {
return artefact;
}
public EntityPlayer getPlayer() {
return player;
}
}
@@ -46,9 +46,6 @@ public final class WizardryBaublesIntegration {
ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.RING, BaubleType.RING); ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.RING, BaubleType.RING);
ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.AMULET, BaubleType.AMULET); ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.AMULET, BaubleType.AMULET);
ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.CHARM, BaubleType.CHARM); ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.CHARM, BaubleType.CHARM);
ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.BELT, BaubleType.BELT);
ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.BODY, BaubleType.BODY);
ARTEFACT_TYPE_MAP.put(ItemArtefact.Type.HEAD, BaubleType.HEAD);
} }
public static boolean enabled(){ public static boolean enabled(){
@@ -1,5 +1,6 @@
package electroblob.wizardry.integration.jei; package electroblob.wizardry.integration.jei;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.client.DrawingUtils; import electroblob.wizardry.client.DrawingUtils;
import electroblob.wizardry.constants.Constants; import electroblob.wizardry.constants.Constants;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
@@ -11,7 +12,9 @@ import mezz.jei.api.ingredients.VanillaTypes;
import mezz.jei.api.recipe.IRecipeWrapper; import mezz.jei.api.recipe.IRecipeWrapper;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@@ -95,8 +98,8 @@ public class ArcaneWorkbenchRecipe implements IRecipeWrapper {
// A stack of crystals will almost certainly be enough mana, but you never know! // A stack of crystals will almost certainly be enough mana, but you never know!
// Using ItemStack.EMPTY to avoid deprecated method; crystals' stack size is not stack-sensitive so it doesn't matter // Using ItemStack.EMPTY to avoid deprecated method; crystals' stack size is not stack-sensitive so it doesn't matter
if(count <= WizardryItems.magic_crystal.getItemStackLimit(ItemStack.EMPTY)){ if(count <= WizardryItems.magic_crystal.getItemStackLimit(ItemStack.EMPTY)){
for(int meta = 0; meta < Element.values().length; meta++){ for (Element element : Element.values()) {
crystalStacks.add(new ItemStack(WizardryItems.magic_crystal, count, meta)); crystalStacks.add(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, element.name().toLowerCase() + "_crystal")), count));
} }
} }
@@ -23,6 +23,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@@ -214,7 +215,9 @@ public class ArcaneWorkbenchRecipeCategory implements IRecipeCategory<ArcaneWork
List<ArcaneWorkbenchRecipe> recipes = new ArrayList<>(); List<ArcaneWorkbenchRecipe> recipes = new ArrayList<>();
List<ItemStack> crystals = new ArrayList<>(); List<ItemStack> crystals = new ArrayList<>();
for(int meta = 0; meta < Element.values().length; meta++) crystals.add(new ItemStack(WizardryItems.magic_crystal, 1, meta)); for (Element element : Element.values()) {
crystals.add(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "crystal_" + element.name().toLowerCase()))));
}
List<ItemStack> shard = Collections.singletonList(new ItemStack(WizardryItems.crystal_shard)); List<ItemStack> shard = Collections.singletonList(new ItemStack(WizardryItems.crystal_shard));
List<ItemStack> grandCrystal = Collections.singletonList(new ItemStack(WizardryItems.grand_crystal)); List<ItemStack> grandCrystal = Collections.singletonList(new ItemStack(WizardryItems.grand_crystal));
@@ -19,6 +19,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList; import java.util.ArrayList;
@@ -118,7 +119,13 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
List<ImbuementAltarRecipe> recipes = new ArrayList<>(); List<ImbuementAltarRecipe> recipes = new ArrayList<>();
NonNullList<ItemStack> variants = NonNullList.create(); NonNullList<ItemStack> variants = NonNullList.create();
WizardryItems.spectral_dust.getSubItems(WizardryItems.spectral_dust.getCreativeTab(), variants); variants.add(new ItemStack(WizardryItems.spectral_dust_earth));
variants.add(new ItemStack(WizardryItems.spectral_dust_fire));
variants.add(new ItemStack(WizardryItems.spectral_dust_healing));
variants.add(new ItemStack(WizardryItems.spectral_dust_ice));
variants.add(new ItemStack(WizardryItems.spectral_dust_lightning));
variants.add(new ItemStack(WizardryItems.spectral_dust_necromancy));
variants.add(new ItemStack(WizardryItems.spectral_dust_sorcery));
List<List<ItemStack>> dusts = new ArrayList<>(); List<List<ItemStack>> dusts = new ArrayList<>();
// Generate 4 separate lists, each in a different order to make it obvious they can be any element // Generate 4 separate lists, each in a different order to make it obvious they can be any element
@@ -139,9 +146,10 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
ItemStack input = new ItemStack(WizardryItems.magic_crystal); ItemStack input = new ItemStack(WizardryItems.magic_crystal);
for(int meta = 1; meta < Element.values().length; meta++){ for(Element element : Element.values()){
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(WizardryItems.spectral_dust, 1, meta))); List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID,
ItemStack output = new ItemStack(WizardryItems.magic_crystal, 1, meta); "spectral_dust_" + element.name().toLowerCase())))));
ItemStack output = new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, element.name().toLowerCase() + "_crystal")));
recipes.add(new ImbuementAltarRecipe(input, dusts, output)); recipes.add(new ImbuementAltarRecipe(input, dusts, output));
} }
@@ -153,11 +161,16 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
List<ImbuementAltarRecipe> recipes = new ArrayList<>(); List<ImbuementAltarRecipe> recipes = new ArrayList<>();
ItemStack input = new ItemStack(WizardryBlocks.crystal_block); ItemStack input = new ItemStack(WizardryBlocks.magic_crystal_block);
for(int meta = 1; meta < Element.values().length; meta++){ for (Element element : Element.values()) {
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(WizardryItems.spectral_dust, 1, meta))); if (element == Element.MAGIC) { continue; }
ItemStack output = new ItemStack(WizardryBlocks.crystal_block, 1, meta);
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(ForgeRegistries.ITEMS.getValue(
new ResourceLocation(Wizardry.MODID, "spectral_dust_" + element.name().toLowerCase())))));
ItemStack output = new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, element.getName().toLowerCase()
+ "_crystal_block")));
recipes.add(new ImbuementAltarRecipe(input, dusts, output)); recipes.add(new ImbuementAltarRecipe(input, dusts, output));
} }
@@ -179,7 +192,8 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
if(e == Element.MAGIC) continue; if(e == Element.MAGIC) continue;
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(WizardryItems.spectral_dust, 1, e.ordinal()))); List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(
ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "spectral_dust_" + e.name().toLowerCase())))));
ItemStack output = TileEntityImbuementAltar.getImbuementResult(input, new Element[]{e, e, e, e}, false, null, null); ItemStack output = TileEntityImbuementAltar.getImbuementResult(input, new Element[]{e, e, e, e}, false, null, null);
if(!output.isEmpty()) recipes.add(new ImbuementAltarRecipe(input, dusts, output)); if(!output.isEmpty()) recipes.add(new ImbuementAltarRecipe(input, dusts, output));
@@ -98,7 +98,9 @@ public class ContainerArcaneWorkbench extends Container implements ISpellSortabl
this.addSlotToContainer(new SlotWorkbenchItem(tileentity, CENTRE_SLOT, 80, 64, this)); this.addSlotToContainer(new SlotWorkbenchItem(tileentity, CENTRE_SLOT, 80, 64, this));
Set<Item> upgrades = new HashSet<>(WandHelper.getSpecialUpgrades()); // Can't be done statically. Set<Item> upgrades = new HashSet<>(WandHelper.getSpecialUpgrades()); // Can't be done statically.
upgrades.add(WizardryItems.arcane_tome); upgrades.add(WizardryItems.arcane_tome_apprentice);
upgrades.add(WizardryItems.arcane_tome_advanced);
upgrades.add(WizardryItems.arcane_tome_master);
upgrades.add(WizardryItems.resplendent_thread); upgrades.add(WizardryItems.resplendent_thread);
upgrades.add(WizardryItems.crystal_silver_plating); upgrades.add(WizardryItems.crystal_silver_plating);
upgrades.add(WizardryItems.ethereal_crystalweave); upgrades.add(WizardryItems.ethereal_crystalweave);
@@ -452,24 +454,6 @@ public class ContainerArcaneWorkbench extends Container implements ISpellSortabl
} }
} }
/**
* Called (via {@link electroblob.wizardry.packet.PacketControlInput PacketControlInput}) when the clear button in
* the arcane workbench GUI is pressed.
*/
// As of 2.1, for the sake of events and neatness of code, this was moved here from TileEntityArcaneWorkbench.
// As of 4.2, the spell binding/charging/upgrading code was delegated (via IWorkbenchItem) to the items themselves.
public void onClearButtonPressed(EntityPlayer player){
Slot centre = this.getSlot(CENTRE_SLOT);
if(centre.getStack().getItem() instanceof IWorkbenchItem){ // Should always be true, but no harm in checking.
Slot[] spellBooks = this.inventorySlots.subList(0, 8).toArray(new Slot[8]);
((IWorkbenchItem) centre.getStack().getItem()).onClearButtonPressed(player, centre, this.getSlot(CRYSTAL_SLOT), this.getSlot(UPGRADE_SLOT), spellBooks);
}
}
/** Scrolls to the given row number. */ /** Scrolls to the given row number. */
public void scrollTo(int row){ public void scrollTo(int row){
this.scroll = row; this.scroll = row;
@@ -127,7 +127,9 @@ public class ContainerBookshelf extends Container {
registerBookItem(Items.WRITABLE_BOOK); registerBookItem(Items.WRITABLE_BOOK);
registerBookItem(Items.ENCHANTED_BOOK); registerBookItem(Items.ENCHANTED_BOOK);
registerBookItem(WizardryItems.spell_book); registerBookItem(WizardryItems.spell_book);
registerBookItem(WizardryItems.arcane_tome); registerBookItem(WizardryItems.arcane_tome_apprentice);
registerBookItem(WizardryItems.arcane_tome_advanced);
registerBookItem(WizardryItems.arcane_tome_master);
registerBookItem(WizardryItems.wizard_handbook); registerBookItem(WizardryItems.wizard_handbook);
registerBookItem(WizardryItems.ruined_spell_book); registerBookItem(WizardryItems.ruined_spell_book);
registerBookItem(WizardryItems.scroll); registerBookItem(WizardryItems.scroll);
@@ -55,26 +55,6 @@ public interface IWorkbenchItem {
*/ */
boolean onApplyButtonPressed(EntityPlayer player, Slot centre, Slot crystals, Slot upgrade, Slot[] spellBooks); boolean onApplyButtonPressed(EntityPlayer player, Slot centre, Slot crystals, Slot upgrade, Slot[] spellBooks);
/**
* Called when this item is in the central slot of an arcane workbench and the apply clear is pressed. Items must
* implement this method to define what happens when the apply button is pressed.
* @param player The player that pressed the apply button.
* @param centre The central slot in the arcane workbench. This slot will always contain a stack of the implementing
* item, or in other words, <i>it is guaranteed that</i> {@code this == centre.getStack().getItem()}.
* @param crystals The magic crystal slot of the arcane workbench.
* @param upgrade The upgrade slot of the arcane workbench.
* @param spellBooks An array of the <i>active</i> (visible) spell book slots in the arcane workbench. The length of
* the array will be equal to the value returned by {@link IWorkbenchItem#getSpellSlotCount(ItemStack)}.
* */
default void onClearButtonPressed(EntityPlayer player, Slot centre, Slot crystals, Slot upgrade, Slot[] spellBooks){};
/**
* Must be overridden in the item class to make the clear button in the Arcane Workbench clickable.
* */
default boolean isClearable() {
return false;
}
/** /**
* Returns whether the tooltip (dark grey box) should be drawn when this item is in an arcane workbench. Only * Returns whether the tooltip (dark grey box) should be drawn when this item is in an arcane workbench. Only
* called client-side. * called client-side.
@@ -3,11 +3,9 @@ package electroblob.wizardry.item;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.constants.Tier; import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.registry.WizardryTabs; import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@@ -16,54 +14,33 @@ import java.util.List;
public class ItemArcaneTome extends Item { public class ItemArcaneTome extends Item {
public ItemArcaneTome(){ private final EnumRarity rarity;
private final Tier tier;
public ItemArcaneTome(EnumRarity rarity, Tier tier){
super(); super();
setHasSubtypes(true);
setMaxStackSize(1); setMaxStackSize(1);
setCreativeTab(WizardryTabs.WIZARDRY); setCreativeTab(WizardryTabs.WIZARDRY);
this.rarity = rarity;
this.tier = tier;
} }
@Override public Tier getTier() { return tier; }
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list){
if(tab == WizardryTabs.WIZARDRY){ // Don't use isInCreativeTab here.
for(int i = 1; i < Tier.values().length; i++){
list.add(new ItemStack(this, 1, i));
}
}
}
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack stack){ public boolean hasEffect(ItemStack stack){ return true; }
return true;
}
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){ return rarity; }
switch(this.getDamage(stack)){
case 1:
return EnumRarity.UNCOMMON;
case 2:
return EnumRarity.RARE;
case 3:
return EnumRarity.EPIC;
}
return EnumRarity.COMMON;
}
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public void addInformation(ItemStack stack, World world, List<String> tooltip, net.minecraft.client.util.ITooltipFlag showAdvanced){ public void addInformation(ItemStack stack, World world, List<String> tooltip, net.minecraft.client.util.ITooltipFlag showAdvanced){
if(stack.getItemDamage() < 1){
return; // If something's up with the metadata it will display a 'generic' tome of arcana with no info
}
Tier tier = Tier.values()[stack.getItemDamage()];
Tier tier2 = Tier.values()[stack.getItemDamage() - 1];
tooltip.add(tier.getDisplayNameWithFormatting()); tooltip.add(tier.getDisplayNameWithFormatting());
Wizardry.proxy.addMultiLineDescription(tooltip, "item." + this.getRegistryName() + ".desc", Tier tier2 = Tier.values()[tier.ordinal() - 1];
Wizardry.proxy.addMultiLineDescription(tooltip, "item." + Wizardry.MODID + ":arcane_tome.desc",
tier2.getDisplayNameWithFormatting() + "\u00A77", tier.getDisplayNameWithFormatting() + "\u00A77"); tier2.getDisplayNameWithFormatting() + "\u00A77", tier.getDisplayNameWithFormatting() + "\u00A77");
} }
@@ -10,7 +10,6 @@ import electroblob.wizardry.entity.living.ISummonedCreature;
import electroblob.wizardry.entity.projectile.EntityDart; import electroblob.wizardry.entity.projectile.EntityDart;
import electroblob.wizardry.entity.projectile.EntityForceOrb; import electroblob.wizardry.entity.projectile.EntityForceOrb;
import electroblob.wizardry.entity.projectile.EntityIceShard; import electroblob.wizardry.entity.projectile.EntityIceShard;
import electroblob.wizardry.event.ArtefactCheckEvent;
import electroblob.wizardry.event.SpellCastEvent; import electroblob.wizardry.event.SpellCastEvent;
import electroblob.wizardry.event.SpellCastEvent.Source; import electroblob.wizardry.event.SpellCastEvent.Source;
import electroblob.wizardry.integration.DamageSafetyChecker; import electroblob.wizardry.integration.DamageSafetyChecker;
@@ -38,7 +37,6 @@ import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.living.LivingEvent;
@@ -90,10 +88,7 @@ public class ItemArtefact extends Item {
/** An artefact that improves attacking spells. Two of these can be active at any one time. */ RING(2), /** An artefact that improves attacking spells. Two of these can be active at any one time. */ RING(2),
/** An artefact that improves defensive spells. One of these can be active at any one time. */ AMULET(1), /** An artefact that improves defensive spells. One of these can be active at any one time. */ AMULET(1),
/** An artefact that improves utility spells. One of these can be active at any one time. */ CHARM(1), /** An artefact that improves utility spells. One of these can be active at any one time. */ CHARM(1);
/** Added for add-on artefacts. */ BELT(1),
/** Added for add-on artefacts. */ BODY(1),
/** Added for add-on artefacts. */ HEAD(1);
public final int maxAtOnce; public final int maxAtOnce;
@@ -183,13 +178,6 @@ public class ItemArtefact extends Item {
if(!((ItemArtefact)artefact).enabled) return false; // Disabled in the config if(!((ItemArtefact)artefact).enabled) return false; // Disabled in the config
ArtefactCheckEvent event = new ArtefactCheckEvent(player, (ItemArtefact) artefact);
if(MinecraftForge.EVENT_BUS.post(event)) return false;
if (event.getResult() == Event.Result.ALLOW) {
return true;
}
if(WizardryBaublesIntegration.enabled()){ if(WizardryBaublesIntegration.enabled()){
return WizardryBaublesIntegration.isBaubleEquipped(player, artefact); return WizardryBaublesIntegration.isBaubleEquipped(player, artefact);
}else{ }else{
@@ -1,44 +1,21 @@
package electroblob.wizardry.item; package electroblob.wizardry.item;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.api.IElemental;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
import electroblob.wizardry.registry.WizardryTabs; import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
/** Note that in 1.13, <i>the flattening</i> will make this class redundant, much like ItemCoal, which is probably its public class ItemCrystal extends Item implements IElemental {
* closest analog in vanilla. */
public class ItemCrystal extends Item implements IMultiTexturedItem {
public ItemCrystal(){ private final Element element;
public ItemCrystal(Element element) {
super(); super();
this.setHasSubtypes(true); this.setMaxDamage(0);
this.setMaxDamage(0); this.setCreativeTab(WizardryTabs.WIZARDRY);
this.setCreativeTab(WizardryTabs.WIZARDRY); this.element = element;
}
@Override
public ResourceLocation getModelName(ItemStack stack){
int metadata = stack.getMetadata();
if(metadata >= Element.values().length) metadata = 0;
return new ResourceLocation(Wizardry.MODID, "crystal_" + Element.values()[metadata].getName());
} }
@Override @Override
public String getTranslationKey(ItemStack stack){ public Element getElement() { return element; }
return "item." + this.getModelName(stack).toString();
}
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items){
if(tab == WizardryTabs.WIZARDRY){
for(Element element : Element.values()){
items.add(new ItemStack(this, 1, element.ordinal()));
}
}
}
} }
@@ -193,6 +193,14 @@ public class ItemFlamecatcher extends ItemBow implements IConjuredItem {
charge = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(stack, world, (EntityPlayer)entity, charge, true); charge = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(stack, world, (EntityPlayer)entity, charge, true);
if(charge < 0) return; if(charge < 0) return;
if(stack.getTagCompound() != null){
int shotsLeft = stack.getTagCompound().getInteger(Flamecatcher.SHOTS_REMAINING_NBT_KEY) - 1;
stack.getTagCompound().setInteger(Flamecatcher.SHOTS_REMAINING_NBT_KEY, shotsLeft);
if(shotsLeft == 0 && !world.isRemote){
stack.setItemDamage(getMaxDamage(stack) - getAnimationFrames());
}
}
float velocity = (float)charge / DRAW_TIME; float velocity = (float)charge / DRAW_TIME;
velocity = (velocity * velocity + velocity * 2) / 3; velocity = (velocity * velocity + velocity * 2) / 3;
@@ -200,14 +208,6 @@ public class ItemFlamecatcher extends ItemBow implements IConjuredItem {
if((double)velocity >= 0.1D){ if((double)velocity >= 0.1D){
if(stack.getTagCompound() != null){
int shotsLeft = stack.getTagCompound().getInteger(Flamecatcher.SHOTS_REMAINING_NBT_KEY) - 1;
stack.getTagCompound().setInteger(Flamecatcher.SHOTS_REMAINING_NBT_KEY, shotsLeft);
if(shotsLeft == 0 && !world.isRemote){
stack.setItemDamage(getMaxDamage(stack) - getAnimationFrames());
}
}
if(!world.isRemote){ if(!world.isRemote){
EntityFlamecatcherArrow arrow = new EntityFlamecatcherArrow(world); EntityFlamecatcherArrow arrow = new EntityFlamecatcherArrow(world);
arrow.aim(player, EntityFlamecatcherArrow.SPEED * velocity); arrow.aim(player, EntityFlamecatcherArrow.SPEED * velocity);
@@ -1,7 +1,6 @@
package electroblob.wizardry.item; package electroblob.wizardry.item;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.entity.projectile.EntityConjuredArrow;
import electroblob.wizardry.registry.Spells; import electroblob.wizardry.registry.Spells;
import electroblob.wizardry.util.InventoryUtils; import electroblob.wizardry.util.InventoryUtils;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
@@ -15,7 +14,6 @@ import net.minecraft.init.SoundEvents;
import net.minecraft.item.IItemPropertyGetter; import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.ItemArrow; import net.minecraft.item.ItemArrow;
import net.minecraft.item.ItemBow; import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemSpectralArrow;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList; import net.minecraft.stats.StatList;
import net.minecraft.util.*; import net.minecraft.util.*;
@@ -199,7 +197,8 @@ public class ItemSpectralBow extends ItemBow implements IConjuredItem {
if(!world.isRemote){ if(!world.isRemote){
EntityConjuredArrow entityarrow = new EntityConjuredArrow(world, entityplayer); ItemArrow itemarrow = (ItemArrow)Items.ARROW;
EntityArrow entityarrow = itemarrow.createArrow(world, new ItemStack(itemarrow), entityplayer);
entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F,
f * 3.0F, 1.0F); f * 3.0F, 1.0F);
@@ -1,39 +1,13 @@
package electroblob.wizardry.item; package electroblob.wizardry.item;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.registry.WizardryTabs; import electroblob.wizardry.registry.WizardryTabs;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import java.util.Arrays; public class ItemSpectralDust extends Item {
public class ItemSpectralDust extends Item implements IMultiTexturedItem {
public ItemSpectralDust(){ public ItemSpectralDust(){
super(); super();
this.setHasSubtypes(true);
this.setMaxDamage(0); this.setMaxDamage(0);
this.setCreativeTab(WizardryTabs.WIZARDRY); this.setCreativeTab(WizardryTabs.WIZARDRY);
} }
@Override
public ResourceLocation getModelName(ItemStack stack){
int metadata = stack.getMetadata();
if(metadata >= Element.values().length) metadata = 0;
return new ResourceLocation(Wizardry.MODID, "spectral_dust_" + Element.values()[metadata].getName());
}
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items){
if(tab == WizardryTabs.WIZARDRY){
for(Element element : Arrays.copyOfRange(Element.values(), 1, Element.values().length)){
items.add(new ItemStack(this, 1, element.ordinal()));
}
}
}
} }
@@ -28,7 +28,6 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.EnumAction; import net.minecraft.item.EnumAction;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.*; import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
@@ -46,7 +45,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@@ -228,15 +226,9 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
} }
@Override @Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeldInMainhand){ public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeld){
boolean isHeld = isHeldInMainhand || entity instanceof EntityLivingBase && ItemStack.areItemStacksEqual(stack, ((EntityLivingBase) entity).getHeldItemOffhand());
if(isHeld) WandHelper.decrementCooldowns(stack);
// If Wizardry.settings.wandsMustBeHeldToDecrementCooldown is false, the cooldowns will be decremented.
// If Wizardry.settings.wandsMustBeHeldToDecrementCooldown is true and isHeld is true, the cooldowns will also be decremented.
// If Wizardry.settings.wandsMustBeHeldToDecrementCooldown is true and isHeld is false, the cooldowns will not be decremented.
if (!Wizardry.settings.wandsMustBeHeldToDecrementCooldown || isHeld) {
WandHelper.decrementCooldowns(stack);
}
// Decrements wand damage (increases mana) every 1.5 seconds if it has a condenser upgrade // Decrements wand damage (increases mana) every 1.5 seconds if it has a condenser upgrade
if(!world.isRemote && !this.isManaFull(stack) && world.getTotalWorldTime() % Constants.CONDENSER_TICK_INTERVAL == 0){ if(!world.isRemote && !this.isManaFull(stack) && world.getTotalWorldTime() % Constants.CONDENSER_TICK_INTERVAL == 0){
@@ -695,9 +687,9 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
// Upgrades wand if necessary. Damage is copied, preserving remaining durability, // Upgrades wand if necessary. Damage is copied, preserving remaining durability,
// and also the entire NBT tag compound. // and also the entire NBT tag compound.
if(upgrade.getItem() == WizardryItems.arcane_tome){ if(upgrade.getItem() instanceof ItemArcaneTome){
Tier tier = Tier.values()[upgrade.getItemDamage()]; Tier tier = ((ItemArcaneTome) upgrade.getItem()).getTier();
// Checks the wand upgrade is for the tier above the wand's tier, and that either the wand has enough // Checks the wand upgrade is for the tier above the wand's tier, and that either the wand has enough
// progression or the player is in creative mode. // progression or the player is in creative mode.
@@ -844,19 +836,8 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
Spell spell = Spell.byMetadata(spellBooks[i].getStack().getItemDamage()); Spell spell = Spell.byMetadata(spellBooks[i].getStack().getItemDamage());
// If the wand is powerful enough for the spell, it's not already bound to that slot and it's enabled for wands // If the wand is powerful enough for the spell, it's not already bound to that slot and it's enabled for wands
if(!(spell.getTier().level > this.tier.level) && spells[i] != spell && spell.isEnabled(SpellProperties.Context.WANDS)){ if(!(spell.getTier().level > this.tier.level) && spells[i] != spell && spell.isEnabled(SpellProperties.Context.WANDS)){
// Decide if we can bind this multiple times
if (Wizardry.settings.preventBindingSameSpellTwiceToWands && Arrays.stream(spells).anyMatch(s -> s == spell)) {
continue;
}
spells[i] = spell; spells[i] = spell;
changed = true; changed = true;
// setting to consume books upon use
if (Wizardry.settings.singleUseSpellBooks) {
spellBooks[i].getStack().shrink(1);
}
} }
} }
} }
@@ -864,35 +845,36 @@ public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem,
WandHelper.setSpells(centre.getStack(), spells); WandHelper.setSpells(centre.getStack(), spells);
// Charges wand by appropriate amount // Charges wand by appropriate amount
if (WandHelper.rechargeManaOnApplyButtonPressed(centre, crystals)) { if(crystals.getStack() != ItemStack.EMPTY && !this.isManaFull(centre.getStack())){
int chargeDepleted = this.getManaCapacity(centre.getStack()) - this.getMana(centre.getStack());
// Not too pretty but allows addons implementing the IManaStoringItem interface to provide their mana amount for custom crystals,
// previously this was defaulted to the regular crystal's amount, allowing players to exploit it if a crystal was worth less mana than that.
int manaPerItem = crystals.getStack().getItem() instanceof IManaStoringItem ?
((IManaStoringItem) crystals.getStack().getItem()).getMana(crystals.getStack()) :
crystals.getStack().getItem() instanceof ItemCrystal ? Constants.MANA_PER_CRYSTAL : Constants.MANA_PER_SHARD;
if(crystals.getStack().getItem() == WizardryItems.crystal_shard) manaPerItem = Constants.MANA_PER_SHARD;
if(crystals.getStack().getItem() == WizardryItems.grand_crystal) manaPerItem = Constants.GRAND_CRYSTAL_MANA;
if(crystals.getStack().getCount() * manaPerItem < chargeDepleted){
// If there aren't enough crystals to fully charge the wand
this.rechargeMana(centre.getStack(), crystals.getStack().getCount() * manaPerItem);
crystals.decrStackSize(crystals.getStack().getCount());
}else{
// If there are excess crystals (or just enough)
this.setMana(centre.getStack(), this.getManaCapacity(centre.getStack()));
crystals.decrStackSize((int)Math.ceil(((double)chargeDepleted) / manaPerItem));
}
changed = true; changed = true;
} }
return changed; return changed;
} }
@Override
public void onClearButtonPressed(EntityPlayer player, Slot centre, Slot crystals, Slot upgrade, Slot[] spellBooks){
ItemStack stack = centre.getStack();
if (stack.hasTagCompound() && stack.getTagCompound().hasKey(WandHelper.SPELL_ARRAY_KEY)) {
NBTTagCompound nbt = stack.getTagCompound();
int[] spells = nbt.getIntArray(WandHelper.SPELL_ARRAY_KEY);
int expectedSlotCount = BASE_SPELL_SLOTS + WandHelper.getUpgradeLevel(stack,
WizardryItems.attunement_upgrade);
// unbrick broken wands
if (spells.length < expectedSlotCount) {
spells = new int[expectedSlotCount];
}
Arrays.fill(spells, 0);
nbt.setIntArray(WandHelper.SPELL_ARRAY_KEY, spells);
stack.setTagCompound(nbt);
}
}
@Override
public boolean isClearable() { return true; }
// hitEntity is only called server-side, so we'll have to use events // hitEntity is only called server-side, so we'll have to use events
@SubscribeEvent @SubscribeEvent
public static void onAttackEntityEvent(AttackEntityEvent event){ public static void onAttackEntityEvent(AttackEntityEvent event){
@@ -486,8 +486,6 @@ public abstract class Forfeit {
} }
})); }));
add(Tier.MASTER, Element.SORCERY, create("teleport_self_large_distance", (w, p) -> ((Banish)Spells.banish).teleport(p, w, 8 + w.rand.nextDouble() * 700)));
add(Tier.NOVICE, Element.HEALING, create("damage_self", (w, p) -> p.attackEntityFrom(DamageSource.MAGIC, 4))); add(Tier.NOVICE, Element.HEALING, create("damage_self", (w, p) -> p.attackEntityFrom(DamageSource.MAGIC, 4)));
add(Tier.NOVICE, Element.HEALING, create("spill_armour", (w, p) -> { add(Tier.NOVICE, Element.HEALING, create("spill_armour", (w, p) -> {
@@ -51,17 +51,6 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
break; break;
case CLEAR_BUTTON:
if(!(player.openContainer instanceof ContainerArcaneWorkbench)){
Wizardry.logger.warn("Received a PacketControlInput, but the player that sent it was not " +
"currently using an arcane workbench. This should not happen!");
}else{
((ContainerArcaneWorkbench)player.openContainer).onClearButtonPressed(player);
}
break;
case NEXT_SPELL_KEY: case NEXT_SPELL_KEY:
if(wand.getItem() instanceof ISpellCastingItem){ if(wand.getItem() instanceof ISpellCastingItem){
@@ -144,7 +133,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
} }
public enum ControlType { public enum ControlType {
APPLY_BUTTON, NEXT_SPELL_KEY, PREVIOUS_SPELL_KEY, RESURRECT_BUTTON, CANCEL_RESURRECT, POSSESSION_PROJECTILE, CLEAR_BUTTON APPLY_BUTTON, NEXT_SPELL_KEY, PREVIOUS_SPELL_KEY, RESURRECT_BUTTON, CANCEL_RESURRECT, POSSESSION_PROJECTILE
} }
public static class Message implements IMessage { public static class Message implements IMessage {
@@ -10,11 +10,7 @@ import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import java.util.HashMap; import java.util.*;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
/** /**
* <b>[Server -> Client]</b> This packet is sent to synchronise any fields that need synchronising in * <b>[Server -> Client]</b> This packet is sent to synchronise any fields that need synchronising in
@@ -58,8 +54,9 @@ public class PacketPlayerSync implements IMessageHandler<Message, IMessage> {
this.seed = buf.readLong(); this.seed = buf.readLong();
this.selectedMinionID = buf.readInt(); this.selectedMinionID = buf.readInt();
this.spellData = new HashMap<>(); this.spellData = new HashMap<>();
WizardData.getSyncedVariablesOrderedByKey().forEach(v -> spellData.put(v, v.read(buf))); WizardData.getSyncedVariables().forEach(v -> spellData.put(v, v.read(buf)));
// Have to send empty tags to guarantee correct ByteBuf size/order, but no point keeping the resulting nulls // Have to send empty tags to guarantee correct ByteBuf size/order, but no point keeping the resulting nulls
spellData.values().removeIf(Objects::isNull); spellData.values().removeIf(Objects::isNull);
@@ -76,7 +73,7 @@ public class PacketPlayerSync implements IMessageHandler<Message, IMessage> {
buf.writeLong(seed); buf.writeLong(seed);
buf.writeInt(selectedMinionID); buf.writeInt(selectedMinionID);
WizardData.getSyncedVariablesOrderedByKey().forEach(v -> v.write(buf, spellData.get(v))); WizardData.getSyncedVariables().forEach(v -> v.write(buf, spellData.get(v)));
if(this.spellsDiscovered == null) return; if(this.spellsDiscovered == null) return;
for(Spell spell : this.spellsDiscovered){ for(Spell spell : this.spellsDiscovered){
@@ -1,7 +1,6 @@
package electroblob.wizardry.potion; package electroblob.wizardry.potion;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.item.ItemWizardArmour;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -46,12 +45,8 @@ public class CurseUndeath extends Curse {
} else { } else {
itemstack.setItemDamage(itemstack.getItemDamage() + entitylivingbase.world.rand.nextInt(2)); itemstack.setItemDamage(itemstack.getItemDamage() + entitylivingbase.world.rand.nextInt(2));
if (itemstack.getItemDamage() >= itemstack.getMaxDamage()) { if (itemstack.getItemDamage() >= itemstack.getMaxDamage()) {
if (itemstack.getItem() instanceof ItemWizardArmour) { entitylivingbase.renderBrokenItemStack(itemstack);
entitylivingbase.setFire(8); entitylivingbase.setItemStackToSlot(EntityEquipmentSlot.HEAD, ItemStack.EMPTY);
} else {
entitylivingbase.renderBrokenItemStack(itemstack);
entitylivingbase.setItemStackToSlot(EntityEquipmentSlot.HEAD, ItemStack.EMPTY);
}
} }
} }
} }
@@ -2,6 +2,7 @@ package electroblob.wizardry.registry;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.block.*; import electroblob.wizardry.block.*;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.tileentity.*; import electroblob.wizardry.tileentity.*;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@@ -43,7 +44,15 @@ public final class WizardryBlocks {
public static final Block crystal_ore = placeholder(); public static final Block crystal_ore = placeholder();
public static final Block crystal_flower = placeholder(); public static final Block crystal_flower = placeholder();
public static final Block transportation_stone = placeholder(); public static final Block transportation_stone = placeholder();
public static final Block crystal_block = placeholder();
public static final Block magic_crystal_block = placeholder();
public static final Block fire_crystal_block = placeholder();
public static final Block ice_crystal_block = placeholder();
public static final Block lightning_crystal_block = placeholder();
public static final Block necromancy_crystal_block = placeholder();
public static final Block earth_crystal_block = placeholder();
public static final Block sorcery_crystal_block = placeholder();
public static final Block healing_crystal_block = placeholder();
public static final Block petrified_stone = placeholder(); public static final Block petrified_stone = placeholder();
public static final Block ice_statue = placeholder(); public static final Block ice_statue = placeholder();
@@ -59,9 +68,28 @@ public final class WizardryBlocks {
public static final Block permafrost = placeholder(); public static final Block permafrost = placeholder();
public static final Block runestone = placeholder(); public static final Block runestone = placeholder();
public static final Block runestone_pedestal = placeholder(); public static final Block fire_runestone = placeholder();
public static final Block ice_runestone = placeholder();
public static final Block lightning_runestone = placeholder();
public static final Block necromancy_runestone = placeholder();
public static final Block earth_runestone = placeholder();
public static final Block sorcery_runestone = placeholder();
public static final Block healing_runestone = placeholder();
public static final Block gilded_wood = placeholder(); public static final Block fire_runestone_pedestal = placeholder();
public static final Block ice_runestone_pedestal = placeholder();
public static final Block lightning_runestone_pedestal = placeholder();
public static final Block necromancy_runestone_pedestal = placeholder();
public static final Block earth_runestone_pedestal = placeholder();
public static final Block healing_runestone_pedestal = placeholder();
public static final Block sorcery_runestone_pedestal = placeholder();
public static final Block acacia_gilded_wood = placeholder();
public static final Block birch_gilded_wood = placeholder();
public static final Block dark_oak_gilded_wood = placeholder();
public static final Block jungle_gilded_wood = placeholder();
public static final Block oak_gilded_wood = placeholder();
public static final Block spruce_gilded_wood = placeholder();
public static final Block oak_bookshelf = placeholder(); public static final Block oak_bookshelf = placeholder();
public static final Block spruce_bookshelf = placeholder(); public static final Block spruce_bookshelf = placeholder();
@@ -108,7 +136,15 @@ public final class WizardryBlocks {
registerBlock(registry, "crystal_ore", new BlockCrystalOre(Material.ROCK).setHardness(3.0F).setCreativeTab(WizardryTabs.WIZARDRY)); registerBlock(registry, "crystal_ore", new BlockCrystalOre(Material.ROCK).setHardness(3.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "crystal_flower", new BlockCrystalFlower(Material.PLANTS).setHardness(0.0F).setCreativeTab(WizardryTabs.WIZARDRY)); registerBlock(registry, "crystal_flower", new BlockCrystalFlower(Material.PLANTS).setHardness(0.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "transportation_stone", new BlockTransportationStone(Material.ROCK).setHardness(0.3F).setLightLevel(0.5f).setLightOpacity(0).setCreativeTab(WizardryTabs.WIZARDRY)); registerBlock(registry, "transportation_stone", new BlockTransportationStone(Material.ROCK).setHardness(0.3F).setLightLevel(0.5f).setLightOpacity(0).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "crystal_block", new BlockCrystal(Material.IRON).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "magic_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "fire_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "ice_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "lightning_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "necromancy_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "earth_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "sorcery_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "healing_crystal_block", new BlockCrystal(Element.MAGIC).setHardness(5.0F).setResistance(10.0F).setCreativeTab(WizardryTabs.WIZARDRY));
registerBlock(registry, "petrified_stone", new BlockStatue(Material.ROCK).setHardness(1.5F).setResistance(10.0F)); registerBlock(registry, "petrified_stone", new BlockStatue(Material.ROCK).setHardness(1.5F).setResistance(10.0F));
registerBlock(registry, "ice_statue", new BlockStatue(Material.ICE).setHardness(0.5F).setLightOpacity(3)); registerBlock(registry, "ice_statue", new BlockStatue(Material.ICE).setHardness(0.5F).setLightOpacity(3));
@@ -123,10 +159,28 @@ public final class WizardryBlocks {
registerBlock(registry, "crystal_flower_pot", new BlockCrystalFlowerPot()); registerBlock(registry, "crystal_flower_pot", new BlockCrystalFlowerPot());
registerBlock(registry, "permafrost", new BlockPermafrost()); registerBlock(registry, "permafrost", new BlockPermafrost());
registerBlock(registry, "runestone", new BlockRunestone(Material.ROCK)); registerBlock(registry, "fire_runestone", new BlockRunestone(Material.ROCK, Element.FIRE));
registerBlock(registry, "runestone_pedestal", new BlockPedestal(Material.ROCK)); registerBlock(registry, "ice_runestone", new BlockRunestone(Material.ROCK, Element.ICE));
registerBlock(registry, "lightning_runestone", new BlockRunestone(Material.ROCK, Element.LIGHTNING));
registerBlock(registry, "necromancy_runestone", new BlockRunestone(Material.ROCK, Element.NECROMANCY));
registerBlock(registry, "earth_runestone", new BlockRunestone(Material.ROCK, Element.EARTH));
registerBlock(registry, "sorcery_runestone", new BlockRunestone(Material.ROCK, Element.SORCERY));
registerBlock(registry, "healing_runestone", new BlockRunestone(Material.ROCK, Element.HEALING));
registerBlock(registry, "gilded_wood", new BlockGildedWood()); registerBlock(registry, "fire_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.FIRE));
registerBlock(registry, "ice_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.ICE));
registerBlock(registry, "lightning_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.LIGHTNING));
registerBlock(registry, "necromancy_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.NECROMANCY));
registerBlock(registry, "earth_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.EARTH));
registerBlock(registry, "healing_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.HEALING));
registerBlock(registry, "sorcery_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.SORCERY));
registerBlock(registry, "acacia_gilded_wood", new BlockGildedWood());
registerBlock(registry, "birch_gilded_wood", new BlockGildedWood());
registerBlock(registry, "dark_oak_gilded_wood", new BlockGildedWood());
registerBlock(registry, "jungle_gilded_wood", new BlockGildedWood());
registerBlock(registry, "oak_gilded_wood", new BlockGildedWood());
registerBlock(registry, "spruce_gilded_wood", new BlockGildedWood());
registerBlock(registry, "oak_bookshelf", new BlockBookshelf()); registerBlock(registry, "oak_bookshelf", new BlockBookshelf());
registerBlock(registry, "spruce_bookshelf", new BlockBookshelf()); registerBlock(registry, "spruce_bookshelf", new BlockBookshelf());
@@ -26,11 +26,13 @@ import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.BannerPattern; import net.minecraft.tileentity.BannerPattern;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistry;
@@ -79,12 +81,21 @@ public final class WizardryItems {
// which means you lose the individual fields... // which means you lose the individual fields...
public static final Item magic_crystal = placeholder(); public static final Item magic_crystal = placeholder();
public static final Item earth_crystal = placeholder();
public static final Item fire_crystal = placeholder();
public static final Item healing_crystal = placeholder();
public static final Item ice_crystal = placeholder();
public static final Item lightning_crystal = placeholder();
public static final Item necromancy_crystal = placeholder();
public static final Item sorcery_crystal = placeholder();
public static final Item grand_crystal = placeholder(); public static final Item grand_crystal = placeholder();
public static final Item crystal_shard = placeholder(); public static final Item crystal_shard = placeholder();
public static final Item wizard_handbook = placeholder(); public static final Item wizard_handbook = placeholder();
public static final Item arcane_tome = placeholder(); public static final Item arcane_tome_apprentice = placeholder();
public static final Item arcane_tome_advanced = placeholder();
public static final Item arcane_tome_master = placeholder();
public static final Item spell_book = placeholder(); public static final Item spell_book = placeholder();
public static final Item scroll = placeholder(); public static final Item scroll = placeholder();
public static final Item ruined_spell_book = placeholder(); public static final Item ruined_spell_book = placeholder();
@@ -162,7 +173,13 @@ public final class WizardryItems {
public static final Item smoke_bomb = placeholder(); public static final Item smoke_bomb = placeholder();
public static final Item spark_bomb = placeholder(); public static final Item spark_bomb = placeholder();
public static final Item spectral_dust = placeholder(); public static final Item spectral_dust_earth = placeholder();
public static final Item spectral_dust_fire = placeholder();
public static final Item spectral_dust_healing = placeholder();
public static final Item spectral_dust_ice = placeholder();
public static final Item spectral_dust_lightning = placeholder();
public static final Item spectral_dust_necromancy = placeholder();
public static final Item spectral_dust_sorcery = placeholder();
public static final Item wizard_hat = placeholder(); public static final Item wizard_hat = placeholder();
public static final Item wizard_robe = placeholder(); public static final Item wizard_robe = placeholder();
@@ -543,10 +560,37 @@ public final class WizardryItems {
String[] elements = Arrays.stream(Element.values()).map(Element::getName).toArray(String[]::new); String[] elements = Arrays.stream(Element.values()).map(Element::getName).toArray(String[]::new);
String[] woodTypes = Arrays.stream(BlockPlanks.EnumType.values()).map(BlockPlanks.EnumType::getName).toArray(String[]::new); String[] woodTypes = Arrays.stream(BlockPlanks.EnumType.values()).map(BlockPlanks.EnumType::getName).toArray(String[]::new);
registerMultiTexturedItemBlock(registry, WizardryBlocks.crystal_block, true, elements); registerItemBlock(registry, WizardryBlocks.magic_crystal_block);
registerMultiTexturedItemBlock(registry, WizardryBlocks.runestone, false, elements); registerItemBlock(registry, WizardryBlocks.fire_crystal_block);
registerMultiTexturedItemBlock(registry, WizardryBlocks.runestone_pedestal, false, elements); registerItemBlock(registry, WizardryBlocks.ice_crystal_block);
registerMultiTexturedItemBlock(registry, WizardryBlocks.gilded_wood, true, woodTypes); registerItemBlock(registry, WizardryBlocks.lightning_crystal_block);
registerItemBlock(registry, WizardryBlocks.necromancy_crystal_block);
registerItemBlock(registry, WizardryBlocks.earth_crystal_block);
registerItemBlock(registry, WizardryBlocks.sorcery_crystal_block);
registerItemBlock(registry, WizardryBlocks.healing_crystal_block);
registerItemBlock(registry, WizardryBlocks.fire_runestone);
registerItemBlock(registry, WizardryBlocks.ice_runestone);
registerItemBlock(registry, WizardryBlocks.lightning_runestone);
registerItemBlock(registry, WizardryBlocks.necromancy_runestone);
registerItemBlock(registry, WizardryBlocks.earth_runestone);
registerItemBlock(registry, WizardryBlocks.sorcery_runestone);
registerItemBlock(registry, WizardryBlocks.healing_runestone);
registerItemBlock(registry, WizardryBlocks.fire_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.ice_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.lightning_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.necromancy_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.earth_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.healing_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.sorcery_runestone_pedestal);
registerItemBlock(registry, WizardryBlocks.acacia_gilded_wood);
registerItemBlock(registry, WizardryBlocks.birch_gilded_wood);
registerItemBlock(registry, WizardryBlocks.dark_oak_gilded_wood);
registerItemBlock(registry, WizardryBlocks.jungle_gilded_wood);
registerItemBlock(registry, WizardryBlocks.oak_gilded_wood);
registerItemBlock(registry, WizardryBlocks.spruce_gilded_wood);
registerItemBlock(registry, WizardryBlocks.oak_bookshelf); registerItemBlock(registry, WizardryBlocks.oak_bookshelf);
registerItemBlock(registry, WizardryBlocks.spruce_bookshelf); registerItemBlock(registry, WizardryBlocks.spruce_bookshelf);
@@ -567,13 +611,22 @@ public final class WizardryItems {
// Items // Items
registerItem(registry, "magic_crystal", new ItemCrystal()); registerItem(registry, "magic_crystal", new ItemCrystal(Element.MAGIC));
registerItem(registry, "earth_crystal", new ItemCrystal(Element.EARTH));
registerItem(registry, "fire_crystal", new ItemCrystal(Element.FIRE));
registerItem(registry, "healing_crystal", new ItemCrystal(Element.HEALING));
registerItem(registry, "ice_crystal", new ItemCrystal(Element.ICE));
registerItem(registry, "lightning_crystal", new ItemCrystal(Element.LIGHTNING));
registerItem(registry, "necromancy_crystal", new ItemCrystal(Element.NECROMANCY));
registerItem(registry, "sorcery_crystal", new ItemCrystal(Element.SORCERY));
registerItem(registry, "crystal_shard", new Item().setCreativeTab(WizardryTabs.WIZARDRY)); registerItem(registry, "crystal_shard", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
registerItem(registry, "grand_crystal", new Item().setCreativeTab(WizardryTabs.WIZARDRY)); registerItem(registry, "grand_crystal", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
registerItem(registry, "wizard_handbook", new ItemWizardHandbook(), true); registerItem(registry, "wizard_handbook", new ItemWizardHandbook(), true);
registerItem(registry, "arcane_tome", new ItemArcaneTome()); registerItem(registry, "arcane_tome_apprentice", new ItemArcaneTome(EnumRarity.UNCOMMON, Tier.APPRENTICE));
registerItem(registry, "arcane_tome_advanced", new ItemArcaneTome(EnumRarity.RARE, Tier.ADVANCED));
registerItem(registry, "arcane_tome_master", new ItemArcaneTome(EnumRarity.EPIC, Tier.MASTER));
registerItem(registry, "spell_book", new ItemSpellBook(), true); registerItem(registry, "spell_book", new ItemSpellBook(), true);
registerItem(registry, "scroll", new ItemScroll()); registerItem(registry, "scroll", new ItemScroll());
registerItem(registry, "ruined_spell_book", new Item().setCreativeTab(WizardryTabs.WIZARDRY).setMaxStackSize(16)); registerItem(registry, "ruined_spell_book", new Item().setCreativeTab(WizardryTabs.WIZARDRY).setMaxStackSize(16));
@@ -654,7 +707,13 @@ public final class WizardryItems {
registerItem(registry, "smoke_bomb", new ItemSmokeBomb()); registerItem(registry, "smoke_bomb", new ItemSmokeBomb());
registerItem(registry, "spark_bomb", new ItemSparkBomb()); registerItem(registry, "spark_bomb", new ItemSparkBomb());
registerItem(registry, "spectral_dust", new ItemSpectralDust()); registerItem(registry, "spectral_dust_earth", new ItemSpectralDust());
registerItem(registry, "spectral_dust_fire", new ItemSpectralDust());
registerItem(registry, "spectral_dust_healing", new ItemSpectralDust());
registerItem(registry, "spectral_dust_ice", new ItemSpectralDust());
registerItem(registry, "spectral_dust_lightning", new ItemSpectralDust());
registerItem(registry, "spectral_dust_necromancy", new ItemSpectralDust());
registerItem(registry, "spectral_dust_sorcery", new ItemSpectralDust());
registerItem(registry, "wizard_hat", new ItemWizardArmour(ArmourClass.WIZARD, EntityEquipmentSlot.HEAD, null), true); registerItem(registry, "wizard_hat", new ItemWizardArmour(ArmourClass.WIZARD, EntityEquipmentSlot.HEAD, null), true);
registerItem(registry, "wizard_robe", new ItemWizardArmour(ArmourClass.WIZARD, EntityEquipmentSlot.CHEST, null)); registerItem(registry, "wizard_robe", new ItemWizardArmour(ArmourClass.WIZARD, EntityEquipmentSlot.CHEST, null));
@@ -991,9 +1050,11 @@ public final class WizardryItems {
/** Called from init() in the main mod class to register wizardry's banner patterns. */ /** Called from init() in the main mod class to register wizardry's banner patterns. */
public static void registerBannerPatterns(){ public static void registerBannerPatterns(){
for(Element element : Element.values()){ for(Element element : Element.values()){
if(element != Element.MAGIC) addBannerPattern("WIZARDRY_" + element.getName().toUpperCase(Locale.ROOT), if (element != Element.MAGIC) {
"wizardry_" + element.getName(), "eb" + element.getName().charAt(0), addBannerPattern("WIZARDRY_" + element.getName().toUpperCase(Locale.ROOT),
new ItemStack(WizardryItems.magic_crystal, 1, element.ordinal())); "wizardry_" + element.getName(), "eb" + element.getName().charAt(0),
new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "crystal_" + element.name().toLowerCase()))));
}
} }
} }
@@ -4,7 +4,7 @@ import electroblob.wizardry.item.SpellActions;
import electroblob.wizardry.util.ParticleBuilder; import electroblob.wizardry.util.ParticleBuilder;
import electroblob.wizardry.util.ParticleBuilder.Type; import electroblob.wizardry.util.ParticleBuilder.Type;
import electroblob.wizardry.util.SpellModifiers; import electroblob.wizardry.util.SpellModifiers;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.tileentity.TileEntityDispenser; import net.minecraft.tileentity.TileEntityDispenser;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
@@ -29,7 +29,7 @@ public class Enrage extends SpellAreaEffect {
@Override @Override
protected boolean affectEntity(World world, Vec3d origin, @Nullable EntityLivingBase caster, EntityLivingBase target, int targetCount, int ticksInUse, SpellModifiers modifiers){ protected boolean affectEntity(World world, Vec3d origin, @Nullable EntityLivingBase caster, EntityLivingBase target, int targetCount, int ticksInUse, SpellModifiers modifiers){
if(caster != null && target instanceof EntityLiving){ if(caster != null && target instanceof EntityCreature){
target.setRevengeTarget(caster); // Yours truly, angry mobs target.setRevengeTarget(caster); // Yours truly, angry mobs
} }
@@ -53,7 +53,7 @@ public class FireBreath extends SpellRay {
this.getNameForTranslationFormatted()), true); this.getNameForTranslationFormatted()), true);
// This now only damages in line with the maxHurtResistantTime. Some mods don't play nicely and fiddle // This now only damages in line with the maxHurtResistantTime. Some mods don't play nicely and fiddle
// with this mechanic for their own purposes, so this line makes sure that doesn't affect wizardry. // with this mechanic for their own purposes, so this line makes sure that doesn't affect wizardry.
}else if(ticksInUse % 10 == 0){ }else if(ticksInUse % ((EntityLivingBase)target).maxHurtResistantTime == 1){
target.setFire((int)(getProperty(BURN_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade))); target.setFire((int)(getProperty(BURN_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade)));
EntityUtils.attackEntityWithoutKnockback(target, EntityUtils.attackEntityWithoutKnockback(target,
MagicDamage.causeDirectMagicDamage(caster, DamageType.FIRE), MagicDamage.causeDirectMagicDamage(caster, DamageType.FIRE),
@@ -56,7 +56,7 @@ public class FlameRay extends SpellRay {
this.getNameForTranslationFormatted()), true); this.getNameForTranslationFormatted()), true);
// This now only damages in line with the maxHurtResistantTime. Some mods don't play nicely and fiddle // This now only damages in line with the maxHurtResistantTime. Some mods don't play nicely and fiddle
// with this mechanic for their own purposes, so this line makes sure that doesn't affect wizardry. // with this mechanic for their own purposes, so this line makes sure that doesn't affect wizardry.
}else if(ticksInUse % 10 == 0){ }else if(ticksInUse % ((EntityLivingBase)target).maxHurtResistantTime == 1){
target.setFire((int)(getProperty(BURN_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade))); target.setFire((int)(getProperty(BURN_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade)));
EntityUtils.attackEntityWithoutKnockback(target, EntityUtils.attackEntityWithoutKnockback(target,
MagicDamage.causeDirectMagicDamage(caster, DamageType.FIRE), MagicDamage.causeDirectMagicDamage(caster, DamageType.FIRE),
@@ -65,7 +65,7 @@ public class FrostRay extends SpellRay {
(int)(getProperty(EFFECT_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade)), (int)(getProperty(EFFECT_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade)),
getProperty(EFFECT_STRENGTH).intValue())); getProperty(EFFECT_STRENGTH).intValue()));
if(ticksInUse % 10 == 0){ if(ticksInUse % ((EntityLivingBase)target).maxHurtResistantTime == 1){
float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY); float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY);
if(target instanceof EntityBlaze || target instanceof EntityMagmaCube) damage *= 2; if(target instanceof EntityBlaze || target instanceof EntityMagmaCube) damage *= 2;
@@ -38,7 +38,7 @@ public class Heal extends SpellBuff {
entity.heal(health); entity.heal(health);
// If the player is able to heal, they can't possibly have absorption hearts, so no need to check! // If the player is able to heal, they can't possibly have absorption hearts, so no need to check!
if(excessHealth > entity.getAbsorptionAmount() && entity instanceof EntityPlayer if(excessHealth > 0 && entity instanceof EntityPlayer
&& ItemArtefact.isArtefactActive((EntityPlayer)entity, WizardryItems.amulet_absorption)){ && ItemArtefact.isArtefactActive((EntityPlayer)entity, WizardryItems.amulet_absorption)){
entity.setAbsorptionAmount(excessHealth); entity.setAbsorptionAmount(excessHealth);
} }
@@ -47,7 +47,7 @@ public class LifeDrain extends SpellRay {
if(EntityUtils.isLiving(target)){ if(EntityUtils.isLiving(target)){
if(ticksInUse % 10 == 0){ if(ticksInUse % 12 == 0){
float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY); float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY);
@@ -51,7 +51,7 @@ public class LightningRay extends SpellRay {
this.getNameForTranslationFormatted()), true); this.getNameForTranslationFormatted()), true);
// This now only damages in line with the maxHurtResistantTime. Some mods don't play nicely and fiddle // This now only damages in line with the maxHurtResistantTime. Some mods don't play nicely and fiddle
// with this mechanic for their own purposes, so this line makes sure that doesn't affect wizardry. // with this mechanic for their own purposes, so this line makes sure that doesn't affect wizardry.
}else if(ticksInUse % 10 == 0){ }else if(ticksInUse % ((EntityLivingBase)target).maxHurtResistantTime == 1){
EntityUtils.attackEntityWithoutKnockback(target, EntityUtils.attackEntityWithoutKnockback(target,
MagicDamage.causeDirectMagicDamage(caster, DamageType.SHOCK), MagicDamage.causeDirectMagicDamage(caster, DamageType.SHOCK),
getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY)); getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY));
@@ -53,7 +53,7 @@ public class LightningWeb extends SpellRay {
@Override @Override
protected boolean onEntityHit(World world, Entity target, Vec3d hit, EntityLivingBase caster, Vec3d origin, int ticksInUse, SpellModifiers modifiers){ protected boolean onEntityHit(World world, Entity target, Vec3d hit, EntityLivingBase caster, Vec3d origin, int ticksInUse, SpellModifiers modifiers){
if(EntityUtils.isLiving(target) && ticksInUse % 10 == 0){ if(EntityUtils.isLiving(target)){
electrocute(world, caster, origin, target, getProperty(PRIMARY_DAMAGE).floatValue() electrocute(world, caster, origin, target, getProperty(PRIMARY_DAMAGE).floatValue()
* modifiers.get(SpellModifiers.POTENCY), ticksInUse); * modifiers.get(SpellModifiers.POTENCY), ticksInUse);
@@ -63,7 +63,7 @@ public class MarkSacrifice extends SpellRay {
PotionEffect effect = event.getEntityLiving().getActivePotionEffect(WizardryPotions.mark_of_sacrifice); PotionEffect effect = event.getEntityLiving().getActivePotionEffect(WizardryPotions.mark_of_sacrifice);
if(effect != null && event.getSource().isMagicDamage()){ if(effect != null && event.getSource().isMagicDamage()){
event.setAmount(event.getAmount() * (1 + (1 + effect.getAmplifier()) * DAMAGE_INCREASE_PER_LEVEL)); event.setAmount(event.getAmount() * (1 + effect.getAmplifier()) * DAMAGE_INCREASE_PER_LEVEL);
event.getEntityLiving().removePotionEffect(WizardryPotions.mark_of_sacrifice); event.getEntityLiving().removePotionEffect(WizardryPotions.mark_of_sacrifice);
} }
} }
@@ -58,7 +58,7 @@ public class RayOfPurification extends SpellRay {
if(!world.isRemote && ticksInUse == 1 && caster instanceof EntityPlayer) ((EntityPlayer)caster) if(!world.isRemote && ticksInUse == 1 && caster instanceof EntityPlayer) ((EntityPlayer)caster)
.sendStatusMessage(new TextComponentTranslation("spell.resist", target.getName(), .sendStatusMessage(new TextComponentTranslation("spell.resist", target.getName(),
this.getNameForTranslationFormatted()), true); this.getNameForTranslationFormatted()), true);
}else if (ticksInUse % 10 == 0) { }else{
float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY); float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY);
// Fire // Fire
@@ -922,11 +922,6 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
return Arrays.asList(applicableItems).contains(item); return Arrays.asList(applicableItems).contains(item);
} }
/** Returns the list of items this spell is applicable to. */
public List<Item> getApplicableItems() {
return Arrays.asList(applicableItems);
}
/** /**
* Sets which items this spell can appear on (these default to the regular spell book and scroll). * Sets which items this spell can appear on (these default to the regular spell book and scroll).
* @param applicableItems The items this spell should naturally appear on (or no items at all). * @param applicableItems The items this spell should naturally appear on (or no items at all).
@@ -125,8 +125,7 @@ public class SpellBuff extends Spell {
@Override @Override
public boolean cast(World world, EntityLiving caster, EnumHand hand, int ticksInUse, EntityLivingBase target, SpellModifiers modifiers){ public boolean cast(World world, EntityLiving caster, EnumHand hand, int ticksInUse, EntityLivingBase target, SpellModifiers modifiers){
// Wizards can only cast a buff spell if they don't already have its effects. // Wizards can only cast a buff spell if they don't already have its effects.
// Some buff spells doesn't add any potion effects, those are ignored by this check if(caster.getActivePotionMap().keySet().containsAll(potionSet)) return false;
if(!potionSet.isEmpty() && caster.getActivePotionMap().keySet().containsAll(potionSet)) return false;
// Only return on the server side or the client probably won't spawn particles // Only return on the server side or the client probably won't spawn particles
if(!this.applyEffects(caster, modifiers) && !world.isRemote) return false; if(!this.applyEffects(caster, modifiers) && !world.isRemote) return false;
if(world.isRemote) this.spawnParticles(world, caster, modifiers); if(world.isRemote) this.spawnParticles(world, caster, modifiers);
@@ -1,9 +1,7 @@
package electroblob.wizardry.spell; package electroblob.wizardry.spell;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.item.ItemArtefact;
import electroblob.wizardry.item.SpellActions; import electroblob.wizardry.item.SpellActions;
import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.util.SpellModifiers; import electroblob.wizardry.util.SpellModifiers;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@@ -36,15 +34,15 @@ public class Telekinesis extends SpellRay {
target.motionZ = (origin.z - target.posZ) / 6; target.motionZ = (origin.z - target.posZ) / 6;
return true; return true;
} else if (target instanceof EntityPlayer && (Wizardry.settings.telekineticDisarmament && !ItemArtefact.isArtefactActive((EntityPlayer) target, WizardryItems.amulet_anchoring))) { }else if(target instanceof EntityPlayer && (Wizardry.settings.telekineticDisarmament || !(caster instanceof EntityPlayer))){
EntityPlayer player = (EntityPlayer) target;
EntityPlayer player = (EntityPlayer)target;
// IDEA: Disarm the offhand if the mainhand is empty or otherwise harmless? // IDEA: Disarm the offhand if the mainhand is empty or otherwise harmless?
if (!player.getHeldItemMainhand().isEmpty()) { if(!player.getHeldItemMainhand().isEmpty()){
if (!world.isRemote) { if(!world.isRemote){
EntityItem item = player.entityDropItem(player.getHeldItemMainhand(), 0); EntityItem item = player.entityDropItem(player.getHeldItemMainhand(), 0);
// Makes the item move towards the caster // Makes the item move towards the caster
item.motionX = (origin.x - player.posX) / 20; item.motionX = (origin.x - player.posX) / 20;
@@ -52,7 +50,7 @@ public class Telekinesis extends SpellRay {
} }
player.setHeldItem(EnumHand.MAIN_HAND, ItemStack.EMPTY); player.setHeldItem(EnumHand.MAIN_HAND, ItemStack.EMPTY);
return true; return true;
} }
} }
@@ -188,7 +188,9 @@ public class TileEntityArcaneWorkbench extends TileEntity implements IInventory,
}else if(slotNumber == ContainerArcaneWorkbench.UPGRADE_SLOT){ }else if(slotNumber == ContainerArcaneWorkbench.UPGRADE_SLOT){
Set<Item> upgrades = new HashSet<>(WandHelper.getSpecialUpgrades()); Set<Item> upgrades = new HashSet<>(WandHelper.getSpecialUpgrades());
upgrades.add(WizardryItems.arcane_tome); upgrades.add(WizardryItems.arcane_tome_apprentice);
upgrades.add(WizardryItems.arcane_tome_advanced);
upgrades.add(WizardryItems.arcane_tome_master);
upgrades.add(WizardryItems.resplendent_thread); upgrades.add(WizardryItems.resplendent_thread);
upgrades.add(WizardryItems.crystal_silver_plating); upgrades.add(WizardryItems.crystal_silver_plating);
upgrades.add(WizardryItems.ethereal_crystalweave); upgrades.add(WizardryItems.ethereal_crystalweave);
@@ -256,8 +256,7 @@ public class TileEntityImbuementAltar extends TileEntity implements ITickable {
} }
} }
if((input.getItem() == WizardryItems.magic_crystal || input.getItem() == Item.getItemFromBlock(WizardryBlocks.crystal_block)) if((input.getItem() == WizardryItems.magic_crystal || input.getItem() == Item.getItemFromBlock(WizardryBlocks.magic_crystal_block))){
&& input.getMetadata() == 0){
if(Arrays.stream(receptacleElements).distinct().count() == 1 && receptacleElements[0] != null){ // All the same element if(Arrays.stream(receptacleElements).distinct().count() == 1 && receptacleElements[0] != null){ // All the same element
return new ItemStack(input.getItem(), input.getCount(), receptacleElements[0].ordinal()); return new ItemStack(input.getItem(), input.getCount(), receptacleElements[0].ordinal());
@@ -1,7 +1,9 @@
package electroblob.wizardry.tileentity; package electroblob.wizardry.tileentity;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.block.BlockPedestal; import electroblob.wizardry.api.IElemental;
import electroblob.wizardry.block.BlockRunestonePedestal;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.entity.living.EntityEvilWizard; import electroblob.wizardry.entity.living.EntityEvilWizard;
import electroblob.wizardry.entity.living.EntityWizard; import electroblob.wizardry.entity.living.EntityWizard;
import electroblob.wizardry.packet.PacketConquerShrine; import electroblob.wizardry.packet.PacketConquerShrine;
@@ -101,7 +103,8 @@ public class TileEntityShrineCore extends TileEntity implements ITickable {
} }
wizard.setLocationAndAngles(x1, y1 + 0.5, z1, 0, 0); wizard.setLocationAndAngles(x1, y1 + 0.5, z1, 0, 0);
wizard.setElement(world.getBlockState(pos).getValue(BlockPedestal.ELEMENT)); wizard.setElement(world.getBlockState(pos).getBlock() instanceof IElemental
? ((IElemental) world.getBlockState(pos).getBlock()).getElement() : Element.MAGIC);
wizard.onInitialSpawn(world.getDifficultyForLocation(pos), null); wizard.onInitialSpawn(world.getDifficultyForLocation(pos), null);
wizard.hasStructure = true; wizard.hasStructure = true;
@@ -144,9 +147,8 @@ public class TileEntityShrineCore extends TileEntity implements ITickable {
WizardryPacketHandler.net.sendToAllAround(new PacketConquerShrine.Message(this.pos), WizardryPacketHandler.net.sendToAllAround(new PacketConquerShrine.Message(this.pos),
new NetworkRegistry.TargetPoint(this.world.provider.getDimension(), x, y, z, 64)); new NetworkRegistry.TargetPoint(this.world.provider.getDimension(), x, y, z, 64));
if(world.getBlockState(pos).getBlock() == WizardryBlocks.runestone_pedestal){ if(world.getBlockState(pos).getBlock() instanceof BlockRunestonePedestal){
world.setBlockState(pos, WizardryBlocks.runestone_pedestal.getDefaultState() world.setBlockState(pos, world.getBlockState(pos).getBlock().getDefaultState());
.withProperty(BlockPedestal.ELEMENT, world.getBlockState(pos).getValue(BlockPedestal.ELEMENT)));
}else{ }else{
Wizardry.logger.warn("What's going on?! A shrine core is being conquered but the block at its position is not a runestone pedestal!"); Wizardry.logger.warn("What's going on?! A shrine core is being conquered but the block at its position is not a runestone pedestal!");
} }
@@ -141,11 +141,6 @@ public final class AllyDesignationSystem {
return false; return false;
} }
// Tests whether the target is a creature that was summoned/tamed (or is otherwise owned) by the attacker
if(target instanceof IEntityOwnable && attacker instanceof EntityLiving && !(((EntityLiving)attacker).getRevengeTarget() == ((IEntityOwnable)target).getOwner() || ((EntityLiving)attacker).getAttackTarget() == ((IEntityOwnable)target).getOwner())){
return false;
}
// Tests whether the target is a creature that was mind controlled by the attacker // Tests whether the target is a creature that was mind controlled by the attacker
if(target instanceof EntityLiving && ((EntityLivingBase)target).isPotionActive(WizardryPotions.mind_control)){ if(target instanceof EntityLiving && ((EntityLivingBase)target).isPotionActive(WizardryPotions.mind_control)){
@@ -206,7 +201,7 @@ public final class AllyDesignationSystem {
// Owned entities inherit their owner's allies // Owned entities inherit their owner's allies
if(allyOf instanceof IEntityOwnable){ if(allyOf instanceof IEntityOwnable){
Entity owner = ((IEntityOwnable)allyOf).getOwner(); Entity owner = ((IEntityOwnable)allyOf).getOwner();
if(owner instanceof EntityLivingBase && (owner == possibleAlly || isAllied((EntityLivingBase)owner, possibleAlly))) return true; if(owner instanceof EntityLivingBase && isAllied((EntityLivingBase)owner, possibleAlly)) return true;
} }
if(allyOf instanceof EntityPlayer && possibleAlly instanceof EntityPlayer if(allyOf instanceof EntityPlayer && possibleAlly instanceof EntityPlayer
@@ -117,45 +117,6 @@ public final class EntityUtils {
return entityList; return entityList;
} }
/**
* Returns all EntityLivingBase within the cylinder radius of the given coordinates. This should
* used by circle effects.
*
* @param radius The search radius
* @param x The x coordinate to search around
* @param y The y coordinate to search around
* @param z The z coordinate to search around
* @param height The height of the cylinder
* @param world The world to search in
*/
public static List<EntityLivingBase> getLivingWithinCylinder(double radius, double x, double y, double z, double height, World world) {
return getEntitiesWithinCylinder(radius, x, y, z, height, world, EntityLivingBase.class);
}
/**
* Returns all entities of the specified type within the cylinder radius of the given coordinates. This should
* used by circle effects.
*
* @param radius The search radius
* @param x The x coordinate to search around
* @param y The y coordinate to search around
* @param z The z coordinate to search around
* @param height The height of the cylinder
* @param world The world to search in
* @param entityType The class of entity to search for; pass in Entity.class for all entities
*/
public static <T extends Entity> List<T> getEntitiesWithinCylinder(double radius, double x, double y, double z, double height, World world, Class<T> entityType) {
AxisAlignedBB aabb = new AxisAlignedBB(x - radius, y, z - radius, x + radius, y + height, z + radius);
List<T> entityList = world.getEntitiesWithinAABB(entityType, aabb);
for(T entity : entityList) {
if (entity.getDistance(x, entity.posY, z) > radius) {
entityList.remove(entity);
break;
}
}
return entityList;
}
/** /**
* Gets an entity from its UUID. If the UUID is known to belong to an {@code EntityPlayer}, use the more efficient * Gets an entity from its UUID. If the UUID is known to belong to an {@code EntityPlayer}, use the more efficient
* {@link World#getPlayerEntityByUUID(UUID)} instead. * {@link World#getPlayerEntityByUUID(UUID)} instead.
@@ -20,7 +20,8 @@ public interface ISpellSortable {
TIER("tier", Comparator.naturalOrder()), TIER("tier", Comparator.naturalOrder()),
ELEMENT("element", Comparator.comparing(Spell::getElement).thenComparing(Spell::getTier)), ELEMENT("element", Comparator.comparing(Spell::getElement).thenComparing(Spell::getTier)),
ALPHABETICAL("alphabetical", Comparator.comparing(s -> s.getRegistryName().getPath().toString())); ALPHABETICAL("alphabetical", Comparator.comparing(Spell::getUnlocalisedName));
public String name; public String name;
public Comparator<? super Spell> comparator; public Comparator<? super Spell> comparator;
@@ -1,7 +1,5 @@
package electroblob.wizardry.util; package electroblob.wizardry.util;
import electroblob.wizardry.Settings;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.entity.living.*; import electroblob.wizardry.entity.living.*;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.boss.EntityDragon; import net.minecraft.entity.boss.EntityDragon;
@@ -197,7 +195,7 @@ public class MagicDamage extends EntityDamageSource implements IElementalDamage
* @return A damagesource object of type EntityDamageSource * @return A damagesource object of type EntityDamageSource
*/ */
public static DamageSource causeDirectMagicDamage(Entity caster, DamageType type, boolean isRetaliatory){ public static DamageSource causeDirectMagicDamage(Entity caster, DamageType type, boolean isRetaliatory){
return new MagicDamage(getDirectDamageNameForType(type), caster, type, isRetaliatory); return new MagicDamage(DIRECT_MAGIC_DAMAGE, caster, type, isRetaliatory);
} }
/** /**
@@ -243,15 +241,7 @@ public class MagicDamage extends EntityDamageSource implements IElementalDamage
*/ */
public static DamageSource causeIndirectMagicDamage(Entity magic, Entity caster, DamageType type, public static DamageSource causeIndirectMagicDamage(Entity magic, Entity caster, DamageType type,
boolean isRetaliatory){ boolean isRetaliatory){
return new IndirectMagicDamage(getIndirectDamageNameForType(type), magic, caster, type, isRetaliatory); return new IndirectMagicDamage(INDIRECT_MAGIC_DAMAGE, magic, caster, type, isRetaliatory);
}
public static String getIndirectDamageNameForType(DamageType type) {
return Wizardry.settings.damageTypePerElement ? type.name().toLowerCase() + "_" + INDIRECT_MAGIC_DAMAGE : INDIRECT_MAGIC_DAMAGE;
}
public static String getDirectDamageNameForType(DamageType type) {
return Wizardry.settings.damageTypePerElement ? type.name().toLowerCase() + "_" + DIRECT_MAGIC_DAMAGE : DIRECT_MAGIC_DAMAGE;
} }
@Override @Override
@@ -1,14 +1,9 @@
package electroblob.wizardry.util; package electroblob.wizardry.util;
import electroblob.wizardry.constants.Constants;
import electroblob.wizardry.item.IManaStoringItem;
import electroblob.wizardry.item.IWorkbenchItem;
import electroblob.wizardry.item.ItemCrystal;
import electroblob.wizardry.item.ItemWand; import electroblob.wizardry.item.ItemWand;
import electroblob.wizardry.registry.Spells; import electroblob.wizardry.registry.Spells;
import electroblob.wizardry.registry.WizardryItems; import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.spell.Spell; import electroblob.wizardry.spell.Spell;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@@ -499,49 +494,4 @@ public final class WandHelper {
setProgression(wand, getProgression(wand) + progression); setProgression(wand, getProgression(wand) + progression);
} }
/**
* Recharges the mana of an item when the apply button is pressed in the arcane workbench GUI.
* This method requires the central item to implement both the {@link IWorkbenchItem} and {@link IManaStoringItem} interfaces.
*
* @param centre The slot representing the central item to be recharged.
* @param crystals The slot containing mana crystals for recharging.
* @return {@code true} if the mana of the central item was successfully recharged, {@code false} otherwise.
*/
public static boolean rechargeManaOnApplyButtonPressed(Slot centre, Slot crystals) {
boolean changed = false;
if (!(centre.getStack().getItem() instanceof IWorkbenchItem) || !(centre.getStack().getItem() instanceof IManaStoringItem)) {
return false;
}
IManaStoringItem iManaStoringItem = (IManaStoringItem) centre.getStack().getItem();
// Charges the item by appropriate amount
if (crystals.getStack() != ItemStack.EMPTY && !iManaStoringItem.isManaFull(centre.getStack())) {
int chargeDepleted = iManaStoringItem.getManaCapacity(centre.getStack()) - iManaStoringItem.getMana(centre.getStack());
// Not too pretty but allows addons implementing the IManaStoringItem interface to provide their mana amount for custom crystals,
// previously this was defaulted to the regular crystal's amount, allowing players to exploit it if a crystal was worth less mana than that.
int manaPerItem = crystals.getStack().getItem() instanceof IManaStoringItem ?
((IManaStoringItem) crystals.getStack().getItem()).getMana(crystals.getStack()) :
crystals.getStack().getItem() instanceof ItemCrystal ? Constants.MANA_PER_CRYSTAL : Constants.MANA_PER_SHARD;
if (crystals.getStack().getItem() == WizardryItems.crystal_shard) {manaPerItem = Constants.MANA_PER_SHARD;}
if (crystals.getStack().getItem() == WizardryItems.grand_crystal) {manaPerItem = Constants.GRAND_CRYSTAL_MANA;}
if (crystals.getStack().getCount() * manaPerItem < chargeDepleted) {
// If there aren't enough crystals to fully charge the item
iManaStoringItem.rechargeMana(centre.getStack(), crystals.getStack().getCount() * manaPerItem);
crystals.decrStackSize(crystals.getStack().getCount());
} else {
// If there are excess crystals (or just enough)
iManaStoringItem.setMana(centre.getStack(), iManaStoringItem.getManaCapacity(centre.getStack()));
crystals.decrStackSize((int) Math.ceil(((double) chargeDepleted) / manaPerItem));
}
changed = true;
}
return changed;
}
} }
@@ -1,5 +1,6 @@
package electroblob.wizardry.worldgen; package electroblob.wizardry.worldgen;
import electroblob.wizardry.block.BlockGildedWood;
import electroblob.wizardry.registry.WizardryBlocks; import electroblob.wizardry.registry.WizardryBlocks;
import electroblob.wizardry.util.BlockUtils; import electroblob.wizardry.util.BlockUtils;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@@ -89,11 +90,24 @@ public class WoodTypeTemplateProcessor implements ITemplateProcessor {
public Template.BlockInfo processBlock(World world, BlockPos pos, Template.BlockInfo info){ public Template.BlockInfo processBlock(World world, BlockPos pos, Template.BlockInfo info){
// Why do these each have their own property key? // Why do these each have their own property key?
if(info.blockState.getBlock() instanceof BlockPlanks){ // This covers gilded wood too if(info.blockState.getBlock() instanceof BlockPlanks){ // This doesn't cover gilded wood
return new Template.BlockInfo(info.pos, info.blockState.withProperty(BlockPlanks.VARIANT, woodType), info.tileentityData); return new Template.BlockInfo(info.pos, info.blockState.withProperty(BlockPlanks.VARIANT, woodType), info.tileentityData);
}else if(info.blockState.getBlock() instanceof BlockWoodSlab){ }else if(info.blockState.getBlock() instanceof BlockGildedWood){
return new Template.BlockInfo(info.pos, info.blockState.withProperty(BlockWoodSlab.VARIANT, woodType), info.tileentityData); switch (woodType) {
// This is a mess, no wonder the flattening happened case OAK:
return new Template.BlockInfo(info.pos, WizardryBlocks.oak_gilded_wood.getDefaultState(), info.tileentityData);
case SPRUCE:
return new Template.BlockInfo(info.pos, WizardryBlocks.spruce_gilded_wood.getDefaultState(), info.tileentityData);
case BIRCH:
return new Template.BlockInfo(info.pos, WizardryBlocks.birch_gilded_wood.getDefaultState(), info.tileentityData);
case JUNGLE:
return new Template.BlockInfo(info.pos, WizardryBlocks.jungle_gilded_wood.getDefaultState(), info.tileentityData);
case ACACIA:
return new Template.BlockInfo(info.pos, WizardryBlocks.acacia_gilded_wood.getDefaultState(), info.tileentityData);
case DARK_OAK:
return new Template.BlockInfo(info.pos, WizardryBlocks.dark_oak_gilded_wood.getDefaultState(), info.tileentityData);
}
// This is a mess, no wonder the flattening happened
}else if(DOORS.containsValue(info.blockState.getBlock())){ }else if(DOORS.containsValue(info.blockState.getBlock())){
return new Template.BlockInfo(info.pos, BlockUtils.copyState(DOORS.get(woodType), info.blockState), info.tileentityData); return new Template.BlockInfo(info.pos, BlockUtils.copyState(DOORS.get(woodType), info.blockState), info.tileentityData);
}else if(STAIRS.containsValue(info.blockState.getBlock())){ }else if(STAIRS.containsValue(info.blockState.getBlock())){
@@ -5,6 +5,7 @@ import electroblob.wizardry.block.BlockRunestone;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
import electroblob.wizardry.entity.living.EntityRemnant; import electroblob.wizardry.entity.living.EntityRemnant;
import electroblob.wizardry.integration.antiqueatlas.WizardryAntiqueAtlasIntegration; import electroblob.wizardry.integration.antiqueatlas.WizardryAntiqueAtlasIntegration;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.MobSpawnerBaseLogic; import net.minecraft.tileentity.MobSpawnerBaseLogic;
@@ -17,8 +18,10 @@ import net.minecraft.world.World;
import net.minecraft.world.gen.structure.template.ITemplateProcessor; import net.minecraft.world.gen.structure.template.ITemplateProcessor;
import net.minecraft.world.gen.structure.template.PlacementSettings; import net.minecraft.world.gen.structure.template.PlacementSettings;
import net.minecraft.world.gen.structure.template.Template; import net.minecraft.world.gen.structure.template.Template;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import java.util.Arrays;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
@@ -57,10 +60,12 @@ public class WorldGenObelisk extends WorldGenSurfaceStructure {
@Override @Override
public void spawnStructure(Random random, World world, BlockPos origin, Template template, PlacementSettings settings, ResourceLocation structureFile){ public void spawnStructure(Random random, World world, BlockPos origin, Template template, PlacementSettings settings, ResourceLocation structureFile){
final Element element = Element.values()[1 + random.nextInt(Element.values().length-1)]; Element[] elements = (Element[]) Arrays.stream(Element.values()).filter(Element::hasWorldgen).toArray();
final Element element = elements[1 + random.nextInt(elements.length-1)];
Block runeStone = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(element.getModid(), element.getName().toLowerCase() + "_runestone"));
ITemplateProcessor processor = (w, p, i) -> i.blockState.getBlock() instanceof BlockRunestone ? new Template.BlockInfo( ITemplateProcessor processor = (w, p, i) -> i.blockState.getBlock() instanceof BlockRunestone ? new Template.BlockInfo(
i.pos, i.blockState.withProperty(BlockRunestone.ELEMENT, element), i.tileentityData) : i; i.pos, runeStone.getDefaultState(), i.tileentityData) : i;
template.addBlocksToWorld(world, origin, processor, settings, 2 | 16); template.addBlocksToWorld(world, origin, processor, settings, 2 | 16);
@@ -1,13 +1,13 @@
package electroblob.wizardry.worldgen; package electroblob.wizardry.worldgen;
import electroblob.wizardry.Wizardry; import electroblob.wizardry.Wizardry;
import electroblob.wizardry.block.BlockPedestal;
import electroblob.wizardry.block.BlockRunestone; import electroblob.wizardry.block.BlockRunestone;
import electroblob.wizardry.block.BlockRunestonePedestal;
import electroblob.wizardry.constants.Element; import electroblob.wizardry.constants.Element;
import electroblob.wizardry.integration.antiqueatlas.WizardryAntiqueAtlasIntegration; import electroblob.wizardry.integration.antiqueatlas.WizardryAntiqueAtlasIntegration;
import electroblob.wizardry.registry.WizardryBlocks;
import electroblob.wizardry.spell.ArcaneLock; import electroblob.wizardry.spell.ArcaneLock;
import electroblob.wizardry.tileentity.TileEntityShrineCore; import electroblob.wizardry.tileentity.TileEntityShrineCore;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@@ -15,8 +15,10 @@ import net.minecraft.world.World;
import net.minecraft.world.gen.structure.template.ITemplateProcessor; import net.minecraft.world.gen.structure.template.ITemplateProcessor;
import net.minecraft.world.gen.structure.template.PlacementSettings; import net.minecraft.world.gen.structure.template.PlacementSettings;
import net.minecraft.world.gen.structure.template.Template; import net.minecraft.world.gen.structure.template.Template;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import java.util.Arrays;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
import java.util.UUID; import java.util.UUID;
@@ -49,10 +51,12 @@ public class WorldGenShrine extends WorldGenSurfaceStructure {
@Override @Override
public void spawnStructure(Random random, World world, BlockPos origin, Template template, PlacementSettings settings, ResourceLocation structureFile){ public void spawnStructure(Random random, World world, BlockPos origin, Template template, PlacementSettings settings, ResourceLocation structureFile){
final Element element = Element.values()[1 + random.nextInt(Element.values().length-1)]; Element[] elements = (Element[]) Arrays.stream(Element.values()).filter(Element::hasWorldgen).toArray();
final Element element = elements[1 + random.nextInt(elements.length-1)];
Block runeStone = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(element.getModid(), element.getName().toLowerCase() + "_runestone"));
ITemplateProcessor processor = (w, p, i) -> i.blockState.getBlock() instanceof BlockRunestone ? new Template.BlockInfo( ITemplateProcessor processor = (w, p, i) -> i.blockState.getBlock() instanceof BlockRunestone ? new Template.BlockInfo(
i.pos, i.blockState.withProperty(BlockRunestone.ELEMENT, element), i.tileentityData) : i; i.pos, runeStone.getDefaultState(), i.tileentityData) : i;
template.addBlocksToWorld(world, origin, processor, settings, 2 | 16); template.addBlocksToWorld(world, origin, processor, settings, 2 | 16);
@@ -65,8 +69,8 @@ public class WorldGenShrine extends WorldGenSurfaceStructure {
if(entry.getValue().equals(CORE_DATA_BLOCK_TAG)){ if(entry.getValue().equals(CORE_DATA_BLOCK_TAG)){
// This bit could have been done with a template processor, but we also need to link the chest and lock it // This bit could have been done with a template processor, but we also need to link the chest and lock it
world.setBlockState(entry.getKey(), WizardryBlocks.runestone_pedestal.getDefaultState() world.setBlockState(entry.getKey(), ForgeRegistries.BLOCKS.getValue(new ResourceLocation(Wizardry.MODID, element.getName().toLowerCase()
.withProperty(BlockPedestal.ELEMENT, element).withProperty(BlockPedestal.NATURAL, true)); + "_runestone_pedestal")).getDefaultState().withProperty(BlockRunestonePedestal.NATURAL, true));
TileEntity core = world.getTileEntity(entry.getKey()); TileEntity core = world.getTileEntity(entry.getKey());
TileEntity container = world.getTileEntity(entry.getKey().up()); TileEntity container = world.getTileEntity(entry.getKey().up());
@@ -7,8 +7,7 @@
"translate": "advancement.ebwizardry:crystal.desc" "translate": "advancement.ebwizardry:crystal.desc"
}, },
"icon": { "icon": {
"item": "ebwizardry:magic_crystal", "item": "ebwizardry:magic_crystal"
"data": 0
} }
}, },
"parent": "ebwizardry:root", "parent": "ebwizardry:root",
@@ -18,8 +17,28 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:magic_crystal", "item": "ebwizardry:magic_crystal"
"data": 0 },
{
"item": "ebwizardry:fire_crystal"
},
{
"item": "ebwizardry:ice_crystal"
},
{
"item": "ebwizardry:lightning_crystal"
},
{
"item": "ebwizardry:necromancy_crystal"
},
{
"item": "ebwizardry:earth_crystal"
},
{
"item": "ebwizardry:sorcery_crystal"
},
{
"item": "ebwizardry:healing_crystal"
} }
] ]
} }
@@ -7,8 +7,7 @@
"translate": "advancement.ebwizardry:defeat_remnant.desc" "translate": "advancement.ebwizardry:defeat_remnant.desc"
}, },
"icon": { "icon": {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_sorcery"
"data": 6
} }
}, },
"parent": "ebwizardry:arcane_initiate", "parent": "ebwizardry:arcane_initiate",
@@ -18,8 +17,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_fire"
"data": 1
} }
] ]
} }
@@ -29,8 +27,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_ice"
"data": 2
} }
] ]
} }
@@ -40,8 +37,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_lightning"
"data": 3
} }
] ]
} }
@@ -51,8 +47,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_necromancy"
"data": 4
} }
] ]
} }
@@ -62,8 +57,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_earth"
"data": 5
} }
] ]
} }
@@ -73,8 +67,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_sorcery"
"data": 6
} }
] ]
} }
@@ -84,7 +77,7 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:spectral_dust", "item": "ebwizardry:spectral_dust_healing",
"data": 7 "data": 7
} }
] ]
@@ -5,7 +5,13 @@
"conditions": { "conditions": {
"items": [ "items": [
{ {
"item": "ebwizardry:arcane_tome" "item": "ebwizardry:arcane_tome_apprentice"
},
{
"item": "ebwizardry:arcane_tome_advanced"
},
{
"item": "ebwizardry:arcane_tome_master"
} }
] ]
} }
@@ -7,7 +7,7 @@
"translate": "advancement.ebwizardry:max_out_wand.desc" "translate": "advancement.ebwizardry:max_out_wand.desc"
}, },
"icon": { "icon": {
"item": "ebwizardry:arcane_tome" "item": "ebwizardry:arcane_tome_master"
}, },
"frame": "goal" "frame": "goal"
}, },
@@ -7,8 +7,7 @@
"translate": "advancement.ebwizardry:visit_shrine.desc" "translate": "advancement.ebwizardry:visit_shrine.desc"
}, },
"icon": { "icon": {
"item": "ebwizardry:runestone", "item": "ebwizardry:ice_runestone"
"data": 5
} }
}, },
"parent": "ebwizardry:defeat_evil_wizard", "parent": "ebwizardry:defeat_evil_wizard",
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=Position %s, %s, %s in der dimens
tile.ebwizardry\:transportation_stone.forget=Position %s, %s, %s in der dimension %s vergessen tile.ebwizardry\:transportation_stone.forget=Position %s, %s, %s in der dimension %s vergessen
tile.ebwizardry\:transportation_stone.invalid=Du musst zuerst einen Kreis mit 8 Teleportsteinen bilden! tile.ebwizardry\:transportation_stone.invalid=Du musst zuerst einen Kreis mit 8 Teleportsteinen bilden!
tile.ebwizardry\:spectral_block.name=Spektralblock tile.ebwizardry\:spectral_block.name=Spektralblock
tile.ebwizardry\:runestone.name=Runenstein tile.ebwizardry\:fire_runestone.name=Runenstein
tile.ebwizardry\:runestone_pedestal.name=Runenstein Sockel tile.ebwizardry\:ice_runestone.name=Runenstein
tile.ebwizardry\:lightning_runestone.name=Runenstein
tile.ebwizardry\:necromancy_runestone.name=Runenstein
tile.ebwizardry\:earth_runestone.name=Runenstein
tile.ebwizardry\:healing_runestone.name=Runenstein
tile.ebwizardry\:sorcery_runestone.name=Runenstein
tile.ebwizardry\:fire_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:ice_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:lightning_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:necromancy_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:earth_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:healing_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:sorcery_runestone_pedestal.name=Runenstein Sockel
tile.ebwizardry\:thorns.name=Dornen tile.ebwizardry\:thorns.name=Dornen
tile.ebwizardry\:obsidian_crust.name=Obsidian Kruste tile.ebwizardry\:obsidian_crust.name=Obsidian Kruste
tile.ebwizardry\:dry_frosted_ice.name=Gefrohrenes Trockeneis tile.ebwizardry\:dry_frosted_ice.name=Gefrohrenes Trockeneis
@@ -53,14 +65,14 @@ tile.ebwizardry\:dark_oak_lectern.name=Schwarzeichenholz Pult
tile.ebwizardry\:receptacle.name=Gefäß tile.ebwizardry\:receptacle.name=Gefäß
tile.ebwizardry\:imbuement_altar.name=Ermächtungsaltar tile.ebwizardry\:imbuement_altar.name=Ermächtungsaltar
item.ebwizardry\:crystal_magic.name=Magischer Kristall item.ebwizardry\:magic_crystal.name=Magischer Kristall
item.ebwizardry\:crystal_fire.name=Feuriger Kristall item.ebwizardry\:fire_crystal.name=Feuriger Kristall
item.ebwizardry\:crystal_ice.name=Eisiger Kristall item.ebwizardry\:ice_crystal.name=Eisiger Kristall
item.ebwizardry\:crystal_lightning.name=Stürmischer Kristall item.ebwizardry\:lightning_crystal.name=Stürmischer Kristall
item.ebwizardry\:crystal_necromancy.name=Dunkler Kristall item.ebwizardry\:necromancy_crystal.name=Dunkler Kristall
item.ebwizardry\:crystal_earth.name=Erdkristall item.ebwizardry\:earth_crystal.name=Erdkristall
item.ebwizardry\:crystal_sorcery.name=Mystischer Kristall item.ebwizardry\:sorcery_crystal.name=Mystischer Kristall
item.ebwizardry\:crystal_healing.name=Strahlender Kristall item.ebwizardry\:healing_crystal.name=Strahlender Kristall
item.ebwizardry\:magic_wand.name=Magischer Zauberstab item.ebwizardry\:magic_wand.name=Magischer Zauberstab
item.ebwizardry\:apprentice_wand.name=Lehrlingszauberstab item.ebwizardry\:apprentice_wand.name=Lehrlingszauberstab
@@ -184,7 +196,13 @@ item.ebwizardry\:armour_upgrade.desc_extended=%1$sum sie %2$slegendär zu machen
item.ebwizardry\:magic_silk.name=Magische Seide item.ebwizardry\:magic_silk.name=Magische Seide
item.ebwizardry\:spectral_dust.name=Spektraler Staub item.ebwizardry\:spectral_dust_fire.name=Spektraler Staub
item.ebwizardry\:spectral_dust_ice.name=Spektraler Staub
item.ebwizardry\:spectral_dust_lightning.name=Spektraler Staub
item.ebwizardry\:spectral_dust_healing.name=Spektraler Staub
item.ebwizardry\:spectral_dust_sorcery.name=Spektraler Staub
item.ebwizardry\:spectral_dust_necromancy.name=Spektraler Staub
item.ebwizardry\:spectral_dust_healing.name=Spektraler Staub
item.ebwizardry\:wizard_armour.legendary=Legendär item.ebwizardry\:wizard_armour.legendary=Legendär
item.ebwizardry\:wizard_armour.buff=-%1$s %2$s Kosten item.ebwizardry\:wizard_armour.buff=-%1$s %2$s Kosten
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=Remembered the location %s, %s, %
tile.ebwizardry\:transportation_stone.forget=Forgot the location %s, %s, %s in dimension %s tile.ebwizardry\:transportation_stone.forget=Forgot the location %s, %s, %s in dimension %s
tile.ebwizardry\:transportation_stone.invalid=You must make a circle with 8 stones of transportation first! tile.ebwizardry\:transportation_stone.invalid=You must make a circle with 8 stones of transportation first!
tile.ebwizardry\:spectral_block.name=Spectral Block tile.ebwizardry\:spectral_block.name=Spectral Block
tile.ebwizardry\:runestone.name=Runestone tile.ebwizardry\:fire_runestone.name=Runestone
tile.ebwizardry\:runestone_pedestal.name=Runestone Pedestal tile.ebwizardry\:ice_runestone.name=Runestone
tile.ebwizardry\:lightning_runestone.name=Runestone
tile.ebwizardry\:necromancy_runestone.name=Runestone
tile.ebwizardry\:earth_runestone.name=Runestone
tile.ebwizardry\:healing_runestone.name=Runestone
tile.ebwizardry\:sorcery_runestone.name=Runestone
tile.ebwizardry\:fire_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:ice_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:lightning_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:necromancy_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:earth_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:healing_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:sorcery_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:thorns.name=Thorns tile.ebwizardry\:thorns.name=Thorns
tile.ebwizardry\:obsidian_crust.name=Obsidian Crust tile.ebwizardry\:obsidian_crust.name=Obsidian Crust
tile.ebwizardry\:dry_frosted_ice.name=Dry Frosted Ice tile.ebwizardry\:dry_frosted_ice.name=Dry Frosted Ice
@@ -52,22 +64,22 @@ tile.ebwizardry\:dark_oak_lectern.name=Dark Oak Lectern
tile.ebwizardry\:receptacle.name=Receptacle tile.ebwizardry\:receptacle.name=Receptacle
tile.ebwizardry\:imbuement_altar.name=Imbuement Altar tile.ebwizardry\:imbuement_altar.name=Imbuement Altar
item.ebwizardry\:crystal_magic.name=Magic Crystal item.ebwizardry\:magic_crystal.name=Magic Crystal
item.ebwizardry\:crystal_magic.desc=The iridescent colours of this crystal seem to slowly shift and swirl, hinting at a magical energy within. Perhaps this magic could be harnessed in some way? item.ebwizardry\:magic_crystal.desc=The iridescent colours of this crystal seem to slowly shift and swirl, hinting at a magical energy within. Perhaps this magic could be harnessed in some way?
item.ebwizardry\:crystal_fire.name=Fiery Crystal item.ebwizardry\:fire_crystal.name=Fiery Crystal
item.ebwizardry\:crystal_fire.desc=A crystal that glows a fiery orange. Maybe it is the key to unlocking the element of fire... item.ebwizardry\:fire_crystal.desc=A crystal that glows a fiery orange. Maybe it is the key to unlocking the element of fire...
item.ebwizardry\:crystal_ice.name=Icy Crystal item.ebwizardry\:ice_crystal.name=Icy Crystal
item.ebwizardry\:crystal_ice.desc=A crystal with a cold, bluish tint. Perhaps it holds the secrets to the power of frost... item.ebwizardry\:ice_crystal.desc=A crystal with a cold, bluish tint. Perhaps it holds the secrets to the power of frost...
item.ebwizardry\:crystal_lightning.name=Stormy Crystal item.ebwizardry\:lightning_crystal.name=Stormy Crystal
item.ebwizardry\:crystal_lightning.desc=A crystal that seems to swirl and flash with a chaotic energy. Maybe it hides a greater power within... item.ebwizardry\:lightning_crystal.desc=A crystal that seems to swirl and flash with a chaotic energy. Maybe it hides a greater power within...
item.ebwizardry\:crystal_necromancy.name=Dark Crystal item.ebwizardry\:necromancy_crystal.name=Dark Crystal
item.ebwizardry\:crystal_necromancy.desc=A crystal with a deep, purplish appearance that seems to draw you in. Perhaps it is a gateway to something darker... item.ebwizardry\:necromancy_crystal.desc=A crystal with a deep, purplish appearance that seems to draw you in. Perhaps it is a gateway to something darker...
item.ebwizardry\:crystal_earth.name=Verdant Crystal item.ebwizardry\:earth_crystal.name=Verdant Crystal
item.ebwizardry\:crystal_earth.desc=A crystal patterened with a great many greens and browns. Perhaps it holds a connection to the forces of nature... item.ebwizardry\:earth_crystal.desc=A crystal patterened with a great many greens and browns. Perhaps it holds a connection to the forces of nature...
item.ebwizardry\:crystal_sorcery.name=Mystical Crystal item.ebwizardry\:sorcery_crystal.name=Mystical Crystal
item.ebwizardry\:crystal_sorcery.desc=A crystal that glimmers with a bluish-green light. Maybe it conceals the secrets of an ancient force... item.ebwizardry\:sorcery_crystal.desc=A crystal that glimmers with a bluish-green light. Maybe it conceals the secrets of an ancient force...
item.ebwizardry\:crystal_healing.name=Radiant Crystal item.ebwizardry\:healing_crystal.name=Radiant Crystal
item.ebwizardry\:crystal_healing.desc=A crystal that glints a golden yellow in the sunlight. Perhaps it possesses the link to a divine power... item.ebwizardry\:healing_crystal.desc=A crystal that glints a golden yellow in the sunlight. Perhaps it possesses the link to a divine power...
item.ebwizardry\:spell_book.name=Spell Book item.ebwizardry\:spell_book.name=Spell Book
item.ebwizardry\:spell_book.desc=A book filled with the runes and glyphs of an ancient script. Perhaps with dedication, one might be able to decipher its contents...\n\nRight-click while holding this book to read it. item.ebwizardry\:spell_book.desc=A book filled with the runes and glyphs of an ancient script. Perhaps with dedication, one might be able to decipher its contents...\n\nRight-click while holding this book to read it.
@@ -11,15 +11,27 @@ tile.ebwizardry\:transportation_stone.remember=Remembered the location %s, %s, %
tile.ebwizardry\:transportation_stone.forget=Forgot the location %s, %s, %s in dimension %s tile.ebwizardry\:transportation_stone.forget=Forgot the location %s, %s, %s in dimension %s
tile.ebwizardry\:transportation_stone.invalid=You must make a circle with 8 stones of transportation first! tile.ebwizardry\:transportation_stone.invalid=You must make a circle with 8 stones of transportation first!
tile.ebwizardry\:spectral_block.name=Spectral Block tile.ebwizardry\:spectral_block.name=Spectral Block
tile.ebwizardry\:runestone.name=Runestone tile.ebwizardry\:fire_runestone.name=Runestone
tile.ebwizardry\:runestone_pedestal.name=Runestone Pedestal tile.ebwizardry\:ice_runestone.name=Runestone
tile.ebwizardry\:lightning_runestone.name=Runestone
tile.ebwizardry\:necromancy_runestone.name=Runestone
tile.ebwizardry\:earth_runestone.name=Runestone
tile.ebwizardry\:healing_runestone.name=Runestone
tile.ebwizardry\:sorcery_runestone.name=Runestone
tile.ebwizardry\:fire_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:ice_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:lightning_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:necromancy_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:earth_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:healing_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:sorcery_runestone_pedestal.name=Runestone Pedestal
tile.ebwizardry\:thorns.name=Thorns tile.ebwizardry\:thorns.name=Thorns
tile.ebwizardry\:obsidian_crust.name=Obsidian Crust tile.ebwizardry\:obsidian_crust.name=Obsidian Crust
tile.ebwizardry\:dry_frosted_ice.name=Dry Frosted Ice tile.ebwizardry\:dry_frosted_ice.name=Dry Frosted Ice
tile.ebwizardry\:crystal_flower_pot.name=Flower Pot tile.ebwizardry\:crystal_flower_pot.name=Flower Pot
tile.ebwizardry\:permafrost.name=Permafrost tile.ebwizardry\:permafrost.name=Permafrost
tile.ebwizardry\:magic_crystal_block.name=Block of Crystal tile.ebwizardry\:magic_crystal_block.name=Block of Magic Crystal
tile.ebwizardry\:fire_crystal_block.name=Block of Fiery Crystal tile.ebwizardry\:fire_crystal_block.name=Block of Fiery Crystal
tile.ebwizardry\:ice_crystal_block.name=Block of Icy Crystal tile.ebwizardry\:ice_crystal_block.name=Block of Icy Crystal
tile.ebwizardry\:lightning_crystal_block.name=Block of Stormy Crystal tile.ebwizardry\:lightning_crystal_block.name=Block of Stormy Crystal
@@ -52,22 +64,22 @@ tile.ebwizardry\:dark_oak_lectern.name=Dark Oak Lectern
tile.ebwizardry\:receptacle.name=Receptacle tile.ebwizardry\:receptacle.name=Receptacle
tile.ebwizardry\:imbuement_altar.name=Imbuement Altar tile.ebwizardry\:imbuement_altar.name=Imbuement Altar
item.ebwizardry\:crystal_magic.name=Magic Crystal item.ebwizardry\:magic_crystal.name=Magic Crystal
item.ebwizardry\:crystal_magic.desc=The iridescent colors of this crystal seem to slowly shift and swirl, hinting at a magical energy within. Perhaps this magic could be harnessed, somehow... item.ebwizardry\:magic_crystal.desc=The iridescent colors of this crystal seem to slowly shift and swirl, hinting at a magical energy within. Perhaps this magic could be harnessed, somehow...
item.ebwizardry\:crystal_fire.name=Fiery Crystal item.ebwizardry\:fire_crystal.name=Fiery Crystal
item.ebwizardry\:crystal_fire.desc=A crystal that glows a fiery orange. Maybe it is the key to unlocking the element of fire... item.ebwizardry\:fire_crystal.desc=A crystal that glows a fiery orange. Maybe it is the key to unlocking the element of fire...
item.ebwizardry\:crystal_ice.name=Icy Crystal item.ebwizardry\:ice_crystal.name=Icy Crystal
item.ebwizardry\:crystal_ice.desc=A crystal with a cold, bluish tint. Perhaps it holds the secrets to the power of frost... item.ebwizardry\:ice_crystal.desc=A crystal with a cold, bluish tint. Perhaps it holds the secrets to the power of frost...
item.ebwizardry\:crystal_lightning.name=Stormy Crystal item.ebwizardry\:lightning_crystal.name=Stormy Crystal
item.ebwizardry\:crystal_lightning.desc=A crystal that seems to swirl and flash with a chaotic energy. Maybe it hides a greater power within... item.ebwizardry\:lightning_crystal.desc=A crystal that seems to swirl and flash with a chaotic energy. Maybe it hides a greater power within...
item.ebwizardry\:crystal_necromancy.name=Dark Crystal item.ebwizardry\:necromancy_crystal.name=Dark Crystal
item.ebwizardry\:crystal_necromancy.desc=A crystal with a deep, purplish appearance that seems to draw you in. Perhaps it is a gateway to something darker... item.ebwizardry\:necromancy_crystal.desc=A crystal with a deep, purplish appearance that seems to draw you in. Perhaps it is a gateway to something darker...
item.ebwizardry\:crystal_earth.name=Verdant Crystal item.ebwizardry\:earth_crystal.name=Verdant Crystal
item.ebwizardry\:crystal_earth.desc=A crystal patterened with a great many greens and browns. Perhaps it holds a connection to the forces of nature... item.ebwizardry\:earth_crystal.desc=A crystal patterened with a great many greens and browns. Perhaps it holds a connection to the forces of nature...
item.ebwizardry\:crystal_sorcery.name=Mystical Crystal item.ebwizardry\:sorcery_crystal.name=Mystical Crystal
item.ebwizardry\:crystal_sorcery.desc=A crystal that glimmers with a bluish-green light. Maybe it conceals the secrets of an ancient force... item.ebwizardry\:sorcery_crystal.desc=A crystal that glimmers with a bluish-green light. Maybe it conceals the secrets of an ancient force...
item.ebwizardry\:crystal_healing.name=Radiant Crystal item.ebwizardry\:healing_crystal.name=Radiant Crystal
item.ebwizardry\:crystal_healing.desc=A crystal that glints a golden yellow in the sunlight. Perhaps it possesses the link to a divine power... item.ebwizardry\:healing_crystal.desc=A crystal that glints a golden yellow in the sunlight. Perhaps it possesses the link to a divine power...
item.ebwizardry\:spell_book.name=Spell Book item.ebwizardry\:spell_book.name=Spell Book
item.ebwizardry\:spell_book.desc=A book filled with the runes and glyphs of an ancient script. Perhaps with dedication, one might be able to decipher its contents...\n\nRight-click while holding this book to read it. item.ebwizardry\:spell_book.desc=A book filled with the runes and glyphs of an ancient script. Perhaps with dedication, one might be able to decipher its contents...\n\nRight-click while holding this book to read it.
@@ -77,7 +89,9 @@ item.ebwizardry\:spell_book.apply_to_wizard=Replaced %1$s's spell %2$s with %3$s
item.ebwizardry\:ruined_spell_book.name=Ruined Spell Book item.ebwizardry\:ruined_spell_book.name=Ruined Spell Book
item.ebwizardry\:ruined_spell_book.desc=The pages of this tattered spell book are too damaged to be read properly, but somehow, you feel there is still magic left within it - if only it could be restored... item.ebwizardry\:ruined_spell_book.desc=The pages of this tattered spell book are too damaged to be read properly, but somehow, you feel there is still magic left within it - if only it could be restored...
item.ebwizardry\:arcane_tome.name=Tome of Arcana item.ebwizardry\:arcane_tome_apprentice.name=Tome of Arcana
item.ebwizardry\:arcane_tome_advanced.name=Tome of Arcana
item.ebwizardry\:arcane_tome_master.name=Tome of Arcana
item.ebwizardry\:arcane_tome.desc=Upgrades any %1$s wand with sufficient progression to %2$s tier item.ebwizardry\:arcane_tome.desc=Upgrades any %1$s wand with sufficient progression to %2$s tier
item.ebwizardry\:wizard_handbook.name=The Wizard's Handbook item.ebwizardry\:wizard_handbook.name=The Wizard's Handbook
@@ -216,6 +230,13 @@ item.ebwizardry\:ethereal_crystalweave.desc_extended=An enchanted fabric that is
item.ebwizardry\:magic_silk.name=Magical Silk item.ebwizardry\:magic_silk.name=Magical Silk
item.ebwizardry\:spectral_dust.name=Spectral Dust item.ebwizardry\:spectral_dust.name=Spectral Dust
item.ebwizardry\:spectral_dust_earth.name=Spectral Dust
item.ebwizardry\:spectral_dust_fire.name=Spectral Dust
item.ebwizardry\:spectral_dust_healing.name=Spectral Dust
item.ebwizardry\:spectral_dust_ice.name=Spectral Dust
item.ebwizardry\:spectral_dust_lightning.name=Spectral Dust
item.ebwizardry\:spectral_dust_necromancy.name=Spectral Dust
item.ebwizardry\:spectral_dust_sorcery.name=Spectral Dust
item.ebwizardry\:wizard_armour.element_cost_reduction=-%1$s%% %2$s cost item.ebwizardry\:wizard_armour.element_cost_reduction=-%1$s%% %2$s cost
item.ebwizardry\:wizard_armour.cooldown_reduction=-%1$s%% Cooldown item.ebwizardry\:wizard_armour.cooldown_reduction=-%1$s%% Cooldown
@@ -403,10 +424,6 @@ item.ebwizardry\:generic.disabled=This item has been disabled in the config
item.ebwizardry\:ring.generic.desc=Equip this ring in the Baubles inventory or by placing it on your hotbar. Up to 2 rings may be equipped at once. item.ebwizardry\:ring.generic.desc=Equip this ring in the Baubles inventory or by placing it on your hotbar. Up to 2 rings may be equipped at once.
item.ebwizardry\:amulet.generic.desc=Equip this amulet in the Baubles inventory or by placing it on your hotbar. Only one amulet may be equipped at a time. item.ebwizardry\:amulet.generic.desc=Equip this amulet in the Baubles inventory or by placing it on your hotbar. Only one amulet may be equipped at a time.
item.ebwizardry\:charm.generic.desc=Equip this charm in the Baubles inventory or by placing it on your hotbar. Only one charm may be equipped at a time. item.ebwizardry\:charm.generic.desc=Equip this charm in the Baubles inventory or by placing it on your hotbar. Only one charm may be equipped at a time.
item.ebwizardry\:belt.generic.desc=Equip this belt in the Baubles inventory or by placing it on your hotbar. Only one belt may be equipped at a time.
item.ebwizardry\:body.generic.desc=Equip this body item in the Baubles inventory or by placing it on your hotbar. Only one body item may be equipped at a time.
item.ebwizardry\:trinket.generic.desc=Equip this trinket in the Baubles inventory or by placing it on your hotbar. Only one trinklet may be equipped at a time.
item.ebwizardry\:head.generic.desc=Equip this headgear in the Baubles inventory or by placing it on your hotbar. Only one headgear may be equipped at a time.
item.ebwizardry\:ring_condensing.name=Ring of Condensing item.ebwizardry\:ring_condensing.name=Ring of Condensing
item.ebwizardry\:ring_condensing.desc=Slowly regenerates mana for all wands on your hotbar item.ebwizardry\:ring_condensing.desc=Slowly regenerates mana for all wands on your hotbar
@@ -882,7 +899,6 @@ container.ebwizardry\:arcane_workbench.sort_tier=Sort by Tier
container.ebwizardry\:arcane_workbench.sort_element=Sort by Element container.ebwizardry\:arcane_workbench.sort_element=Sort by Element
container.ebwizardry\:arcane_workbench.sort_alphabetical=Sort Alphabetically container.ebwizardry\:arcane_workbench.sort_alphabetical=Sort Alphabetically
container.ebwizardry\:arcane_workbench.search_tooltip=%1$sSearch Tips\n\ntier=%2$s, %1$st=%2$s: match tiers\n%1$selement=%2$s, %1$se=%2$s: match elements\n%1$stype=%2$s, %1$sp=%2$s: match spell types\n%1$sdiscovered=true/false%2$s, %1$sd=t/f%2$s: include only (un)discovered\n%1$smodid=%2$s, %1$sm=%2$s: match mod IDs\n\nSeparate multiple values with %1$s,%2$s\nSeparate multiple criteria with %1$s; container.ebwizardry\:arcane_workbench.search_tooltip=%1$sSearch Tips\n\ntier=%2$s, %1$st=%2$s: match tiers\n%1$selement=%2$s, %1$se=%2$s: match elements\n%1$stype=%2$s, %1$sp=%2$s: match spell types\n%1$sdiscovered=true/false%2$s, %1$sd=t/f%2$s: include only (un)discovered\n%1$smodid=%2$s, %1$sm=%2$s: match mod IDs\n\nSeparate multiple values with %1$s,%2$s\nSeparate multiple criteria with %1$s;
container.ebwizardry\:arcane_workbench.clear=Clear Spell Slots
container.ebwizardry\:bookshelf=Bookshelf container.ebwizardry\:bookshelf=Bookshelf
@@ -1371,7 +1387,6 @@ forfeit.ebwizardry\:bury_self=The ground collapses beneath you!
forfeit.ebwizardry\:spill_inventory=Your items spill themselves everywhere! forfeit.ebwizardry\:spill_inventory=Your items spill themselves everywhere!
forfeit.ebwizardry\:teleport_self=You are instantly teleported somewhere! forfeit.ebwizardry\:teleport_self=You are instantly teleported somewhere!
forfeit.ebwizardry\:teleport_self_large_distance=You are instantly teleported somewhere far away!
forfeit.ebwizardry\:levitate_self=You begin to float upwards helplessly! forfeit.ebwizardry\:levitate_self=You begin to float upwards helplessly!
forfeit.ebwizardry\:vex_horde=A horde of vexes materializes around you! forfeit.ebwizardry\:vex_horde=A horde of vexes materializes around you!
forfeit.ebwizardry\:black_hole=A swirling vortex appears in front of you! forfeit.ebwizardry\:black_hole=A swirling vortex appears in front of you!
@@ -1448,25 +1463,6 @@ key.ebwizardry.spell_8=Spell Slot 8
death.attack.wizardry_magic=%1$s was killed by %2$s using magic death.attack.wizardry_magic=%1$s was killed by %2$s using magic
death.attack.indirect_wizardry_magic=%1$s was killed by %2$s using magic death.attack.indirect_wizardry_magic=%1$s was killed by %2$s using magic
death.attack.magic_wizardry_magic=%1$s was killed by %2$s using magic
death.attack.magic_indirect_wizardry_magic=%1$s was killed by %2$s using magic
death.attack.fire_wizardry_magic=%1$s was killed by %2$s using fire magic
death.attack.fire_indirect_wizardry_magic=%1$s was killed by %2$s using fire magic
death.attack.frost_wizardry_magic=%1$s was killed by %2$s using frost magic
death.attack.frost_indirect_wizardry_magic=%1$s was killed by %2$s using frost magic
death.attack.shock_wizardry_magic=%1$s was killed by %2$s using a shock magic
death.attack.shock_indirect_wizardry_magic=%1$s was killed by %2$s using shock magic
death.attack.wither_wizardry_magic=%1$s was killed by %2$s using withering magic
death.attack.wither_indirect_wizardry_magic=%1$s was killed by %2$s withering magic
death.attack.poison_wizardry_magic=%1$s was killed by %2$s using poison magic
death.attack.poison_indirect_wizardry_magic=%1$s was killed by %2$s poison magic
death.attack.force_wizardry_magic=%1$s was killed by %2$s using a magical force
death.attack.force_indirect_wizardry_magic=%1$s was killed by %2$s using magical force
death.attack.blast_wizardry_magic=%1$s was killed by %2$s using a magical blast
death.attack.blast_indirect_wizardry_magic=%1$s was killed by %2$s using magical blast
death.attack.radiant_wizardry_magic=%1$s was killed by %2$s using radiant magic
death.attack.radiant_indirect_wizardry_magic=%1$s was killed by %2$s using radiant magic
soundCategory.ebwizardry_spells=Spells soundCategory.ebwizardry_spells=Spells
@@ -1535,12 +1531,6 @@ config.ebwizardry.player_block_damage.true=Yes - kaboom!
config.ebwizardry.player_block_damage.false=No - activate anti-grief (TM) config.ebwizardry.player_block_damage.false=No - activate anti-grief (TM)
config.ebwizardry.dispenser_block_damage=Dispenser Block Damage config.ebwizardry.dispenser_block_damage=Dispenser Block Damage
config.ebwizardry.dispenser_block_damage.tooltip=Whether spells cast by dispensers can destroy blocks in the world. Wizardry makes every attempt to respect protection mods and plugins, but cannot guarantee it will work in all cases for every mod. If you need absolutely watertight anti-grief, disable this setting. config.ebwizardry.dispenser_block_damage.tooltip=Whether spells cast by dispensers can destroy blocks in the world. Wizardry makes every attempt to respect protection mods and plugins, but cannot guarantee it will work in all cases for every mod. If you need absolutely watertight anti-grief, disable this setting.
config.ebwizardry.damage_type_per_element=Damage Type Per Element
config.ebwizardry.damage_type_per_element.tooltip=Whether damage should be registered with the old system (wizardry_magic/indirect_wizardry_magic) prefixed damage with the elements like necromancy_indirect_wizardry_magic, necromancy_wizardry_magic. This is disabled by default to not break existing modpacks. The intention of this setting is to allow differentiating various damage types for e.g. the Distinct Damage Descriptions mod
config.ebwizardry.single_use_spell_books=Spell Books Are Consumed By Wands
config.ebwizardry.single_use_spell_books.tooltip=Whether spell books are consumed when they are bound to a wand.
config.ebwizardry.prevent_binding_same_spell_twice_to_wands=Prevent Binding The Same Spell To A Wand Multiple Times
config.ebwizardry.prevent_binding_same_spell_twice_to_wands.tooltip=Whether to prevent binding the same spell to a wand multiple times
config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament
config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Disable to prevent stealing of items. config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Disable to prevent stealing of items.
config.ebwizardry.telekinetic_disarmament.true=Yes - let people steal things config.ebwizardry.telekinetic_disarmament.true=Yes - let people steal things
@@ -1561,20 +1551,6 @@ config.ebwizardry.slow_time_affects_players=Slow Time Affects Players
config.ebwizardry.slow_time_affects_players.tooltip=Whether players are slowed when another nearby player uses the slow time spell. If this is disabled, mobs and projectiles will still be affected but players will move at normal speed. config.ebwizardry.slow_time_affects_players.tooltip=Whether players are slowed when another nearby player uses the slow time spell. If this is disabled, mobs and projectiles will still be affected but players will move at normal speed.
config.ebwizardry.bonemeal_grows_crystal_flowers=Bonemeal Grows Crystal Flowers config.ebwizardry.bonemeal_grows_crystal_flowers=Bonemeal Grows Crystal Flowers
config.ebwizardry.bonemeal_grows_crystal_flowers.tooltip=Whether using bonemeal on grass blocks has a chance to grow crystal flowers. config.ebwizardry.bonemeal_grows_crystal_flowers.tooltip=Whether using bonemeal on grass blocks has a chance to grow crystal flowers.
config.ebwizardry.wands_must_be_held_to_decrement_cooldown=Wands Must Be Held To Decrement Cooldown
config.ebwizardry.wands_must_be_held_to_decrement_cooldown.tooltip=Whether wands only decrement their cooldowns if a player holds them.
config.ebwizardry.cooldown_reduction_per_level=Cooldown Reduction Per Level
config.ebwizardry.cooldown_reduction_per_level.tooltip=The fraction by which cooldowns are reduced for each level of cooldown upgrade.
config.ebwizardry.potency_increase_per_tier=Potency Increase Per Tier
config.ebwizardry.potency_increase_per_tier.tooltip=The fraction by which potency is increased for each tier of matching wand. May cause extreme lag with high values!
config.ebwizardry.duration_increase_per_level=Duration Increase Per Level
config.ebwizardry.duration_increase_per_level.tooltip=The fraction by which spell duration is increased for each level of duration upgrade.
config.ebwizardry.range_increase_per_level=Range Increase Per Level
config.ebwizardry.range_increase_per_level.tooltip=The fraction by which spell range is increased for each level of range upgrade. May cause extreme lag with high values!
config.ebwizardry.blast_increase_per_level=Blast Increase Per Level
config.ebwizardry.blast_increase_per_level.tooltip=The fraction by which spell blast is increased for each level of blast upgrade. May cause extreme lag with high values!
config.ebwizardry.frost_slowness_increase_per_level=Frost Slowness Increase Per Level
config.ebwizardry.frost_slowness_increase_per_level.tooltip=The fraction by which movement speed is reduced per level of frost effect.
config.ebwizardry.category.difficulty=Difficulty Settings config.ebwizardry.category.difficulty=Difficulty Settings
config.ebwizardry.category.difficulty.tooltip=Configure wizardry's difficulty config.ebwizardry.category.difficulty.tooltip=Configure wizardry's difficulty
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=La position %s, %s, %s a été ma
tile.ebwizardry\:transportation_stone.forget=La position %s, %s, %s a été effacée dans la dimension %s tile.ebwizardry\:transportation_stone.forget=La position %s, %s, %s a été effacée dans la dimension %s
tile.ebwizardry\:transportation_stone.invalid=Vous devez d'abord créer un cercle avec 8 pierres de téléportation! tile.ebwizardry\:transportation_stone.invalid=Vous devez d'abord créer un cercle avec 8 pierres de téléportation!
tile.ebwizardry\:spectral_block.name=Bloc spectral tile.ebwizardry\:spectral_block.name=Bloc spectral
tile.ebwizardry\:runestone.name=Pierre runique tile.ebwizardry\:fire_runestone.name=Pierre runique
tile.ebwizardry\:runestone_pedestal.name=Piédestal runique tile.ebwizardry\:ice_runestone.name=Pierre runique
tile.ebwizardry\:lightning_runestone.name=Pierre runique
tile.ebwizardry\:necromancy_runestone.name=Pierre runique
tile.ebwizardry\:earth_runestone.name=Pierre runique
tile.ebwizardry\:healing_runestone.name=Pierre runique
tile.ebwizardry\:sorcery_runestone.name=Pierre runique
tile.ebwizardry\:fire_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:ice_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:lightning_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:necromancy_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:earth_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:healing_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:sorcery_runestone_pedestal.name=Piédestal runique
tile.ebwizardry\:thorns.name=Épines tile.ebwizardry\:thorns.name=Épines
tile.ebwizardry\:obsidian_crust.name=Croûte d'obsidienne tile.ebwizardry\:obsidian_crust.name=Croûte d'obsidienne
tile.ebwizardry\:dry_frosted_ice.name=Glace dépolie tile.ebwizardry\:dry_frosted_ice.name=Glace dépolie
@@ -52,22 +64,22 @@ tile.ebwizardry\:dark_oak_lectern.name=Lutrin de chêne noir
tile.ebwizardry\:receptacle.name=Receptacle tile.ebwizardry\:receptacle.name=Receptacle
tile.ebwizardry\:imbuement_altar.name=Autel d'infusion tile.ebwizardry\:imbuement_altar.name=Autel d'infusion
item.ebwizardry\:crystal_magic.name=Cristal magique item.ebwizardry\:magic_crystal.name=Cristal magique
item.ebwizardry\:crystal_magic.desc=Les couleurs iridescentes du cristal tourbillonnent doucement, révélant sa magie. Il y a sûrement un moyen de l'utiliser... item.ebwizardry\:magic_crystal.desc=Les couleurs iridescentes du cristal tourbillonnent doucement, révélant sa magie. Il y a sûrement un moyen de l'utiliser...
item.ebwizardry\:crystal_fire.name=Cristal embrasé item.ebwizardry\:fire_crystal.name=Cristal embrasé
item.ebwizardry\:crystal_fire.desc=Un cristal brillant d'un orange chatoyant. C'est sûrement la clef pour déverrouiller l'élément du feu... item.ebwizardry\:fire_crystal.desc=Un cristal brillant d'un orange chatoyant. C'est sûrement la clef pour déverrouiller l'élément du feu...
item.ebwizardry\:crystal_ice.name=Cristal gelé item.ebwizardry\:ice_crystal.name=Cristal gelé
item.ebwizardry\:crystal_ice.desc=Un cristal teinté d'un bleu glacial. Il renferme sûrement les secrets du froid... item.ebwizardry\:ice_crystal.desc=Un cristal teinté d'un bleu glacial. Il renferme sûrement les secrets du froid...
item.ebwizardry\:crystal_lightning.name=Cristal foudroyant item.ebwizardry\:lightning_crystal.name=Cristal foudroyant
item.ebwizardry\:crystal_lightning.desc=Un cristal vibrant d'une énergie chaotique. Il cache probablement un pouvoir grandiose... item.ebwizardry\:lightning_crystal.desc=Un cristal vibrant d'une énergie chaotique. Il cache probablement un pouvoir grandiose...
item.ebwizardry\:crystal_necromancy.name=Cristal ténébreux item.ebwizardry\:necromancy_crystal.name=Cristal ténébreux
item.ebwizardry\:crystal_necromancy.desc=Un cristal sombre et violacé. Il s'agit sûrement d'une clef pour un sombre pouvoir... item.ebwizardry\:necromancy_crystal.desc=Un cristal sombre et violacé. Il s'agit sûrement d'une clef pour un sombre pouvoir...
item.ebwizardry\:crystal_earth.name=Cristal verdoyant item.ebwizardry\:earth_crystal.name=Cristal verdoyant
item.ebwizardry\:crystal_earth.desc=Un cristal empreint de filaments verdoyants. Il doit sûrement contenir les pouvoirs de la nature... item.ebwizardry\:earth_crystal.desc=Un cristal empreint de filaments verdoyants. Il doit sûrement contenir les pouvoirs de la nature...
item.ebwizardry\:crystal_sorcery.name=Cristal mystique item.ebwizardry\:sorcery_crystal.name=Cristal mystique
item.ebwizardry\:crystal_sorcery.desc=Un cristal luisant d'un vert bleuté. Il semble recéler une magie antique... item.ebwizardry\:sorcery_crystal.desc=Un cristal luisant d'un vert bleuté. Il semble recéler une magie antique...
item.ebwizardry\:crystal_healing.name=Cristal rayonnant item.ebwizardry\:healing_crystal.name=Cristal rayonnant
item.ebwizardry\:crystal_healing.desc=Un cristal au rayonnement doré. Il doit être lié à un pouvoir divin... item.ebwizardry\:healing_crystal.desc=Un cristal au rayonnement doré. Il doit être lié à un pouvoir divin...
item.ebwizardry\:spell_book.name=Livre de sorts item.ebwizardry\:spell_book.name=Livre de sorts
item.ebwizardry\:spell_book.desc=Un livre rempli de glyphes et de runes antiques. Avec de l'agnégation, il devrait être possible de le décrypter...\n\nClic droit en tenant le livre pour le lire. item.ebwizardry\:spell_book.desc=Un livre rempli de glyphes et de runes antiques. Avec de l'agnégation, il devrait être possible de le décrypter...\n\nClic droit en tenant le livre pour le lire.
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=egjegyezve a hely: %s, %s, %s, %s
tile.ebwizardry\:transportation_stone.forget=Elfelejtve a hely: %s, %s, %s, %s dimenzióban tile.ebwizardry\:transportation_stone.forget=Elfelejtve a hely: %s, %s, %s, %s dimenzióban
tile.ebwizardry\:transportation_stone.invalid=Előbb egy kört kell építened 8 Transzportáció Kövéből! tile.ebwizardry\:transportation_stone.invalid=Előbb egy kört kell építened 8 Transzportáció Kövéből!
tile.ebwizardry\:spectral_block.name=Spektrálblokk tile.ebwizardry\:spectral_block.name=Spektrálblokk
tile.ebwizardry\:runestone.name=Rúnakő tile.ebwizardry\:fire_runestone.name=Rúnakő
tile.ebwizardry\:runestone_pedestal.name=Rúnakő Pedesztál tile.ebwizardry\:ice_runestone.name=Rúnakő
tile.ebwizardry\:lightning_runestone.name=Rúnakő
tile.ebwizardry\:necromancy_runestone.name=Rúnakő
tile.ebwizardry\:earth_runestone.name=Rúnakő
tile.ebwizardry\:healing_runestone.name=Rúnakő
tile.ebwizardry\:sorcery_runestone.name=Rúnakő
tile.ebwizardry\:fire_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:ice_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:lightning_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:necromancy_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:earth_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:healing_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:sorcery_runestone_pedestal.name=Rúnakő Pedesztál
tile.ebwizardry\:thorns.name=Tövisek tile.ebwizardry\:thorns.name=Tövisek
tile.ebwizardry\:obsidian_crust.name=Obszidián Kéreg tile.ebwizardry\:obsidian_crust.name=Obszidián Kéreg
tile.ebwizardry\:dry_frosted_ice.name=Száraz Fagyott Jég tile.ebwizardry\:dry_frosted_ice.name=Száraz Fagyott Jég
@@ -52,22 +64,22 @@ tile.ebwizardry\:dark_oak_lectern.name=Sötéttölgy Olvasóállvány
tile.ebwizardry\:receptacle.name=Receptákulum tile.ebwizardry\:receptacle.name=Receptákulum
tile.ebwizardry\:imbuement_altar.name=Oltár tile.ebwizardry\:imbuement_altar.name=Oltár
item.ebwizardry\:crystal_magic.name=Varázskristály item.ebwizardry\:magic_crystal.name=Varázskristály
item.ebwizardry\:crystal_magic.desc=A kristály belsejében lassan kavargó, irizáló színek mágikus energiáról tanúskodnak. Ezt az energiát ha ki lehetne nyerni, valahogy... item.ebwizardry\:magic_crystal.desc=A kristály belsejében lassan kavargó, irizáló színek mágikus energiáról tanúskodnak. Ezt az energiát ha ki lehetne nyerni, valahogy...
item.ebwizardry\:crystal_fire.name=Tüzes Kristály item.ebwizardry\:fire_crystal.name=Tüzes Kristály
item.ebwizardry\:crystal_fire.desc=Tüzes narancsszínnel izzó kristály. Ez lehet a kulcs a tűz elem titkainak feltárásához... item.ebwizardry\:fire_crystal.desc=Tüzes narancsszínnel izzó kristály. Ez lehet a kulcs a tűz elem titkainak feltárásához...
item.ebwizardry\:crystal_ice.name=Jeges Kristály item.ebwizardry\:ice_crystal.name=Jeges Kristály
item.ebwizardry\:crystal_ice.desc=Hideg, kékes árnyalatú kristály. A fagy erejének titkait rejtheti... item.ebwizardry\:ice_crystal.desc=Hideg, kékes árnyalatú kristály. A fagy erejének titkait rejtheti...
item.ebwizardry\:crystal_lightning.name=Viharos Kristály item.ebwizardry\:lightning_crystal.name=Viharos Kristály
item.ebwizardry\:crystal_lightning.desc=Gomolygó és kaotikus energiával villogó kristály. Hatalmas erőt rejthet magában... item.ebwizardry\:lightning_crystal.desc=Gomolygó és kaotikus energiával villogó kristály. Hatalmas erőt rejthet magában...
item.ebwizardry\:crystal_necromancy.name=Sötét Kristály item.ebwizardry\:necromancy_crystal.name=Sötét Kristály
item.ebwizardry\:crystal_necromancy.desc=Mélységes lila kristály, mely ha ránézel szinte magába szippant. Valami még sötétebb kapuja lehet... item.ebwizardry\:necromancy_crystal.desc=Mélységes lila kristály, mely ha ránézel szinte magába szippant. Valami még sötétebb kapuja lehet...
item.ebwizardry\:crystal_earth.name=Viruló Kristály item.ebwizardry\:earth_crystal.name=Viruló Kristály
item.ebwizardry\:crystal_earth.desc=Zöld és barna temérdek árnyalatával mintázott kristály. Kapcsolata lehet a természet erőivel... item.ebwizardry\:earth_crystal.desc=Zöld és barna temérdek árnyalatával mintázott kristály. Kapcsolata lehet a természet erőivel...
item.ebwizardry\:crystal_sorcery.name=Misztikus Kristály item.ebwizardry\:sorcery_crystal.name=Misztikus Kristály
item.ebwizardry\:crystal_sorcery.desc=Kékeszöld fénnyel csillogó kristály. Ősi erők titkait rejtheti magában... item.ebwizardry\:sorcery_crystal.desc=Kékeszöld fénnyel csillogó kristály. Ősi erők titkait rejtheti magában...
item.ebwizardry\:crystal_healing.name=Sugárzó Kristály item.ebwizardry\:healing_crystal.name=Sugárzó Kristály
item.ebwizardry\:crystal_healing.desc=A napsugárban aranyszín sárgán megcsillanó kristály. Tán isteni hatalomhoz rejt kapcsot... item.ebwizardry\:healing_crystal.desc=A napsugárban aranyszín sárgán megcsillanó kristály. Tán isteni hatalomhoz rejt kapcsot...
item.ebwizardry\:spell_book.name=Varázskönyv item.ebwizardry\:spell_book.name=Varázskönyv
item.ebwizardry\:spell_book.desc=Egy könyv, egy ősi nyelv rúnáival és szimbólumaival tele. Elegendő eltökéltséggel talán meg lehetne fejteni tartalmát...\n\nJobb-kattintással nyisd meg a könyvet, hogy elolvashasd. item.ebwizardry\:spell_book.desc=Egy könyv, egy ősi nyelv rúnáival és szimbólumaival tele. Elegendő eltökéltséggel talán meg lehetne fejteni tartalmát...\n\nJobb-kattintással nyisd meg a könyvet, hogy elolvashasd.
File diff suppressed because it is too large Load Diff
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=Zapamiętano lokalizację %s, %s,
tile.ebwizardry\:transportation_stone.forget=Zapomniano lokalizację %s, %s, %s w wymiarze %s tile.ebwizardry\:transportation_stone.forget=Zapomniano lokalizację %s, %s, %s w wymiarze %s
tile.ebwizardry\:transportation_stone.invalid=Najpierw musisz zrobić krąg z 8 kamieniami transportu! tile.ebwizardry\:transportation_stone.invalid=Najpierw musisz zrobić krąg z 8 kamieniami transportu!
tile.ebwizardry\:spectral_block.name=Blok Spektralny tile.ebwizardry\:spectral_block.name=Blok Spektralny
tile.ebwizardry\:runestone.name=KamieĹ„ Runiczny tile.ebwizardry\:fire_runestone.name=Kamień Runiczny
tile.ebwizardry\:runestone_pedestal.name=Pilar Runicznego Kamienia tile.ebwizardry\:ice_runestone.name=Kamień Runiczny
tile.ebwizardry\:lightning_runestone.name=Kamień Runiczny
tile.ebwizardry\:necromancy_runestone.name=Kamień Runiczny
tile.ebwizardry\:earth_runestone.name=Kamień Runiczny
tile.ebwizardry\:healing_runestone.name=Kamień Runiczny
tile.ebwizardry\:sorcery_runestone.name=Kamień Runiczny
tile.ebwizardry\:fire_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:ice_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:lightning_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:necromancy_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:earth_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:healing_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:sorcery_runestone_pedestal.name=Pilar Runicznego Kamienia
tile.ebwizardry\:thorns.name=Ciernie tile.ebwizardry\:thorns.name=Ciernie
tile.ebwizardry\:obsidian_crust.name=Obsydianowa Skorupa tile.ebwizardry\:obsidian_crust.name=Obsydianowa Skorupa
tile.ebwizardry\:dry_frosted_ice.name=Zaschły Lód tile.ebwizardry\:dry_frosted_ice.name=Zaschły Lód
@@ -55,14 +67,14 @@ tile.ebwizardry\:imbuement_altar.name=Nasycony Ołtarz
item.ebwizardry\:crystal_magic.name=Magiczny KrysztaĹ‚ item.ebwizardry\:magic_crystal.name=Magiczny Kryształ
item.ebwizardry\:crystal_fire.name=Ognisty KrysztaĹ‚ item.ebwizardry\:fire_crystal.name=Ognisty Kryształ
item.ebwizardry\:crystal_ice.name=Lodowy KrysztaĹ‚ item.ebwizardry\:ice_crystal.name=Lodowy Kryształ
item.ebwizardry\:crystal_lightning.name=Sztormowy KrysztaĹ‚ item.ebwizardry\:lightning_crystal.name=Sztormowy Kryształ
item.ebwizardry\:crystal_necromancy.name=Mroczny KrysztaĹ‚ item.ebwizardry\:necromancy_crystal.name=Mroczny Kryształ
item.ebwizardry\:crystal_earth.name=Zielny KrysztaĹ‚ item.ebwizardry\:earth_crystal.name=Zielny Kryształ
item.ebwizardry\:crystal_sorcery.name=Mistyczny KrysztaĹ‚ item.ebwizardry\:sorcery_crystal.name=Mistyczny Kryształ
item.ebwizardry\:crystal_healing.name=Promienisty KrysztaĹ‚ item.ebwizardry\:healing_crystal.name=Promienisty Kryształ
item.ebwizardry\:magic_wand.name=Magiczna Różdżka item.ebwizardry\:magic_wand.name=Magiczna Różdżka
item.ebwizardry\:apprentice_wand.name=Uczniowska Różdżka item.ebwizardry\:apprentice_wand.name=Uczniowska Różdżka
@@ -454,7 +466,7 @@ entity.ebwizardry\:skeleton_minion.name=Szkielet
entity.ebwizardry\:stray_minion.name=Tułacz entity.ebwizardry\:stray_minion.name=Tułacz
entity.ebwizardry\:spider_minion.name=Pająk entity.ebwizardry\:spider_minion.name=Pająk
entity.ebwizardry\:blaze_minion.name=Płomyk entity.ebwizardry\:blaze_minion.name=Płomyk
entity.ebwizardry\:wither_skeleton_minion.name=Obumarły Szkielet entity.ebwizardry\:wither_skeleton_minion.name=Obumary Szkielet
entity.ebwizardry\:ice_wraith.name=Sługa Lodu entity.ebwizardry\:ice_wraith.name=Sługa Lodu
entity.ebwizardry\:lightning_wraith.name=Sługa Piorunów entity.ebwizardry\:lightning_wraith.name=Sługa Piorunów
entity.ebwizardry\:shadow_wraith.name=Sługa Cienia entity.ebwizardry\:shadow_wraith.name=Sługa Cienia
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=Запомнил местопол
tile.ebwizardry\:transportation_stone.forget=Забыл местоположение %s, %s, %s в измерении %s tile.ebwizardry\:transportation_stone.forget=Забыл местоположение %s, %s, %s в измерении %s
tile.ebwizardry\:transportation_stone.invalid=Первое, что Вы должны сделать, это круг с 8-ю камнями перемещения! tile.ebwizardry\:transportation_stone.invalid=Первое, что Вы должны сделать, это круг с 8-ю камнями перемещения!
tile.ebwizardry\:spectral_block.name=Спектральный блок tile.ebwizardry\:spectral_block.name=Спектральный блок
tile.ebwizardry\:runestone.name=Рунный камень tile.ebwizardry\:fire_runestone.name=Рунный камень
tile.ebwizardry\:runestone_pedestal.name=Пьедестал из рунного камня tile.ebwizardry\:ice_runestone.name=Рунный камень
tile.ebwizardry\:lightning_runestone.name=Рунный камень
tile.ebwizardry\:necromancy_runestone.name=Рунный камень
tile.ebwizardry\:earth_runestone.name=Рунный камень
tile.ebwizardry\:healing_runestone.name=Рунный камень
tile.ebwizardry\:sorcery_runestone.name=Рунный камень
tile.ebwizardry\:fire_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:ice_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:lightning_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:necromancy_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:earth_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:healing_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:sorcery_runestone_pedestal.name=Пьедестал из рунного камня
tile.ebwizardry\:thorns.name=Шипы tile.ebwizardry\:thorns.name=Шипы
tile.ebwizardry\:obsidian_crust.name=Обсидиановая кора tile.ebwizardry\:obsidian_crust.name=Обсидиановая кора
tile.ebwizardry\:dry_frosted_ice.name=Сухой матовый лёд tile.ebwizardry\:dry_frosted_ice.name=Сухой матовый лёд
@@ -52,22 +64,22 @@ tile.ebwizardry\:dark_oak_lectern.name=Кафедра из тёмного дуб
tile.ebwizardry\:receptacle.name=Вместилище tile.ebwizardry\:receptacle.name=Вместилище
tile.ebwizardry\:imbuement_altar.name=Алтарь наполнения tile.ebwizardry\:imbuement_altar.name=Алтарь наполнения
item.ebwizardry\:crystal_magic.name=Волшебный кристалл item.ebwizardry\:magic_crystal.name=Волшебный кристалл
item.ebwizardry\:crystal_magic.desc=Переливающиеся цвета этого кристалла, кажется, медленно меняются и кружатся, намекая на волшебную энергию внутри. Возможно, эту магию можно задействовать, как-нибудь... item.ebwizardry\:magic_crystal.desc=Переливающиеся цвета этого кристалла, кажется, медленно меняются и кружатся, намекая на волшебную энергию внутри. Возможно, эту магию можно задействовать, как-нибудь...
item.ebwizardry\:crystal_fire.name=Огненный кристалл item.ebwizardry\:fire_crystal.name=Огненный кристалл
item.ebwizardry\:crystal_fire.desc=Кристалл, который светится оранжево-огненным цветом. Возможно, он - ключ к разблокировки элемента огня... item.ebwizardry\:fire_crystal.desc=Кристалл, который светится оранжево-огненным цветом. Возможно, он - ключ к разблокировки элемента огня...
item.ebwizardry\:crystal_ice.name=Ледяной кристалл item.ebwizardry\:ice_crystal.name=Ледяной кристалл
item.ebwizardry\:crystal_ice.desc=Кристалл с холодным, синим оттенком. Вероятно, он хранит в себе тайны силы мороза... item.ebwizardry\:ice_crystal.desc=Кристалл с холодным, синим оттенком. Вероятно, он хранит в себе тайны силы мороза...
item.ebwizardry\:crystal_lightning.name=Грозовой кристалл item.ebwizardry\:lightning_crystal.name=Грозовой кристалл
item.ebwizardry\:crystal_lightning.desc=Кристалл, который, кажется, вращается и вспыхивает с хаотической энергией. Может быть, он скрывает большую силу внутри... item.ebwizardry\:lightning_crystal.desc=Кристалл, который, кажется, вращается и вспыхивает с хаотической энергией. Может быть, он скрывает большую силу внутри...
item.ebwizardry\:crystal_necromancy.name=Тёмный кристалл item.ebwizardry\:necromancy_crystal.name=Тёмный кристалл
item.ebwizardry\:crystal_necromancy.desc=Кристалл с глубоким, пурпурным внешним видом, который, по-видимому, привлекает Вас. Вероятно, это врата к чему-то более тёмному... item.ebwizardry\:necromancy_crystal.desc=Кристалл с глубоким, пурпурным внешним видом, который, по-видимому, привлекает Вас. Вероятно, это врата к чему-то более тёмному...
item.ebwizardry\:crystal_earth.name=Зелёный кристалл item.ebwizardry\:earth_crystal.name=Зелёный кристалл
item.ebwizardry\:crystal_earth.desc=Узорчатый кристалл, со множеством оттенками зелёного и коричневого. Возможно, он держит связь с силами природы... item.ebwizardry\:earth_crystal.desc=Узорчатый кристалл, со множеством оттенками зелёного и коричневого. Возможно, он держит связь с силами природы...
item.ebwizardry\:crystal_sorcery.name=Мистический кристалл item.ebwizardry\:sorcery_crystal.name=Мистический кристалл
item.ebwizardry\:crystal_sorcery.desc=Кристалл, который мерцает голубовато-зелёным светом. Возможно, он таит в себе тайны древней силы... item.ebwizardry\:sorcery_crystal.desc=Кристалл, который мерцает голубовато-зелёным светом. Возможно, он таит в себе тайны древней силы...
item.ebwizardry\:crystal_healing.name=Сияющий кристалл item.ebwizardry\:healing_crystal.name=Сияющий кристалл
item.ebwizardry\:crystal_healing.desc=Кристалл, который блестит золотистым жёлтым светом в дневном свете. Наверное, он владеет связь с божественной силой... item.ebwizardry\:healing_crystal.desc=Кристалл, который блестит золотистым жёлтым светом в дневном свете. Наверное, он владеет связь с божественной силой...
item.ebwizardry\:spell_book.name=Книга с заклинанием item.ebwizardry\:spell_book.name=Книга с заклинанием
item.ebwizardry\:spell_book.desc=Книга наполненная рунами и символами древней рукописи. Возможно, с самоотверженностью можно расшифровать её содержание...\n\nНажмите пкм, пока держите эту книгу, чтобы прочитать её. item.ebwizardry\:spell_book.desc=Книга наполненная рунами и символами древней рукописи. Возможно, с самоотверженностью можно расшифровать её содержание...\n\nНажмите пкм, пока держите эту книгу, чтобы прочитать её.
@@ -11,8 +11,20 @@ tile.ebwizardry\:transportation_stone.remember=你记住了位于 %4$s 维度 %1
tile.ebwizardry\:transportation_stone.forget=你遗忘了位于 %4$s 维度 %1$s%2$s%3$s的传送坐标 tile.ebwizardry\:transportation_stone.forget=你遗忘了位于 %4$s 维度 %1$s%2$s%3$s的传送坐标
tile.ebwizardry\:transportation_stone.invalid=你必须用8个传送石围成一个圈! tile.ebwizardry\:transportation_stone.invalid=你必须用8个传送石围成一个圈!
tile.ebwizardry\:spectral_block.name=幽冥方块 tile.ebwizardry\:spectral_block.name=幽冥方块
tile.ebwizardry\:runestone.name=符石 tile.ebwizardry\:fire_runestone.name=符石
tile.ebwizardry\:runestone_pedestal.name=符石基座 tile.ebwizardry\:ice_runestone.name=符石
tile.ebwizardry\:lightning_runestone.name=符石
tile.ebwizardry\:necromancy_runestone.name=符石
tile.ebwizardry\:earth_runestone.name=符石
tile.ebwizardry\:healing_runestone.name=符石
tile.ebwizardry\:sorcery_runestone.name=符石
tile.ebwizardry\:fire_runestone_pedestal.name=符石基座
tile.ebwizardry\:ice_runestone_pedestal.name=符石基座
tile.ebwizardry\:lightning_runestone_pedestal.name=符石基座
tile.ebwizardry\:necromancy_runestone_pedestal.name=符石基座
tile.ebwizardry\:earth_runestone_pedestal.name=符石基座
tile.ebwizardry\:healing_runestone_pedestal.name=符石基座
tile.ebwizardry\:sorcery_runestone_pedestal.name=符石基座
tile.ebwizardry\:thorns.name=荆棘 tile.ebwizardry\:thorns.name=荆棘
tile.ebwizardry\:obsidian_crust.name=黑曜石层 tile.ebwizardry\:obsidian_crust.name=黑曜石层
tile.ebwizardry\:dry_frosted_ice.name=干燥霜冰 tile.ebwizardry\:dry_frosted_ice.name=干燥霜冰
@@ -52,22 +64,22 @@ tile.ebwizardry\:dark_oak_lectern.name=深色橡木览术台
tile.ebwizardry\:receptacle.name=容杯 tile.ebwizardry\:receptacle.name=容杯
tile.ebwizardry\:imbuement_altar.name=注灵祭坛 tile.ebwizardry\:imbuement_altar.name=注灵祭坛
item.ebwizardry\:crystal_magic.name=魔力水晶 item.ebwizardry\:magic_crystal.name=魔力水晶
item.ebwizardry\:crystal_magic.desc=水晶闪耀斑斓的色彩似乎在缓慢地变幻流转,暗示着其内蕴含的魔法能量。或许能以某种方法来驾驭这种魔力...... item.ebwizardry\:magic_crystal.desc=水晶闪耀斑斓的色彩似乎在缓慢地变幻流转,暗示着其内蕴含的魔法能量。或许能以某种方法来驾驭这种魔力......
item.ebwizardry\:crystal_fire.name=赤焰水晶 item.ebwizardry\:fire_crystal.name=赤焰水晶
item.ebwizardry\:crystal_fire.desc=发出烈火般橙色光彩的水晶。也许是揭示火焰元素奥秘的关键...... item.ebwizardry\:fire_crystal.desc=发出烈火般橙色光彩的水晶。也许是揭示火焰元素奥秘的关键......
item.ebwizardry\:crystal_ice.name=寒霜水晶 item.ebwizardry\:ice_crystal.name=寒霜水晶
item.ebwizardry\:crystal_ice.desc=具有寒冷的霜蓝色调的水晶。或许它蕴藏着冰霜力量的奥秘...... item.ebwizardry\:ice_crystal.desc=具有寒冷的霜蓝色调的水晶。或许它蕴藏着冰霜力量的奥秘......
item.ebwizardry\:crystal_lightning.name=风暴水晶 item.ebwizardry\:lightning_crystal.name=风暴水晶
item.ebwizardry\:crystal_lightning.desc=似乎有混沌能量在其中流转闪烁的水晶。也许它内部蕴藏着更强大的力量...... item.ebwizardry\:lightning_crystal.desc=似乎有混沌能量在其中流转闪烁的水晶。也许它内部蕴藏着更强大的力量......
item.ebwizardry\:crystal_necromancy.name=邃暗水晶 item.ebwizardry\:necromancy_crystal.name=邃暗水晶
item.ebwizardry\:crystal_necromancy.desc=暗紫色外观的水晶,凝视它时仿佛被吸入其中。或许它是通往邃暗的门户...... item.ebwizardry\:necromancy_crystal.desc=暗紫色外观的水晶,凝视它时仿佛被吸入其中。或许它是通往邃暗的门户......
item.ebwizardry\:crystal_earth.name=苍翠水晶 item.ebwizardry\:earth_crystal.name=苍翠水晶
item.ebwizardry\:crystal_earth.desc=遍布翠绿与褐色图案的水晶。或许它蕴含着与自然之力的联系...... item.ebwizardry\:earth_crystal.desc=遍布翠绿与褐色图案的水晶。或许它蕴含着与自然之力的联系......
item.ebwizardry\:crystal_sorcery.name=秘源水晶 item.ebwizardry\:sorcery_crystal.name=秘源水晶
item.ebwizardry\:crystal_sorcery.desc=散发着碧绿微光的水晶。也许它封存着远古之力的奥秘...... item.ebwizardry\:sorcery_crystal.desc=散发着碧绿微光的水晶。也许它封存着远古之力的奥秘......
item.ebwizardry\:crystal_healing.name=光辉水晶 item.ebwizardry\:healing_crystal.name=光辉水晶
item.ebwizardry\:crystal_healing.desc=在日光下闪耀金黄色光芒的水晶。或许它连结着神圣之力...... item.ebwizardry\:healing_crystal.desc=在日光下闪耀金黄色光芒的水晶。或许它连结着神圣之力......
item.ebwizardry\:spell_book.name=法术书 item.ebwizardry\:spell_book.name=法术书
item.ebwizardry\:spell_book.desc=一本写满了远古文稿里符号与雕文的书。通过刻苦钻研,或许能破译它的内容......\n\n手持这本书时右击即可阅读。 item.ebwizardry\:spell_book.desc=一本写满了远古文稿里符号与雕文的书。通过刻苦钻研,或许能破译它的内容......\n\n手持这本书时右击即可阅读。
File diff suppressed because it is too large Load Diff
@@ -6,7 +6,7 @@
"entries": [ "entries": [
{ {
"type": "item", "type": "item",
"name": "ebwizardry:spectral_dust", "name": "ebwizardry:spectral_dust_earth",
"weight": 1, "weight": 1,
"functions": [ "functions": [
{ {
@@ -15,11 +15,7 @@
"min": 0, "min": 0,
"max": 1 "max": 1
} }
}, }
{
"function": "minecraft:set_data",
"data": 5
}
] ]
} }
] ]
@@ -6,7 +6,7 @@
"entries": [ "entries": [
{ {
"type": "item", "type": "item",
"name": "ebwizardry:spectral_dust", "name": "ebwizardry:spectral_dust_fire",
"weight": 1, "weight": 1,
"functions": [ "functions": [
{ {
@@ -15,11 +15,7 @@
"min": 0, "min": 0,
"max": 1 "max": 1
} }
}, }
{
"function": "minecraft:set_data",
"data": 1
}
] ]
} }
] ]
@@ -6,7 +6,7 @@
"entries": [ "entries": [
{ {
"type": "item", "type": "item",
"name": "ebwizardry:spectral_dust", "name": "ebwizardry:spectral_dust_healing",
"weight": 1, "weight": 1,
"functions": [ "functions": [
{ {
@@ -15,11 +15,7 @@
"min": 0, "min": 0,
"max": 1 "max": 1
} }
}, }
{
"function": "minecraft:set_data",
"data": 7
}
] ]
} }
] ]

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