diff --git a/build.gradle b/build.gradle index 91afedd..9f612fa 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,8 @@ dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modCompile "net.fabricmc:fabric-loader:${project.loader_version}" + + modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" } processResources { diff --git a/gradle.properties b/gradle.properties index babd954..46307a1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx2G loader_version=0.10.8 # Mod Properties - mod_version = 1.0.0 + mod_version = 1.1.0 maven_group = eu.midnightdust.motschen archives_base_name = betterbeds diff --git a/src/main/java/eu/midnightdust/betterbeds/BetterBedsClient.java b/src/main/java/eu/midnightdust/betterbeds/BetterBedsClient.java new file mode 100644 index 0000000..646282e --- /dev/null +++ b/src/main/java/eu/midnightdust/betterbeds/BetterBedsClient.java @@ -0,0 +1,17 @@ +package eu.midnightdust.betterbeds; + +import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.resource.ResourceManagerHelper; +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"), "resourcepacks/fancybeds", modContainer, false); + ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("betterbeds:connectedbeds"), "resourcepacks/connectedbeds", modContainer, false); + }); + } +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 56c68f5..735a01f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -20,6 +20,12 @@ "environment": "*", + "entrypoints": { + "client": [ + "eu.midnightdust.betterbeds.BetterBedsClient" + ] + }, + "mixins": [ "betterbeds.mixins.json" ], diff --git a/src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_foot.json b/src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_foot.json new file mode 100644 index 0000000..6aab9d1 --- /dev/null +++ b/src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_foot.json @@ -0,0 +1,46 @@ +{ + "credit": "made by Motschen", + "texture_size": [64, 64], + "ambientocclusion": false, + "textures": { + "0": "entity/bed/lime", + "particle": "block/oak_planks" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [3, 3, 3], + "faces": { + "north": {"uv": [12.5, 3.75, 13.25, 4.5], "texture": "#0", "cullface": "west"}, + "east": {"uv": [14.75, 3.75, 15.5, 4.5], "texture": "#0", "cullface": "west"}, + "south": {"uv": [14, 3.75, 14.75, 4.5], "texture": "#0", "cullface": "west"}, + "west": {"uv": [13.25, 3.75, 14, 4.5], "texture": "#0", "cullface": "west"}, + "down": {"uv": [14, 3, 14.75, 3.75], "texture": "#0", "cullface": "west"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 3, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 8, 8]}, + "faces": { + "north": {"uv": [12.5, 0.75, 13.25, 1.5], "texture": "#0", "cullface": "east"}, + "east": {"uv": [14.75, 0.75, 15.5, 1.5], "texture": "#0", "cullface": "east"}, + "south": {"uv": [14, 0.75, 14.75, 1.5], "texture": "#0", "cullface": "east"}, + "west": {"uv": [13.25, 0.75, 14, 1.5], "texture": "#0", "cullface": "east"}, + "down": {"uv": [14, 0, 14.75, 0.75], "texture": "#0", "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": "#0"}, + "east": {"uv": [0, 7, 1.5, 11], "rotation": 270, "texture": "#0"}, + "west": {"uv": [5.5, 7, 7, 11], "rotation": 90, "texture": "#0"}, + "up": {"uv": [1.5, 7, 5.5, 11], "rotation": 180, "texture": "#0"}, + "down": {"uv": [7, 7, 11, 11], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_head.json b/src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_head.json new file mode 100644 index 0000000..5ecede9 --- /dev/null +++ b/src/main/resources/resourcepacks/connectedbeds/assets/minecraft/models/block/bed_head.json @@ -0,0 +1,47 @@ +{ + "credit": "made by Motschen", + "texture_size": [64, 64], + "ambientocclusion": false, + "textures": { + "0": "entity/bed/lime", + "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": [12.5, 5.25, 13.25, 6], "texture": "#0", "cullface": "west"}, + "east": {"uv": [14.75, 5.25, 15.5, 6], "texture": "#0", "cullface": "west"}, + "south": {"uv": [14, 5.25, 14.75, 6], "texture": "#0", "cullface": "west"}, + "west": {"uv": [13.25, 5.25, 14, 6], "texture": "#0", "cullface": "west"}, + "down": {"uv": [14, 4.5, 14.75, 5.25], "texture": "#0", "cullface": "west"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 3, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 8, 21]}, + "faces": { + "north": {"uv": [12.5, 2.25, 13.25, 3], "texture": "#0", "cullface": "east"}, + "east": {"uv": [14.75, 2.25, 15.5, 3], "texture": "#0", "cullface": "east"}, + "south": {"uv": [14, 2.25, 14.75, 3], "texture": "#0", "cullface": "east"}, + "west": {"uv": [13.25, 2.25, 14, 3], "texture": "#0", "cullface": "east"}, + "down": {"uv": [14, 1.5, 14.75, 2.25], "texture": "#0", "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": "#0"}, + "south": {"uv": [1.5, 0, 5.5, 1.5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [5.5, 1.5, 7, 5.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [1.5, 1.5, 5.5, 5.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [7, 7, 11, 11], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/connectedbeds/license.txt b/src/main/resources/resourcepacks/connectedbeds/license.txt new file mode 100644 index 0000000..6968976 --- /dev/null +++ b/src/main/resources/resourcepacks/connectedbeds/license.txt @@ -0,0 +1,10 @@ +The MIT License +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"), +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 +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. +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. \ No newline at end of file diff --git a/src/main/resources/resourcepacks/connectedbeds/pack.mcmeta b/src/main/resources/resourcepacks/connectedbeds/pack.mcmeta new file mode 100644 index 0000000..9252491 --- /dev/null +++ b/src/main/resources/resourcepacks/connectedbeds/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 6, + "description": "§2Allows beds to connect <3" + } +} diff --git a/src/main/resources/resourcepacks/connectedbeds/pack.png b/src/main/resources/resourcepacks/connectedbeds/pack.png new file mode 100644 index 0000000..cdd926c Binary files /dev/null and b/src/main/resources/resourcepacks/connectedbeds/pack.png differ diff --git a/src/main/resources/resourcepacks/fancybeds/assets/minecraft/models/block/bed_head.json b/src/main/resources/resourcepacks/fancybeds/assets/minecraft/models/block/bed_head.json new file mode 100644 index 0000000..c10781b --- /dev/null +++ b/src/main/resources/resourcepacks/fancybeds/assets/minecraft/models/block/bed_head.json @@ -0,0 +1,73 @@ +{ + "credit": "made by Motschen", + "ambientocclusion": false, + "texture_size": [64, 64], + "textures": { + "0": "entity/bed/lime", + "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": [12.5, 5.25, 13.25, 6], "texture": "#0"}, + "east": {"uv": [14.75, 5.25, 15.5, 6], "texture": "#0"}, + "south": {"uv": [14, 5.25, 14.75, 6], "texture": "#0"}, + "west": {"uv": [13.25, 5.25, 14, 6], "texture": "#0"}, + "down": {"uv": [14, 4.5, 14.75, 5.25], "texture": "#0"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 3, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 8, 21]}, + "faces": { + "north": {"uv": [12.5, 2.25, 13.25, 3], "texture": "#0"}, + "east": {"uv": [14.75, 2.25, 15.5, 3], "texture": "#0"}, + "south": {"uv": [14, 2.25, 14.75, 3], "texture": "#0"}, + "west": {"uv": [13.25, 2.25, 14, 3], "texture": "#0"}, + "down": {"uv": [14, 1.5, 14.75, 2.25], "texture": "#0"} + } + }, + { + "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": "#0"}, + "south": {"uv": [1.5, 0, 5.5, 1.5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [5.5, 1.5, 7, 5.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [1.5, 1.5, 5.5, 5.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [7, 7, 11, 11], "texture": "#0"} + } + }, + { + "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": "#0"}, + "east": {"uv": [1.5, 1.5, 1.75, 3.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [1.5, 1.5, 5.5, 1.75], "texture": "#0"}, + "west": {"uv": [5.25, 1.5, 5.5, 3.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [1.5, 1.5, 5.5, 3.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 4, 2], "texture": "#missing"} + } + }, + { + "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": "#0"}, + "east": {"uv": [1.75, 1.75, 2, 3.25], "rotation": 90, "texture": "#0"}, + "south": {"uv": [1.75, 0.5, 5.25, 0.75], "texture": "#0"}, + "west": {"uv": [5, 1.75, 5.25, 3.25], "rotation": 90, "texture": "#0"}, + "up": {"uv": [1.75, 1.75, 5.25, 3.25], "texture": "#0"}, + "down": {"uv": [0, 0, 3.5, 1.5], "texture": "#missing"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancybeds/license.txt b/src/main/resources/resourcepacks/fancybeds/license.txt new file mode 100644 index 0000000..6968976 --- /dev/null +++ b/src/main/resources/resourcepacks/fancybeds/license.txt @@ -0,0 +1,10 @@ +The MIT License +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"), +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 +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. +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. \ No newline at end of file diff --git a/src/main/resources/resourcepacks/fancybeds/pack.mcmeta b/src/main/resources/resourcepacks/fancybeds/pack.mcmeta new file mode 100644 index 0000000..3a8d1b1 --- /dev/null +++ b/src/main/resources/resourcepacks/fancybeds/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 6, + "description": "§2Makes beds look more fancy" + } +} diff --git a/src/main/resources/resourcepacks/fancybeds/pack.png b/src/main/resources/resourcepacks/fancybeds/pack.png new file mode 100644 index 0000000..ddb8653 Binary files /dev/null and b/src/main/resources/resourcepacks/fancybeds/pack.png differ