Compare commits
19 Commits
1.20.3-pre
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
29d2d3462c | ||
|
2ef6149263 | ||
|
1e514bca11 | ||
|
3e5f657092 | ||
|
7f97cd7060 | ||
|
efca60e5da | ||
|
8dd50f73aa | ||
|
a12beb0d3d | ||
|
9592018381 | ||
|
3aec4f1c08 | ||
|
5396cefbb3 | ||
|
e56ec4c88c | ||
|
12770732b7 | ||
|
21dc27d6f8 | ||
|
7370c26b82 | ||
|
57a3ebfdc0 | ||
|
3dcf5e09e4 | ||
|
a0252d4608 | ||
|
69f5b0a504 |
24
build.gradle
@ -1,15 +1,18 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.11-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.5.7'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Add repositories to retrieve artifacts from in here.
|
||||
// You should only use this when depending on other mods because
|
||||
@ -29,18 +32,6 @@ dependencies {
|
||||
|
||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||
// You may need to force-disable transitiveness on them.
|
||||
|
||||
// for special leaves blocks like ExtendedLeavesBlock
|
||||
modImplementation "com.terraformersmc.terraform-api:terraform-wood-api-v1:${project.terraform_wood_api_version}"
|
||||
repositories {
|
||||
maven {
|
||||
name = 'TerraformersMC'
|
||||
url = 'https://maven.terraformersmc.com/'
|
||||
}
|
||||
maven {
|
||||
url = 'https://maven.minecraftforge.net/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
@ -63,11 +54,14 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${project.base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,18 +3,15 @@
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version=1.20.3-pre2
|
||||
yarn_mappings=1.20.3-pre2+build.2
|
||||
loader_version=0.14.24
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.3
|
||||
loader_version=0.15.7
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.20.3.1
|
||||
mod_version = 1.20.4.10
|
||||
maven_group = de.jottyfan.minecraft
|
||||
archives_base_name = quickiefabric
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.90.12+1.20.3
|
||||
|
||||
# for ExtendedLeavesBlock
|
||||
terraform_wood_api_version=9.0.0-alpha.3
|
||||
fabric_version=0.96.3+1.20.4
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
293
gradlew
vendored
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,67 +17,98 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
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
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
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"'
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MSYS* | MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
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
|
||||
@ -87,9 +118,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
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"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@ -98,88 +129,120 @@ 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.
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "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" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
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, 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.
|
||||
|
||||
# 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"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
15
gradlew.bat
vendored
@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@ -25,7 +25,8 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
@ -22,7 +22,9 @@ public class QuickieFabricClient implements ClientModInitializer {
|
||||
public void onInitializeClient() {
|
||||
HandledScreens.register(RegistryManager.BACKPACK_SCREEN_HANDLER, BackpackScreen::new);
|
||||
HandledScreens.register(RegistryManager.BLOCKSTACKER_SCREEN_HANDLER, BlockStackerScreen::new);
|
||||
// make cotton plant block transparent
|
||||
// make plant blocks and sulforpad transparent
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(QuickieBlocks.COTTONPLANT, RenderLayer.getCutout());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(QuickieBlocks.CANOLAPLANT, RenderLayer.getCutout());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(QuickieBlocks.SULFORPAD, RenderLayer.getCutout());
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package de.jottyfan.minecraft.quickiefabric.blockentity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.DrillBlock;
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.QuickieBlocks;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
@ -11,7 +12,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class DrillBlockEntity extends BlockEntity {
|
||||
|
||||
private Integer drillstep;
|
||||
private final Integer maxDrillStep;
|
||||
|
||||
@ -25,7 +25,8 @@ public abstract class DrillBlockEntity extends BlockEntity {
|
||||
BlockState bs = world.getBlockState(from);
|
||||
if (be != null) {
|
||||
world.setBlockState(from, Blocks.AIR.getDefaultState());
|
||||
world.setBlockState(to, bs);
|
||||
Integer newFuel = bs.get(DrillBlock.FUEL) - 1;
|
||||
world.setBlockState(to, bs.with(DrillBlock.FUEL, newFuel));
|
||||
world.addBlockEntity(be);
|
||||
world.removeBlockEntity(from);
|
||||
}
|
||||
@ -44,7 +45,9 @@ public abstract class DrillBlockEntity extends BlockEntity {
|
||||
return lastSuccess;
|
||||
}
|
||||
|
||||
public static void tick(World world, BlockPos pos, BlockState state, DrillBlockEntity be, Integer maxDrillStep, List<BlockPos> drillPosition) {
|
||||
public static void tick(World world, BlockPos pos, BlockState state, DrillBlockEntity be, Integer maxDrillStep,
|
||||
List<BlockPos> drillPosition) {
|
||||
if (state.get(DrillBlock.FUEL) > 0) {
|
||||
if (be.getDrillstep() < 1) {
|
||||
be.setDrillstep(maxDrillStep);
|
||||
if (drill(pos, drillPosition, world)) {
|
||||
@ -54,6 +57,7 @@ public abstract class DrillBlockEntity extends BlockEntity {
|
||||
be.doDrillstep();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doDrillstep() {
|
||||
setDrillstep(getDrillstep() - 1);
|
||||
|
@ -25,14 +25,16 @@ public class EmptyLavaHoarderBlockEntity extends BlockEntity {
|
||||
}
|
||||
|
||||
public static final void spawnRandomItems(World world, BlockPos pos, Integer count) {
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.DIAMOND, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.EMERALD, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GOLD_ORE, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.IRON_ORE, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.COPPER_ORE, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.OBSIDIAN, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LAPIS_LAZULI, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.SULPHOR, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.DIAMOND, new Random().nextInt(count + 2))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.EMERALD, new Random().nextInt(count + 1))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.RAW_GOLD, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.RAW_IRON, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.RAW_COPPER, new Random().nextInt(count))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.OBSIDIAN, new Random().nextInt(count + 2))));
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LAPIS_LAZULI, new Random().nextInt(count + 1))));
|
||||
if (count > 1) {
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.SULPHOR, new Random().nextInt(count - 1))));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,68 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.CropBlock;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ItemScatterer;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCanolaplant extends CropBlock {
|
||||
|
||||
public BlockCanolaplant() {
|
||||
super(FabricBlockSettings.copy(Blocks.WHEAT));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||
DefaultedList<ItemStack> list = DefaultedList.of();
|
||||
list.add(new ItemStack(getSeedsItem())); // the one from the seed
|
||||
if (isMature(state)) {
|
||||
list.add(new ItemStack(getSeedsItem(), new Random().nextInt(2)));
|
||||
list.add(new ItemStack(QuickieItems.CANOLA, new Random().nextFloat() > 0.9f ? 2 : 1));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void spawnHarvested(World world, BlockPos pos, BlockState state) {
|
||||
DefaultedList<ItemStack> list = DefaultedList.of();
|
||||
getDroppedStacks(state, null).forEach(itemStack -> {
|
||||
list.add(itemStack);
|
||||
});
|
||||
ItemScatterer.spawn(world, pos, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||
spawnHarvested(world, pos, state);
|
||||
return super.onBreak(world, pos, state, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemConvertible getSeedsItem() {
|
||||
return QuickieItems.CANOLASEED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand,
|
||||
BlockHitResult hitResult) {
|
||||
if (!world.isClient && isMature(state)) {
|
||||
spawnHarvested(world, pos, state);
|
||||
world.setBlockState(pos, state.with(AGE, 0));
|
||||
}
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
}
|
@ -63,6 +63,6 @@ public class BlockCottonplant extends CropBlock {
|
||||
spawnHarvested(world, pos, state);
|
||||
world.setBlockState(pos, state.with(AGE, 0));
|
||||
}
|
||||
return super.onUse(state, world, pos, player, hand, hitResult);
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
}
|
@ -24,12 +24,13 @@ import net.minecraft.world.World;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockDrillDown extends FallingBlock implements BlockEntityProvider {
|
||||
public class BlockDrillDown extends DrillBlock implements BlockEntityProvider {
|
||||
|
||||
public BlockDrillDown() {
|
||||
super(FabricBlockSettings.create().hardness(2.5f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
||||
return new DrillBlockDownEntity(pos, blockState);
|
||||
}
|
||||
@ -47,7 +48,8 @@ public class BlockDrillDown extends FallingBlock implements BlockEntityProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state,
|
||||
BlockEntityType<T> type) {
|
||||
return (world1, pos, state1, be) -> DrillBlockDownEntity.tick(world1, pos, state1, be);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ import net.minecraft.world.World;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockDrillEast extends FallingBlock implements BlockEntityProvider {
|
||||
public class BlockDrillEast extends DrillBlock implements BlockEntityProvider {
|
||||
|
||||
public BlockDrillEast() {
|
||||
super(FabricBlockSettings.create().hardness(2.5f));
|
||||
|
@ -24,7 +24,7 @@ import net.minecraft.world.World;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockDrillNorth extends FallingBlock implements BlockEntityProvider {
|
||||
public class BlockDrillNorth extends DrillBlock implements BlockEntityProvider {
|
||||
|
||||
public BlockDrillNorth() {
|
||||
super(FabricBlockSettings.create().hardness(2.5f));
|
||||
|
@ -24,7 +24,7 @@ import net.minecraft.world.World;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockDrillSouth extends FallingBlock implements BlockEntityProvider {
|
||||
public class BlockDrillSouth extends DrillBlock implements BlockEntityProvider {
|
||||
|
||||
public BlockDrillSouth() {
|
||||
super(FabricBlockSettings.create().hardness(2.5f));
|
||||
|
@ -24,7 +24,7 @@ import net.minecraft.world.World;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockDrillWest extends FallingBlock implements BlockEntityProvider {
|
||||
public class BlockDrillWest extends DrillBlock implements BlockEntityProvider {
|
||||
|
||||
public BlockDrillWest() {
|
||||
super(FabricBlockSettings.create().hardness(2.5f));
|
||||
|
@ -0,0 +1,42 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.blocks;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.FallingBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
||||
import net.minecraft.world.explosion.Explosion;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockQuickiepowder extends FallingBlock {
|
||||
|
||||
public BlockQuickiepowder() {
|
||||
super(FabricBlockSettings.create().luminance(state -> 12));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.QUICKIEPOWDER, 9) });
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldDropItemsOnExplosion(Explosion explosion) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.blocks;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.CropBlock;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.ai.pathing.NavigationType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ItemScatterer;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockSulforpad extends CropBlock {
|
||||
|
||||
public BlockSulforpad(AbstractBlock.Settings settings) {
|
||||
super(settings.nonOpaque().blockVision(Blocks::never).solidBlock(Blocks::never));
|
||||
setDefaultState(getDefaultState().with(this.getAgeProperty(), 0));
|
||||
}
|
||||
|
||||
protected BlockSulforpad() {
|
||||
super(FabricBlockSettings.create());
|
||||
}
|
||||
|
||||
public static final Set<Block> getAllowedBlockHolder(){
|
||||
return Set.of(Blocks.LAVA, Blocks.LAVA_CAULDRON, Blocks.MAGMA_BLOCK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
growNow(state, world, pos, random);
|
||||
}
|
||||
|
||||
private void generateNeighbor(ServerWorld world, BlockPos pos, Random random) {
|
||||
int xOffset = random.nextInt(3) - 1;
|
||||
int zOffset = random.nextInt(3) - 1;
|
||||
BlockPos newPos = new BlockPos(pos).add(xOffset, 0, zOffset);
|
||||
if (getAllowedBlockHolder().contains(world.getBlockState(newPos).getBlock()) && world.getBlockState(newPos.up()).isAir()) {
|
||||
world.setBlockState(newPos, QuickieBlocks.SULFORPAD.getDefaultState(), Block.NOTIFY_LISTENERS);
|
||||
}
|
||||
}
|
||||
|
||||
private void growNow(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
int i;
|
||||
if ((i = this.getAge(state)) < this.getMaxAge()) {
|
||||
world.setBlockState(pos, this.withAge(i + 1), Block.NOTIFY_LISTENERS);
|
||||
} else {
|
||||
generateNeighbor(world, pos, random);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
|
||||
growNow(state, world, pos, random);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||
Integer age = this.getAge(state);
|
||||
Integer number = age < 3 ? 1 : (age < 6 ? 2 : 3);
|
||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SULPHOR, number) });
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
||||
return Block.createCuboidShape(1.0, 0.0, 1.0, 15.0, 1.5, 15.0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) {
|
||||
return getAllowedBlockHolder().contains(floor.getBlock()) && world.getBlockState(pos.up()).isAir();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemConvertible getSeedsItem() {
|
||||
return QuickieItems.SULPHOR;
|
||||
}
|
||||
|
||||
private void spawnHarvested(World world, BlockPos pos, BlockState state) {
|
||||
DefaultedList<ItemStack> list = DefaultedList.of();
|
||||
getDroppedStacks(state, null).forEach(itemStack -> {
|
||||
list.add(itemStack);
|
||||
});
|
||||
ItemScatterer.spawn(world, pos, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand,
|
||||
BlockHitResult hitResult) {
|
||||
if (!world.isClient && isMature(state)) {
|
||||
spawnHarvested(world, pos, state);
|
||||
Random random = world.getRandom();
|
||||
world.setBlockState(pos, state.with(AGE, random.nextInt(6)));
|
||||
}
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
|
||||
// do nothing here
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickStack(WorldView world, BlockPos pos, BlockState state) {
|
||||
return new ItemStack(QuickieItems.SULPHOR, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapCodec<? extends BlockSulforpad> getCodec() {
|
||||
return BlockSulforpad.createCodec(BlockSulforpad::new);
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.blocks;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.FallingBlock;
|
||||
import net.minecraft.entity.ItemEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.state.property.IntProperty;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public abstract class DrillBlock extends FallingBlock {
|
||||
private static final Integer MAX_FUEL = 255;
|
||||
public static final IntProperty FUEL = IntProperty.of("fuel", 0, MAX_FUEL);
|
||||
|
||||
public DrillBlock(Settings settings) {
|
||||
super(settings);
|
||||
setDefaultState(getDefaultState().with(FUEL, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||
Integer fuelLeft = state.get(FUEL);
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.CANOLABOTTLE, fuelLeft)));
|
||||
return super.onBreak(world, pos, state, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(net.minecraft.state.StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FUEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand,
|
||||
BlockHitResult hit) {
|
||||
Map<Item, Integer> loadings = new HashMap<>();
|
||||
loadings.put(QuickieItems.CANOLABOTTLE, 8);
|
||||
loadings.put(QuickieItems.CANOLABOTTLESTACK, 72);
|
||||
ItemStack stack = player.getStackInHand(hand);
|
||||
Item item = stack.getItem();
|
||||
if (stack.isEmpty() || !loadings.containsKey(item) ) {
|
||||
if (world.isClient()) {
|
||||
player.sendMessage(Text.translatable("msg.drill.fuelinfo", state.get(FUEL)));
|
||||
}
|
||||
} else {
|
||||
Integer fuelWeight = loadings.get(item);
|
||||
if (fuelWeight != null) {
|
||||
Integer load = MAX_FUEL - state.get(FUEL);
|
||||
if (load < fuelWeight) {
|
||||
Integer numberOfTooMuchLoad = fuelWeight - load;
|
||||
fuelWeight = load;
|
||||
}
|
||||
world.setBlockState(pos, state.with(FUEL, state.get(FUEL) + fuelWeight));
|
||||
if (item.equals(QuickieItems.CANOLABOTTLE)) {
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 1)));
|
||||
} else if (item.equals(QuickieItems.CANOLABOTTLESTACK)) {
|
||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 9)));
|
||||
}
|
||||
stack.decrement(1);
|
||||
}
|
||||
}
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
}
|
@ -19,6 +19,7 @@ public class QuickieBlocks {
|
||||
public static final BlockMonsterhoarder MONSTERHOARDER = new BlockMonsterhoarder();
|
||||
public static final BlockKelpstack KELPSTACK = new BlockKelpstack();
|
||||
public static final BlockCottonplant COTTONPLANT = new BlockCottonplant();
|
||||
public static final BlockCanolaplant CANOLAPLANT = new BlockCanolaplant();
|
||||
public static final BlockSulphor BLOCKSULPHOR = new BlockSulphor();
|
||||
public static final BlockSalpeter BLOCKSALPETER = new BlockSalpeter();
|
||||
public static final BlockDrillDown DRILL_DOWN = new BlockDrillDown();
|
||||
@ -34,5 +35,7 @@ public class QuickieBlocks {
|
||||
public static final BlockStackerNorth BLOCKSTACKERNORTH = new BlockStackerNorth();
|
||||
public static final BlockStackerSouth BLOCKSTACKERSOUTH = new BlockStackerSouth();
|
||||
public static final BlockSpreader BLOCKSPREADER = new BlockSpreader();
|
||||
public static final BlockSpeedpowder BLOCKSPEEDPOWDER = new BlockSpeedpowder();;
|
||||
public static final BlockSpeedpowder BLOCKSPEEDPOWDER = new BlockSpeedpowder();
|
||||
public static final BlockQuickiepowder BLOCKQUICKIEPOWDER = new BlockQuickiepowder();
|
||||
public static final BlockSulforpad SULFORPAD = new BlockSulforpad();
|
||||
}
|
||||
|
@ -72,6 +72,18 @@ public class EventBlockBreak {
|
||||
} else if (QuickieTools.SPEEDPOWDERHOE.equals(tool)) {
|
||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (QuickieTools.QUICKIEPOWDERAXE.equals(tool)) {
|
||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
||||
player, true);
|
||||
} else if (QuickieTools.QUICKIEPOWDERPICKAXE.equals(tool)) {
|
||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (QuickieTools.QUICKIEPOWDERSHOVEL.equals(tool)) {
|
||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (QuickieTools.QUICKIEPOWDERHOE.equals(tool)) {
|
||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ public class FeaturesManager {
|
||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_DIRTSALPETER = genCf("dirtsalpeter");
|
||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_SANDSALPETER = genCf("sandsalpeter");
|
||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESANDSALPETER = genCf("oresandsalpeter");
|
||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_SULFORPAD = genCf("sulforpad");
|
||||
// public static final SulforpadFeature CF_SULFORPAD = genCfOwn("sulforpad");
|
||||
|
||||
public static final RegistryKey<PlacedFeature> PF_ORESULPHOR = genPf("oresulphor");
|
||||
public static final RegistryKey<PlacedFeature> PF_OREDEEPSLATESULPHOR = genPf("oredeepslatesulphor");
|
||||
@ -35,6 +37,7 @@ public class FeaturesManager {
|
||||
public static final RegistryKey<PlacedFeature> PF_DIRTSALPETER = genPf("dirtsalpeter");
|
||||
public static final RegistryKey<PlacedFeature> PF_SANDSALPETER = genPf("sandsalpeter");
|
||||
public static final RegistryKey<PlacedFeature> PF_ORESANDSALPETER = genPf("oresandsalpeter");
|
||||
public static final RegistryKey<PlacedFeature> PF_SULFORPAD = genPf("sulforpad");
|
||||
|
||||
private static final RegistryKey<ConfiguredFeature<?, ?>> genCf(String name) {
|
||||
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, new Identifier(RegistryManager.QUICKIEFABRIC, name));
|
||||
@ -52,6 +55,7 @@ public class FeaturesManager {
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_SANDSALPETER);
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESANDSALPETER);
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_OREDEEPSLATESULPHOR);
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.VEGETAL_DECORATION, PF_SULFORPAD);
|
||||
};
|
||||
}
|
||||
|
||||
@ -59,6 +63,8 @@ public class FeaturesManager {
|
||||
return (bsc, bmc) -> {
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORENETHERSULPHOR);
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_BLOCKSULPHOR);
|
||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.VEGETAL_DECORATION, PF_SULFORPAD);
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -77,12 +77,19 @@ public class RegistryManager {
|
||||
stacks.add(new ItemStack(QuickieItems.SALPETER));
|
||||
stacks.add(new ItemStack(QuickieItems.SULPHOR));
|
||||
stacks.add(new ItemStack(QuickieItems.SPEEDPOWDER));
|
||||
stacks.add(new ItemStack(QuickieItems.QUICKIEPOWDER));
|
||||
stacks.add(new ItemStack(QuickieItems.SPEEDINGOT));
|
||||
stacks.add(new ItemStack(QuickieItems.QUICKIEINGOT));
|
||||
stacks.add(new ItemStack(QuickieItems.LEVELUP));
|
||||
stacks.add(new ItemStack(QuickieItems.PENCIL));
|
||||
stacks.add(new ItemStack(QuickieItems.ROTTEN_FLESH_STRIPES));
|
||||
stacks.add(new ItemStack(QuickieItems.CARROTSTACK));
|
||||
stacks.add(new ItemStack(QuickieItems.COTTON));
|
||||
stacks.add(new ItemStack(QuickieItems.COTTONSEED));
|
||||
stacks.add(new ItemStack(QuickieItems.CANOLA));
|
||||
stacks.add(new ItemStack(QuickieItems.CANOLASEED));
|
||||
stacks.add(new ItemStack(QuickieItems.CANOLABOTTLE));
|
||||
stacks.add(new ItemStack(QuickieItems.CANOLABOTTLESTACK));
|
||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_BROWN));
|
||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_WHITE));
|
||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_BLACK));
|
||||
@ -101,11 +108,17 @@ public class RegistryManager {
|
||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_LIGHTBLUE));
|
||||
stacks.add(new ItemStack(QuickieItems.BAG));
|
||||
stacks.add(new ItemStack(QuickieItems.STUB));
|
||||
stacks.add(new ItemStack(QuickieItems.OXIDIZEDCOPPERPOWDER));
|
||||
stacks.add(new ItemStack(QuickieTools.SPEEDPOWDERAXE));
|
||||
stacks.add(new ItemStack(QuickieTools.SPEEDPOWDERPICKAXE));
|
||||
stacks.add(new ItemStack(QuickieTools.SPEEDPOWDERSHOVEL));
|
||||
stacks.add(new ItemStack(QuickieTools.SPEEDPOWDERHOE));
|
||||
stacks.add(new ItemStack(QuickieTools.SPEEDPOWDERWATERHOE));
|
||||
stacks.add(new ItemStack(QuickieTools.QUICKIEPOWDERAXE));
|
||||
stacks.add(new ItemStack(QuickieTools.QUICKIEPOWDERPICKAXE));
|
||||
stacks.add(new ItemStack(QuickieTools.QUICKIEPOWDERSHOVEL));
|
||||
stacks.add(new ItemStack(QuickieTools.QUICKIEPOWDERHOE));
|
||||
stacks.add(new ItemStack(QuickieTools.QUICKIEPOWDERWATERHOE));
|
||||
stacks.add(new ItemStack(QuickieBlocks.DIRT_SALPETER));
|
||||
stacks.add(new ItemStack(QuickieBlocks.ORE_NETHER_SULPHOR));
|
||||
stacks.add(new ItemStack(QuickieBlocks.ORE_SALPETER));
|
||||
@ -121,6 +134,7 @@ public class RegistryManager {
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSULPHOR));
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSALPETER));
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSPEEDPOWDER));
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKQUICKIEPOWDER));
|
||||
stacks.add(new ItemStack(QuickieBlocks.DRILL_DOWN));
|
||||
stacks.add(new ItemStack(QuickieBlocks.DRILL_EAST));
|
||||
stacks.add(new ItemStack(QuickieBlocks.DRILL_SOUTH));
|
||||
@ -134,6 +148,7 @@ public class RegistryManager {
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSTACKERNORTH));
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSTACKERSOUTH));
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSPREADER));
|
||||
stacks.add(new ItemStack(QuickieBlocks.SULFORPAD));
|
||||
}).build());
|
||||
}
|
||||
|
||||
@ -198,9 +213,11 @@ public class RegistryManager {
|
||||
registerBlock(QuickieBlocks.MONSTERHOARDER, "monsterhoarder");
|
||||
registerBlock(QuickieBlocks.KELPSTACK, "kelpstack");
|
||||
registerBlock(QuickieBlocks.COTTONPLANT, "cottonplant");
|
||||
registerBlock(QuickieBlocks.CANOLAPLANT, "canolaplant");
|
||||
registerBlock(QuickieBlocks.BLOCKSULPHOR, "blocksulphor");
|
||||
registerBlock(QuickieBlocks.BLOCKSALPETER, "blocksalpeter");
|
||||
registerBlock(QuickieBlocks.BLOCKSPEEDPOWDER, "blockspeedpowder");
|
||||
registerBlock(QuickieBlocks.BLOCKQUICKIEPOWDER, "blockquickiepowder");
|
||||
registerBlock(QuickieBlocks.DRILL_DOWN, "drill");
|
||||
registerBlock(QuickieBlocks.DRILL_EAST, "drilleast");
|
||||
registerBlock(QuickieBlocks.DRILL_SOUTH, "drillsouth");
|
||||
@ -214,11 +231,13 @@ public class RegistryManager {
|
||||
registerBlock(QuickieBlocks.BLOCKSTACKERNORTH, "blockstackernorth");
|
||||
registerBlock(QuickieBlocks.BLOCKSTACKERSOUTH, "blockstackersouth");
|
||||
registerBlock(QuickieBlocks.BLOCKSPREADER, "blockspreader");
|
||||
registerBlock(QuickieBlocks.SULFORPAD, "sulforpad");
|
||||
}
|
||||
|
||||
public static final void registerItems() {
|
||||
LOGGER.debug("registering quickiefabric items");
|
||||
registerItem(QuickieItems.SPEEDPOWDER, "speedpowder");
|
||||
registerItem(QuickieItems.QUICKIEPOWDER, "quickiepowder");
|
||||
registerItem(QuickieItems.LEVELUP, "levelup");
|
||||
registerItem(QuickieItems.PENCIL, "pencil");
|
||||
registerItem(QuickieItems.SALPETER, "salpeter");
|
||||
@ -227,6 +246,10 @@ public class RegistryManager {
|
||||
registerItem(QuickieItems.CARROTSTACK, "carrotstack");
|
||||
registerItem(QuickieItems.COTTON, "cotton");
|
||||
registerItem(QuickieItems.COTTONSEED, "cottonseed");
|
||||
registerItem(QuickieItems.CANOLA, "canola");
|
||||
registerItem(QuickieItems.CANOLASEED, "canolaseed");
|
||||
registerItem(QuickieItems.CANOLABOTTLE, "canolabottle");
|
||||
registerItem(QuickieItems.CANOLABOTTLESTACK, "canolabottlestack");
|
||||
registerItem(QuickieItems.BACKPACK_BROWN, "backpack_brown");
|
||||
registerItem(QuickieItems.BACKPACK_WHITE, "backpack_white");
|
||||
registerItem(QuickieItems.BACKPACK_BLACK, "backpack_black");
|
||||
@ -245,9 +268,14 @@ public class RegistryManager {
|
||||
registerItem(QuickieItems.BACKPACK_LIGHTBLUE, "backpack_lightblue");
|
||||
registerItem(QuickieItems.BAG, "bag");
|
||||
registerItem(QuickieItems.STUB, "stub");
|
||||
registerItem(QuickieItems.OXIDIZEDCOPPERPOWDER, "oxidizedcopperpowder");
|
||||
registerItem(QuickieItems.SPEEDINGOT, "speedingot");
|
||||
registerItem(QuickieItems.QUICKIEINGOT, "quickieingot");
|
||||
|
||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.COTTONSEED, 0.5f);
|
||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.COTTON, 0.75f);
|
||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.CANOLASEED, 0.5f);
|
||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.CANOLA, 0.75f);
|
||||
|
||||
FuelRegistry.INSTANCE.add(QuickieItems.SULPHOR, 200);
|
||||
FuelRegistry.INSTANCE.add(QuickieBlocks.BLOCKSULPHOR, 2000);
|
||||
@ -261,6 +289,11 @@ public class RegistryManager {
|
||||
registerItem(QuickieTools.SPEEDPOWDERSHOVEL, "speedpowdershovel");
|
||||
registerItem(QuickieTools.SPEEDPOWDERHOE, "speedpowderhoe");
|
||||
registerItem(QuickieTools.SPEEDPOWDERWATERHOE, "speedpowderwaterhoe");
|
||||
registerItem(QuickieTools.QUICKIEPOWDERAXE, "quickiepowderaxe");
|
||||
registerItem(QuickieTools.QUICKIEPOWDERPICKAXE, "quickiepowderpickaxe");
|
||||
registerItem(QuickieTools.QUICKIEPOWDERSHOVEL, "quickiepowdershovel");
|
||||
registerItem(QuickieTools.QUICKIEPOWDERHOE, "quickiepowderhoe");
|
||||
registerItem(QuickieTools.QUICKIEPOWDERWATERHOE, "quickiepowderwaterhoe");
|
||||
}
|
||||
|
||||
public static final void registerContainer() {
|
||||
@ -290,7 +323,8 @@ public class RegistryManager {
|
||||
public static final void registerLootings() {
|
||||
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
|
||||
if (isGrass(id)) {
|
||||
tableBuilder.pool(LootHelper.build(1, QuickieItems.COTTONSEED, 0.125f));
|
||||
tableBuilder.pool(LootHelper.build(1, QuickieItems.COTTONSEED, 0.025f));
|
||||
tableBuilder.pool(LootHelper.build(1, QuickieItems.CANOLASEED, 0.05f));
|
||||
tableBuilder.pool(LootHelper.build(2, QuickieItems.SALPETER, 0.012f));
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemCanola extends Item {
|
||||
|
||||
public ItemCanola() {
|
||||
super(new FabricItemSettings().maxCount(64));
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemCanolabottle extends Item {
|
||||
|
||||
public ItemCanolabottle() {
|
||||
super(new FabricItemSettings().maxCount(64));
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemCanolabottlestack extends Item {
|
||||
|
||||
public ItemCanolabottlestack() {
|
||||
super(new FabricItemSettings().maxCount(64));
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.QuickieBlocks;
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemCanolaseed extends Item {
|
||||
|
||||
public ItemCanolaseed() {
|
||||
super(new FabricItemSettings().maxCount(64));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||
BlockPos pos = context.getBlockPos();
|
||||
World world = context.getWorld();
|
||||
if (QuickieItems.CANOLASEED.equals(context.getStack().getItem())) {
|
||||
BlockState state = world.getBlockState(pos);
|
||||
if (Blocks.FARMLAND.equals(state.getBlock()) && world.getBlockState(pos.up()).isAir()) {
|
||||
world.setBlockState(pos.up(), QuickieBlocks.CANOLAPLANT.getDefaultState());
|
||||
context.getStack().decrement(1);
|
||||
}
|
||||
}
|
||||
return super.useOnBlock(context);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemOxidizedcopperpowder extends Item {
|
||||
|
||||
public ItemOxidizedcopperpowder() {
|
||||
super(new FabricItemSettings().maxCount(64));
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemQuickieingot extends Item {
|
||||
|
||||
public ItemQuickieingot() {
|
||||
super(new FabricItemSettings());
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemQuickiepowder extends Item {
|
||||
|
||||
public ItemQuickiepowder() {
|
||||
super(new FabricItemSettings());
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ItemSpeedingot extends Item {
|
||||
|
||||
public ItemSpeedingot() {
|
||||
super(new FabricItemSettings());
|
||||
}
|
||||
}
|
@ -1,7 +1,19 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.items;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.BlockSulforpad;
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.QuickieBlocks;
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BoatItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.RaycastContext;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -13,4 +25,24 @@ public class ItemSulphor extends Item {
|
||||
public ItemSulphor() {
|
||||
super(new FabricItemSettings());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
|
||||
ItemStack itemStack = user.getStackInHand(hand);
|
||||
BlockHitResult hitResult = BoatItem.raycast(world, user, RaycastContext.FluidHandling.SOURCE_ONLY);
|
||||
if (((HitResult) hitResult).getType() == HitResult.Type.MISS) {
|
||||
return TypedActionResult.pass(itemStack);
|
||||
}
|
||||
if (((HitResult) hitResult).getType() == HitResult.Type.BLOCK) {
|
||||
if (!world.isClient) {
|
||||
BlockPos pos = hitResult.getBlockPos();
|
||||
if (BlockSulforpad.getAllowedBlockHolder().contains(world.getBlockState(pos).getBlock()) && world.getBlockState(pos.up()).isAir()) {
|
||||
world.setBlockState(pos.up(), QuickieBlocks.SULFORPAD.getDefaultState());
|
||||
itemStack.decrement(1);
|
||||
}
|
||||
}
|
||||
return TypedActionResult.success(itemStack, world.isClient());
|
||||
}
|
||||
return TypedActionResult.pass(itemStack);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ package de.jottyfan.minecraft.quickiefabric.items;
|
||||
*/
|
||||
public class QuickieItems {
|
||||
public static final ItemSpeedpowder SPEEDPOWDER = new ItemSpeedpowder();
|
||||
public static final ItemQuickiepowder QUICKIEPOWDER = new ItemQuickiepowder();
|
||||
public static final ItemLevelup LEVELUP = new ItemLevelup();
|
||||
public static final ItemPencil PENCIL = new ItemPencil();
|
||||
public static final ItemSalpeter SALPETER = new ItemSalpeter();
|
||||
@ -32,5 +33,12 @@ public class QuickieItems {
|
||||
public static final ItemCarrotstack CARROTSTACK = new ItemCarrotstack();
|
||||
public static final ItemCotton COTTON = new ItemCotton();
|
||||
public static final ItemCottonseed COTTONSEED = new ItemCottonseed();
|
||||
public static final ItemCanola CANOLA = new ItemCanola();
|
||||
public static final ItemCanolaseed CANOLASEED = new ItemCanolaseed();
|
||||
public static final ItemStub STUB = new ItemStub();
|
||||
public static final ItemOxidizedcopperpowder OXIDIZEDCOPPERPOWDER = new ItemOxidizedcopperpowder();
|
||||
public static final ItemSpeedingot SPEEDINGOT = new ItemSpeedingot();
|
||||
public static final ItemQuickieingot QUICKIEINGOT = new ItemQuickieingot();
|
||||
public static final ItemCanolabottle CANOLABOTTLE = new ItemCanolabottle();
|
||||
public static final ItemCanolabottlestack CANOLABOTTLESTACK = new ItemCanolabottlestack();
|
||||
}
|
||||
|
@ -11,4 +11,9 @@ public class QuickieTools {
|
||||
public static final ToolSpeedpowderShovel SPEEDPOWDERSHOVEL = new ToolSpeedpowderShovel();
|
||||
public static final ToolSpeedpowderHoe SPEEDPOWDERHOE = new ToolSpeedpowderHoe();
|
||||
public static final ToolSpeedpowderWaterHoe SPEEDPOWDERWATERHOE = new ToolSpeedpowderWaterHoe();
|
||||
public static final ToolQuickiepowderAxe QUICKIEPOWDERAXE = new ToolQuickiepowderAxe();
|
||||
public static final ToolQuickiepowderPickaxe QUICKIEPOWDERPICKAXE = new ToolQuickiepowderPickaxe();
|
||||
public static final ToolQuickiepowderShovel QUICKIEPOWDERSHOVEL = new ToolQuickiepowderShovel();
|
||||
public static final ToolQuickiepowderHoe QUICKIEPOWDERHOE = new ToolQuickiepowderHoe();
|
||||
public static final ToolQuickiepowderWaterHoe QUICKIEPOWDERWATERHOE = new ToolQuickiepowderWaterHoe();
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolQuickiepowderAxe extends ToolRangeableAxe {
|
||||
|
||||
public ToolQuickiepowderAxe() {
|
||||
super(ToolMaterials.DIAMOND, 5, 2.0f, new FabricItemSettings());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
// TODO: get the range from the stack
|
||||
return new HarvestRange(64, 128, 64); // trees bigger than that are too heavy for one small axe...
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolQuickiepowderHoe extends ToolRangeableHoe {
|
||||
|
||||
public static final Integer DEFAULT_PLOW_RANGE = 4;
|
||||
|
||||
public ToolQuickiepowderHoe() {
|
||||
super(ToolMaterials.DIAMOND, 4, 2.0f, new FabricItemSettings(), new HarvestRange(DEFAULT_PLOW_RANGE));
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolQuickiepowderPickaxe extends PickaxeItem implements ToolRangeable {
|
||||
|
||||
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 6, 6, 6 };
|
||||
|
||||
public ToolQuickiepowderPickaxe() {
|
||||
super(ToolMaterials.DIAMOND, 5, 2.0f, new FabricItemSettings());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
NbtCompound tag = stack.getNbt();
|
||||
int[] range = tag.getIntArray("range");
|
||||
if (range.length < 3) {
|
||||
range = DEFAULT_HARVEST_RANGE;
|
||||
tag.putIntArray("range", range);
|
||||
}
|
||||
return new HarvestRange(range);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockIn) {
|
||||
return super.isSuitableFor(blockIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Block> getBlockList(Block block) {
|
||||
return Lists.newArrayList(block);
|
||||
}
|
||||
|
||||
public void setPlusRange(ItemStack stack, Integer plusRange) {
|
||||
NbtCompound tag = stack.getNbt();
|
||||
int[] range = tag.getIntArray("range");
|
||||
if (range.length < 3) {
|
||||
range = DEFAULT_HARVEST_RANGE;
|
||||
}
|
||||
HarvestRange harvestRange = new HarvestRange(range);
|
||||
harvestRange.addXYZ(plusRange);
|
||||
tag.putIntArray("range", harvestRange.getRangeAsArray());
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) {
|
||||
// CommonToolCode.onItemRightClick(worldIn, playerIn, handIn);
|
||||
// return super.onItemRightClick(worldIn, playerIn, handIn);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
|
||||
// CommonToolCode.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
// super.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
// }
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.item.ShovelItem;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolQuickiepowderShovel extends ShovelItem implements ToolRangeable {
|
||||
public static final Integer DEFAULT_HARVEST_RANGE = 6;
|
||||
public HarvestRange range;
|
||||
|
||||
public ToolQuickiepowderShovel() {
|
||||
super(ToolMaterials.DIAMOND, 5, 2.0f, new FabricItemSettings());
|
||||
this.range = new HarvestRange(DEFAULT_HARVEST_RANGE);
|
||||
}
|
||||
|
||||
private void createPathOnGrass(World world, BlockPos pos, Direction side) {
|
||||
BlockState blockState = world.getBlockState(pos);
|
||||
if (blockState.isAir()) {
|
||||
// try to find one underneath
|
||||
pos = pos.down();
|
||||
blockState = world.getBlockState(pos);
|
||||
} else if (!world.getBlockState(pos.up()).isAir()) {
|
||||
pos = pos.up();
|
||||
blockState = world.getBlockState(pos);
|
||||
}
|
||||
if (side != Direction.DOWN) {
|
||||
BlockState blockState2 = (BlockState) PATH_STATES.get(blockState.getBlock());
|
||||
if (blockState2 != null && world.getBlockState(pos.up()).isAir()) {
|
||||
if (!world.isClient) {
|
||||
world.setBlockState(pos, blockState2, 11);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||
World world = context.getWorld();
|
||||
BlockPos pos = context.getBlockPos();
|
||||
BlockPos[] positions = new BlockPos[] { pos.north().north().west().west(), pos.north().north().west(),
|
||||
pos.north().north(), pos.north().north().east(), pos.north().north().east().east(), pos.north().west().west(),
|
||||
pos.north().west(), pos.north(), pos.north().east(), pos.north().east().east(), pos.west().west(), pos.west(),
|
||||
pos, pos.east(), pos.east().east(), pos.south().west().west(), pos.south().west(), pos.south(),
|
||||
pos.south().east(), pos.south().east().east(), pos.south().south().west().west(), pos.south().south().west(),
|
||||
pos.south().south(), pos.south().south().east(), pos.south().south().east().east() };
|
||||
for (BlockPos p : positions) {
|
||||
createPathOnGrass(world, p, context.getSide());
|
||||
}
|
||||
return super.useOnBlock(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
// TODO: get range from stack
|
||||
return range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockState) {
|
||||
return super.isSuitableFor(blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Block> getBlockList(Block block) {
|
||||
return Lists.newArrayList(block);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) {
|
||||
// CommonToolCode.onItemRightClick(worldIn, playerIn, handIn);
|
||||
// return super.onItemRightClick(worldIn, playerIn, handIn);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
|
||||
// CommonToolCode.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
// super.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
// }
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolQuickiepowderWaterHoe extends ToolQuickiepowderHoe {
|
||||
@Override
|
||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||
ActionResult res = super.useOnBlock(context);
|
||||
if (!ActionResult.PASS.equals(res)) {
|
||||
BlockPos pos = context.getBlockPos();
|
||||
World world = context.getWorld();
|
||||
world.setBlockState(pos, Blocks.WATER.getDefaultState());
|
||||
Hand hand = context.getHand();
|
||||
PlayerEntity player = context.getPlayer();
|
||||
ItemStack oldTool = player.getStackInHand(hand);
|
||||
ItemStack newTool = new ItemStack(QuickieTools.QUICKIEPOWDERHOE);
|
||||
newTool.setDamage(oldTool.getDamage());
|
||||
player.setStackInHand(hand, newTool);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
@ -3,7 +3,6 @@ package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.terraformersmc.terraform.leaves.block.ExtendedLeavesBlock;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
@ -27,7 +26,7 @@ public class ToolRangeableAxe extends AxeItem implements ToolRangeable {
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
// TODO: get the range from the stack
|
||||
return new HarvestRange(64, 128, 64); // trees bigger than that are too heavy for one small axe...
|
||||
return new HarvestRange(16, 32, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -43,7 +42,15 @@ public class ToolRangeableAxe extends AxeItem implements ToolRangeable {
|
||||
*/
|
||||
private boolean isLeavesBlock(BlockState blockIn) {
|
||||
boolean vanillaLeaves = blockIn.getBlock() instanceof LeavesBlock;
|
||||
boolean terrestriaLeaves = blockIn.getBlock() instanceof ExtendedLeavesBlock;
|
||||
boolean terrestriaLeaves = false;
|
||||
try {
|
||||
Class<?> extendedLeavesBlock = Class.forName("com.terraformersmc.terraform.leaves.block.ExtendedLeavesBlock");
|
||||
terrestriaLeaves = extendedLeavesBlock.isInstance(blockIn.getBlock());
|
||||
} catch (ClassNotFoundException e) {
|
||||
// no terrestria mod available, so ignore this
|
||||
// using this approach instead of the instanceof functionality, we don't need to refer to terrestria
|
||||
// and omit a crash on installations that do not have or want terrestria available
|
||||
}
|
||||
boolean blockTagLeaves = blockIn.isIn(BlockTags.LEAVES);
|
||||
return vanillaLeaves || terrestriaLeaves || blockTagLeaves;
|
||||
}
|
||||
|
@ -0,0 +1,97 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.CropBlock;
|
||||
import net.minecraft.item.HoeItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public abstract class ToolRangeableHoe extends HoeItem implements ToolRangeable {
|
||||
|
||||
public HarvestRange range;
|
||||
|
||||
public ToolRangeableHoe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings, HarvestRange range) {
|
||||
super(material, attackDamage, attackSpeed, settings);
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||
ActionResult res = super.useOnBlock(context);
|
||||
boolean isCrop = context.getWorld().getBlockState(context.getBlockPos()).getBlock() instanceof CropBlock;
|
||||
if (!ActionResult.PASS.equals(res) || isCrop) {
|
||||
for (int x = -this.range.getxRange(); x <= this.range.getxRange(); x++) {
|
||||
for (int y = -this.range.getyRange(); y <= this.range.getyRange(); y++) {
|
||||
for (int z = -this.range.getzRange(); z <= this.range.getzRange(); z++) {
|
||||
if (!isCrop) {
|
||||
removePossibleGrass(context.getWorld(), new BlockPos(x, y, z));
|
||||
BlockHitResult bhr = new BlockHitResult(context.getHitPos(), Direction.UP,
|
||||
context.getBlockPos().add(new Vec3i(x, y, z)), isDamageable());
|
||||
ItemUsageContext ctx = new ItemUsageContext(context.getPlayer(), context.getHand(), bhr);
|
||||
super.useOnBlock(ctx);
|
||||
} else {
|
||||
harvestIfPossible(context.getBlockPos().add(x, y, z), context.getWorld());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private void removePossibleGrass(World world, BlockPos pos) {
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
Boolean grassFound = Blocks.FERN.equals(block) || Blocks.LARGE_FERN.equals(block)
|
||||
|| Blocks.SHORT_GRASS.equals(block) || Blocks.TALL_GRASS.equals(block);
|
||||
if (grassFound) {
|
||||
world.breakBlock(pos, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void harvestIfPossible(BlockPos pos, World world) {
|
||||
BlockState blockState = world.getBlockState(pos);
|
||||
Block block = blockState.getBlock();
|
||||
if (block instanceof CropBlock) {
|
||||
CropBlock cBlock = (CropBlock) block;
|
||||
if (cBlock.isMature(blockState)) {
|
||||
Block.dropStacks(blockState, world, pos);
|
||||
world.setBlockState(pos, cBlock.withAge(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
// TODO: get range from stack
|
||||
return range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockState) {
|
||||
return super.isSuitableFor(blockState) || Blocks.TALL_GRASS.equals(blockState.getBlock())
|
||||
|| Blocks.FERN.equals(blockState.getBlock()) || Blocks.LARGE_FERN.equals(blockState.getBlock());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Block> getBlockList(Block block) {
|
||||
return Lists.newArrayList(block);
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
|
||||
/**
|
||||
@ -13,4 +14,10 @@ public class ToolSpeedpowderAxe extends ToolRangeableAxe {
|
||||
public ToolSpeedpowderAxe() {
|
||||
super(ToolMaterials.DIAMOND, 4, 2.0f, new FabricItemSettings());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
// TODO: get the range from the stack
|
||||
return new HarvestRange(32, 64, 32);
|
||||
}
|
||||
}
|
||||
|
@ -1,104 +1,18 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.CropBlock;
|
||||
import net.minecraft.item.HoeItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolSpeedpowderHoe extends HoeItem implements ToolRangeable {
|
||||
public class ToolSpeedpowderHoe extends ToolRangeableHoe {
|
||||
|
||||
public static final Integer DEFAULT_PLOW_RANGE = 4;
|
||||
public HarvestRange range;
|
||||
public static final Integer DEFAULT_PLOW_RANGE = 2;
|
||||
|
||||
public ToolSpeedpowderHoe() {
|
||||
super(ToolMaterials.DIAMOND, 4, 2.0f, new FabricItemSettings());
|
||||
this.range = new HarvestRange(DEFAULT_PLOW_RANGE);
|
||||
super(ToolMaterials.DIAMOND, 4, 2.0f, new FabricItemSettings(), new HarvestRange(DEFAULT_PLOW_RANGE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||
ActionResult res = super.useOnBlock(context);
|
||||
boolean isCrop = context.getWorld().getBlockState(context.getBlockPos()).getBlock() instanceof CropBlock;
|
||||
if (!ActionResult.PASS.equals(res) || isCrop) {
|
||||
for (int x = -this.range.getxRange(); x <= this.range.getxRange(); x++) {
|
||||
for (int y = -this.range.getyRange(); y <= this.range.getyRange(); y++) {
|
||||
for (int z = -this.range.getzRange(); z <= this.range.getzRange(); z++) {
|
||||
if (!isCrop) {
|
||||
BlockHitResult bhr = new BlockHitResult(context.getHitPos(), Direction.UP,
|
||||
context.getBlockPos().add(new Vec3i(x, y, z)), isDamageable());
|
||||
ItemUsageContext ctx = new ItemUsageContext(context.getPlayer(), context.getHand(), bhr);
|
||||
super.useOnBlock(ctx);
|
||||
} else {
|
||||
harvestIfPossible(context.getBlockPos().add(x, y, z), context.getWorld());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private void harvestIfPossible(BlockPos pos, World world) {
|
||||
BlockState blockState = world.getBlockState(pos);
|
||||
Block block = blockState.getBlock();
|
||||
if (block instanceof CropBlock) {
|
||||
CropBlock cBlock = (CropBlock) block;
|
||||
if (cBlock.isMature(blockState)) {
|
||||
Block.dropStacks(blockState, world, pos);
|
||||
world.setBlockState(pos, cBlock.withAge(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
// TODO: get range from stack
|
||||
return range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockState) {
|
||||
return super.isSuitableFor(blockState)
|
||||
|| Blocks.TALL_GRASS.equals(blockState.getBlock())
|
||||
|| Blocks.FERN.equals(blockState.getBlock())
|
||||
|| Blocks.LARGE_FERN.equals(blockState.getBlock());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Block> getBlockList(Block block) {
|
||||
return Lists.newArrayList(block);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) {
|
||||
// CommonToolCode.onItemRightClick(worldIn, playerIn, handIn);
|
||||
// return super.onItemRightClick(worldIn, playerIn, handIn);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
|
||||
// CommonToolCode.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
// super.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
// }
|
||||
}
|
||||
|
@ -15,15 +15,6 @@ import net.minecraft.world.World;
|
||||
*
|
||||
*/
|
||||
public class ToolSpeedpowderWaterHoe extends ToolSpeedpowderHoe {
|
||||
|
||||
public static final Integer DEFAULT_PLOW_RANGE = 4;
|
||||
public HarvestRange range;
|
||||
|
||||
public ToolSpeedpowderWaterHoe() {
|
||||
super();
|
||||
this.range = new HarvestRange(DEFAULT_PLOW_RANGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||
ActionResult res = super.useOnBlock(context);
|
||||
|
@ -0,0 +1,43 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.world.gen.feature;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.QuickieBlocks;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.util.FeatureContext;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public class SulforpadFeature extends Feature<SulforpadFeatureConfig> {
|
||||
|
||||
public SulforpadFeature(Codec<SulforpadFeatureConfig> configCodec) {
|
||||
super(configCodec);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(FeatureContext<SulforpadFeatureConfig> context) {
|
||||
StructureWorldAccess world = context.getWorld();
|
||||
BlockPos pos = context.getOrigin();
|
||||
BlockState blockState = QuickieBlocks.SULFORPAD.getDefaultState();
|
||||
BlockPos currentPos = new BlockPos(pos);
|
||||
for (int y = 0; y < world.getHeight(); y++) {
|
||||
currentPos = currentPos.up();
|
||||
if (world.getBlockState(currentPos).isOf(Blocks.LAVA)) {
|
||||
if (world.getBlockState(currentPos.up()).isAir()) {
|
||||
world.setBlockState(currentPos.up(), blockState, 0x10);
|
||||
currentPos = currentPos.up();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.world.gen.feature;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.gen.feature.FeatureConfig;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public record SulforpadFeatureConfig(Identifier blockId) implements FeatureConfig {
|
||||
public static Codec<SulforpadFeatureConfig> CODEC = RecordCodecBuilder
|
||||
.create(o -> o.group(Identifier.CODEC.fieldOf("blockID").forGetter(SulforpadFeatureConfig::blockId)).apply(o,
|
||||
SulforpadFeatureConfig::new));
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "quickiefabric:block/blockquickiepowder"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"variants": {
|
||||
"age=0": { "model": "quickiefabric:block/canolaplant0" },
|
||||
"age=1": { "model": "quickiefabric:block/canolaplant1" },
|
||||
"age=2": { "model": "quickiefabric:block/canolaplant2" },
|
||||
"age=3": { "model": "quickiefabric:block/canolaplant3" },
|
||||
"age=4": { "model": "quickiefabric:block/canolaplant4" },
|
||||
"age=5": { "model": "quickiefabric:block/canolaplant5" },
|
||||
"age=6": { "model": "quickiefabric:block/canolaplant6" },
|
||||
"age=7": { "model": "quickiefabric:block/canolaplant7" }
|
||||
}
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
"variants": {
|
||||
"age=0": { "model": "quickiefabric:block/cottonplant0" },
|
||||
"age=1": { "model": "quickiefabric:block/cottonplant1" },
|
||||
"age=2": { "model": "quickiefabric:block/cottonplant1" },
|
||||
"age=3": { "model": "quickiefabric:block/cottonplant2" },
|
||||
"age=4": { "model": "quickiefabric:block/cottonplant2" },
|
||||
"age=5": { "model": "quickiefabric:block/cottonplant3" },
|
||||
"age=6": { "model": "quickiefabric:block/cottonplant3" },
|
||||
"age=7": { "model": "quickiefabric:block/cottonplant4" }
|
||||
"age=2": { "model": "quickiefabric:block/cottonplant2" },
|
||||
"age=3": { "model": "quickiefabric:block/cottonplant3" },
|
||||
"age=4": { "model": "quickiefabric:block/cottonplant4" },
|
||||
"age=5": { "model": "quickiefabric:block/cottonplant5" },
|
||||
"age=6": { "model": "quickiefabric:block/cottonplant6" },
|
||||
"age=7": { "model": "quickiefabric:block/cottonplant7" }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"variants": {
|
||||
"age=0": { "model": "quickiefabric:block/sulforpad0" },
|
||||
"age=1": { "model": "quickiefabric:block/sulforpad0" },
|
||||
"age=2": { "model": "quickiefabric:block/sulforpad0" },
|
||||
"age=3": { "model": "quickiefabric:block/sulforpad0" },
|
||||
"age=4": { "model": "quickiefabric:block/sulforpad1" },
|
||||
"age=5": { "model": "quickiefabric:block/sulforpad1" },
|
||||
"age=6": { "model": "quickiefabric:block/sulforpad1" },
|
||||
"age=7": { "model": "quickiefabric:block/sulforpad2" }
|
||||
}
|
||||
}
|
@ -6,6 +6,12 @@
|
||||
"item.quickiefabric.speedpowderhoe": "Fluchtpulverfeldhacke",
|
||||
"item.quickiefabric.speedpowderwaterhoe": "bewässerte Fluchtpulverfeldhacke",
|
||||
"item.quickiefabric.speedpowder": "Fluchtpulver",
|
||||
"item.quickiefabric.quickiepowder": "Eilpulver",
|
||||
"item.quickiefabric.quickiepowderaxe": "Eilpulveraxt",
|
||||
"item.quickiefabric.quickiepowderpickaxe": "Eilpulverspitzhacke",
|
||||
"item.quickiefabric.quickiepowdershovel": "Eilpulverschaufel",
|
||||
"item.quickiefabric.quickiepowderhoe": "Eilpulverfeldhacke",
|
||||
"item.quickiefabric.quickiepowderwaterhoe": "bewässerte Eilpulverfeldhacke",
|
||||
"item.quickiefabric.sulphor": "Schwefel",
|
||||
"item.quickiefabric.salpeter": "Salpeter",
|
||||
"item.quickiefabric.construction0": "leerer Bauplan",
|
||||
@ -34,7 +40,14 @@
|
||||
"item.quickiefabric.carrotstack": "Karottenbündel",
|
||||
"item.quickiefabric.cotton": "Baumwolle",
|
||||
"item.quickiefabric.cottonseed": "Baumwollsaat",
|
||||
"item.quickiefabric.canola": "Raps",
|
||||
"item.quickiefabric.canolaseed": "Rapssaat",
|
||||
"item.quickiefabric.canolabottle": "Rapsöl",
|
||||
"item.quickiefabric.canolabottlestack": "Rapsölsammlung",
|
||||
"item.quickiefabric.stub": "Stummel",
|
||||
"item.quickiefabric.oxidizedcopperpowder": "oxidiertes Kupferpulver",
|
||||
"item.quickiefabric.speedingot": "Fluchtpulverbarren",
|
||||
"item.quickiefabric.quickieingot": "Eilpulverbarren",
|
||||
"block.quickiefabric.orenethersulphor": "Nether-Schwefel",
|
||||
"block.quickiefabric.oresalpeter": "Salpetererz",
|
||||
"block.quickiefabric.oresandsalpeter": "Salpetergestein",
|
||||
@ -59,6 +72,7 @@
|
||||
"block.quickiefabric.blocksulphor": "Schwefelblock",
|
||||
"block.quickiefabric.blocksalpeter": "Salpeterblock",
|
||||
"block.quickiefabric.blockspeedpowder": "Fluchtpulverblock",
|
||||
"block.quickiefabric.blockquickiepowder": "Eilpulverblock",
|
||||
"block.quickiefabric.drill": "Bohrer",
|
||||
"block.quickiefabric.drilleast": "Ost-Bohrer",
|
||||
"block.quickiefabric.drillsouth": "Süd-Bohrer",
|
||||
@ -72,6 +86,7 @@
|
||||
"block.quickiefabric.blockstackernorth": "Nordstapler",
|
||||
"block.quickiefabric.blockstackersouth": "Südstapler",
|
||||
"block.quickiefabric.blockspreader": "Blockverteiler",
|
||||
"block.quickiefabric.sulforpad": "Schwefelablagerung",
|
||||
"container.quickiefabric.backpack": "Rucksack",
|
||||
"container.quickiefabric.blockstacker": "Blockstapler",
|
||||
"msg.buildingplan.start": "beginne Konstruktionsaufnahme bei %s,%s,%s",
|
||||
@ -90,5 +105,6 @@
|
||||
"msg.backpack.transfer.filled": "Der Rucksack wurde befüllt.",
|
||||
"msg.backpack.transfer.cleared": "Der Rucksackinhalt wurde soweit möglich geleert.",
|
||||
"msg.backpack.transfer.cancel": "Entweder der Rucksack oder die Kiste sind nicht komplett leer.",
|
||||
"msg.drill.fuelinfo": "Der Bohrer hat noch eine Ladung für den Abbau von %s Blöcken. Er kann mit Rapsöl aufgeladen werden.",
|
||||
"error.unleveling.inventory.full": "Es ist kein Platz mehr frei, um die Aufwertungen abzulegen."
|
||||
}
|
||||
|
@ -6,6 +6,12 @@
|
||||
"item.quickiefabric.speedpowderhoe": "speedpowder hoe",
|
||||
"item.quickiefabric.speedpowderwaterhoe": "watered speedpowder hoe",
|
||||
"item.quickiefabric.speedpowder": "speedpowder",
|
||||
"item.quickiefabric.quickiepowder": "hurrypowder",
|
||||
"item.quickiefabric.quickiepowderaxe": "hurrypowder axe",
|
||||
"item.quickiefabric.quickiepowderpickaxe": "hurrypowder pickaxe",
|
||||
"item.quickiefabric.quickiepowdershovel": "hurrypowder shovel",
|
||||
"item.quickiefabric.quickiepowderhoe": "hurrypowder hoe",
|
||||
"item.quickiefabric.quickiepowderwaterhoe": "watered hurrypowder hoe",
|
||||
"item.quickiefabric.sulphor": "sulfur",
|
||||
"item.quickiefabric.salpeter": "salpeter",
|
||||
"item.quickiefabric.construction0": "empty building plan",
|
||||
@ -34,7 +40,14 @@
|
||||
"item.quickiefabric.carrotstack": "a bundle of carrots",
|
||||
"item.quickiefabric.cotton": "cotton",
|
||||
"item.quickiefabric.cottonseed": "cotton seed",
|
||||
"item.quickiefabric.canola": "canola",
|
||||
"item.quickiefabric.canolaseed": "canola seed",
|
||||
"item.quickiefabric.canolabottle": "canola oil",
|
||||
"item.quickiefabric.canolabottlestack": "canola oil collection",
|
||||
"item.quickiefabric.stub": "stub",
|
||||
"item.quickiefabric.oxidizedcopperpowder": "oxidized copper powder",
|
||||
"item.quickiefabric.speedingot": "Speedpowderingot",
|
||||
"item.quickiefabric.quickieingot": "Hurrypowderingot",
|
||||
"block.quickiefabric.orenethersulphor": "nether sulfur",
|
||||
"block.quickiefabric.oresalpeter": "salpeter ore",
|
||||
"block.quickiefabric.oresandsalpeter": "salpeter stone",
|
||||
@ -59,6 +72,7 @@
|
||||
"block.quickiefabric.blocksulphor": "block of sulfur",
|
||||
"block.quickiefabric.blocksalpeter": "block of salpeter",
|
||||
"block.quickiefabric.blockspeedpowder": "block of speedpowder",
|
||||
"block.quickiefabric.blockquickiepowder": "block of hurrypowder",
|
||||
"block.quickiefabric.drill": "drill",
|
||||
"block.quickiefabric.drilleast": "east drill",
|
||||
"block.quickiefabric.drillsouth": "south drill",
|
||||
@ -72,6 +86,7 @@
|
||||
"block.quickiefabric.blockstackernorth": "north stacker",
|
||||
"block.quickiefabric.blockstackersouth": "south stacker",
|
||||
"block.quickiefabric.blockspreader": "block spreader",
|
||||
"block.quickiefabric.sulforpad": "sulphur deposition",
|
||||
"container.quickiefabric.backpack": "backpack",
|
||||
"container.quickiefabric.blockstacker": "block stacker",
|
||||
"msg.buildingplan.start": "started recording of construction at %s,%s,%s",
|
||||
@ -90,5 +105,6 @@
|
||||
"msg.backpack.transfer.filled": "Filled the backpack.",
|
||||
"msg.backpack.transfer.cleared": "Cleared the backpack as much as possible.",
|
||||
"msg.backpack.transfer.cancel": "Eigther backpack or chest are not completely empty.",
|
||||
"msg.drill.fuelinfo": "The drill still has a charge for mining %s blocks. It can be charged with canola oil.",
|
||||
"error.unleveling.inventory.full": "There is no free stack in your inventory for the level ups."
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "quickiefabric:block/blockquickiepowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant0"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant1"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant2"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant3"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant4"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant5"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant6"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/canolaplant7"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/cottonplant5"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/cottonplant6"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"textures":{
|
||||
"cross":"quickiefabric:block/cottonplant7"
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"particle": "quickiefabric:block/sulforpad0",
|
||||
"texture": "quickiefabric:block/sulforpad0"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0.25, 0 ],
|
||||
"to": [ 16, 0.25, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"particle": "quickiefabric:block/sulforpad1",
|
||||
"texture": "quickiefabric:block/sulforpad1"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0.25, 0 ],
|
||||
"to": [ 16, 0.25, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"particle": "quickiefabric:block/sulforpad2",
|
||||
"texture": "quickiefabric:block/sulforpad2"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0.25, 0 ],
|
||||
"to": [ 16, 0.25, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"parent": "quickiefabric:block/blockquickiepowder",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/canola"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/canolabottle"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/canolabottlestack"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/canolaseed"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/canolaseed"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/oxidizedcopperpowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickieingot"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickiepowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/wooden_axe",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickiepowderaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/wooden_hoe",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickiepowderhoe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/wooden_pickaxe",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickiepowderpickaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/wooden_shovel",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickiepowdershovel"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/wooden_hoe",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/quickiepowderwaterhoe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:item/speedingot"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickiefabric:block/sulforpad2"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 590 B |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 603 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.3 KiB |