mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 11:25:10 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6a2febe07 | ||
|
|
7b1fcfe647 |
10
build.gradle
10
build.gradle
@@ -1,17 +1,17 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.8-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.10-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
minecraft {
|
||||
accessWidener = file("src/main/resources/thisrocks.accesswidener")
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/thisrocks.accesswidener")
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.17.1
|
||||
yarn_mappings=1.17.1+build.61
|
||||
loader_version=0.11.7
|
||||
minecraft_version=1.18.2
|
||||
yarn_mappings=1.18.2+build.2
|
||||
loader_version=0.13.3
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.5.1
|
||||
mod_version = 1.6.0
|
||||
maven_group = eu.midnightdust.motschen
|
||||
archives_base_name = rocks
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
fabric_version=0.40.1+1.17
|
||||
midnightlib_version=0.2.6
|
||||
fabric_version=0.48.0+1.18.2
|
||||
midnightlib_version=0.4.0
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
269
gradlew
vendored
269
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,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# 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_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# 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
|
||||
;;
|
||||
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 +121,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,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
@@ -106,80 +140,95 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
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
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package eu.midnightdust.motschen.rocks;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
|
||||
import net.minecraft.client.item.ModelPredicateProviderRegistry;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class RocksClient implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0);
|
||||
FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0);
|
||||
FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0);
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0);
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0);
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtElement;
|
||||
import net.minecraft.nbt.NbtString;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
@@ -62,7 +59,6 @@ public class Starfish extends Block implements Waterloggable {
|
||||
public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state) {
|
||||
ItemStack stack = new ItemStack(this);
|
||||
stack.getOrCreateNbt().putString("variation", state.get(STARFISH_VARIATION).asString());
|
||||
LOGGER.info(state.get(STARFISH_VARIATION).asString());
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class OverworldGeyserBlockEntity extends BlockEntity {
|
||||
PlayerEntity player = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 3, true);
|
||||
PlayerEntity player2 = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 8, true);
|
||||
|
||||
if (player2 != null && player2.getY() >= pos.getY() && (pos.getX() <= player2.getX() && pos.getX() + 1 >= player2.getX()) && (pos.getZ() <= player2.getZ() && pos.getZ() + 1 >= player2.getZ())) {
|
||||
if (player2 != null && player2.getY() >= pos.getY() && player2.getY() <= pos.getY() + 5 && (pos.getX() <= player2.getX() && pos.getX() + 1 >= player2.getX()) && (pos.getZ() <= player2.getZ() && pos.getZ() + 1 >= player2.getZ())) {
|
||||
player2.addStatusEffect(new StatusEffectInstance(StatusEffects.LEVITATION, 2, 10, true, false, false));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,33 +6,33 @@ public class RocksConfig extends MidnightConfig {
|
||||
@Comment public static Comment needs_restart;
|
||||
|
||||
@Comment public static Comment rocks;
|
||||
@Entry(name = "block.rocks.rock") public static boolean rock = true;
|
||||
@Entry(name = "block.rocks.granite_rock") public static boolean granite_rock = true;
|
||||
@Entry(name = "block.rocks.diorite_rock") public static boolean diorite_rock = true;
|
||||
@Entry(name = "block.rocks.andesite_rock") public static boolean andesite_rock = true;
|
||||
@Entry(name = "block.rocks.sand_rock") public static boolean sand_rock = true;
|
||||
@Entry(name = "block.rocks.red_sand_rock") public static boolean red_sand_rock = true;
|
||||
@Entry(name = "block.rocks.gravel_rock") public static boolean gravel_rock = true;
|
||||
@Entry(name = "block.rocks.end_stone_rock") public static boolean end_stone_rock = true;
|
||||
@Entry(name = "block.rocks.netherrack_rock") public static boolean netherrack_rock = true;
|
||||
@Entry(name = "block.rocks.soul_soil_rock") public static boolean soul_soil_rock = true;
|
||||
@Entry(name = "block.rocks.rock") public static int rock_count = 3;
|
||||
@Entry(name = "block.rocks.granite_rock") public static int granite_rock_count = 3;
|
||||
@Entry(name = "block.rocks.diorite_rock") public static int diorite_rock_count = 3;
|
||||
@Entry(name = "block.rocks.andesite_rock") public static int andesite_rock_count = 3;
|
||||
@Entry(name = "block.rocks.sand_rock") public static int sand_rock_count = 3;
|
||||
@Entry(name = "block.rocks.red_sand_rock") public static int red_sand_rock_count = 3;
|
||||
@Entry(name = "block.rocks.gravel_rock") public static int gravel_rock_count = 3;
|
||||
@Entry(name = "block.rocks.end_stone_rock") public static int end_stone_rock_count = 3;
|
||||
@Entry(name = "block.rocks.netherrack_rock") public static int netherrack_rock_count = 90;
|
||||
@Entry(name = "block.rocks.soul_soil_rock") public static int soul_soil_rock_count = 3;
|
||||
|
||||
@Comment public static Comment sticks;
|
||||
@Entry(name = "block.rocks.oak_stick") public static boolean oak_stick = true;
|
||||
@Entry(name = "block.rocks.spruce_stick") public static boolean spruce_stick = true;
|
||||
@Entry(name = "block.rocks.birch_stick") public static boolean birch_stick = true;
|
||||
@Entry(name = "block.rocks.acacia_stick") public static boolean acacia_stick = true;
|
||||
@Entry(name = "block.rocks.jungle_stick") public static boolean jungle_stick = true;
|
||||
@Entry(name = "block.rocks.dark_oak_stick") public static boolean dark_oak_stick = true;
|
||||
@Entry(name = "block.rocks.crimson_stick") public static boolean crimson_stick = true;
|
||||
@Entry(name = "block.rocks.warped_stick") public static boolean warped_stick = true;
|
||||
@Entry(name = "block.rocks.oak_stick") public static int oak_stick_count = 3;
|
||||
@Entry(name = "block.rocks.spruce_stick") public static int spruce_stick_count = 3;
|
||||
@Entry(name = "block.rocks.birch_stick") public static int birch_stick_count = 3;
|
||||
@Entry(name = "block.rocks.acacia_stick") public static int acacia_stick_count = 3;
|
||||
@Entry(name = "block.rocks.jungle_stick") public static int jungle_stick_count = 3;
|
||||
@Entry(name = "block.rocks.dark_oak_stick") public static int dark_oak_stick_count = 3;
|
||||
@Entry(name = "block.rocks.crimson_stick") public static int crimson_stick_count = 90;
|
||||
@Entry(name = "block.rocks.warped_stick") public static int warped_stick_count = 90;
|
||||
|
||||
@Comment public static Comment misc;
|
||||
@Entry(name = "block.rocks.pinecone") public static boolean pinecone = true;
|
||||
@Entry(name = "block.rocks.geyser") public static boolean geyser = true;
|
||||
@Entry(name = "block.rocks.nether_geyser") public static boolean nether_geyser = true;
|
||||
@Entry(name = "block.rocks.seashell") public static boolean seashell = true;
|
||||
@Entry(name = "block.rocks.starfish") public static boolean starfish = true;
|
||||
@Entry public static boolean underwater_seashell = true;
|
||||
@Entry public static boolean underwater_starfish = true;
|
||||
@Entry(name = "block.rocks.pinecone") public static int pinecone_count = 3;
|
||||
@Entry(name = "block.rocks.geyser") public static int geyser_count = 3;
|
||||
@Entry(name = "block.rocks.nether_geyser") public static int nether_geyser_count = 30;
|
||||
@Entry(name = "block.rocks.seashell") public static int seashell_count = 1;
|
||||
@Entry(name = "block.rocks.starfish") public static int starfish_count = 1;
|
||||
@Entry public static int underwater_seashell_count = 3;
|
||||
@Entry public static int underwater_starfish_count = 3;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package eu.midnightdust.motschen.rocks.item;
|
||||
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class StarfishItem extends Item {
|
||||
public final StarfishVariation variation;
|
||||
|
||||
public StarfishItem(Settings settings, StarfishVariation variation) {
|
||||
super(settings);
|
||||
this.variation = variation;
|
||||
}
|
||||
}
|
||||
@@ -1,96 +1,86 @@
|
||||
package eu.midnightdust.motschen.rocks.world;
|
||||
|
||||
import eu.midnightdust.motschen.rocks.config.RocksConfig;
|
||||
import eu.midnightdust.motschen.rocks.world.configured_feature.MiscFeatures;
|
||||
import eu.midnightdust.motschen.rocks.world.configured_feature.NetherFeatures;
|
||||
import eu.midnightdust.motschen.rocks.world.configured_feature.RockFeatures;
|
||||
import eu.midnightdust.motschen.rocks.world.configured_feature.StickFeatures;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext;
|
||||
import net.minecraft.tag.BiomeTags;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
@SuppressWarnings({"deprecation", "OptionalGetWithoutIsPresent"})
|
||||
@SuppressWarnings({"OptionalGetWithoutIsPresent"})
|
||||
public class FeatureInjector {
|
||||
|
||||
public static void init() {
|
||||
// Rocks
|
||||
Predicate<BiomeSelectionContext> rocks = (ctx -> {
|
||||
Biome.Category cat = ctx.getBiome().getCategory();
|
||||
return cat != Biome.Category.NETHER && cat != Biome.Category.THEEND && cat!= Biome.Category.BEACH && cat != Biome.Category.DESERT
|
||||
&& cat != Biome.Category.MESA && cat != Biome.Category.ICY && cat != Biome.Category.OCEAN ;});
|
||||
if (RocksConfig.rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.ROCK_FEATURE).get());
|
||||
if (RocksConfig.granite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.GRANITE_ROCK_FEATURE).get());
|
||||
if (RocksConfig.diorite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.DIORITE_ROCK_FEATURE).get());
|
||||
if (RocksConfig.andesite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.ANDESITE_ROCK_FEATURE).get());
|
||||
Predicate<BiomeSelectionContext> rocks = (ctx ->
|
||||
!ctx.hasTag(BiomeTags.IS_NETHER) && !ctx.hasTag(BiomeTags.END_CITY_HAS_STRUCTURE) && !ctx.hasTag(BiomeTags.IS_BEACH) && !ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE)
|
||||
&& !ctx.hasTag(BiomeTags.IS_BADLANDS) && !ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) && !ctx.hasTag(BiomeTags.IS_OCEAN));
|
||||
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ROCK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRANITE_ROCK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.DIORITE_ROCK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ANDESITE_ROCK_PLACED_FEATURE).get());
|
||||
|
||||
Predicate<BiomeSelectionContext> sand_rocks = (ctx -> {
|
||||
Biome.Category cat = ctx.getBiome().getCategory();
|
||||
return cat == Biome.Category.BEACH || cat == Biome.Category.DESERT || cat == Biome.Category.MESA || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert");
|
||||
});
|
||||
if (RocksConfig.sand_rock) BiomeModifications.addFeature(sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.SAND_ROCK_FEATURE).get());
|
||||
Predicate<BiomeSelectionContext> sand_rocks = (ctx -> ctx.hasTag(BiomeTags.IS_BEACH) || ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) || ctx.hasTag(BiomeTags.IS_BADLANDS) || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert"));
|
||||
BiomeModifications.addFeature(sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.SAND_ROCK_PLACED_FEATURE).get());
|
||||
|
||||
Predicate<BiomeSelectionContext> red_sand_rocks = (ctx -> {
|
||||
Biome.Category cat = ctx.getBiome().getCategory();
|
||||
return cat == Biome.Category.MESA || cat == Biome.Category.DESERT || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert");
|
||||
});
|
||||
if (RocksConfig.red_sand_rock) BiomeModifications.addFeature(red_sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.RED_SAND_ROCK_FEATURE).get());
|
||||
Predicate<BiomeSelectionContext> red_sand_rocks = (ctx -> ctx.hasTag(BiomeTags.IS_BADLANDS) || ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert"));
|
||||
|
||||
if (RocksConfig.end_stone_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.THEEND, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.END_STONE_ROCK_FEATURE).get());
|
||||
BiomeModifications.addFeature(red_sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.RED_SAND_ROCK_PLACED_FEATURE).get());
|
||||
|
||||
BiomeModifications.addFeature(ctx -> ctx.getBiomeKey().getValue().toString().contains("the_end"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.END_STONE_ROCK_PLACED_FEATURE).get());
|
||||
|
||||
// Sticks
|
||||
Predicate<BiomeSelectionContext> oak_sticks = (ctx -> {
|
||||
String name = ctx.getBiomeKey().getValue().toString();
|
||||
Biome.Category cat = ctx.getBiome().getCategory();
|
||||
return name.contains("minecraft:forest") || name.contains("minecraft:wooded_hills") || name.contains("oak") ||
|
||||
name.contains("minecraft:wooded_mountains") || name.contains("minecraft:plains") ||
|
||||
name.contains("minecraft:flower_forest") || name.contains("minecraft:wooded_badlands_plateau") ||
|
||||
name.contains("minecraft:modified_wooded_badlands_plateau") || cat == Biome.Category.SWAMP;});
|
||||
if (RocksConfig.oak_stick) BiomeModifications.addFeature(oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(StickFeatures.OAK_STICK_FEATURE).get());
|
||||
name.contains("minecraft:modified_wooded_badlands_plateau") || ctx.hasTag(BiomeTags.SWAMP_HUT_HAS_STRUCTURE);});
|
||||
BiomeModifications.addFeature(oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.OAK_STICK_PLACED_FEATURE).get());
|
||||
|
||||
Predicate<BiomeSelectionContext> birch_sticks = (ctx -> {
|
||||
String name = ctx.getBiomeKey().getValue().toString();
|
||||
return name.contains("minecraft:forest") || name.contains("birch") || name.contains("minecraft:flower_forest");});
|
||||
if (RocksConfig.birch_stick) BiomeModifications.addFeature(birch_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(StickFeatures.BIRCH_STICK_FEATURE).get());
|
||||
BiomeModifications.addFeature(birch_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.BIRCH_STICK_PLACED_FEATURE).get());
|
||||
|
||||
Predicate<BiomeSelectionContext> spruce_sticks = (ctx -> {
|
||||
String name = ctx.getBiomeKey().getValue().toString();
|
||||
Biome.Category cat = ctx.getBiome().getCategory();
|
||||
return name.contains("minecraft:wooded_mountains") || cat == Biome.Category.TAIGA;});
|
||||
if (RocksConfig.spruce_stick) BiomeModifications.addFeature(spruce_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(StickFeatures.SPRUCE_STICK_FEATURE).get());
|
||||
return name.contains("minecraft:wooded_mountains") || ctx.hasTag(BiomeTags.IS_TAIGA);});
|
||||
BiomeModifications.addFeature(spruce_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.SPRUCE_STICK_PLACED_FEATURE).get());
|
||||
|
||||
if (RocksConfig.acacia_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.SAVANNA, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(StickFeatures.ACACIA_STICK_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.VILLAGE_SAVANNA_HAS_STRUCTURE), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.ACACIA_STICK_PLACED_FEATURE).get());
|
||||
|
||||
if (RocksConfig.jungle_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.JUNGLE, GenerationStep.Feature.UNDERGROUND_DECORATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(StickFeatures.JUNGLE_STICK_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_JUNGLE), GenerationStep.Feature.UNDERGROUND_DECORATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.JUNGLE_STICK_PLACED_FEATURE).get());
|
||||
|
||||
Predicate<BiomeSelectionContext> dark_oak_sticks = (ctx -> {
|
||||
String name = ctx.getBiomeKey().getValue().toString();
|
||||
return name.contains("minecraft:dark_forest") || name.contains("minecraft:dark_forest_hills") ||
|
||||
name.contains("minecraft:dark_forest_mountains");});
|
||||
if (RocksConfig.dark_oak_stick) BiomeModifications.addFeature(dark_oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(StickFeatures.DARK_OAK_STICK_FEATURE).get());
|
||||
BiomeModifications.addFeature(dark_oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.DARK_OAK_STICK_PLACED_FEATURE).get());
|
||||
|
||||
// Misc
|
||||
Predicate<BiomeSelectionContext> beach = (ctx -> {
|
||||
String name = ctx.getBiomeKey().getValue().toString();
|
||||
Biome.Category cat = ctx.getBiome().getCategory();
|
||||
return cat == Biome.Category.BEACH && !name.contains("snow");});
|
||||
if (RocksConfig.seashell) BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(MiscFeatures.SEASHELL_FEATURE).get());
|
||||
if (RocksConfig.starfish) BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(MiscFeatures.STARFISH_FEATURE).get());
|
||||
return ctx.hasTag(BiomeTags.IS_BEACH) && !name.contains("snow");});
|
||||
BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SEASHELL_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.STARFISH_PLACED_FEATURE).get());
|
||||
|
||||
if (RocksConfig.underwater_starfish) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.OCEAN, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(MiscFeatures.UNDERWATER_STARFISH_FEATURE).get());
|
||||
if (RocksConfig.underwater_seashell) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.OCEAN, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(MiscFeatures.UNDERWATER_SEASHELL_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_STARFISH_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_SEASHELL_PLACED_FEATURE).get());
|
||||
|
||||
if (RocksConfig.netherrack_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(NetherFeatures.NETHERRACK_ROCK_FEATURE).get());
|
||||
if (RocksConfig.soul_soil_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(NetherFeatures.SOUL_SOIL_ROCK_FEATURE).get());
|
||||
if (RocksConfig.gravel_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(NetherFeatures.NETHER_GRAVEL_ROCK_FEATURE).get());
|
||||
if (RocksConfig.nether_geyser) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(NetherFeatures.NETHER_GEYSER_FEATURE).get());
|
||||
if (RocksConfig.warped_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(NetherFeatures.WARPED_STICK_FEATURE).get());
|
||||
if (RocksConfig.crimson_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(NetherFeatures.CRIMSON_STICK_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHERRACK_ROCK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.SOUL_SOIL_ROCK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GRAVEL_ROCK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GEYSER_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.WARPED_STICK_PLACED_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.CRIMSON_STICK_PLACED_FEATURE).get());
|
||||
|
||||
if (RocksConfig.gravel_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() != Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(RockFeatures.GRAVEL_ROCK_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> !ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRAVEL_ROCK_PLACED_FEATURE).get());
|
||||
|
||||
if (RocksConfig.geyser) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.ICY, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.CONFIGURED_FEATURE.getKey(MiscFeatures.SNOWY_GEYSER_FEATURE).get());
|
||||
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) || ctx.getBiomeKey().toString().contains("snowy"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SNOWY_GEYSER_PLACED_FEATURE).get());
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package eu.midnightdust.motschen.rocks.world;
|
||||
|
||||
import net.minecraft.world.gen.YOffset;
|
||||
import net.minecraft.world.gen.decorator.ConfiguredDecorator;
|
||||
import net.minecraft.world.gen.decorator.Decorator;
|
||||
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
|
||||
import net.minecraft.world.gen.heightprovider.UniformHeightProvider;
|
||||
|
||||
public class RocksDecorators {
|
||||
public static final RangeDecoratorConfig BOTTOM_TO_TOP_OFFSET_4 = new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(4), YOffset.belowTop(4)));
|
||||
public static final ConfiguredDecorator<?> ROCK = (ConfiguredDecorator)((ConfiguredDecorator)Decorator.RANGE.configure(BOTTOM_TO_TOP_OFFSET_4).spreadHorizontally()).repeatRandomly(5);
|
||||
}
|
||||
@@ -1,45 +1,53 @@
|
||||
package eu.midnightdust.motschen.rocks.world.configured_feature;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.SeashellVariation;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
||||
import eu.midnightdust.motschen.rocks.config.RocksConfig;
|
||||
import eu.midnightdust.motschen.rocks.world.FeatureRegistry;
|
||||
import eu.midnightdust.motschen.rocks.world.RocksDecorators;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DataPool;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.ProbabilityConfig;
|
||||
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.placer.SimpleBlockPlacer;
|
||||
import net.minecraft.world.gen.placementmodifier.*;
|
||||
import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MiscFeatures {
|
||||
public static ConfiguredFeature<?, ?> SEASHELL_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
public static List<PlacementModifier> placementModifiers = List.of(RarityFilterPlacementModifier.of(1),
|
||||
SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of());
|
||||
|
||||
private static final ConfiguredFeature<?, ?> SEASHELL_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.YELLOW), 7)
|
||||
.add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.PINK), 2)
|
||||
.add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.WHITE), 6).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> STARFISH_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.WHITE), 6).build()
|
||||
)));
|
||||
public static ConfiguredFeature<?, ?> STARFISH_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.RED), 2)
|
||||
.add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.PINK), 6)
|
||||
.add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.ORANGE), 7).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
.add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.ORANGE), 7).build()))
|
||||
);
|
||||
|
||||
public static ConfiguredFeature<?, ?> UNDERWATER_STARFISH_FEATURE = FeatureRegistry.UNDERWATER_STARFISH_FEATURE.configure(new ProbabilityConfig(1));
|
||||
public static ConfiguredFeature<?, ?> UNDERWATER_SEASHELL_FEATURE = FeatureRegistry.UNDERWATER_SEASHELL_FEATURE.configure(new ProbabilityConfig(1));
|
||||
public static ConfiguredFeature<?, ?> SNOWY_GEYSER_FEATURE = FeatureRegistry.SNOWY_GEYSER_FEATURE.configure(new ProbabilityConfig(1)).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> UNDERWATER_STARFISH_FEATURE = new ConfiguredFeature<>(FeatureRegistry.UNDERWATER_STARFISH_FEATURE, new ProbabilityConfig(1));
|
||||
public static ConfiguredFeature<?, ?> UNDERWATER_SEASHELL_FEATURE = new ConfiguredFeature<>(FeatureRegistry.UNDERWATER_SEASHELL_FEATURE, new ProbabilityConfig(1));
|
||||
public static ConfiguredFeature<?, ?> SNOWY_GEYSER_FEATURE = new ConfiguredFeature<>(FeatureRegistry.SNOWY_GEYSER_FEATURE, new ProbabilityConfig(1));
|
||||
|
||||
public static PlacedFeature SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SEASHELL_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.seashell_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(STARFISH_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.starfish_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature UNDERWATER_SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_SEASHELL_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.underwater_seashell_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
|
||||
public static PlacedFeature UNDERWATER_STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_STARFISH_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.underwater_starfish_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
|
||||
public static PlacedFeature SNOWY_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SNOWY_GEYSER_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.geyser_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
|
||||
|
||||
public static void init() {
|
||||
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
|
||||
@@ -48,6 +56,13 @@ public class MiscFeatures {
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "underwater_starfish"), UNDERWATER_STARFISH_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "underwater_seashell"), UNDERWATER_SEASHELL_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "snowy_geyser"), SNOWY_GEYSER_FEATURE);
|
||||
|
||||
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "seashell"), SEASHELL_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "starfish"), STARFISH_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "underwater_seashell"), UNDERWATER_SEASHELL_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "underwater_starfish"), UNDERWATER_STARFISH_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "snowy_geyser"),SNOWY_GEYSER_PLACED_FEATURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,91 +1,87 @@
|
||||
package eu.midnightdust.motschen.rocks.world.configured_feature;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.RockVariation;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StickVariation;
|
||||
import eu.midnightdust.motschen.rocks.world.RocksDecorators;
|
||||
import eu.midnightdust.motschen.rocks.config.RocksConfig;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DataPool;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.RandomPatchFeatureConfig;
|
||||
import net.minecraft.world.gen.placer.SimpleBlockPlacer;
|
||||
import net.minecraft.world.gen.stateprovider.SimpleBlockStateProvider;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.placementmodifier.*;
|
||||
import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NetherFeatures {
|
||||
|
||||
public static ConfiguredFeature<?, ?> NETHERRACK_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
public static ConfiguredFeature<?, ?> NETHERRACK_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION, RockVariation.TINY), 10)
|
||||
.add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.whitelist(ImmutableSet.of(Blocks.NETHERRACK,Blocks.WARPED_NYLIUM,Blocks.CRIMSON_NYLIUM)).cannotProject().build()).decorate(RocksDecorators.ROCK).repeat(128);
|
||||
public static ConfiguredFeature<?, ?> SOUL_SOIL_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> SOUL_SOIL_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION, RockVariation.TINY), 10)
|
||||
.add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.whitelist(ImmutableSet.of(Blocks.SOUL_SOIL,Blocks.SOUL_SAND)).cannotProject().build()).decorate(RocksDecorators.ROCK).repeat(128);
|
||||
public static ConfiguredFeature<?, ?> NETHER_GRAVEL_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> NETHER_GRAVEL_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION, RockVariation.TINY), 10)
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.whitelist(ImmutableSet.of(Blocks.GRAVEL)).cannotProject().build()).decorate(RocksDecorators.ROCK).repeat(128);
|
||||
public static ConfiguredFeature<?, ?> NETHER_GEYSER_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
new SimpleBlockStateProvider(RocksMain.NetherGeyser.getDefaultState()),SimpleBlockPlacer.INSTANCE)
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.whitelist(ImmutableSet.of(Blocks.NETHERRACK)).cannotProject().build())).decorate(RocksDecorators.ROCK).repeat(16);
|
||||
|
||||
public static ConfiguredFeature<?, ?> WARPED_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> NETHER_GEYSER_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder().add(RocksMain.NetherGeyser.getDefaultState(), 1)))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> WARPED_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK,new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION, StickVariation.SMALL), 7)
|
||||
.add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.whitelist(ImmutableSet.of(Blocks.WARPED_NYLIUM)).cannotProject().build()).decorate(RocksDecorators.ROCK).repeat(128);
|
||||
public static ConfiguredFeature<?, ?> CRIMSON_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> CRIMSON_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION, StickVariation.SMALL), 7)
|
||||
.add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.whitelist(ImmutableSet.of(Blocks.CRIMSON_NYLIUM)).cannotProject().build()).decorate(RocksDecorators.ROCK).repeat(128);
|
||||
.add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
|
||||
public static PlacedFeature NETHERRACK_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHERRACK_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.netherrack_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate .bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.NETHERRACK,Blocks.WARPED_NYLIUM,Blocks.CRIMSON_NYLIUM), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature SOUL_SOIL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SOUL_SOIL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.soul_soil_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SOUL_SOIL,Blocks.SOUL_SAND), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature NETHER_GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.gravel_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRAVEL), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature NETHER_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GEYSER_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.nether_geyser_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.NETHERRACK), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature WARPED_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(WARPED_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.warped_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.WARPED_NYLIUM), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature CRIMSON_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(CRIMSON_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.crimson_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.CRIMSON_NYLIUM), new BlockPos(0, -1, 0))))));
|
||||
|
||||
public static void init() {
|
||||
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
|
||||
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "netherrack_rock"), NETHERRACK_ROCK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "soul_soil_rock"), SOUL_SOIL_ROCK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "nether_gravel_rock"), NETHER_GRAVEL_ROCK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "nether_geyser"), NETHER_GEYSER_FEATURE);
|
||||
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "warped_stick"), WARPED_STICK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "crimson_stick"), CRIMSON_STICK_FEATURE);
|
||||
|
||||
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "netherrack_rock"), NETHERRACK_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "soul_soil_rock"), SOUL_SOIL_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "nether_gravel_rock"), NETHER_GRAVEL_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "nether_geyser"), NETHER_GEYSER_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "warped_stick"), WARPED_STICK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "crimson_stick"), CRIMSON_STICK_PLACED_FEATURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,101 +1,90 @@
|
||||
package eu.midnightdust.motschen.rocks.world.configured_feature;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.RockVariation;
|
||||
import eu.midnightdust.motschen.rocks.config.RocksConfig;
|
||||
import eu.midnightdust.motschen.rocks.world.RocksDecorators;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DataPool;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.placer.SimpleBlockPlacer;
|
||||
import net.minecraft.world.gen.placementmodifier.*;
|
||||
import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RockFeatures {
|
||||
public static ConfiguredFeature<?, ?> ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
public static ConfiguredFeature<?, ?> ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).blacklist(ImmutableSet.of(Blocks.ICE.getDefaultState(),Blocks.SAND.getDefaultState(),Blocks.RED_SAND.getDefaultState()))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> GRANITE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> GRANITE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.GRANITE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> DIORITE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> DIORITE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.DIORITE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> ANDESITE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> ANDESITE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.ANDESITE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> SAND_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> SAND_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.SAND, Blocks.SANDSTONE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> RED_SAND_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> RED_SAND_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK,new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.RED_SAND, Blocks.RED_SANDSTONE))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> END_STONE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> END_STONE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> GRAVEL_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())
|
||||
));
|
||||
public static ConfiguredFeature<?, ?> GRAVEL_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10)
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7)
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5)
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.GRAVEL))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
|
||||
);
|
||||
|
||||
public static PlacedFeature ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.not(BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.ICE,Blocks.SAND,Blocks.RED_SAND,Blocks.END_STONE), new BlockPos(0, -1, 0)))))));
|
||||
public static PlacedFeature GRANITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRANITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.granite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRANITE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature DIORITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DIORITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.diorite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.DIORITE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature ANDESITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ANDESITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.andesite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.ANDESITE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.sand_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature RED_SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(RED_SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.red_sand_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature END_STONE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(END_STONE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.end_stone_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.END_STONE), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.gravel_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRAVEL), new BlockPos(0, -1, 0))))));
|
||||
|
||||
public static void init() {
|
||||
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
|
||||
@@ -107,6 +96,16 @@ public class RockFeatures {
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "red_sand_rock"), RED_SAND_ROCK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "endstone_rock"), END_STONE_ROCK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "gravel_rock"), GRAVEL_ROCK_FEATURE);
|
||||
|
||||
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "rock"), ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "granite_rock"), GRANITE_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "diorite_rock"), DIORITE_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "andesite_rock"), ANDESITE_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "sand_rock"), SAND_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "red_sand_rock"), RED_SAND_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "endstone_rock"), END_STONE_ROCK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "gravel_rock"), GRAVEL_ROCK_PLACED_FEATURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,78 +1,69 @@
|
||||
package eu.midnightdust.motschen.rocks.world.configured_feature;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StickVariation;
|
||||
import eu.midnightdust.motschen.rocks.world.RocksDecorators;
|
||||
import eu.midnightdust.motschen.rocks.config.RocksConfig;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DataPool;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.RandomPatchFeatureConfig;
|
||||
import net.minecraft.world.gen.placer.SimpleBlockPlacer;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.placementmodifier.*;
|
||||
import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class StickFeatures {
|
||||
public static ConfiguredFeature<?, ?> OAK_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
public static ConfiguredFeature<?, ?> OAK_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7)
|
||||
.add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0).whitelist(ImmutableSet.of(Blocks.GRASS_BLOCK))
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> SPRUCE_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> SPRUCE_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.SpruceStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7)
|
||||
.add(RocksMain.SpruceStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.SpruceStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1)
|
||||
.add(RocksMain.Pinecone.getDefaultState(), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> BIRCH_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.Pinecone.getDefaultState(), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> BIRCH_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7)
|
||||
.add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> ACACIA_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> ACACIA_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7)
|
||||
.add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> JUNGLE_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> JUNGLE_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7)
|
||||
.add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
public static ConfiguredFeature<?, ?> DARK_OAK_STICK_FEATURE = Feature.RANDOM_PATCH.configure(
|
||||
(new RandomPatchFeatureConfig.Builder(
|
||||
.add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
public static ConfiguredFeature<?, ?> DARK_OAK_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
|
||||
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
|
||||
.add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7)
|
||||
.add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5)
|
||||
.add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()),
|
||||
SimpleBlockPlacer.INSTANCE))
|
||||
.tries(1).spreadX(0).spreadY(0).spreadZ(0)
|
||||
.build()).decorate(RocksDecorators.ROCK);
|
||||
.add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
|
||||
);
|
||||
|
||||
public static PlacedFeature OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.oak_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature SPRUCE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SPRUCE_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.spruce_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature BIRCH_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(BIRCH_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.birch_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature ACACIA_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ACACIA_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.acacia_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature JUNGLE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(JUNGLE_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.jungle_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0))))));
|
||||
public static PlacedFeature DARK_OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DARK_OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.dark_oak_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0))))));
|
||||
|
||||
public static void init() {
|
||||
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
|
||||
@@ -82,6 +73,14 @@ public class StickFeatures {
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "acacia_stick"), ACACIA_STICK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "jungle_stick"), JUNGLE_STICK_FEATURE);
|
||||
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "dark_oak_stick"), DARK_OAK_STICK_FEATURE);
|
||||
|
||||
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "oak_stick"), OAK_STICK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "spruce_stick"), SPRUCE_STICK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "birch_stick"), BIRCH_STICK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "acacia_stick"), ACACIA_STICK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "jungle_stick"), JUNGLE_STICK_PLACED_FEATURE);
|
||||
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "dark_oak_stick"), DARK_OAK_STICK_PLACED_FEATURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Heightmap;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.gen.ProbabilityConfig;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.util.FeatureContext;
|
||||
import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
|
||||
|
||||
@@ -7,7 +7,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Heightmap;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.gen.ProbabilityConfig;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.util.FeatureContext;
|
||||
import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
"item.rocks.soul_soil_splitter":"Seelenerdesplitter",
|
||||
|
||||
"rocks.midnightconfig.title": "This Rocks! Konfiguration",
|
||||
"rocks.midnightconfig.needs_restart": "§c Starte das Spiel neu, nachdem du Änderungen vorgenommen hast!",
|
||||
"rocks.midnightconfig.needs_restart": "§cStarte das Spiel neu, nachdem du Änderungen vorgenommen hast!",
|
||||
"rocks.midnightconfig.rocks": "§aBrocken",
|
||||
"rocks.midnightconfig.sticks": "§aStöcke",
|
||||
"rocks.midnightconfig.misc": "§aWeiteres",
|
||||
"rocks.midnightconfig.underwater_seashell": "Unterwassermuschel",
|
||||
"rocks.midnightconfig.underwater_starfish": "Unterwasserseestern"
|
||||
"rocks.midnightconfig.underwater_seashell_count": "Unterwassermuschel",
|
||||
"rocks.midnightconfig.underwater_starfish_count": "Unterwasserseestern"
|
||||
}
|
||||
@@ -39,10 +39,10 @@
|
||||
"item.rocks.soul_soil_splitter":"Soul Soil Splitter",
|
||||
|
||||
"rocks.midnightconfig.title":"This Rocks! Config",
|
||||
"rocks.midnightconfig.needs_restart":"§c Restart game after changing config!",
|
||||
"rocks.midnightconfig.rocks":"§aRocks",
|
||||
"rocks.midnightconfig.sticks":"§aSticks",
|
||||
"rocks.midnightconfig.misc":"§aMiscellaneous",
|
||||
"rocks.midnightconfig.underwater_seashell":"Underwater Seashell",
|
||||
"rocks.midnightconfig.underwater_starfish":"Underwater Starfish"
|
||||
"rocks.midnightconfig.needs_restart":"§cRestart game after changing config!",
|
||||
"rocks.midnightconfig.rocks":"§aRock Spawn Count",
|
||||
"rocks.midnightconfig.sticks":"§aStick Spawn Count",
|
||||
"rocks.midnightconfig.misc":"§aMiscellaneous Spawn Count",
|
||||
"rocks.midnightconfig.underwater_seashell_count":"Underwater Seashell",
|
||||
"rocks.midnightconfig.underwater_starfish_count":"Underwater Starfish"
|
||||
}
|
||||
@@ -12,12 +12,14 @@
|
||||
"block.rocks.netherrack_rock":"Камушек из адского камня",
|
||||
"block.rocks.soul_soil_rock":"Камушек из почвы душ",
|
||||
|
||||
"block.rocks.oak_stick":"Дубовая палка",
|
||||
"block.rocks.birch_stick":"Берёзовая палка",
|
||||
"block.rocks.oak_stick":"Дубовая палочка",
|
||||
"block.rocks.birch_stick":"Берёзовая палочка",
|
||||
"block.rocks.spruce_stick":"Еловая палочка",
|
||||
"block.rocks.jungle_stick":"Палка из тропического дерева",
|
||||
"block.rocks.acacia_stick":"Палка из акации",
|
||||
"block.rocks.dark_oak_stick":"Палка из тёмного дуба",
|
||||
"block.rocks.jungle_stick":"Палочка из тропического дерева",
|
||||
"block.rocks.acacia_stick":"Палочка из акации",
|
||||
"block.rocks.dark_oak_stick":"Палочка из тёмного дуба",
|
||||
"block.rocks.crimson_stick":"Багровая палочка",
|
||||
"block.rocks.warped_stick":"Искажённая палочка",
|
||||
|
||||
"block.rocks.geyser":"Гейзер",
|
||||
"block.rocks.nether_geyser":"Магмовый гейзер",
|
||||
@@ -34,5 +36,13 @@
|
||||
"item.rocks.red_sandstone_splitter":"Кусочек красного песчаника",
|
||||
"item.rocks.end_stone_splitter":"Кусочек эндерняка",
|
||||
"item.rocks.netherrack_splitter":"Кусочек адского камня",
|
||||
"item.rocks.soul_soil_splitter":"Кусочек почвы душ"
|
||||
"item.rocks.soul_soil_splitter":"Кусочек почвы душ",
|
||||
|
||||
"rocks.midnightconfig.title":"This Rocks! Настройки",
|
||||
"rocks.midnightconfig.needs_restart":"§c Перезапустить игру после изменения конфигурации!",
|
||||
"rocks.midnightconfig.rocks":"§aГорные породы",
|
||||
"rocks.midnightconfig.sticks":"§aПалочки",
|
||||
"rocks.midnightconfig.misc":"§aРазнообразие",
|
||||
"rocks.midnightconfig.underwater_seashell_count":"Подводная морская раковина",
|
||||
"rocks.midnightconfig.underwater_starfish_count":"Подводная морская звезда"
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:acacia_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:andesite_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:andesite_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:birch_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:crimson_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:dark_oak_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:diorite_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:diorite_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:end_stone_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:end_stone_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:granite_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:granite_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:gravel_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:flint"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:jungle_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:netherrack_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:netherrack_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:oak_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:pinecone"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:spruce_sapling"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:red_sand_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:red_sandstone_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:cobblestone_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:sand_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:sandstone_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:soul_soil_rock"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:soul_soil_splitter"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:spruce_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,6 +4,28 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:warped_stick"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
@@ -16,4 +38,6 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user