diff --git a/build.gradle b/build.gradle index 9f7d12c..67c2ff3 100755 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ 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 @@ -14,8 +14,8 @@ minecraft { } repositories { - maven { url "https://maven.terraformersmc.com/releases" } maven { url "https://jitpack.io" } + maven { url "https://api.modrinth.com/maven" } } dependencies { @@ -25,15 +25,9 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - - compileOnly "io.github.FoundationGames:Phonos:0.1.1-1.17" - - 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" - } + + modImplementation "maven.modrinth:midnightlib:${project.midnightlib_version}" + include "maven.modrinth:midnightlib:${project.midnightlib_version}" } processResources { diff --git a/gradle.properties b/gradle.properties index 2a5a142..ae48ad1 100755 --- a/gradle.properties +++ b/gradle.properties @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.17-pre1 - yarn_mappings=1.17-pre1+build.9 - loader_version=0.11.3 + minecraft_version=1.18.1 + yarn_mappings=1.18.1+build.5 + loader_version=0.12.12 # Mod Properties - mod_version = 3.3.0 + mod_version = 4.0.0 maven_group = eu.midnightdust archives_base_name = visualoverhaul # 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.34.8+1.17 + fabric_version=0.44.0+1.18 mod_menu_version = 2.0.0-beta.5 - midnightlib_version=v0.2.2 + midnightlib_version=0.3.1 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c..7454180 100755 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..d2880ba 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0..1b6c787 100755 --- a/gradlew +++ b/gradlew @@ -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" "$@" diff --git a/src/main/java/eu/midnightdust/visualoverhaul/VisualOverhaulClient.java b/src/main/java/eu/midnightdust/visualoverhaul/VisualOverhaulClient.java index 797ed50..c4184ee 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/VisualOverhaulClient.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/VisualOverhaulClient.java @@ -8,22 +8,19 @@ import eu.midnightdust.visualoverhaul.block.renderer.JukeboxBlockEntityRenderer; import eu.midnightdust.visualoverhaul.config.VOConfig; import net.fabricmc.api.ClientModInitializer; 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.EntityModelLayerRegistry; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry; import net.fabricmc.fabric.api.resource.ResourceManagerHelper; import net.fabricmc.fabric.api.resource.ResourcePackActivationType; 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.loader.api.FabricLoader; import net.minecraft.block.Block; import net.minecraft.block.Blocks; -import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.block.entity.BrewingStandBlockEntity; -import net.minecraft.block.entity.FurnaceBlockEntity; -import net.minecraft.block.entity.JukeboxBlockEntity; +import net.minecraft.block.entity.*; import net.minecraft.client.MinecraftClient; import net.minecraft.client.color.world.BiomeColors; import net.minecraft.client.render.*; @@ -39,9 +36,10 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.Registry; import net.minecraft.world.biome.BuiltinBiomes; +import java.util.logging.LogManager; + import static eu.midnightdust.visualoverhaul.VisualOverhaul.*; -@SuppressWarnings("UnstableApiUsage") public class VisualOverhaulClient implements ClientModInitializer { 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(JukeBoxTop, 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); - BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.JUKEBOX, JukeboxBlockEntityRenderer::new); - BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.FURNACE, FurnaceBlockEntityRenderer::new); + BlockEntityRendererRegistryImpl.register(BlockEntityType.BREWING_STAND, BrewingStandBlockEntityRenderer::new); + BlockEntityRendererRegistryImpl.register(BlockEntityType.JUKEBOX, JukeboxBlockEntityRenderer::new); + BlockEntityRendererRegistryImpl.register(BlockEntityType.FURNACE, FurnaceBlockEntityRenderer::new); + BlockEntityRendererRegistryImpl.register(BlockEntityType.SMOKER, FurnaceBlockEntityRenderer::new); + BlockEntityRendererRegistryImpl.register(BlockEntityType.BLAST_FURNACE, FurnaceBlockEntityRenderer::new); // // Phonos Compat // // if (FabricLoader.getInstance().isModLoaded("phonos")) { @@ -113,7 +115,7 @@ public class VisualOverhaulClient implements ClientModInitializer { inv.set(i, attachedData.readItemStack()); } 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(1, inv.get(1)); 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); }); + // Biome-colored Items if (VOConfig.coloredItems) { ClientTickEvents.END_CLIENT_TICK.register(client -> { int waterColor; int foliageColor; int grassColor; - if (client.world != null) { - assert client.player != null; - waterColor = client.world.getColor(client.player.getBlockPos(), BiomeColors.WATER_COLOR); - foliageColor = client.world.getColor(client.player.getBlockPos(), BiomeColors.FOLIAGE_COLOR); - grassColor = client.world.getColor(client.player.getBlockPos(), BiomeColors.GRASS_COLOR); - } else { - waterColor = BuiltinBiomes.PLAINS.getWaterColor(); - foliageColor = BuiltinBiomes.PLAINS.getFoliageColor(); - grassColor = BuiltinBiomes.PLAINS.getFoliageColor(); + if (client.world != null && client.player != null) { + waterColor = BiomeColors.getWaterColor(client.world, client.player.getBlockPos()); + foliageColor = BiomeColors.getFoliageColor(client.world, client.player.getBlockPos()); + grassColor = BiomeColors.getGrassColor(client.world, client.player.getBlockPos()); + } + else { + waterColor = 4159204; + foliageColor = -8934609; + grassColor = -8934609; } ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? -1 : waterColor, Items.WATER_BUCKET); 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.OAK_LEAVES); 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 tintIndex > 0 ? -1 : PotionUtil.getColor(stack); }, Items.POTION); 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 tintIndex > 0 ? -1 : PotionUtil.getColor(stack); }, Items.SPLASH_POTION); 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 tintIndex > 0 ? -1 : PotionUtil.getColor(stack); diff --git a/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/BrewingStandBlockEntityRenderer.java b/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/BrewingStandBlockEntityRenderer.java index d4a99b6..f19c8f4 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/BrewingStandBlockEntityRenderer.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/BrewingStandBlockEntityRenderer.java @@ -7,7 +7,6 @@ import net.minecraft.block.entity.BrewingStandBlockEntity; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.VertexConsumerProvider; 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.BlockEntityRendererFactory; import net.minecraft.client.render.model.json.ModelTransformation; diff --git a/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/FurnaceBlockEntityRenderer.java b/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/FurnaceBlockEntityRenderer.java index 3128ba0..c1076a3 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/FurnaceBlockEntityRenderer.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/block/renderer/FurnaceBlockEntityRenderer.java @@ -5,7 +5,7 @@ import eu.midnightdust.visualoverhaul.config.VOConfig; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; 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.render.RenderLayer; import net.minecraft.client.render.VertexConsumer; @@ -24,16 +24,15 @@ import net.minecraft.util.math.Vec3f; import java.util.Objects; @Environment(EnvType.CLIENT) -public class FurnaceBlockEntityRenderer implements BlockEntityRenderer { +public class FurnaceBlockEntityRenderer implements BlockEntityRenderer { private final FurnaceWoodenPlanksModel planks; public FurnaceBlockEntityRenderer(BlockEntityRendererFactory.Context ctx) { this.planks = new FurnaceWoodenPlanksModel(ctx.getLayerModelPart(FurnaceWoodenPlanksModel.WOODEN_PLANKS_MODEL_LAYER)); } - @Override - public void render(FurnaceBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { - if (VOConfig.furnace && blockEntity.getCachedState().getBlock().getDefaultState().isOf(Blocks.FURNACE)) { + public void render(E blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + if (VOConfig.furnace && blockEntity != null) { BlockState blockState = blockEntity.getCachedState(); int lightAtBlock = WorldRenderer.getLightmapCoordinates(Objects.requireNonNull(blockEntity.getWorld()), blockEntity.getPos().offset(blockState.get(AbstractFurnaceBlock.FACING))); ItemStack item1 = blockEntity.getStack(0); @@ -44,6 +43,8 @@ public class FurnaceBlockEntityRenderer implements BlockEntityRenderer entries = new ArrayList<>(); - - protected static class EntryInfo { - Field field; - Object widget; - int width; - Method dynamicTooltip; - Map.Entry 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 func = value -> new LiteralText((Boolean) value ? "True" : "False").formatted((Boolean) value ? Formatting.GREEN : Formatting.RED); - info.widget = new AbstractMap.SimpleEntry>(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 func = value -> new TranslatableText(translationPrefix + "enum." + type.getSimpleName() + "." + info.value.toString()); - info.widget = new AbstractMap.SimpleEntry>( 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 f, Pattern pattern, double min, double max, boolean cast) { - boolean isNumber = pattern != null; - info.widget = (BiFunction>) (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> widget = (Map.Entry>) 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 processor = ((BiFunction>) 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) 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 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; - } -} \ No newline at end of file diff --git a/src/main/java/eu/midnightdust/visualoverhaul/config/ModMenuIntegration.java b/src/main/java/eu/midnightdust/visualoverhaul/config/ModMenuIntegration.java deleted file mode 100755 index fe721ee..0000000 --- a/src/main/java/eu/midnightdust/visualoverhaul/config/ModMenuIntegration.java +++ /dev/null @@ -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"); - } -} \ No newline at end of file diff --git a/src/main/java/eu/midnightdust/visualoverhaul/config/VOConfig.java b/src/main/java/eu/midnightdust/visualoverhaul/config/VOConfig.java index ee8fb75..3a4e3cb 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/config/VOConfig.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/config/VOConfig.java @@ -7,5 +7,8 @@ public class VOConfig extends MidnightConfig { @Entry public static boolean jukebox = true; @Entry public static boolean jukebox_fake_block = 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 potionEnchantmentGlint = true; } diff --git a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinAbstractFurnaceBlockEntity.java b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinAbstractFurnaceBlockEntity.java index 24ec047..923bbad 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinAbstractFurnaceBlockEntity.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinAbstractFurnaceBlockEntity.java @@ -2,14 +2,13 @@ package eu.midnightdust.visualoverhaul.mixin; import eu.midnightdust.visualoverhaul.VisualOverhaul; 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.minecraft.block.BlockState; -import net.minecraft.block.Blocks; import net.minecraft.block.entity.*; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketByteBuf; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; @@ -33,9 +32,9 @@ public abstract class MixinAbstractFurnaceBlockEntity extends LockableContainerB @Inject(at = @At("TAIL"), method = "tick") 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)) { - Stream watchingPlayers = PlayerStream.watching(world, pos); + Stream watchingPlayers = PlayerLookup.tracking(blockEntity).stream(); PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer()); passedData.writeBlockPos(pos); passedData.writeItemStack(blockEntity.getStack(0)); diff --git a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBlastFurnaceBlock.java b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBlastFurnaceBlock.java new file mode 100644 index 0000000..532b819 --- /dev/null +++ b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBlastFurnaceBlock.java @@ -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); + } + } + +} diff --git a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBrewingStandBlockEntity.java b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBrewingStandBlockEntity.java index 2b071b2..4dd77d7 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBrewingStandBlockEntity.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinBrewingStandBlockEntity.java @@ -2,15 +2,15 @@ package eu.midnightdust.visualoverhaul.mixin; import eu.midnightdust.visualoverhaul.VisualOverhaul; 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.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BrewingStandBlockEntity; import net.minecraft.block.entity.LockableContainerBlockEntity; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketByteBuf; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; @@ -34,7 +34,7 @@ public abstract class MixinBrewingStandBlockEntity extends LockableContainerBloc @Inject(at = @At("TAIL"), method = "tick") private static void tick(World world, BlockPos pos, BlockState state, BrewingStandBlockEntity blockEntity, CallbackInfo ci) { if (!world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) { - Stream watchingPlayers = PlayerStream.watching(world, pos); + Stream watchingPlayers = PlayerLookup.tracking(blockEntity).stream(); PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer()); passedData.writeBlockPos(pos); passedData.writeItemStack(blockEntity.getStack(0)); diff --git a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinJukeboxBlockEntity.java b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinJukeboxBlockEntity.java index 956f1e8..fb2fa35 100755 --- a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinJukeboxBlockEntity.java +++ b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinJukeboxBlockEntity.java @@ -3,13 +3,13 @@ package eu.midnightdust.visualoverhaul.mixin; import eu.midnightdust.visualoverhaul.VisualOverhaul; import eu.midnightdust.visualoverhaul.util.JukeboxPacketUpdate; 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.minecraft.block.BlockState; import net.minecraft.block.entity.*; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketByteBuf; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; @@ -30,7 +30,7 @@ public abstract class MixinJukeboxBlockEntity extends BlockEntity { @Unique private static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) { if (!world.isClient && (JukeboxPacketUpdate.invUpdate || world.getPlayers().size() == JukeboxPacketUpdate.playerUpdate)) { - Stream watchingPlayers = PlayerStream.watching(world, pos); + Stream watchingPlayers = PlayerLookup.tracking(blockEntity).stream(); PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer()); passedData.writeBlockPos(pos); passedData.writeItemStack(blockEntity.getRecord()); diff --git a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionItem.java b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionItem.java new file mode 100644 index 0000000..7737341 --- /dev/null +++ b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionItem.java @@ -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 cir) { + if (!VOConfig.potionEnchantmentGlint) cir.setReturnValue(super.hasGlint(stack)); + } +} diff --git a/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinSmokerBlock.java b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinSmokerBlock.java new file mode 100644 index 0000000..47cf896 --- /dev/null +++ b/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinSmokerBlock.java @@ -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); + } + } + +} diff --git a/src/main/resources/assets/visualoverhaul/lang/en_us.json b/src/main/resources/assets/visualoverhaul/lang/en_us.json index f762978..14deba1 100755 --- a/src/main/resources/assets/visualoverhaul/lang/en_us.json +++ b/src/main/resources/assets/visualoverhaul/lang/en_us.json @@ -1,9 +1,12 @@ { "visualoverhaul.midnightconfig.title":"Visual Overhaul Config", - "visualoverhaul.midnightconfig.brewingstand":"Enable Brewing Stand Enhancements", - "visualoverhaul.midnightconfig.jukebox":"Enable Jukebox Enhancements", - "visualoverhaul.midnightconfig.jukebox_fake_block":"Enable fake block on jukebox top", - "visualoverhaul.midnightconfig.furnace":"Enable Furnace Enhancements", - "visualoverhaul.midnightconfig.coloredItems":"Enable biome-based item colors", - "visualoverhaul.midnightconfig.coloredItems.tooltip":"Needs restart!" + "visualoverhaul.midnightconfig.brewingstand":"Brewing Stand Enhancements", + "visualoverhaul.midnightconfig.jukebox":"Jukebox Enhancements", + "visualoverhaul.midnightconfig.jukebox_fake_block":"Fake block on jukebox top", + "visualoverhaul.midnightconfig.furnace":"Furnace Enhancements", + "visualoverhaul.midnightconfig.smoker_particles":"Smoker Particles", + "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" } \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index e8d9655..9dc445b 100755 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -22,9 +22,6 @@ "entrypoints": { "client": [ "eu.midnightdust.visualoverhaul.VisualOverhaulClient" - ], - "modmenu": [ - "eu.midnightdust.visualoverhaul.config.ModMenuIntegration" ] }, @@ -34,6 +31,6 @@ "depends": { "fabric": ">=0.28.4", - "minecraft": "1.17.x" + "minecraft": ">=1.18" } } diff --git a/src/main/resources/resourcepacks/coloredwaterbucket/pack.mcmeta b/src/main/resources/resourcepacks/coloredwaterbucket/pack.mcmeta index 14d4004..08b3e49 100755 --- a/src/main/resources/resourcepacks/coloredwaterbucket/pack.mcmeta +++ b/src/main/resources/resourcepacks/coloredwaterbucket/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 7, + "pack_format": 8, "description": "Makes the water bucket also change it's color based on biome color" } } diff --git a/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/blockstates/blast_furnace.json b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/blockstates/blast_furnace.json new file mode 100644 index 0000000..63dbedd --- /dev/null +++ b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/blockstates/blast_furnace.json @@ -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 + } + } +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/blockstates/smoker.json b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/blockstates/smoker.json new file mode 100644 index 0000000..f0a0fc9 --- /dev/null +++ b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/blockstates/smoker.json @@ -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 + } + } +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/blast_furnace.json b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/blast_furnace.json new file mode 100644 index 0000000..24e6563 --- /dev/null +++ b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/blast_furnace.json @@ -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"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/blast_furnace_on.json b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/blast_furnace_on.json new file mode 100644 index 0000000..0601614 --- /dev/null +++ b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/blast_furnace_on.json @@ -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"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/smoker.json b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/smoker.json new file mode 100644 index 0000000..4e13640 --- /dev/null +++ b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/smoker.json @@ -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] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/smoker_on.json b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/smoker_on.json new file mode 100644 index 0000000..497ab10 --- /dev/null +++ b/src/main/resources/resourcepacks/fancyfurnace/assets/minecraft/models/block/smoker_on.json @@ -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"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancyfurnace/pack.mcmeta b/src/main/resources/resourcepacks/fancyfurnace/pack.mcmeta index c1f6feb..914b8f7 100755 --- a/src/main/resources/resourcepacks/fancyfurnace/pack.mcmeta +++ b/src/main/resources/resourcepacks/fancyfurnace/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 7, + "pack_format": 8, "description": "§2Changes the model of the furnace to be 3D" } } diff --git a/src/main/resources/resourcepacks/nobrewingbottles/pack.mcmeta b/src/main/resources/resourcepacks/nobrewingbottles/pack.mcmeta index 2cd31dc..18c38fa 100755 --- a/src/main/resources/resourcepacks/nobrewingbottles/pack.mcmeta +++ b/src/main/resources/resourcepacks/nobrewingbottles/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 7, + "pack_format": 8, "description": "§2Removes the bottles from the brewing stand texture" } } diff --git a/src/main/resources/visualoverhaul.accesswidener b/src/main/resources/visualoverhaul.accesswidener deleted file mode 100755 index e69de29..0000000 diff --git a/src/main/resources/visualoverhaul.mixins.json b/src/main/resources/visualoverhaul.mixins.json index bd97d96..747a50f 100755 --- a/src/main/resources/visualoverhaul.mixins.json +++ b/src/main/resources/visualoverhaul.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "eu.midnightdust.visualoverhaul.mixin", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "JAVA_16", "mixins": [ "MixinAbstractFurnaceBlockEntity", "MixinBrewingStandBlockEntity", @@ -9,7 +9,10 @@ "MixinJukeboxBlockEntity" ], "client": [ - "MixinSoundSystem" + "MixinSoundSystem", + "MixinSmokerBlock", + "MixinBlastFurnaceBlock", + "MixinPotionItem" ], "injectors": { "defaultRequire": 1