VisualOverhaul 4.0.0 - Update to 1.18, Smoker, Blast Furnace, Toggle Potion Glint

- Update to 1.18
- Overhaul Smoker
- Overhaul Blast Furnace
- Add toggle to disable potion glint
This commit is contained in:
Motschen
2021-12-18 15:46:40 +01:00
parent 775d3bd6b2
commit 01f894a184
32 changed files with 936 additions and 493 deletions

View File

@@ -1,10 +1,10 @@
plugins { plugins {
id 'fabric-loom' version '0.8-SNAPSHOT' id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
sourceCompatibility = JavaVersion.VERSION_16 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_16 targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name archivesBaseName = project.archives_base_name
version = project.mod_version version = project.mod_version
@@ -14,8 +14,8 @@ minecraft {
} }
repositories { repositories {
maven { url "https://maven.terraformersmc.com/releases" }
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }
maven { url "https://api.modrinth.com/maven" }
} }
dependencies { dependencies {
@@ -25,15 +25,9 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
compileOnly "io.github.FoundationGames:Phonos:0.1.1-1.17" modImplementation "maven.modrinth:midnightlib:${project.midnightlib_version}"
include "maven.modrinth:midnightlib:${project.midnightlib_version}"
modImplementation "com.github.TeamMidnightDust:MidnightLib:${midnightlib_version}"
include "com.github.TeamMidnightDust:MidnightLib:${midnightlib_version}"
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}") {
exclude group: "net.fabricmc.fabric-api"
}
} }
processResources { processResources {

View File

@@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx2G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
minecraft_version=1.17-pre1 minecraft_version=1.18.1
yarn_mappings=1.17-pre1+build.9 yarn_mappings=1.18.1+build.5
loader_version=0.11.3 loader_version=0.12.12
# Mod Properties # Mod Properties
mod_version = 3.3.0 mod_version = 4.0.0
maven_group = eu.midnightdust maven_group = eu.midnightdust
archives_base_name = visualoverhaul archives_base_name = visualoverhaul
# Dependencies # Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.34.8+1.17 fabric_version=0.44.0+1.18
mod_menu_version = 2.0.0-beta.5 mod_menu_version = 2.0.0-beta.5
midnightlib_version=v0.2.2 midnightlib_version=0.3.1

Binary file not shown.

View File

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

269
gradlew vendored
View File

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

View File

@@ -8,22 +8,19 @@ import eu.midnightdust.visualoverhaul.block.renderer.JukeboxBlockEntityRenderer;
import eu.midnightdust.visualoverhaul.config.VOConfig; import eu.midnightdust.visualoverhaul.config.VOConfig;
import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityModelLayerRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry; import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper; import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.fabricmc.fabric.api.resource.ResourcePackActivationType; import net.fabricmc.fabric.api.resource.ResourcePackActivationType;
import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl; import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl;
import net.fabricmc.fabric.impl.client.rendering.BlockEntityRendererRegistryImpl;
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl; import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.*;
import net.minecraft.block.entity.BrewingStandBlockEntity;
import net.minecraft.block.entity.FurnaceBlockEntity;
import net.minecraft.block.entity.JukeboxBlockEntity;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.color.world.BiomeColors; import net.minecraft.client.color.world.BiomeColors;
import net.minecraft.client.render.*; import net.minecraft.client.render.*;
@@ -39,9 +36,10 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import net.minecraft.world.biome.BuiltinBiomes; import net.minecraft.world.biome.BuiltinBiomes;
import java.util.logging.LogManager;
import static eu.midnightdust.visualoverhaul.VisualOverhaul.*; import static eu.midnightdust.visualoverhaul.VisualOverhaul.*;
@SuppressWarnings("UnstableApiUsage")
public class VisualOverhaulClient implements ClientModInitializer { public class VisualOverhaulClient implements ClientModInitializer {
public static Block JukeBoxTop = new JukeboxTop(); public static Block JukeBoxTop = new JukeboxTop();
@@ -61,10 +59,14 @@ public class VisualOverhaulClient implements ClientModInitializer {
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.JUKEBOX, RenderLayer.getCutout()); BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.JUKEBOX, RenderLayer.getCutout());
BlockRenderLayerMapImpl.INSTANCE.putBlock(JukeBoxTop, RenderLayer.getCutout()); BlockRenderLayerMapImpl.INSTANCE.putBlock(JukeBoxTop, RenderLayer.getCutout());
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.FURNACE, RenderLayer.getCutout()); BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.FURNACE, RenderLayer.getCutout());
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.SMOKER, RenderLayer.getCutout());
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.BLAST_FURNACE, RenderLayer.getCutout());
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.BREWING_STAND, BrewingStandBlockEntityRenderer::new); BlockEntityRendererRegistryImpl.register(BlockEntityType.BREWING_STAND, BrewingStandBlockEntityRenderer::new);
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.JUKEBOX, JukeboxBlockEntityRenderer::new); BlockEntityRendererRegistryImpl.register(BlockEntityType.JUKEBOX, JukeboxBlockEntityRenderer::new);
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.FURNACE, FurnaceBlockEntityRenderer::new); BlockEntityRendererRegistryImpl.register(BlockEntityType.FURNACE, FurnaceBlockEntityRenderer::new);
BlockEntityRendererRegistryImpl.register(BlockEntityType.SMOKER, FurnaceBlockEntityRenderer::new);
BlockEntityRendererRegistryImpl.register(BlockEntityType.BLAST_FURNACE, FurnaceBlockEntityRenderer::new);
// // Phonos Compat // // // Phonos Compat //
// if (FabricLoader.getInstance().isModLoaded("phonos")) { // if (FabricLoader.getInstance().isModLoaded("phonos")) {
@@ -113,7 +115,7 @@ public class VisualOverhaulClient implements ClientModInitializer {
inv.set(i, attachedData.readItemStack()); inv.set(i, attachedData.readItemStack());
} }
packetContext.getTaskQueue().execute(() -> { packetContext.getTaskQueue().execute(() -> {
if (client.world != null && client.world.getBlockEntity(pos) != null && client.world.getBlockEntity(pos) instanceof FurnaceBlockEntity blockEntity) { if (client.world != null && client.world.getBlockEntity(pos) != null && client.world.getBlockEntity(pos) instanceof AbstractFurnaceBlockEntity blockEntity) {
blockEntity.setStack(0, inv.get(0)); blockEntity.setStack(0, inv.get(0));
blockEntity.setStack(1, inv.get(1)); blockEntity.setStack(1, inv.get(1));
blockEntity.setStack(2, inv.get(2)); blockEntity.setStack(2, inv.get(2));
@@ -128,21 +130,22 @@ public class VisualOverhaulClient implements ClientModInitializer {
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul","coloredwaterbucket"), modContainer, ResourcePackActivationType.DEFAULT_ENABLED); ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul","coloredwaterbucket"), modContainer, ResourcePackActivationType.DEFAULT_ENABLED);
}); });
// Biome-colored Items // Biome-colored Items
if (VOConfig.coloredItems) { if (VOConfig.coloredItems) {
ClientTickEvents.END_CLIENT_TICK.register(client -> { ClientTickEvents.END_CLIENT_TICK.register(client -> {
int waterColor; int waterColor;
int foliageColor; int foliageColor;
int grassColor; int grassColor;
if (client.world != null) { if (client.world != null && client.player != null) {
assert client.player != null; waterColor = BiomeColors.getWaterColor(client.world, client.player.getBlockPos());
waterColor = client.world.getColor(client.player.getBlockPos(), BiomeColors.WATER_COLOR); foliageColor = BiomeColors.getFoliageColor(client.world, client.player.getBlockPos());
foliageColor = client.world.getColor(client.player.getBlockPos(), BiomeColors.FOLIAGE_COLOR); grassColor = BiomeColors.getGrassColor(client.world, client.player.getBlockPos());
grassColor = client.world.getColor(client.player.getBlockPos(), BiomeColors.GRASS_COLOR); }
} else { else {
waterColor = BuiltinBiomes.PLAINS.getWaterColor(); waterColor = 4159204;
foliageColor = BuiltinBiomes.PLAINS.getFoliageColor(); foliageColor = -8934609;
grassColor = BuiltinBiomes.PLAINS.getFoliageColor(); grassColor = -8934609;
} }
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.WATER_BUCKET); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.WATER_BUCKET);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> grassColor, Items.GRASS_BLOCK); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> grassColor, Items.GRASS_BLOCK);
@@ -155,19 +158,19 @@ public class VisualOverhaulClient implements ClientModInitializer {
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.JUNGLE_LEAVES); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.JUNGLE_LEAVES);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.OAK_LEAVES); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> foliageColor, Items.OAK_LEAVES);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> { ColorProviderRegistry.ITEM.register((stack, tintIndex) -> {
if (PotionUtil.getPotion(stack) == Potions.WATER && tintIndex == 0) { if ((PotionUtil.getPotion(stack) == Potions.WATER || PotionUtil.getPotion(stack) == Potions.MUNDANE || PotionUtil.getPotion(stack) == Potions.THICK || PotionUtil.getPotion(stack) == Potions.AWKWARD) && tintIndex == 0) {
return waterColor; return waterColor;
} }
return tintIndex > 0 ? -1 : PotionUtil.getColor(stack); return tintIndex > 0 ? -1 : PotionUtil.getColor(stack);
}, Items.POTION); }, Items.POTION);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> { ColorProviderRegistry.ITEM.register((stack, tintIndex) -> {
if (PotionUtil.getPotion(stack) == Potions.WATER && tintIndex == 0) { if ((PotionUtil.getPotion(stack) == Potions.WATER || PotionUtil.getPotion(stack) == Potions.MUNDANE || PotionUtil.getPotion(stack) == Potions.THICK || PotionUtil.getPotion(stack) == Potions.AWKWARD) && tintIndex == 0) {
return waterColor; return waterColor;
} }
return tintIndex > 0 ? -1 : PotionUtil.getColor(stack); return tintIndex > 0 ? -1 : PotionUtil.getColor(stack);
}, Items.SPLASH_POTION); }, Items.SPLASH_POTION);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> { ColorProviderRegistry.ITEM.register((stack, tintIndex) -> {
if (PotionUtil.getPotion(stack) == Potions.WATER && tintIndex == 0) { if ((PotionUtil.getPotion(stack) == Potions.WATER || PotionUtil.getPotion(stack) == Potions.MUNDANE || PotionUtil.getPotion(stack) == Potions.THICK || PotionUtil.getPotion(stack) == Potions.AWKWARD) && tintIndex == 0) {
return waterColor; return waterColor;
} }
return tintIndex > 0 ? -1 : PotionUtil.getColor(stack); return tintIndex > 0 ? -1 : PotionUtil.getColor(stack);

View File

@@ -7,7 +7,6 @@ import net.minecraft.block.entity.BrewingStandBlockEntity;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.render.WorldRenderer;
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
import net.minecraft.client.render.block.entity.BlockEntityRenderer; import net.minecraft.client.render.block.entity.BlockEntityRenderer;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory; import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
import net.minecraft.client.render.model.json.ModelTransformation; import net.minecraft.client.render.model.json.ModelTransformation;

View File

@@ -5,7 +5,7 @@ import eu.midnightdust.visualoverhaul.config.VOConfig;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.block.entity.FurnaceBlockEntity; import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumer;
@@ -24,16 +24,15 @@ import net.minecraft.util.math.Vec3f;
import java.util.Objects; import java.util.Objects;
@Environment(EnvType.CLIENT) @Environment(EnvType.CLIENT)
public class FurnaceBlockEntityRenderer implements BlockEntityRenderer<FurnaceBlockEntity> { public class FurnaceBlockEntityRenderer<E extends AbstractFurnaceBlockEntity> implements BlockEntityRenderer<E> {
private final FurnaceWoodenPlanksModel planks; private final FurnaceWoodenPlanksModel planks;
public FurnaceBlockEntityRenderer(BlockEntityRendererFactory.Context ctx) { public FurnaceBlockEntityRenderer(BlockEntityRendererFactory.Context ctx) {
this.planks = new FurnaceWoodenPlanksModel(ctx.getLayerModelPart(FurnaceWoodenPlanksModel.WOODEN_PLANKS_MODEL_LAYER)); this.planks = new FurnaceWoodenPlanksModel(ctx.getLayerModelPart(FurnaceWoodenPlanksModel.WOODEN_PLANKS_MODEL_LAYER));
} }
@Override public void render(E blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
public void render(FurnaceBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { if (VOConfig.furnace && blockEntity != null) {
if (VOConfig.furnace && blockEntity.getCachedState().getBlock().getDefaultState().isOf(Blocks.FURNACE)) {
BlockState blockState = blockEntity.getCachedState(); BlockState blockState = blockEntity.getCachedState();
int lightAtBlock = WorldRenderer.getLightmapCoordinates(Objects.requireNonNull(blockEntity.getWorld()), blockEntity.getPos().offset(blockState.get(AbstractFurnaceBlock.FACING))); int lightAtBlock = WorldRenderer.getLightmapCoordinates(Objects.requireNonNull(blockEntity.getWorld()), blockEntity.getPos().offset(blockState.get(AbstractFurnaceBlock.FACING)));
ItemStack item1 = blockEntity.getStack(0); ItemStack item1 = blockEntity.getStack(0);
@@ -44,6 +43,8 @@ public class FurnaceBlockEntityRenderer implements BlockEntityRenderer<FurnaceBl
matrices.push(); matrices.push();
matrices.translate(0.5f, 0.58f, 0.5f); matrices.translate(0.5f, 0.58f, 0.5f);
if (blockEntity.getCachedState().getBlock().equals(Blocks.SMOKER)) matrices.translate(0f, -0.06f, 0f);
if (blockEntity.getCachedState().getBlock().equals(Blocks.BLAST_FURNACE)) matrices.translate(0f, -0.25f, 0f);
matrices.scale(1f, 1f, 1f); matrices.scale(1f, 1f, 1f);
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180)); matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180));
matrices.translate(0.0f, 0.0f, -0.4f); matrices.translate(0.0f, 0.0f, -0.4f);
@@ -57,6 +58,8 @@ public class FurnaceBlockEntityRenderer implements BlockEntityRenderer<FurnaceBl
matrices.push(); matrices.push();
matrices.translate(0.5f, 0.08f, 0.5f); matrices.translate(0.5f, 0.08f, 0.5f);
if (blockEntity.getCachedState().getBlock().equals(Blocks.SMOKER)) matrices.translate(0f, 0.06f, 0f);
if (blockEntity.getCachedState().getBlock().equals(Blocks.BLAST_FURNACE)) matrices.translate(0f, 0.24f, 0f);
matrices.scale(1f, 1f, 1f); matrices.scale(1f, 1f, 1f);
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180)); matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180));
matrices.translate(0.0f, 0.0f, -0.4f); matrices.translate(0.0f, 0.0f, -0.4f);
@@ -68,10 +71,12 @@ public class FurnaceBlockEntityRenderer implements BlockEntityRenderer<FurnaceBl
else if (!item2.isEmpty()) { else if (!item2.isEmpty()) {
matrices.push(); matrices.push();
BlockState state = Block.getBlockFromItem(item2.getItem()).getDefaultState(); BlockState state = Block.getBlockFromItem(item2.getItem()).getDefaultState();
Sprite texture = MinecraftClient.getInstance().getBlockRenderManager().getModel(state).getSprite(); Sprite texture = MinecraftClient.getInstance().getBlockRenderManager().getModel(state).getParticleSprite();
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(spriteToTexture(texture))); VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(spriteToTexture(texture)));
matrices.translate(0.5f, -1.3f, 0.5f); matrices.translate(0.5f, -1.3f, 0.5f);
if (blockEntity.getCachedState().getBlock().equals(Blocks.SMOKER)) matrices.translate(0f, 0.06f, 0f);
if (blockEntity.getCachedState().getBlock().equals(Blocks.BLAST_FURNACE)) matrices.translate(0f, 0.2f, 0f);
matrices.scale(1f, 1f, 1f); matrices.scale(1f, 1f, 1f);

View File

@@ -1,7 +1,7 @@
package eu.midnightdust.visualoverhaul.compat.phonos.block; package eu.midnightdust.visualoverhaul.compat.phonos.block;
import io.github.foundationgames.phonos.block.PhonosBlocks; //import io.github.foundationgames.phonos.block.PhonosBlocks;
import io.github.foundationgames.phonos.block.RadioJukeboxBlock; //import io.github.foundationgames.phonos.block.RadioJukeboxBlock;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;

View File

@@ -1,7 +1,7 @@
package eu.midnightdust.visualoverhaul.compat.phonos.init; package eu.midnightdust.visualoverhaul.compat.phonos.init;
//import eu.midnightdust.visualoverhaul.compat.phonos.block.RadioJukeboxTop; //import eu.midnightdust.visualoverhaul.compat.phonos.block.RadioJukeboxTop;
import io.github.foundationgames.phonos.block.PhonosBlocks; //import io.github.foundationgames.phonos.block.PhonosBlocks;
import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl; import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayer;

View File

@@ -1,288 +0,0 @@
package eu.midnightdust.visualoverhaul.config;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ScreenTexts;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.*;
import net.minecraft.util.Formatting;
import java.lang.annotation.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.regex.Pattern;
// MidnightConfig v0.1.0 //
/* Based on https://github.com/Minenash/TinyConfig
Credits to Minenash - CC0-1.0
You can copy this class to get a standalone version of MidnightConfig */
@SuppressWarnings("rawtypes")
public class MidnightConfig {
private static final Pattern INTEGER_ONLY = Pattern.compile("(-?[0-9]*)");
private static final Pattern DECIMAL_ONLY = Pattern.compile("-?([\\d]+\\.?[\\d]*|[\\d]*\\.?[\\d]+|\\.)");
private static final List<EntryInfo> entries = new ArrayList<>();
protected static class EntryInfo {
Field field;
Object widget;
int width;
Method dynamicTooltip;
Map.Entry<TextFieldWidget,Text> error;
Object defaultValue;
Object value;
String tempValue;
boolean inLimits = true;
}
private static Class configClass;
private static String translationPrefix;
private static Path path;
private static final Gson gson = new GsonBuilder()
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
.excludeFieldsWithModifiers(Modifier.PRIVATE)
.setPrettyPrinting()
.create();
public static void init(String modid, Class<?> config) {
translationPrefix = modid + ".midnightconfig.";
path = FabricLoader.getInstance().getConfigDir().resolve(modid + ".json");
configClass = config;
for (Field field : config.getFields()) {
Class<?> type = field.getType();
EntryInfo info = new EntryInfo();
Entry e;
try { e = field.getAnnotation(Entry.class); }
catch (Exception ignored) { continue; }
info.width = e.width();
info.field = field;
if (type == int.class) textField(info, Integer::parseInt, INTEGER_ONLY, e.min(), e.max(), true);
else if (type == double.class) textField(info, Double::parseDouble, DECIMAL_ONLY, e.min(), e.max(),false);
else if (type == String.class) textField(info, String::length, null, Math.min(e.min(),0), Math.max(e.max(),1),true);
else if (type == boolean.class) {
Function<Object,Text> func = value -> new LiteralText((Boolean) value ? "True" : "False").formatted((Boolean) value ? Formatting.GREEN : Formatting.RED);
info.widget = new AbstractMap.SimpleEntry<ButtonWidget.PressAction, Function<Object, Text>>(button -> {
info.value = !(Boolean) info.value;
button.setMessage(func.apply(info.value));
}, func);
}
else if (type.isEnum()) {
List<?> values = Arrays.asList(field.getType().getEnumConstants());
Function<Object,Text> func = value -> new TranslatableText(translationPrefix + "enum." + type.getSimpleName() + "." + info.value.toString());
info.widget = new AbstractMap.SimpleEntry<ButtonWidget.PressAction, Function<Object,Text>>( button -> {
int index = values.indexOf(info.value) + 1;
info.value = values.get(index >= values.size()? 0 : index);
button.setMessage(func.apply(info.value));
}, func);
}
else
continue;
entries.add(info);
try { info.defaultValue = field.get(null); }
catch (IllegalAccessException ignored) {}
try {
info.dynamicTooltip = config.getMethod(e.dynamicTooltip());
info.dynamicTooltip.setAccessible(true);
} catch (Exception ignored) {}
}
try { gson.fromJson(Files.newBufferedReader(path), config); }
catch (Exception e) { write(); }
for (EntryInfo info : entries) {
try {
info.value = info.field.get(null);
info.tempValue = info.value.toString();
}
catch (IllegalAccessException ignored) {}
}
}
private static void textField(EntryInfo info, Function<String,Number> f, Pattern pattern, double min, double max, boolean cast) {
boolean isNumber = pattern != null;
info.widget = (BiFunction<TextFieldWidget, ButtonWidget, Predicate<String>>) (t, b) -> s -> {
s = s.trim();
if (!(s.isEmpty() || !isNumber || pattern.matcher(s).matches()))
return false;
Number value = 0;
boolean inLimits = false;
System.out.println(((isNumber ^ s.isEmpty())));
System.out.println(!s.equals("-") && !s.equals("."));
info.error = null;
if (!(isNumber && s.isEmpty()) && !s.equals("-") && !s.equals(".")) {
value = f.apply(s);
inLimits = value.doubleValue() >= min && value.doubleValue() <= max;
info.error = inLimits? null : new AbstractMap.SimpleEntry<>(t, new LiteralText(value.doubleValue() < min ?
"§cMinimum " + (isNumber? "value" : "length") + (cast? " is " + (int)min : " is " + min) :
"§cMaximum " + (isNumber? "value" : "length") + (cast? " is " + (int)max : " is " + max)));
}
info.tempValue = s;
t.setEditableColor(inLimits? 0xFFFFFFFF : 0xFFFF7777);
info.inLimits = inLimits;
b.active = entries.stream().allMatch(e -> e.inLimits);
if (inLimits)
info.value = isNumber? value : s;
return true;
};
}
public static void write() {
try {
if (!Files.exists(path)) Files.createFile(path);
Files.write(path, gson.toJson(configClass.newInstance()).getBytes());
} catch (Exception e) {
e.printStackTrace();
}
}
public Screen getScreen(Screen parent) {
return new TinyConfigScreen(parent);
}
private static class TinyConfigScreen extends Screen {
protected TinyConfigScreen(Screen parent) {
super(new TranslatableText(MidnightConfig.translationPrefix + "title"));
this.parent = parent;
}
private final Screen parent;
// Real Time config update //
@Override
public void tick() {
for (EntryInfo info : entries)
try { info.field.set(null, info.value); }
catch (IllegalAccessException ignore) {}
}
@Override
protected void init() {
super.init();
this.addButton(new ButtonWidget(this.width / 2 - 154, this.height - 28, 150, 20, ScreenTexts.CANCEL, button -> {
try { gson.fromJson(Files.newBufferedReader(path), configClass); }
catch (Exception e) { write(); }
for (EntryInfo info : entries) {
try {
info.value = info.field.get(null);
info.tempValue = info.value.toString();
}
catch (IllegalAccessException ignored) {}
}
Objects.requireNonNull(client).openScreen(parent);
}));
ButtonWidget done = this.addButton(new ButtonWidget(this.width / 2 + 4, this.height - 28, 150, 20, ScreenTexts.DONE, (button) -> {
for (EntryInfo info : entries)
try { info.field.set(null, info.value); }
catch (IllegalAccessException ignore) {}
write();
Objects.requireNonNull(client).openScreen(parent);
}));
int y = 45;
for (EntryInfo info : entries) {
addButton(new ButtonWidget(width - 155, y, 40,20, new LiteralText("Reset").formatted(Formatting.RED), (button -> {
info.value = info.defaultValue;
info.tempValue = info.value.toString();
Objects.requireNonNull(client).openScreen(this);
})));
if (info.widget instanceof Map.Entry) {
Map.Entry<ButtonWidget.PressAction,Function<Object,Text>> widget = (Map.Entry<ButtonWidget.PressAction, Function<Object, Text>>) info.widget;
addButton(new ButtonWidget(width-110,y,info.width,20, widget.getValue().apply(info.value), widget.getKey()));
}
else {
TextFieldWidget widget = addButton(new TextFieldWidget(textRenderer, width-110, y, info.width, 20, null));
widget.setText(info.tempValue);
Predicate<String> processor = ((BiFunction<TextFieldWidget, ButtonWidget, Predicate<String>>) info.widget).apply(widget,done);
widget.setTextPredicate(processor);
children.add(widget);
}
y += 25;
}
}
int aniX = this.width / 2;
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
this.renderBackground(matrices);
if (aniX < this.width / 2) {
aniX = aniX +40;
}
int stringWidth = (int) (title.getString().length() * 2.75f);
this.fillGradient(matrices, this.width / 2 - stringWidth, 10, this.width /2 + stringWidth, 29, -1072689136, -804253680);
this.fillGradient(matrices, this.width / 2 - aniX, 35, width/2 + aniX, this.height - 40, -1072689136, -804253680);
super.render(matrices, mouseX, mouseY, delta);
drawCenteredText(matrices, textRenderer, title, width/2, 15, 0xFFFFFF);
int y = 40;
for (EntryInfo info : entries) {
drawTextWithShadow(matrices, textRenderer, new TranslatableText(translationPrefix + info.field.getName()), 12, y + 10, 0xFFFFFF);
if (info.error != null && info.error.getKey().isMouseOver(mouseX,mouseY))
renderTooltip(matrices, info.error.getValue(), mouseX, mouseY);
else if (mouseY >= y && mouseY < (y + 25)) {
if (info.dynamicTooltip != null) {
try {
renderTooltip(matrices, (List<Text>) info.dynamicTooltip.invoke(null, entries), mouseX, mouseY);
y += 25;
continue;
} catch (Exception e) { e.printStackTrace(); }
}
String key = translationPrefix + info.field.getName() + ".tooltip";
if (I18n.hasTranslation(key)) {
List<Text> list = new ArrayList<>();
for (String str : I18n.translate(key).split("\n"))
list.add(new LiteralText(str));
renderTooltip(matrices, list, mouseX, mouseY);
}
}
y += 25;
}
}
}
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Entry {
String dynamicTooltip() default "";
int width() default 100;
double min() default Double.MIN_NORMAL;
double max() default Double.MAX_VALUE;
}
}

View File

@@ -1,16 +0,0 @@
package eu.midnightdust.visualoverhaul.config;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import eu.midnightdust.lib.config.MidnightConfig;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
@Environment(EnvType.CLIENT)
public class ModMenuIntegration implements ModMenuApi {
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return parent -> MidnightConfig.getScreen(parent,"visualoverhaul");
}
}

View File

@@ -7,5 +7,8 @@ public class VOConfig extends MidnightConfig {
@Entry public static boolean jukebox = true; @Entry public static boolean jukebox = true;
@Entry public static boolean jukebox_fake_block = true; @Entry public static boolean jukebox_fake_block = true;
@Entry public static boolean furnace = true; @Entry public static boolean furnace = true;
@Entry public static boolean smoker_particles = true;
@Entry public static boolean blast_furnace_particles = true;
@Entry public static boolean coloredItems = true; @Entry public static boolean coloredItems = true;
@Entry public static boolean potionEnchantmentGlint = true;
} }

View File

@@ -2,14 +2,13 @@ package eu.midnightdust.visualoverhaul.mixin;
import eu.midnightdust.visualoverhaul.VisualOverhaul; import eu.midnightdust.visualoverhaul.VisualOverhaul;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import net.fabricmc.fabric.api.server.PlayerStream; import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl; import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.entity.*; import net.minecraft.block.entity.*;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketByteBuf; import net.minecraft.network.PacketByteBuf;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@@ -33,9 +32,9 @@ public abstract class MixinAbstractFurnaceBlockEntity extends LockableContainerB
@Inject(at = @At("TAIL"), method = "tick") @Inject(at = @At("TAIL"), method = "tick")
private static void tick(World world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity, CallbackInfo ci) { private static void tick(World world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity, CallbackInfo ci) {
if (world.getBlockState(pos).getBlock().equals(Blocks.FURNACE)) { if (world.getBlockState(pos).hasBlockEntity()) {
if (!world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) { if (!world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) {
Stream<PlayerEntity> watchingPlayers = PlayerStream.watching(world, pos); Stream<ServerPlayerEntity> watchingPlayers = PlayerLookup.tracking(blockEntity).stream();
PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer()); PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer());
passedData.writeBlockPos(pos); passedData.writeBlockPos(pos);
passedData.writeItemStack(blockEntity.getStack(0)); passedData.writeItemStack(blockEntity.getStack(0));

View File

@@ -0,0 +1,41 @@
package eu.midnightdust.visualoverhaul.mixin;
import eu.midnightdust.visualoverhaul.config.VOConfig;
import net.minecraft.block.AbstractFurnaceBlock;
import net.minecraft.block.BlastFurnaceBlock;
import net.minecraft.block.BlockState;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Random;
@Mixin(BlastFurnaceBlock.class)
public abstract class MixinBlastFurnaceBlock extends AbstractFurnaceBlock {
protected MixinBlastFurnaceBlock(Settings settings) {
super(settings);
}
@Inject(at = @At("TAIL"), method = "randomDisplayTick")
public void vo$randomDisplayTick(BlockState state, World world, BlockPos pos, Random random, CallbackInfo ci) {
if (state.get(LIT) && VOConfig.blast_furnace_particles) {
double d = (double)pos.getX() + 0.5D;
double e = pos.getY();
double f = (double)pos.getZ() + 0.5D;
Direction direction = state.get(FACING);
Direction.Axis axis = direction.getAxis();
double h = random.nextDouble() * 0.6D - 0.3D;
double i = axis == Direction.Axis.X ? (double)direction.getOffsetX() * 0.4D : h;
double j = random.nextDouble() * 6.0D / 16.0D;
double k = axis == Direction.Axis.Z ? (double)direction.getOffsetZ() * 0.4D : h;
world.addParticle(ParticleTypes.FLAME, d + i, e + j, f + k, 0.0D, 0.0D, 0.0D);
}
}
}

View File

@@ -2,15 +2,15 @@ package eu.midnightdust.visualoverhaul.mixin;
import eu.midnightdust.visualoverhaul.VisualOverhaul; import eu.midnightdust.visualoverhaul.VisualOverhaul;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import net.fabricmc.fabric.api.server.PlayerStream; import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl; import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.entity.BrewingStandBlockEntity; import net.minecraft.block.entity.BrewingStandBlockEntity;
import net.minecraft.block.entity.LockableContainerBlockEntity; import net.minecraft.block.entity.LockableContainerBlockEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketByteBuf; import net.minecraft.network.PacketByteBuf;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@@ -34,7 +34,7 @@ public abstract class MixinBrewingStandBlockEntity extends LockableContainerBloc
@Inject(at = @At("TAIL"), method = "tick") @Inject(at = @At("TAIL"), method = "tick")
private static void tick(World world, BlockPos pos, BlockState state, BrewingStandBlockEntity blockEntity, CallbackInfo ci) { private static void tick(World world, BlockPos pos, BlockState state, BrewingStandBlockEntity blockEntity, CallbackInfo ci) {
if (!world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) { if (!world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) {
Stream<PlayerEntity> watchingPlayers = PlayerStream.watching(world, pos); Stream<ServerPlayerEntity> watchingPlayers = PlayerLookup.tracking(blockEntity).stream();
PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer()); PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer());
passedData.writeBlockPos(pos); passedData.writeBlockPos(pos);
passedData.writeItemStack(blockEntity.getStack(0)); passedData.writeItemStack(blockEntity.getStack(0));

View File

@@ -3,13 +3,13 @@ package eu.midnightdust.visualoverhaul.mixin;
import eu.midnightdust.visualoverhaul.VisualOverhaul; import eu.midnightdust.visualoverhaul.VisualOverhaul;
import eu.midnightdust.visualoverhaul.util.JukeboxPacketUpdate; import eu.midnightdust.visualoverhaul.util.JukeboxPacketUpdate;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import net.fabricmc.fabric.api.server.PlayerStream; import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl; import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.entity.*; import net.minecraft.block.entity.*;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketByteBuf; import net.minecraft.network.PacketByteBuf;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@@ -30,7 +30,7 @@ public abstract class MixinJukeboxBlockEntity extends BlockEntity {
@Unique @Unique
private static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) { private static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) {
if (!world.isClient && (JukeboxPacketUpdate.invUpdate || world.getPlayers().size() == JukeboxPacketUpdate.playerUpdate)) { if (!world.isClient && (JukeboxPacketUpdate.invUpdate || world.getPlayers().size() == JukeboxPacketUpdate.playerUpdate)) {
Stream<PlayerEntity> watchingPlayers = PlayerStream.watching(world, pos); Stream<ServerPlayerEntity> watchingPlayers = PlayerLookup.tracking(blockEntity).stream();
PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer()); PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer());
passedData.writeBlockPos(pos); passedData.writeBlockPos(pos);
passedData.writeItemStack(blockEntity.getRecord()); passedData.writeItemStack(blockEntity.getRecord());

View File

@@ -0,0 +1,22 @@
package eu.midnightdust.visualoverhaul.mixin;
import eu.midnightdust.visualoverhaul.config.VOConfig;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.PotionItem;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PotionItem.class)
public abstract class MixinPotionItem extends Item {
public MixinPotionItem(Settings settings) {
super(settings);
}
@Inject(at = @At("HEAD"), method = "hasGlint", cancellable = true)
public void vo$hasGlint(ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
if (!VOConfig.potionEnchantmentGlint) cir.setReturnValue(super.hasGlint(stack));
}
}

View File

@@ -0,0 +1,41 @@
package eu.midnightdust.visualoverhaul.mixin;
import eu.midnightdust.visualoverhaul.config.VOConfig;
import net.minecraft.block.AbstractFurnaceBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.SmokerBlock;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Random;
@Mixin(SmokerBlock.class)
public abstract class MixinSmokerBlock extends AbstractFurnaceBlock {
protected MixinSmokerBlock(Settings settings) {
super(settings);
}
@Inject(at = @At("TAIL"), method = "randomDisplayTick")
public void vo$randomDisplayTick(BlockState state, World world, BlockPos pos, Random random, CallbackInfo ci) {
if (state.get(LIT) && VOConfig.smoker_particles) {
double d = (double)pos.getX() + 0.5D;
double e = pos.getY();
double f = (double)pos.getZ() + 0.5D;
Direction direction = state.get(FACING);
Direction.Axis axis = direction.getAxis();
double h = random.nextDouble() * 0.6D - 0.3D;
double i = axis == Direction.Axis.X ? (double)direction.getOffsetX() * 0.4D : h;
double j = random.nextDouble() * 6.0D / 16.0D;
double k = axis == Direction.Axis.Z ? (double)direction.getOffsetZ() * 0.4D : h;
world.addParticle(ParticleTypes.FLAME, d + i, e + j, f + k, 0.0D, 0.0D, 0.0D);
}
}
}

View File

@@ -1,9 +1,12 @@
{ {
"visualoverhaul.midnightconfig.title":"Visual Overhaul Config", "visualoverhaul.midnightconfig.title":"Visual Overhaul Config",
"visualoverhaul.midnightconfig.brewingstand":"Enable Brewing Stand Enhancements", "visualoverhaul.midnightconfig.brewingstand":"Brewing Stand Enhancements",
"visualoverhaul.midnightconfig.jukebox":"Enable Jukebox Enhancements", "visualoverhaul.midnightconfig.jukebox":"Jukebox Enhancements",
"visualoverhaul.midnightconfig.jukebox_fake_block":"Enable fake block on jukebox top", "visualoverhaul.midnightconfig.jukebox_fake_block":"Fake block on jukebox top",
"visualoverhaul.midnightconfig.furnace":"Enable Furnace Enhancements", "visualoverhaul.midnightconfig.furnace":"Furnace Enhancements",
"visualoverhaul.midnightconfig.coloredItems":"Enable biome-based item colors", "visualoverhaul.midnightconfig.smoker_particles":"Smoker Particles",
"visualoverhaul.midnightconfig.coloredItems.tooltip":"Needs restart!" "visualoverhaul.midnightconfig.blast_furnace_particles":"Blast Furnace Particles",
"visualoverhaul.midnightconfig.coloredItems":"Biome-based item colors",
"visualoverhaul.midnightconfig.coloredItems.tooltip":"§cNeeds restart!",
"visualoverhaul.midnightconfig.potionEnchantmentGlint":"Potion enchantment glint"
} }

View File

@@ -22,9 +22,6 @@
"entrypoints": { "entrypoints": {
"client": [ "client": [
"eu.midnightdust.visualoverhaul.VisualOverhaulClient" "eu.midnightdust.visualoverhaul.VisualOverhaulClient"
],
"modmenu": [
"eu.midnightdust.visualoverhaul.config.ModMenuIntegration"
] ]
}, },
@@ -34,6 +31,6 @@
"depends": { "depends": {
"fabric": ">=0.28.4", "fabric": ">=0.28.4",
"minecraft": "1.17.x" "minecraft": ">=1.18"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"pack_format": 7, "pack_format": 8,
"description": "Makes the water bucket also change it's color based on biome color" "description": "Makes the water bucket also change it's color based on biome color"
} }
} }

View File

@@ -0,0 +1,34 @@
{
"variants": {
"facing=east,lit=false": {
"model": "minecraft:block/blast_furnace",
"y": 90
},
"facing=east,lit=true": {
"model": "minecraft:block/blast_furnace_on",
"y": 90
},
"facing=north,lit=false": {
"model": "minecraft:block/blast_furnace"
},
"facing=north,lit=true": {
"model": "minecraft:block/blast_furnace_on"
},
"facing=south,lit=false": {
"model": "minecraft:block/blast_furnace",
"y": 180
},
"facing=south,lit=true": {
"model": "minecraft:block/blast_furnace_on",
"y": 180
},
"facing=west,lit=false": {
"model": "minecraft:block/blast_furnace",
"y": 270
},
"facing=west,lit=true": {
"model": "minecraft:block/blast_furnace_on",
"y": 270
}
}
}

View File

@@ -0,0 +1,34 @@
{
"variants": {
"facing=east,lit=false": {
"model": "minecraft:block/smoker",
"y": 90
},
"facing=east,lit=true": {
"model": "minecraft:block/smoker_on",
"y": 90
},
"facing=north,lit=false": {
"model": "minecraft:block/smoker"
},
"facing=north,lit=true": {
"model": "minecraft:block/smoker_on"
},
"facing=south,lit=false": {
"model": "minecraft:block/smoker",
"y": 180
},
"facing=south,lit=true": {
"model": "minecraft:block/smoker_on",
"y": 180
},
"facing=west,lit=false": {
"model": "minecraft:block/smoker",
"y": 270
},
"facing=west,lit=true": {
"model": "minecraft:block/smoker_on",
"y": 270
}
}
}

View File

@@ -0,0 +1,96 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "block/blast_furnace_front",
"2": "block/blast_furnace_side",
"3": "block/blast_furnace_top",
"particle": "block/blast_furnace_front"
},
"elements": [
{
"from": [0, 0, 5],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [8, 0, 9, 16], "texture": "#0"},
"east": {"uv": [0, 0, 11, 16], "texture": "#2"},
"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
"west": {"uv": [5, 0, 16, 16], "texture": "#2"},
"up": {"uv": [0, 5, 16, 16], "texture": "#3"},
"down": {"uv": [0, 0, 16, 11], "texture": "#3"}
}
},
{
"from": [10, 0, 0],
"to": [16, 16, 5],
"faces": {
"north": {"uv": [0, 0, 6, 16], "texture": "#0"},
"east": {"uv": [11, 0, 16, 16], "texture": "#2"},
"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
"up": {"uv": [10, 0, 16, 5], "texture": "#3"},
"down": {"uv": [10, 11, 16, 16], "texture": "#3"}
}
},
{
"from": [0, 0, 0],
"to": [5, 16, 5],
"faces": {
"north": {"uv": [11, 0, 16, 16], "texture": "#0"},
"east": {"uv": [10, 0, 11, 16], "texture": "#0"},
"west": {"uv": [0, 0, 5, 16], "texture": "#2"},
"up": {"uv": [0, 0, 5, 5], "texture": "#3"},
"down": {"uv": [0, 11, 5, 16], "texture": "#3"}
}
},
{
"from": [5, 8, 0],
"to": [10, 16, 5],
"faces": {
"north": {"uv": [6, 0, 11, 8], "texture": "#0"},
"up": {"uv": [5, 0, 10, 5], "texture": "#3"},
"down": {"uv": [6, 8, 7, 13], "texture": "#0"}
}
},
{
"from": [5, 0, 0],
"to": [10, 5, 5],
"faces": {
"north": {"uv": [6, 11, 11, 16], "texture": "#0"},
"up": {"uv": [6, 12, 7, 15], "texture": "#2"},
"down": {"uv": [5, 11, 10, 16], "texture": "#3"}
}
},
{
"from": [8, 5, 0],
"to": [9, 8, 1],
"faces": {
"north": {"uv": [7, 8, 8, 11], "texture": "#0"},
"east": {"uv": [7, 8, 8, 11], "texture": "#0"},
"west": {"uv": [7, 8, 8, 11], "texture": "#0"}
}
},
{
"from": [9.99, 5, 0],
"to": [9.99, 8, 1],
"faces": {
"west": {"uv": [5, 8, 6, 11], "texture": "#0"}
}
},
{
"from": [6, 5, 0],
"to": [7, 8, 1],
"faces": {
"north": {"uv": [9, 8, 10, 11], "texture": "#0"},
"east": {"uv": [9, 8, 10, 11], "texture": "#0"},
"west": {"uv": [9, 8, 10, 11], "texture": "#0"}
}
},
{
"from": [5.01, 5, 0],
"to": [5.01, 8, 1],
"faces": {
"east": {"uv": [11, 8, 12, 11], "texture": "#0"}
}
}
]
}

View File

@@ -0,0 +1,97 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "block/blast_furnace_front",
"1": "block/blast_furnace_front_on",
"2": "block/blast_furnace_side",
"3": "block/blast_furnace_top",
"particle": "block/blast_furnace_front"
},
"elements": [
{
"from": [0, 0, 5],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [8, 0, 9, 16], "texture": "#1"},
"east": {"uv": [0, 0, 11, 16], "texture": "#2"},
"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
"west": {"uv": [5, 0, 16, 16], "texture": "#2"},
"up": {"uv": [0, 5, 16, 16], "texture": "#3"},
"down": {"uv": [0, 0, 16, 11], "texture": "#3"}
}
},
{
"from": [10, 0, 0],
"to": [16, 16, 5],
"faces": {
"north": {"uv": [0, 0, 6, 16], "texture": "#0"},
"east": {"uv": [11, 0, 16, 16], "texture": "#2"},
"west": {"uv": [6, 0, 7, 16], "texture": "#1"},
"up": {"uv": [10, 0, 16, 5], "texture": "#3"},
"down": {"uv": [10, 11, 16, 16], "texture": "#3"}
}
},
{
"from": [0, 0, 0],
"to": [5, 16, 5],
"faces": {
"north": {"uv": [11, 0, 16, 16], "texture": "#0"},
"east": {"uv": [10, 0, 11, 16], "texture": "#1"},
"west": {"uv": [0, 0, 5, 16], "texture": "#2"},
"up": {"uv": [0, 0, 5, 5], "texture": "#3"},
"down": {"uv": [0, 11, 5, 16], "texture": "#3"}
}
},
{
"from": [5, 8, 0],
"to": [10, 16, 5],
"faces": {
"north": {"uv": [6, 0, 11, 8], "texture": "#0"},
"up": {"uv": [5, 0, 10, 5], "texture": "#3"},
"down": {"uv": [6, 8, 7, 13], "texture": "#1"}
}
},
{
"from": [5, 0, 0],
"to": [10, 5, 5],
"faces": {
"north": {"uv": [6, 11, 11, 16], "texture": "#0"},
"up": {"uv": [6, 12, 7, 15], "texture": "#2"},
"down": {"uv": [5, 11, 10, 16], "texture": "#3"}
}
},
{
"from": [8, 5, 0],
"to": [9, 8, 1],
"faces": {
"north": {"uv": [7, 8, 8, 11], "texture": "#0"},
"east": {"uv": [7, 8, 8, 11], "texture": "#0"},
"west": {"uv": [7, 8, 8, 11], "texture": "#0"}
}
},
{
"from": [9.99, 5, 0],
"to": [9.99, 8, 1],
"faces": {
"west": {"uv": [5, 8, 6, 11], "texture": "#0"}
}
},
{
"from": [6, 5, 0],
"to": [7, 8, 1],
"faces": {
"north": {"uv": [9, 8, 10, 11], "texture": "#0"},
"east": {"uv": [9, 8, 10, 11], "texture": "#0"},
"west": {"uv": [9, 8, 10, 11], "texture": "#0"}
}
},
{
"from": [5.01, 5, 0],
"to": [5.01, 8, 1],
"faces": {
"east": {"uv": [11, 8, 12, 11], "texture": "#0"}
}
}
]
}

View File

@@ -0,0 +1,174 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "block/smoker_front",
"1": "block/smoker_bottom",
"2": "block/smoker_top",
"3": "block/smoker_side",
"4": "block/smoker_front_on",
"particle": "block/smoker_front"
},
"elements": [
{
"from": [0, 12, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 4], "texture": "#0"},
"east": {"uv": [0, 0, 16, 4], "texture": "#3"},
"south": {"uv": [0, 0, 16, 4], "texture": "#3"},
"west": {"uv": [0, 0, 16, 4], "texture": "#3"},
"up": {"uv": [0, 0, 16, 16], "texture": "#2"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
},
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#4"},
"east": {"uv": [0, 14, 16, 16], "texture": "#3"},
"south": {"uv": [0, 14, 16, 16], "texture": "#3"},
"west": {"uv": [0, 14, 16, 16], "texture": "#3"},
"up": {"uv": [0, 0, 16, 16], "texture": "#1"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
},
{
"from": [14, 2, 0],
"to": [16, 12, 16],
"faces": {
"north": {"uv": [0, 4, 2, 14], "texture": "#0"},
"east": {"uv": [0, 4, 16, 14], "texture": "#3"},
"south": {"uv": [14, 4, 16, 14], "texture": "#3"},
"west": {"uv": [0, 0, 16, 10], "texture": "#1"}
}
},
{
"from": [0, 2, 0],
"to": [2, 12, 16],
"faces": {
"north": {"uv": [14, 4, 16, 14], "texture": "#0"},
"east": {"uv": [0, 0, 16, 10], "texture": "#1"},
"south": {"uv": [0, 4, 2, 14], "texture": "#3"},
"west": {"uv": [0, 4, 16, 14], "texture": "#3"}
}
},
{
"from": [13, 8, 0],
"to": [14, 12, 1],
"faces": {
"north": {"uv": [2, 4, 3, 8], "texture": "#4"},
"west": {"uv": [4, 4, 5, 8], "texture": "#0"}
}
},
{
"from": [12, 8, 0],
"to": [13, 9, 1],
"faces": {
"north": {"uv": [3, 7, 4, 8], "texture": "#4"},
"west": {"uv": [3, 7, 4, 8], "texture": "#4"}
}
},
{
"from": [12, 11, 0],
"to": [13, 12, 1],
"faces": {
"north": {"uv": [3, 4, 4, 5], "texture": "#4"},
"west": {"uv": [3, 4, 4, 5], "texture": "#4"}
}
},
{
"from": [2, 8, 0],
"to": [4, 12, 1],
"faces": {
"north": {"uv": [12, 4, 14, 8], "texture": "#0"},
"east": {"uv": [12, 4, 13, 8], "texture": "#0"}
}
},
{
"from": [2, 8, 1],
"to": [4, 12, 6],
"faces": {
"east": {"uv": [3, 3, 8, 7], "texture": "#1"}
}
},
{
"from": [11, 8, 1],
"to": [14, 12, 6],
"faces": {
"north": {"uv": [2, 4, 5, 8], "texture": "#1"},
"east": {"uv": [3, 3, 8, 7], "texture": "#1"},
"west": {"uv": [5, 4, 10, 8], "texture": "#1"}
}
},
{
"from": [2, 7, 0],
"to": [14, 8, 8],
"faces": {
"north": {"uv": [2, 8, 14, 9], "texture": "#0"},
"up": {"uv": [2, 8, 14, 12], "texture": "#1"},
"down": {"uv": [2, 5, 14, 9], "texture": "#1"}
}
},
{
"from": [2, 7, 6],
"to": [14, 12, 16],
"faces": {
"north": {"uv": [2, 4, 14, 9], "texture": "#0"},
"south": {"uv": [2, 4, 14, 9], "texture": "#3"}
}
},
{
"from": [2, 1, 5],
"to": [14, 7, 16],
"faces": {
"north": {"uv": [5, 5, 12, 8], "texture": "#0"},
"south": {"uv": [2, 9, 14, 15], "texture": "#3"}
}
},
{
"from": [4.9, 10, -5],
"to": [12.9, 12, -4],
"rotation": {"angle": -22.5, "axis": "y", "origin": [0.9, 0, -4.6]},
"faces": {
"north": {"uv": [4, 4, 12, 6], "texture": "#4"},
"east": {"uv": [4, 4, 5, 6], "texture": "#4"},
"south": {"uv": [4, 4, 12, 6], "texture": "#4"},
"west": {"uv": [11, 4, 12, 6], "texture": "#4"},
"up": {"uv": [4, 4, 12, 5], "texture": "#4"}
}
},
{
"from": [4.9, 8, -5],
"to": [12.9, 10, -4],
"rotation": {"angle": -22.5, "axis": "y", "origin": [0.9, -2, -4.6]},
"faces": {
"north": {"uv": [4, 4, 12, 6], "rotation": 180, "texture": "#4"},
"east": {"uv": [4, 4, 5, 6], "rotation": 180, "texture": "#4"},
"south": {"uv": [4, 4, 12, 6], "rotation": 180, "texture": "#4"},
"west": {"uv": [11, 4, 12, 6], "rotation": 180, "texture": "#4"},
"up": {"uv": [4, 4, 12, 5], "texture": "#4"},
"down": {"uv": [4, 5, 12, 6], "texture": "#4"}
}
},
{
"from": [12.9, 9, -4.9],
"to": [13.9, 11, -3.9],
"rotation": {"angle": -22.5, "axis": "y", "origin": [0.9, 0, -4.6]},
"faces": {
"north": {"uv": [3, 5, 4, 7], "texture": "#4"},
"south": {"uv": [3, 5, 4, 7], "texture": "#4"},
"up": {"uv": [3, 5, 4, 6], "texture": "#4"},
"down": {"uv": [3, 6, 4, 7], "texture": "#4"}
}
}
],
"groups": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
{
"name": "group",
"origin": [0, 0, 0],
"children": [13, 14, 15]
}
]
}

View File

@@ -0,0 +1,153 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "block/smoker_front",
"1": "block/smoker_bottom",
"2": "block/smoker_top",
"3": "block/smoker_side",
"4": "block/smoker_front_on",
"particle": "block/smoker_front"
},
"elements": [
{
"from": [0, 12, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 4], "texture": "#0"},
"east": {"uv": [0, 0, 16, 4], "texture": "#3"},
"south": {"uv": [0, 0, 16, 4], "texture": "#3"},
"west": {"uv": [0, 0, 16, 4], "texture": "#3"},
"up": {"uv": [0, 0, 16, 16], "texture": "#2"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
},
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#4"},
"east": {"uv": [0, 14, 16, 16], "texture": "#3"},
"south": {"uv": [0, 14, 16, 16], "texture": "#3"},
"west": {"uv": [0, 14, 16, 16], "texture": "#3"},
"up": {"uv": [0, 0, 16, 16], "texture": "#1"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
},
{
"from": [14, 2, 0],
"to": [16, 12, 16],
"faces": {
"north": {"uv": [0, 4, 2, 14], "texture": "#0"},
"east": {"uv": [0, 4, 16, 14], "texture": "#3"},
"south": {"uv": [14, 4, 16, 14], "texture": "#3"},
"west": {"uv": [0, 0, 16, 10], "texture": "#1"}
}
},
{
"from": [0, 2, 0],
"to": [2, 12, 16],
"faces": {
"north": {"uv": [14, 4, 16, 14], "texture": "#0"},
"east": {"uv": [0, 0, 16, 10], "texture": "#1"},
"south": {"uv": [0, 4, 2, 14], "texture": "#3"},
"west": {"uv": [0, 4, 16, 14], "texture": "#3"}
}
},
{
"from": [13, 8, 0],
"to": [14, 12, 1],
"faces": {
"north": {"uv": [2, 4, 3, 8], "texture": "#4"},
"west": {"uv": [4, 4, 5, 8], "texture": "#0"}
}
},
{
"from": [12, 8, 0],
"to": [13, 9, 1],
"faces": {
"north": {"uv": [3, 7, 4, 8], "texture": "#4"},
"west": {"uv": [3, 7, 4, 8], "texture": "#4"}
}
},
{
"from": [12, 11, 0],
"to": [13, 12, 1],
"faces": {
"north": {"uv": [3, 4, 4, 5], "texture": "#4"},
"west": {"uv": [3, 4, 4, 5], "texture": "#4"}
}
},
{
"from": [2, 8, 0],
"to": [4, 12, 1],
"faces": {
"north": {"uv": [12, 4, 14, 8], "texture": "#0"},
"east": {"uv": [12, 4, 13, 8], "texture": "#0"}
}
},
{
"from": [2, 8, 1],
"to": [4, 12, 6],
"faces": {
"east": {"uv": [3, 3, 8, 7], "texture": "#1"}
}
},
{
"from": [11, 8, 1],
"to": [14, 12, 6],
"faces": {
"north": {"uv": [2, 4, 5, 8], "texture": "#1"},
"east": {"uv": [3, 3, 8, 7], "texture": "#1"},
"west": {"uv": [5, 4, 10, 8], "texture": "#1"}
}
},
{
"from": [2, 7, 0],
"to": [14, 8, 8],
"faces": {
"north": {"uv": [2, 8, 14, 9], "texture": "#0"},
"up": {"uv": [2, 8, 14, 12], "texture": "#1"},
"down": {"uv": [2, 5, 14, 9], "texture": "#1"}
}
},
{
"from": [2, 7, 6],
"to": [14, 12, 16],
"faces": {
"north": {"uv": [2, 4, 14, 9], "texture": "#0"},
"south": {"uv": [2, 4, 14, 9], "texture": "#3"}
}
},
{
"from": [2, 1, 5],
"to": [14, 7, 16],
"faces": {
"north": {"uv": [2, 9, 14, 15], "texture": "#4"},
"south": {"uv": [2, 9, 14, 15], "texture": "#3"}
}
},
{
"from": [4, 8, -0.4],
"to": [12, 12, 0.6],
"faces": {
"north": {"uv": [4, 4, 12, 8], "texture": "#4"},
"east": {"uv": [4, 4, 5, 8], "texture": "#4"},
"west": {"uv": [11, 4, 12, 8], "texture": "#4"},
"up": {"uv": [4, 4, 12, 5], "texture": "#4"},
"down": {"uv": [4, 7, 12, 8], "texture": "#4"}
}
},
{
"from": [12, 9, -0.3],
"to": [13, 11, 0.7],
"faces": {
"north": {"uv": [3, 5, 4, 7], "texture": "#4"},
"east": {"uv": [3, 5, 4, 7], "texture": "#4"},
"west": {"uv": [3, 5, 4, 7], "texture": "#4"},
"up": {"uv": [3, 5, 4, 6], "texture": "#4"},
"down": {"uv": [3, 6, 4, 7], "texture": "#4"}
}
}
]
}

View File

@@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"pack_format": 7, "pack_format": 8,
"description": "§2Changes the model of the furnace to be 3D" "description": "§2Changes the model of the furnace to be 3D"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"pack_format": 7, "pack_format": 8,
"description": "§2Removes the bottles from the brewing stand texture" "description": "§2Removes the bottles from the brewing stand texture"
} }
} }

View File

@@ -1,7 +1,7 @@
{ {
"required": true, "required": true,
"package": "eu.midnightdust.visualoverhaul.mixin", "package": "eu.midnightdust.visualoverhaul.mixin",
"compatibilityLevel": "JAVA_8", "compatibilityLevel": "JAVA_16",
"mixins": [ "mixins": [
"MixinAbstractFurnaceBlockEntity", "MixinAbstractFurnaceBlockEntity",
"MixinBrewingStandBlockEntity", "MixinBrewingStandBlockEntity",
@@ -9,7 +9,10 @@
"MixinJukeboxBlockEntity" "MixinJukeboxBlockEntity"
], ],
"client": [ "client": [
"MixinSoundSystem" "MixinSoundSystem",
"MixinSmokerBlock",
"MixinBlastFurnaceBlock",
"MixinPotionItem"
], ],
"injectors": { "injectors": {
"defaultRequire": 1 "defaultRequire": 1