mirror of
https://github.com/TeamMidnightDust/BetterBeds.git
synced 2025-12-15 13:05:09 +01:00
Port to 1.21 & Add NeoForge support
This commit is contained in:
103
build.gradle
103
build.gradle
@@ -1,76 +1,65 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.0-SNAPSHOT'
|
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||||
id 'maven-publish'
|
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
|
||||||
|
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
|
||||||
|
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
architectury {
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
minecraft = rootProject.minecraft_version
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
|
||||||
version = project.mod_version
|
|
||||||
group = project.maven_group
|
|
||||||
|
|
||||||
loom {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
subprojects {
|
||||||
//to change the versions see the gradle.properties file
|
apply plugin: "dev.architectury.loom"
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources {
|
dependencies {
|
||||||
inputs.property "version", project.version
|
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
|
||||||
|
// The following line declares the yarn mappings you may select this one as well.
|
||||||
filesMatching("fabric.mod.json") {
|
mappings loom.layered {
|
||||||
expand "version": project.version
|
it.mappings("net.fabricmc:yarn:$rootProject.yarn_mappings:v2")
|
||||||
|
it.mappings("dev.architectury:yarn-mappings-patch-neoforge:$rootProject.yarn_mappings_patch_neoforge_version")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
allprojects {
|
||||||
it.options.encoding = "UTF-8"
|
apply plugin: "java"
|
||||||
it.options.release = 17
|
apply plugin: "architectury-plugin"
|
||||||
}
|
apply plugin: "maven-publish"
|
||||||
|
|
||||||
java {
|
archivesBaseName = rootProject.archives_base_name
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
version = rootProject.mod_version
|
||||||
// if it is present.
|
group = rootProject.maven_group
|
||||||
// If you remove this line, sources will not be generated.
|
|
||||||
withSourcesJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
repositories {
|
||||||
from("LICENSE") {
|
// Add repositories to retrieve artifacts from in here.
|
||||||
rename { "${it}_${project.archivesBaseName}"}
|
// You should only use this when depending on other mods because
|
||||||
|
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||||
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||||
|
// for more information about repositories.
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
remapJar {
|
tasks.withType(JavaCompile) {
|
||||||
archiveVersion = "${project.version}-${project.minecraft_version}"
|
options.encoding = "UTF-8"
|
||||||
archiveBaseName = "${project.archivesBaseName}"
|
options.release = 21
|
||||||
}
|
}
|
||||||
|
ext {
|
||||||
// configure the maven publication
|
releaseChangelog = {
|
||||||
publishing {
|
def changes = new StringBuilder()
|
||||||
publications {
|
changes << "## Better Beds v$project.version for $project.minecraft_version\n[View the changelog](https://www.github.com/TeamMidnightDust/BetterBeds/commits/)"
|
||||||
mavenJava(MavenPublication) {
|
def proc = "git log --max-count=1 --pretty=format:%s".execute()
|
||||||
// add all the jars that should be included when publishing to maven
|
proc.in.eachLine { line ->
|
||||||
artifact(remapJar) {
|
def processedLine = line.toString()
|
||||||
builtBy remapJar
|
if (!processedLine.contains("New translations") && !processedLine.contains("Merge") && !processedLine.contains("branch")) {
|
||||||
}
|
changes << "\n- ${processedLine.capitalize()}"
|
||||||
artifact(sourcesJar) {
|
}
|
||||||
builtBy remapSourcesJar
|
|
||||||
}
|
}
|
||||||
|
proc.waitFor()
|
||||||
|
return changes.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
java {
|
||||||
repositories {
|
withSourcesJar()
|
||||||
// Add repositories to publish to here.
|
|
||||||
// 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.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
common/build.gradle
Normal file
23
common/build.gradle
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
architectury {
|
||||||
|
common(rootProject.enabled_platforms.split(","))
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
|
||||||
|
// Do NOT use other classes from fabric loader
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenCommon(MavenPublication) {
|
||||||
|
artifactId = rootProject.archives_base_name
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||||
|
repositories {
|
||||||
|
// Add repositories to publish to here.
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
package eu.midnightdust.betterbeds.mixin;
|
package eu.midnightdust.betterbeds.mixin;
|
||||||
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
|
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
|
||||||
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
|
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
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.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Mixin(BlockEntityRendererFactories.class)
|
@Mixin(BlockEntityRendererFactories.class)
|
||||||
public abstract class MixinBlockEntityRendererDispatcher {
|
public abstract class MixinBlockEntityRendererDispatcher {
|
||||||
|
|
||||||
@Shadow @Final private static Map<BlockEntityType<?>, BlockEntityRendererFactory<?>> FACTORIES;
|
@Shadow @Final private static Map<BlockEntityType<?>, BlockEntityRendererFactory<?>> FACTORIES;
|
||||||
|
|
||||||
@Inject(method = "register", at = @At("TAIL"))
|
@Inject(method = "register", at = @At("TAIL"))
|
||||||
private static <T extends BlockEntity> void bb$onRegister(BlockEntityType<? extends T> type, BlockEntityRendererFactory<T> factory, CallbackInfo ci) {
|
private static <T extends BlockEntity> void bb$onRegister(BlockEntityType<? extends T> type, BlockEntityRendererFactory<T> factory, CallbackInfo ci) {
|
||||||
FACTORIES.remove(BlockEntityType.BED);
|
FACTORIES.remove(BlockEntityType.BED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1
common/src/main/resources/architectury.common.json
Normal file
1
common/src/main/resources/architectury.common.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
@@ -1,6 +1,10 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"pack_format": 12,
|
"pack_format": 12,
|
||||||
|
"supported_formats": {
|
||||||
|
"min_inclusive": 12,
|
||||||
|
"max_inclusive": 100
|
||||||
|
},
|
||||||
"description": "§2Makes beds look fancier and allows them to connect <3"
|
"description": "§2Makes beds look fancier and allows them to connect <3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
0
src/main/resources/resourcepacks/fancybeds/pack.png → common/src/main/resources/resourcepacks/fancyconnectedbeds/pack.png
Executable file → Normal file
0
src/main/resources/resourcepacks/fancybeds/pack.png → common/src/main/resources/resourcepacks/fancyconnectedbeds/pack.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
100
fabric/build.gradle
Normal file
100
fabric/build.gradle
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow'
|
||||||
|
id "me.shedaniel.unified-publishing"
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven { url "https://maven.terraformersmc.com/releases" }
|
||||||
|
}
|
||||||
|
|
||||||
|
architectury {
|
||||||
|
platformSetupLoomIde()
|
||||||
|
fabric()
|
||||||
|
}
|
||||||
|
|
||||||
|
loom {
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
common
|
||||||
|
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
|
||||||
|
compileClasspath.extendsFrom common
|
||||||
|
runtimeClasspath.extendsFrom common
|
||||||
|
developmentFabric.extendsFrom common
|
||||||
|
archivesBaseName = rootProject.archives_base_name + "-fabric"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||||
|
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||||
|
|
||||||
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||||
|
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
inputs.property "version", project.version
|
||||||
|
|
||||||
|
filesMatching("fabric.mod.json") {
|
||||||
|
expand "version": project.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
exclude "architectury.common.json"
|
||||||
|
|
||||||
|
configurations = [project.configurations.shadowCommon]
|
||||||
|
archiveClassifier = "dev-shadow"
|
||||||
|
}
|
||||||
|
|
||||||
|
remapJar {
|
||||||
|
input.set shadowJar.archiveFile
|
||||||
|
dependsOn shadowJar
|
||||||
|
}
|
||||||
|
|
||||||
|
sourcesJar {
|
||||||
|
def commonSources = project(":common").sourcesJar
|
||||||
|
dependsOn commonSources
|
||||||
|
from commonSources.archiveFile.map { zipTree(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
components.java {
|
||||||
|
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||||
|
skip()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unifiedPublishing {
|
||||||
|
project {
|
||||||
|
displayName = "Better Beds $project.version - Fabric $project.minecraft_version"
|
||||||
|
releaseType = "$project.release_type"
|
||||||
|
changelog = releaseChangelog()
|
||||||
|
gameVersions = []
|
||||||
|
gameLoaders = ["fabric","quilt"]
|
||||||
|
mainPublication remapJar
|
||||||
|
relations {
|
||||||
|
depends {
|
||||||
|
curseforge = "fabric-api"
|
||||||
|
modrinth = "fabric-api"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var CURSEFORGE_TOKEN = project.findProperty("CURSEFORGE_TOKEN") ?: System.getenv("CURSEFORGE_TOKEN")
|
||||||
|
if (CURSEFORGE_TOKEN != null) {
|
||||||
|
curseforge {
|
||||||
|
token = CURSEFORGE_TOKEN
|
||||||
|
id = rootProject.curseforge_id
|
||||||
|
gameVersions.addAll "Java 21", project.minecraft_version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
||||||
|
if (MODRINTH_TOKEN != null) {
|
||||||
|
modrinth {
|
||||||
|
token = MODRINTH_TOKEN
|
||||||
|
id = rootProject.modrinth_id
|
||||||
|
version = "$project.version-$project.name"
|
||||||
|
gameVersions.addAll project.minecraft_version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package eu.midnightdust.fabric.betterbeds;
|
||||||
|
|
||||||
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
|
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
||||||
|
import net.fabricmc.fabric.api.resource.ResourcePackActivationType;
|
||||||
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
public class BetterBedsFabric implements ClientModInitializer {
|
||||||
|
public void onInitializeClient() {
|
||||||
|
FabricLoader.getInstance().getModContainer("betterbeds").ifPresent(modContainer -> {
|
||||||
|
ResourceManagerHelper.registerBuiltinResourcePack(Identifier.of("betterbeds:fancyconnectedbeds"), modContainer, ResourcePackActivationType.NORMAL);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
4
src/main/resources/fabric.mod.json → fabric/src/main/resources/fabric.mod.json
Executable file → Normal file
4
src/main/resources/fabric.mod.json → fabric/src/main/resources/fabric.mod.json
Executable file → Normal file
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"client": [
|
"client": [
|
||||||
"eu.midnightdust.betterbeds.BetterBedsClient"
|
"eu.midnightdust.fabric.betterbeds.BetterBedsFabric"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric-api": "*",
|
"fabric-api": "*",
|
||||||
"minecraft": ">=1.19.3"
|
"minecraft": ">=1.21"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"modmenu": {
|
"modmenu": {
|
||||||
@@ -1,17 +1,21 @@
|
|||||||
# Done to increase the memory available to gradle.
|
org.gradle.jvmargs=-Xmx4096M
|
||||||
org.gradle.jvmargs=-Xmx2G
|
|
||||||
|
|
||||||
# Fabric Properties
|
minecraft_version=1.21
|
||||||
# check these on https://fabricmc.net/use
|
yarn_mappings=1.21+build.2
|
||||||
minecraft_version=1.19.3
|
enabled_platforms=fabric,neoforge
|
||||||
yarn_mappings=1.19.3+build.3
|
|
||||||
loader_version=0.14.11
|
|
||||||
|
|
||||||
# Mod Properties
|
archives_base_name=betterbeds
|
||||||
mod_version = 1.3.0
|
mod_version=1.4.0
|
||||||
maven_group = eu.midnightdust.motschen
|
maven_group=eu.midnightdust
|
||||||
archives_base_name = betterbeds
|
release_type=release
|
||||||
|
curseforge_id=443782
|
||||||
|
modrinth_id=kKwy3HU9
|
||||||
|
|
||||||
# Dependencies
|
fabric_loader_version=0.15.11
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
fabric_api_version=0.100.1+1.21
|
||||||
fabric_version=0.69.1+1.19.3
|
|
||||||
|
neoforge_version=21.0.14-beta
|
||||||
|
yarn_mappings_patch_neoforge_version = 1.21+build.4
|
||||||
|
|
||||||
|
quilt_loader_version=0.19.0-beta.18
|
||||||
|
quilt_fabric_api_version=7.0.1+0.83.0-1.20
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
31
gradlew
vendored
31
gradlew
vendored
@@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -83,10 +83,8 @@ done
|
|||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
# 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.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -133,10 +131,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
# double quotes to make sure that they get re-expanded; and
|
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
|||||||
184
gradlew.bat
vendored
184
gradlew.bat
vendored
@@ -1,92 +1,92 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
@rem This is normally unused
|
@rem This is normally unused
|
||||||
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.
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
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"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
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% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
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. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
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 execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
: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 %*
|
"%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
|
||||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
exit /b %EXIT_CODE%
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
|||||||
104
neoforge/build.gradle
Normal file
104
neoforge/build.gradle
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow'
|
||||||
|
id "me.shedaniel.unified-publishing"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = 'NeoForged'
|
||||||
|
url = 'https://maven.neoforged.net/releases'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
architectury {
|
||||||
|
platformSetupLoomIde()
|
||||||
|
neoForge()
|
||||||
|
}
|
||||||
|
|
||||||
|
loom {
|
||||||
|
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
common {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
compileClasspath.extendsFrom common
|
||||||
|
runtimeClasspath.extendsFrom common
|
||||||
|
developmentNeoForge.extendsFrom common
|
||||||
|
|
||||||
|
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||||
|
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||||
|
shadowBundle {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
|
||||||
|
|
||||||
|
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||||
|
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
inputs.property 'version', project.version
|
||||||
|
|
||||||
|
filesMatching('META-INF/neoforge.mods.toml') {
|
||||||
|
expand version: project.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
configurations = [project.configurations.shadowBundle]
|
||||||
|
archiveClassifier = 'dev-shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
remapJar {
|
||||||
|
input.set shadowJar.archiveFile
|
||||||
|
}
|
||||||
|
|
||||||
|
sourcesJar {
|
||||||
|
def commonSources = project(":common").sourcesJar
|
||||||
|
dependsOn commonSources
|
||||||
|
from commonSources.archiveFile.map { zipTree(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
components.java {
|
||||||
|
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||||
|
skip()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unifiedPublishing {
|
||||||
|
project {
|
||||||
|
displayName = "Better Beds $project.version - NeoForge $project.minecraft_version"
|
||||||
|
releaseType = "$project.release_type"
|
||||||
|
changelog = releaseChangelog()
|
||||||
|
gameVersions = []
|
||||||
|
gameLoaders = ["neoforge"]
|
||||||
|
mainPublication remapJar
|
||||||
|
|
||||||
|
var CURSEFORGE_TOKEN = project.findProperty("CURSEFORGE_TOKEN") ?: System.getenv("CURSEFORGE_TOKEN")
|
||||||
|
if (CURSEFORGE_TOKEN != null) {
|
||||||
|
curseforge {
|
||||||
|
token = CURSEFORGE_TOKEN
|
||||||
|
id = rootProject.curseforge_id
|
||||||
|
gameVersions.addAll "Java 21", project.minecraft_version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
||||||
|
if (MODRINTH_TOKEN != null) {
|
||||||
|
modrinth {
|
||||||
|
token = MODRINTH_TOKEN
|
||||||
|
id = rootProject.modrinth_id
|
||||||
|
version = "$project.version-$project.name"
|
||||||
|
gameVersions.addAll project.minecraft_version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
neoforge/gradle.properties
Normal file
1
neoforge/gradle.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
loom.platform=neoforge
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package eu.midnightdust.neoforge.betterbeds;
|
||||||
|
|
||||||
|
import net.minecraft.resource.*;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.neoforged.api.distmarker.Dist;
|
||||||
|
import net.neoforged.bus.api.SubscribeEvent;
|
||||||
|
import net.neoforged.fml.ModList;
|
||||||
|
import net.neoforged.fml.common.EventBusSubscriber;
|
||||||
|
import net.neoforged.neoforge.event.AddPackFindersEvent;
|
||||||
|
import net.neoforged.neoforgespi.locating.IModFile;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import static eu.midnightdust.neoforge.betterbeds.BetterBedsNeoForge.MOD_ID;
|
||||||
|
|
||||||
|
@EventBusSubscriber(modid = MOD_ID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||||
|
public class BetterBedsClientEvents {
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void addPackFinders(AddPackFindersEvent event) {
|
||||||
|
if (event.getPackType() == ResourceType.CLIENT_RESOURCES) {
|
||||||
|
registerResourcePack(event, Identifier.of(MOD_ID,"fancyconnectedbeds"), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void registerResourcePack(AddPackFindersEvent event, Identifier id, boolean alwaysEnabled) {
|
||||||
|
event.addRepositorySource(((profileAdder) -> {
|
||||||
|
IModFile file = ModList.get().getModFileById(id.getNamespace()).getFile();
|
||||||
|
try {
|
||||||
|
ResourcePackProfile.PackFactory pack = new DirectoryResourcePack.DirectoryBackedFactory(file.findResource("resourcepacks/" + id.getPath()));
|
||||||
|
ResourcePackInfo info = new ResourcePackInfo(id.toString(), Text.of(id.getNamespace()+"/"+id.getPath()), ResourcePackSource.BUILTIN, Optional.empty());
|
||||||
|
ResourcePackProfile packProfile = ResourcePackProfile.create(info, pack, ResourceType.CLIENT_RESOURCES, new ResourcePackPosition(alwaysEnabled, ResourcePackProfile.InsertionPosition.TOP, false));
|
||||||
|
if (packProfile != null) {
|
||||||
|
profileAdder.accept(packProfile);
|
||||||
|
}
|
||||||
|
} catch (NullPointerException e) {e.fillInStackTrace();}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package eu.midnightdust.neoforge.betterbeds;
|
||||||
|
|
||||||
|
import net.neoforged.fml.common.Mod;
|
||||||
|
|
||||||
|
@Mod(BetterBedsNeoForge.MOD_ID)
|
||||||
|
public class BetterBedsNeoForge {
|
||||||
|
public static final String MOD_ID = "betterbeds";
|
||||||
|
|
||||||
|
public BetterBedsNeoForge() {}
|
||||||
|
}
|
||||||
31
neoforge/src/main/resources/META-INF/neoforge.mods.toml
Normal file
31
neoforge/src/main/resources/META-INF/neoforge.mods.toml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
modLoader = "javafml"
|
||||||
|
loaderVersion = "[2,)"
|
||||||
|
#issueTrackerURL = ""
|
||||||
|
license = "MIT License"
|
||||||
|
|
||||||
|
[[mods]]
|
||||||
|
modId = "betterbeds"
|
||||||
|
version = "${version}"
|
||||||
|
displayName = "Better Beds"
|
||||||
|
logoFile = "betterbeds.png"
|
||||||
|
authors = "TeamMidnightDust, Motschen"
|
||||||
|
description = '''
|
||||||
|
Changes the renderer of the bed to use block models instead of a block entity renderer!
|
||||||
|
'''
|
||||||
|
|
||||||
|
[[mixins]]
|
||||||
|
config = "betterbeds.mixins.json"
|
||||||
|
|
||||||
|
[[dependencies.betterbeds]]
|
||||||
|
modId = "neoforge"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[21.0,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "BOTH"
|
||||||
|
|
||||||
|
[[dependencies.betterbeds]]
|
||||||
|
modId = "minecraft"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[1.21,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "BOTH"
|
||||||
BIN
neoforge/src/main/resources/betterbeds.png
Normal file
BIN
neoforge/src/main/resources/betterbeds.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -1,10 +1,15 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven { url "https://maven.fabricmc.net/" }
|
||||||
name "Fabric"
|
maven { url "https://maven.architectury.dev/" }
|
||||||
url "https://maven.fabricmc.net/"
|
maven { url "https://maven.neoforged.net/releases" }
|
||||||
}
|
|
||||||
mavenCentral()
|
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include("common")
|
||||||
|
include("fabric")
|
||||||
|
//include("quilt")
|
||||||
|
include("neoforge")
|
||||||
|
|
||||||
|
rootProject.name = "betterbeds"
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
package eu.midnightdust.betterbeds;
|
|
||||||
|
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
|
||||||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
|
||||||
import net.fabricmc.fabric.api.resource.ResourcePackActivationType;
|
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
|
|
||||||
public class BetterBedsClient implements ClientModInitializer {
|
|
||||||
|
|
||||||
public void onInitializeClient() {
|
|
||||||
FabricLoader.getInstance().getModContainer("betterbeds").ifPresent(modContainer -> {
|
|
||||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:fancybeds"), modContainer, ResourcePackActivationType.NORMAL);
|
|
||||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:connectedbeds"), modContainer, ResourcePackActivationType.NORMAL);
|
|
||||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:fancyconnectedbeds"), modContainer, ResourcePackActivationType.NORMAL);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"credit": "Made with Blockbench",
|
|
||||||
"texture_size": [64, 64],
|
|
||||||
"textures": {
|
|
||||||
"particle": "block/oak_planks"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [0, 0, 0],
|
|
||||||
"to": [3, 3, 3],
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [12.5, 5.25, 13.25, 6], "texture": "#bed", "cullface": "west"},
|
|
||||||
"east": {"uv": [14.75, 5.25, 15.5, 6], "texture": "#bed", "cullface": "west"},
|
|
||||||
"south": {"uv": [14, 5.25, 14.75, 6], "texture": "#bed", "cullface": "west"},
|
|
||||||
"west": {"uv": [13.25, 5.25, 14, 6], "texture": "#bed", "cullface": "west"},
|
|
||||||
"down": {"uv": [14, 4.5, 14.75, 5.25], "texture": "#bed", "cullface": "west"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [13, 0, 0],
|
|
||||||
"to": [16, 3, 3],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [21, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [14, 3.75, 13.25, 4.5], "texture": "#bed", "cullface": "east"},
|
|
||||||
"east": {"uv": [12.5, 3.75, 13.25, 4.5], "texture": "#bed", "cullface": "east"},
|
|
||||||
"south": {"uv": [14.75, 3.75, 15.5, 4.5], "texture": "#bed", "cullface": "east"},
|
|
||||||
"west": {"uv": [14, 3.75, 14.75, 4.5], "texture": "#bed", "cullface": "east"},
|
|
||||||
"down": {"uv": [14, 3, 14.75, 3.75], "texture": "#bed", "cullface": "east"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [0, 3, 0],
|
|
||||||
"to": [16, 9, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [5.5, 5.5, 9.5, 7], "rotation": 180, "texture": "#bed", "cullface": "north"},
|
|
||||||
"east": {"uv": [0, 7, 1.5, 11], "rotation": 270, "texture": "#bed", "cullface": "east"},
|
|
||||||
"west": {"uv": [5.5, 7, 7, 11], "rotation": 90, "texture": "#bed", "cullface": "west"},
|
|
||||||
"up": {"uv": [1.5, 7, 5.5, 11], "rotation": 180, "texture": "#bed"},
|
|
||||||
"down": {"uv": [7, 7, 11, 11], "texture": "#bed"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"credit": "Made with Blockbench",
|
|
||||||
"texture_size": [64, 64],
|
|
||||||
"textures": {
|
|
||||||
"particle": "block/oak_planks"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [0, 0, 13],
|
|
||||||
"to": [3, 3, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 21]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [14.75, 0.75, 15.5, 1.5], "texture": "#bed", "cullface": "west"},
|
|
||||||
"east": {"uv": [14, 0.75, 14.75, 1.5], "texture": "#bed", "cullface": "west"},
|
|
||||||
"south": {"uv": [13.25, 0.75, 14, 1.5], "texture": "#bed", "cullface": "west"},
|
|
||||||
"west": {"uv": [12.5, 0.75, 13.25, 1.5], "texture": "#bed", "cullface": "west"},
|
|
||||||
"down": {"uv": [14, 0, 14.75, 0.75], "texture": "#bed", "cullface": "west"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [13, 0, 13],
|
|
||||||
"to": [16, 3, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [21, 8, 21]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [14, 2.25, 14.75, 3], "texture": "#bed", "cullface": "east"},
|
|
||||||
"east": {"uv": [13.25, 2.25, 14, 3], "texture": "#bed", "cullface": "east"},
|
|
||||||
"south": {"uv": [12.5, 2.25, 13.25, 3], "texture": "#bed", "cullface": "east"},
|
|
||||||
"west": {"uv": [14.75, 2.25, 15.5, 3], "texture": "#bed", "cullface": "east"},
|
|
||||||
"down": {"uv": [14, 1.5, 14.75, 2.25], "texture": "#bed", "cullface": "east"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [0, 3, 0],
|
|
||||||
"to": [16, 9, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 1.5, 1.5, 5.5], "rotation": 270, "texture": "#bed", "cullface": "east"},
|
|
||||||
"south": {"uv": [1.5, 0, 5.5, 1.5], "rotation": 180, "texture": "#bed", "cullface": "south"},
|
|
||||||
"west": {"uv": [5.5, 1.5, 7, 5.5], "rotation": 90, "texture": "#bed", "cullface": "west"},
|
|
||||||
"up": {"uv": [1.5, 1.5, 5.5, 5.5], "rotation": 180, "texture": "#bed"},
|
|
||||||
"down": {"uv": [7, 1.5, 11, 5.5], "texture": "#bed"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"pack": {
|
|
||||||
"pack_format": 12,
|
|
||||||
"description": "§2Allows beds to connect <3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"credit": "Made with Blockbench",
|
|
||||||
"texture_size": [64, 64],
|
|
||||||
"textures": {
|
|
||||||
"particle": "block/oak_planks"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [0, 0, 13],
|
|
||||||
"to": [3, 3, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 21]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [14.75, 0.75, 15.5, 1.5], "texture": "#bed"},
|
|
||||||
"east": {"uv": [14, 0.75, 14.75, 1.5], "texture": "#bed"},
|
|
||||||
"south": {"uv": [13.25, 0.75, 14, 1.5], "texture": "#bed", "cullface": "south"},
|
|
||||||
"west": {"uv": [12.5, 0.75, 13.25, 1.5], "texture": "#bed", "cullface": "west"},
|
|
||||||
"down": {"uv": [14, 0, 14.75, 0.75], "texture": "#bed", "cullface": "down"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [13, 0, 13],
|
|
||||||
"to": [16, 3, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [21, 8, 21]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [14, 2.25, 14.75, 3], "texture": "#bed"},
|
|
||||||
"east": {"uv": [13.25, 2.25, 14, 3], "texture": "#bed", "cullface": "east"},
|
|
||||||
"south": {"uv": [12.5, 2.25, 13.25, 3], "texture": "#bed", "cullface": "south"},
|
|
||||||
"west": {"uv": [14.75, 2.25, 15.5, 3], "texture": "#bed"},
|
|
||||||
"down": {"uv": [14, 1.5, 14.75, 2.25], "texture": "#bed", "cullface": "down"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [0, 3, 0],
|
|
||||||
"to": [16, 9, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 1.5, 1.5, 5.5], "rotation": 270, "texture": "#bed", "cullface": "east"},
|
|
||||||
"south": {"uv": [1.5, 0, 5.5, 1.5], "rotation": 180, "texture": "#bed", "cullface": "south"},
|
|
||||||
"west": {"uv": [5.5, 1.5, 7, 5.5], "rotation": 90, "texture": "#bed", "cullface": "west"},
|
|
||||||
"up": {"uv": [1.5, 1.5, 5.5, 5.5], "rotation": 180, "texture": "#bed"},
|
|
||||||
"down": {"uv": [7, 7, 11, 11], "texture": "#bed"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [0, 9, 8],
|
|
||||||
"to": [16, 10, 16],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 17, 16]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [1.5, 3.25, 5.5, 3.5], "texture": "#bed"},
|
|
||||||
"east": {"uv": [1.5, 1.5, 1.75, 3.5], "rotation": 270, "texture": "#bed", "cullface": "east"},
|
|
||||||
"south": {"uv": [1.5, 1.5, 5.5, 1.75], "texture": "#bed", "cullface": "south"},
|
|
||||||
"west": {"uv": [5.25, 1.5, 5.5, 3.5], "rotation": 90, "texture": "#bed", "cullface": "west"},
|
|
||||||
"up": {"uv": [1.5, 1.5, 5.5, 3.5], "rotation": 180, "texture": "#bed"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": [1, 10, 9],
|
|
||||||
"to": [15, 11, 15],
|
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 18, 16]},
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [1.75, 3.25, 5.25, 3.5], "texture": "#bed"},
|
|
||||||
"east": {"uv": [1.75, 1.75, 2, 3.25], "rotation": 90, "texture": "#bed"},
|
|
||||||
"south": {"uv": [1.75, 0.5, 5.25, 0.75], "texture": "#bed"},
|
|
||||||
"west": {"uv": [5, 1.75, 5.25, 3.25], "rotation": 90, "texture": "#bed"},
|
|
||||||
"up": {"uv": [1.75, 1.75, 5.25, 3.25], "rotation": 180, "texture": "#bed"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user