diff --git a/README.md b/README.md index a7c22a8..1787498 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ -# Modern Life Patch A patch was made due to too many flaws in the original author's graphic design. 因为原作者的美工槽点太多,而做的一个补丁。 \ No newline at end of file diff --git a/build.gradle b/build.gradle index de9b410..4cd59e7 100644 --- a/build.gradle +++ b/build.gradle @@ -2,12 +2,14 @@ buildscript { repositories { // These repositories are only for Gradle plugins, put any other repositories in the repository block further below maven { url = 'https://maven.minecraftforge.net' } + maven { url = 'https://maven.parchmentmc.org' } mavenCentral() // maven { url = 'https://maven.parchmentmc.org' } // Add this line } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true + classpath 'org.parchmentmc:librarian:1.+' classpath 'org.spongepowered:mixingradle:0.7.32' } } @@ -19,7 +21,7 @@ plugins { } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' - +apply plugin: 'org.parchmentmc.librarian.forgegradle' version = project.property('mod.version') group = project.property('mod.group') // http://maven.apache.org/guides/mini/guide-naming-conventions.html @@ -43,7 +45,7 @@ minecraft { // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.18.2' + mappings channel: 'parchment', version: '2022.11.06-1.18.2' // mappings channel: 'parchment', version: '2022.11.06-1.18.2' accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') diff --git a/lib/modernlife-1.18.2-1.54.jar b/lib/modernlife-1.18.2-1.54.jar new file mode 100644 index 0000000..7010eef Binary files /dev/null and b/lib/modernlife-1.18.2-1.54.jar differ diff --git a/src-source/main/java/com/dairymoose/entity/MotorboatModel.java b/src-source/main/java/com/dairymoose/entity/MotorboatModel.java index c53fa2c..b2c843c 100644 --- a/src-source/main/java/com/dairymoose/entity/MotorboatModel.java +++ b/src-source/main/java/com/dairymoose/entity/MotorboatModel.java @@ -36,7 +36,7 @@ public class MotorboatModel extends EntityModel { public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); - PartDefinition hull_back_and_bottom = partdefinition.addOrReplaceChild("hull_back_and_bottom", CubeListBuilder.create().texOffs(0, 15).addBox(11.2365f, -8.0f, -10.5719f, 7.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -8.0f, -2.5719f, 7.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -8.0f, 2.4281f, 7.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -3.0f, 3.4281f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(9.2365f, -3.0f, 3.4281f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-15.7635f, -3.0f, -9.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-6.7635f, -3.0f, -9.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(2.2365f, -3.0f, -9.5719f, 7.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-6.7635f, -3.0f, -2.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(1.2365f, -3.0f, -2.5719f, 8.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-6.7635f, -3.0f, 4.4281f, 8.0f, 1.0f, 4.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(1.2365f, -3.0f, 4.4281f, 8.0f, 1.0f, 4.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(9.2365f, -3.0f, -9.5719f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -3.0f, -2.5719f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(9.2365f, -3.0f, -3.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-14.7635f, -2.0f, -7.5719f, 33.0f, 1.0f, 15.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(2.2365f, -1.0f, -5.5719f, 16.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(2.2365f, -1.0f, 0.4281f, 16.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(-13.7635f, -1.0f, -5.5719f, 16.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(-13.7635f, -1.0f, 0.4281f, 16.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -4.0f, -10.9636f, 16.0f, 1.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -4.0f, 0.0364f, 16.0f, 1.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(9.2365f, -4.0f, 4.0364f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(0.2365f, -4.0f, 4.0364f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(0.2365f, -4.0f, -2.9636f, 18.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(0.2365f, -4.0f, -10.9636f, 10.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(10.2365f, -4.0f, -10.9636f, 8.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -5.0f, -11.5719f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -5.0f, -2.5719f, 7.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -5.0f, 2.4281f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -6.0f, -12.5719f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -6.0f, -3.5719f, 7.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -6.0f, 3.4281f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -7.0f, -11.5719f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -7.0f, -2.5719f, 7.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -7.0f, 2.4281f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -7.0f, -11.5719f, 1.0f, 3.0f, 12.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -7.0f, 0.4281f, 1.0f, 3.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-16.7635f, -7.0f, 0.4281f, 1.0f, 3.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-16.7635f, -7.0f, -9.5719f, 1.0f, 3.0f, 10.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-17.7635f, -7.0f, -8.5719f, 1.0f, 3.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-17.7635f, -7.0f, -0.5719f, 1.0f, 3.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 17).addBox(-18.7635f, -7.0f, 0.4281f, 1.0f, 3.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-18.7635f, -7.0f, -7.5719f, 1.0f, 3.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-19.7635f, -7.0f, -6.5719f, 1.0f, 3.0f, 13.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-20.7635f, -7.0f, -5.5719f, 1.0f, 3.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-23.2635f, -8.0f, -4.5f, 1.0f, 5.0f, 9.0f, new CubeDeformation(0.0f)), PartPose.offset(0.0f, 24.0f, 0.0f)); + PartDefinition hull_back_and_bottom = partdefinition.addOrReplaceChild("hull_back_and_bottom", CubeListBuilder.create().texOffs(0, 15).addBox(11.2365f, -8.0f, -10.5719f, 7.0f, 1.0f, 8.0f, new Cu beDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -8.0f, -2.5719f, 7.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -8.0f, 2.4281f, 7.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -3.0f, 3.4281f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(9.2365f, -3.0f, 3.4281f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-15.7635f, -3.0f, -9.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-6.7635f, -3.0f, -9.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(2.2365f, -3.0f, -9.5719f, 7.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-6.7635f, -3.0f, -2.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(1.2365f, -3.0f, -2.5719f, 8.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(-6.7635f, -3.0f, 4.4281f, 8.0f, 1.0f, 4.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(1.2365f, -3.0f, 4.4281f, 8.0f, 1.0f, 4.0f, new CubeDeformation(0.0f)).texOffs(0, 24).addBox(9.2365f, -3.0f, -9.5719f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -3.0f, -2.5719f, 9.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(9.2365f, -3.0f, -3.5719f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-14.7635f, -2.0f, -7.5719f, 33.0f, 1.0f, 15.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(2.2365f, -1.0f, -5.5719f, 16.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(2.2365f, -1.0f, 0.4281f, 16.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(-13.7635f, -1.0f, -5.5719f, 16.0f, 1.0f, 6.0f, new CubeDeformation(0.0f)).texOffs(0, 19).addBox(-13.7635f, -1.0f, 0.4281f, 16.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -4.0f, -10.9636f, 16.0f, 1.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -4.0f, 0.0364f, 16.0f, 1.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(9.2365f, -4.0f, 4.0364f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(0.2365f, -4.0f, 4.0364f, 9.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(0.2365f, -4.0f, -2.9636f, 18.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(0.2365f, -4.0f, -10.9636f, 10.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(10.2365f, -4.0f, -10.9636f, 8.0f, 1.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -5.0f, -11.5719f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -5.0f, -2.5719f, 7.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -5.0f, 2.4281f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -6.0f, -12.5719f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -6.0f, -3.5719f, 7.0f, 1.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -6.0f, 3.4281f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -7.0f, -11.5719f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -7.0f, -2.5719f, 7.0f, 1.0f, 5.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(11.2365f, -7.0f, 2.4281f, 7.0f, 1.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -7.0f, -11.5719f, 1.0f, 3.0f, 12.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-15.7635f, -7.0f, 0.4281f, 1.0f, 3.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-16.7635f, -7.0f, 0.4281f, 1.0f, 3.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-16.7635f, -7.0f, -9.5719f, 1.0f, 3.0f, 10.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-17.7635f, -7.0f, -8.5719f, 1.0f, 3.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-17.7635f, -7.0f, -0.5719f, 1.0f, 3.0f, 9.0f, new CubeDeformation(0.0f)).texOffs(0, 17).addBox(-18.7635f, -7.0f, 0.4281f, 1.0f, 3.0f, 7.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-18.7635f, -7.0f, -7.5719f, 1.0f, 3.0f, 8.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-19.7635f, -7.0f, -6.5719f, 1.0f, 3.0f, 13.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-20.7635f, -7.0f, -5.5719f, 1.0f, 3.0f, 11.0f, new CubeDeformation(0.0f)).texOffs(0, 15).addBox(-23.2635f, -8.0f, -4.5f, 1.0f, 5.0f, 9.0f, new CubeDeformation(0.0f)), PartPose.offset(0.0f, 24.0f, 0.0f)); hull_back_and_bottom.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 15).addBox(3.5f, -2.5f, 3.0f, 1.0f, 5.0f, 11.0f, new CubeDeformation(0.0f)), PartPose.offsetAndRotation(-21.7635f, -5.5f, 0.1651f, -3.1416f, 0.7854f, 3.1416f)); hull_back_and_bottom.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 15).addBox(-4.5f, -2.5f, 2.0f, 1.0f, 5.0f, 12.0f, new CubeDeformation(0.0f)), PartPose.offsetAndRotation(-21.7635f, -5.5f, 0.1651f, 0.0f, 0.7854f, 0.0f)); PartDefinition tail = partdefinition.addOrReplaceChild("tail", CubeListBuilder.create(), PartPose.offset(0.0f, 24.0f, 0.0f)); diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index ae3bf59..e8f652f 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -1,2 +1,4 @@ 38eeb75da0923717638f16acc5c7068aecba156e assets/modernlifepatch/lang/en_us.json bab598e47751847b120edd8d3418781229ec5fd6 assets/modernlifepatch/lang/zh_cn.json +80cb85eae418087ea09e8b0d34289b3faf7f0faf assets/modernlifepatch/models/item/mirror.json +ddaaed0180f28afb8dfa1c4270e9872360aca2a7 assets/modernlifepatch/models/item/tall_mirror.json diff --git a/src/generated/resources/assets/modernlifepatch/models/item/mirror.json b/src/generated/resources/assets/modernlifepatch/models/item/mirror.json new file mode 100644 index 0000000..3f7b072 --- /dev/null +++ b/src/generated/resources/assets/modernlifepatch/models/item/mirror.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modernlifepatch:item/mirror_item" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modernlifepatch/models/item/tall_mirror.json b/src/generated/resources/assets/modernlifepatch/models/item/tall_mirror.json new file mode 100644 index 0000000..a087e5a --- /dev/null +++ b/src/generated/resources/assets/modernlifepatch/models/item/tall_mirror.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modernlifepatch:item/tall_mirror_item" + } +} \ No newline at end of file diff --git a/src/main/java/com/r3944realms/modernlifepatch/EventHandler.java b/src/main/java/com/r3944realms/modernlifepatch/EventHandler.java index 3fcafdd..a882c0d 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/EventHandler.java +++ b/src/main/java/com/r3944realms/modernlifepatch/EventHandler.java @@ -14,6 +14,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.forgespi.locating.IModFile; import net.minecraftforge.resource.PathResourcePack; @@ -42,6 +43,12 @@ public abstract class EventHandler { } @Mod.EventBusSubscriber(modid = ModernLifePatch.MOD_ID, bus = net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.MOD) public static class ModBoth extends EventHandler { + @SubscribeEvent + public static void onCommonSetup(FMLCommonSetupEvent event) { + event.enqueueWork(() -> { + + }); + } @SubscribeEvent public static void onRegisterResourcePack(AddPackFindersEvent event) { IModFile modFile = ModList.get().getModFileById(ModernLifePatch.MOD_ID).getFile(); diff --git a/src/main/java/com/r3944realms/modernlifepatch/MLPCreativeTab.java b/src/main/java/com/r3944realms/modernlifepatch/MLPCreativeTab.java index faa0043..161adff 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/MLPCreativeTab.java +++ b/src/main/java/com/r3944realms/modernlifepatch/MLPCreativeTab.java @@ -3,6 +3,9 @@ package com.r3944realms.modernlifepatch; import com.dairymoose.modernlife.core.CustomBlocks; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraftforge.common.Tags; import org.jetbrains.annotations.NotNull; public class MLPCreativeTab extends CreativeModeTab { @@ -12,6 +15,7 @@ public class MLPCreativeTab extends CreativeModeTab { @Override public @NotNull ItemStack makeIcon() { + if(!ModernLifePatch.isModernLifeLoaded) return Blocks.BARRIER.asItem().getDefaultInstance(); return CustomBlocks.ITEM_CAMERA.get().getDefaultInstance(); } } diff --git a/src/main/java/com/r3944realms/modernlifepatch/ModernLifePatch.java b/src/main/java/com/r3944realms/modernlifepatch/ModernLifePatch.java index 8f6e758..a9ee845 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/ModernLifePatch.java +++ b/src/main/java/com/r3944realms/modernlifepatch/ModernLifePatch.java @@ -1,6 +1,16 @@ package com.r3944realms.modernlifepatch; +import com.r3944realms.modernlifepatch.config.MLPConfig; +import com.r3944realms.modernlifepatch.content.blocks.ModBlocks; +import com.r3944realms.modernlifepatch.content.blocks.entities.ModBlockEntityType; +import com.r3944realms.modernlifepatch.content.items.ModItems; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.ModList; +import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.config.ModConfig; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import net.minecraftforge.fml.loading.FMLEnvironment; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -9,10 +19,17 @@ import static com.r3944realms.modernlifepatch.ModernLifePatch.MOD_ID; @Mod(value = MOD_ID) public class ModernLifePatch { public static final String MOD_ID = "modernlifepatch"; + public final static boolean isModernLifeLoaded = ModList.get().isLoaded("modernlife"); public static final MLPCreativeTab MLP_CREATIVE_TAB = new MLPCreativeTab(MOD_ID); public static final Logger logger = LoggerFactory.getLogger(ModernLifePatch.class); public ModernLifePatch() { + IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); + ModItems.register(modEventBus); + ModBlocks.register(modEventBus); + ModBlockEntityType.register(modEventBus); logger.info("ModernLifePatch loaded"); + if(FMLEnvironment.dist.isDedicatedServer()) + ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, MLPConfig.spec); } } diff --git a/src/main/java/com/r3944realms/modernlifepatch/client/event/CreativeScreenEvents.java b/src/main/java/com/r3944realms/modernlifepatch/client/event/CreativeScreenEvents.java index 5e4ace0..d0b93b4 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/client/event/CreativeScreenEvents.java +++ b/src/main/java/com/r3944realms/modernlifepatch/client/event/CreativeScreenEvents.java @@ -44,6 +44,7 @@ public class CreativeScreenEvents { @SubscribeEvent public void onScreenInit(ScreenEvent.InitScreenEvent.Post event) { + if(!ModernLifePatch.isModernLifeLoaded) return; if(event.getScreen() instanceof CreativeModeInventoryScreen creativeScreen) { if(this.filters == null) { //初始化过滤器 @@ -116,8 +117,8 @@ public class CreativeScreenEvents { } } @SubscribeEvent - public void onScreenClick(ScreenEvent.MouseClickedEvent.Pre event) - { + public void onScreenClick(ScreenEvent.MouseClickedEvent.Pre event) { + if(!ModernLifePatch.isModernLifeLoaded) return; if(event.getButton() != GLFW.GLFW_MOUSE_BUTTON_LEFT) return; @@ -137,6 +138,7 @@ public class CreativeScreenEvents { } @SubscribeEvent public void onScreenDrawPre(ScreenEvent.DrawScreenEvent.Pre event) { + if(!ModernLifePatch.isModernLifeLoaded) return; if(event.getScreen() instanceof CreativeModeInventoryScreen creativeModeInventoryScreen) { if(creativeModeInventoryScreen.getSelectedTab() == ModernLifePatch.MLP_CREATIVE_TAB.getId()) { if(!this.viewThisCreativeTab) { @@ -151,6 +153,7 @@ public class CreativeScreenEvents { @SubscribeEvent public void OnScreenDrawPost(ScreenEvent.DrawScreenEvent.Post event) { + if (!ModernLifePatch.isModernLifeLoaded) return; if(event.getScreen() instanceof CreativeModeInventoryScreen creativeModeInventoryScreen) { this.guiCenterX = creativeModeInventoryScreen.getGuiLeft(); this.guiCenterY = creativeModeInventoryScreen.getGuiTop(); diff --git a/src/main/java/com/r3944realms/modernlifepatch/client/renderer/blockentity/MirrorRenderer.java b/src/main/java/com/r3944realms/modernlifepatch/client/renderer/blockentity/MirrorRenderer.java new file mode 100644 index 0000000..5badcc8 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/client/renderer/blockentity/MirrorRenderer.java @@ -0,0 +1,17 @@ +package com.r3944realms.modernlifepatch.client.renderer.blockentity; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.r3944realms.modernlifepatch.content.blocks.entities.type.mirror.MirrorBlockEntity; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import org.jetbrains.annotations.NotNull; + +@OnlyIn(Dist.CLIENT) +public class MirrorRenderer implements BlockEntityRenderer { + @Override + public void render(@NotNull MirrorBlockEntity pBlockEntity, float pPartialTick, @NotNull PoseStack pPoseStack, @NotNull MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay) { + + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/config/MLPConfig.java b/src/main/java/com/r3944realms/modernlifepatch/config/MLPConfig.java new file mode 100644 index 0000000..6cc8ec6 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/config/MLPConfig.java @@ -0,0 +1,21 @@ +package com.r3944realms.modernlifepatch.config; + +import net.minecraftforge.common.ForgeConfigSpec; +import org.apache.commons.lang3.tuple.Pair; + +public class MLPConfig { + public static final ForgeConfigSpec spec; + public static final MLPConfig INSTANCE; + public final ForgeConfigSpec.BooleanValue enableWhitelistByName; + public MLPConfig(ForgeConfigSpec.Builder builder) { + builder.push("personal Server Configuration (@Deprecated)"); + this.enableWhitelistByName =builder.comment("Enable whitelist by name").define("enableWhitelistByName", false); + builder.pop(); + + } + static { + Pair configure = new ForgeConfigSpec.Builder().configure(MLPConfig::new); + spec = configure.getRight(); + INSTANCE = configure.getLeft(); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/ModBlocks.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/ModBlocks.java new file mode 100644 index 0000000..81ae7e3 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/ModBlocks.java @@ -0,0 +1,31 @@ +package com.r3944realms.modernlifepatch.content.blocks; + +import com.r3944realms.modernlifepatch.ModernLifePatch; +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorBlock; +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import com.r3944realms.modernlifepatch.content.items.ModItems; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModBlocks { + public static final DeferredRegister BLOCKS + = DeferredRegister.create(ForgeRegistries.BLOCKS, ModernLifePatch.MOD_ID); + public static final RegistryObject MIRROR = BLOCKS.register("mirror", + () -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.COMMON_MIRROR)); + public static final RegistryObject TALL_MIRROR = BLOCKS.register("tall_mirror", + () -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.TELL_MIRROR)); + @SuppressWarnings("UnusedReturnValue") + public static RegistryObject registerBlockItem(String name , RegistryObject block){ + return ModItems.ITEMS.register(name,() -> new BlockItem(block.get(),new Item.Properties())); + } + public static void register(IEventBus bus) { + BLOCKS.register(bus); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/blockstate/ModBlockStateProperties.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/blockstate/ModBlockStateProperties.java new file mode 100644 index 0000000..9f0f825 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/blockstate/ModBlockStateProperties.java @@ -0,0 +1,8 @@ +package com.r3944realms.modernlifepatch.content.blocks.blockstate; + +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import net.minecraft.world.level.block.state.properties.EnumProperty; + +public class ModBlockStateProperties { + public final static EnumProperty MIRROR_PART = EnumProperty.create("mirror_part", MirrorPart.class); +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/entities/ModBlockEntityType.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/entities/ModBlockEntityType.java new file mode 100644 index 0000000..2763e7d --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/entities/ModBlockEntityType.java @@ -0,0 +1,23 @@ +package com.r3944realms.modernlifepatch.content.blocks.entities; + +import com.r3944realms.modernlifepatch.ModernLifePatch; +import com.r3944realms.modernlifepatch.content.blocks.ModBlocks; +import com.r3944realms.modernlifepatch.content.blocks.entities.type.mirror.MirrorBlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +import java.util.Set; + +public class ModBlockEntityType { + public static final DeferredRegister> BLOCK_ENTITY_TYPE + = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, ModernLifePatch.MOD_ID); + @SuppressWarnings("DataFlowIssue") + public static final RegistryObject> MIRROR + = BLOCK_ENTITY_TYPE.register("mirror", () -> new BlockEntityType<>(MirrorBlockEntity::new, Set.of(ModBlocks.MIRROR.get()), null)); + public static void register(IEventBus bus) { + BLOCK_ENTITY_TYPE.register(bus); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/entities/type/mirror/MirrorBlockEntity.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/entities/type/mirror/MirrorBlockEntity.java new file mode 100644 index 0000000..e2ef347 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/entities/type/mirror/MirrorBlockEntity.java @@ -0,0 +1,12 @@ +package com.r3944realms.modernlifepatch.content.blocks.entities.type.mirror; + +import com.r3944realms.modernlifepatch.content.blocks.entities.ModBlockEntityType; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +public class MirrorBlockEntity extends BlockEntity { + public MirrorBlockEntity(BlockPos pPos, BlockState pBlockState) { + super(ModBlockEntityType.MIRROR.get(), pPos, pBlockState); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/MirrorBlock.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/MirrorBlock.java new file mode 100644 index 0000000..a7b4f2c --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/MirrorBlock.java @@ -0,0 +1,137 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror; + +import com.r3944realms.modernlifepatch.content.blocks.blockstate.ModBlockStateProperties; +import com.r3944realms.modernlifepatch.content.blocks.entities.type.mirror.MirrorBlockEntity; +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.shape.IMirrorShape; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + + +public class MirrorBlock extends HorizontalDirectionalBlock implements EntityBlock { + public static final EnumProperty PART = ModBlockStateProperties.MIRROR_PART; + public final MirrorPart.MirrorType mirrorType; + + public MirrorBlock(Properties pProperties, MirrorPart.MirrorType mirrorType) { + super(pProperties); + MirrorPart mirrorPart = null; + this.mirrorType = mirrorType; + switch (mirrorType) { + case COMMON_MIRROR -> mirrorPart = MirrorPart.SINGLE; + case TELL_MIRROR -> mirrorPart = MirrorPart.FOOT; + case LARGE_MIRROR -> mirrorPart = MirrorPart.FOOT_LEFT; + case MASSIVE_MIRROR -> mirrorPart = MirrorPart.F11; + } + this.registerDefaultState(this.stateDefinition.any().setValue(PART, mirrorPart)); + } + + @Nullable + @Override + public BlockState getStateForPlacement(@NotNull BlockPlaceContext pContext) { + return switch (mirrorType) { + case COMMON_MIRROR -> this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection()); + case TELL_MIRROR -> { + BlockPos above = pContext.getClickedPos().above(); + Level level = pContext.getLevel(); + yield level.getBlockState(above).canBeReplaced(pContext) ? this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection()) : null; + } + case LARGE_MIRROR -> super.getStateForPlacement(pContext); + case MASSIVE_MIRROR -> super.getStateForPlacement(pContext); + }; + } + + @Override + public @NotNull VoxelShape getShape(@NotNull BlockState pState, @NotNull BlockGetter pLevel, @NotNull BlockPos pPos, @NotNull CollisionContext pContext) { + MirrorPart part = pState.getValue(PART); + Direction direction = pState.getValue(FACING); + return IMirrorShape.getShapeInstanceByPart(part).getShapeByPart(direction, part); + } + + @Override + public @NotNull InteractionResult use(@NotNull BlockState pState, @NotNull Level pLevel, @NotNull BlockPos pPos, @NotNull Player pPlayer, @NotNull InteractionHand pHand, @NotNull BlockHitResult pHit) { + if (pLevel.isClientSide) { + return InteractionResult.CONSUME; + } else { + return InteractionResult.PASS; + } + } + + @Nullable + @Override + public BlockEntity newBlockEntity(@NotNull BlockPos pPos, @NotNull BlockState pState) { + return new MirrorBlockEntity(pPos, pState); + } + + private boolean canAttachTo(BlockGetter pBlockReader, BlockPos pPos, Direction direction) { + BlockState blockState = pBlockReader.getBlockState(pPos); + return blockState.isFaceSturdy(pBlockReader, pPos, direction); + } + + @Override + public boolean canSurvive(@NotNull BlockState pState, @NotNull LevelReader pLevel, @NotNull BlockPos pPos) { + Direction direction = pState.getValue(FACING); + return this.canAttachTo(pLevel, pPos.relative(direction), direction); + } + + + @Override + public @NotNull BlockState updateShape(@NotNull BlockState pState, @NotNull Direction pDirection, @NotNull BlockState pNeighborState, @NotNull LevelAccessor pLevel, @NotNull BlockPos pCurrentPos, @NotNull BlockPos pNeighborPos) { + return switch (mirrorType) { + case COMMON_MIRROR -> (pDirection == pState.getValue(FACING) && !pState.canSurvive(pLevel, pCurrentPos)) ? + Blocks.AIR.defaultBlockState() : super.updateShape(pState, pDirection, pNeighborState, pLevel, pCurrentPos, pNeighborPos); + case TELL_MIRROR -> { + MirrorPart part = pState.getValue(PART); + yield pNeighborState.is(this) && pNeighborState.getValue(PART) != part ? pState : Blocks.AIR.defaultBlockState(); + } + case LARGE_MIRROR -> pLevel.getBlockState(pNeighborPos); + case MASSIVE_MIRROR -> pLevel.getBlockState(pCurrentPos); + }; + } + + @Override + public void setPlacedBy(@NotNull Level pLevel, @NotNull BlockPos pPos, @NotNull BlockState pState, @Nullable LivingEntity pPlacer, @NotNull ItemStack pStack) { + super.setPlacedBy(pLevel, pPos, pState, pPlacer, pStack); + if(!pLevel.isClientSide) { + switch (mirrorType) { + case COMMON_MIRROR -> { + //NOOP + } + case TELL_MIRROR -> { + BlockPos blockpos = pPos.above(); + pLevel.setBlock(blockpos, pState.setValue(PART, MirrorPart.HEAD), 3); + pLevel.blockUpdated(pPos, Blocks.AIR); + pState.updateNeighbourShapes(pLevel, pPos, 3); + } + case LARGE_MIRROR -> { + BlockPos headLeft = pPos.above(); + pLevel.setBlock(headLeft, pState.setValue(PART, MirrorPart.HEAD_LEFT), 3); + + } + case MASSIVE_MIRROR -> { + } + } + } + } + protected void createBlockStateDefinition(StateDefinition.Builder pBuilder) { + pBuilder.add(FACING, PART); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/MirrorPart.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/MirrorPart.java new file mode 100644 index 0000000..54720c5 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/MirrorPart.java @@ -0,0 +1,47 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror; + +import net.minecraft.util.StringRepresentable; +import org.jetbrains.annotations.NotNull; + +public enum MirrorPart implements StringRepresentable { + SINGLE("mirror", MirrorType.COMMON_MIRROR), + HEAD("mirror_head", MirrorType.TELL_MIRROR), + FOOT("mirror_foot", MirrorType.TELL_MIRROR), + HEAD_LEFT("mirror_head_left", MirrorType.LARGE_MIRROR), + HEAD_RIGHT("mirror_head_right", MirrorType.LARGE_MIRROR), + FOOT_LEFT("mirror_foot_left", MirrorType.LARGE_MIRROR), + FOOT_RIGHT("mirror_foot_right", MirrorType.LARGE_MIRROR), + H00("mirror_h00", MirrorType.MASSIVE_MIRROR), + H01("mirror_h01", MirrorType.MASSIVE_MIRROR), + H02("mirror_h02", MirrorType.MASSIVE_MIRROR), + F10("mirror_f10", MirrorType.MASSIVE_MIRROR), + F11("mirror_f11", MirrorType.MASSIVE_MIRROR), + F12("mirror_f12", MirrorType.MASSIVE_MIRROR) + ; + final String name; + final MirrorType type; + + MirrorPart(String name, MirrorType type) { + this.name = name; + this.type = type; + } + + public String getName() { + return name; + } + + public MirrorType getType() { + return type; + } + + @Override + public @NotNull String getSerializedName() { + return this.name; + } + public enum MirrorType { + COMMON_MIRROR, + TELL_MIRROR, + LARGE_MIRROR, + MASSIVE_MIRROR + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/IMirrorShape.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/IMirrorShape.java new file mode 100644 index 0000000..a1af36b --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/IMirrorShape.java @@ -0,0 +1,29 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror.shape; + +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import net.minecraft.core.Direction; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +public interface IMirrorShape { + MirrorShape mirrorShape = new MirrorShape(); + TallMirrorShape tallMirrorShape = new TallMirrorShape(); + LargeMirrorShape largeMirrorShape = new LargeMirrorShape(); + MassiveMirrorShape massiveMirrorShape = new MassiveMirrorShape(); + VoxelShape getDefaultShape(Direction direction); + VoxelShape getShapeByPart(Direction direction, MirrorPart part); + MirrorPart.MirrorType getMirrorType(); + default boolean testIsRightPart(@NotNull MirrorPart part) { + return part.getType() == getMirrorType(); + } + @Contract(pure = true) + static IMirrorShape getShapeInstanceByPart(@NotNull MirrorPart part) { + return switch (part) { + case SINGLE -> mirrorShape; + case HEAD, FOOT -> tallMirrorShape; + case HEAD_LEFT, HEAD_RIGHT, FOOT_LEFT, FOOT_RIGHT -> largeMirrorShape; + case H00, H01, H02, F10, F11, F12 -> massiveMirrorShape; + }; + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/LargeMirrorShape.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/LargeMirrorShape.java new file mode 100644 index 0000000..2efd3ee --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/LargeMirrorShape.java @@ -0,0 +1,82 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror.shape; + +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import com.r3944realms.modernlifepatch.utils.ShapeUtil; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.phys.shapes.BooleanOp; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.stream.Stream; + +public class LargeMirrorShape implements IMirrorShape { + public static final VoxelShape FOOT_LEFT_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + FOOT_LEFT_SHAPE_SOUTH, FOOT_LEFT_SHAPE_WEST, FOOT_LEFT_SHAPE_EAST, + FOOT_RIGHT_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + FOOT_RIGHT_SHAPE_SOUTH, FOOT_RIGHT_SHAPE_WEST, FOOT_RIGHT_SHAPE_EAST, + HEAD_LEFT_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + HEAD_LEFT_SHAPE_SOUTH, HEAD_LEFT_SHAPE_WEST, HEAD_LEFT_SHAPE_EAST, + HEAD_RIGHT_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + HEAD_RIGHT_SHAPE_SOUTH, HEAD_RIGHT_SHAPE_WEST, HEAD_RIGHT_SHAPE_EAST + ; + static { + FOOT_LEFT_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(FOOT_LEFT_SHAPE_NORTH); + FOOT_LEFT_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(FOOT_LEFT_SHAPE_EAST); + FOOT_LEFT_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(FOOT_LEFT_SHAPE_SOUTH); + + FOOT_RIGHT_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(FOOT_RIGHT_SHAPE_NORTH); + FOOT_RIGHT_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(FOOT_RIGHT_SHAPE_EAST); + FOOT_RIGHT_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(FOOT_RIGHT_SHAPE_SOUTH); + + HEAD_LEFT_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(HEAD_LEFT_SHAPE_NORTH); + HEAD_LEFT_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(HEAD_LEFT_SHAPE_EAST); + HEAD_LEFT_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(HEAD_LEFT_SHAPE_SOUTH); + + HEAD_RIGHT_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(HEAD_RIGHT_SHAPE_NORTH); + HEAD_RIGHT_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(HEAD_RIGHT_SHAPE_EAST); + HEAD_RIGHT_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(HEAD_RIGHT_SHAPE_SOUTH); + } + @Override + public VoxelShape getDefaultShape(Direction direction) { + return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> FOOT_LEFT_SHAPE_NORTH; + case SOUTH -> FOOT_LEFT_SHAPE_SOUTH; + case WEST -> FOOT_LEFT_SHAPE_WEST; + case EAST -> FOOT_LEFT_SHAPE_EAST; + }; + } + + @Override + public VoxelShape getShapeByPart(Direction direction, MirrorPart part) { + if (!testIsRightPart(part)) throw new IllegalArgumentException("Not a right part in mirror shape"); + if (part == MirrorPart.FOOT_LEFT) return getDefaultShape(direction); + else if (part == MirrorPart.FOOT_RIGHT) return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> FOOT_RIGHT_SHAPE_NORTH; + case SOUTH -> FOOT_RIGHT_SHAPE_SOUTH; + case WEST -> FOOT_RIGHT_SHAPE_WEST; + case EAST -> FOOT_RIGHT_SHAPE_EAST; + }; + else if (part == MirrorPart.HEAD_LEFT) return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> HEAD_LEFT_SHAPE_NORTH; + case SOUTH -> HEAD_LEFT_SHAPE_SOUTH; + case WEST -> HEAD_LEFT_SHAPE_WEST; + case EAST -> HEAD_LEFT_SHAPE_EAST; + }; + else return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> HEAD_RIGHT_SHAPE_NORTH; + case SOUTH -> HEAD_RIGHT_SHAPE_SOUTH; + case WEST -> HEAD_RIGHT_SHAPE_WEST; + case EAST -> HEAD_RIGHT_SHAPE_EAST; + }; + } + + @Override + public MirrorPart.MirrorType getMirrorType() { + return MirrorPart.MirrorType.LARGE_MIRROR; + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/MassiveMirrorShape.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/MassiveMirrorShape.java new file mode 100644 index 0000000..c442a53 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/MassiveMirrorShape.java @@ -0,0 +1,88 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror.shape; + +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import com.r3944realms.modernlifepatch.utils.ShapeUtil; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.stream.Stream; + +public class MassiveMirrorShape implements IMirrorShape { + public static final VoxelShape F11_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + F11_SHAPE_SOUTH, F11_SHAPE_EAST, F11_SHAPE_WEST, + F10_SHAPE_NORTH =Block.box(0, 0, 0, 16, 16, 1.1), + F10_SHAPE_SOUTH, F10_SHAPE_WEST, F10_SHAPE_EAST, + F12_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + F12_SHAPE_SOUTH, F12_SHAPE_WEST, F12_SHAPE_EAST, + H01_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + H01_SHAPE_SOUTH, H01_SHAPE_WEST, H01_SHAPE_EAST, + H00_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + H00_SHAPE_SOUTH, H00_SHAPE_WEST, H00_SHAPE_EAST, + H02_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + H02_SHAPE_SOUTH, H02_SHAPE_WEST, H02_SHAPE_EAST; + static { + F11_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(F11_SHAPE_NORTH); + F11_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(F11_SHAPE_EAST); + F11_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(F11_SHAPE_SOUTH); + + F10_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(F10_SHAPE_NORTH); + F10_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(F10_SHAPE_EAST); + F10_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(F10_SHAPE_SOUTH); + + F12_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(F12_SHAPE_NORTH); + F12_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(F12_SHAPE_EAST); + F12_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(F12_SHAPE_SOUTH); + + H01_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(H01_SHAPE_NORTH); + H01_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(H01_SHAPE_EAST); + H01_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(H01_SHAPE_SOUTH); + + H00_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(H00_SHAPE_NORTH); + H00_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(H00_SHAPE_EAST); + H00_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(H00_SHAPE_SOUTH); + + H02_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(H02_SHAPE_NORTH); + H02_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(H02_SHAPE_EAST); + H02_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(H02_SHAPE_SOUTH); + } + @Override + public VoxelShape getDefaultShape(Direction direction) { + return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> F11_SHAPE_NORTH; + case SOUTH -> F11_SHAPE_SOUTH; + case WEST -> F11_SHAPE_WEST; + case EAST -> F11_SHAPE_EAST; + }; + } + + @Override + public VoxelShape getShapeByPart(Direction direction, MirrorPart part) { + if (!testIsRightPart(part)) throw new IllegalArgumentException("Not a right part in mirror shape"); + return switch (part) { + case H00 -> N_S_W_E(direction, H00_SHAPE_NORTH, H00_SHAPE_SOUTH, H00_SHAPE_WEST, H00_SHAPE_EAST); + case H01 -> N_S_W_E(direction, H01_SHAPE_NORTH, H01_SHAPE_SOUTH, H01_SHAPE_WEST, H01_SHAPE_EAST); + case H02 -> N_S_W_E(direction, H02_SHAPE_NORTH, H02_SHAPE_SOUTH, H02_SHAPE_WEST, H02_SHAPE_EAST); + case F10 -> N_S_W_E(direction, F10_SHAPE_NORTH, F10_SHAPE_SOUTH, F10_SHAPE_WEST, F10_SHAPE_EAST); + case F11 -> N_S_W_E(direction, F11_SHAPE_NORTH, F11_SHAPE_SOUTH, F11_SHAPE_WEST, F11_SHAPE_EAST); + case F12 -> N_S_W_E(direction, F12_SHAPE_NORTH, F12_SHAPE_SOUTH, F12_SHAPE_WEST, F12_SHAPE_EAST); + default -> throw new IllegalStateException("Unexpected value: " + part); + }; + } + private VoxelShape N_S_W_E(Direction direction, VoxelShape N, VoxelShape S, VoxelShape E, VoxelShape W) { + return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> N; + case SOUTH -> S; + case WEST -> W; + case EAST -> E; + }; + } + + @Override + public MirrorPart.MirrorType getMirrorType() { + return MirrorPart.MirrorType.MASSIVE_MIRROR; + } + +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/MirrorShape.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/MirrorShape.java new file mode 100644 index 0000000..0534619 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/MirrorShape.java @@ -0,0 +1,41 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror.shape; + +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import com.r3944realms.modernlifepatch.utils.ShapeUtil; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.stream.Stream; + +public class MirrorShape implements IMirrorShape{ + public static final VoxelShape SHAPE_NORTH = Block.box(0, 0, 0.099, 16, 16, 1.099), SHAPE_SOUTH, SHAPE_EAST, SHAPE_WEST; + static { + SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(SHAPE_NORTH); + SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(SHAPE_EAST); + SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(SHAPE_SOUTH); + } + @Override + public VoxelShape getDefaultShape(Direction direction) { + return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> SHAPE_NORTH; + case SOUTH -> SHAPE_SOUTH; + case WEST -> SHAPE_WEST; + case EAST -> SHAPE_EAST; + }; + } + + @Override + public VoxelShape getShapeByPart(Direction direction, MirrorPart part) { + if (!testIsRightPart(part)) throw new IllegalArgumentException("Not a right part in mirror shape"); + return getDefaultShape(direction); + } + + @Override + public MirrorPart.MirrorType getMirrorType() { + return MirrorPart.MirrorType.COMMON_MIRROR; + } + + +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/TallMirrorShape.java b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/TallMirrorShape.java new file mode 100644 index 0000000..fb333c8 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/blocks/type/mirror/shape/TallMirrorShape.java @@ -0,0 +1,53 @@ +package com.r3944realms.modernlifepatch.content.blocks.type.mirror.shape; + +import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; +import com.r3944realms.modernlifepatch.utils.ShapeUtil; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.stream.Stream; + +public class TallMirrorShape implements IMirrorShape { + public static final VoxelShape FOOT_SHAPE_NORTH = Block.box(0, 0, 0, 16, 16, 1.1), + FOOT_SHAPE_SOUTH , FOOT_SHAPE_EAST, FOOT_SHAPE_WEST, + HEAD_SHAPE_NORTH= Block.box(0, 0, 0, 16, 16, 1.1), + HEAD_SHAPE_SOUTH, HEAD_SHAPE_EAST, HEAD_SHAPE_WEST; + static { + FOOT_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(FOOT_SHAPE_NORTH); + FOOT_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(FOOT_SHAPE_EAST); + FOOT_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(FOOT_SHAPE_SOUTH); + + HEAD_SHAPE_EAST = ShapeUtil.RotateVoxelShapeClockwise(HEAD_SHAPE_NORTH); + HEAD_SHAPE_SOUTH = ShapeUtil.RotateVoxelShapeClockwise(HEAD_SHAPE_EAST); + HEAD_SHAPE_WEST = ShapeUtil.RotateVoxelShapeClockwise(HEAD_SHAPE_SOUTH); + } + @Override + public VoxelShape getDefaultShape(Direction direction) { + return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> FOOT_SHAPE_NORTH; + case SOUTH -> FOOT_SHAPE_SOUTH; + case WEST -> FOOT_SHAPE_WEST; + case EAST -> FOOT_SHAPE_EAST; + }; + } + + @Override + public VoxelShape getShapeByPart(Direction direction, MirrorPart part) { + if (!testIsRightPart(part)) throw new IllegalArgumentException("Not a right part in mirror shape"); + if (part == MirrorPart.FOOT) return getDefaultShape(direction); + else return (VoxelShape) switch (direction) { + case DOWN, UP -> Stream.empty(); + case NORTH -> HEAD_SHAPE_NORTH; + case SOUTH -> HEAD_SHAPE_SOUTH; + case WEST -> HEAD_SHAPE_WEST; + case EAST -> HEAD_SHAPE_EAST; + }; + } + + @Override + public MirrorPart.MirrorType getMirrorType() { + return MirrorPart.MirrorType.TELL_MIRROR; + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/content/items/ModItems.java b/src/main/java/com/r3944realms/modernlifepatch/content/items/ModItems.java new file mode 100644 index 0000000..cecaa7c --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/content/items/ModItems.java @@ -0,0 +1,20 @@ +package com.r3944realms.modernlifepatch.content.items; + +import com.r3944realms.modernlifepatch.ModernLifePatch; +import com.r3944realms.modernlifepatch.content.blocks.ModBlocks; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModItems { + public static final DeferredRegister ITEMS + = DeferredRegister.create(ForgeRegistries.ITEMS, ModernLifePatch.MOD_ID); + public static final RegistryObject MIRROR_ITEM = ModBlocks.registerBlockItem("mirror", ModBlocks.MIRROR); + public static final RegistryObject TALL_MIRROR_ITEM = ModBlocks.registerBlockItem("tall_mirror", ModBlocks.TALL_MIRROR); + public static void register(IEventBus bus) { + ITEMS.register(bus); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/datagen/DataGeneratorHandler.java b/src/main/java/com/r3944realms/modernlifepatch/datagen/DataGeneratorHandler.java index 2f346c7..e96a63a 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/datagen/DataGeneratorHandler.java +++ b/src/main/java/com/r3944realms/modernlifepatch/datagen/DataGeneratorHandler.java @@ -1,10 +1,9 @@ package com.r3944realms.modernlifepatch.datagen; -import com.r3944realms.modernlifepatch.datagen.provider.ModBlockTagProvider; -import com.r3944realms.modernlifepatch.datagen.provider.ModItemTagProvider; -import com.r3944realms.modernlifepatch.datagen.provider.ModLanguageProvider; +import com.r3944realms.modernlifepatch.datagen.provider.*; import com.r3944realms.modernlifepatch.utils.Enum.LanguageEnum; import net.minecraft.data.DataGenerator; +import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.forge.event.lifecycle.GatherDataEvent; @@ -16,10 +15,13 @@ public class DataGeneratorHandler { @SubscribeEvent public static void generatorDataEvent(GatherDataEvent event) { DataGenerator generator = event.getGenerator(); - ModBlockTagProvider modBlockTagProvider = new ModBlockTagProvider(generator, event.getExistingFileHelper()); - generator.addProvider(new ModLanguageProvider(generator, MOD_ID, LanguageEnum.English)); - generator.addProvider(new ModLanguageProvider(generator, MOD_ID, LanguageEnum.SimpleChinese)); + ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); + ModBlockTagProvider modBlockTagProvider = new ModBlockTagProvider(generator, existingFileHelper); + generator.addProvider(new ModLanguageProvider(generator, LanguageEnum.English)); + generator.addProvider(new ModLanguageProvider(generator, LanguageEnum.SimpleChinese)); + generator.addProvider(new ModItemModelProvider(generator, existingFileHelper)); + generator.addProvider(new ModBlockModelProvider(generator, existingFileHelper)); generator.addProvider(modBlockTagProvider); - generator.addProvider(new ModItemTagProvider(generator, modBlockTagProvider,event.getExistingFileHelper())); + generator.addProvider(new ModItemTagProvider(generator, modBlockTagProvider, existingFileHelper)); } } diff --git a/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModBlockModelProvider.java b/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModBlockModelProvider.java new file mode 100644 index 0000000..46cffdc --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModBlockModelProvider.java @@ -0,0 +1,42 @@ +package com.r3944realms.modernlifepatch.datagen.provider; + +import com.r3944realms.modernlifepatch.ModernLifePatch; +import net.minecraft.data.DataGenerator; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.client.model.generators.BlockModelBuilder; +import net.minecraftforge.client.model.generators.BlockStateProvider; +import net.minecraftforge.client.model.generators.ModelProvider; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.ForgeRegistries; + +public class ModBlockModelProvider extends BlockStateProvider { + public ModBlockModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) { + super(generator, ModernLifePatch.MOD_ID, existingFileHelper); + } + + + public void registerStatesAndModels(Block block) { + this.simpleBlock(block, this.cubeAll(block)); + } + public ResourceLocation blockTextureSuffix(Block block,String suffix) { + ResourceLocation name = key(block); + return new ResourceLocation(name.getNamespace(), ModelProvider.BLOCK_FOLDER + "/" + name.getPath() + suffix); + } + private ResourceLocation key(Block block) { + return ForgeRegistries.BLOCKS.getKey(block); + } + + @Override + protected void registerStatesAndModels() { + + } + + public void generateJasmineBlockState(Block block) { + BlockModelBuilder model = models().cubeAll(name(block), blockTexture(block)); + simpleBlock(block,model); + } + public String name(Block block) { + return key(block).getPath(); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModItemModelProvider.java b/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModItemModelProvider.java new file mode 100644 index 0000000..9945c5a --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModItemModelProvider.java @@ -0,0 +1,38 @@ +package com.r3944realms.modernlifepatch.datagen.provider; + +import com.r3944realms.modernlifepatch.ModernLifePatch; +import com.r3944realms.modernlifepatch.content.items.ModItems; +import net.minecraft.data.DataGenerator; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraftforge.client.model.generators.ItemModelProvider; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.Objects; + +public class ModItemModelProvider extends ItemModelProvider { + public static final String GENERATED = "item/generated"; + public ModItemModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) { + super(generator, ModernLifePatch.MOD_ID, existingFileHelper); + } + + @Override + protected void registerModels() { + itemGeneratedModel(ModItems.MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/mirror_item")); + itemGeneratedModel(ModItems.TALL_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/tall_mirror_item")); + } + + public void itemGeneratedModel(Item item, ResourceLocation texture) { + withExistingParent(itemName(item), GENERATED).texture("layer0", texture); + } + + private String itemName(Item item) { + return Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)).getPath(); + } + + public ResourceLocation resourceItem(String path) { + return new ResourceLocation(ModernLifePatch.MOD_ID, "item/" + path); + } + +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModLanguageProvider.java b/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModLanguageProvider.java index e4a78d1..20b41e7 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModLanguageProvider.java +++ b/src/main/java/com/r3944realms/modernlifepatch/datagen/provider/ModLanguageProvider.java @@ -1,5 +1,6 @@ package com.r3944realms.modernlifepatch.datagen.provider; +import com.r3944realms.modernlifepatch.ModernLifePatch; import com.r3944realms.modernlifepatch.datagen.lang.ModLangKeyValue; import com.r3944realms.modernlifepatch.utils.Enum.LanguageEnum; import net.minecraft.data.DataGenerator; @@ -14,8 +15,8 @@ public class ModLanguageProvider extends LanguageProvider { private final LanguageEnum Language; private final Map LanKeyMap; private static final List objects = new ArrayList<>(); - public ModLanguageProvider(DataGenerator dataGenerator, String modId, LanguageEnum Lan) { - super(dataGenerator, modId, Lan.local); + public ModLanguageProvider(DataGenerator dataGenerator, LanguageEnum Lan) { + super(dataGenerator, ModernLifePatch.MOD_ID, Lan.local); this.Language = Lan; LanKeyMap = new HashMap<>(); init(); diff --git a/src/main/java/com/r3944realms/modernlifepatch/mixin/block/common/MixinCeilingFan.java b/src/main/java/com/r3944realms/modernlifepatch/mixin/block/common/MixinCeilingFan.java new file mode 100644 index 0000000..88ec365 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/mixin/block/common/MixinCeilingFan.java @@ -0,0 +1,24 @@ +package com.r3944realms.modernlifepatch.mixin.block.common; + +import com.dairymoose.modernlife.blocks.CeilingFanBlock; +import com.r3944realms.modernlifepatch.datagen.lang.ModLangKeyValue; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.BlockGetter; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.List; + +@Mixin(CeilingFanBlock.class) +public class MixinCeilingFan { + @Inject(method = {"appendHoverText"}, at= @At("HEAD"), cancellable = true) + public void appendHoverText(ItemStack itemStack, BlockGetter blockReader, List list, TooltipFlag tooltipFlag, CallbackInfo ci) { + list.add(new TranslatableComponent(ModLangKeyValue.NEED_RED_STONE_POWER_HOVER.getKey())); + ci.cancel(); + } +} diff --git a/src/main/java/com/r3944realms/modernlifepatch/mixin/item/MixinCamera.java b/src/main/java/com/r3944realms/modernlifepatch/mixin/item/MixinCamera.java index 6f155cc..70c58a1 100644 --- a/src/main/java/com/r3944realms/modernlifepatch/mixin/item/MixinCamera.java +++ b/src/main/java/com/r3944realms/modernlifepatch/mixin/item/MixinCamera.java @@ -1,6 +1,9 @@ package com.r3944realms.modernlifepatch.mixin.item; import com.dairymoose.modernlife.items.CameraItem; +import com.dairymoose.modernlife.util.CanvasData; +import com.mojang.blaze3d.platform.NativeImage; +import com.r3944realms.modernlifepatch.ModernLifePatch; import com.r3944realms.modernlifepatch.datagen.lang.ModLangKeyValue; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; @@ -11,14 +14,74 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.util.List; @Mixin(CameraItem.class) -public class MixinCamera { +public abstract class MixinCamera { + + @Unique + private static int modernLifePatch$toInternalRgbFormat(int nativeRgb) { + int r = nativeRgb & 255; + int g = (nativeRgb & '\uff00') >> 8; + int b = (nativeRgb & 16711680) >> 16; + return r << 16 | g << 8 | b; + } + @Inject(method = {"getAverageRgbAt"}, at = @At("HEAD"), remap = false, cancellable = true) + private static void getAverageRgbAt(NativeImage img, int x, int y, float pixelSampleWidth, float pixelSampleHeight, CallbackInfoReturnable cir) { + try { + int destX = (int) ((float) x * pixelSampleWidth); + int destY = (int) ((float) y * pixelSampleHeight); + int rSum = 0; + int gSum = 0; + int bSum = 0; + int iterations = 0; + int hStart = (int) (-pixelSampleHeight / 2.0F); + int hEnd = (int) (pixelSampleHeight / 2.0F); + int wStart = (int) (-pixelSampleWidth / 2.0F); + int wEnd = (int) (pixelSampleWidth / 2.0F); + ModernLifePatch.logger.info("[ModernLifePatch.MixinCamera] pixelSampleHeight: {} , pixelSampleWidth: {}", pixelSampleHeight, pixelSampleWidth); + if (hStart == hEnd) { + hStart = 0; + hEnd = 1; + wStart = 0; + wEnd = 1; + } + + int h; + int w; + int finalX; + ModernLifePatch.logger.info("[ModernLifePatch.MixinCamera] hEnd: {} , wEnd: {}", hEnd, wEnd); + for (h = hStart; h < hEnd; ++h) { + for (w = wStart; w < wEnd; ++w) { + finalX = destX + w; + int finalY = destY + h; + finalX = Math.max(finalX, 0); + finalY = Math.max(finalY, 0); + finalX = Math.min(finalX, img.getWidth() - 1); + finalY = Math.min(finalY, img.getHeight() - 1); + int rgb = modernLifePatch$toInternalRgbFormat(img.getPixelRGBA(finalX, finalY)); + rSum += CanvasData.getRValue(rgb); + gSum += CanvasData.getGValue(rgb); + bSum += CanvasData.getBValue(rgb); + ++iterations; + } + } + ModernLifePatch.logger.info("[ModernLifePatch.MixinCamera] rSum: {} , gSum: {}, bSum: {}", rSum, gSum, bSum); + ModernLifePatch.logger.info("[ModernLifePatch.MixinCamera] iterations: {} ", iterations); + h = rSum / iterations; + w = gSum / iterations; + finalX = bSum / iterations; + cir.setReturnValue(h << 16 | w << 8 | finalX); + } catch(ArrayIndexOutOfBoundsException e) { + cir.setReturnValue(0xffffffff); + } + } @Inject(method = {"appendHoverText"}, at= @At("HEAD"), cancellable = true) public void appendHoverText(ItemStack itemStack, Level world, List text, TooltipFlag flag, CallbackInfo ci) { int photoCount = 0; diff --git a/src/main/java/com/r3944realms/modernlifepatch/utils/ShapeUtil.java b/src/main/java/com/r3944realms/modernlifepatch/utils/ShapeUtil.java new file mode 100644 index 0000000..d7ccc22 --- /dev/null +++ b/src/main/java/com/r3944realms/modernlifepatch/utils/ShapeUtil.java @@ -0,0 +1,35 @@ +package com.r3944realms.modernlifepatch.utils; + +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.ArrayList; +import java.util.List; + +public final class ShapeUtil { + public static void initializeByNorth(VoxelShape north, VoxelShape east, VoxelShape south, VoxelShape west) { + east = ShapeUtil.RotateVoxelShapeClockwise(north); + south = ShapeUtil.RotateVoxelShapeClockwise(east); + west = ShapeUtil.RotateVoxelShapeClockwise(south); + } + public static VoxelShape RotateVoxelShapeClockwise(VoxelShape in) { + final List generatedShapes = new ArrayList<>(); + in.forAllBoxes((arg0, arg1, arg2, arg3, arg4, arg5) -> { + VoxelShape shape = Shapes.box(1.0 - arg5, arg1, arg0, 1.0 - arg2, arg4, arg3); + generatedShapes.add(shape); + }); + if (generatedShapes.isEmpty()) { + return Shapes.block(); + } else { + VoxelShape out = generatedShapes.get(0); + + for(int i = 1; i < generatedShapes.size(); ++i) { + VoxelShape shape = generatedShapes.get(i); + out = Shapes.or(out, shape); + } + + out.optimize(); + return out; + } + } +} diff --git a/src/main/resources/assets/modernlifepatch/blockstates/large_mirror.json b/src/main/resources/assets/modernlifepatch/blockstates/large_mirror.json new file mode 100644 index 0000000..1734e6e --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/blockstates/large_mirror.json @@ -0,0 +1,64 @@ +{ + "variants": { + "facing=north,mirror_part=mirror_head_left": { + "model": "modernlifepatch:block/large_mirror_top_left" + }, + "facing=south,mirror_part=mirror_head_left": { + "model": "modernlifepatch:block/large_mirror_top_left", + "y": 180 + }, + "facing=west,mirror_part=mirror_head_left": { + "model": "modernlifepatch:block/large_mirror_top_left", + "y": 270 + }, + "facing=east,mirror_part=mirror_head_left": { + "model": "modernlifepatch:block/large_mirror_top_left", + "y": 90 + }, + "facing=north,mirror_part=mirror_head_right": { + "model": "modernlifepatch:block/large_mirror_top_right" + }, + "facing=south,mirror_part=mirror_head_right": { + "model": "modernlifepatch:block/large_mirror_top_right", + "y": 180 + }, + "facing=west,mirror_part=mirror_head_right": { + "model": "modernlifepatch:block/large_mirror_top_right", + "y": 270 + }, + "facing=east,mirror_part=mirror_head_right": { + "model": "modernlifepatch:block/large_mirror_top_right", + "y": 90 + }, + "facing=north,mirror_part=mirror_foot_left": { + "model": "modernlifepatch:block/large_mirror_bottom_left" + }, + "facing=south,mirror_part=mirror_foot_left": { + "model": "modernlifepatch:block/large_mirror_bottom_left", + "y": 180 + }, + "facing=west,mirror_part=mirror_foot_left": { + "model": "modernlifepatch:block/large_mirror_bottom_left", + "y": 270 + }, + "facing=east,mirror_part=mirror_foot_left": { + "model": "modernlifepatch:block/large_mirror_bottom_left", + "y": 90 + }, + "facing=north,mirror_part=mirror_foot_right": { + "model": "modernlifepatch:block/large_mirror_bottom_right" + }, + "facing=south,mirror_part=mirror_foot_right": { + "model": "modernlifepatch:block/large_mirror_bottom_right", + "y": 180 + }, + "facing=west,mirror_part=mirror_foot_right": { + "model": "modernlifepatch:block/large_mirror_bottom_right", + "y": 270 + }, + "facing=east,mirror_part=mirror_foot_right": { + "model": "modernlifepatch:block/large_mirror_bottom_right", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/blockstates/massive_mirror.json b/src/main/resources/assets/modernlifepatch/blockstates/massive_mirror.json new file mode 100644 index 0000000..ba0cbf7 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/blockstates/massive_mirror.json @@ -0,0 +1,94 @@ +{ + "variants": { + "facing=north,mirror_part=mirror_h00": { + "model": "modernlifepatch:block/massive_mirror_top_left" + }, + "facing=south,mirror_part=mirror_h00": { + "model": "modernlifepatch:block/massive_mirror_top_left", + "y": 180 + }, + "facing=west,mirror_part=mirror_h00": { + "model": "modernlifepatch:block/massive_mirror_top_left", + "y": 270 + }, + "facing=east,mirror_part=mirror_h00": { + "model": "modernlifepatch:block/massive_mirror_top_left", + "y": 90 + }, + "facing=north,mirror_part=mirror_h01": { + "model": "modernlifepatch:block/massive_mirror_top_middle" + }, + "facing=south,mirror_part=mirror_h01": { + "model": "modernlifepatch:block/massive_mirror_top_middle", + "y": 180 + }, + "facing=west,mirror_part=mirror_h01": { + "model": "modernlifepatch:block/massive_mirror_top_middle", + "y": 270 + }, + "facing=east,mirror_part=mirror_h01": { + "model": "modernlifepatch:block/massive_mirror_top_middle", + "y": 90 + }, + "facing=north,mirror_part=mirror_h02": { + "model": "modernlifepatch:block/massive_mirror_top_right" + }, + "facing=south,mirror_part=mirror_h02": { + "model": "modernlifepatch:block/massive_mirror_top_right", + "y": 180 + }, + "facing=west,mirror_part=mirror_h02": { + "model": "modernlifepatch:block/massive_mirror_top_right", + "y": 270 + }, + "facing=east,mirror_part=mirror_h02": { + "model": "modernlifepatch:block/massive_mirror_top_right", + "y": 90 + }, + "facing=north,mirror_part=mirror_f10": { + "model": "modernlifepatch:block/massive_mirror_bottom_left" + }, + "facing=south,mirror_part=mirror_f10": { + "model": "modernlifepatch:block/massive_mirror_bottom_left", + "y": 180 + }, + "facing=west,mirror_part=mirror_f10": { + "model": "modernlifepatch:block/massive_mirror_bottom_left", + "y": 270 + }, + "facing=east,mirror_part=mirror_f10": { + "model": "modernlifepatch:block/massive_mirror_bottom_left", + "y": 90 + }, + "facing=north,mirror_part=mirror_f11": { + "model": "modernlifepatch:block/massive_mirror_bottom_middle" + }, + "facing=south,mirror_part=mirror_f11": { + "model": "modernlifepatch:block/massive_mirror_bottom_middle", + "y": 180 + }, + "facing=west,mirror_part=mirror_f11": { + "model": "modernlifepatch:block/massive_mirror_bottom_middle", + "y": 270 + }, + "facing=east,mirror_part=mirror_f11": { + "model": "modernlifepatch:block/massive_mirror_bottom_middle", + "y": 90 + }, + "facing=north,mirror_part=mirror_f12": { + "model": "modernlifepatch:block/massive_mirror_bottom_right" + }, + "facing=south,mirror_part=mirror_f12": { + "model": "modernlifepatch:block/massive_mirror_bottom_right", + "y": 180 + }, + "facing=west,mirror_part=mirror_f12": { + "model": "modernlifepatch:block/massive_mirror_bottom_right", + "y": 270 + }, + "facing=east,mirror_part=mirror_f12": { + "model": "modernlifepatch:block/massive_mirror_bottom_right", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/blockstates/mirror.json b/src/main/resources/assets/modernlifepatch/blockstates/mirror.json new file mode 100644 index 0000000..7be2766 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/blockstates/mirror.json @@ -0,0 +1,19 @@ +{ + "variants": { + "facing=north,mirror_part=mirror": { + "model": "modernlifepatch:block/mirror" + }, + "facing=south,mirror_part=mirror": { + "model": "modernlifepatch:block/mirror", + "y": 180 + }, + "facing=west,mirror_part=mirror": { + "model": "modernlifepatch:block/mirror", + "y": 270 + }, + "facing=east,mirror_part=mirror": { + "model": "modernlifepatch:block/mirror", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/blockstates/tall_mirror.json b/src/main/resources/assets/modernlifepatch/blockstates/tall_mirror.json new file mode 100644 index 0000000..35b3598 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/blockstates/tall_mirror.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=north,mirror_part=mirror_head": { + "model": "modernlifepatch:block/tall_mirror_top" + }, + "facing=south,mirror_part=mirror_head": { + "model": "modernlifepatch:block/tall_mirror_top", + "y": 180 + }, + "facing=west,mirror_part=mirror_head": { + "model": "modernlifepatch:block/tall_mirror_top", + "y": 270 + }, + "facing=east,mirror_part=mirror_head": { + "model": "modernlifepatch:block/tall_mirror_top", + "y": 90 + }, + "facing=north,mirror_part=mirror_foot": { + "model": "modernlifepatch:block/tall_mirror_bottom" + }, + "facing=south,mirror_part=mirror_foot": { + "model": "modernlifepatch:block/tall_mirror_bottom", + "y": 180 + }, + "facing=west,mirror_part=mirror_foot": { + "model": "modernlifepatch:block/tall_mirror_bottom", + "y": 270 + }, + "facing=east,mirror_part=mirror_foot": { + "model": "modernlifepatch:block/tall_mirror_bottom", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/large_mirror_bottom_left.json b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_bottom_left.json new file mode 100644 index 0000000..0ecdfba --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_bottom_left.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/large_mirror", + "particle": "modernlifepatch:block/large_mirror" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [2, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 0]}, + "faces": { + "north": {"uv": [7.5, 4, 8, 8], "texture": "#25"}, + "east": {"uv": [0.25, 4, 0.5, 8], "texture": "#25"}, + "south": {"uv": [0, 4, 0.5, 8], "texture": "#25"}, + "west": {"uv": [0, 4, 0.25, 8], "texture": "#25"}, + "up": {"uv": [0, 0, 0.5, 0.25], "texture": "#25"}, + "down": {"uv": [0, 7.75, 0.5, 8], "texture": "#25"} + } + }, + { + "from": [2, 0, 0], + "to": [16, 2, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -30, 0]}, + "faces": { + "north": {"uv": [4, 7.5, 7.5, 8], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [0.5, 7.5, 4, 8], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [0.5, 7.75, 4, 7.5], "texture": "#25"}, + "down": {"uv": [0.5, 7.75, 4, 8], "texture": "#25"} + } + }, + { + "from": [2, 2, 0], + "to": [16, 16, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -28, 0]}, + "faces": { + "north": {"uv": [12, 4, 15.5, 7.5], "texture": "#25"}, + "east": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "south": {"uv": [0.5, 4, 4, 7.5], "texture": "#25"}, + "west": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#25"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#25"} + } + }, + { + "from": [2, 2, 0.999], + "to": [6, 6, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 2, -1.001]}, + "faces": { + "north": {"uv": [1, 8, 0, 9], "texture": "#25"}, + "east": {"uv": [0, 0, 0, 3], "texture": "#25"}, + "south": {"uv": [0, 8, 1, 9], "texture": "#25"}, + "west": {"uv": [0, 0, 0, 3], "texture": "#25"}, + "up": {"uv": [0, 0, 3, 0], "texture": "#25"}, + "down": {"uv": [0, 0, 3, 0], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.25, -3.75, 0], + "scale": [0.4, 0.4, 0.4] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -4, -3], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "large_mirror_bottom_left", + "origin": [-6, -14, -1.001], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/large_mirror_bottom_right.json b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_bottom_right.json new file mode 100644 index 0000000..1e494f7 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_bottom_right.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/large_mirror", + "particle": "modernlifepatch:block/large_mirror" + }, + "elements": [ + { + "from": [14, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 0]}, + "faces": { + "north": {"uv": [8, 4, 7.5, 8], "texture": "#25"}, + "east": {"uv": [0.25, 4, 0, 8], "texture": "#25"}, + "south": {"uv": [0.5, 4, 0, 8], "texture": "#25"}, + "west": {"uv": [0.5, 4, 0.25, 8], "texture": "#25"}, + "up": {"uv": [0.5, 0, 0, 0.25], "texture": "#25"}, + "down": {"uv": [0.5, 7.75, 0, 8], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [14, 2, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [-9, -30, 0]}, + "faces": { + "north": {"uv": [0.5, 7.5, 4, 8], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [4, 7.5, 7.5, 8], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [4, 7.75, 7.5, 7.5], "texture": "#25"}, + "down": {"uv": [4, 7.75, 7.5, 8], "texture": "#25"} + } + }, + { + "from": [0, 2, 0], + "to": [14, 16, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [-9, -28, 0]}, + "faces": { + "north": {"uv": [8.5, 4, 12, 7.5], "texture": "#25"}, + "east": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "south": {"uv": [4, 4, 7.5, 7.5], "texture": "#25"}, + "west": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "up": {"uv": [8, 0, 16, 1], "texture": "#25"}, + "down": {"uv": [8, 0, 16, 1], "texture": "#25"} + } + }, + { + "from": [10, 2, 0.999], + "to": [14, 6, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 2, -1.001]}, + "faces": { + "north": {"uv": [0, 8, 1, 9], "texture": "#25"}, + "east": {"uv": [0, 0, 0, 3], "texture": "#25"}, + "south": {"uv": [1, 8, 0, 9], "texture": "#25"}, + "west": {"uv": [0, 0, 0, 3], "texture": "#25"}, + "up": {"uv": [3, 0, 0, 0], "texture": "#25"}, + "down": {"uv": [3, 0, 0, 0], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.25, -3.75, 0], + "scale": [0.4, 0.4, 0.4] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -4, -3], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "large_mirror_bottom_right", + "origin": [22, -14, -1.001], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/large_mirror_top_left.json b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_top_left.json new file mode 100644 index 0000000..755c948 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_top_left.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/large_mirror", + "particle": "modernlifepatch:block/large_mirror" + }, + "elements": [ + { + "from": [2, 14, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -16, 0]}, + "faces": { + "north": {"uv": [4, 0, 7.5, 0.5], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [0.5, 0, 4, 0.5], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [0.5, 0, 4, 0.25], "texture": "#25"}, + "down": {"uv": [0.5, 0.25, 4, 0.5], "texture": "#25"} + } + }, + { + "from": [2, 10, 0.999], + "to": [6, 14, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 14, -1.001]}, + "faces": { + "north": {"uv": [1, 9, 0, 8], "texture": "#25"}, + "east": {"uv": [0, 3, 0, 0], "texture": "#25"}, + "south": {"uv": [0, 9, 1, 8], "texture": "#25"}, + "west": {"uv": [0, 3, 0, 0], "texture": "#25"}, + "up": {"uv": [0, 0, 3, 0], "texture": "#25"}, + "down": {"uv": [0, 0, 3, 0], "texture": "#25"} + } + }, + { + "from": [2, 0, 0], + "to": [16, 14, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -44, 0]}, + "faces": { + "north": {"uv": [12, 0.5, 15.5, 4], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "south": {"uv": [0.5, 0.5, 4, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#25"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [2, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -16, 0]}, + "faces": { + "north": {"uv": [7.5, 0, 8, 4], "texture": "#25"}, + "east": {"uv": [0.25, 0, 0.5, 4], "texture": "#25"}, + "south": {"uv": [0, 0, 0.5, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 0.25, 4], "texture": "#25"}, + "up": {"uv": [0, 0, 0.5, 0.25], "texture": "#25"}, + "down": {"uv": [0, 7.75, 0.5, 8], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.25, -3.75, 0], + "scale": [0.4, 0.4, 0.4] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -4, -3], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "large_mirror_top_left", + "origin": [-1, -16, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/large_mirror_top_right.json b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_top_right.json new file mode 100644 index 0000000..e109be0 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/large_mirror_top_right.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/large_mirror", + "particle": "modernlifepatch:block/large_mirror" + }, + "elements": [ + { + "from": [10, 10, 0.999], + "to": [14, 14, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 14, -1.001]}, + "faces": { + "north": {"uv": [0, 9, 1, 8], "texture": "#25"}, + "east": {"uv": [0, 3, 0, 0], "texture": "#25"}, + "south": {"uv": [1, 9, 0, 8], "texture": "#25"}, + "west": {"uv": [0, 3, 0, 0], "texture": "#25"}, + "up": {"uv": [3, 0, 0, 0], "texture": "#25"}, + "down": {"uv": [3, 0, 0, 0], "texture": "#25"} + } + }, + { + "from": [14, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [9, -16, 0]}, + "faces": { + "north": {"uv": [8, 0, 7.5, 4], "texture": "#25"}, + "east": {"uv": [0.25, 0, 0, 4], "texture": "#25"}, + "south": {"uv": [0.5, 0, 0, 4], "texture": "#25"}, + "west": {"uv": [0.5, 0, 0.25, 4], "texture": "#25"}, + "up": {"uv": [0.5, 0, 0, 0.25], "texture": "#25"}, + "down": {"uv": [0.5, 7.75, 0, 8], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [14, 14, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [-9, -44, 0]}, + "faces": { + "north": {"uv": [8.5, 0.5, 12, 4], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "south": {"uv": [4, 0.5, 7.5, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "up": {"uv": [8, 0, 16, 1], "texture": "#25"}, + "down": {"uv": [8, 0, 16, 1], "texture": "#25"} + } + }, + { + "from": [0, 14, 0], + "to": [14, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [-9, -16, 0]}, + "faces": { + "north": {"uv": [0.5, 0, 4, 0.5], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [4, 0, 7.5, 0.5], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [4, 0, 7.5, 0.25], "texture": "#25"}, + "down": {"uv": [4, 0.25, 7.5, 0.5], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.25, -3.75, 0], + "scale": [0.4, 0.4, 0.4] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -4, -3], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "large_mirror_top_right", + "origin": [-1, -16, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_left.json b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_left.json new file mode 100644 index 0000000..55c94c0 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_left.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/massive_mirror", + "particle": "modernlifepatch:block/massive_mirror" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [2, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 0, 0]}, + "faces": { + "north": {"uv": [11.5, 4, 12, 8], "texture": "#25"}, + "east": {"uv": [0.25, 4, 0.5, 7.75], "texture": "#25"}, + "south": {"uv": [0, 4, 0.5, 8], "texture": "#25"}, + "west": {"uv": [0, 4, 0.25, 8], "texture": "#25"}, + "up": {"uv": [0, 0, 0.5, 0.25], "texture": "#25"}, + "down": {"uv": [0, 7.75, 0.5, 8], "texture": "#25"} + } + }, + { + "from": [2, 0, 0], + "to": [16, 2, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [60, -30, 0]}, + "faces": { + "north": {"uv": [8, 7.5, 11.5, 8], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [0.5, 7.5, 4, 8], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [0.5, 7.5, 4, 7.75], "texture": "#25"}, + "down": {"uv": [0.5, 7.75, 4, 8], "texture": "#25"} + } + }, + { + "from": [2, 2, 0], + "to": [16, 16, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [60, -28, 0]}, + "faces": { + "north": {"uv": [8, 12, 11.5, 15.5], "texture": "#25"}, + "east": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "south": {"uv": [0.5, 4, 4, 7.5], "texture": "#25"}, + "west": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "up": {"uv": [0, 0, 5.09091, 1], "texture": "#25"}, + "down": {"uv": [0, 0, 5.09091, 1], "texture": "#25"} + } + }, + { + "from": [2, 2, 0.999], + "to": [8, 8, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 2, 0.999]}, + "faces": { + "north": {"uv": [13.5, 0, 12, 1.5], "texture": "#25"}, + "east": {"uv": [0, 0, 0, 2], "texture": "#25"}, + "south": {"uv": [12, 0, 13.5, 1.5], "texture": "#25"}, + "west": {"uv": [0, 0, 0, 2], "texture": "#25"}, + "up": {"uv": [0, 0, 2, 0], "texture": "#25"}, + "down": {"uv": [0, 0, 2, 0], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_righthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_lefthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "ground": { + "translation": [0, 2, 0], + "scale": [0.45, 0.45, 0.45] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2, -3.5, 0], + "scale": [0.353, 0.353, 0.353] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -3.25, -4], + "scale": [0.45, 0.45, 0.45] + } + }, + "groups": [ + { + "name": "massive_mirror_bottom_left", + "origin": [-14, 2, 0.999], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_middle.json b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_middle.json new file mode 100644 index 0000000..c5f40bd --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_middle.json @@ -0,0 +1,80 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/massive_mirror", + "particle": "modernlifepatch:block/massive_mirror" + }, + "elements": [ + { + "from": [0, 2, 0], + "to": [16, 16, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 0.05]}, + "faces": { + "north": {"uv": [4, 12, 8, 15.5], "texture": "#25"}, + "east": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "south": {"uv": [4, 4, 8, 7.5], "texture": "#25"}, + "west": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "up": {"uv": [5.09091, 0, 10.90909, 1], "texture": "#25"}, + "down": {"uv": [5.09091, 0, 10.90909, 1], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 2, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [44, -30, 0]}, + "faces": { + "north": {"uv": [4, 7.5, 8, 8], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [4, 7.5, 8, 8], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [4, 7.5, 8, 7.75], "texture": "#25"}, + "down": {"uv": [4, 7.75, 8, 8], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_righthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_lefthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "ground": { + "translation": [0, 2, 0], + "scale": [0.45, 0.45, 0.45] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2, -3.5, 0], + "scale": [0.353, 0.353, 0.353] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -3.25, -4], + "scale": [0.45, 0.45, 0.45] + } + }, + "groups": [ + { + "name": "massive_mirror_bottom_middle", + "origin": [44, -30, 0], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_right.json b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_right.json new file mode 100644 index 0000000..a7dc0e5 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_bottom_right.json @@ -0,0 +1,105 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/massive_mirror", + "particle": "modernlifepatch:block/massive_mirror" + }, + "elements": [ + { + "from": [14, 0, 0], + "to": [16, 16, 1], + "faces": { + "north": {"uv": [12, 4, 11.5, 8], "texture": "#25"}, + "east": {"uv": [0.25, 4, 0, 8], "texture": "#25"}, + "south": {"uv": [0.5, 4, 0, 8], "texture": "#25"}, + "west": {"uv": [0.5, 4, 0.25, 7.75], "texture": "#25"}, + "up": {"uv": [0.5, 0, 0, 0.25], "texture": "#25"}, + "down": {"uv": [0.5, 7.75, 0, 8], "texture": "#25"} + } + }, + { + "from": [8, 2, 0.999], + "to": [14, 8, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 2, 0.999]}, + "faces": { + "north": {"uv": [12, 0, 13.5, 1.5], "texture": "#25"}, + "east": {"uv": [0, 0, 0, 2], "texture": "#25"}, + "south": {"uv": [13.5, 0, 12, 1.5], "texture": "#25"}, + "west": {"uv": [0, 0, 0, 2], "texture": "#25"}, + "up": {"uv": [2, 0, 0, 0], "texture": "#25"}, + "down": {"uv": [2, 0, 0, 0], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [14, 2, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [28, -30, 0]}, + "faces": { + "north": {"uv": [0.5, 7.5, 4, 8], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [8, 7.5, 11.5, 8], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [8, 7.5, 11.5, 7.75], "texture": "#25"}, + "down": {"uv": [8, 7.75, 11.5, 8], "texture": "#25"} + } + }, + { + "from": [0, 2, 0], + "to": [14, 16, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [28, -28, 0]}, + "faces": { + "north": {"uv": [0.5, 12, 4, 15.5], "texture": "#25"}, + "east": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "south": {"uv": [8, 4, 11.5, 7.5], "texture": "#25"}, + "west": {"uv": [0, 8, 1, 16], "texture": "#25"}, + "up": {"uv": [10.90909, 0, 16, 1], "texture": "#25"}, + "down": {"uv": [10.90909, 0, 16, 1], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_righthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_lefthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "ground": { + "translation": [0, 2, 0], + "scale": [0.45, 0.45, 0.45] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2, -3.5, 0], + "scale": [0.353, 0.353, 0.353] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -3.25, -4], + "scale": [0.45, 0.45, 0.45] + } + }, + "groups": [ + { + "name": "massive_mirror_bottom_right", + "origin": [44, -28, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_left.json b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_left.json new file mode 100644 index 0000000..c3aacfe --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_left.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/massive_mirror", + "particle": "modernlifepatch:block/massive_mirror" + }, + "elements": [ + { + "from": [2, 14, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [60, -16, 0]}, + "faces": { + "north": {"uv": [8, 0, 11.5, 0.5], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [0.5, 0, 4, 0.5], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [0.5, 0, 4, 0.25], "texture": "#25"}, + "down": {"uv": [0.5, 0.25, 4, 0.5], "texture": "#25"} + } + }, + { + "from": [2, 8, 0.999], + "to": [8, 14, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 14, 0.999]}, + "faces": { + "north": {"uv": [13.5, 1.5, 12, 0], "texture": "#25"}, + "east": {"uv": [0, 2, 0, 0], "texture": "#25"}, + "south": {"uv": [12, 1.5, 13.5, 0], "texture": "#25"}, + "west": {"uv": [0, 2, 0, 0], "texture": "#25"}, + "up": {"uv": [0, 0, 2, 0], "texture": "#25"}, + "down": {"uv": [0, 0, 2, 0], "texture": "#25"} + } + }, + { + "from": [2, 0, 0], + "to": [16, 14, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [60, -44, 0]}, + "faces": { + "north": {"uv": [8, 8.5, 11.5, 12], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "south": {"uv": [0.5, 0.5, 4, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "up": {"uv": [0, 0, 5.09091, 1], "texture": "#25"}, + "down": {"uv": [0, 0, 5.09091, 1], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [2, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [16, -16, 0]}, + "faces": { + "north": {"uv": [11.5, 0, 12, 4], "texture": "#25"}, + "east": {"uv": [0.25, 0.25, 0.5, 4], "texture": "#25"}, + "south": {"uv": [0, 0, 0.5, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 0.25, 4], "texture": "#25"}, + "up": {"uv": [0, 0, 0.5, 0.25], "texture": "#25"}, + "down": {"uv": [0, 7.75, 0.5, 8], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_righthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_lefthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "ground": { + "translation": [0, 2, 0], + "scale": [0.45, 0.45, 0.45] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2, -3.5, 0], + "scale": [0.353, 0.353, 0.353] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -3.25, -4], + "scale": [0.45, 0.45, 0.45] + } + }, + "groups": [ + { + "name": "massive_mirror_top_left", + "origin": [0, 0, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_middle.json b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_middle.json new file mode 100644 index 0000000..1aae2a9 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_middle.json @@ -0,0 +1,80 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/massive_mirror", + "particle": "modernlifepatch:block/massive_mirror" + }, + "elements": [ + { + "from": [0, 14, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [44, -16, 0]}, + "faces": { + "north": {"uv": [4, 0, 8, 0.5], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [4, 0, 8, 0.5], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [4, 0, 8, 0.25], "texture": "#25"}, + "down": {"uv": [4, 0.25, 8, 0.5], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 14, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 0.05]}, + "faces": { + "north": {"uv": [4, 8.5, 8, 12], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "south": {"uv": [4, 0.5, 8, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "up": {"uv": [5.09091, 0, 10.90909, 1], "texture": "#25"}, + "down": {"uv": [5.09091, 0, 10.90909, 1], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_righthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_lefthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "ground": { + "translation": [0, 2, 0], + "scale": [0.45, 0.45, 0.45] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2, -3.5, 0], + "scale": [0.353, 0.353, 0.353] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -3.25, -4], + "scale": [0.45, 0.45, 0.45] + } + }, + "groups": [ + { + "name": "massive_mirror_top_middle", + "origin": [8, 16, 0.05], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_right.json b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_right.json new file mode 100644 index 0000000..c057dbd --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/massive_mirror_top_right.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "25": "modernlifepatch:block/massive_mirror", + "particle": "modernlifepatch:block/massive_mirror" + }, + "elements": [ + { + "from": [8, 8, 0.999], + "to": [14, 14, 0.999], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 14, 0.999]}, + "faces": { + "north": {"uv": [12, 1.5, 13.5, 0], "texture": "#25"}, + "east": {"uv": [0, 2, 0, 0], "texture": "#25"}, + "south": {"uv": [13.5, 1.5, 12, 0], "texture": "#25"}, + "west": {"uv": [0, 2, 0, 0], "texture": "#25"}, + "up": {"uv": [2, 0, 0, 0], "texture": "#25"}, + "down": {"uv": [2, 0, 0, 0], "texture": "#25"} + } + }, + { + "from": [0, 14, 0], + "to": [14, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [28, -16, 0]}, + "faces": { + "north": {"uv": [0.5, 0, 4, 0.5], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "south": {"uv": [8, 0, 11.5, 0.5], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#25"}, + "up": {"uv": [8, 0, 11.5, 0.25], "texture": "#25"}, + "down": {"uv": [8, 0.25, 11.5, 0.5], "texture": "#25"} + } + }, + { + "from": [0, 0, 0], + "to": [14, 14, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [28, -44, 0]}, + "faces": { + "north": {"uv": [0.5, 8.5, 4, 12], "texture": "#25"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "south": {"uv": [8, 0.5, 11.5, 4], "texture": "#25"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#25"}, + "up": {"uv": [10.90909, 0, 16, 1], "texture": "#25"}, + "down": {"uv": [10.90909, 0, 16, 1], "texture": "#25"} + } + }, + { + "from": [14, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -16, 0]}, + "faces": { + "north": {"uv": [12, 0, 11.5, 4], "texture": "#25"}, + "east": {"uv": [0.25, 0, 0, 4], "texture": "#25"}, + "south": {"uv": [0.5, 0, 0, 4], "texture": "#25"}, + "west": {"uv": [0.5, 0.25, 0.25, 4], "texture": "#25"}, + "up": {"uv": [0.5, 0, 0, 0.25], "texture": "#25"}, + "down": {"uv": [0.5, 7.75, 0, 8], "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 4.5], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_righthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "firstperson_lefthand": { + "translation": [0.88, 3.2, 3.38], + "scale": [0.45, 0.45, 0.45] + }, + "ground": { + "translation": [0, 2, 0], + "scale": [0.45, 0.45, 0.45] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2, -3.5, 0], + "scale": [0.353, 0.353, 0.353] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 13, 7] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -3.25, -4], + "scale": [0.45, 0.45, 0.45] + } + }, + "groups": [ + { + "name": "massive_mirror_top_right", + "origin": [16, 0, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/mirror.json b/src/main/resources/assets/modernlifepatch/models/block/mirror.json new file mode 100644 index 0000000..9a987d4 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/mirror.json @@ -0,0 +1,110 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "25": "modernlifepatch:block/mirror", + "particle": "modernlifepatch:block/mirror" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [1, 16, 1], + "faces": { + "north": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "east": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "south": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "west": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "up": {"uv": [7.5, 0, 8, 0.5], "texture": "#25"}, + "down": {"uv": [7.5, 7.5, 8, 8], "texture": "#25"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 0, 0]}, + "faces": { + "north": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "east": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "south": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "west": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "up": {"uv": [7.5, 0, 8, 0.5], "texture": "#25"}, + "down": {"uv": [7.5, 7.5, 8, 8], "texture": "#25"} + } + }, + { + "from": [1, 15, 0], + "to": [15, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 1]}, + "faces": { + "north": {"uv": [0.5, 0, 7.5, 0.5], "texture": "#25"}, + "east": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "south": {"uv": [0.5, 0, 7.5, 0.5], "texture": "#25"}, + "west": {"uv": [7.5, 0, 8, 8], "texture": "#25"}, + "up": {"uv": [7.5, 0.5, 0.5, 0], "texture": "#25"}, + "down": {"uv": [0.5, 0, 7.5, 0.5], "rotation": 180, "texture": "#25"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 1, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [2, -15, 0]}, + "faces": { + "north": {"uv": [0.5, 15.5, 7.5, 16], "texture": "#25"}, + "east": {"uv": [7.5, 0, 7.75, 0.25], "texture": "#25"}, + "south": {"uv": [0.5, 15.5, 7.5, 16], "texture": "#25"}, + "west": {"uv": [7.5, 0, 7.75, 0.25], "texture": "#25"}, + "up": {"uv": [0.5, 15.5, 7.5, 16], "rotation": 180, "texture": "#25"}, + "down": {"uv": [0.5, 15.5, 7.5, 16], "texture": "#25"} + } + }, + { + "from": [1, 1, 0.099], + "to": [15, 15, 0.099], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 1, 0.099]}, + "faces": { + "north": {"uv": [8.5, 6, 15.5, 13], "texture": "#25"}, + "east": {"uv": [0, 0, 0, 3.5], "texture": "#25"}, + "south": {"uv": [0.5, 0.5, 7.5, 7.5], "texture": "#25"}, + "west": {"uv": [0, 0, 0, 3.5], "texture": "#25"}, + "up": {"uv": [0, 0, 0, 3.5], "rotation": 90, "texture": "#25"}, + "down": {"uv": [0, 0, 0, 3.5], "rotation": 270, "texture": "#25"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [3.5, -1.5, 0], + "scale": [0.625, 0.625, 0.625] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 0, -15.25] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, 0, -7] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/tall_mirror_bottom.json b/src/main/resources/assets/modernlifepatch/models/block/tall_mirror_bottom.json new file mode 100644 index 0000000..8c6f8fe --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/tall_mirror_bottom.json @@ -0,0 +1,105 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "24": "modernlifepatch:block/tall_mirror", + "particle": "modernlifepatch:block/tall_mirror" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [1, 16, 1], + "faces": { + "north": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "east": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "south": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "west": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#24"}, + "down": {"uv": [0, 15.5, 0.5, 16], "texture": "#24"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 1, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 0]}, + "faces": { + "north": {"uv": [0, 15.5, 8, 16], "texture": "#24"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#24"}, + "south": {"uv": [0, 15.5, 8, 16], "texture": "#24"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#24"}, + "up": {"uv": [0, 15.5, 8, 16], "texture": "#24"}, + "down": {"uv": [0, 15.5, 8, 16], "texture": "#24"} + } + }, + { + "from": [1, 1, 0], + "to": [15, 16, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 30, 0]}, + "faces": { + "north": {"uv": [8.5, 8, 15.5, 15.5], "texture": "#24"}, + "east": {"uv": [0, 8, 1, 16], "texture": "#24"}, + "south": {"uv": [0.5, 8, 7.5, 15.5], "texture": "#24"}, + "west": {"uv": [0, 8, 1, 16], "texture": "#24"}, + "up": {"uv": [0, 0, 16, 1], "texture": "#24"}, + "down": {"uv": [0, 0, 16, 1], "texture": "#24"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 0, 0]}, + "faces": { + "north": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "east": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "south": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "west": {"uv": [0, 8, 0.5, 16], "texture": "#24"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#24"}, + "down": {"uv": [0, 15.5, 0.5, 16], "texture": "#24"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.5, -4.5, 0], + "scale": [0.475, 0.475, 0.475] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 0, -15.25] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -4, -3], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "bottom", + "origin": [15, -16, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/models/block/tall_mirror_top.json b/src/main/resources/assets/modernlifepatch/models/block/tall_mirror_top.json new file mode 100644 index 0000000..07903b4 --- /dev/null +++ b/src/main/resources/assets/modernlifepatch/models/block/tall_mirror_top.json @@ -0,0 +1,106 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "24": "modernlifepatch:block/tall_mirror", + "particle": "modernlifepatch:block/tall_mirror" + }, + "elements": [ + { + "from": [1, 15, 0], + "to": [15, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 15, 0]}, + "faces": { + "north": {"uv": [0, 0, 8, 0.5], "texture": "#24"}, + "east": {"uv": [0, 0, 1, 16], "texture": "#24"}, + "south": {"uv": [0, 0, 8, 0.5], "texture": "#24"}, + "west": {"uv": [0, 0, 1, 16], "texture": "#24"}, + "up": {"uv": [0, 0, 8, 0.5], "texture": "#24"}, + "down": {"uv": [0, 0, 8, 0.5], "texture": "#24"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 15, 0.1], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 14, 0]}, + "faces": { + "north": {"uv": [8.5, 0.5, 15.5, 8], "texture": "#24"}, + "east": {"uv": [0, 0, 1, 8], "texture": "#24"}, + "south": {"uv": [0.5, 0.5, 7.5, 8], "texture": "#24"}, + "west": {"uv": [0, 0, 1, 8], "texture": "#24"}, + "up": {"uv": [0, 0, 16, 1], "texture": "#24"}, + "down": {"uv": [0, 0, 16, 1], "texture": "#24"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [15, -16, 0]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "east": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "west": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#24"}, + "down": {"uv": [0, 15.5, 0.5, 16], "texture": "#24"} + } + }, + { + "from": [0, 0, 0], + "to": [1, 16, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -16, 0]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "east": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "south": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "west": {"uv": [0, 0, 0.5, 8], "texture": "#24"}, + "up": {"uv": [0, 0, 0.5, 0.5], "texture": "#24"}, + "down": {"uv": [0, 15.5, 0.5, 16], "texture": "#24"} + } + } + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "translation": [0, 3, 3], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 2], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.5, -4.5, 0], + "scale": [0.475, 0.475, 0.475] + }, + "head": { + "rotation": [0, 180, 0], + "translation": [0, 0, -15.25] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, -4, -3], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "top", + "origin": [0, -16, 0], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modernlifepatch/textures/block/large_mirror.png b/src/main/resources/assets/modernlifepatch/textures/block/large_mirror.png new file mode 100644 index 0000000..11e92fe Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/block/large_mirror.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/block/massive_mirror.png b/src/main/resources/assets/modernlifepatch/textures/block/massive_mirror.png new file mode 100644 index 0000000..55cdf80 Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/block/massive_mirror.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/block/mirror.png b/src/main/resources/assets/modernlifepatch/textures/block/mirror.png new file mode 100644 index 0000000..c74579f Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/block/mirror.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/block/tall_mirror.png b/src/main/resources/assets/modernlifepatch/textures/block/tall_mirror.png new file mode 100644 index 0000000..c74579f Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/block/tall_mirror.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/item/large_mirror_item.png b/src/main/resources/assets/modernlifepatch/textures/item/large_mirror_item.png new file mode 100644 index 0000000..163c843 Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/item/large_mirror_item.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/item/massive_mirror_item.png b/src/main/resources/assets/modernlifepatch/textures/item/massive_mirror_item.png new file mode 100644 index 0000000..e9296e0 Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/item/massive_mirror_item.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/item/mirror_item.png b/src/main/resources/assets/modernlifepatch/textures/item/mirror_item.png new file mode 100644 index 0000000..e2b72d4 Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/item/mirror_item.png differ diff --git a/src/main/resources/assets/modernlifepatch/textures/item/tall_mirror_item.png b/src/main/resources/assets/modernlifepatch/textures/item/tall_mirror_item.png new file mode 100644 index 0000000..6c8785f Binary files /dev/null and b/src/main/resources/assets/modernlifepatch/textures/item/tall_mirror_item.png differ diff --git a/src/main/resources/data/modernlifepatch/tags/items/m_tool.json b/src/main/resources/data/modernlifepatch/tags/items/m_tool.json index 412a8e8..499f094 100644 --- a/src/main/resources/data/modernlifepatch/tags/items/m_tool.json +++ b/src/main/resources/data/modernlifepatch/tags/items/m_tool.json @@ -9,7 +9,7 @@ "modernlife:seed_spreader", "modernlife:power_transmitter", "modernlife:power_receiver", - "modernlife:photon", + "modernlife:handgun", "modernlife:flashlight" ] } \ No newline at end of file diff --git a/src/main/resources/modernlifepatch.mixins.json b/src/main/resources/modernlifepatch.mixins.json index 33d8376..deeaff3 100644 --- a/src/main/resources/modernlifepatch.mixins.json +++ b/src/main/resources/modernlifepatch.mixins.json @@ -11,6 +11,7 @@ "block.common.MixinBookShelf", "block.common.MixinCanvas", "block.common.MixinCCTVCamera", + "block.common.MixinCeilingFan", "block.common.MixinChair", "block.common.MixinChessBoard", "block.common.MixinCoffeeMug", diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/models/block/glass_stairs.json b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/models/block/glass_stairs.json index 2a94ad2..6276c28 100644 --- a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/models/block/glass_stairs.json +++ b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/models/block/glass_stairs.json @@ -1,8 +1,51 @@ { - "parent": "minecraft:block/stairs", - "textures": { - "bottom": "minecraft:block/glass", - "top": "minecraft:block/glass", - "side": "minecraft:block/glass" - } + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "block/glass", + "4": "modernlife:block/glass_stairs_side", + "6": "modernlife:block/glass_stairs_top", + "7": "modernlife:block/glass_stairs_top_1", + "8": "modernlife:block/glass_stairs_top_2", + "particle": "modernlife:block/glass_stairs_side" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 8, 16, 16], "texture": "#4", "cullface": "north"}, + "east": {"uv": [0, 8, 16, 16], "texture": "#1", "cullface": "east"}, + "south": {"uv": [16, 8, 0, 16], "texture": "#4", "cullface": "south"}, + "west": {"uv": [0, 8, 16, 16], "texture": "#6", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#8"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "down"} + } + }, + { + "from": [8, 8, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#4", "cullface": "north"}, + "east": {"uv": [0, 0, 16, 8], "texture": "#1", "cullface": "east"}, + "south": {"uv": [8, 0, 0, 8], "texture": "#4", "cullface": "south"}, + "west": {"uv": [0, 0, 16, 8], "texture": "#6"}, + "up": {"uv": [8, 0, 16, 16], "texture": "#7", "cullface": "up"} + } + } + ], + "display": { + "thirdperson_lefthand": { + "rotation": [75, -135, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "gui": { + "rotation": [30, 135, 0], + "scale": [0.625, 0.625, 0.625] + }, + "head": { + "rotation": [0, -90, 0] + } + } } \ No newline at end of file diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass.png b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass.png new file mode 100644 index 0000000..1ddd845 Binary files /dev/null and b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass.png differ diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_side.png b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_side.png new file mode 100644 index 0000000..702e0bb Binary files /dev/null and b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_side.png differ diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top.png b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top.png new file mode 100644 index 0000000..424748f Binary files /dev/null and b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top.png differ diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top_1.png b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top_1.png new file mode 100644 index 0000000..ecc2516 Binary files /dev/null and b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top_1.png differ diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top_2.png b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top_2.png new file mode 100644 index 0000000..7a8ecdf Binary files /dev/null and b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/block/glass_stairs_top_2.png differ diff --git a/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/entity/bicycle_uv.png b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/entity/bicycle_uv.png new file mode 100644 index 0000000..901648b Binary files /dev/null and b/src/main/resources/resourcepacks/modernlifepatch/assets/modernlife/textures/entity/bicycle_uv.png differ