Compare commits
No commits in common. "f32a1bf5dbc566ba608fe877d306c4024bb97da9" and "1b022a4b7f39be578f19ff83f9ef853993844cd2" have entirely different histories.
f32a1bf5db
...
1b022a4b7f
4
.gitignore
vendored
4
.gitignore
vendored
@ -20,9 +20,6 @@
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.rar
|
*.rar
|
||||||
|
|
||||||
#Fabric
|
|
||||||
run/
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
@ -115,3 +112,4 @@ gradle-app.setting
|
|||||||
|
|
||||||
# Cache of project
|
# Cache of project
|
||||||
.gradletasknamecache
|
.gradletasknamecache
|
||||||
|
|
||||||
|
8
.idea/.gitignore
vendored
8
.idea/.gitignore
vendored
@ -1,8 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<bytecodeTargetLevel target="16" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,35 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="jboss.community" />
|
|
||||||
<option name="name" value="JBoss Community repository" />
|
|
||||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="MavenRepo" />
|
|
||||||
<option name="name" value="MavenRepo" />
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="Fabric" />
|
|
||||||
<option name="name" value="Fabric" />
|
|
||||||
<option name="url" value="https://maven.fabricmc.net/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="Mojang" />
|
|
||||||
<option name="name" value="Mojang" />
|
|
||||||
<option name="url" value="https://libraries.minecraft.net/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="UserLocalRemappedMods" />
|
|
||||||
<option name="name" value="UserLocalRemappedMods" />
|
|
||||||
<option name="url" value="file:/$PROJECT_DIR$/../../../Minecraft%20Mods%20and%20Plugins/Fabric/VanillaPlus/.gradle/loom-cache/remapped_mods/" />
|
|
||||||
</remote-repository>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="azul-16" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RunConfigurationProducerService">
|
|
||||||
<option name="ignoredProducers">
|
|
||||||
<set>
|
|
||||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,12 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Minecraft Client" type="Application" factoryName="Application">
|
|
||||||
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" />
|
|
||||||
<module name="VanillaPlus.main" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
|
||||||
<option name="VM_PARAMETERS" value="-XX:+ShowCodeDetailsInExceptionMessages -Dfabric.dli.config=F:\Java\Minecraft@@0020Mods@@0020and@@0020Plugins\Fabric\VanillaPlus\.gradle\loom-cache\launch.cfg -Dfabric.dli.env=client -Dfabric.dli.main=net.fabricmc.loader.launch.knot.KnotClient" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@ -1,12 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Minecraft Server" type="Application" factoryName="Application">
|
|
||||||
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" />
|
|
||||||
<module name="VanillaPlus.main" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="nogui" />
|
|
||||||
<option name="VM_PARAMETERS" value="-XX:+ShowCodeDetailsInExceptionMessages -Dfabric.dli.config=F:\Java\Minecraft@@0020Mods@@0020and@@0020Plugins\Fabric\VanillaPlus\.gradle\loom-cache\launch.cfg -Dfabric.dli.env=server -Dfabric.dli.main=net.fabricmc.loader.launch.knot.KnotServer" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
46
build.gradle
46
build.gradle
@ -1,46 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'fabric-loom' version '0.9-SNAPSHOT'
|
|
||||||
id 'maven-publish'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_16
|
|
||||||
targetCompatibility = JavaVersion.VERSION_16
|
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
|
||||||
version = project.mod_version
|
|
||||||
group = project.maven_group
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
||||||
|
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources {
|
|
||||||
inputs.property "version", project.version
|
|
||||||
|
|
||||||
filesMatching("fabric.mod.json") {
|
|
||||||
expand "version": project.version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
|
||||||
it.options.encoding = "UTF-8"
|
|
||||||
it.options.release = 16
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
withSourcesJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
from("LICENSE") {
|
|
||||||
rename { "${it}_${project.archivesBaseName}"}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
# Done to increase the memory available to gradle.
|
|
||||||
org.gradle.jvmargs=-Xmx2G
|
|
||||||
|
|
||||||
# Fabric Properties
|
|
||||||
# check these on https://fabricmc.net/versions.html
|
|
||||||
minecraft_version=1.17.1
|
|
||||||
yarn_mappings=1.17.1+build.63
|
|
||||||
loader_version=0.11.7
|
|
||||||
|
|
||||||
# Mod Properties
|
|
||||||
mod_version = 1.0.0
|
|
||||||
maven_group = tech.nevets
|
|
||||||
archives_base_name = vplus
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
fabric_version=0.41.0+1.17
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +0,0 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
185
gradlew
vendored
185
gradlew
vendored
@ -1,185 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright 2015 the original author or 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 UN*X
|
|
||||||
##
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
PRG="$0"
|
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
|
||||||
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.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD="maximum"
|
|
||||||
|
|
||||||
warn () {
|
|
||||||
echo "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
nonstop=false
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN* )
|
|
||||||
cygwin=true
|
|
||||||
;;
|
|
||||||
Darwin* )
|
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MSYS* | MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
|
||||||
else
|
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
|
||||||
fi
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
JAVACMD="java"
|
|
||||||
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
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
|
||||||
if [ $? -eq 0 ] ; then
|
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
|
||||||
fi
|
|
||||||
ulimit -n $MAX_FD
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=`expr $i + 1`
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
0) set -- ;;
|
|
||||||
1) set -- "$args0" ;;
|
|
||||||
2) set -- "$args0" "$args1" ;;
|
|
||||||
3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
89
gradlew.bat
vendored
89
gradlew.bat
vendored
@ -1,89 +0,0 @@
|
|||||||
@rem
|
|
||||||
@rem Copyright 2015 the original author or authors.
|
|
||||||
@rem
|
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@rem you may not use this file except in compliance with the License.
|
|
||||||
@rem You may obtain a copy of the License at
|
|
||||||
@rem
|
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
@rem
|
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
@rem See the License for the specific language governing permissions and
|
|
||||||
@rem limitations under the License.
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
|
||||||
@rem ##########################################################################
|
|
||||||
@rem
|
|
||||||
@rem Gradle startup script for Windows
|
|
||||||
@rem
|
|
||||||
@rem ##########################################################################
|
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
|
||||||
set APP_BASE_NAME=%~n0
|
|
||||||
set APP_HOME=%DIRNAME%
|
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
||||||
|
|
||||||
@rem Find java.exe
|
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
echo.
|
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
echo location of your Java installation.
|
|
||||||
|
|
||||||
goto fail
|
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
|
||||||
|
|
||||||
echo.
|
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
||||||
echo.
|
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
echo location of your Java installation.
|
|
||||||
|
|
||||||
goto fail
|
|
||||||
|
|
||||||
:execute
|
|
||||||
@rem Setup the command line
|
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
|
||||||
|
|
||||||
:end
|
|
||||||
@rem End local scope for the variables with windows NT shell
|
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
|
||||||
|
|
||||||
:fail
|
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
||||||
rem the _cmd.exe /c_ return code!
|
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
|
||||||
exit /b 1
|
|
||||||
|
|
||||||
:mainEnd
|
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
|
||||||
|
|
||||||
:omega
|
|
@ -1,9 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
name = 'Fabric'
|
|
||||||
url = 'https://maven.fabricmc.net/'
|
|
||||||
}
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
package tech.nevets.vplus;
|
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
|
||||||
import tech.nevets.vplus.armor.VPArmor;
|
|
||||||
import tech.nevets.vplus.blocks.VPBlocks;
|
|
||||||
import tech.nevets.vplus.food.VPFood;
|
|
||||||
import tech.nevets.vplus.items.VPItems;
|
|
||||||
import tech.nevets.vplus.misc.VPFuels;
|
|
||||||
import tech.nevets.vplus.misc.VPZoom;
|
|
||||||
import tech.nevets.vplus.tools.VPTools;
|
|
||||||
|
|
||||||
public class Main implements ModInitializer {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onInitialize() {
|
|
||||||
VPBlocks.vpBlocks();
|
|
||||||
VPItems.vpItems();
|
|
||||||
VPFood.vpFood();
|
|
||||||
VPTools.vpTools();
|
|
||||||
VPArmor.vpArmor();
|
|
||||||
VPFuels.vpFuels();
|
|
||||||
VPZoom.vpZoom();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
package tech.nevets.vplus.armor;
|
|
||||||
|
|
||||||
import net.fabricmc.api.EnvType;
|
|
||||||
import net.fabricmc.api.Environment;
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.item.ArmorMaterial;
|
|
||||||
import net.minecraft.item.ItemConvertible;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.recipe.Ingredient;
|
|
||||||
import net.minecraft.sound.SoundEvent;
|
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.Lazy;
|
|
||||||
import tech.nevets.vplus.items.VPItems;
|
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
public enum ArmorMaterials implements ArmorMaterial {
|
|
||||||
EMERALD("emerald", 30, new int[]{2, 6, 8, 2}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.0F, () -> {
|
|
||||||
return Ingredient.ofItems(new ItemConvertible[]{Items.EMERALD});
|
|
||||||
}),
|
|
||||||
PLATINUM("platinum", 40, new int[]{6, 8, 10, 6}, 40, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.5F, () -> {
|
|
||||||
return Ingredient.ofItems(new ItemConvertible[]{VPItems.PLATINUMINGOT});
|
|
||||||
}),
|
|
||||||
RUBY("ruby", 75, new int[]{10, 15, 20, 10}, 100, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4.0F, 1.0F, () -> {
|
|
||||||
return Ingredient.ofItems(new ItemConvertible[]{VPItems.RUBY});
|
|
||||||
});
|
|
||||||
|
|
||||||
private static final int[] BASE_DURABILITY = new int[]{13, 15, 16, 11};
|
|
||||||
private final String name;
|
|
||||||
private final int durabilityMultiplier;
|
|
||||||
private final int[] protectionAmounts;
|
|
||||||
private final int enchantability;
|
|
||||||
private final SoundEvent equipSound;
|
|
||||||
private final float toughness;
|
|
||||||
private final float knockbackResistance;
|
|
||||||
private final Lazy<Ingredient> repairIngredientSupplier;
|
|
||||||
|
|
||||||
private ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) {
|
|
||||||
this.name = name;
|
|
||||||
this.durabilityMultiplier = durabilityMultiplier;
|
|
||||||
this.protectionAmounts = protectionAmounts;
|
|
||||||
this.enchantability = enchantability;
|
|
||||||
this.equipSound = equipSound;
|
|
||||||
this.toughness = toughness;
|
|
||||||
this.knockbackResistance = knockbackResistance;
|
|
||||||
this.repairIngredientSupplier = new Lazy(repairIngredientSupplier);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDurability(EquipmentSlot slot) {
|
|
||||||
return BASE_DURABILITY[slot.getEntitySlotId()] * this.durabilityMultiplier;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getProtectionAmount(EquipmentSlot slot) {
|
|
||||||
return this.protectionAmounts[slot.getEntitySlotId()];
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getEnchantability() {
|
|
||||||
return this.enchantability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SoundEvent getEquipSound() {
|
|
||||||
return this.equipSound;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Ingredient getRepairIngredient() {
|
|
||||||
return (Ingredient)this.repairIngredientSupplier.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
public String getName() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getToughness() {
|
|
||||||
return this.toughness;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getKnockbackResistance() {
|
|
||||||
return this.knockbackResistance;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
package tech.nevets.vplus.armor;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.item.ArmorItem;
|
|
||||||
import net.minecraft.item.ArmorMaterial;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class BaseArmor extends ArmorItem {
|
|
||||||
public BaseArmor(ArmorMaterial material, EquipmentSlot slot) {
|
|
||||||
super(material, slot, new Settings().group(VPItemGroups.COMBAT));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
package tech.nevets.vplus.armor;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.item.ArmorMaterial;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
|
|
||||||
public class VPArmor {
|
|
||||||
|
|
||||||
public static final ArmorMaterial EMERALD_ARMOR = ArmorMaterials.EMERALD;
|
|
||||||
public static final ArmorMaterial PLATINUM_ARMOR = ArmorMaterials.PLATINUM;
|
|
||||||
public static final ArmorMaterial RUBY_ARMOR = ArmorMaterials.RUBY;
|
|
||||||
|
|
||||||
public static void vpArmor() {
|
|
||||||
initializeHelmet();
|
|
||||||
initializeChestplates();
|
|
||||||
initialzeLeggings();
|
|
||||||
initializeBoots();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeHelmet() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_helmet"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.HEAD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_helmet"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.HEAD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_helmet"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.HEAD));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeChestplates() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_chestplate"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.CHEST));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_chestplate"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.CHEST));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_chestplate"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.CHEST));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initialzeLeggings() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_leggings"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.LEGS));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_leggings"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.LEGS));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_leggings"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.LEGS));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeBoots() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_boots"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.FEET));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_boots"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.FEET));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_boots"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.FEET));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.minecraft.block.*;
|
|
||||||
import net.minecraft.particle.ParticleEffect;
|
|
||||||
import net.minecraft.particle.ParticleTypes;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Direction;
|
|
||||||
import net.minecraft.util.shape.VoxelShape;
|
|
||||||
import net.minecraft.world.BlockView;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.WorldAccess;
|
|
||||||
import net.minecraft.world.WorldView;
|
|
||||||
|
|
||||||
public class ColorTorchBlock extends Block {
|
|
||||||
protected static final int field_31265 = 2;
|
|
||||||
protected static final VoxelShape BOUNDING_SHAPE = Block.createCuboidShape(6.0D, 0.0D, 6.0D, 10.0D, 10.0D, 10.0D);
|
|
||||||
protected final ParticleEffect particle;
|
|
||||||
|
|
||||||
|
|
||||||
public ColorTorchBlock(Settings settings, ParticleEffect particle) {
|
|
||||||
super(settings);
|
|
||||||
this.particle = particle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
|
||||||
return BOUNDING_SHAPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
|
||||||
return direction == Direction.DOWN && !this.canPlaceAt(state, world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
|
||||||
return sideCoversSmallSquare(world, pos.down(), Direction.UP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
|
||||||
double d = (double)pos.getX() + 0.5D;
|
|
||||||
double e = (double)pos.getY() + 0.7D;
|
|
||||||
double f = (double)pos.getZ() + 0.5D;
|
|
||||||
world.addParticle(ParticleTypes.SMOKE, d, e, f, 0.0D, 0.0D, 0.0D);
|
|
||||||
world.addParticle(this.particle, d, e, f, 0.0D, 0.0D, 0.0D);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,110 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import net.minecraft.block.*;
|
|
||||||
import net.minecraft.item.ItemPlacementContext;
|
|
||||||
import net.minecraft.particle.ParticleEffect;
|
|
||||||
import net.minecraft.particle.ParticleTypes;
|
|
||||||
import net.minecraft.state.StateManager;
|
|
||||||
import net.minecraft.state.property.DirectionProperty;
|
|
||||||
import net.minecraft.state.property.Property;
|
|
||||||
import net.minecraft.util.BlockMirror;
|
|
||||||
import net.minecraft.util.BlockRotation;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Direction;
|
|
||||||
import net.minecraft.util.shape.VoxelShape;
|
|
||||||
import net.minecraft.world.BlockView;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.WorldAccess;
|
|
||||||
import net.minecraft.world.WorldView;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class ColorWallTorchBlock extends TorchBlock {
|
|
||||||
public static final DirectionProperty FACING;
|
|
||||||
protected static final float field_31285 = 2.5F;
|
|
||||||
private static final Map<Direction, VoxelShape> BOUNDING_SHAPES;
|
|
||||||
|
|
||||||
protected ColorWallTorchBlock(Settings settings, ParticleEffect particleEffect) {
|
|
||||||
super(settings, particleEffect);
|
|
||||||
this.setDefaultState((BlockState)((BlockState)this.stateManager.getDefaultState()).with(FACING, Direction.NORTH));
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTranslationKey() {
|
|
||||||
return this.asItem().getTranslationKey();
|
|
||||||
}
|
|
||||||
|
|
||||||
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
|
||||||
return getBoundingShape(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static VoxelShape getBoundingShape(BlockState state) {
|
|
||||||
return (VoxelShape)BOUNDING_SHAPES.get(state.get(FACING));
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
|
||||||
Direction direction = (Direction)state.get(FACING);
|
|
||||||
BlockPos blockPos = pos.offset(direction.getOpposite());
|
|
||||||
BlockState blockState = world.getBlockState(blockPos);
|
|
||||||
return blockState.isSideSolidFullSquare(world, blockPos, direction);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public BlockState getPlacementState(ItemPlacementContext ctx) {
|
|
||||||
BlockState blockState = this.getDefaultState();
|
|
||||||
WorldView worldView = ctx.getWorld();
|
|
||||||
BlockPos blockPos = ctx.getBlockPos();
|
|
||||||
Direction[] directions = ctx.getPlacementDirections();
|
|
||||||
Direction[] var6 = directions;
|
|
||||||
int var7 = directions.length;
|
|
||||||
|
|
||||||
for(int var8 = 0; var8 < var7; ++var8) {
|
|
||||||
Direction direction = var6[var8];
|
|
||||||
if (direction.getAxis().isHorizontal()) {
|
|
||||||
Direction direction2 = direction.getOpposite();
|
|
||||||
blockState = (BlockState)blockState.with(FACING, direction2);
|
|
||||||
if (blockState.canPlaceAt(worldView, blockPos)) {
|
|
||||||
return blockState;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
|
||||||
return direction.getOpposite() == state.get(FACING) && !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
|
||||||
Direction direction = (Direction)state.get(FACING);
|
|
||||||
double d = (double)pos.getX() + 0.5D;
|
|
||||||
double e = (double)pos.getY() + 0.7D;
|
|
||||||
double f = (double)pos.getZ() + 0.5D;
|
|
||||||
double g = 0.22D;
|
|
||||||
double h = 0.27D;
|
|
||||||
Direction direction2 = direction.getOpposite();
|
|
||||||
world.addParticle(ParticleTypes.SMOKE, d + 0.27D * (double)direction2.getOffsetX(), e + 0.22D, f + 0.27D * (double)direction2.getOffsetZ(), 0.0D, 0.0D, 0.0D);
|
|
||||||
world.addParticle(this.particle, d + 0.27D * (double)direction2.getOffsetX(), e + 0.22D, f + 0.27D * (double)direction2.getOffsetZ(), 0.0D, 0.0D, 0.0D);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockState rotate(BlockState state, BlockRotation rotation) {
|
|
||||||
return (BlockState)state.with(FACING, rotation.rotate((Direction)state.get(FACING)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockState mirror(BlockState state, BlockMirror mirror) {
|
|
||||||
return state.rotate(mirror.getRotation((Direction)state.get(FACING)));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
|
||||||
builder.add(new Property[]{FACING});
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
|
||||||
FACING = HorizontalFacingBlock.FACING;
|
|
||||||
BOUNDING_SHAPES = Maps.newEnumMap(ImmutableMap.of(Direction.NORTH, Block.createCuboidShape(5.5D, 3.0D, 11.0D, 10.5D, 13.0D, 16.0D), Direction.SOUTH, Block.createCuboidShape(5.5D, 3.0D, 0.0D, 10.5D, 13.0D, 5.0D), Direction.WEST, Block.createCuboidShape(11.0D, 3.0D, 5.5D, 16.0D, 13.0D, 10.5D), Direction.EAST, Block.createCuboidShape(0.0D, 3.0D, 5.5D, 5.0D, 13.0D, 10.5D)));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
||||||
import net.minecraft.block.*;
|
|
||||||
import net.minecraft.fluid.FluidState;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.tag.FluidTags;
|
|
||||||
import net.minecraft.util.Pair;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Direction;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import java.util.Queue;
|
|
||||||
|
|
||||||
public class LavaSpongeBlock extends Block {
|
|
||||||
|
|
||||||
|
|
||||||
public LavaSpongeBlock() {
|
|
||||||
super(FabricBlockSettings.of(Material.STONE).strength(0.6F).sounds(BlockSoundGroup.BASALT));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
|
|
||||||
if (!oldState.isOf(state.getBlock())) {
|
|
||||||
this.update(world, pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
|
||||||
this.update(world, pos);
|
|
||||||
super.neighborUpdate(state, world, pos, block, fromPos, notify);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void update(World world, BlockPos pos) {
|
|
||||||
if (this.absorbLava(world, pos)) {
|
|
||||||
world.setBlockState(pos, VPBlocks.SATURATEDLAVASPONGEBLOCK.getDefaultState(), 2);
|
|
||||||
world.syncWorldEvent(2001, pos, Block.getRawIdFromState(Blocks.LAVA.getDefaultState()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean absorbLava(World world, BlockPos pos) {
|
|
||||||
Queue<Pair<BlockPos, Integer>> queue = Lists.newLinkedList();
|
|
||||||
queue.add(new Pair(pos, 0));
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
while(!queue.isEmpty()) {
|
|
||||||
Pair<BlockPos, Integer> pair = (Pair)queue.poll();
|
|
||||||
BlockPos blockPos = (BlockPos)pair.getLeft();
|
|
||||||
int j = (Integer)pair.getRight();
|
|
||||||
Direction[] var8 = Direction.values();
|
|
||||||
int var9 = var8.length;
|
|
||||||
|
|
||||||
for(int var10 = 0; var10 < var9; ++var10) {
|
|
||||||
Direction direction = var8[var10];
|
|
||||||
BlockPos blockPos2 = blockPos.offset(direction);
|
|
||||||
BlockState blockState = world.getBlockState(blockPos2);
|
|
||||||
FluidState fluidState = world.getFluidState(blockPos2);
|
|
||||||
Material material = blockState.getMaterial();
|
|
||||||
if (fluidState.isIn(FluidTags.LAVA)) {
|
|
||||||
if (blockState.getBlock() instanceof FluidDrainable && !((FluidDrainable)blockState.getBlock()).tryDrainFluid(world, blockPos2, blockState).isEmpty()) {
|
|
||||||
++i;
|
|
||||||
if (j < 6) {
|
|
||||||
queue.add(new Pair(blockPos2, j + 1));
|
|
||||||
}
|
|
||||||
} else if (blockState.getBlock() instanceof FluidBlock) {
|
|
||||||
world.setBlockState(blockPos2, Blocks.AIR.getDefaultState(), 3);
|
|
||||||
++i;
|
|
||||||
if (j < 6) {
|
|
||||||
queue.add(new Pair(blockPos2, j + 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i > 64) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return i > 0;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
public class PlatinumBlock extends Block {
|
|
||||||
public PlatinumBlock() {
|
|
||||||
super(FabricBlockSettings.of(Material.STONE).breakByHand(false).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.METAL).strength(30, 1000f));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
|
||||||
import net.minecraft.enchantment.Enchantments;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.server.world.ServerWorld;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class PlatinumOre extends Block {
|
|
||||||
public PlatinumOre() {
|
|
||||||
super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES, 3).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
|
|
||||||
}
|
|
||||||
protected int getExperienceWhenMined(Random random) {
|
|
||||||
return MathHelper.nextInt(random, 3, 7);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
|
|
||||||
super.onStacksDropped(state, world, pos, stack);
|
|
||||||
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
|
||||||
int i = this.getExperienceWhenMined(world.random);
|
|
||||||
if (i > 0) {
|
|
||||||
this.dropExperience(world, pos, i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
public class RubyBlock extends Block {
|
|
||||||
public RubyBlock() {
|
|
||||||
super(FabricBlockSettings.of(Material.STONE).breakByHand(false).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.METAL).strength(5, 6.0f));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
|
||||||
import net.minecraft.enchantment.Enchantments;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.server.world.ServerWorld;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class RubyOre extends Block {
|
|
||||||
public RubyOre() {
|
|
||||||
super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES, 3).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
|
|
||||||
}
|
|
||||||
protected int getExperienceWhenMined(Random random) {
|
|
||||||
return MathHelper.nextInt(random, 3, 7);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
|
|
||||||
super.onStacksDropped(state, world, pos, stack);
|
|
||||||
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
|
||||||
int i = this.getExperienceWhenMined(world.random);
|
|
||||||
if (i > 0) {
|
|
||||||
this.dropExperience(world, pos, i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import net.fabricmc.api.EnvType;
|
|
||||||
import net.fabricmc.api.Environment;
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Material;
|
|
||||||
import net.minecraft.particle.ParticleTypes;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Direction;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class SaturatedLavaSpongeBlock extends Block {
|
|
||||||
|
|
||||||
public SaturatedLavaSpongeBlock() {
|
|
||||||
super(FabricBlockSettings.of(Material.STONE).strength(0.6F).sounds(BlockSoundGroup.BASALT));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
|
||||||
Direction direction = Direction.random(random);
|
|
||||||
if (direction != Direction.UP) {
|
|
||||||
BlockPos blockPos = pos.offset(direction);
|
|
||||||
BlockState blockState = world.getBlockState(blockPos);
|
|
||||||
if (!state.isOpaque() || !blockState.isSideSolidFullSquare(world, blockPos, direction.getOpposite())) {
|
|
||||||
double d = (double)pos.getX();
|
|
||||||
double e = (double)pos.getY();
|
|
||||||
double f = (double)pos.getZ();
|
|
||||||
if (direction == Direction.DOWN) {
|
|
||||||
e -= 0.05D;
|
|
||||||
d += random.nextDouble();
|
|
||||||
f += random.nextDouble();
|
|
||||||
} else {
|
|
||||||
e += random.nextDouble() * 0.8D;
|
|
||||||
if (direction.getAxis() == Direction.Axis.X) {
|
|
||||||
f += random.nextDouble();
|
|
||||||
if (direction == Direction.EAST) {
|
|
||||||
++d;
|
|
||||||
} else {
|
|
||||||
d += 0.05D;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
d += random.nextDouble();
|
|
||||||
if (direction == Direction.SOUTH) {
|
|
||||||
++f;
|
|
||||||
} else {
|
|
||||||
f += 0.05D;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
world.addParticle(ParticleTypes.DRIPPING_LAVA, d, e, f, 0.0D, 0.0D, 0.0D);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
package tech.nevets.vplus.blocks;
|
|
||||||
|
|
||||||
import net.minecraft.block.*;
|
|
||||||
import net.minecraft.item.BlockItem;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.particle.ParticleTypes;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class VPBlocks {
|
|
||||||
|
|
||||||
public static final Block LAVASPONGEBLOCK = new LavaSpongeBlock();
|
|
||||||
public static final Block SATURATEDLAVASPONGEBLOCK = new SaturatedLavaSpongeBlock();
|
|
||||||
public static final Block PLATINUMORE = new PlatinumOre();
|
|
||||||
public static final Block PLATINUMBLOCK = new PlatinumBlock();
|
|
||||||
public static final Block RUBYBLOCK = new RubyBlock();
|
|
||||||
public static final Block RUBYORE = new RubyOre();
|
|
||||||
|
|
||||||
public static void vpBlocks() {
|
|
||||||
initializeBlocks();
|
|
||||||
initializeBlockItems();
|
|
||||||
initializeTorches();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeBlocks() {
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "lava_sponge"), LAVASPONGEBLOCK);
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "saturated_lava_sponge"), SATURATEDLAVASPONGEBLOCK);
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "platinum_ore"), PLATINUMORE);
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "platinum_block"), PLATINUMBLOCK);
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "ruby_block"), RUBYBLOCK);
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "ruby_ore"), RUBYORE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeBlockItems() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "lava_sponge"), new BlockItem(LAVASPONGEBLOCK, new Item.Settings().group(VPItemGroups.ALL)));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "saturated_lava_sponge"), new BlockItem(SATURATEDLAVASPONGEBLOCK, new Item.Settings().group(VPItemGroups.ALL).recipeRemainder(Item.fromBlock(VPBlocks.LAVASPONGEBLOCK))));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_ore"), new BlockItem(PLATINUMORE, new Item.Settings().group(VPItemGroups.ALL)));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_block"), new BlockItem(PLATINUMBLOCK, new Item.Settings().group(VPItemGroups.ALL)));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_block"), new BlockItem(RUBYBLOCK, new Item.Settings().group(VPItemGroups.ALL)));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_ore"), new BlockItem(RUBYORE, new Item.Settings().group(VPItemGroups.ALL)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeTorches() {
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "green_torch"), new ColorTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> {return 14;}).sounds(BlockSoundGroup.WOOD), ParticleTypes.FLAME));
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "green_wall_torch"), new ColorWallTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> {return 14;}).sounds(BlockSoundGroup.WOOD).dropsLike(Blocks.TORCH), ParticleTypes.FLAME));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class DiamondApple extends Item {
|
|
||||||
public DiamondApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(8).saturationModifier(14).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 3),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EmeraldApple extends Item {
|
|
||||||
public EmeraldApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 5),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EnchantedDiamondApple extends Item {
|
|
||||||
public EnchantedDiamondApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(8).saturationModifier(14).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 4),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EnchantedEmeraldApple extends Item {
|
|
||||||
public EnchantedEmeraldApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 6),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EnchantedIronApple extends Item {
|
|
||||||
public EnchantedIronApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EnchantedNetheriteApple extends Item {
|
|
||||||
public EnchantedNetheriteApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(14).saturationModifier(18).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 8),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EnchantedPlatinumApple extends Item {
|
|
||||||
public EnchantedPlatinumApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(16).saturationModifier(20).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 10),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class EnchantedRubyApple extends Item {
|
|
||||||
public EnchantedRubyApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(18).saturationModifier(22).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 12),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class IronApple extends Item {
|
|
||||||
public IronApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 1),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class NetheriteApple extends Item {
|
|
||||||
public NetheriteApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(14).saturationModifier(18).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 7),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class PlatinumApple extends Item {
|
|
||||||
public PlatinumApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(16).saturationModifier(20).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 9),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
|
||||||
import net.minecraft.item.FoodComponent;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class RubyApple extends Item {
|
|
||||||
public RubyApple() {
|
|
||||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(18).saturationModifier(22).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 11),1f).build()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
package tech.nevets.vplus.food;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
|
|
||||||
public class VPFood {
|
|
||||||
|
|
||||||
public static final Item IRONAPPLE = new IronApple();
|
|
||||||
public static final Item ENCHANTEDIRONAPPLE = new EnchantedIronApple();
|
|
||||||
public static final Item DIAMONDAPPLE = new DiamondApple();
|
|
||||||
public static final Item ENCHANTEDDIAMONDAPPLE = new EnchantedDiamondApple();
|
|
||||||
public static final Item EMERALDAPPLE = new EmeraldApple();
|
|
||||||
public static final Item ENCHANTEDEMERALDAPPLE = new EnchantedEmeraldApple();
|
|
||||||
public static final Item NETHERITEAPPLE = new NetheriteApple();
|
|
||||||
public static final Item ENCHANTEDNETHERITEAPPLE = new EnchantedNetheriteApple();
|
|
||||||
public static final Item PLATINUMAPPLE = new PlatinumApple();
|
|
||||||
public static final Item ENCHANTEDPLATINUMAPPLE = new EnchantedPlatinumApple();
|
|
||||||
public static final Item RUBYAPPLE = new RubyApple();
|
|
||||||
public static final Item ENCHANTEDRUBYAPPLE = new EnchantedRubyApple();
|
|
||||||
|
|
||||||
public static void vpFood() {
|
|
||||||
initializeApples();
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO Balance apple strengths
|
|
||||||
public static void initializeApples() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "iron_apple"), IRONAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_iron_apple"), ENCHANTEDIRONAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "diamond_apple"), DIAMONDAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_diamond_apple"), ENCHANTEDDIAMONDAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_apple"), EMERALDAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_emerald_apple"), ENCHANTEDEMERALDAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "netherite_apple"), NETHERITEAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_netherite_apple"), ENCHANTEDNETHERITEAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_apple"), PLATINUMAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_platinum_apple"), ENCHANTEDPLATINUMAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_apple"), RUBYAPPLE);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_ruby_apple"), ENCHANTEDRUBYAPPLE);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
package tech.nevets.vplus.init;
|
|
||||||
|
|
||||||
import static tech.nevets.vplus.misc.VPZoom.*;
|
|
||||||
|
|
||||||
public class ZoomInit {
|
|
||||||
public static Boolean isZooming() {
|
|
||||||
return keyBinding.isPressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void manageSmoothCamera() {
|
|
||||||
if (zoomStarting()) {
|
|
||||||
zoomStarted();
|
|
||||||
enableSmoothCamera();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zoomStopping()) {
|
|
||||||
zoomStopped();
|
|
||||||
resetSmoothCamera();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Boolean isSmoothCamera() {
|
|
||||||
return mc.options.smoothCameraEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void enableSmoothCamera() {
|
|
||||||
mc.options.smoothCameraEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void disableSmoothCamera() {
|
|
||||||
mc.options.smoothCameraEnabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean zoomStarting() {
|
|
||||||
return isZooming() && !currentlyZoomed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean zoomStopping() {
|
|
||||||
return !isZooming() && currentlyZoomed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void zoomStarted() {
|
|
||||||
originalSmoothCameraEnabled = isSmoothCamera();
|
|
||||||
currentlyZoomed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void zoomStopped() {
|
|
||||||
currentlyZoomed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void resetSmoothCamera() {
|
|
||||||
if (originalSmoothCameraEnabled) {
|
|
||||||
enableSmoothCamera();
|
|
||||||
} else {
|
|
||||||
disableSmoothCamera();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package tech.nevets.vplus.items;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
|
|
||||||
public class PlatinumIngot extends Item {
|
|
||||||
public PlatinumIngot(Settings settings) {
|
|
||||||
super(settings);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package tech.nevets.vplus.items;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
|
|
||||||
public class PlatinumNugget extends Item {
|
|
||||||
public PlatinumNugget(Settings settings) {
|
|
||||||
super(settings);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package tech.nevets.vplus.items;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
|
|
||||||
public class Ruby extends Item {
|
|
||||||
public Ruby(Settings settings) {
|
|
||||||
super(settings);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package tech.nevets.vplus.items;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
|
||||||
import net.minecraft.item.ItemGroup;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
|
|
||||||
public class VPItemGroups {
|
|
||||||
//Creative Tab
|
|
||||||
public static final ItemGroup ALL = FabricItemGroupBuilder.build(
|
|
||||||
new Identifier("vplus", "all"),
|
|
||||||
() -> new ItemStack((Items.GRASS_BLOCK)));
|
|
||||||
//Combat Tab
|
|
||||||
public static final ItemGroup COMBAT = FabricItemGroupBuilder.build(
|
|
||||||
new Identifier("vplus", "combat"),
|
|
||||||
() -> new ItemStack((Items.DIAMOND_SWORD)));
|
|
||||||
//Tools Tab
|
|
||||||
public static final ItemGroup TOOLS = FabricItemGroupBuilder.create(
|
|
||||||
new Identifier("vplus", "tools"))
|
|
||||||
.icon(() -> new ItemStack(Items.DIAMOND_PICKAXE))
|
|
||||||
/*.appendItems(stacks -> {
|
|
||||||
stacks.add(new ItemStack(Main.RUBY));
|
|
||||||
stacks.add(new ItemStack(Items.EMERALD_BLOCK));
|
|
||||||
})*/
|
|
||||||
.build();
|
|
||||||
//Food Tab
|
|
||||||
public static final ItemGroup FOOD = FabricItemGroupBuilder.build(
|
|
||||||
new Identifier("vplus", "food"),
|
|
||||||
() -> new ItemStack((Items.ENCHANTED_GOLDEN_APPLE)));
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package tech.nevets.vplus.items;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
|
|
||||||
public class VPItems {
|
|
||||||
|
|
||||||
public static final Item PLATINUMINGOT = new PlatinumIngot(new Item.Settings().group(VPItemGroups.ALL));
|
|
||||||
public static final Item PLATINUMNUGGET = new PlatinumNugget(new Item.Settings().group(VPItemGroups.ALL));
|
|
||||||
public static final Item RUBY = new Ruby(new Item.Settings().group(VPItemGroups.ALL));
|
|
||||||
|
|
||||||
public static void vpItems() {
|
|
||||||
initializeValuables();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeValuables() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_ingot"), PLATINUMINGOT);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_nugget"), PLATINUMNUGGET);
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby"), RUBY);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
package tech.nevets.vplus.misc;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.registry.FuelRegistry;
|
|
||||||
import tech.nevets.vplus.blocks.SaturatedLavaSpongeBlock;
|
|
||||||
|
|
||||||
public class VPFuels {
|
|
||||||
public static void vpFuels() {
|
|
||||||
FuelRegistry.INSTANCE.add(new SaturatedLavaSpongeBlock(), 20000);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
package tech.nevets.vplus.misc;
|
|
||||||
|
|
||||||
import net.minecraft.world.gen.decorator.Decorator;
|
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
|
||||||
import net.minecraft.world.gen.feature.Feature;
|
|
||||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
|
||||||
import tech.nevets.vplus.blocks.VPBlocks;
|
|
||||||
|
|
||||||
public class VPOreGen {
|
|
||||||
|
|
||||||
/*
|
|
||||||
private static ConfiguredFeature<?, ?> ORE_PLATINUM_OVERWORLD = Feature.ORE
|
|
||||||
.configure(new OreFeatureConfig(
|
|
||||||
OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
|
||||||
VPBlocks.PLATINUMORE.getDefaultState(),
|
|
||||||
3)) // vein size
|
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(
|
|
||||||
0, // bottom offset
|
|
||||||
0, // min y level
|
|
||||||
15))) // max y level
|
|
||||||
.spreadHorizontally()
|
|
||||||
.repeat(2); // number of veins per chunk
|
|
||||||
|
|
||||||
private static ConfiguredFeature<?, ?> ORE_RUBY_OVERWORLD = Feature.ORE
|
|
||||||
.configure(new OreFeatureConfig(
|
|
||||||
OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
|
||||||
VPBlocks.RUBYORE.getDefaultState(),
|
|
||||||
1)) // vein size
|
|
||||||
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(
|
|
||||||
0, // bottom offset
|
|
||||||
0, // min y level
|
|
||||||
256))) // max y level
|
|
||||||
.spreadHorizontally()
|
|
||||||
.repeat(8); // number of veins per chunk
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package tech.nevets.vplus.misc;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
|
||||||
import net.minecraft.client.option.KeyBinding;
|
|
||||||
import net.minecraft.client.util.InputUtil;
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
|
||||||
|
|
||||||
public class VPZoom {
|
|
||||||
|
|
||||||
public static Boolean currentlyZoomed;
|
|
||||||
public static KeyBinding keyBinding;
|
|
||||||
public static Boolean originalSmoothCameraEnabled;
|
|
||||||
public static final MinecraftClient mc = MinecraftClient.getInstance();
|
|
||||||
public static final double zoomLevel = 19.0;
|
|
||||||
|
|
||||||
public static void vpZoom() {
|
|
||||||
keyBinding = new KeyBinding("key.vplus.zoom", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_C, "category.vplus.zoom");
|
|
||||||
currentlyZoomed = false;
|
|
||||||
originalSmoothCameraEnabled = false;
|
|
||||||
KeyBindingHelper.registerKeyBinding(keyBinding);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package tech.nevets.vplus.mixin;
|
|
||||||
|
|
||||||
import net.fabricmc.api.EnvType;
|
|
||||||
import net.fabricmc.api.Environment;
|
|
||||||
import net.minecraft.client.render.GameRenderer;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|
||||||
import tech.nevets.vplus.init.ZoomInit;
|
|
||||||
import tech.nevets.vplus.misc.VPZoom;
|
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
@Mixin(GameRenderer.class)
|
|
||||||
public class ZoomMixin {
|
|
||||||
@Inject(method = "getFov(Lnet/minecraft/client/render/Camera;FZ)D", at = @At("HEAD"), cancellable = true)
|
|
||||||
public void getZoomLevel(CallbackInfoReturnable<Double> callbackInfo) {
|
|
||||||
if(ZoomInit.isZooming()) {
|
|
||||||
callbackInfo.setReturnValue(VPZoom.zoomLevel);
|
|
||||||
}
|
|
||||||
ZoomInit.manageSmoothCamera();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import net.minecraft.item.AxeItem;
|
|
||||||
import net.minecraft.item.ToolMaterial;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class AxeBase extends AxeItem {
|
|
||||||
public AxeBase(ToolMaterial toolMaterial_1) {
|
|
||||||
super(toolMaterial_1, 5, -3.0f, new Settings().group(VPItemGroups.TOOLS));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import net.minecraft.item.HoeItem;
|
|
||||||
import net.minecraft.item.ToolMaterial;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class HoeBase extends HoeItem {
|
|
||||||
public HoeBase(ToolMaterial toolMaterial_1) {
|
|
||||||
super(toolMaterial_1, -3, 0f, new Settings().group(VPItemGroups.TOOLS));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import net.minecraft.item.PickaxeItem;
|
|
||||||
import net.minecraft.item.ToolMaterial;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class PickaxeBase extends PickaxeItem {
|
|
||||||
public PickaxeBase(ToolMaterial toolMaterial_1) {
|
|
||||||
super(toolMaterial_1, 1, -2.8f, new Settings().group(VPItemGroups.TOOLS));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import net.minecraft.item.ShovelItem;
|
|
||||||
import net.minecraft.item.ToolMaterial;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class ShovelBase extends ShovelItem {
|
|
||||||
public ShovelBase(ToolMaterial toolMaterial_1) {
|
|
||||||
super(toolMaterial_1, 1, -3f, new Settings().group(VPItemGroups.TOOLS));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import net.minecraft.item.SwordItem;
|
|
||||||
import net.minecraft.item.ToolMaterial;
|
|
||||||
import tech.nevets.vplus.items.VPItemGroups;
|
|
||||||
|
|
||||||
public class SwordBase extends SwordItem {
|
|
||||||
public SwordBase(ToolMaterial toolMaterial_1) {
|
|
||||||
super(toolMaterial_1, 2, -2.4f, new Settings().group(VPItemGroups.COMBAT));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,60 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
import net.minecraft.item.ItemConvertible;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.item.ToolMaterial;
|
|
||||||
import net.minecraft.recipe.Ingredient;
|
|
||||||
import net.minecraft.util.Lazy;
|
|
||||||
import tech.nevets.vplus.items.VPItems;
|
|
||||||
|
|
||||||
public enum ToolMaterials implements ToolMaterial {
|
|
||||||
EMERALD(3, 750, 7.0F, 4.0F, 30, () -> {
|
|
||||||
return Ingredient.ofItems(new ItemConvertible[]{Items.EMERALD});
|
|
||||||
}),
|
|
||||||
PLATINUM(4, 3000, 10.0F, 6.0F, 40, () -> {
|
|
||||||
return Ingredient.ofItems(new ItemConvertible[]{VPItems.PLATINUMINGOT});
|
|
||||||
}),
|
|
||||||
RUBY(4, 5000, 12.0F, 10.0F, 100, () -> {
|
|
||||||
return Ingredient.ofItems(new ItemConvertible[]{VPItems.RUBY});
|
|
||||||
});
|
|
||||||
|
|
||||||
private final int miningLevel;
|
|
||||||
private final int itemDurability;
|
|
||||||
private final float miningSpeed;
|
|
||||||
private final float attackDamage;
|
|
||||||
private final int enchantability;
|
|
||||||
private final Lazy<Ingredient> repairIngredient;
|
|
||||||
private ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {
|
|
||||||
this.miningLevel = miningLevel;
|
|
||||||
this.itemDurability = itemDurability;
|
|
||||||
this.miningSpeed = miningSpeed;
|
|
||||||
this.attackDamage = attackDamage;
|
|
||||||
this.enchantability = enchantability;
|
|
||||||
this.repairIngredient = new Lazy(repairIngredient);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDurability() {
|
|
||||||
return this.itemDurability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getMiningSpeedMultiplier() {
|
|
||||||
return this.miningSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getAttackDamage() {
|
|
||||||
return this.attackDamage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMiningLevel() {
|
|
||||||
return this.miningLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getEnchantability() {
|
|
||||||
return this.enchantability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Ingredient getRepairIngredient() {
|
|
||||||
return (Ingredient)this.repairIngredient.get();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
package tech.nevets.vplus.tools;
|
|
||||||
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
|
|
||||||
public class VPTools {
|
|
||||||
|
|
||||||
public static void vpTools() {
|
|
||||||
initializeAxes();
|
|
||||||
initializeHoes();
|
|
||||||
initializePickaxes();
|
|
||||||
initializeShovels();
|
|
||||||
initializeSwords();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeAxes() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_axe"), new AxeBase(ToolMaterials.EMERALD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_axe"), new AxeBase(ToolMaterials.PLATINUM));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_axe"), new AxeBase(ToolMaterials.RUBY));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeHoes() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_hoe"), new HoeBase(ToolMaterials.EMERALD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_hoe"), new HoeBase(ToolMaterials.PLATINUM));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_hoe"), new HoeBase(ToolMaterials.RUBY));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializePickaxes() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_pickaxe"), new PickaxeBase(ToolMaterials.EMERALD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_pickaxe"), new PickaxeBase(ToolMaterials.PLATINUM));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_pickaxe"), new PickaxeBase(ToolMaterials.RUBY));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeShovels() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_shovel"), new ShovelBase(ToolMaterials.EMERALD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_shovel"), new ShovelBase(ToolMaterials.PLATINUM));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_shovel"), new ShovelBase(ToolMaterials.RUBY));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initializeSwords() {
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_sword"), new SwordBase(ToolMaterials.EMERALD));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_sword"), new SwordBase(ToolMaterials.PLATINUM));
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_sword"), new SwordBase(ToolMaterials.RUBY));
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"facing=east": {
|
|
||||||
"model": "minecraft:block/wall_torch"
|
|
||||||
},
|
|
||||||
"facing=north": {
|
|
||||||
"model": "minecraft:block/wall_torch",
|
|
||||||
"y": 270
|
|
||||||
},
|
|
||||||
"facing=south": {
|
|
||||||
"model": "minecraft:block/wall_torch",
|
|
||||||
"y": 90
|
|
||||||
},
|
|
||||||
"facing=west": {
|
|
||||||
"model": "minecraft:block/wall_torch",
|
|
||||||
"y": 180
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": {
|
|
||||||
"model": "minecraft:block/torch"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": { "model": "vplus:block/lava_sponge"}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": { "model": "vplus:block/platinum_block"}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": { "model": "vplus:block/platinum_ore"}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": { "model": "vplus:block/ruby_block"}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": { "model": "vplus:block/ruby_ore"}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": { "model": "vplus:block/saturated_lava_sponge"}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB |
@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
"key.vplus.zoom": "Zoom Key",
|
|
||||||
"category.vplus.zoom": "Zoom",
|
|
||||||
|
|
||||||
"itemGroup.vplus.all": "All",
|
|
||||||
"itemGroup.vplus.combat": "Combat",
|
|
||||||
"itemGroup.vplus.tools": "Tools",
|
|
||||||
"itemGroup.vplus.food": "Food",
|
|
||||||
|
|
||||||
"block.vplus.lava_sponge": "Lava Sponge",
|
|
||||||
"block.vplus.saturated_lava_sponge": "Saturated Lava Sponge",
|
|
||||||
"block.vplus.platinum_ore": "Platinum Ore",
|
|
||||||
"block.vplus.platinum_block": "Platinum Block",
|
|
||||||
"block.vplus.ruby_ore": "Ruby Ore",
|
|
||||||
"block.vplus.ruby_block": "Ruby Block",
|
|
||||||
|
|
||||||
"item.vplus.platinum_ingot": "Platinum Ingot",
|
|
||||||
"item.vplus.platinum_nugget": "Platinum Nugget",
|
|
||||||
"item.vplus.ruby": "Ruby",
|
|
||||||
|
|
||||||
"item.vplus.emerald_sword": "Emerald Sword",
|
|
||||||
"item.vplus.platinum_sword": "Platinum Sword",
|
|
||||||
"item.vplus.ruby_sword": "Ruby Sword",
|
|
||||||
|
|
||||||
"item.vplus.emerald_helmet": "Emerald Helmet",
|
|
||||||
"item.vplus.emerald_chestplate": "Emerald Chestplate",
|
|
||||||
"item.vplus.emerald_leggings": "Emerald Leggings",
|
|
||||||
"item.vplus.emerald_boots": "Emerald Boots",
|
|
||||||
"item.vplus.platinum_helmet": "Platinum Helmet",
|
|
||||||
"item.vplus.platinum_chestplate": "Platinum Chestplate",
|
|
||||||
"item.vplus.platinum_leggings": "Platinum Leggings",
|
|
||||||
"item.vplus.platinum_boots": "Platinum Boots",
|
|
||||||
"item.vplus.ruby_helmet": "Ruby Helmet",
|
|
||||||
"item.vplus.ruby_chestplate": "Ruby Chestplate",
|
|
||||||
"item.vplus.ruby_leggings": "Ruby Leggings",
|
|
||||||
"item.vplus.ruby_boots": "Ruby Boots",
|
|
||||||
|
|
||||||
"item.vplus.emerald_pickaxe": "Emerald Pickaxe",
|
|
||||||
"item.vplus.emerald_axe": "Emerald Axe",
|
|
||||||
"item.vplus.emerald_shovel": "Emerald Shovel",
|
|
||||||
"item.vplus.emerald_hoe": "Emerald Hoe",
|
|
||||||
"item.vplus.platinum_pickaxe": "Platinum Pickaxe",
|
|
||||||
"item.vplus.platinum_axe": "Platinum Axe",
|
|
||||||
"item.vplus.platinum_shovel": "Platinum Shovel",
|
|
||||||
"item.vplus.platinum_hoe": "Platinum Hoe",
|
|
||||||
"item.vplus.ruby_pickaxe": "Ruby Pickaxe",
|
|
||||||
"item.vplus.ruby_axe": "Ruby Axe",
|
|
||||||
"item.vplus.ruby_shovel": "Ruby Shovel",
|
|
||||||
"item.vplus.ruby_hoe": "Ruby Hoe",
|
|
||||||
|
|
||||||
"item.vplus.iron_apple": "Iron Apple",
|
|
||||||
"item.vplus.enchanted_iron_apple": "Enchanted Iron Apple",
|
|
||||||
"item.vplus.diamond_apple": "Diamond Apple",
|
|
||||||
"item.vplus.enchanted_diamond_apple": "Enchanted Diamond Apple",
|
|
||||||
"item.vplus.emerald_apple": "Emerald Apple",
|
|
||||||
"item.vplus.enchanted_emerald_apple": "Enchanted Emerald Apple",
|
|
||||||
"item.vplus.netherite_apple": "Netherite Apple",
|
|
||||||
"item.vplus.enchanted_Netherite_apple": "Enchanted Netherite Apple",
|
|
||||||
"item.vplus.platinum_apple": "Platinum Apple",
|
|
||||||
"item.vplus.enchanted_platinum_apple": "Enchanted Platinum Apple",
|
|
||||||
"item.vplus.ruby_apple": "Ruby Apple",
|
|
||||||
"item.vplus.enchanted_ruby_apple": "Enchanted Ruby Apple"
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "minecraft:block/template_torch_wall",
|
|
||||||
"textures": {
|
|
||||||
"torch": "minecraft:block/torch"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "minecraft:block/template_torch",
|
|
||||||
"textures": {
|
|
||||||
"torch": "minecraft:block/torch"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "block/cube_all",
|
|
||||||
"textures": {
|
|
||||||
"all": "vplus:block/lava_sponge"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "block/cube_all",
|
|
||||||
"textures": {
|
|
||||||
"all": "vplus:block/platinum_block"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "block/cube_all",
|
|
||||||
"textures": {
|
|
||||||
"all": "vplus:block/platinum_ore"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "block/cube_all",
|
|
||||||
"textures": {
|
|
||||||
"all": "vplus:block/ruby_block"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "block/cube_all",
|
|
||||||
"textures": {
|
|
||||||
"all": "vplus:block/ruby_ore"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "block/cube_all",
|
|
||||||
"textures": {
|
|
||||||
"all": "vplus:block/saturated_lava_sponge"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/diamond_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_axe"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_boots"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_chestplate"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_helmet"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_hoe"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_leggings"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_pickaxe"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_shovel"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/emerald_sword"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/enchanted_diamond_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/enchanted_emerald_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/enchanted_iron_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/enchanted_netherite_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/enchanted_platinum_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/enchanted_ruby_apple"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "minecraft:item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "minecraft:block/torch"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "item/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "vplus:item/iron_apple"
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user