mirror of
https://github.com/TeamMidnightDust/BetterBeds.git
synced 2025-12-15 13:05:09 +01:00
Update to 1.17-pre1
This commit is contained in:
2
.gitignore
vendored
Normal file → Executable file
2
.gitignore
vendored
Normal file → Executable file
@@ -22,4 +22,4 @@ bin/
|
|||||||
|
|
||||||
# fabric
|
# fabric
|
||||||
|
|
||||||
run/
|
run/
|
||||||
|
|||||||
54
build.gradle
Normal file → Executable file
54
build.gradle
Normal file → Executable file
@@ -1,10 +1,10 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
id 'fabric-loom' version '0.8-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_16
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_16
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
@@ -17,41 +17,41 @@ dependencies {
|
|||||||
//to change the versions see the gradle.properties file
|
//to change the versions see the gradle.properties file
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||||
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
|
||||||
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
inputs.property "version", project.version
|
inputs.property "version", project.version
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
filesMatching("fabric.mod.json") {
|
||||||
include "fabric.mod.json"
|
|
||||||
expand "version": project.version
|
expand "version": project.version
|
||||||
}
|
}
|
||||||
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
|
||||||
exclude "fabric.mod.json"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
tasks.withType(JavaCompile).configureEach {
|
||||||
// this fixes some edge cases with special characters not displaying correctly
|
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
// this fixes some edge cases with special characters not displaying correctly
|
||||||
tasks.withType(JavaCompile) {
|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||||
options.encoding = "UTF-8"
|
// If Javadoc is generated, this must be specified in that task too.
|
||||||
|
it.options.encoding = "UTF-8"
|
||||||
|
|
||||||
|
// Minecraft 1.17 (21w19a) upwards uses Java 16.
|
||||||
|
it.options.release = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
java {
|
||||||
// if it is present.
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
// If you remove this task, sources will not be generated.
|
// if it is present.
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
// If you remove this line, sources will not be generated.
|
||||||
classifier = "sources"
|
withSourcesJar()
|
||||||
from sourceSets.main.allSource
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from "LICENSE"
|
from("LICENSE") {
|
||||||
|
rename { "${it}_${project.archivesBaseName}"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// configure the maven publication
|
// configure the maven publication
|
||||||
@@ -68,9 +68,11 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// select the repositories you want to publish to
|
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||||
repositories {
|
repositories {
|
||||||
// uncomment to publish to the local maven
|
// Add repositories to publish to here.
|
||||||
// mavenLocal()
|
// Notice: This block does NOT have the same function as the block in the top level.
|
||||||
|
// The repositories here will be used for publishing your artifact, not for
|
||||||
|
// retrieving dependencies.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
gradle.properties
Normal file → Executable file
10
gradle.properties
Normal file → Executable file
@@ -3,15 +3,15 @@ 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.16.4
|
minecraft_version=1.17-rc1
|
||||||
yarn_mappings=1.16.4+build.9
|
yarn_mappings=1.17-rc1+build.5
|
||||||
loader_version=0.10.8
|
loader_version=0.11.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.1.0
|
mod_version = 1.2.0
|
||||||
maven_group = eu.midnightdust.motschen
|
maven_group = eu.midnightdust.motschen
|
||||||
archives_base_name = betterbeds
|
archives_base_name = betterbeds
|
||||||
|
|
||||||
# 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.30.0+1.16
|
fabric_version=0.34.8+1.17
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file → Executable file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file → Executable file
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable file
2
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable 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-5.5.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
35
gradlew
vendored
Normal file → Executable file
35
gradlew
vendored
Normal file → Executable file
@@ -82,6 +82,7 @@ esac
|
|||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
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
|
||||||
@@ -125,10 +126,11 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
@@ -154,19 +156,19 @@ if $cygwin ; then
|
|||||||
else
|
else
|
||||||
eval `echo args$i`="\"$arg\""
|
eval `echo args$i`="\"$arg\""
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
case $i in
|
case $i in
|
||||||
(0) set -- ;;
|
0) set -- ;;
|
||||||
(1) set -- "$args0" ;;
|
1) set -- "$args0" ;;
|
||||||
(2) set -- "$args0" "$args1" ;;
|
2) set -- "$args0" "$args1" ;;
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -175,14 +177,9 @@ save () {
|
|||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# 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"
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
25
gradlew.bat
vendored
Normal file → Executable file
25
gradlew.bat
vendored
Normal file → Executable file
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@@ -51,7 +54,7 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
@@ -61,28 +64,14 @@ echo location of your Java installation.
|
|||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
0
settings.gradle
Normal file → Executable file
0
settings.gradle
Normal file → Executable file
34
src/main/java/eu/midnightdust/betterbeds/BetterBedsClient.java
Normal file → Executable file
34
src/main/java/eu/midnightdust/betterbeds/BetterBedsClient.java
Normal file → Executable file
@@ -1,17 +1,17 @@
|
|||||||
package eu.midnightdust.betterbeds;
|
package eu.midnightdust.betterbeds;
|
||||||
|
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.fabric.api.resource.ResourcePackActivationType;
|
||||||
import net.minecraft.util.Identifier;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
public class BetterBedsClient implements ClientModInitializer {
|
|
||||||
|
public class BetterBedsClient implements ClientModInitializer {
|
||||||
public void onInitializeClient() {
|
|
||||||
|
public void onInitializeClient() {
|
||||||
FabricLoader.getInstance().getModContainer("betterbeds").ifPresent(modContainer -> {
|
FabricLoader.getInstance().getModContainer("betterbeds").ifPresent(modContainer -> {
|
||||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:fancybeds"), "resourcepacks/fancybeds", modContainer, false);
|
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:fancybeds"), modContainer, ResourcePackActivationType.NORMAL);
|
||||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:connectedbeds"), "resourcepacks/connectedbeds", modContainer, false);
|
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:connectedbeds"), modContainer, ResourcePackActivationType.NORMAL);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
54
src/main/java/eu/midnightdust/betterbeds/mixin/MixinBedBlock.java
Normal file → Executable file
54
src/main/java/eu/midnightdust/betterbeds/mixin/MixinBedBlock.java
Normal file → Executable file
@@ -1,27 +1,27 @@
|
|||||||
package eu.midnightdust.betterbeds.mixin;
|
package eu.midnightdust.betterbeds.mixin;
|
||||||
|
|
||||||
import net.minecraft.block.*;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
@Mixin(value = BedBlock.class, priority = 2000)
|
@Mixin(value = BedBlock.class, priority = 2000)
|
||||||
public abstract class MixinBedBlock extends HorizontalFacingBlock {
|
public abstract class MixinBedBlock extends HorizontalFacingBlock {
|
||||||
|
|
||||||
protected MixinBedBlock(Settings settings) {
|
protected MixinBedBlock(Settings settings) {
|
||||||
super(settings);
|
super(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(at = @At("RETURN"), method = "getRenderType", cancellable = true)
|
@Inject(at = @At("RETURN"), method = "getRenderType", cancellable = true)
|
||||||
private void getRenderType(BlockState state, CallbackInfoReturnable<BlockRenderType> cir) {
|
private void getRenderType(BlockState state, CallbackInfoReturnable<BlockRenderType> cir) {
|
||||||
cir.setReturnValue(BlockRenderType.MODEL);
|
cir.setReturnValue(BlockRenderType.MODEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public boolean isSideInvisible(BlockState state, BlockState neighborState, Direction offset) {
|
public boolean isSideInvisible(BlockState state, BlockState neighborState, Direction offset) {
|
||||||
return neighborState.getBlock() instanceof BedBlock;
|
return neighborState.getBlock() instanceof BedBlock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
55
src/main/java/eu/midnightdust/betterbeds/mixin/MixinBlockEntityRendererDispatcher.java
Normal file → Executable file
55
src/main/java/eu/midnightdust/betterbeds/mixin/MixinBlockEntityRendererDispatcher.java
Normal file → Executable file
@@ -1,30 +1,25 @@
|
|||||||
package eu.midnightdust.betterbeds.mixin;
|
package eu.midnightdust.betterbeds.mixin;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.block.BedBlock;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.block.BlockRenderType;
|
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
|
||||||
import net.minecraft.block.HorizontalFacingBlock;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import net.minecraft.util.math.Direction;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Overwrite;
|
import java.util.Map;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
@Mixin(BlockEntityRendererFactories.class)
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
public abstract class MixinBlockEntityRendererDispatcher {
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
@Shadow @Final private static Map<BlockEntityType<?>, BlockEntityRendererFactory<?>> FACTORIES;
|
||||||
import java.util.Map;
|
|
||||||
|
@Inject(method = "register", at = @At("TAIL"))
|
||||||
@Mixin(BlockEntityRenderDispatcher.class)
|
private static <T extends BlockEntity> void bb$onRegister(BlockEntityType<? extends T> type, BlockEntityRendererFactory<T> factory, CallbackInfo ci) {
|
||||||
public abstract class MixinBlockEntityRendererDispatcher {
|
FACTORIES.remove(BlockEntityType.BED);
|
||||||
@Shadow @Final private Map<BlockEntityType<?>, BlockEntityRenderer<?>> renderers;
|
}
|
||||||
|
}
|
||||||
@Inject(method = "<init>()V", at = @At("TAIL"))
|
|
||||||
private void init(CallbackInfo info) {
|
|
||||||
renderers.remove(BlockEntityType.BED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
0
src/main/resources/assets/betterbeds/icon.png
Normal file → Executable file
0
src/main/resources/assets/betterbeds/icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
0
src/main/resources/assets/minecraft/blockstates/black_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/black_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/brown_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/brown_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/cyan_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/cyan_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/green_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/green_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/light_blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/light_blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/light_gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/light_gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/lime_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/lime_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/magenta_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/magenta_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/orange_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/orange_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/pink_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/pink_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/purple_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/purple_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/red_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/red_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/white_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/white_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/yellow_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/blockstates/yellow_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/black_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/black_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/black_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/black_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/blue_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/blue_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/blue_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/blue_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/brown_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/brown_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/brown_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/brown_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/cyan_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/cyan_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/cyan_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/cyan_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/gray_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/gray_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/gray_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/gray_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/green_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/green_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/green_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/green_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_blue_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_blue_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_blue_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_blue_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_gray_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_gray_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_gray_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/light_gray_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/lime_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/lime_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/lime_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/lime_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/magenta_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/magenta_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/magenta_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/magenta_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/orange_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/orange_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/orange_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/orange_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/pink_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/pink_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/pink_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/pink_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/purple_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/purple_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/purple_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/purple_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/red_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/red_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/red_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/red_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/white_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/white_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/white_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/white_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/yellow_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/yellow_bed_foot.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/yellow_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/block/yellow_bed_head.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/black_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/black_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/brown_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/brown_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/cyan_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/cyan_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/green_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/green_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/light_blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/light_blue_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/light_gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/light_gray_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/lime_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/lime_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/magenta_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/magenta_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/orange_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/orange_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/pink_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/pink_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/purple_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/purple_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/red_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/red_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/white_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/white_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/yellow_bed.json
Normal file → Executable file
0
src/main/resources/assets/minecraft/models/item/yellow_bed.json
Normal file → Executable file
0
src/main/resources/betterbeds.mixins.json
Normal file → Executable file
0
src/main/resources/betterbeds.mixins.json
Normal file → Executable file
0
src/main/resources/fabric.mod.json
Normal file → Executable file
0
src/main/resources/fabric.mod.json
Normal file → Executable file
0
src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_foot.json
Normal file → Executable file
0
src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_foot.json
Normal file → Executable file
0
src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_head.json
Normal file → Executable file
0
src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_head.json
Normal file → Executable file
18
src/main/resources/resourcepacks/connectedbeds/license.txt
Normal file → Executable file
18
src/main/resources/resourcepacks/connectedbeds/license.txt
Normal file → Executable file
@@ -1,10 +1,10 @@
|
|||||||
The MIT License
|
The MIT License
|
||||||
Copyright © 2019 Motschen
|
Copyright © 2019 Motschen
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
|
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
12
src/main/resources/resourcepacks/connectedbeds/pack.mcmeta
Normal file → Executable file
12
src/main/resources/resourcepacks/connectedbeds/pack.mcmeta
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"pack_format": 6,
|
"pack_format": 7,
|
||||||
"description": "§2Allows beds to connect <3"
|
"description": "§2Allows beds to connect <3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
0
src/main/resources/resourcepacks/connectedbeds/pack.png
Normal file → Executable file
0
src/main/resources/resourcepacks/connectedbeds/pack.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
src/main/resources/resourcepacks/fancybeds/assets/minecraft/models/block/bed_head.json
Normal file → Executable file
0
src/main/resources/resourcepacks/fancybeds/assets/minecraft/models/block/bed_head.json
Normal file → Executable file
18
src/main/resources/resourcepacks/fancybeds/license.txt
Normal file → Executable file
18
src/main/resources/resourcepacks/fancybeds/license.txt
Normal file → Executable file
@@ -1,10 +1,10 @@
|
|||||||
The MIT License
|
The MIT License
|
||||||
Copyright © 2019 Motschen
|
Copyright © 2019 Motschen
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
|
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
12
src/main/resources/resourcepacks/fancybeds/pack.mcmeta
Normal file → Executable file
12
src/main/resources/resourcepacks/fancybeds/pack.mcmeta
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"pack_format": 6,
|
"pack_format": 7,
|
||||||
"description": "§2Makes beds look more fancy"
|
"description": "§2Makes beds look more fancy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
0
src/main/resources/resourcepacks/fancybeds/pack.png
Normal file → Executable file
0
src/main/resources/resourcepacks/fancybeds/pack.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user